$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};
$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]);returnc};
$jscomp.inherits=function(b,c){function a(){}a.prototype=c.prototype;b.prototype=new a;b.prototype.constructor=b;for(var d in c)if($jscomp.global.Object.defineProperties){var g=$jscomp.global.Object.getOwnPropertyDescriptor(c,d);void 0!==g&&$jscomp.global.Object.defineProperty(b,d,g)}else b[d]=c[d]};String.prototype.startsWith||(String.prototype.startsWith=function(b){return 0===this.lastIndexOf(b,0)});
function ReadShort(b,c){return(b.charCodeAt(c)<<8)+b.charCodeAt(c+1)}functionReadShortX(b,c){return(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}functionReadInt(b,c){return16777216*b.charCodeAt(c)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}functionReadSInt(b,c){return(b.charCodeAt(c)<<24)+(b.charCodeAt(c+1)<<16)+(b.charCodeAt(c+2)<<8)+b.charCodeAt(c+3)}functionReadIntX(b,c){return16777216*b.charCodeAt(c+3)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+1)<<8)+b.charCodeAt(c)}
function ObjectToStringEx(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";if(b instanceof Array)for(var d in b)a+="<br/>"+gap(c)+"Item #"+d+": "+ObjectToStringEx(b[d],c+1);else if(b instanceof Object)for(d in b)a+="<br/>"+gap(c)+d+" = "+ObjectToStringEx(b[d],c+1);else a+=EscapeHtml(b);return a}
function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";if(b instanceof Array)for(var d in b)a+="\r\n"+gap2(c)+"Item #"+d+": "+ObjectToStringEx2(b[d],c+1);else if(b instanceof Object)for(d in b)a+="\r\n"+gap2(c)+d+" = "+ObjectToStringEx2(b[d],c+1);else a+=EscapeHtml(b);return a}function gap(b){for(var c="",a=0;a<4*b;a++)c+=" ";returnc}functiongap2(b){for(varc="",a=0;a<4*b;a++)c+="";returnc}functionObjectToString(b){returnObjectToStringEx(b,0)}
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);returnnewBlob([newUint8Array(c)])}functionrandom(b){returnMath.floor(Math.random()*b)}functiontrademarks(b){returnb.replace(/\(R\)/g,"®").replace(/\(TM\)/g,"™")}functionformat(b){varc=Array.prototype.slice.call(arguments,1);returnb.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeofc[b]?c[b]:a})}
function makeUefiBootParam(b,c,a,d){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(d?d:32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
new FileReader;e.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),b=String.fromCharCode.apply(null,b));g.SendDataToHost(T,0==F,b,a&1);0<F&&0==N?d(a):(u=null,N?(g.SendCommand(71),H=[],N=!1):0<H.length&&(b=H.shift(),u=b.media,T=b.dev,P=b.lba,F=b.len,d(b.fr)))};e.readAsBinaryString?e.readAsBinaryString(u.slice(x,x+b)):e.readAsArrayBuffer(u.slice(x,x+b))}varg={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,
v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",g.acc.length,rstr2hex(g.acc));;){a=g.ProcessDataEx();if(0==a)break;if(g.inSequence!=ReadIntX(g.acc,4)){b("ERROR: Out of sequence",g.inSequence,ReadIntX(g.acc,4));g.Stop();break}g.inSequence++;g.acc=g.acc.substring(a)}};g.SendCommand=function(a,x,e,c){null==x&&(x="");e=50<a&&1==e?2:0;c&&(e+=1);x=String.fromCharCode(a,0,0,e)+IntToStrX(g.outSequence++)+x;g.parent.xxSend(x);g.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND:"+rstr2hex(x)+
var H=[],N=!1,u=null,T,P,F;return g},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,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!=
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]);break;
for(i in e.pendingAjaxCall)e.sendRequest(e.pendingAjaxCall[i][0],e.pendingAjaxCall[i][3],e.pendingAjaxCall[i][4])}function p(a){var b=e.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(e.socketAccumulator=b+a;;){if(0==e.socketParseState){b=e.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;e.socketHeader=e.socketAccumulator.substring(0,b).split("\r\n");if(null==e.amtVersion)for(var c in e.socketHeader)0==e.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&
var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:SelectorName="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+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>";
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 h=q.GetNameFromUrl(a);a="<r:"+h+'xmlns:r="'+a+'">';for(var g in b)if(b.hasOwnProperty(g)&&0!==g.indexOf("__")&&0!==g.indexOf("@")&&null!=b[g]&&"function"!==typeof b[g])if("object"===typeof b[g]&&
p(k)+"</Header><Body><g:"+h+'xmlns:g="'+a+'">';for(var g in b)a+="<g:"+g+">"+b[g]+"</g:"+g+">";q.PerformAjax(a+"</g:"+h+"></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++ +"</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>"+
h){var g="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var B in c[l])g+="<r:"+l+">"+c[l][B]+"</r:"+l+">";else g+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,g,p,d,k,h)};q.ExecMethodXml=function(a,b,c,d,m,k,h){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>"+
function AmtStackCreateService(b){function c(){var a=e.GetPendingActions();C<a&&(C=a);null!=e.onProcessChanged&&w!=a&&(w=a,e.onProcessChanged(a,C));0==a&&(C=0)}functiona(a,b,c,p,z,h,k){200!=z?(c(e,a,null,z,h),g(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?e.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,e,p,z){d(a,p,c,e,[],z,h,k)}):(c(e,a,null,603,h),g(1))}functiond(a,b,p,h,z,E,k,m){if(200!=E)p(e,a,null,E,k),g(1);elseif(null==b||"PullResponse"!=b.Header.Method)p(e,
a,null,604,k),g(1);else{for(var r in b.Body.Items)if(b.Body.Items[r]instanceof Array)for(var q in b.Body.Items[r])"function"!=typeof b.Body.Items[r][q]&&z.push(b.Body.Items[r][q]);else"function"!=typeof b.Body.Items[r]&&z.push(b.Body.Items[r]);b.Body.EnumerationContext?e.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,e,A){d(a,e,p,c,z,A,k,1)}):(g(1),p(e,a,z,E,k),c())}}function g(a){e.ActiveEnumsCount-=a;e.ActiveEnumsCount>=e.MaxActiveEnumsCount||0==e.PendingEnums.length?c():(a=e.PendingEnums.shift(),
r[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],K[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]&&
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"+e.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.";
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?"Touslesfiltresdepaquetsre\u00e7usont\u00e9t\u00e9misencorrespondancesur"+b+"interface.":4294967292==a?"Touslesfiltresdepaquetssortantsont\u00e9t\u00e9misencorrespondancesur"+b+"interface.":4294967290==a?"Lefiltredepaquetsusurp\u00e9a\u00e9t\u00e9misencorrespondancesur"+
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.";
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.Lesyst\u00e8mepeut\u00eatreattaqu\u00e9.":30==a?"Pasdesupportded\u00e9marrage":32==a?"Blocagedusyst\u00e8med'exploitationouinterruptiond'alimentation":35==a?64==c[0]?"BIOSPOST(PowerOnSelf-Test)WatchdogTimeout.":
"\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](e,[],p);else{var h,k,m=d[1],g=new Date,r;if(0<c.Body.RecordsReturned)for(kinc.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=B[b.AuditAppID];b.Event=B[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);r=ReadInt(a,h);
e.BatchEnum=function(a,b,p,d,z,h){z={_pending:b.length};e.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],g=e.Enum;"*"==m[0]&&(g=e.Get,m=m.substring(1));g(m,function(b,z,A,h,k){e.PendingBatchOperations--;c();k[2][z]={response:null==A?null:A.Body,responses:A,status:h};0==--k[2]._pending&&(delete k[2]._pending,p.call(e,e,a,k[2],h,d))},[a,b,z,g==e.Get?"Get":"Enum"],h)}};e.BatchGet=function(a,b,p,e,d){v({name:a,names:b,callback:p,current:0,responses:{},tag:e,pri:d});c()};e.CompleteName=function(a){if(0==
[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(";"),
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(";");
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(";"),r=";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(";"),K={1:"",2:"HTTPS",4:"Local PBA",
8:"WinRE"},B={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",
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",
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",
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",
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",
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® 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",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",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",
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"};
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}
function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",g=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()+g+v+">"));return a+("</r:"+b+">")}
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:SelectorName="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
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);returnc}
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++){vara=parseInt(b[c]);if(a!=b[c])returnnull;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]);returna}
(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var d=e.setImmediate;e.setImmediate=function(e){15<Date.now()-b?(b=Date.now(),d(e)):(a.push(e),1===a.length&&p.setAttribute("a",c=!c))}}e.nextTick=e.setImmediate}})();e.isArray=Array.isArray||function(a){return"[objectArray]"===Object.prototype.toString.call(a)};e.isArrayBuffer=function(a){return"undefined"!==typeofArrayBuffer&&ainstanceofArrayBuffer};e.isArrayBufferView=function(a){returna&&
(b||"raw")&&(a=e.encodeUtf8(a));return new e.ByteBuffer(a)};e.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);returnc};e.xorBytes=function(a,b,c){for(varp="",e="",d="",h=0,k=0;0<c;--c,++h)e=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(p+=d,d="",k=0),d+=String.fromCharCode(e),++k;returnp+d};e.hexToBytes=function(a){varb="",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));returnb};e.bytesToHex=
var p=b;p||(p=new Uint8Array(a.length));for(var d=c=c||0,h=0;h<a.length;++h)p[d++]=a.charCodeAt(h);returnb?d-c:p};e.text.utf8.decode=function(a){returne.decodeUtf8(String.fromCharCode.apply(null,a))};e.text.utf16.encode=function(a,b,c){varp=b;p||(p=newUint8Array(2*a.length));for(vare=newUint16Array(p.buffer),d=c=c||0,h=c,k=0;k<a.length;++k)e[h++]=a.charCodeAt(k),d+=2;returnb?d-c:p};e.text.utf16.decode=function(a){returnString.fromCharCode.apply(null,newUint16Array(a.buffer))};e.deflate=function(a,
b,c){b=e.decode64(a.deflate(e.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};e.inflate=function(a,b,c){a=a.inflate(e.encode64(b)).rval;return null===a?null:e.decode64(a)};var g=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=e.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.");
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(e.decode64(c)));return c},m=function(a,b,c,p){var e=l(a,b);null===e&&(e={});e[c]=p;g(a,b,e)},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 p=l(a,b);if(null!==p&&c in p){delete p[c];c=!0;for(var e in p){c=!1;break}c&&(p=null);g(a,b,p)}},r=function(a,b){g(a,b,null)},K=function(a,b,
c){var p=null;"undefined"===typeof c&&(c=["web","flash"]);var e,d=!1,h=null,k;for(k in c){e=c[k];try{if("flash"===e||"both"===e){if(null===b[0])throw Error("Flash local storage not available.");p=a.apply(this,b);d="flash"===e}if("web"===e||"both"===e)b[0]=localStorage,p=a.apply(this,b),d=!0}catch(m){h=m}if(d)break}if(!d)throw h;return p};e.setItem=function(a,b,c,p,e){K(m,arguments,e)};e.getItem=function(a,b,c,p){return K(k,arguments,p)};e.removeItem=function(a,b,c,p){K(h,arguments,p)};e.clearItems=
(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?
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();
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]);
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;
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,
"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,r=d(b);if(b.length()<r){if(g)throwm=Error("ToofewbytestoreadASN.1value."),m.detail=b.length()+"<"+r,m;r=b.length()}varl,B=32===(k&32);l=B;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<r){varx=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)===r-(b.read-
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)throwError("Integertoolarge;maxis32-bits.");returnb.getSignedInt(c)};c.validate=function(b,d,e,g){varh=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeofd.tagClass||b.type!==d.type&&"undefined"!==typeofd.type)g&&(b.tagClass!==d.tagClass&&g.push("["+d.name+']Expectedtagclass"'+d.tagClass+
'", got "'+b.tagClass+'"'),b.type!==d.type&&g.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 r=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[r]&&((h=c.validate(b.value[r],d.value[l],e,g))?++r:d.value[l].optional&&(h=!0)),!h&&g&&g.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
"Content-Domain"!==x.name)if(q.dekInfo||"DEK-Info"!==x.name)q.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.');q.dekInfo={algorithm:A[0],parameters:A[1]||null}}else q.contentDomain=A[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.');
q.procType={version:A[0],type:A[1]}}}++B}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 g=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var g=v.map(function(b){return a(b)}).concat(b);
var I=I&-15,G=G&-15,Z=c[I>>>28]|d[I>>>24&15]|e[I>>>20&15]|g[I>>>16&15]|h[I>>>12&15]|k[I>>>8&15]|q[I>>>4&15],ca=m[G>>>28]|l[G>>>24&15]|r[G>>>20&15]|w[G>>>16&15]|F[G>>>12&15]|B[G>>>8&15]|L[G>>>4&15];D=(ca>>>16^Z)&65535;C[K++]=Z^D;C[K++]=ca^D<<16}}this._keys=C;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",
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);elseif(l.length!==n.digestLength)throwv=Error("InvalidRSAES-OAEPseed.Theseedlengthmustmatchthedigestlength."),v.seedLength=l.length,v.digestLength=n.digestLength,
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:
Error("Message is too long for PKCS#1 v1.5 padding."),g.length=b.length,g.max=d-11,g;g.putByte(0);g.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var h=0;h<d;++h)g.putByte(e)}elsefor(;0<d;){for(vark=0,l=a.random.getBytes(d),h=0;h<d;++h)e=l.charCodeAt(h),0===e?++k:g.putByte(e);d=k}g.putByte(0);g.putBytes(b);returng}functiond(b,c,e,g){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);varh=b.getByte(),k=b.getByte();if(0!==h||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
typeof g)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-g,g=0;g<e;++g){if(0!==b.getByte())throwError("Encryptionblockisinvalid.");}elseif(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}elseif(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())throwError("Encryptionblockisinvalid.");returnb.getBytes()}functiong(b,c,d){functione(){k(b.pBits,function(a,c){if(a)returnd(a);b.p=c;if(null!==b.q)returnl(a,
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"}]}]},y=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
[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,B,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
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,A,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."),
var C=q*Math.ceil(u/q);d=new a.util.ByteBuffer;for(l=0;l<C;l++)d.putByte(c.at(l%u));C=q*Math.ceil(b/q);c=newa.util.ByteBuffer;for(l=0;l<C;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(g/m);for(d=1;d<=c;d++){C=newa.util.ByteBuffer;C.putBytes(w.bytes());C.putBytes(v.bytes());for(l=0;l<e;l++)h.start(),h.update(C.getBytes()),C=h.digest();varD=newa.util.ByteBuffer;for(l=0;l<q;l++)D.putByte(C.at(l%m));varY=Math.ceil(u/q)+Math.ceil(b/q),L=newa.util.ByteBuffer;for(k=0;k<Y;k++){varea=newa.util.ByteBuffer(v.getBytes(q)),
case "aes256-CBC":q=32;h=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":q=24;h=a.des.createDecryptionCipher;break;case "desCBC":q=8,h=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,m,q);e=e.encIv;h=h(b);h.start(e);return h};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var e={},k=[];if(!g.validate(c,h,e,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(e.salt),e=a.util.createBuffer(e.iterations),
(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,g=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,x=Math.ceil(v/8),A=b.digest().getBytes();
return y+A+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<g+m+2)throwError("InconsistentparameterstoPSSsignatureverification.");if(188!==k.charCodeAt(l-1))throwError("Encodedmessagedoesnotendin0xBC.");varn=l-g-1,v=k.substr(0,n);k=k.substr(n,g);vary=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&y))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),z="";for(q=0;q<n;q++)z+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
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 g(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeofb.name&&(b.type&&b.typeinh.oids?b.name=h.oids[b.type]:b.shortName&&b.shortNamein
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===r.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"===
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&&
"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 r?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r[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,
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."),
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()};
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",
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();
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".'),
b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=r[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.");
m.push(k.generalizedTimeToDate(e.certValidity2GeneralizedTime));void 0!==e.certValidity3UTCTime&&m.push(k.utcTimeToDate(e.certValidity3UTCTime));void 0!==e.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(e.certValidity4GeneralizedTime));if(2<m.length)throwError("CannotreadnotBefore/notAftervaliditytimes;morethantwotimeswereprovidedinthecertificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
y.validity.notBefore=m[0];y.validity.notAfter=m[1];y.tbsCertificate=e.tbsCertificate;if(d){y.md=null;if(y.signatureOid in r)switch(l=r[y.signatureOid],l){case "sha1WithRSAEncryption":y.md=a.md.sha1.create();break;case "md5WithRSAEncryption":y.md=a.md.md5.create();break;case "sha256WithRSAEncryption":y.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":y.md=a.md.sha512.create();break;case "RSASSA-PSS":y.md=a.md.sha256.create()}if(null===y.md)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,l=!0,k=null,m=0;do{var q=c.shift(),y=null,r=!1;if(g<q.validity.notBefore||g>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:g};if(null===k){y=c[0]||b.getIssuer(q);null===y&&q.isIssuer(q)&&(r=!0,y=q);if(y){var n=y;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){y=n.shift();
try{x=y.verify(q)}catch(v){}}x||(k={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==k||y&&!r||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===k&&y&&!q.isIssuer(y)&&(k={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===k&&x<q.extensions.length;++x){var w=q.extensions[x];!w.critical||w.name in n||(k=
{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||y&&!r)||(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:h.certificateError.bad_certificate})),
null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.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:h.certificateError.bad_certificate});
b.errors=B,b;u=m.derToOid(x.contentType);if(u!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=u,b;u=m.derToOid(x.encAlgorithm);u=k.pbe.getCipher(u,x.encParameter,A);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);u.update(x);if(!u.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");u=u.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
l(u,h,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++){varg={},h=[];if(!m.validate(a.value[e],B,g,h))throwa=Error("CannotreadSafeBag."),a.errors=h,a;varp={type:m.derToOid(g.bagId),attributes:n(g.bagAttributes)};d.push(p);varq,r,x=g.bagValue.value[0];switch(p.type){casek.oids.pkcs8ShroudedKeyBag:if(x=
k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(x)}catch(v){p.key=null,p.asn1=x}continue;case k.oids.certBag:q=A;r=function(){if(m.derToOid(g.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(g.certId);throw a;}a=m.fromDer(g.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
h.pkcs12FromAsn1=function(b,l,n){"string"===typeof l?(n=l,l=!0):void 0===l&&(l=!0);var r={};if(!m.validate(b,v,r,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var x={version:r.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(x.safeContents,null,null,b.bagType));void 0!==e&&
(d.localKeyId=c(x.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(x.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(x.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(x.safeContents,"localKeyId",a,b)}};if(3!==r.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=r.version.charCodeAt(0),l;if(m.derToOid(r.contentType)!==k.oids.data)throw l=
Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(r.contentType),l;b=r.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(r.mac){var w=null,A=0,u=m.derToOid(r.macAlgorithm);switch(u){case k.oids.sha1:w=a.md.sha1.create();A=20;break;case k.oids.sha256:w=a.md.sha256.create();A=32;break;case k.oids.sha384:w=a.md.sha384.create();A=48;break;case k.oids.sha512:w=a.md.sha512.create();
A=64;break;case k.oids.md5:w=a.md.md5.create(),A=16}if(null===w)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var u=new a.util.ByteBuffer(r.macSalt),B="macIterations"in r?parseInt(a.util.bytesToHex(r.macIterations),16):1,A=h.generateKey(n,u,3,B,A,w),u=a.hmac.create();u.start(w,A);u.update(b.value);if(u.getMac().getBytes()!==r.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}g(x,b.value,l,n);return x};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
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 g=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
m.handleUnexpected=function(a,b){(a.open||a.entity!==m.ConnectionEnd.client)&&a.error(a,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_message}})};m.handleHelloRequest=function(a,b,c){!a.handshaking&&0<a.handshakes&&(m.queue(a,m.createAlert(a,{level:m.Alert.Level.warning,description:m.Alert.Description.no_renegotiation})),m.flush(a));a.process()};m.parseHelloMessage=function(b,c,d){var e=null,g=b.entity===
!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=
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:z:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:z)):b.error(b,{message:e?"No server certificate provided.":
"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)returna.error(a,{message:"Invalidkeyparameters.OnlyRSAissupported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=r;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
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}});
try{var g=b.session.sp;g.pre_master_secret=d.decrypt(c);var h=b.session.clientHelloVersion;if(h.major!==g.pre_master_secret.charCodeAt(0)||h.minor!==g.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){g.pre_master_secret=a.random.getBytes(48)}b.expect=O;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,
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());
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(g){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=O;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)returnb.error(b,{message:"InvalidServerHelloDonemessage.Invalidlength.",
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));
4);d.read+=4;e in J[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(h),b.session.sha1.update(h)),J[b.entity][b.expect][e](b,c,g)):
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}}):
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}});
var y=a.util.createBuffer();n(y,3,q);e.putBuffer(y)}d=a.pki.certificateFromAsn1(g);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);
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(g){b.error(b,{message:"Could not get private key.",cause:g,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}}):
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 g=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(g))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
function(b,c){var d=null;if(b&&b.getSession&&b.setSession&&b.order)d=b;else{d={};d.cache=b||{};d.capacity=Math.max(c||100,1);d.order=[];for(var e in b)d.order.length<=c?d.order.push(e):delete b[e];d.getSession=function(b){var c=null,e=null;b?e=a.util.bytesToHex(b):0<d.order.length&&(e=d.order[0]);if(null!==e&&eind.cache){c=d.cache[e];deleted.cache[e];for(vargind.order)if(d.order[g]===e){d.order.splice(g,1);break}}returnc};d.setSession=function(b,c){if(d.order.length===d.capacity){vare=d.order.shift();
delete d.cache[e]}e=a.util.bytesToHex(b);d.order.push(e);d.cache[e]=c}}return d};m.createConnection=function(b){var c=null,c=b.caStore?a.util.isArray(b.caStore)?a.pki.createCaStore(b.caStore):b.caStore:a.pki.createCaStore(),d=b.cipherSuites||null;if(null===d){var d=[],e;for(e in m.CipherSuites)d.push(m.CipherSuites[e])}e=b.server?m.ConnectionEnd.server:m.ConnectionEnd.client;var g=b.sessionCache?m.createSessionCache(b.sessionCache):null,h={version:{major:m.Version.major,minor:m.Version.minor},entity:e,
!1;h.fail=!(a||"undefined"===typeof a);h.input.clear();h.tlsData.clear();h.data.clear();h.state.current=m.createConnectionState(h)}};h.reset();h.handshake=function(b){if(h.entity!==m.ConnectionEnd.client)h.error(h,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(h.handshaking)h.error(h,{message:"Handshake already in progress.",fatal:!1});else{h.fail&&!h.open&&0===h.handshakes&&(h.fail=!1);h.handshaking=!0;b=b||"";var c=null;0<b.length&&(h.sessionCache&&(c=h.sessionCache.getSession(b)),
m.queue(h,m.createAlert(h,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(h);h.closed(h)}h.reset(a)};return h};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());
r.Type.OCTETSTRING,!1,b.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!r.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(r.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=
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 r=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"===
b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=r.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:r.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!r.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=r.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
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,
r.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=r.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=r.toDer(d);h.getByte();r.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)throwError("Invalidsigner;authenticatedAttributesmustbepresentwhentheContentInfocontenttypeisnotPKCS#7Data.");
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 g?0===g[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):g[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(g[b.type].shift(),0===g[b.type].length?delete g[b.type]:g[b.type][0].start()):a.log.error("forge.task",
"[%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 g?g[a.type].push(b):(g[b.type]=[b],m(b))};a.task.cancel=function(a){a in g&&(g[a]=[g[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
function amtcert_linkCertPrivateKey(b,c){if(null!=c&&0!=c.length)for(var a in b){var d=b[a];try{for(var g=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),g=g.substring(0,g.length-24),v=0;v<c.length;v++)if(g===c[v].DERKey||g==btoa(atob(c[v].DERKey).substring(24)))c[v].XCert=d,d.XPrivateKey=c[v]}catch(n){console.log(n)}}}
function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),g=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(g,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();
var e=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,C=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,e,C);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,g){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,g)}
function amtcert_createCertificate(b,c,a,d,g){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",
function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8Array(c),d=0,g=b.length;d<g;d++)a[d]=b.charCodeAt(d);returnc}function_arrayBufferToString(b){varc="";b=newUint8Array(b);for(vara=b.byteLength,d=0;d<a;d++)c+=String.fromCharCode(b[d]);returnc}functioncertCetAsn1Values(b,c){if("string"===typeofb&&0==b.indexOf("https://"))c.push(b);elseif(Array.isArray(b))for(varainb)certCetAsn1Values(b[a],c);elseb&&"object"===typeofb&&certCetAsn1Values(b.value,c)}
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;
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);
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 r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
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,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,
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,g;for(g in a.TouchArray)g==b?e=c:1==a.TouchArray[g].f?(e=65542,a.TouchArray[g].f=3):e=2==a.TouchArray[g].f?262144:131078,d+=String.fromCharCode(g)+a.intToStr(e)+a.shortToStr(a.TouchArray[g].x)+a.shortToStr(a.TouchArray[g].y),2==a.TouchArray[g].f&&
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=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=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=
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,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
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");
r;g.next+=r;g.left-=r;d.length-=r;break}d.mode=11;break;case 16:if(!e(g,14))break a;d.nlen=C(g,5)+257;w(g,5);d.ndist=C(g,5)+1;w(g,5);d.ncode=C(g,4)+4;w(g,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;case17:for(;d.have<d.ncode;){if(!e(g,3))breaka;r=C(g,3);d.lens[A[d.have++]]=r;w(g,3)}for(;19>d.have;)d.lens[A[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(P=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
case 18:for(;d.have<d.nlen+d.ndist;){for(;;){r=d.codes[d.lencode+C(g,d.lenbits)];if(r.bits<=g.bits)break;if(!q(g))breaka}if(16>r.val)w(g,r.bits),d.lens[d.have++]=r.val;else{if(16==r.val){if(!e(g,r.bits+2))break a;w(g,r.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}u=d.lens[d.have-1];r=3+C(g,2);w(g,2)}else if(17==r.val){if(!e(g,r.bits+3))break a;w(g,r.bits);u=0;r=3+C(g,3);w(g,3)}else{if(!e(g,r.bits+7))break a;w(g,r.bits);u=0;r=11+C(g,7);w(g,7)}if(d.have+r>d.nlen+d.ndist){a.msg=
u.sane){r.msg="invalid distance too far back";u.mode=29;break b}da=0;U=-1;da=0==ba?da+(J-M):da+(ba-M);M<X&&(X-=M,r.output_data+=W.substring(da,da+M),L+=M,da=-1,U=L-ha)}elseda=-1,U=L-ha;if(0<=da)r.output_data+=W.substring(da,da+X),L+=X;else{M=X;M>L-U&&(M=L-U);r.output_data+=r.output_data.substring(U,U+M);L+=M;X-=M;U+=M;for(L+=X;2<X;)r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),r.output_data+=r.output_data.charAt(U++),X-=3;X&&(r.output_data+=r.output_data.charAt(U++),
d.offset+=C(g,d.extra);w(g,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==g.left)break a;r=k-g.left;if(d.offset>r){r=d.offset-r;if(r>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}r>d.wnext?(r-=d.wnext,u=d.wsize-r):u=d.wnext-r;K=-1;r>d.length&&(r=d.length)}else u=-1,K=a.next_out-d.offset,r=d.length;r>g.left&&(r=g.left);g.left-=r;d.length-=r;if(0<=u)a.output_data+=d.window.substring(u,u+r),a.next_out+=r;else{a.next_out+=r;do a.output_data+=a.output_data.charAt(K++);while(--r)}0==
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(varcinAllWsman)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));
function documentFileSelectHandler(b){haltEvent(b);for(var c=!0,a=0;a<b.dataTransfer.files.length;a++)0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".img")&&0==b.dataTransfer.files[a].name.toLowerCase().endsWith(".iso")&&(c=!1);1==c&&null!=b.dataTransfer&&0<currentView&&100>currentView&&(1==b.dataTransfer.files.length||2==b.dataTransfer.files.length)?(a=c=null,b.dataTransfer.files[0].name.toLowerCase().endsWith(".iso")&&(a=b.dataTransfer.files[0]),b.dataTransfer.files[0].name.toLowerCase().endsWith(".img")&&
function connectButtonfunction(){wsstack&&0!=wsstack.socketState?disconnect():meshcentral2credCallback()}function connectButtonfunctionEx(){currentMeshNode=parent.getCurrentNode();connect(currentMeshNode._id,16992,null,null,0);Q("xconnectbutton1").value="D\u00e9connecter"}function getCurrentMeshNode(){return currentMeshNode}function setConnectionState(b){QE("xconnectbutton1",b);0==b&&disconnect()}function setFrameHeight(b){}function setAuthCallback(b){meshcentral2credCallback=b}
function setUrlVar(b,c){urlvars||(urlvars={});urlvars[b]=c}function cleanup(){c3.value="Commencer la capture";terminal.m.capture&&delete terminal.m.capture;terminal.Stop();desktop.disconnectCode=0;desktop.Stop()}
function handleKeyUp(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyUp(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyUp(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyUp(b)}}
function handleKeyDown(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeyDown(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeyDown(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeyDown(b)}}
function handleKeyPress(b){if(!xxdialogMode){if(14==currentView&&3==desktop.State){if(Q(48).checked)return;if(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop)webRtcDesktop.softdesktop.m.handleKeys(b),desktop.m.sendKeepAlive();else return desktop.m.handleKeys(b)}if(13==currentView&&3==terminal.State)return terminal.m.TermHandleKeys(b)}}var connectFunc=null,connectFuncTag=null;
function connect(b,c,a,d,g,v,n){go(0);fullscreenonly=!1;connectFunc=v;connectFuncTag=n;1==urlvars.kvm&&go(14);if(1==urlvars.kvmfull||1==urlvars.kvmonly)go(14),deskToggleFull(1==urlvars.kvmonly);1==urlvars.sol&&go(13);wsstack=WsmanStackCreateService(b,c,a,d,g);amtstack=AmtStackCreateService(wsstack);amtstack.onProcessChanged=onProcessChanged;for(b=2;25>b;b++)QV("go"+b,!1);QV("go8",!0);QV("go13",!1);QE("TermWD",!1);QV("go12",!0);QH(28,"");QH(39,"");amtversion=amtversionmin=amtFirstPull=
function disconnect(){null!=desktopPollTimer&&(clearInterval(desktopPollTimer),desktopPollTimer=null);fullscreen&&deskToggleFull();iderStop();StopDefenseStatsTimer();dialogclose(0);amtstack&&(amtstack.onProcessChanged=null,amtstack.CancelAllQueries(999),amtstack=null);cleanup();wsstack=null;delete amtstack;onProcessChanged(0,1);go(101);Q("xconnectbutton1").value="Relier";QH(5,"D\u00e9branch\u00e9");go(100)}
function onProcessChanged(b,c){QS(3).width=100*b/c+"%";0==b&&refreshButtons(!0);0==b&&amtstack&&(0<amtversion&&0==(amtFirstPull&64)?(amtFirstPull|=64,PullPowerPolicy(),subscriptionsFilters=null,PullEventSubscriptions(),PullWatchdog(),5<amtversion&&(PullCertificates(),PullRemoteAccess())):0==(amtFirstPull&1)?PullHardware():0==(amtFirstPull&16)?PullEventLog():0==(amtFirstPull&32)&&PullAuditLog())}
function checkAmtVersion(b){var c=b.split(".");b=parseInt(c[0]);var a=parseInt(c[1]),c=parseInt(c[2]),c=1E3*a+c,d=0;5>=b||12<=b?d=1:6==b&&2061<=c?d=1:7==b&&1091<=c?d=1:8==b&&1071<=c?d=1:9==b?5>a&&1041<=c?d=1:5061<=c&&(d=1):10==b&&55<=c?d=1:11==b&&(5>a&&25<=c?d=1:6027<=c&&(d=1));return 0==d}
function processSystemVersion(b,c,a,d){if(200==d||400==d){if(200==d){amtlogicalelements=[];null!=a&&null!=a.CIM_SoftwareIdentity&&null!=a.CIM_SoftwareIdentity.responses&&(amtlogicalelements=a.CIM_SoftwareIdentity.responses,null!=a.AMT_SetupAndConfigurationService&&null!=a.AMT_SetupAndConfigurationService.response&&amtlogicalelements.push(a.AMT_SetupAndConfigurationService.response));if(0==amtlogicalelements.length){console.error("ERROR: Could not get Intel AMT version.");disconnect();return}c=getInstance(amtlogicalelements,
function PullPowerState(){amtstack&&0==amtstack.GetPendingActions()&&amtsysstate&&amtsysstate.CIM_ServiceAvailableToElement&&amtstack.Enum("CIM_ServiceAvailableToElement",function(b,c,a,d){200==d&&(amtsysstate.CIM_ServiceAvailableToElement.responses=a,9<amtversion&&null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?
function PullSystemStatus(b){refreshButtons(!1);amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime);var c=["CIM_ServiceAvailableToElement","*AMT_GeneralSettings","AMT_EthernetPortSettings","*AMT_RedirectionService","CIM_ElementSettingData"];5<amtversion&&c.push("IPS_IPv6PortSettings","*CIM_KVMRedirectionSAP","*IPS_OptInService","*IPS_KVMRedirectionSettingData");9<amtversion&&c.push("*IPS_ScreenConfigurationService","*IPS_PowerManagementService");15<amtversion&&1==amtstack.wsman.comm.xtls&&
200==a.AMT_RedirectionService.status&&QV("go13",!0);d=0;for(var g in a)null!=a[g]&&a[g].status>d&&(d=a[g].status);400!=d&&errcheck(d,b)||(amtsysstate=a,applyDesktopSettings(),updateSystemStatus())}function syncClock(){xxdialogMode||setDialogMode(11,"Synchroniser l'horloge",3,syncClockEx,"Synchroniser l'horloge Intel AMT avec cet ordinateur?")}
function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(function(b,c,a,d){200!=d?messagebox("","Impossible de r\u00e9gler l'heure, \u00e9tat ="+d):0!=a.Body.ReturnValue?messagebox("","Impossible de r\u00e9gler l'heure, erreur: "+a.Body.ReturnValueStr):(b=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(a.Body.Ta0,b,b,function(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}))})}
var DMTFPowerStates=";;Allumer;Sommeil l\u00e9ger;Sommeil profond;Cycle d'alimentation (Soft off);Arr\u00eat - Difficile;Hibernation (Off soft);Arr\u00eat progressif;Cycle d'alimentation (hors tension);R\u00e9initialisation du bus principal;Interruption de diagnostic (NMI);N'est pas applicable;Off - doux gracieux;Off - Gracieux dur;R\u00e9initialisation du bus ma\u00eetre gracieuse;Cycle d'alimentation (Off - Soft graceful);Cycle d'alimentation (Off - Hard graceful);Interruption de diagnostic (INIT)".split(";");
function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){varb=0,c,a,d=TableStart(),g="",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&&
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?
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\u00e9enmodedecontr\u00f4leclient(CCM)",
6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(g+=", Port de redirection");q&&(g+=", S\u00e9rie sur LAN");n&&(g+=", IDE-Redirect");e&&(g+=", KVM");""==g&&(g=" Aucun");d+=TableEntry("Fonctionnalit\u00e9s actives",addLinkConditional(g.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,g="Affichage principal",7<amtversion&&void0!==
null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(g="\u00c9tat inconnu",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(g="Non requis"),1==p&&(g="Requis pour KVM uniquement"),4294967295==p&&(g="Toujours requis"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(g=addLinkConditional(g,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentement de l'utilisateur",g));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=
amtsysstate.CIM_BootService.response.EnabledState&&(g={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&&(g[32768]="OCR&RPEDisabled",g[32769]="OCREnabled,RPEDisabled"),n=g[amtsysstate.CIM_BootService.response.EnabledState]?g[amtsysstate.CIM_BootService.response.EnabledState]:
" ";d+=TableEnd(g);amtstack.amtauth&&(d+="<divstyle=position:absolute;top:10px;right:20px;cursor:pointeronclick=showAuthCsme()><imgsrc=authcsme.pngwidth=100height=100/></div>");QH(15,d);d="<tableclass=log1cellpadding=0cellspacing=0style=width:100%;border-radius:8px>"+TableEnd("<div> "+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();
g="";"<i>Aucun</i>"!=c&&(1==v.SharedFQDN&&(g=", partag\u00e9 avec OS"),0==v.SharedFQDN&&(g=", diff\u00e9rent du syst\u00e8me d'exploitation"));d+=TableEntry("Nom et domaine",addLinkConditional(c+g,"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,
"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=
xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Etat",addLinkConditional(xxWifiState[xxWireless.CIM_WiFiPort.response.EnabledState],"showWifiStateDlg()",xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("\u00c9tat de la radio",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Aucun</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&
g=1==c.DHCPEnabled?"Automatique \u00e0 l'aide du serveur DHCP":"Adresse IP statique",1==c.IpSyncEnabled&&(g+=", IP sync with OS"),d+=TableEntry("\u00c9tat IPv4",addLinkConditional(g,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Adresse IPv4",isIpAddress(c.IPAddress,"Aucun"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Passerelle / masque IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Aucun")));g=c.PrimaryDNS;isIpAddress(g)&&(c.SecondaryDNS&&(g+=" / "+c.SecondaryDNS),d+=TableEntry("Serveur de nom de domaine IPv4",
TableEntry("Adresse IPv6","Aucun");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Routeur par d\u00e9faut IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(g=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(g+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Serveur de nom de domaine IPv6",g))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),
function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><inputtype=checkboxid=d11p1value=1"+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><inputtype=checkboxid=d11p2value=14"+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><inputtype=checkboxid=d11p3value=16"+(0<=c.LinkPolicy.indexOf(16)?"checked":
"")+">Available in S0/DC - Powered on & on battery</label><br>";a+="<label><inputtype=checkboxid=d11p4value=224"+(0<=c.LinkPolicy.indexOf(224)?"checked":"")+">Available in Sx/DC - Sleeping & on battery</label><br>";setDialogMode(11,"Politique de lien",3,showLinkPolicyDlgEx,a,b)}}
function showLinkPolicyDlgEx(b,c){var a=Clone(amtsysstate.AMT_EthernetPortSettings.responses[c]);a.DHCPEnabled&&(delete a.IPAddress,delete a.SubnetMask,delete a.DefaultGateway,delete a.PrimaryDNS,delete a.SecondaryDNS);a.LinkPolicy=[];Q("d11p1").checked&&a.LinkPolicy.push(1);Q("d11p2").checked&&a.LinkPolicy.push(14);Q("d11p3").checked&&a.LinkPolicy.push(16);Q("d11p4").checked&&a.LinkPolicy.push(224);amtstack.Put("AMT_EthernetPortSettings",a,showLinkPolicyDlgExDone,0,1,a)}
function showLinkPolicyDlgExDone(b,c,a,d){200==d?(amtsysstate=void 0,PullSystemStatus()):messagebox("Politique de lien",format("Impossible de d\u00e9finir une nouvelle strat\u00e9gie de lien, erreur {0}",d))}
function showAuthCsme(){if(!xxdialogMode){var b;b="<divstyle=margin-top:8px>Intel® AMT supports authentic CSME feature, however MeshCommander cannot verify the authenticity yet.</div><hrstyle=margin-top:8px;margin-bottom:8px;height:2px;border-width:0;color:gray;background-color:gray/>"+addHtmlValue("FW Version",amtstack.amtauth.FWVersion);b+=addHtmlValue("FQDN",amtstack.amtauth.FQDN?amtstack.amtauth.FQDN:"<i>Aucun</i>");b+="<hrstyle=margin-top:8px;margin-bottom:8px;height:2px;border-width:0;color:gray;background-color:gray/><divstyle=max-height:200px;overflow-y:auto><table>";
for(var c in amtstack.amtauth.Certificates){var a=amtstack.amtauth.Certificates[c];b+="<tr><tdstyle=width:32px;vertical-align:top><imgsrc=images-commander/cert1.pngheight=32width=32/>";b+="<tdstyle=padding-bottom:6px><b>"+EscapeHtml(a.subject.getField("CN").value)+(!0===a.xTrusted?", <spanstyle=color:#080>De confiance</span>":"")+"</b><br/>";a.subject.getField("OU")&&(b+=EscapeHtml(a.subject.getField("OU").value)+"<br/>");b+=amtstack.amtauth.CertificatesDer[c].length+" octets,<astyle=cursor:pointer;color:blueonclick=downloadAuthCert("+
function downloadAuthCert(b){b=parseInt(b);saveAs(data2blob(amtstack.amtauth.CertificatesDer[b]),amtstack.amtauth.Certificates[b].subject.getField("CN").value+".cer")}var IntelAmtEntireState,IntelAmtEntireStateCalls;
function saveEntireAmtState(){if(!xxdialogMode){var b="",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);c30.value="amtstate"+b+".json";setDialogMode(19,"Enregistrer l'int\u00e9gralit\u00e9 de l'\u00e9tat Intel® AMT",3,saveEntireAmtStateOk)}}
function saveEntireAmtStateOk(){IntelAmtEntireState={webappversion:version,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()};QH(60,"Fetching entire state, please wait...");setDialogMode(1,"Enregistrer l'int\u00e9gralit\u00e9 de l'\u00e9tat Intel® AMT",0,null);IntelAmtEntireStateCalls=3;amtstack.BatchEnum(null,AllWsman,saveEntireAmtStateOk2,null,!0);amtstack.GetAuditLog(saveEntireAmtStateOk3);amtstack.GetMessageLog(saveEntireAmtStateOk4)}
function saveEntireAmtStateOk2(b,c,a,d){IntelAmtEntireState.wsmanenums=a;saveEntireAmtStateDone()}function saveEntireAmtStateOk3(b,c){IntelAmtEntireState.auditlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateOk4(b,c){IntelAmtEntireState.eventlog=c;saveEntireAmtStateDone()}function saveEntireAmtStateDone(){0==--IntelAmtEntireStateCalls&&(setDialogMode(),saveAs(data2blob(JSON.stringify(IntelAmtEntireState,null," ").replace(/\n/g,"\r\n")),c30.value))}
function showDesktopSettingsDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_KVMRedirectionSettingData.response,c;c="<divstyle=text-align:left><divstyle=height:26px;margin-top:4px><selectid=subddisplaystyle=float:right;width:200px><optionvalue=0>Affichage principal</option><optionvalue=1>Affichage secondaire</option>";9<amtversion&&(c+="<optionvalue=2>3e affichage</option>");c+='</select><divstyle=padding-top:4px>Affichage par d\u00e9faut</div></div><divstyle=height:26px;margin-top:4px><inputid=subsessiontimeoutstyle=float:right;width:200pxmaxlength=5onkeypress="return numbersOnly(event)"><divstyle=padding-top:4px>D\u00e9lai d\'expiration de la session (minutes)</div></div>';
c+="<divstyle=height:26px;margin-top:4pxid=subspassx><inputid=subspasstype=passwordautocomplete=offstyle=float:right;width:200pxmaxlength=8onkeyup=showDesktopSettingsDlgUpdate()><divstyle=padding-top:4px>Mot de passe 5900 (8 caract\u00e8res)</div></div>";9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(c+="<divstyle=height:26px;margin-top:4px><selectid=subsbstyle=float:right;width:200pxonchange=showDesktopSettingsDlgUpdate()><optionvalue=0>d\u00e9sactiv\u00e9</option><optionvalue=1>Activ\u00e9e</option></select><divstyle=padding-top:4pxtitle=\"Cettefonctionnalit\u00e9n'estpassouventpriseencharge\">Masquage d'\u00e9cran</div></div>");
c+="</div>";setDialogMode(11,"Param\u00e8tres du bureau \u00e0 distance",3,showDesktopSettingsDlgOk,c);Q("subddisplay").value=b.DefaultScreen;Q("subsessiontimeout").value=b.SessionTimeout;1==b.OptInPolicy&&(Q("suboptintimeout").value=b.OptInPolicyTimeout);Q("subdlegacy").value=1==b.Is5900PortEnabled?1:0;9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService&&(Q("subsb").value=amtsysstate.IPS_ScreenConfigurationService.response.EnabledState);showDesktopSettingsDlgUpdate()}}
function showDesktopSettingsDlgUpdate(){QV("subspassx",1==Q("subdlegacy").value);var b=(0==Q("subdlegacy").value||8==Q("subspass").value.length||0==Q("subspass").value.length)&&0<Q("subsessiontimeout").value.length;1==amtsysstate.IPS_KVMRedirectionSettingData.response.OptInPolicy&&0==Q("suboptintimeout").value.length&&(b=!1);QE("c54",b)}
function showDesktopSettingsDlgOk(){var b=Clone(amtsysstate.IPS_KVMRedirectionSettingData.response);b.DefaultScreen=Q("subddisplay").value;b.SessionTimeout=Q("subsessiontimeout").value;b.Is5900PortEnabled=1==Q("subdlegacy").value;1==b.OptInPolicy&&(b.OptInPolicyTimeout=Q("suboptintimeout").value);1==b.Is5900PortEnabled&&(b.RFBPassword=Q("subspass").value);amtstack.Put("IPS_KVMRedirectionSettingData",b,showDesktopSettingsDlgOk2);b=Clone(amtsysstate.IPS_ScreenConfigurationService.response);b.EnabledState=
parseInt(Q("subsb").value);amtstack.Put("IPS_ScreenConfigurationService",b,showDesktopSettingsDlgOk3)}function showDesktopSettingsDlgOk2(b,c,a,d){200==d?PullSystemStatus():messagebox("Param\u00e8tres du bureau \u00e0 distance",format("Erreur {0}, impossible de d\u00e9finir des valeurs.",d))}
function showDesktopSettingsDlgOk3(b,c,a,d){200!=d?messagebox("Erreur",format("La suppression de l'\u00e9cran n'a pas pu \u00eatre d\u00e9finie, la suppression peut ne pas \u00eatre prise en charge sur ce syst\u00e8me ({0}).",d)):amtstack.Get("IPS_ScreenConfigurationService",function(a,b,c,d){200==d&&(amtsysstate.IPS_ScreenConfigurationService.response=c.Body,updateSystemStatus())},0,1)}
function PullEventLog(b){1==b&&xxdialogMode||(amtFirstPull|=16,amtstack.Enum("AMT_MessageLog",processMessageLog0),amtstack.GetMessageLog(processMessageLog1))}var processMessageLog0responses=null;
function processMessageLog0(b,c,a,d){200==d&&(d&&QV("go6",!0),a&&(processMessageLog0responses=a),b="",c="<tableclass=log1cellpadding=0cellspacing=0style=width:100%;border-radius:8px>",null!=processMessageLog0responses&&(b=1==processMessageLog0responses[0].IsFrozen?AddButton("Annuler le gel du journal","FreezeLog(0)"):AddButton("Figer le journal","FreezeLog(1)")),c+=TableEnd('<divstyle=float:right><inputid=eventFilterplaceholder="Filtre"style=margin:4pxonkeyup=eventFilter()> </div><div> '+
AddRefreshButton("PullEventLog(1)")+AddButton("Effacer le journal","ClearLog()")+AddButton("Sauver...","SaveEventLog()")+b),QH(17,c+"<br>"))}function SaveEventLog(){xxdialogMode||null==eventmessages||SaveJsonFile("IntelAmtEventlog","events","Intel AMT Event Log",eventmessages)}var eventmessages=null;
function processMessageLog1(b,c){eventmessages=c;var a,d=0,g;g="<tableclass=log1cellpadding=0cellspacing=0style=width:100%;border-radius:8px><tr><tdwidth=80px><p><td><td><td><tr><tdclass=r1style=width:90px><b> Event</b><tdclass=r1style=width:110px><b>Time</b><tdclass=r1style=width:160px><b>La source</b><tdclass=r1><b>La description</b>";for(a in c){d++;var v=1,n=c[a];8<=n.EventSeverity&&(v=2);16<=n.EventSeverity&&(v=3);g+="<trid=xamtevent"+a+"class=r3onclick=showEventDetails("+
function FreezeLog(b){xxdialogMode||amtstack.AMT_MessageLog_FreezeLog(b,function(){amtstack.Enum("AMT_MessageLog",processMessageLog0)})}function ClearLog(b){xxdialogMode||(QH(60,"Effacer le journal des \u00e9v\u00e9nements?"),setDialogMode(1,"Journal des \u00e9v\u00e9nements",3,ClearLogEx))}function ClearLogEx(){amtstack.AMT_MessageLog_ClearLog(function(b,c,a,d){200!=d?messagebox("Journal des \u00e9v\u00e9nements","Impossible d'effacer, erreur: "+d):PullEventLog()})}
function showEventDetails(b){if(!xxdialogMode){var c=eventmessages[b],a;a="<divstyle=text-align:left>"+addHtmlValue("Temps",c.Time.toLocaleString());a+=addHtmlValue("La source",c.EntityStr.replace("(r)","®"));a+=addHtmlValue("La description",c.Desc);a+=MoreStart();a+=addHtmlValue("Adresse de l'appareil",c.DeviceAddress);a+=addHtmlValue("Entit\u00e9",c.Entity);a+=addHtmlValue("Instance d'entit\u00e9",c.EntityInstance);var d="",g;for(g in c.EventData)0<d.length&&(d+=","),d+=c.EventData[g];a+=addHtmlValue("Lesdonn\u00e9es",
d);a+=addHtmlValue("D\u00e9calage",c.EventOffset);a+=addHtmlValue("Type de capteur",c.EventSensorType);a+=addHtmlValue("Gravit\u00e9",c.EventSeverity);a+=addHtmlValue("Type de Source",c.EventSourceType);a+=addHtmlValue("Type",c.EventType);a+=addHtmlValue("Num\u00e9ro de capteur",c.SensorNumber);a+=MoreEnd();a+="</div>";messagebox(format("D\u00e9tails de l'\u00e9v\u00e9nement # {0}",b+1),a)}}
function eventFilter(){var b=Q("eventFilter").value.toLowerCase(),c;for(c in eventmessages)QV("xamtevent"+c,""==b||0<=eventmessages[c].Desc.toLowerCase().indexOf(b)||0<=eventmessages[c].EntityStr.toLowerCase().indexOf(b))}var subscriptionsFilters=null,subscriptionsListeners=null;
function PullEventSubscriptions(){null==subscriptionsFilters&&amtstack.Enum("CIM_FilterCollection",processEventSubscriptions0);amtstack.BatchEnum(null,["CIM_ListenerDestination","CIM_FilterCollectionSubscription"],processEventSubscriptions1)}function processEventSubscriptions0(b,c,a,d){408!=d&&400!=d&&(d&&errcheck(d,b)||(subscriptionsFilters=a))}
function processEventSubscriptions1(b,c,a,d){if(!(408==d||400==d||d&&errcheck(d,b))){d&&QV("go22",!0);a&&(subscriptionsListeners=a);c=0;b=TableStart2()+"<tr><tdclass=r1style=padding-left:15px><br>G\u00e9rez les abonn\u00e9s aux \u00e9v\u00e9nements.<br><br>";for(var g in subscriptionsListeners.CIM_ListenerDestination.responses)a=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[g].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","®"),d=subscriptionsListeners.CIM_ListenerDestination.responses[g],
function showSubscriptionDetails(b){if(!xxdialogMode){var c=subscriptionsListeners.CIM_FilterCollectionSubscription.responses[b].Filter.ReferenceParameters.SelectorSet.Selector.Value.replace("(r)","®"),a=subscriptionsListeners.CIM_ListenerDestination.responses[b],d;d="<divstyle=text-align:left>"+addHtmlValue("Destination",a.Destination);d+=addHtmlValue("Filtre",c);d+=addHtmlValue("Mode de livraison",subscriptionDeliveryModes[a.DeliveryMode]);setDialogMode(11,"Abonnement"+(b+1),xxAccountAdminName?
5:1,deleteSubscriptionButton,d+"</div>",b)}}
function deleteSubscriptionButton(b,c){2==b&&amtstack.UnSubscribe("CIM_FilterCollectionSubscription",PullEventSubscriptions,null,1,{Filter:'<a:EndpointReference><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_FilterCollection</w:ResourceURI><w:SelectorSet><w:SelectorName="InstanceID">'+subscriptionsListeners.CIM_FilterCollectionSubscription.responses[c].Filter.ReferenceParameters.SelectorSet.Selector.Value+"</w:Selector></w:SelectorSet></a:ReferenceParameters></a:EndpointReference>",
function newSubscriptionButton(){if(!xxdialogMode&&null!=subscriptionsFilters){var b;b="<divstyle=height:26px;margin-top:4px><selectid=subtypestyle=float:right;width:260px><optionvalue=Push>Pousser</option><optionvalue=PushWithAck>Poussez avec ACK</option></select><divstyle=padding-top:4px>Type</div></div><divstyle=height:26px;margin-top:4px><selectid=subfilterstyle=float:right;width:260px>";for(var c in subscriptionsFilters)b+='<optionvalue="'+subscriptionsFilters[c].InstanceID+'">'+subscriptionsFilters[c].CollectionName.substring(13)+
b+="<divstyle=height:26px;margin-top:4pxid=subxuser><inputid=subuserstyle=float:right;width:260pxmaxlength=32onkeyup=newSubscriptionUpdate()><divstyle=padding-top:4px>Nom d'utilisateur</div></div>";b+="<divstyle=height:26px;margin-top:4pxid=subxpass><inputid=subpassstyle=float:right;width:260pxmaxlength=32onkeyup=newSubscriptionUpdate()><divstyle=padding-top:4px>Mot de passe</div></div>";b+="<divstyle=height:26px;margin-top:4px><inputid=subargsstyle=float:right;width:260pxmaxlength=128><divstyle=padding-top:4px>Arguments</div></div>";
setDialogMode(11,"Ajouter un abonnement \u00e0 un \u00e9v\u00e9nement",3,newSubscriptionButtonOk,b);newSubscriptionUpdate()}}function newSubscriptionUpdate(){QE("c54",0<Q("suburl").value.length&&Q("suburl").value.startsWith("http://")&&(0==Q("subauth").value||0<Q("subuser").value.length&&0<Q("subpass").value.length));QV("subxuser",1==Q("subauth").value);QV("subxpass",1==Q("subauth").value)}
function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("subuser").value,c=0==Q("subpass").value.length?void 0:Q("subpass").value;amtstack.Subscribe("CIM_FilterCollection",Q("subtype").value,Q("suburl").value,newSubscriptionButtonOk2,null,1,{InstanceID:Q("subfilter").value},0<Q("subargs").value.length?Q("subargs").value:null,b,c)}functionnewSubscriptionButtonOk2(b,c,a,d){200==d&&PullEventSubscriptions()}
function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="Inconnue;Autre;Activ\u00e9e;d\u00e9sactiv\u00e9;\u00c9teindre;N'est pas applicable;Activ\u00e9 mais hors ligne;En test;Diff\u00e9r\u00e9;Au repos;D\u00e9part".split(";");
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":
function processAuditLog1(b,c){auditLog=c;var a,d;d="<tableclass=log1cellpadding=0cellspacing=0style=width:100%;border-radius:8px>"+(TableEnd('<divstyle=float:right><inputid=auditFilterplaceholder="Filtre"style=margin:4pxonkeyup=auditFilter()> </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 g=0;d+="<tableclass=log1cellpadding=0cellspacing=0style=width:100%;border-radius:8px><tr><tdwidth=80px><p><td><td><td><tr><tdclass=r1style=width:110px> <b>Temps</b><tdclass=r1style=width:260px><b>Initiateur</b><tdclass=r1><b>Action</b>";
for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;g++;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+="<trid=xamtaudit"+a+"class=r3onclick=showAuditDetails("+a+')><tdclass=r1title="'+v.Time.toLocaleString()+'"> '+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br> "+v.Time.toLocaleTimeString("en",{hour:"2-digit",
minute:"2-digit",second:"2-digit"})+"<tdclass=r1>"+l+p+"<tdclass=r1>"+n}d+=TableEnd(0==g?" ":"")+"<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)}
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)}
function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<divstyle=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){varg="";for(cina.Ex)0<g.length&&(g+=","),g+=
a.Ex.charCodeAt(c);""!=g&&(d+=addHtmlValue("Valeurs de donn\u00e9es",g));2<a.Ex.length&&ReadShort(a.Ex,0)==a.Ex.length-2&&(d+=addHtmlValue("Cha\u00eenededonn\u00e9es",a.Ex.substring(2)))}messagebox("\u00c9v\u00e9nementd'audit#"+(b+1)+"D\u00e9tails",d+"</div>")}}var xxCertificates=null,xxCertPrivateKeys=null,xxTlsSettings=null,xxTlsCurrentCert=null,xxTLSCredentialContext=null,xxCaPrivateKey=null,xxCaSubjectAttributes=null;
function PullCertificates(){amtstack.BatchEnum(null,["AMT_PublicKeyCertificate","AMT_PublicPrivateKeyPair","AMT_TLSSettingData","AMT_TLSCredentialContext"],processCerts1)}
function processCerts1(b,c,a,d){if(400!=d&&!errcheck(d,b)){QV("go16",!0);xxCertificates=a.AMT_PublicKeyCertificate.responses;xxCertPrivateKeys=a.AMT_PublicPrivateKeyPair.responses;xxTlsSettings=a.AMT_TLSSettingData.responses;xxTLSCredentialContext=a.AMT_TLSCredentialContext.responses;xxTlsCurrentCert=null;if(0<xxTLSCredentialContext.length){b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value;for(varginxxCertificates)xxCertificates[g].InstanceID==b&&(xxTlsCurrentCert=
g)}for(g in xxCertificates)xxCertificates[g].TrustedRootCertficate=1==xxCertificates[g].TrustedRootCertficate,xxCertificates[g].X509Certificate=window.atob(xxCertificates[g].X509Certificate),xxCertificates[g].XIssuer=parseCertName(xxCertificates[g].Issuer),xxCertificates[g].XSubject=parseCertName(xxCertificates[g].Subject);amtcert_linkCertPrivateKey(xxCertificates,xxCertPrivateKeys);updateCertificates()}}
function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
function getTlsSecurityState(b){if(0==xxTlsSettings[b].Enabled)return"d\u00e9sactiv\u00e9";var c=(1==xxTlsSettings[b].MutualAuthentication?"TLS d'authentification mutuelle":"TLS d'authentification de serveur")+(1==xxTlsSettings[b].AcceptNonSecureConnections?" et non TLS":"");1==xxTlsSettings[b].MutualAuthentication&&xxTlsSettings[b].TrustedCN&&(b=MakeToArray(xxTlsSettings[b].TrustedCN),0<b.length&&(c+=","+(1<b.length?"Trustednames":"Trustedname")+":"+b.join(",")+"."));returnc}
function updateCertificates(){if(null!=xxCertificates){var b="Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1,c=1-b,a=TableStart(),a=a+TableEntry("S\u00e9curit\u00e9 TLS \u00e0 distance",addLinkConditional(getTlsSecurityState(c),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEntry("S\u00e9curit\u00e9 TLS locale",addLinkConditional(getTlsSecurityState(b),"showSetTlsSecurityDlg()",xxAccountAdminName)),a=a+TableEnd(),a=a+("<br>"+TableStart2()+"<tr><tdclass=r1style=padding-left:15px><br>G\u00e9rez les certificats Intel® AMT pour cet ordinateur.<br><br>");
if(0==xxCertificates.length&&0==xxCertPrivateKeys.length)a+="<divstyle=padding-left:15px><br><i>Aucun certificat trouv\u00e9.</i></div><br>";else{for(var d in xxCertificates)b="",xxCertificates[d].TrustedRootCertficate&&(b=", Racine de confiance"),xxCertificates[d].XPrivateKey&&(b=", Cl\u00e9 priv\u00e9e"),d==xxTlsCurrentCert&&(b+=", TLS cert"),a+="<divclass=itemBaronclick=showCertDetails("+d+")><divstyle=padding-top:3px><b>"+EscapeHtml(xxCertificates[d].XSubject.CN)+"</b><i>"+b+"</i></div></div>";
for(d in xxCertPrivateKeys)xxCertPrivateKeys[d].XCert||(a+="<divclass=itemBaronclick=showKeyPairDetails("+d+")><divstyle=padding-top:3px><i>Paire de cl\u00e9s priv\u00e9es non affect\u00e9es #"+d+"</i></div></div>")}d=AddRefreshButton("PullCertificates()");xxAccountAdminName&&(d+=AddButton("Ajouter un certificat ...","addCertButton()")+AddButton("D\u00e9livrer un certificat ...","issueCertButton()"));a+="<br><tdclass=r1>"+TableEnd(d);QH(51,a)}}
function showKeyPairDetails(b){setDialogMode(11,"Paire de cl\u00e9s #"+b,5,function(c){2==c&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertPrivateKeys[b].InstanceID},PullCertificates,0,1)},"Il s'agit d'une paire de cl\u00e9s de certificat public / priv\u00e9 qui n'appartient \u00e0 aucun certificat. Cette entr\u00e9e doit \u00eatre temporaire.")}
var xxCertSubjectNames={CN:"Nom commun",O:"Organisation",OU:"Unit\u00e9 organisationnelle",S:"\u00c9tat / Province",ST:"\u00c9tat / Province",L:"Localit\u00e9",C:"Pays",SN:"Nom de famille",GN:"Pr\u00e9nom"};
function showCertDetails(b){if(!xxdialogMode){var c=xxCertificates[b],a;a="<br>"+addHtmlValue("Certificat",c.X509Certificate.length+" octets,<astyle=cursor:pointer;color:blueonclick=downloadCert("+b+")>T\u00e9l\u00e9charger</a>");a+=addHtmlValue("Racine de confiance",c.TrustedRootCertficate?"Oui":"Non");0==c.TrustedRootCertficate&&c.XPrivateKey&&(a+=addHtmlValue("Cl\u00e9 priv\u00e9e","Pr\u00e9sent"));a+='<br><divstyle="border-bottom:1px solid gray"><i>Objet du certificat</i></div><br>';for(var d in c.XSubject)c.XSubject[d]&&
(a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XSubject[d])));a+='<br><divstyle="border-bottom:1px solid gray"><i>Certificat d\'\u00e9metteur</i></div><br>';for(d in c.XIssuer)c.XIssuer[d]&&(a+=addHtmlValue(xxCertSubjectNames[d]?xxCertSubjectNames[d]:d,EscapeHtml(c.XIssuer[d])));setDialogMode(11,"Certificat -"+EscapeHtml(c.XSubject.CN),5,function(a){2==a&&(xxCertificates[b].XPrivateKey&&amtstack.Delete("AMT_PublicPrivateKeyPair",{InstanceID:xxCertificates[b].XPrivateKey.InstanceID},
function addCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<inputid=certopenonchange=addCertButtonUpdate()type=filestyle=float:right;width:260pxaccept=".cer,.pem">',xxDragDropCertFiles&&(b='<inputstyle=float:right;width:260pxreadonlydisabledvalue="'+xxDragDropCertFiles[0].name+'">'),b="<divstyle=height:10px></div>"+("<divstyle=height:26px;margin-top:4px>"+b+"<divstyle=padding-top:4px>Fichier de certificat</div></div>")+"<divstyle=height:26px;margin-top:4px><selectid=certtypestyle=float:right;width:260px><optionvalue=1>Certificat racine de confiance</option><optionvalue=0>Certificat de cha\u00eene</option></select><divstyle=padding-top:4px>Type de certificat</div></div>",
function addCertButtonOk2(b){b=b.target.result;var c=b.indexOf("-----BEGIN CERTIFICATE-----");0<=c?(b=b.substring(c+27),c=b.indexOf("-----END CERTIFICATE-----"),0<=c&&(b=b.substring(0,c)),b=b.replace(/\r\n/g,"")):b=btoa(b);1==getSelectElement("certtype").value?amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(b,certificateAdded):amtstack.AMT_PublicKeyManagementService_AddCertificate(b,certificateAdded)}
function issueCertButton(b){!xxdialogMode&&xxAccountAdminName&&(xxDragDropCertFiles=b,b='<inputid=certopentype=filestyle=float:right;width:230pxonchange=issueCertButtonUpdate()accept=".p12">',xxDragDropCertFiles&&(b='<inputstyle=float:right;width:230pxreadonlydisabledvalue="'+xxDragDropCertFiles[0].name+'">'),b=""+("<divstyleheight:26px;margin-top:14px>"+b+"<divstyle=padding-top:4px>Certificate file</div></div>")+"<divstyle=height:26px;margin-top:4px><inputonkeyup=issueCertButtonUpdate()id=certopenpasstype=passwordautocomplete=offstyle=float:right;width:230px><divstyle=padding-top:4px>Mot de passe du certificat</div></div>",
b+="<divstyle=height:26px;margin-top:4px><inputonkeyup=issueCertButtonUpdate()id=certcstyle=float:right;width:230px><divstyle=padding-top:4px>Pays</div></div>",b+='<div>Utilisations du certificat</div><ulstyle="list-style-type:none;height:100px;overflow:auto;width:100%;border: 1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0">',b+="<li><label><inputtype=checkboxid=d11_cu4checked>Serveur TLS (HTTPS)</label></li>",b+="<li><label><inputtype=checkboxid=d11_cu5>Client TLS (HTTPS)</label></li>",
b+="<li><label><inputtype=checkboxid=d11_cu6>Protection des e-mails</label></li>",b+="<li><label><inputtype=checkboxid=d11_cu7>Signature du code</label></li>",b+="<li><label><inputtype=checkboxid=d11_cu8>Horodatage</label></li>",b+="</ul>",setDialogMode(11,"D\u00e9livrer un certificat",3,issueCertButtonOk,b),issueCertButtonUpdate())}
function issueCertButtonUpdate(){var b=getInputElement("certopen");QE("certopenpass",!b||b&&1==b.files.length);var c=!b||2>b.files.length;1==(!b||b&&b.files.length)&&""==Q("certopenpass").value&&(c=!1);if(""==getInputElement("certcn").value||""==getInputElement("certo").value||""==getInputElement("certst").value||""==getInputElement("certc").value)c=!1;QE("c54",c)}
function issueCertButtonOk(){var b=getInputElement("certopen"),c=xxDragDropCertFiles;b&&(c=b.files);c&&1==c.length?(b=new FileReader,b.onload=issueCertButtonOk2,b.readAsBinaryString(c[0])):issueCertButtonOk3(null)}function issueCertButtonOk2(b){0==amtcert_loadP12File(b.target.result,Q("certopenpass").value,issueCertButtonOk3)&&messagebox("D\u00e9livrer un certificat","Impossible de d\u00e9crypter / d\u00e9coder le certificat.")}
function issueCertButtonOk3(b,c,a){xxCaPrivateKey=b;xxCaSubjectAttributes=c;amtstack.AMT_PublicKeyManagementService_GenerateKeyPair(0,2048,GenerateKeyPairResponse)}
function GenerateKeyPairResponse(b,c,a,d){200!=d?messagebox("D\u00e9livrer un certificat","Impossible de g\u00e9n\u00e9rer la paire de cl\u00e9s. Statut: "+d):0!=a.Body.ReturnValue?messagebox("D\u00e9livrer un certificat","Impossible de g\u00e9n\u00e9rer la paire de cl\u00e9s,"+a.Body.ReturnValueStr):amtstack.Enum("AMT_PublicPrivateKeyPair",GenerateKeyPairResponse2,a.Body.KeyPair.ReferenceParameters.SelectorSet.Selector.Value)}
function GenerateKeyPairResponse2(b,c,a,d,g){if(200!=d)messagebox("D\u00e9livrer un certificat","Impossible de g\u00e9n\u00e9rer la paire de cl\u00e9s. Statut: "+d);else{b=null;for(var v in a)a[v].InstanceID==g&&(b=a[v].DERKey);a={CN:getInputElement("certcn").value,O:getInputElement("certo").value,ST:getInputElement("certst").value,C:getInputElement("certc").value};g={CN:"Certificat racine non approuv\u00e9"};if(null!=xxCaPrivateKey&&xxCaSubjectAttributes)for(v in g={},xxCaSubjectAttributes)g[xxCaSubjectAttributes[v].shortName]=
xxCaSubjectAttributes[v].value;v={name:"extKeyUsage"};Q("d11_cu4").checked&&(v.serverAuth=!0);Q("d11_cu5").checked&&(v.clientAuth=!0);Q("d11_cu6").checked&&(v.emailProtection=!0);Q("d11_cu7").checked&&(v.codeSigning=!0);Q("d11_cu8").checked&&(v.timeStamping=!0);v=amtcert_signWithCaKey(b,xxCaPrivateKey,a,g,v);null==v?messagebox("D\u00e9livrer un certificat","Impossible de signer le certificat."):(v=forge.pki.certificateToPem(v).replace(/(\r\n|\n|\r)/gm,""),amtstack.AMT_PublicKeyManagementService_AddCertificate(v.substring(27,
v.length-25),GenerateKeyPairResponse4))}}function GenerateKeyPairResponse4(b,c,a,d){200!=d?messagebox("D\u00e9livrer un certificat","Impossible de g\u00e9n\u00e9rer la paire de cl\u00e9s. Statut: "+d):PullCertificates()}function certificateAdded(b,c,a,d){200!=d||0!=a.Body.ReturnValue?messagebox("Ajouter un certificat","Impossible d'ajouter le certificat, erreur"+(200!=d?d:a.Body.ReturnValueStr)):PullCertificates()}
function certificateRemoved(b,c,a,d){200!=d?messagebox("Supprimer le certificat","Impossible de supprimer le certificat, erreur"+d):PullCertificates()}function getInputElement(b){var c=document.getElementsByTagName("input");for(t=0;t<c.length;t++)if(c[t].id==b)returnc[t]}functiongetSelectElement(b){varc=document.getElementsByTagName("select");for(t=0;t<c.length;t++)if(c[t].id==b)returnc[t]}
function showSetTlsSecurityDlg(b){if(!xxdialogMode){b="<divstyle=height:26px;margin-top:4px><selectonchange=showSetTlsSecurityDlgUpdate()id=tlscertstyle=float:right;width:260px><optionvalue=-1>Aucun certificat, TLS d\u00e9sactiv\u00e9</option>";for(var c in xxCertificates)0!=xxCertificates[c].TrustedRootCertficate||!xxCertificates[c].XPrivateKey||null!=xxTlsCurrentCert&&xxTlsCurrentCert!=c||(b+="<optionvalue="+c+">"+xxCertificates[c].XSubject.CN+"</option>");b+="</select><divstyle=padding-top:4px>Certificat</div></div><divstyle=height:26px;margin-top:4px><selectid=tlsremotestyle=float:right;width:260pxonchange=showSetTlsSecurityDlgUpdate()><optionvalue=0>Server-auth TLS only</option><optionvalue=1>Server-auth, non-TLS allowed</option>";
b+="<optionvalue=2>Mutual-auth TLS only</option><optionvalue=3>Mutual-auth, non-TLS allowed</option>";b+='</select><divstyle=padding-top:4px>Security</div></div><divstyle=height:26pxid=d11rcntitle="Liste s\u00e9par\u00e9e par des virgules des noms communs de certificats qui seront autoris\u00e9s \u00e0 se connecter \u00e0 distance."><inputid=d11_rcnstyle=float:right;width:260pxonkeyup=showSetTlsSecurityDlgUpdate()placeholder="nom1, nom2"><divstyle=padding-top:4px>CN distants</div></div>';
setDialogMode(11,"Param\u00e8tres TLS",3,showSetTlsSecurityDlgOk,b);if(0==xxTLSCredentialContext.length||0==xxTlsSettings[0].Enabled||0==xxTlsSettings[1].Enabled)getSelectElement("tlscert").value=-1;else for(c in b=xxTLSCredentialContext[0].ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,xxCertificates)xxCertificates[c].InstanceID==b&&(getSelectElement("tlscert").value=c);c=1-("Intel(r) AMT LMS TLS Settings"==xxTlsSettings[0].InstanceID?0:1);getSelectElement("tlsremote").value=(1==
var setTlsSecurityPendingCalls,setTlsSecurityDeleteCredentialContext;
function showSetTlsSecurityDlgOk(){var b=getSelectElement("tlscert").value,c=getSelectElement("tlsremote").value,a=Clone(xxTlsSettings);setTlsSecurityPendingCalls=0;setTlsSecurityDeleteCredentialContext=null;if(-1!=b){if(0<xxTLSCredentialContext.length){vard=Clone(xxTLSCredentialContext[0]);d.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value=xxCertificates[b].InstanceID;amtstack.Put("AMT_TLSCredentialContext",d,setTlsSecurityResponse,0,1)}elseamtstack.Create("AMT_TLSCredentialContext",
b,c,d){200!=d?messagebox("","Impossible de r\u00e9gler l'heure, \u00e9tat ="+d):0!=c.Body.ReturnValue?messagebox("","Impossible de r\u00e9gler l'heure, erreur: "+c.Body.ReturnValueStr):(a=Math.round((new Date).getTime()/1E3),amtstack.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch(c.Body.Ta0,a,a,function(){setTlsSecurityResponse()}))}));setTlsSecurityPendingCalls+=2;amtstack.Put("AMT_TLSSettingData",a[0],setTlsSecurityResponse,0,1,a[0]);amtstack.Put("AMT_TLSSettingData",a[1],setTlsSecurityResponse,
0,1,a[1]);statusbox("Param\u00e8tres TLS","Application de nouveaux param\u00e8tres de s\u00e9curit\u00e9 ...")}function splitDomains(b){b=b.split(",");if(0!=b.length){for(var c in b)if(b[c]=b[c].trim(),0<=b[c].indexOf(" ")||0==b[c].length)return;if(!(4<b.length))returnb}}
function setTlsSecurityResponse(b,c,a,d){if(b){if(200!=d){messagebox("","Impossible de d\u00e9finir la s\u00e9curit\u00e9 TLS, \u00e9tat ="+d);return}if(a.Body.ReturnValueStr&&!methodcheck(a))return}0==--setTlsSecurityPendingCalls&&amtstack.AMT_SetupAndConfigurationService_CommitChanges(null,setTlsSecurityResponse2)}
function setTlsSecurityResponse2(b,c,a,d){200!=d?messagebox("","Impossible de d\u00e9finir la s\u00e9curit\u00e9 TLS, \u00e9tat ="+d):0!=a.Body.ReturnValue?messagebox("","Impossible de d\u00e9finir la s\u00e9curit\u00e9 TLS, erreur: "+a.Body.ReturnValueStr):setTimeout(setTlsSecurityResponse3,2E3)}
function setTlsSecurityResponse3(){null!=setTlsSecurityDeleteCredentialContext&&amtstack.Delete("AMT_TLSCredentialContext",setTlsSecurityDeleteCredentialContext,function(){});PullCertificates();setDialogMode();amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch(processSystemTime)}var xxWatchdog=null;
function PullWatchdog(){amtstack.BatchEnum(null,["*AMT_AgentPresenceCapabilities","AMT_AgentPresenceWatchdog","AMT_AgentPresenceWatchdogAction","AMT_StateTransitionCondition","CIM_ConcreteDependency"],PullWatchdogResponse)}
function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabilities.status){xxWatchdog=a;for(var g in xxWatchdog.CIM_ConcreteDependency.responses)b=xxWatchdog.CIM_ConcreteDependency.responses[g],(c=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","CreationClassName"))&&"AMT_AgentPresenceWatchdog"==c.Value&&(d=getItem(b.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value,a=getItem(b.Dependent.ReferenceParameters.SelectorSet.Selector,
"PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Inconnue;Autre;Activ\u00e9e;d\u00e9sactiv\u00e9;\u00c9teindre;N'est pas applicable;Activ\u00e9 mais hors ligne;En test;Diff\u00e9r\u00e9;Au repos;D\u00e9part".split(";"),watchdogMonitoredEntity="Inconnue;Autre;Syst\u00e8me op\u00e9rateur;Processus de d\u00e9marrage du syst\u00e8me d'exploitation;Processus d'arr\u00eat du syst\u00e8me d'exploitation;Processus de d\u00e9marrage du micrologiciel;Processus de d\u00e9marrage du BIOS;Application;Processeur de service".split(";");
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><tdclass=r1style=padding-left:15px><br>G\u00e9rez les chiens de garde de pr\u00e9sence d'agent Intel® AMT.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<divstyle=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+="<divclass=itemBaronclick=showWatchdogDetails("+
c+')><inputtype=buttonstyle=float:rightvalue="Ajouter une action ..."onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<inputtype=buttonstyle=float:rightvalue="Supprimer des actions ..."onclick=deleteWatchdogActions(event,'+c+")>");b+="<divstyle=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",g;for(g in a.transitions){var v=a.transitions[g];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" → "+getWatchdogTransitionStr(v.NewState);
v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \u00c9v\u00e9nement \u00e0 consigner")}""!=d&&(b+="<divstyle=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Ajouter un chien de garde ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
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)}
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",
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)}
function AddWatchdog(){var b;b="<divstyle=height:26px;margin-top:4px><inputid=wgnamestyle=float:right;width:240pxmaxlength=16onkeyup=AddWatchdogUpdate()><divstyle=padding-top:4px>Nom</div></div>"+('<divstyle=height:26px;margin-top:4px><inputid=wgguidstyle=float:right;width:240pxmaxlength=36onkeyup=AddWatchdogUpdate()><divstyle=padding-top:4pxtitle="G\u00e9n\u00e9rer un DeviceID al\u00e9atoire">'+addLink("Reference de l'appareil","GenerateWatchdogGuid()")+"</div></div>");b+="<divstyle=height:26px;margin-top:4px><inputid=wgstartstyle=float:right;width:240pxmaxlength=8placeholder=3600onkeyup=AddWatchdogUpdate()><divstyle=padding-top:4px>D\u00e9marrage (secondes)</div></div>";
b+="<divstyle=height:26px;margin-top:4px><inputid=wgtimeoutstyle=float:right;width:240pxmaxlength=8placeholder=60onkeyup=AddWatchdogUpdate()><divstyle=padding-top:4px>D\u00e9lai d'expiration (secondes)</div></div>";setDialogMode(11,"Ajouter un chien de garde",3,AddWatchdogOk,b);AddWatchdogUpdate()}function GenerateWatchdogGuid(){var b,c="";for(b=0;16>b;b++)c+=String.fromCharCode(random(255));Q("wgguid").value=guidToStr(rstr2hex(c));AddWatchdogUpdate()}
function AddWatchdogUpdate(){for(var b=(""==Q("wgstart").value||0<parseInt(Q("wgstart").value))&&(""==Q("wgtimeout").value||0<parseInt(Q("wgtimeout").value)),c=0,a=Q("wgguid").value.toLowerCase(),d=0;d<a.length;d++){varg=a.charCodeAt(d);45!=g&&(48<=g&&57>=g||97<=g&&102>=g?c++:b=!1)}32!=c&&(b=!1);QE("dlgOkButton",b)}
function AddWatchdogOk(){var b=Q("wgtimeout").value,c=Q("wgstart").value;""==b&&(b=60);""==c&&(c=3600);b={CreationClassName:0,DeviceID:btoa(hex2rstr(guidToStr(Q("wgguid").value.replace(/-/g,"")).replace(/-/g,""))),StartupInterval:c,SystemCreationClassName:0,SystemName:0,TimeoutInterval:b,MonitoredEntityDescription:Q("wgname").value};amtstack.Create("AMT_AgentPresenceWatchdog",b,AddWatchdogOk2)}
function AddWatchdogOk2(b,c,a,d){200!=d?messagebox("Chien de garde","Impossible d'ajouter le chien de garde, erreur #"+d):PullWatchdog()}
function addWatchdogAction(b,c){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d;d="<table><tdstyle=width:180px>De<br>";for(c in amtstack.WatchdogCurrentStates)d+="<inputid=wgsa"+c+"type=checkboxonclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br/>";d+="<td>\u00c0<br>";for(c in amtstack.WatchdogCurrentStates)d+="<inputid=wgsb"+c+"type=checkboxonclick=addWatchdogActionUpdate()> "+amtstack.WatchdogCurrentStates[c]+"<br/>";setDialogMode(11,"Ajouter une action de surveillance",
3,addWatchdogActionOk,d+"</table><br>Faire une action<br><inputid=wgseventtype=checkboxcheckedonclick=addWatchdogActionUpdate()>\u00c9crire dans le journal des \u00e9v\u00e9nements<br/>",a);addWatchdogActionUpdate();haltEvent(b)}function addWatchdogActionUpdate(){var b=0,c=0,a;for(a in amtstack.WatchdogCurrentStates)1==Q("wgsa"+a).checked&&(b+=parseInt(a)),1==Q("wgsb"+a).checked&&(c+=parseInt(a));QE("dlgOkButton",0<b&&0<c&&1==Q("wgsevent").checked)}
function addWatchdogActionOk(b,c){var a=0,d=0,g;for(g in amtstack.WatchdogCurrentStates)1==Q("wgsa"+g).checked&&(a+=parseInt(g)),1==Q("wgsb"+g).checked&&(d+=parseInt(g));amtstack.AMT_AgentPresenceWatchdog_AddAction(a,d,Q("wgsevent").checked,null,null,AddWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}function AddWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog Action","Impossible d'ajouter une action de surveillance, erreur #"+d):PullWatchdog()}
function deleteWatchdogActions(b,c){setDialogMode(11,"Supprimer les actions du chien de garde",3,deleteWatchdogActionsOk,"Supprimer toutes les actions de ce chien de garde?",xxWatchdog.AMT_AgentPresenceWatchdog.responses[c]);haltEvent(b)}function deleteWatchdogActionsOk(b,c){amtstack.AMT_AgentPresenceWatchdog_DeleteAllActions(deleteWatchdogActionResponse,null,0,{DeviceID:c.DeviceID})}
function deleteWatchdogActionResponse(b,c,a,d){200!=d?messagebox("Watchdog Action","Impossible de supprimer les actions du chien de garde, erreur #"+d):PullWatchdog()}
var xxSystemDefense=null,xxSystemDefenceLinkedPolicy={},xxUpdatingDefenseStats=!1,xxFilterStatistics=[{},{}],xxFilterStatisticsTimer=null,xxFilterStatisticsTimerActive=!1,xxSystemDefenceFilterEthernetTypes={2048:"Tous les paquets IP",2054:"Tous les paquets ARP"},xxSystemDefenceFilterIPTypes={4:"IPv4",6:"IPv6"},xxSystemDefenceFilterDesc={0:"Autoriser, compter",1:"Drop, Count",2:"Limite de taux",3:"Autoriser",4:"Laissez tomber"},xxSystemDefenceFilters={HdrProtocolID:1,HdrDestAddress:2,HdrDestMask:2,
function PullSystemDefenseResponse(b,c,a,d){200==d&&(xxSystemDefense=a,updateSystemDefense(),QV("go18",!0),urlvars.norefresh&&UpdateDefenseStats())}
function updateSystemDefense(){if(null!=xxSystemDefense){var b="";xxSystemDefenceLinkedPolicy={};for(var c in xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses){var a=xxSystemDefense.AMT_NetworkPortSystemDefensePolicy.responses[c],d=+getItem(a.Antecedent.ReferenceParameters.SelectorSet.Selector,"@Name","DeviceID").Value.substring(27),a=getItem(xxSystemDefense.AMT_SystemDefensePolicy.responses,"InstanceID",a.Dependent.ReferenceParameters.SelectorSet.Selector.Value);xxSystemDefenceLinkedPolicy[d]=
a}b+=TableStart();c="<i>Aucun</i>";xxSystemDefenceLinkedPolicy[0]&&(c=xxSystemDefenceLinkedPolicy[0].PolicyName);b+=TableEntry("Strat\u00e9gie c\u00e2bl\u00e9e par d\u00e9faut",addLink(c,"changeDefaultPolicy(0)"));for(c=0;2>c;c++){var a=xxFilterStatistics[c],g;for(g in a)d=a[g],d=1==d?d+" paquet":d+" paquets",b+=TableEntry((0==c?"Filaire":"Sans fil")+g,d)}b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><tdclass=r1style=padding-left:15px;border:0><br>G\u00e9rez les politiques de d\u00e9fense du syst\u00e8me Intel® AMT.<br><br>";
if(0==xxSystemDefense.AMT_SystemDefensePolicy.responses.length)b+="<divstyle=padding-left:15px><i>Aucune politique de d\u00e9fense du syst\u00e8me trouv\u00e9e.</i></div><br>";else for(c in xxSystemDefense.AMT_SystemDefensePolicy.responses)a=xxSystemDefense.AMT_SystemDefensePolicy.responses[c],d="",a.FilterCreationHandles&&(a.FilterCreationHandles=MakeToArray(a.FilterCreationHandles),d=a.FilterCreationHandles.length,d=", "+d+" filter"+(1<d?"s":"")),b+="<divclass=itemBaronclick=showPolicyDetails("+
c+")><divstyle=padding-top:3px><b>"+EscapeHtml(a.PolicyName)+"</b>"+d+"</div></div>";b+="<tr><tdclass=r1style=padding-left:15px><br>G\u00e9rez les filtres de d\u00e9fense du syst\u00e8me Intel® AMT.<br><br>";if(0==xxSystemDefense.AMT_Hdr8021Filter.responses.length&&0==xxSystemDefense.AMT_IPHeadersFilter.responses.length)b+="<divstyle=padding-left:15px><i>Aucun filtre de d\u00e9fense du syst\u00e8me n'a \u00e9t\u00e9 trouv\u00e9.</i></div><br>";else{for(c in xxSystemDefense.AMT_Hdr8021Filter.responses)a=
"</div></div>";for(c in xxSystemDefense.AMT_IPHeadersFilter.responses){a=xxSystemDefense.AMT_IPHeadersFilter.responses[c];(d=xxSystemDefenceFilterIPTypes[a.HdrIPVersion])||(d="Protocole Ethernet"+a.HdrIPVersion);d+=", "+xxSystemDefenceFilterDesc[a.FilterProfile];2==a.FilterProfile&&(d+=" \u00e0"+a.FilterProfileData+" paquet / s");1==a.ActionEventOnMatch&&(d+=", \u00c9v\u00e9nement sur match");var v=0;for(g in xxSystemDefenceFilters)a[g]&&v++;0<v&&(d+=","+v+"filter"+(1<v?"s":""));b+="<divclass=itemBaronclick=showFilterDetails(1,"+
c+")><divstyle=padding-top:3px><b>"+(0==a.FilterDirection?"← ":"→ ")+EscapeHtml(a.Name)+"</b>, "+d+"</div></div>"}}b+="<br><tdclass=r1>"+TableEnd(AddRefreshButton("PullSystemDefense()")+AddButton("Ajouter un filtre ...","AddDefenseFilter()")+AddButton("Ajouter une strat\u00e9gie ...","AddDefensePolicy()"));QH(53,b);null==xxFilterStatisticsTimer&&(xxFilterStatisticsTimerActive=!1,urlvars.norefresh||(UpdateDefenseStats(),xxFilterStatisticsTimer=setInterval(UpdateDefenseStats,
function UpdateDefenseStats(b){if(b||1!=xxFilterStatisticsTimerActive)xxFilterStatisticsTimerActive=!0,b=b?b:0,xxSystemDefenceLinkedPolicy[b]?amtstack.AMT_SystemDefensePolicy_UpdateStatistics('<a:Address></a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:SelectorName="DeviceID">Intel(r) AMT Ethernet Port '+b+"</w:Selector></w:SelectorSet></a:ReferenceParameters>",!1,UpdateDefenseStats2,b,0,{InstanceID:xxSystemDefenceLinkedPolicy[b].InstanceID}):
function UpdateDefenseStats3(b,c,a,d,g){b=0;if(200==d){xxFilterStatistics[g]={};for(var v in a)d=a[v].ReadCount,c=getItem(a[v].Dependent.ReferenceParameters.SelectorSet.Selector[1].Value.EndpointReference.ReferenceParameters.SelectorSet.Selector,"@Name","Name").Value,xxFilterStatistics[g][c]=d,b++;updateSystemDefense()}xxFilterStatisticsTimerActive=!1;0==b&&StopDefenseStatsTimer()}
function changeDefaultPolicy(b){if(!xxdialogMode){var c;c="<divstyle=height:26px;margin-top:4px><selectid=policySelectionstyle=float:right;width:266px><optionvalue=-1>Aucun";for(var a in xxSystemDefense.AMT_SystemDefensePolicy.responses)c+="<optionvalue="+a+(xxSystemDefenceLinkedPolicy[b]&&xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID==xxSystemDefenceLinkedPolicy[b].InstanceID?"selected":"")+">"+xxSystemDefense.AMT_SystemDefensePolicy.responses[a].PolicyName;setDialogMode(11,
"Politique de d\u00e9fense du syst\u00e8me par d\u00e9faut",3,changeDefaultPolicyOk,c+"</select><divstyle=padding-top:4px>Politique par d\u00e9faut</div></div>",b)}}
function changeDefaultPolicyOk(b,c){var a=Q("policySelection").value,d=xxSystemDefenceLinkedPolicy[c];d&&amtstack.Delete("AMT_NetworkPortSystemDefensePolicy",'<w:SelectorSet><w:SelectorName="Antecedent"><a:EndpointReferencexmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing"xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address><a:ReferenceParameters><w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_EthernetPort</w:ResourceURI><w:SelectorSet><w:SelectorName="CreationClassName">CIM_EthernetPort</w:Selector><w:SelectorName="DeviceID">Intel(r) AMT Ethernet Port '+c+
xxSystemDefense.AMT_SystemDefensePolicy.responses[a].InstanceID+"</Selector></SelectorSet></ReferenceParameters>"},changeDefaultPolicyOk2)}function changeDefaultPolicyOk2(b,c,a,d){200!=d?messagebox("Politique de d\u00e9fense du syst\u00e8me par d\u00e9faut","Impossible de d\u00e9finir la strat\u00e9gie, erreur"+d):PullSystemDefense()}
function AddDefenseFilter(){if(!xxdialogMode){var b;b="<divstyle=height:26px;margin-top:4px><inputid=filternamestyle=float:right;width:260pxmaxlength=16onkeyup=AddDefenseFilterUpdate()><divstyle=padding-top:4px>Nom</div></div><divstyle=height:26px;margin-top:4px><selectid=filtertypestyle=float:right;width:266pxonchange=AddDefenseFilterUpdate()><optionvalue=0>Filtre de paquets IP Ethernet<optionvalue=1>Filtre de paquets Ethernet ARP<optionvalue=2>Filtre de paquets IPv4<optionvalue=3>Filtre de paquets IPv6</select><divstyle=padding-top:4px>Type</div></div>";b+=
'<divstyle=height:26px;margin-top:4pxid=ipfilterdiv><inputid=ipfilterstyle=float:right;width:260pxplaceholder="R\u00e8gles facultatives"onkeyup=AddDefenseFilterUpdate()><divstyle=padding-top:4px>R\u00e8gles de correspondance</div></div>';b+="<divstyle=height:26px;margin-top:4px><selectid=filterdirstyle=float:right;width:266pxonchange=AddDefenseFilterUpdate()><optionvalue=0>Sortant / Transmettre<optionvalue=1>Entrant / Recevoir</select><divstyle=padding-top:4px>Direction</div></div>";
b+="<divstyle=height:26px;margin-top:4px><selectid=filterprofilestyle=float:right;width:266pxonchange=AddDefenseFilterUpdate()><optionvalue=0>Autoriser, compter<optionvalue=1>Drop, Count<optionvalue=2>Limite de taux<optionvalue=3>Autoriser<optionvalue=4>Laissez tomber</select><divstyle=padding-top:4px>action</div></div>";b+="<divstyle=height:26px;margin-top:4pxid=filterdatadiv><inputid=filterdatastyle=float:right;width:260pxmaxlength=8onkeyup=AddDefenseFilterUpdate()><divstyle=padding-top:4px>Paquets / seconde</div></div>";
b+="<divstyle=height:26px;margin-top:4px><selectid=filteractionstyle=float:right;width:266pxonchange=AddDefenseFilterUpdate()><optionvalue=false>Ne fais rien<optionvalue=1>\u00c9v\u00e9nement sur match</select><divstyle=padding-top:4px>Journal des \u00e9v\u00e9nements</div></div>";setDialogMode(11,"Ajouter un filtre de d\u00e9fense du syst\u00e8me",3,AddDefenseFilterOk,b);AddDefenseFilterUpdate()}}
function AddDefenseFilterOk(){if(1>=Q("filtertype").value){var b=0==Q("filtertype").value?2048:2054,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrProtocolID8021:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value};2==Q("filterprofile").value&&(c.FilterProfileData=Q("filterdata").value);amtstack.Create("AMT_Hdr8021Filter",c,AddDefenseFilterOk2)}else{var b=2==Q("filtertype").value?
4:6,c={"InstanceID ":0,Name:Q("filtername").value,CreationClassName:0,SystemName:0,SystemCreationClassName:0,HdrIPVersion:b,FilterProfile:Q("filterprofile").value,FilterDirection:Q("filterdir").value,ActionEventOnMatch:Q("filteraction").value},a=Q("ipfilter").value.split(","),d;for(d in a){var g=a[d].indexOf("="),v=a[d].substring(0,g),g=a[d].substring(g+1),n=xxSystemDefenceFilters[v];n||(v="Hdr"+v,n=xxSystemDefenceFilters[v]);n&&(2==n&&4==b?(g=g.split("."),4==g.length&&(c[v]=rstr2hex(String.fromCharCode(parseInt(g[0]),
function AddDefenseFilterOk2(b,c,a,d){200!=d?messagebox("Ajouter un filtre de d\u00e9fense du syst\u00e8me","Impossible d'ajouter le filtre, erreur #"+d):PullSystemDefense()}
function showFilterDetails(b,c){if(!xxdialogMode){var a,d,g,v;0==b?(v="AMT_Hdr8021Filter",g="Trafic Ethernet",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterEthernetTypes[d.HdrProtocolID8021])||(a="Protocole Ethernet"+d.HdrProtocolID8021)):(v="AMT_IPHeadersFilter",g="Trafic IP",d=xxSystemDefense[v].responses[c],(a=xxSystemDefenceFilterIPTypes[d.HdrIPVersion])||(a="Tous les protocoles IP"+d.HdrIPVersion));var n;n=""+addHtmlValue("Nom",EscapeHtml(d.Name));n+=addHtmlValue("Type",g);n+=addHtmlValue("Trafic correspondant",
a);n+=addHtmlValue("Direction",0==d.FilterDirection?"Outbound / Transmit":"Inbound / Receive");if(1==b)for(var l in xxSystemDefenceFilters)d[l]&&(a=l,g=d[l],b=xxSystemDefenceFilters[l],2==b&&4==g.length&&(g=hex2rstr(g),g=g.charCodeAt(0)+"."+g.charCodeAt(1)+"."+g.charCodeAt(2)+"."+g.charCodeAt(3)),a.startsWith("Hdr")&&(a=a.substring(3)),n+=addHtmlValue("Filtre"+a,g));n+=addHtmlValue("\u00c9v\u00e9nement sur match",1==d.ActionEventOnMatch?"Yes":"No");setDialogMode(11,"Filtre Ethernet #"+d.InstanceID,
5,showFilterDetailsOk,n,[v,d])}}function showFilterDetailsOk(b,c){2==b&&amtstack.Delete(c[0],c[1],deleteDefenseFilter)}function deleteDefenseFilter(b,c,a,d){200!=d?messagebox("Supprimer le filtre","Impossible de supprimer le filtre, assurez-vous qu'il n'est pas utilis\u00e9."):PullSystemDefense()}var xxAddDefensePolicyFilters;
function AddDefensePolicy(){if(!xxdialogMode){xxAddDefensePolicyFilters=[];var b;b='<divstyle=height:26px;margin-top:4px><inputid=policynametitle="<policy name>:<policy precedence number>"style=float:right;width:260pxmaxlength=16onkeyup=AddDefensePolicyUpdate()><divstyle=padding-top:4px>Nom</div></div><divstyle=height:26px;margin-top:4px><selectid=policytxtitle="Action par d\u00e9faut \u00e0 entreprendre pour le trafic sortant"style=float:right;width:133px><optionvalue=0>Allow<optionvalue=1>Laissez tomber<optionvalue=2>Autoriser, compter<optionvalue=3>Drop, Count<optionvalue=4>Autoriser, compter, \u00e9v\u00e9nement<optionvalue=5>Drop, Count, Event</select><selectid=policyrxstyle=float:right;width:133pxtitle="Action par d\u00e9faut \u00e0 entreprendre pour le trafic entrant"><optionvalue=0>Autoriser<optionvalue=1>Laissez tomber<optionvalue=2>Autoriser, compter<optionvalue=3>Drop, Count<optionvalue=4>Autoriser, compter, \u00e9v\u00e9nement<optionvalue=5>Drop, Count, Event</select><divstyle=padding-top:4px>TX / RX par d\u00e9faut</div></div>';b+=
"<divid=policyFilters></div>";if(0<xxSystemDefense.AMT_Hdr8021Filter.responses.length||0<xxSystemDefense.AMT_IPHeadersFilter.responses.length){b+="<divstyle=height:26px;margin-top:4px><divstyle=float:right><selectid=xfilterstyle=width:186px>";for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];b+="<optionvalue="+a.InstanceID+">"+a.Name}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],
b+="<optionvalue="+a.InstanceID+">"+a.Name;b+="</select><inputid=addFilterButtontype=buttonvalue=Addstyle=width:80pxonclick=addFilterButton()></div><divstyle=padding-top:4px>Ajouter un filtre</div></div>"}setDialogMode(11,"Ajouter une strat\u00e9gie de d\u00e9fense du syst\u00e8me",3,AddDefensePolicyOk,b);AddDefensePolicyUpdate()}}
function addFilterButton(){0<=xxAddDefensePolicyFilters.indexOf(Q("xfilter").value)||(xxAddDefensePolicyFilters.push(Q("xfilter").value),AddDefensePolicyUpdate())}function removeFilterButton(b){xxAddDefensePolicyFilters.splice(b,1);AddDefensePolicyUpdate()}
function AddDefensePolicyUpdate(){var b=0<Q("policyname").value.split(":")[0].length;QE("c54",b);if(0==xxAddDefensePolicyFilters.length)QH("policyFilters","<br><i>Cette politique ne contient aucun filtre.</i><br><br>");else{var b="",c;for(c in xxAddDefensePolicyFilters)b+="<divclass=itemBarstyle=margin-right:0><divstyle=float:right>"+AddButton2("Retirer","removeFilterButton("+c+")")+"</div><divstyle=padding-top:3px;max-width:260px;overflow:hidden><b>"+GetFilterById(xxAddDefensePolicyFilters[c]).Name+
"</b></div></div>";QH("policyFilters",b)}}function GetFilterById(b){for(var c in xxSystemDefense.AMT_Hdr8021Filter.responses){var a=xxSystemDefense.AMT_Hdr8021Filter.responses[c];if(a.InstanceID==b)return a}for(c in xxSystemDefense.AMT_IPHeadersFilter.responses)if(a=xxSystemDefense.AMT_IPHeadersFilter.responses[c],a.InstanceID==b)return a}
function AddDefensePolicyOk(){var b=Q("policytx").value,c=Q("policyrx").value,a=0,d=Q("policyname").value.split(":");2==d.length&&(a=parseInt(d[1]));b={"InstanceID ":0,PolicyName:d[0],PolicyPrecedence:a,TxDefaultCount:1<b,TxDefaultDrop:1==b%2,TxDefaultMatchEvent:3<b,RxDefaultCount:1<c,RxDefaultDrop:1==c%2,RxDefaultMatchEvent:3<c};0<xxAddDefensePolicyFilters.length&&(b.FilterCreationHandles=xxAddDefensePolicyFilters);amtstack.Create("AMT_SystemDefensePolicy",b,AddDefensePolicyOk2)}
function AddDefensePolicyOk2(b,c,a,d){200!=d?messagebox("Ajouter une strat\u00e9gie de d\u00e9fense du syst\u00e8me","Impossible d'ajouter la strat\u00e9gie, erreur #"+d):PullSystemDefense()}
function showPolicyDetails(b){if(!xxdialogMode){var c=xxSystemDefense.AMT_SystemDefensePolicy.responses[b],a;a=""+addHtmlValue("Nom",EscapeHtml(c.PolicyName));0!=c.PolicyPrecedence&&(a+=addHtmlValue("Priorit\u00e9",c.PolicyPrecedence));var d=1==c.TxDefaultDrop?"Laissez tomber":"Autoriser";1==c.TxDefaultCount&&(d+=", Compter");1==c.TxDefaultMatchEvent&&(d+=", Un \u00e9v\u00e9nement");a+=addHtmlValue("Action TX par d\u00e9faut",d);d=1==c.RxDefaultDrop?"Drop":"Allow";1==c.RxDefaultCount&&(d+=", Count");
1==c.RxDefaultMatchEvent&&(d+=", Event");a+=addHtmlValue("Action RX par d\u00e9faut",d);if(c.FilterCreationHandles)for(b in c.FilterCreationHandles)a+=addHtmlValue("Filtre #"+(+b+1),GetFilterById(c.FilterCreationHandles[b]).Name);setDialogMode(11,format("Politique #",c.InstanceID.substring(20)),5,showPolicyDetailsOk,a,c)}}function showPolicyDetailsOk(b,c){2==b&&amtstack.Delete("AMT_SystemDefensePolicy",c,deleteDefensePolicy)}
function deleteDefensePolicy(b,c,a,d){200!=d?messagebox("Supprimer la politique","Impossible de supprimer la strat\u00e9gie, assurez-vous qu'elle n'est pas utilis\u00e9e."):PullSystemDefense()}var xxWireless;function PullWireless(){amtFirstPull|=2;-1!=amtwirelessif&&amtstack.BatchEnum("","*CIM_WiFiPortCapabilities *CIM_WiFiPort *CIM_WiFiEndpoint CIM_WiFiEndpointSettings *AMT_WiFiPortConfigurationService *AMT_BootCapabilities".split(" "),processWireless)}
function wifiRefresh(){xxdialogMode||PullWireless()}var xxWifiState={3:"d\u00e9sactiv\u00e9",32768:"Activ\u00e9 dans S0",32769:"Activ\u00e9 dans S0, Sx / AC"},xxRadioState={2:"Allum\u00e9, connect\u00e9",3:"De",6:"Activ\u00e9, d\u00e9connect\u00e9"},xxWifiAuthenticationMethod={1:"Autre",2:"Ouvert",3:"Cl\u00e9 partag\u00e9e",4:"WPA PSK",5:"WPA IEEE 802.1x",6:"WPA2 PSK",7:"WPA2 IEEE 802.1x",32768:"WPA3 SAE"},xxWifiEncryptionMethod={1:"Autre",2:"WEP",3:"TKIP-RC4",4:"CCMP-AES",5:"Aucun"};
function showWirelessInfo(){if(xxWireless){var b,c,a="",d,g;if(xxWireless.CIM_WiFiPortCapabilities.response){g="<br><h2>Profils sans fil</h2>"+TableStart2();g+="<tr><tdclass=r2style=padding-left:15px><br>Profils sans fil qu'Intel® AMT utilisera pour la connectivit\u00e9 r\u00e9seau.<br><br>";for(b=a=0;256>b;b++)for(c in xxWireless.CIM_WiFiEndpointSettings.responses)d=xxWireless.CIM_WiFiEndpointSettings.responses[c],1!=d.AuthenticationMethod&&d.Priority==b&&(g+="<divclass=itemBaronclick=showWifiDetails("+
c+")><divstyle=float:right>"+EscapeHtml(d.SSID)+", "+xxWifiAuthenticationMethod[d.AuthenticationMethod]+", "+xxWifiEncryptionMethod[d.EncryptionMethod]+" ",xxAccountAdminName&&(g+=AddButton2("Retirer",'wifiRemoveButton("'+c+'")')),g+="</div><divstyle=padding-top:3px><b>"+EscapeHtml(d.ElementName)+"</b></div></div>",a++);0==a&&(g+="<i>Aucun profil sans fil pr\u00e9sent</i><br>");g+="<br><tdclass=r2>";g=xxAccountAdminName?g+TableEnd(AddButton("Nouveau profile","showWifiNewProfile()")):g+TableEnd("");
QH(20,g+"<br>")}}}function showWifiStateDlg(){if(!xxdialogMode){var b="",c;for(c in xxWifiState)b+="<label><inputtype=radioname=d11id=wl"+c+"value="+c+""+(xxWireless.CIM_WiFiPort.response.EnabledState==c?"checked":"")+">"+xxWifiState[c]+"</label><br>";setDialogMode(11,"\u00c9tat sans fil",3,wifiStateDlg,b)}}
function wifiStateDlg(){amtstack.CIM_WiFiPort_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,function(){amtstack.Get("CIM_WiFiPort",function(b,c,a,d){200==d&&(xxWireless.CIM_WiFiPort.response=a.Body,showWirelessInfo())})})}
function showWifiSyncDlg(){if(!xxdialogMode){var b;b=""+("<label><inputtype=radioname=d11id=wl0value=0"+(0==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">d\u00e9sactiv\u00e9</label><br>");b+="<label><inputtype=radioname=d11id=wl0value=1"+(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"checked":"")+">Activ\u00e9e</label><br>";setDialogMode(11,"Local Profile Sync",3,showWifiSyncDlgEx,b)}}
function showWifiSyncDlgEx(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.localProfileSynchronizationEnabled=document.querySelector("input[name=d11]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(){amtstack.Get("AMT_WiFiPortConfigurationService",function(b,a,d,g){200==g&&(xxWireless.AMT_WiFiPortConfigurationService.response=d.Body,showWirelessInfo())})})}
function UefiWifiCoExDlg(){var b=Clone(xxWireless.AMT_WiFiPortConfigurationService.response);b.UEFIWiFiProfileShareEnabled=document.querySelector("input[name=d12]:checked").value;amtstack.Put("AMT_WiFiPortConfigurationService",b,function(b,a,d,g){200==g&&PullWireless()})}
function showWifiDetails(b){if(!xxdialogMode){b=xxWireless.CIM_WiFiEndpointSettings.responses[b];var c;c="<divstyle=text-align:left>"+addHtmlValue("Nom de profil",EscapeHtml(b.ElementName));c+=addHtmlValue("SSID",b.SSID);c+=addHtmlValue("Authentification",xxWifiAuthenticationMethod[b.AuthenticationMethod]);c+=addHtmlValue("Chiffrement",xxWifiEncryptionMethod[b.EncryptionMethod]);c+=addHtmlValue("Priorit\u00e9",b.Priority);messagebox("Profil sans fil",c+"</div>")}}
function wifiRemoveButton(b){xxdialogMode||(QH(60,format('Supprimer le profil sans fil "{0}"?',xxWireless.CIM_WiFiEndpointSettings.responses[b].ElementName)),setDialogMode(1,"Profil sans fil",3,function(){removeWifiButtonEx(b)}))}function removeWifiButtonEx(b){amtstack.Delete("CIM_WiFiEndpointSettings",{InstanceID:xxWireless.CIM_WiFiEndpointSettings.responses[b].InstanceID},removeWifiEntryResponse,0,1)}
function removeWifiEntryResponse(b,c,a,d,g){methodcheck(a)||amtstack.Enum("CIM_WiFiEndpointSettings",function(a,b,c,d){200==d&&(xxWireless.CIM_WiFiEndpointSettings.responses=c,showWirelessInfo())})}
function showWifiNewProfile(){if(!xxdialogMode){var b="";for(i=1;256>i;i++){var c=1;for(j in xxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[j].Priority==i&&(c=0);c&&(b+="<optionvalue="+i+">"+i)}QH("c24",b);QV("c26",13<amtversion);c25.value=6;c27.value=4;c22.value=c23.value=c28.value=c29.value="";setDialogMode(12,"Ajouterunprofilsansfil",3,function(){addWifiProfile()});updateWifiDialog()}}
function addWifiProfile(){amtstack.AMT_WiFiPortConfigurationService_AddWiFiSettings({__parameterType:"reference",__resourceUri:amtstack.CompleteName("CIM_WiFiEndpoint"),Name:"WiFi Endpoint 0"},{__parameterType:"instance",__namespace:amtstack.CompleteName("CIM_WiFiEndpointSettings"),ElementName:c22.value,InstanceID:"Intel(r) AMT:WiFi Endpoint Settings "+c22.value,AuthenticationMethod:c25.value,EncryptionMethod:c27.value,SSID:c23.value,Priority:c24.value,
function updateWifiDialog(){var b=!0,c=c25.value,a=c27.value;QV(66,4>c);QV(65,3<c);QV(64,3<c);QV(67,4>c);4>c&&(3==a||4==a)&&(c27.value=2);3<c&&(2==a||5==a)&&(c27.value=3);32768==c&&(c27.value=4);for(vardinxxWireless.CIM_WiFiEndpointSettings.responses)xxWireless.CIM_WiFiEndpointSettings.responses[d].ElementName==c22.value&&(b=!1);QE("c54",1==b&&0<c22.value.length&&0<c23.value.length&&7<c28.value.length&&
var DMTFCPUStatus="Inconnue;Activ\u00e9e;D\u00e9sactiv\u00e9 par l'utilisateur;D\u00e9sactiv\u00e9 par le BIOS (erreur POST);Tourner au ralenti;Autre".split(";"),DMTFMemType="Inconnue;Autre;DRACHME;DRAM synchrone;Cache DRAM;EDO;EDRAM;VRAM;SRAM;RAM;ROM;\u00c9clat;EEPROM;FEPROM;EPROM;CDRAM;3DRAM;SDRAM;SGRAM;RDRAM;DDR;DDR-2;BRAM;FB-DIMM;DDR3;FBD2;DDR4;LPDDR;LPDDR2;LPDDR3;LPDDR4".split(";"),DMTFMemFormFactor=";Autre;Inconnue;SIMM;siroter;Puce;TREMPER;ZIP;Carte propri\u00e9taire;DIMM;TSOP;Rang\u00e9e de jetons;RIMM;SODIMM;SRIMM;FB-DIM".split(";"),
function processHardware(b,c,a,d){if(200==d){var g;b="<tableclass=log1cellpadding=0cellspacing=0style=width:100%;border-radius:8px>";HardwareInventory=a;QV("go2",!0);b+=TableEnd("<div> "+AddRefreshButton("PullHardware(1)")+AddButton("Sauver...","SaveHardwareLog()")+" Les informations sur le mat\u00e9riel sont collect\u00e9es au d\u00e9marrage du syst\u00e8me.");c=a.CIM_Chassis.response;d=a.CIM_Card.response;var v=a.CIM_BIOSElement.response.SoftwareElementID;b=b+"<br><h2>Plate-forme</h2>"+
FullTable({"Mod\u00e8le informatique":c.Model,Fabricant:c.Manufacturer,Version:c.Version,"Num\u00e9ro de s\u00e9rie":c.SerialNumber,"ID syst\u00e8me":guidToStr(a.CIM_SystemPackaging.responses[0].PlatformGUID).toLowerCase()},"");b+="<br><h2>Plinthe</h2>";b+=FullTable({Fabricant:d.Manufacturer,"Nom du produit":d.Model,Version:d.Version,"Num\u00e9ro de s\u00e9rie":d.SerialNumber,"\u00c9tiquette d'inventaire":d.Tag,"Rempla\u00e7able?":1==d.CanBeFRUed?"Yes":"No"},"");b+="<br><h2>BIOS</h2>";b+=FullTable({Vendeur:a.CIM_BIOSElement.response.Manufacturer,
Version:v,"Date de sortie":(new Date(a.CIM_BIOSElement.response.ReleaseDate.Datetime)).toLocaleDateString("en",{timeZone:"UTC"})},"");b+="<br>";for(g in a.CIM_Processor.responses)c=a.CIM_Processor.responses[g],d=a.CIM_Chip.responses[g],b+="<h2>Processeur "+(parseInt(g)+1)+"</h2>",b+=FullTable({Fabricant:trademarks(d.Manufacturer),Famille:DMTFProcFamilly[c.Family],Version:trademarks(d.Version),"Vitesse de prise maximale":c.MaxClockSpeed+" MHz",Statut:DMTFCPUStatus[c.CPUStatus]},"");b+="<br>";for(g in a.CIM_PhysicalMemory.responses)c=
a.CIM_PhysicalMemory.responses[g],b+="<h2>Module de m\u00e9moire "+(+g+1)+"</h2>",b+=FullTable({"\u00c9tiquette de banque":c.BankLabel,Fabricant:c.Manufacturer,"Num\u00e9ro de s\u00e9rie":c.SerialNumber,Taille:parseInt(c.Capacity/1048576)+" MB","Facteur de forme":DMTFMemFormFactor[c.FormFactor],Type:DMTFMemType[c.MemoryType],"\u00c9tiquette d'inventaire":c.Tag,"Num\u00e9ro d'article":c.PartNumber},"");b+="<br>";for(g in a.CIM_MediaAccessDevice.responses)c=a.CIM_MediaAccessDevice.responses[g],d=a.CIM_PhysicalPackage.responses[+g+
1],b+="<h2>Supports de stockage "+(parseInt(g)+1)+"</h2>",b+=FullTable({"Mod\u00e8le":d.Model,"Num\u00e9ro de s\u00e9rie":""==d.SerialNumber?"Unknown":d.SerialNumber,Taille:parseInt(Math.round(1E3*c.MaxMediaSize/1048576))+" MB"},"");b+="<br>";if(null!=a.CIM_Battery.response){c=null;for(g in a.CIM_PhysicalPackage.responses)11==a.CIM_PhysicalPackage.responses[g].PackageType&&(c=a.CIM_PhysicalPackage.responses[g]);null!=c&&(b+="<h2>Battery</h2>",g=(new Date(c.ManufactureDate.Datetime)).toDateString(),
a={"Device name":a.CIM_Battery.response.DeviceID,Fabricant:c.Manufacturer,"Manufacture date":g,"Num\u00e9ro de s\u00e9rie":c.SerialNumber,Type:"Autre;Inconnue;Lead Acid;Nickel Cadmium;Nickel Metal Hydride;Lithium-ion;Zinc air;Lithium Polymer".split(";")[a.CIM_Battery.response.Chemistry],"Design capacity":a.CIM_Battery.response.DesignCapacity+" mWatt-hours","Design voltage":a.CIM_Battery.response.DesignVoltage+" mVolts"},c.OtherIdentifyingInfo&&(a["Other Info"]=c.OtherIdentifyingInfo),b+=FullTable(a,
""))}b+="<br>";QH(16,b);updateSystemStatus()}}function SaveHardwareLog(){!xxdialogMode&&HardwareInventory&&SaveJsonFile("IntelAmtHardware","hardware","Informations sur le mat\u00e9riel Intel AMT",HardwareInventory)}var AmtSystemPowerSchemes=null;function PullPowerPolicy(){amtstack.Enum("AMT_SystemPowerScheme",powerPolicyResponse)}function powerPolicyResponse(b,c,a,d){AmtSystemPowerSchemes=a;updateSystemStatus()}
function showPowerPolicyDlg(b){if(!xxdialogMode){for(var c="",a=0;a<AmtSystemPowerSchemes.length;a++)c+='<inputtype=radioname=powerpolicyvalue="'+AmtSystemPowerSchemes[a].InstanceID+'"'+(AmtSystemPowerSchemes[a].SchemeGUID==b?"checked":"")+">"+AmtSystemPowerSchemes[a].Description+"<br>";setDialogMode(11,"Politique d'alimentation Intel® AMT",3,showPowerPolicyDlgOk,c)}}
function showPowerPolicyDlgOk(){for(var b=null,c=0,a=document.getElementsByTagName("input");c<a.length;c++)"powerpolicy"==a[c].name&&a[c].checked&&(b=a[c].value);amtstack.AMT_SystemPowerScheme_SetPowerScheme(showPowerPolicyDlgOkDone,b)}functionshowPowerPolicyDlgOkDone(b,c,a,d){200==d&&PullSystemStatus()}varxxAccountAdminName,xxAccountRealmInfo,xxAccountEnabledInfo={},xxAccountFetch,showHiddenAccounts=!1;
function PullUserInfo(){xxAccountFetch=1;delete xxAccountAdminName;xxAccountRealmInfo={};amtstack.AMT_AuthorizationService_GetAdminAclEntry(getAdminAclEntryResponse);amtstack.AMT_AuthorizationService_EnumerateUserAclEntries(1,enumerateUserAclEntriesResponse)}function getAdminAclEntryResponse(b,c,a,d){200==d&&(xxAccountRealmInfo[-1]={AccessPermission:999,DigestUsername:a.Body.Username,Realms:null},xxAccountAdminName=a.Body.Username,updateAccounts())}
function enumerateUserAclEntriesResponse(b,c,a,d){if(200==d){methodcheck(a);QV("go11",!0);xxAccountFetch=a.Body.Handles.length;for(var g in a.Body.Handles)b=a.Body.Handles[g],amtstack.AMT_AuthorizationService_GetAclEnabledState(b,getAclEnabledStateResponse,b),amtstack.AMT_AuthorizationService_GetUserAclEntryEx(b,getUserAclEntryExResponse,b);updateAccounts()}}
function getUserAclEntryExResponse(b,c,a,d,g){xxAccountFetch--;200==d&&(a.Body.Handle=g,a.Body.Realms?Array.isArray(a.Body.Realms)||(a.Body.Realms=[a.Body.Realms]):a.Body.Realms=[],xxAccountRealmInfo[g]=a.Body,updateAccounts())}function getAclEnabledStateResponse(b,c,a,d,g){200==d&&(xxAccountEnabledInfo[g]=a.Body,updateAccounts())}function setAclEnabledStateResponse(b,c,a,d,g){errcheck(d,b)||(methodcheck(a),amtstack.AMT_AuthorizationService_GetAclEnabledState(g,getAclEnabledStateResponse,g))}
function updateAccounts(){if(!(0<xxAccountFetch)){varb=TableStart2(),b=b+"<tr><tdclass=r1style=padding-left:15px><br>G\u00e9rez les comptes d'utilisateurs Intel® AMT pour cet ordinateur.<br><br>",c;for(c in xxAccountRealmInfo){var a=xxAccountRealmInfo[c],d,g=!1,v=0;a.DigestUsername?(d=a.DigestUsername,g="$"==d[0]&&"$"==d[1]):d=GetSidString(atob(a.KerberosUserSid));xxAccountEnabledInfo[c]&&"$$OsAdmin"!=d&&(v=1==xxAccountEnabledInfo[c].Enabled?1:2);if(showHiddenAccounts||!g){var n="";if(999!=
a.AccessPermission){2==v&&(n+="D\u00e9sactiv\u00e9,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Royaumes[c]]&&l++;0<=a.Realms.indexOf(20)&&(n+="Auditeur,");n=0<=a.Realms.indexOf(3)?n+"Administrateur":1==l?n+"1 royaume":n+(l+" royaumes")}else n+="Administrateur",a.Handle=-1;b+="<divclass=itemBaronclick=showUserDetails("+a.Handle+")><divstyle=float:right>";0<v&&xxAccountAdminName&&(b+=""+AddButton2(1==v?"Disable":"Enable","changeAccountStateButton(event,"+a.Handle+","+v+")"));!g&&xxAccountAdminName&&
(b+=" "+AddButton2("\u00c9diter...","changeAccountButton(event,"+a.Handle+")"));b+='</div><divstyle=padding-top:3px;width:330px;float:left;overflow-x:hiddentitle="'+d+'"><b>'+d+"</b></div><divstyle=padding-top:3px>"+n+"</div></div>"}}c='<divstyle=float:right;margin-right:8px><atitle="Basculer les comptes cach\u00e9s"style=color:gray;cursor:pointeronclick=toggleAccountButton()>'+(showHiddenAccounts?"▲":"▼")+"</a></div><div> "+AddRefreshButton("xxAccountFetch=999;PullUserInfo()");
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())}
function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nouveau compte",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,g=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,
function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><inputtype=checkboxonchange=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><inputtype=checkboxonchange=updateAccountDialog()id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,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=["Local seulement","R\u00e9seau uniquement","Tout (local et r\u00e9seau)"];
function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<divstyle=text-align:left>",d,g=c.DigestUsername;g||(g=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("Nom",g);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("Etat",1==xxAccountEnabledInfo[b].Enabled?"Activ\u00e9e":"d\u00e9sactiv\u00e9"));if(g==xxAccountAdminName)a+=addHtmlValue("Autorisation","Administrateur");else{var a=a+addHtmlValue("Autorisation",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v=
"Administrateur",0<=c.Realms.indexOf(20)&&(v+=", Auditeur");else for(d in xxAccountRealmInfo[b].Realms)""!=amtstack.RealmNames[c.Realms[d]]&&(0<v.length&&(v+=","),v+=amtstack.RealmNames[c.Realms[d]]);0==v.length&&(v="Aucun");a+=addHtmlValue("Royaumes","")+"<b>"+v+"</b>"}messagebox("Compte"+g,a+"</div>")}}
function wsmanQuery(){QH(24,"");var b=getSelectedOptions(Q(22)),c=[],a;for(a in b)""==QS("WSB-"+b[a]).display&&c.push(b[a]);0!=c.length&&(QE(23,!1),c&&0<c.length&&amtstack.BatchEnum("Navigateur",c,browserResponse,null,!0))}
function browserResponse(b,c,a,d){QE(23,!0);b="";for(var g in a)c=a[g],b+="<h2>"+g+"</h2><divstyle=margin-left:20px>",b=200==c.status?0==c.responses.length?b+"<br>(Vide)":b+ObjectToString(c.responses).replace(/Intel\(r\)/g,"Intel®"):b+("<br><divstyle=color:red>Erreur #"+c.status+"</div>"),b+="</div><br>";QH(24,b)}
function wsmanFilter(){var b=c0.value.toLowerCase(),c;for(c in AllWsman)QV("WSB-"+AllWsman[c],""==b||0<=AllWsman[c].toLowerCase().indexOf(b))}function connectTerminal(){terminal&&(0==terminal.State?(terminal.tlsv1only=amtstack.wsman.comm.tlsv1only,terminal.Start(currentMeshNode._id,16994,"*","*",0)):terminal.Stop())}
function onTerminalStateChange(b,c){c4.value=0==c?"Relier":"D\u00e9connecter";Q(29).textContent=StatusStrs[c];QE(34,3==c);QE("TermWD",3==c);switch(c){case 0:b.m.TermResetScreen();b.m.TermDraw();3==xxdialogMode&&setDialogMode();QV("termRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Terminal","The remote device is busy, a session may already be open."):3==b.disconnectCode&&messagebox("Remote Terminal","The device indicated that this type of connection of not supported.");
function terminalCaptureToggle(b){if(!xxdialogMode)if(void 0==terminal.m.capture)terminal.m.capture="",c3.value="Arr\u00eater la capture";else{if(0<terminal.m.capture.length){b="TerminalCapture";varc=newDate;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);saveAs(data2blob(terminal.m.capture),
b+".txt")}delete terminal.m.capture;c3.value="Commencer la capture"}}function terminal_FileSelectHandler(b){haltEvent(b);if(3==terminal.State&&null!=b.dataTransfer&&1==b.dataTransfer.files.length){var c=new FileReader;c.onload=terminal_onSetupBinRead;c.readAsText(b.dataTransfer.files[0])}}function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDialogMode(3,"P\u00e2te",3,termPaste)}var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
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==
function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void0!=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!=
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+
function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(desktopScreenInfo=a.IPS_ScreenSettingData.responses.Body,desktopScreenInfo.KVMRSD=a.IPS_KVMRedirectionSettingData.responses.Body,UpdateDesktopDisplayInfo())}
function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<inputtype="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+')"> ');1<c?Q(42).innerHTML=b+" ":Q(42).innerHTML=""}
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())}
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."):
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\u00e0distance","KVMdisconnectionthatmaybeduetothedisplaysizeandresolutionbeingtoolargefortheIntelAMTKVMbuffer.TryRLE8encodingorreducingthedisplayresolution.");
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))}
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=
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="";
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=
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><textareaid=d2typeTextstyle=\"margin-top:5px;width:100%;height:184px;resize:none\"maxlength=2000></textarea>"),Q("d2typeText").focus())}
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};
function showDeskTypeEx(){var b=Q("d2typeText").value;Q("d2typeText").value.toUpperCase();var c=[],a;for(a in b){var d=b.charCodeAt(a);c.push([d,1],[d,0])}AmtDeskTypeContent=c;AmtDeskTypeTimer=setInterval(function(){var a=AmtDeskTypeContent.shift();desktop&&desktop.m.sendkey(a[0],a[1]);if(null==desktop||0==AmtDeskTypeContent.length)clearInterval(AmtDeskTypeTimer),AmtDeskTypeContent=null},10)}function sendCAD(){Q(48).checked||desktop.m.sendcad()}
var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511,0]],2:[[65511,1],[65362,1],[65362,0],[65511,0]],3:[[65511,1],[108,1],[108,0],[65511,0]],4:[[65511,1],[109,1],[109,0],[65511,0]],5:[[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]],6:[[65470,1],[65470,0]],7:[[65471,1],[65471,0]],8:[[65472,1],[65472,0]],9:[[65473,1],[65473,0]],10:[[65474,1],[65474,0]],11:[[65475,1],[65475,0]],12:[[65476,1],[65476,0]],13:[[65477,1],[65477,0]],14:[[65478,1],[65478,0]],15:[[65479,
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])}}
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")})}}
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))}
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))}
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=[];
function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);elseif(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);elseif("upload"==b.action)p24gotUploadData(b);elseif("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){varc=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(varc=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
function p24updateFiles(b){var c="",a="",d="<astyle=cursor:pointeronclick=p24folderup(0)>Racine</a>",g=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in g)""!=g[v]&&p24filetreelocation.push(g[v]);for(v in p24filetreelocation)d+=" / <astyle=cursor:pointeronclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var g=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<spantitle="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
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}functionp24sort_timestamp(b,c){returnb.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
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);returnc}
function p24setActions(){if(null==p24filetree)QE("p24DeleteFileButton",!1),QE("p24NewFolderButton",!1),QE("p24UploadButton",!1),QE("p24RenameFileButton",!1),QE("p24SelectAllButton",!1),Q("p24SelectAllButton").value="Tout s\u00e9lectionner",QE("p24RefreshButton",!1),QE("p24CutButton",!1),QE("p24CopyButton",!1),QE("p24PasteButton",!1);else{var b=p24getFileSelCount(),c=p24getFileCount(),a=p24getFileSelCount(!1),d="win32"==webRtcDesktop.platform;QE("p24DeleteFileButton",0<b&&(0<p24filetreelocation.length||
function p24createfolder(){setDialogMode(11,"Nouveau dossier",3,p24createfolderEx,"<inputtype=textid=p24renameinputmaxlength=64onkeyup=p24fileNameCheck(event)style=width:100%/>");focusTextBox("p24renameinput");p24fileNameCheck()}function p24createfolderEx(){p24files.sendCtrlMsg(JSON.stringify({action:"mkdir",reqid:1,path:p24filetreelocation.join("/")+"/"+Q("p24renameinput").value}));p24folderup(999)}
function p24deletefile(){var b=p24getFileSelCount();setDialogMode(11,"Supprimer",3,p24deletefileEx,1<b?"Delete"+b+"selecteditems?":"Deleteselecteditem?")}functionp24deletefileEx(){for(varb=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);p24files.sendCtrlMsg(JSON.stringify({action:"rm",reqid:1,path:p24filetreelocation.join("/"),delfiles:b}));p24folderup(999)}
function p24renamefile(){for(var b,c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&(b=p24filetree.dir[c[a].value].n);setDialogMode(11,"Renommer",3,p24renamefileEx,'<inputtype=textid=p24renameinputmaxlength=64onkeyup=p24fileNameCheck(event)style=width:100%value="'+b+'"/>',{action:"rename",path:p24filetreelocation.join("/"),oldname:b});focusTextBox("p24renameinput");p24fileNameCheck()}
function p24renamefileEx(b,c){c.newname=Q("p24renameinput").value;p24files.sendCtrlMsg(JSON.stringify(c));p24folderup(999)}function p24fileNameCheck(b){var c=isFilenameValid(Q("p24renameinput").value);QE("c54",c);1==c&&null!=b&&24==b.keyCode&&dialogclose(1)}
function p24uploadFile(){setDialogMode(11,"T\u00e9l\u00e9verser un fichier",3,p24uploadFileEx,"<inputtype=filename=filesid=p24uploadinputstyle=width:100%multiple=multipleonchange=\"updateUploadDialogOk('p24uploadinput')\"/>");updateUploadDialogOk("p24uploadinput")}function p24uploadFileEx(){p24doUploadFiles(Q("p24uploadinput").files)}function updateUploadDialogOk(b){QE("c54",""!=Q(b).value)}var p24clipboard=null,p24clipboardFolder=null,p24clipboardCut=0;
function p24copyFile(b){var c=document.getElementsByName("fd");p24clipboard=[];p24clipboardCut=b;p24clipboardFolder=p24targetpath;for(b=0;b<c.length;b++)c[b].checked&&"3"==c[b].attributes.file.value&&p24clipboard.push(p24filetree.dir[c[b].value].n);p24updateClipview()}
function p24pasteFile(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Confim "+(0==p24clipboardCut?"copy":"move")+"of"+p24clipboard.length+"entrie"+(1<p24clipboard.length?"s":"")+"tothislocation?");setDialogMode(11,"P\u00e2te",3,p24pasteFileEx,b)}
function p24pasteFileEx(){p24files.sendCtrlMsg(JSON.stringify({action:0==p24clipboardCut?"copy":"move",reqid:1,scpath:p24clipboardFolder,dspath:p24targetpath,names:p24clipboard}));p24folderup(999);1==p24clipboardCut&&(p24clipboardFolder=p24clipboard=null,p24clipboardCut=0,p24updateClipview())}
function p24updateClipview(){var b="";null!=p24clipboard&&0<p24clipboard.length&&(b="Holding "+p24clipboard.length+"entrie"+(1<p24clipboard.length?"s":"")+"for"+(0==p24clipboardCut?"copy":"move")+",<aonclick=p24clearClip()style=cursor:pointer>Clear</a>.");QH("p24bottomstatus",b);p24setActions()}function p24clearClip(){p24clipboardFolder=p24clipboard=null;p24clipboardCut=0;p24updateClipview()}
function p24fileDragDrop(b){haltEvent(b);QV("p24bigfail",!1);QV("p24bigok",!1);null!=b.dataTransfer&&0!=b.dataTransfer.files.length&&null!=p24filetree&&(0==p24filetreelocation.length&&"win32"==webRtcDesktop.platform||p24doUploadFiles(b.dataTransfer.files))}var p24dragtimer=null;
function p24fileDragOver(b){haltEvent(b);null!=p24dragtimer&&(clearTimeout(p24dragtimer),p24dragtimer=null);b=null!=p24filetree;0==p24filetreelocation.length&&"win32"==webRtcDesktop.platform&&(b=!1);QV("p24bigok",b);QV("p24bigfail",!b)}function p24fileDragLeave(b){haltEvent(b);"p24filetable"!=b.target.id?(QV("p24bigfail",!1),QV("p24bigok",!1)):p24dragtimer=setTimeout(function(){QV("p24bigfail",!1);QV("p24bigok",!1);p24dragtimer=null},200)}
function getFileSizeStr(b){return 1==b?"1 octet":format("{0} octets",b)}function joinPaths(){var b=[],c;for(c in arguments){var a=arguments[c];if(null!=a&&""!=a){for(;a.endsWith("/")||a.endsWith("\\");)a=a.substring(0,a.length-1);for(;a.startsWith("/")||a.startsWith("\\");)a=a.substring(1);b.push(a)}}return b.join("/")}var isFilenameValid=function(){var b=/^[^\\/:\*\?"<>\|]+$/,c=/^\./,a=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(d){return b.test(d)&&!c.test(d)&&!a.test(d)&&"."!=d[0]}}();
function focusTextBox(b){setTimeout(function(){Q(b).selectionStart=Q(b).selectionEnd=65535;Q(b).focus()},0)}var downloadFile;
function p24downloadfile(b,c,a){xxdialogMode||downloadFile||!p24files||(downloadFile={path:decodeURIComponent(b),file:decodeURIComponent(c),size:a,tsize:0,data:"",state:0,id:Math.random()},p24files.sendCtrlMsg(JSON.stringify({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path})),setDialogMode(11,"T\u00e9l\u00e9charger un fichier",10,p24downloadFileCancel,"<div>"+downloadFile.file+"</div><br/><progressid=d2progressBarstyle=width:100%value=0max="+a+"/>"))}
function p24downloadFileCancel(){null!=downloadFile&&(setDialogMode(0),null!=p24files&&p24files.sendCtrlMsg(JSON.stringify({action:"download",sub:"cancel",id:downloadFile.id})),downloadFile=null)}function p24gotDownloadCommand(b){null!=downloadFile&&b.id==downloadFile.id&&("start"==b.sub?(downloadFile.state=1,p24files.sendCtrlMsg(JSON.stringify({action:"download",sub:"startack",id:downloadFile.id}))):"cancel"==b.sub&&(downloadFile=null,setDialogMode(0)))}
function p24gotDownloadBinaryData(b){if(downloadFile&&0!=downloadFile.state){try{b=atob(b)}catch(c){return}null==b||4>b.length||(4<b.length&&(downloadFile.tsize+=b.length-4,downloadFile.data+=b.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(ReadInt(b,0)&1)?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):p24files.sendCtrlMsg(JSON.stringify({action:"download",sub:"ack",id:downloadFile.id})))}}varuploadFile;
function p24doUploadFiles(b){xxdialogMode||(uploadFile={xpath:p24filetreelocation.join("/"),xfiles:b,xfilePtr:-1},setDialogMode(11,"T\u00e9l\u00e9verser un fichier",10,p24uploadFileCancel,"<divid=p24dfileName>Mise en place ...</div><br/><progressid=d2progressBarstyle=width:100%value=0max=0/>",99),p24uploadNextFile())}
function p24uploadNextFile(){uploadFile.xfilePtr++;if(uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var b=uploadFile.xfiles[uploadFile.xfilePtr];QH("p24dfileName",b.name);Q("d2progressBar").max=b.size;Q("d2progressBar").value=0;uploadFile.xreader=new FileReader;uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result;p24files.sendCtrlMsg(JSON.stringify({action:"upload",sub:"start",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:b.name,size:uploadFile.xdata.byteLength}))};
function p24gotUploadData(b){if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(b.reqid))if("start"==b.sub)for(p24uploadNextPart(!1),b=0;8>b;b++)p24uploadNextPart(!0);else"ack"==b.sub?p24uploadNextPart(!1):"error"==b.sub&&p24uploadFileCancel()}function ab2str(b){return String.fromCharCode.apply(null,new Uint8Array(b))}
function p24uploadNextPart(b){var c=uploadFile.xdata,a=uploadFile.xptr,d=uploadFile.xptr+4096;if(d>c.byteLength){if(1==b)return;d=c.byteLength}a==c.byteLength?p24uploadNextFile():(p24files.sendCtrlMsg(btoa(IntToStr(d!=c.byteLength?16777216:16777217)+ab2str(c.slice(a,d)))),uploadFile.xptr=d,Q("d2progressBar").value=d)}var ider,iderCodeBlock,iderTimer;
function iderStart(b){if(!xxdialogMode){b="<div>Montez des images de disque sur un ordinateur Intel® AMT - Exp\u00e9rimental.</div><br/>"+('<divstyle=height:26px><inputid=floppyImageInputtype=filestyle=float:right;width:250pxaccept=".img"><div>'+NoBreak("Disquette (.img)")+"</div></div>");b+='<divstyle=height:26px><inputid=cdromImageInputtype=filestyle=float:right;width:250pxaccept=".iso"><div>'+NoBreak("CD-ROM (.iso)")+"</div></div>";setDialogMode(11,"Redirection de stockage",3,iderStart2,
b+"<divstyle=height:26px><selectid=iderStartTypestyle=float:right;width:250px><optionvalue=0>Au prochain d\u00e9marrage<optionvalue=1>Gracieux<optionvalue=2>Imm\u00e9diat</select><div>D\u00e9but de session</div></div>");b=null;try{b=localStorage.getItem("iderurl")}catch(c){}b&&(Q("storageserverurl").value=b.substring(1,b.length-1))}}
function iderStart2(){if(1!=Q("floppyImageInput").files.length&&1!=Q("cdromImageInput").files.length)messagebox("Erreur de redirection de stockage","Au moins un fichier d'image disque doit \u00eatre s\u00e9lectionn\u00e9.");else if(1==Q("floppyImageInput").files.length&&0!=Q("floppyImageInput").files[0].size%512)messagebox("Erreur de redirection de stockage","Fichier .img non valide.");else if(1==Q("cdromImageInput").files.length&&0!=Q("cdromImageInput").files[0].size%2048)messagebox("Erreur de redirection de stockage",
"Fichier .iso non valide.");else{var b=null,c=null;1==Q("floppyImageInput").files.length&&(b=Q("floppyImageInput").files[0]);1==Q("cdromImageInput").files.length&&(c=Q("cdromImageInput").files[0]);null==b&&null==c||iderStart3(b,c,Q("iderStartType").value)}}
function iderStart3(b,c,a){iderStop();ider=CreateAmtRedirect(CreateAmtRemoteIder());ider.onStateChanged=onIderStateChange;ider.m.floppy=b;ider.m.cdrom=c;ider.m.iderStart=a;ider.m.sectorStats=iderSectorStats;ider.tlsv1only=amtstack.wsman.comm.tlsv1only;ider.Start(currentMeshNode._id,16994,"*","*",0);QV("IDERDiskMapButton",!0)}
function iderStop(){ider&&(ider.m.Stop(),ider.onStateChanged=null,ider.m.onDialogPrompt=null,delete ider);iderTimer&&(clearInterval(iderTimer),delete iderTimer);iderToggleDiskMap(!1)}function onIderStateChange(b,c){QE("c2",3!=c);QE("c8",3!=c);QE("c1",3!=c);QE("c7",3!=c);QV(9,3==c);center();3==c?(urlvars.norefresh||(iderTimer=setInterval(onIderTimer,500)),onIderTimer()):iderTimer&&(clearInterval(iderTimer),delete iderTimer)}
function onIderTimer(){ider.m.Update&&ider.m.Update();-1==ider.m.bytesFromAmt?iderStop():QH(10,"<b>"+(ider.m.server?"Serveur":"")+"Session IDE-R </b>, Connect\u00e9,"+ider.m.bytesFromAmt+" dans,"+ider.m.bytesToAmt+" en dehors.")}var heatMapWidth=600,heatMapDividor={};
function iderSectorStats(b,c,a,d,g){var v=c?Q("cdromHeatMapCanvas"):Q("floppyHeatMapCanvas"),n=v.getContext("2d");if(0==b){heatMapDividor[c]=1;if(0<a)for(;8E3<a/heatMapDividor[c];)heatMapDividor[c]*=2;c?(QV("cdromHeatMap",a),QH("cdromHeatMapText",format("<b> CDROM </b>, les blocs font {0} octets.",2048*heatMapDividor[c]))):(QV("floppyHeatMap",a),QH("floppyHeatMapText",format("<b> Disquette </b>, les blocs font {0} octets.",512*heatMapDividor[c])))}c=heatMapDividor[c];a/=c;d/=c;g/=c;if(0==b)v.height=
function iderToggleDiskMap(b){var c="none"!=QS("iderHeatmap").display;null==b&&(b=!c);xxdialogMode&&(b=!1);QS("iderHeatmap").display=b?"":"none"}function onIderDialogPrompt(b,c,a){iderCodeBlock&&(document.body.removeChild(iderCodeBlock),delete iderCodeBlock);c.js&&(b=document.createElement("script"),b.text=c.js,iderCodeBlock=document.body.appendChild(b));setDialogMode(11,"Redirection de stockage",a?a:3,onIderDialogPromptOk,c.html)}
function onIderDialogPromptOk(b){1==b?window.iderServerCall?ider.m.dialogPrompt(window.iderServerCall()):ider.m.dialogPrompt():iderStop()}function iderServerStart(){xxdialogMode||(iderStop(),ider=CreateAmtRemoteServerIder(),null!=ider&&(ider.onStateChanged=onIderStateChange,ider.m.sectorStats=iderSectorStats,ider.m.onDialogPrompt=onIderDialogPrompt,ider.tlsv1only=amtstack.wsman.comm.tlsv1only,ider.Start(currentMeshNode._id,16994,"*","*",0)))}
var xxRemoteAccess=null,xxEnvironementDetection=null,xxCiraServers=null,xxUserInitiatedCira=null,xxUserInitiatedEnabledState={32768:"d\u00e9sactiv\u00e9",32769:"BIOS activ\u00e9",32770:"Activation du syst\u00e8me d'exploitation",32771:"BIOS et OS activ\u00e9s"},xxRemoteAccessCredentiaLinks=null,xxMPSUserPass=null,xxPolicies=null;
function PullRemoteAccess(){var b="*AMT_EnvironmentDetectionSettingData AMT_ManagementPresenceRemoteSAP AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule *AMT_UserInitiatedConnectionService AMT_MPSUsernamePassword".split(" ");11<amtversion&&b.push("*IPS_HTTPProxyService","IPS_HTTPProxyAccessPoint");amtstack.BatchEnum(null,b,processRemote1)}
function processRemote1(b,c,a,d){if(11<amtversion&&400==d){d=200;400==a.IPS_HTTPProxyAccessPoint.status&&deletea.IPS_HTTPProxyAccessPoint;400==a.IPS_HTTPProxyService.status&&deletea.IPS_HTTPProxyService;for(vargina)200!=a[g].status&&(d=a[g].status)}if(400!=d&&!errcheck(d,b)&&void0!=a.AMT_UserInitiatedConnectionService&&void0!=a.AMT_UserInitiatedConnectionService.response){QV("go17",!0);xxRemoteAccess=a;xxEnvironementDetection=a.AMT_EnvironmentDetectionSettingData.response;xxEnvironementDetection.DetectionStrings=
MakeToArray(xxEnvironementDetection.DetectionStrings);xxCiraServers=a.AMT_ManagementPresenceRemoteSAP.responses;xxUserInitiatedCira=a.AMT_UserInitiatedConnectionService.response;xxRemoteAccessCredentiaLinks=a.AMT_RemoteAccessCredentialContext.responses;xxMPSUserPass=a.AMT_MPSUsernamePassword.responses;xxPolicies={User:[],Alert:[],Periodic:[]};for(g in a.AMT_RemoteAccessPolicyAppliesToMPS.responses)c=a.AMT_RemoteAccessPolicyAppliesToMPS.responses[g],b=Clone(getItem(xxCiraServers,"Name",getItem(c.ManagedElement.ReferenceParameters.SelectorSet.Selector,
function updateRemoteAccess(){if(null!=xxEnvironementDetection){var b,c="d\u00e9sactiv\u00e9",a=xxRemoteAccess.IPS_HTTPProxyService&&xxRemoteAccess.IPS_HTTPProxyAccessPoint;xxEnvironementDetection.DetectionStrings&&0<xxEnvironementDetection.DetectionStrings.length&&(c="Activ\u00e9e,"+xxEnvironementDetection.DetectionStrings.length+""+(1<xxEnvironementDetection.DetectionStrings.length?"domains":"domain"));b=""+TableStart();b+=TableEntry("D\u00e9tectiond'environnement",addLink(c,"editEnvironmentDetection()"));
b+=TableEntry("Options d'initiation de l'utilisateur",addLinkConditional(xxUserInitiatedEnabledState[xxUserInitiatedCira.EnabledState],"editUserInitiatedCira()",xxAccountAdminName));c="<i>Aucun</i>";if(0<xxPolicies.User.length){varc="",d;for(dinxxPolicies.User)0<c.length&&(c+=","),c+=xxPolicies.User[d].AccessInfo,1==xxPolicies.User[d].MpsType&&(c+="(CILA)")}b+=TableEntry("Connexioniniti\u00e9eparl'utilisateur",addLinkConditional(c,'editMpsPolicy("User")',xxAccountAdminName));c="<i>Aucun</i>";
"PolicyRuleName","P\u00e9riodique");if(g){var v=atob(g.ExtendedData);0==ReadInt(v,0)&&(c+=format(", chaque {0} seconde",ReadInt(v,4)));1==ReadInt(v,0)&&(g=ReadInt(v,4),v=ReadInt(v,8),10>v&&(v="0"+v),c+=", at "+g+":"+v+" daily")}b+=TableEntry("Connexion p\u00e9riodique",addLinkConditional(c,'editMpsPolicy("Periodic")',xxAccountAdminName));b+=TableEnd();b=b+"<br>"+TableStart2();b+="<tr><tdclass=r1style=padding-left:15px><br>G\u00e9rez les serveurs de gestion \u00e0 distance Intel® AMT.<br><br>";
if(0==xxCiraServers.length)b+="<divstyle=padding-left:15px><br><i>Aucun serveur distant trouv\u00e9.</i></div><br>";else for(d in xxCiraServers)c=":"+xxCiraServers[d].Port,xxCiraServers[d].CN&&(c+=", "+xxCiraServers[d].CN),b+="<divclass=itemBaronclick=showServerDetails("+d+")><divstyle=padding-top:3px><b>"+xxCiraServers[d].AccessInfo+"</b>"+EscapeHtml(c)+"</div></div>";if(a)if(b+="<br>G\u00e9rez les proxys HTTP utilis\u00e9s pour les connexions de gestion.<br><br>",c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses,
0==c.length)b+="<divstyle=padding-left:15px><br><i>Aucun proxy configur\u00e9.</i></div><br>";else for(d in c)b+="<divclass=itemBaronclick=showProxyDetails("+d+")><divstyle=padding-top:3px><b>"+EscapeHtml(c[d].AccessInfo)+":"+c[d].Port+"</b> / "+EscapeHtml(c[d].NetworkDnsSuffix)+"</div></div>";d="";xxAccountAdminName&&(d=AddButton("Ajouter un serveur ...","AddRemoteAccessServer()"),a&&(d+=AddButton("Ajouter un proxy ...","AddRemoteAccessProxy()")));b+="<br><tdclass=r1>"+TableEnd(AddRefreshButton("PullRemoteAccess()")+
function editMpsPolicy(b){var c="",a=11<amtversion||11==amtversion&&6<=amtversionmin,d=xxEditMpsPolicyType=b;"User"==d&&(d="Initi\u00e9parl'utilisateur");vard=getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",d),c=c+"<divstyle=height:26px><selectid=d2server1style=float:right;width:206pxonchange=editMpsPolicyUpdate()><optionvalue=-1>(Aucun)",g;for(g in xxCiraServers)c+="<optionvalue="+g+""+(xxPolicies[b][0]&&xxPolicies[b][0].Name==xxCiraServers[g].Name?"selected":
c+="<optionvalue=-1>(Aucun)";for(g in xxCiraServers)c+="<optionvalue="+g+""+(xxPolicies[b][1]&&xxPolicies[b][1].Name==xxCiraServers[g].Name?"selected":"")+">"+xxCiraServers[g].AccessInfo;c+="</select><div>Serveur secondaire</div></div>";a&&(c+="<divstyle=height:26px><selectid=d2server2cirastyle=float:right;width:206pxonchange=editMpsPolicyUpdate()><optionvalue=0>ACEI - Externe<optionvalue=1"+(xxPolicies[b][1]&&1==xxPolicies[b][1].MpsType?"selected":"")+">CILA - Interne</select><div>Type MPS secondaire</div></div>")}g=
0;d&&(g=d.TunnelLifeTime);c+="<divstyle=height:26px><inputid=d2lifetimestyle=float:right;width:200pxonchange=editMpsPolicyUpdate()value="+g+">";c+="<div>Dur\u00e9e de vie du tunnel (secondes)</div></div>";"Periodic"==b&&(a=0,g=3600,d&&(d=atob(d.ExtendedData),a=ReadInt(d,0),g=ReadInt(d,4),1==a&&(d=ReadInt(d,8),10>d&&(d="0"+d),g+=":"+d)),c+="<divstyle=height:26px><selectid=d2ttypestyle=float:right;width:206pxonchange=editMpsPolicyUpdate()>",c+="<optionvalue=0"+(0==a?"selected":"")+">P\u00e9riodique, intervalle de temps<optionvalue=1"+
(1==a?" selected":"")+">Moment de la journ\u00e9e, une fois par jour",c+="</select><div>Type de d\u00e9clencheur</div></div><divstyle=height:26px><inputid=d2timerstyle=float:right;width:200pxonkeyup=editMpsPolicyUpdate()value="+g+"><divid=ttypelabel></div></div>");setDialogMode(11,format("{0} Connexion",b),3,editMpsPolicyOk,c);editMpsPolicyUpdate()}
function editMpsPolicyUpdate(){var b=11<amtversion||11==amtversion&&6<=amtversionmin,c=1>=xxCiraServers.length||-1==Q("d2server1").value||Q("d2server1").value!=Q("d2server2").value;if(1==c&&"Periodic"==xxEditMpsPolicyType&&1==Q("d2ttype").value){var a=Q("d2timer").value.split(":");if(2!=a.length)c=!1;else{var d=parseInt(a[0]),a=parseInt(a[1]);if(0>d||23<d||0>a||59<a)c=!1}}QE("c54",c);1<xxCiraServers.length&&QE("d2server2",-1!=Q("d2server1").value);"Periodic"==xxEditMpsPolicyType&&(QE("d2timer",
-1!=Q("d2server1").value),QH("ttypelabel",0==Q("d2ttype").value?"Intervalle de d\u00e9clenchement (secondes)":"Heure de la journ\u00e9e (HH: MM)"),QE("d2ttype",-1!=Q("d2server1").value));QE("d2lifetime",-1!=Q("d2server1").value);b&&(QE("d2server1cira",-1<Q("d2server1").value),1<xxCiraServers.length&&QE("d2server2cira",-1<Q("d2server1").value&&-1<Q("d2server2").value))}
function editMpsPolicyOk(){var b=xxEditMpsPolicyType;"User"==b&&(b="User Initiated");getItem(xxRemoteAccess.AMT_RemoteAccessPolicyRule.responses,"PolicyRuleName",b)?amtstack.Delete("AMT_RemoteAccessPolicyRule",{PolicyRuleName:b},editMpsPolicyOk2):editMpsPolicyOk2()}
function editEnvironmentDetection(b){1!=b&&(editEnvironmentDetectionTmp=xxEnvironementDetection.DetectionStrings?Clone(xxEnvironementDetection.DetectionStrings):[]);var c="";xxAccountAdminName&&(c+="Entrez jusqu'\u00e0 5 suffixes de domaine intranet. Si l'ordinateur se trouve en dehors de ces domaines, les ports locaux Intel® AMT seront ferm\u00e9s et les connexions au serveur distant seront actives.<br><br>");0==editEnvironmentDetectionTmp.length&&(c+="<i>Aucun domaine intranet, d\u00e9tection de l'environnement d\u00e9sactiv\u00e9e.</i><br>");
for(var a in editEnvironmentDetectionTmp)c+="<divclass=itemBarstyle=margin-right:0><divstyle=float:right>"+AddButton2("Retirer","editEnvironmentDetectionRemove("+a+")")+'</div><divstyle=padding-top:3px;max-width:260px;overflow:hiddentitle="'+editEnvironmentDetectionTmp[a]+'"><b>'+editEnvironmentDetectionTmp[a]+"</b></div></div>";xxAccountAdminName&&5>editEnvironmentDetectionTmp.length&&(c+="<br><inputid=edInputplaceholder=intranet.orgstyle=width:276pxonkeyup=edInputChg()maxlength=63><inputtype=buttonid=edAddvalue=Addstyle=width:80px;margin-left:5pxonclick=editEnvironmentDetectionAdd()>");
function editEnvironmentDetectionDlg2(b,c,a,d){200!=d?messagebox("D\u00e9tection d'environnement",format("\u00c9chec de l'ajout du serveur, \u00e9tat {0}",d)):a.Body.ReturnValue&&0!=a.Body.ReturnValue?messagebox("D\u00e9tection d'environnement",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}function edInputChg(){5>editEnvironmentDetectionTmp.length&&QE("edAdd",0<Q("edInput").value.length)}
function editEnvironmentDetectionAdd(){editEnvironmentDetectionTmp.push(Q("edInput").value);editEnvironmentDetection(1)}function editEnvironmentDetectionRemove(b){editEnvironmentDetectionTmp.splice(b,1);editEnvironmentDetection(1)}
function editUserInitiatedCira(){if(!xxdialogMode){var b="",c;for(c in xxUserInitiatedEnabledState)b+="<inputtype=radioname=d11id=wl"+c+"value="+c+""+(xxUserInitiatedCira.EnabledState==c?"checked":"")+">"+xxUserInitiatedEnabledState[c]+"<br>";setDialogMode(11,"Tunnel initi\u00e9 par l'utilisateur",3,editUserInitiatedCiraDlg,b)}}
function editUserInitiatedCiraDlg(){amtstack.AMT_UserInitiatedConnectionService_RequestStateChange(document.querySelector("input[name=d11]:checked").value,null,editUserInitiatedCiraDlg2)}function editUserInitiatedCiraDlg2(b,c,a,d){200==d&&amtstack.Get("AMT_UserInitiatedConnectionService",editUserInitiatedCiraDlg3,0,1)}function editUserInitiatedCiraDlg3(b,c,a,d){200==d&&(xxUserInitiatedCira=a.Body,updateRemoteAccess())}var xxShowServerDetailsHandle;
function showServerDetails(b){xxShowServerDetailsHandle=b;var c=xxCiraServers[b],a;a=""+addHtmlValue("Nom d'acc\u00e8s",c.AccessInfo);c.Port&&(a+=addHtmlValue("Port",c.Port));c.CN&&(a+=addHtmlValue("Nom commun",c.CN));if(c=getElementWithContextSelectorValue(xxRemoteAccessCredentiaLinks,c.Name))c=c.ElementInContext.ReferenceParameters.SelectorSet.Selector.Value,0<c.indexOf("Username")?(a+=addHtmlValue("typed'identification","TLSutilisateuretpasse/serveur"),a+=addHtmlValue("IDdistant",getInstance(xxMPSUserPass,
c).RemoteID)):(a+=addHtmlValue("type d'identification","Certificat / TLS d'authentification mutuelle"),c=getInstance(xxCertificates,c),a+=addHtmlValue("Nom du certificat",parseCertName(c.Subject).CN));c=1;xxAccountAdminName&&(c=5);setDialogMode(11,"Serveur distant #"+(b+1),c,showServerDetailsOk,a)}
function getElementWithContextSelectorValue(b,c){for(var a in b){b[a].ElementProvidingContext.ReferenceParameters.SelectorSet.Selector=MakeToArray(b[a].ElementProvidingContext.ReferenceParameters.SelectorSet.Selector);for(var d in b[a].ElementProvidingContext.ReferenceParameters.SelectorSet.Selector)if(b[a].ElementProvidingContext.ReferenceParameters.SelectorSet.Selector[d].Value==c)return b[a]}return null}
function showServerDetailsOk(b){2==b&&amtstack.Delete("AMT_ManagementPresenceRemoteSAP",{Name:xxCiraServers[xxShowServerDetailsHandle].Name},showServerDetailsOk2)}function showServerDetailsOk2(b,c,a,d){408==d?messagebox("Suppression du serveur distant","Impossible de supprimer le serveur, acc\u00e8s refus\u00e9."):PullRemoteAccess()}function parseCertName(b){var c={},a=b.split(","),d;for(d in a)b=a[d].indexOf("="),c[a[d].substring(0,b)]=a[d].substring(b+1);return c}
function showProxyDetails(b){var c=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[b],a=addHtmlValue("Nom d'acc\u00e8s",c.AccessInfo+":"+c.ProxyPort),a=a+addHtmlValue("Suffex DNS",c.NetworkDnsSuffix),a=a+addHtmlValue("Type de proxy",["Administrator","Operating system"][c.Type]),c=1;xxAccountAdminName&&(c=5);setDialogMode(11,"Http proxy #"+(b+1),c,showProxyDetailsOk,a,b)}
function showProxyDetailsOk(b,c){var a=xxRemoteAccess.IPS_HTTPProxyAccessPoint.responses[c];2==b&&amtstack.Delete("IPS_HTTPProxyAccessPoint",{Name:a.Name},showProxyDetailsOk2)}function showProxyDetailsOk2(b,c,a,d){408==d?messagebox("Suppression du proxy HTTP","Impossible de supprimer le proxy HTTP, acc\u00e8s refus\u00e9."):PullRemoteAccess()}
function AddRemoteAccessProxy(){var b;b='<divstyle=height:26px><selectid=d2typestyle=float:right;width:206pxonchange=AddRemoteAccessProxyUpdate()><optionvalue=2>Nom d\'h\u00f4te FQDN<optionvalue=3>Adresse IPv4<optionvalue=4>Adresse IPv6</select><div>Type de connexion</div></div><divstyle=height:26px><inputid=d2hoststyle=float:right;width:200pxmaxlength=255onkeyup=AddRemoteAccessProxyUpdate()><divid=d2typespan></div></div><divstyle=height:26px><inputid=d2portonkeypress="return (event.charCode == 0 || (event.charCode >= 48 && event.charCode <= 57))"style=float:right;width:200pxonkeyup=AddRemoteAccessProxyUpdate()><div>Port</div></div>';b+=
"<divstyle=height:26px><inputid=d2domainstyle=float:right;width:200pxmaxlength=191onkeyup=AddRemoteAccessProxyUpdate()><div>Suffixe DNS</div></div>";setDialogMode(11,"Ajouter un proxy HTTP",3,AddRemoteAccessProxyOk,b);AddRemoteAccessProxyUpdate()}
function AddRemoteAccessProxyUpdate(){var b=0!=Q("d2host").value.length&&0!=Q("d2domain").value.length;if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;QE("c54",b);QH("d2typespan",["","","FQDN/nomd'h\u00f4te","AdresseIPv4","AdresseIPv6"][Q("d2type").value])}functionAddRemoteAccessProxyOk(){amtstack.IPS_HTTPProxyService_AddProxyAccessPoint(Q("d2host").value,Q("d2type").value,parseInt(Q("d2port").value),Q("d2domain").value,AddRemoteAccessProxyOk2)}
function AddRemoteAccessProxyOk2(b,c,a,d){200!=d?messagebox("Ajouter un serveur proxy","\u00c9chec de l'ajout du proxy, \u00e9tat"+d):0!=a.Body.ReturnValue?messagebox("Ajouter un serveur proxy",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
function AddRemoteAccessServer(){var b=[],c;for(c in xxCertificates)xxCertificates[c].XPrivateKey&&b.push(xxCertificates[c]);var a;a="<divstyle=height:26px><selectid=d2typestyle=float:right;width:206pxonchange=AddRemoteAccessServerUpdate()><optionvalue=201>Nom d'h\u00f4te FQDN<optionvalue=3>Adresse IPv4</select><div>Type de connexion</div></div><divstyle=height:26px><inputid=d2namestyle=float:right;width:200pxonkeyup=AddRemoteAccessServerUpdate()><divid=d2lname></div></div>";a+='<divstyle=height:26px><inputid=d2portonkeypress="return (event.charCode == 0 || (event.charCode >= 48 && event.charCode <= 57))"style=float:right;width:200pxvalue=4433onkeyup=AddRemoteAccessServerUpdate()><div>Port de serveur</div></div>';
a+="<divstyle=height:26pxid=d2ucn><inputid=d2cnstyle=float:right;width:200pxonkeyup=AddRemoteAccessServerUpdate()><div>Nom commun du serveur</div></div>";a+="<divstyle=height:26px><selectid=d2authstyle=float:right;width:206pxonchange=AddRemoteAccessServerUpdate()>";0<b.length&&(a+="<optionvalue=1>Certificat");a+="<optionvalue=2>Identifiant Mot de passe</select><div>Type d'identification</div></div>";a+="<spanid=d2utype>";a+="<divstyle=height:26px><inputid=d2userstyle=float:right;width:200pxonkeyup=AddRemoteAccessServerUpdate()><div>Nom d'utilisateur</div></div>";
a+="<divstyle=height:26px><inputid=d2passstyle=float:right;width:200pxonkeyup=AddRemoteAccessServerUpdate()><div>Mot de passe fort</div></div>";a+="</span>";a+="<spanid=d2ctype>";a+="<divstyle=height:26px><selectid=d2certstyle=float:right;width:206pxonchange=AddRemoteAccessServerUpdate()>";for(c in b)a+="<optionvalue="+b[c].InstanceID.substring(34)+">"+parseCertName(b[c].Subject).CN;a+="</select><div>Certificat</div></div></span>";setDialogMode(11,"Ajouter un serveur distant",3,AddRemoteAccessServerOk,
a);AddRemoteAccessServerUpdate()}
function AddRemoteAccessServerOk(){var b,c,a,d;1==Q("d2auth").value?b='<Addressxmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParametersxmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURIxmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyCertificate</ResourceURI><SelectorSetxmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><SelectorName="InstanceID">Intel(r) AMT Certificate: Handle: '+Q("d2cert").value+
function AddRemoteAccessServerOk2(b,c,a,d){200!=d?messagebox("Ajouter un serveur Internet",format("\u00c9chec de l'ajout du serveur, \u00e9tat {0}",d)):0!=a.Body.ReturnValue?messagebox("Ajouter un serveur Internet",a.Body.ReturnValueStr.replace(/_/g," ")):PullRemoteAccess()}
function AddRemoteAccessServerUpdate(){var b=0!=Q("d2name").value.length;3==Q("d2type").value&&1==b&&(b=0!=Q("d2cn").value.length);2==Q("d2auth").value&&1==b&&(b=0!=Q("d2user").value.length&&passwordcheck(Q("d2pass").value));if(0==Q("d2port").value.length||65535<parseInt(Q("d2port").value))b=!1;if(-1!=Q("d2name").value.indexOf(":")||3==Q("d2type").value&&-1!=Q("d2cn").value.indexOf(":"))b=!1;QH("d2lname",201==Q("d2type").value?"Nomd'h\u00f4te":"AdresseIPv4");QV("d2utype",2==Q("d2auth").value);QV("d2ucn",
function showEditNameDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_GeneralSettings.response.HostName,a=amtsysstate.AMT_GeneralSettings.response.DomainName;null!=a&&0<a.length&&(c+="."+a);c='<br><divstyle=height:26px><inputid=d11namevalue="'+c+'"style=float:right;width:200px><div>Nom et domaine</div></div>';1==b&&(b=1==amtsysstate.AMT_GeneralSettings.response.SharedFQDN,c+="<divstyle=height:26px><selectid=d11fqdnstyle=float:right;width:200px><optionvalue=true"+(b?"selected":"")+'>Partag\u00e9, comme OS<optionvalue="false"'+
(b?"":"selected")+">D\u00e9di\u00e9, diff\u00e9rent de l'OS</select><div>Partage de noms</div></div>");setDialogMode(11,"Nom de l'ordinateur",3,editNameDlgOk,c)}}
function editNameDlgOk(){var b=Q("d11name").value,c=b.indexOf("."),a="";0<=c&&(a=b.substring(c+1),b=b.substring(0,c));c=Clone(amtsysstate.AMT_GeneralSettings.response);c.HostName=b;c.DomainName=a;Q("d11fqdn")&&(c.SharedFQDN=d11fqdn.value);amtstack.Put("AMT_GeneralSettings",c,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}function computerNameGet(b,c,a,d){200==d&&(amtsysstate.AMT_GeneralSettings.response=a.Body,updateSystemStatus())}
function showEditDnsDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,c=0;1==b.DDNSUpdateByDHCPServerEnabled&&(c=1);1==b.DDNSUpdateEnabled&&(c=2);c36.value=c;c37.value=b.DDNSPeriodicUpdateInterval;c38.value=b.DDNSTTL;showEditDnsDlgChange();setDialogMode(23,"Client DNS dynamique",3,showEditDnsDlgOk)}}
function showEditDnsDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response);b.DDNSUpdateEnabled=2==c36.value?!0:!1;b.DDNSUpdateByDHCPServerEnabled=1==c36.value?!0:!1;2==c36.value&&(b.DDNSPeriodicUpdateInterval=c37.value,b.DDNSTTL=c38.value);amtstack.Put("AMT_GeneralSettings",b,function(){amtstack.Get("AMT_GeneralSettings",computerNameGet,0,1)},0,1)}
function showEditDnsDlgChange(){QE("c37",2==c36.value);QE("c38",2==c36.value)}function showFeaturesDlg(){!xxdialogMode&&xxAccountAdminName&&(c14.checked=amtfeatures[0],c16.checked=amtfeatures[3],c17.checked=amtfeatures[2],c18.checked=amtfeatures[1],QV("c15",null!=amtfeatures[3]),setDialogMode(9,"Caract\u00e9ristiques Intel® AMT",3,featuresDlgOk))}
function featuresDlgOk(){var b=amtsysstate.AMT_RedirectionService.response;b.ListenerEnabled=c14.checked;b.EnabledState=32768+((c17.checked?1:0)+(c18.checked?2:0));amtstack.AMT_RedirectionService_RequestStateChange(b.EnabledState,function(c,a,d,g){200!=g?messagebox("Erreur","RedirectionService, erreur RequestStateChange"+g):null!=amtfeatures[3]&&amtstack.CIM_KVMRedirectionSAP_RequestStateChange(c16.checked?2:3,0,function(a,c,d,g){200!=g?messagebox("Erreur","KVMRedirectionSAP, erreur RequestStateChange"+
g):amtstack.Put("AMT_RedirectionService",b,function(a,b,c,d){200!=d?messagebox("Erreur","Erreur PUT de RedirectionService"+d):(amtstack.Get("AMT_RedirectionService",featuresDlgGet1,0,1),amtstack.Get("CIM_KVMRedirectionSAP",featuresDlgGet2,0,1))},0,1)})})}function featuresDlgGet1(b,c,a,d){200==d&&(amtsysstate.AMT_RedirectionService.response=a.Body,updateSystemStatus())}function featuresDlgGet2(b,c,a,d){200==d&&(amtsysstate.CIM_KVMRedirectionSAP.response=a.Body,updateSystemStatus())}
function showEnableBootServiceDlg(){xxdialogMode||(null!=amtsysstate.CIM_BootService.response.EnabledState&&(QV("d26rpediv",15<amtversion),15<amtversion&&(c49.checked=amtsysstate.CIM_BootService.response.EnabledState&2,c50.checked=!c49.checked),c51.checked=amtsysstate.CIM_BootService.response.EnabledState&1,c52.checked=!c51.checked),setDialogMode(26,"BootFeatures",3,showEnableBootServiceDlgOk))}
function showEnableBootServiceDlgOk(){var b=32768+parseInt(document.querySelector("input[name=d26a]:checked").value);15<amtversion&&(b+=parseInt(document.querySelector("input[name=d26b]:checked").value));amtstack.CIM_BootService_RequestStateChange(b,null,showEnableBootServiceDlgResponse,b)}
function showEnableBootServiceDlgResponse(b,c,a,d,g){200==d?("SUCCESS"!=a.Body.ReturnValueStr&&messagebox("Boot Features Error",a.Body.ReturnValueStr),amtstack.Get("CIM_BootService",showEnableBootServiceDlgResponse2,g),PullSystemStatus()):a.Header.WsmanError?messagebox("Boot Features Error",a.Header.WsmanError.replace(/_/g," ")):messagebox("Boot Features Error","Error, Status = "+d)}
function showEnableBootServiceDlgResponse2(b,c,a,d,g){200==d&&a.Body.EnabledState!=g&&messagebox("Boot Features Error","Unable to set OCR/RPE, check that these features are enabled in BIOS.")}function showConsentDlg(){if(!xxdialogMode){var b=amtsysstate.IPS_OptInService.response.OptInRequired;c19.checked=0==b;c20.checked=1==b;c21.checked=4294967295==b;setDialogMode(10,"Consentement de l'utilisateur",3,consentDlgOk)}}
function consentDlgOk(){amtsysstate.IPS_OptInService.response.OptInRequired=document.querySelector("input[name=d10]:checked").value;amtstack.Put("IPS_OptInService",amtsysstate.IPS_OptInService.response,function(){amtstack.Get("IPS_OptInService",consentGet,0,1)},0,1)}function consentGet(b,c,a,d){200==d&&PullSystemStatus()}var ipv6addrtype="Lier l'adresse locale;Adresse locale du r\u00e9seau;Adresse globale;Configur\u00e9 par l'utilisateur;Interdit;DAD en cours;valide;obsol\u00e8te;pr\u00e9f\u00e9r\u00e9 / d\u00e9conseill\u00e9;expir\u00e9;collision;interdit".split(";");
function showIPv6AddrDlg(b,c){if(!xxdialogMode){var a=TableStart();t=c.split(",");for(var d=0;d<t.length;d+=3)a+=TableEntry("<b>"+t[d]+"</b><br><spanstyle=font-size:10px>"+ipv6addrtype[t[d+1]]+","+ipv6addrtype[+t[d+2]+5]+"</span>","");setDialogMode(11,0==b?"Adresses IPv6 pour l'interface filaire":"Adresses IPv6 pour l'interface sans fil",1,null,a+TableEnd())}}
c&&!ipv6manual;d21o2.checked=c&&ipv6manual;c31.value=isIpAddress(a.IPv6Address,"");c33.value=isIpAddress(a.DefaultRouter,"");c34.value=isIpAddress(a.PrimaryDNS,"");c35.value=isIpAddress(a.SecondaryDNS,"");setDialogMode(21,0==b?"Prise en charge IPv6 pour l'interface filaire":"Prise en charge IPv6 pour l'interface sans fil",3,function(){showIPv6StateDlgOk(b)});updateIPSetupDlg()}}
function showIPv6StateDlgOk(b){var c='<w:SelectorSet><w:SelectorName="InstanceID">Intel(r) IPS IPv6 Settings '+b+"</w:Selector></w:SelectorSet>",a=amtsysstate.IPS_IPv6PortSettings.responses[b];0==b&&(d21o1.checked&&(a.IPv6Address=a.DefaultRouter=a.PrimaryDNS=a.SecondaryDNS="::",amtstack.Put("IPS_IPv6PortSettings",a,showIPv6StateDlgDone,null,0,c)),d21o2.checked&&(a.IPv6Address=""==c31.value?"::":c31.value.toLocaleLowerCase(),a.DefaultRouter=""==c33.value?"::":c33.value.toLocaleLowerCase(),
function showPingActionDlg(){if(!xxdialogMode){var b=amtsysstate.AMT_GeneralSettings.response,b=(1==b.PingResponseEnabled)+((1==b.RmcpPingResponseEnabled)<<1);d20a.checked=0==b;d20b.checked=1==b;d20c.checked=2==b;d20d.checked=3==b;setDialogMode(20,"R\u00e9ponseIntel®AMTPing",3,showPingActionDlgOk)}}
function showPingActionDlgOk(){var b=Clone(amtsysstate.AMT_GeneralSettings.response),c=document.querySelector("input[name=d20]:checked").value;b.PingResponseEnabled=0!=(c&1);b.RmcpPingResponseEnabled=0!=(c&2);amtstack.Put("AMT_GeneralSettings",b,PullSystemStatus,0,1)}
function showIPSetupDlg(){if(!xxdialogMode&&null!=amtsysstate){var b=amtsysstate.AMT_EthernetPortSettings.responses[0];QV(68,6<amtversion);6<amtversion&&(Q("d21ipsync").checked=b.IpSyncEnabled);QV(69,!0);QV(70,!0);QV("d21o0",!1);QV("d21l0",!1);QH("d21l1","Configurationautomatique\u00e0l'aideduserveurDHCP");QH("d21l2","Configurationstatique\u00e0l'aidedesparam\u00e8tresIPv4ci-dessous");d21o1.checked=1==b.DHCPEnabled;d21o2.checked=!d21o1.checked;
function showPowerActionDlg(){xxdialogMode||(statusbox("Actions de puissance","V\u00e9rification des capacit\u00e9s ..."),amtstack.Get("AMT_BootCapabilities",powerActionResponse00,0,1))}
function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?1:2}catch(g){}amtPowerBootCapabilities=a.Body;QH("d5actionSelect","");b&2&&addOption("d5actionSelect","Power up",2);b&1&&(addOption("d5actionSelect","R\u00e9initialiser",10),addOption("d5actionSelect","Cycle de puissance",5),addOption("d5actionSelect","\u00c9teindre",8));1==amtPowerBootCapabilities.ForceDiagnosticBoot&&(b&2&&addOption("d5actionSelect","Mise sous tension du diagnostic",
300),b&1&&addOption("d5actionSelect","R\u00e9initialiser au diagnostic",301));9<amtversion&&b&1&&(addOption("d5actionSelect","R\u00e9veildusyst\u00e8med'exploitationenveille",500),addOption("d5actionSelect","\u00c9conomied'\u00e9nergiedusyst\u00e8med'exploitation",501),addOption("d5actionSelect","Soft-off",12),addOption("d5actionSelect","Red\u00e9marrageendouceur",14),addOption("d5actionSelect","Dormir",4),addOption("d5actionSelect","Hiberner",7));1==amtPowerBootCapabilities.BIOSSetup&&
(b&2&&addOption("d5actionSelect","Mettez le BIOS sous tension",100),b&1&&addOption("d5actionSelect","R\u00e9initialiser au BIOS",101));1==amtPowerBootCapabilities.SecureErase&&(b&2&&addOption("d5actionSelect","Mise sous tension pour effacement s\u00e9curis\u00e9",104),b&1&&addOption("d5actionSelect","R\u00e9initialiser pour effacer s\u00e9curis\u00e9",105));null!=amtPowerBootCapabilities.PlatformErase&&null!=amtsysstate.CIM_BootService&&32768<=amtsysstate.CIM_BootService.response.EnabledState&&amtsysstate.CIM_BootService.response.EnabledState&
2&&(b&2&&addOption("d5actionSelect","Power up to Platform Erase",106),b&1&&addOption("d5actionSelect","Reset to Platform Erase",107));b&1&&addOption("d5actionSelect","R\u00e9initialiser sur la disquette IDE-R",200);b&2&&addOption("d5actionSelect","Mettez sous tension la disquette IDE-R",201);b&1&&addOption("d5actionSelect","R\u00e9initialiser sur CD-ROM IDE-R",202);b&2&&addOption("d5actionSelect","Allumer le CD-ROM IDE-R",203);b&1&&addOption("d5actionSelect","R\u00e9initialiser \u00e0 PXE",400);b&
function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Action de puissance termin\u00e9e."):QH(60,format("Erreur d'action d'alimentation # {0}.",g));setDialogMode(1,"Action de puissance",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Confirmer l'ex\u00e9cution d'Intel® Remote Secure Erase?<br>Saisissez le mot de passe d'effacement s\u00e9curis\u00e9 si n\u00e9cessaire.<br><br><divstyle=height:16px><inputtype=passwordid=rsepassmaxlength=32style=float:right;width:240px><div>Mot de passe</div></div><br><divstyle=color:red><b> AVERTISSEMENT: </b> Cela effacera les donn\u00e9es sur le syst\u00e8me distant.</div>",
function powerActionDlgRPE(b){var c;c="Confirm execution of Intel® Remote Platform Erase?<br><br><divstyle=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><inputid=rpef2type=checkboxonchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><inputid=rpef6type=checkboxonchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&
a.push("<label><inputid=rpef25type=checkboxonchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><inputid=rpef26type=checkboxonchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><inputid=rpef31type=checkboxonchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br/>Select the actions to take:<br/><br/><divstyle=margin-left:16px>{0}</div><br/>",a.join("<br/>")));
c+="<divid=rpessdpassstyle=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<inputid=rpessdpassxstyle=width:210pxmaxlength=64type=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)}
function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,g=[1,2,6,25,26,31],v;for(v in g)d&1<<g[v]&&Q("rpef"+g[v]).checked&&(a+=1<<g[v]);d=makeUefiBootParam(1,a,4);g=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),g++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),g++);platfromEraseTLV={tlv:btoa(d),tlvlen:g};c?(statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
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(),void0!=ider&&3==ider.state&&iderStop());statusbox("Actiondepuissance","V\u00e9rificationdel'\u00e9tat...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);varc=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=
function showAdvPowerDlg(){try{Q("c39").value=2==amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState?10:2}catch(b){}QV("d24dBiosPause",1==amtPowerBootCapabilities.BIOSPause);QV("d24dBiosSecureBoot",1==amtPowerBootCapabilities.BIOSSecureBoot);QV("d24dReflashBios",1==amtPowerBootCapabilities.BIOSReflash);QV("d24dBiosSetup",1==amtPowerBootCapabilities.BIOSSetup);QV("ForceDVDBootOption",1==amtPowerBootCapabilities.ForceCDorDVDBoot);QV("ForceDiagBootOption",1==amtPowerBootCapabilities.ForceDiagnosticBoot);
function showAdvPowerDlgChange(){QV("idd_d24IDERBootDevice",Q("d24UseIDER").checked);QV("idd_d24RSEPass",Q("d24SecureErase")?Q("d24SecureErase").checked:!1);var b=500<=Q("c39").value&&600>Q("c39").value;QE("c41",!b);QE("c43",!b);QE("idd_d24IDERBootDevice",!b);QE("c45",!b);QE("idd_d24RSEPass",!b);QE("c54",!0)}
function showAdvPowerDlgOk(){var b=Q("c39").value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,g){200==g?QH(60,"Action de puissance termin\u00e9e."):QH(60,format("Erreur d'action d'alimentation # {0}.",g));setDialogMode(1,"Action de puissance",0);setTimeout(function(){setDialogMode(0)},1300)}):(AvdPowerDlg={},AvdPowerDlg.Action=Q("c39").value,AvdPowerDlg.BIOSPause=Q("d24BiosPause").checked,AvdPowerDlg.BIOSSecureBoot=
(AvdPowerDlg.RSEPassword=Q("d24rsepass").value),!0===AvdPowerDlg.PlatformErase?powerActionDlgRPE(!0):(statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)))}
function powerActionResponse0(b,c,a,d){200!=d?connectDesktopConsent?connectDesktop(!0):messagebox("Action de puissance",format("Erreur # {0}",d)):4294967295==a.Body.OptInRequired&&3!=a.Body.OptInState&&4!=a.Body.OptInState?2==a.Body.OptInState?(d6ConsentText.value="",setDialogMode(6,"Consentement de l'utilisateur",11,powerActionSendConsent),checkConsentDisplay(),consentChanged()):(statusbox("Action de puissance","D\u00e9marrage de l'opt-in ..."),amtstack.IPS_OptInService_StartOptIn(powerActionResponseC1,
0,1)):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentement de l'utilisateur","Le consentement de l'utilisateur n'est pas n\u00e9cessaire."):(statusbox("Action de puissance","Obtention des param\u00e8tres de d\u00e9marrage ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
function powerActionResponseC1(b,c,a,d){200!=d?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Action de puissance",format("Erreur #",d)):0!=a.Body.ReturnValue?connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):messagebox("Erreur de consentement de l'utilisateur",a.Body.ReturnValueStr.replace(/_/g," ")):(d6ConsentText.value="",setDialogMode(6,"Consentement de l'utilisateur",11,powerActionSendConsent),checkConsentDisplay(),consentChanged(),amtstack.Enum("CIM_ServiceAvailableToElement",
function powerActionSendConsent(b){0==b?amtstack.IPS_OptInService_CancelOptIn(function(){}):(statusbox("Action de puissance","Envoi du consentement de l'utilisateur ..."),amtstack.IPS_OptInService_SendOptInCode(d6ConsentText.value,powerActionResponseC2,0,1))}
function powerActionResponseC2(b,c,a,d){200!=d?messagebox("Action de puissance",format("Erreur # {0}",d)):0!=a.Body.ReturnValue?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):connectDesktopConsent?(setDialogMode(0),connectDesktop(!0)):998==d5actionSelect.value?messagebox("Consentement de l'utilisateur","Le consentement de l'utilisateur a r\u00e9ussi."):(statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ..."),amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1))}
1)&&(g.PlatformErase=!0,g.UefiBootParametersArray=platfromEraseTLV.tlv,g.UefiBootNumberOfParams=platfromEraseTLV.tlvlen),null!=g.ConfigurationDataReset&&(g.ConfigurationDataReset=!1),rsepass=null);console.log("Action de d\u00e9marrage: "+b);console.log("D\u00e9finition des param\u00e8tres de d\u00e9marrage: "+ObjectToString2(g));statusbox("Action de puissance","D\u00e9finition des param\u00e8tres de d\u00e9marrage ...");amtstack.CIM_BootConfigSetting_ChangeBootOrder(null,function(a,b,c,d){200!=d?
messagebox("Action de puissance",format("PUT CIM_BootConfigSetting_ChangeBootOrder, Error #{0}",d)+(c.Header&&c.Header.WsmanError?", "+c.Header.WsmanError:"")):0!=c.Body.ReturnValue?messagebox("Change Boot Order","(1) Change Boot Order returns "+c.Body.ReturnValueStr):amtstack.Put("AMT_BootSettingData",g,powerActionResponse2,0,1)},0,1)}}
function powerActionResponse2(b,c,a,d,g){200!=d?messagebox("Action de puissance",format("PUT AMT_BootSettingData, erreur # {0}",d)+(a.Header&&a.Header.WsmanError?", "+a.Header.WsmanError:"")):(statusbox("Action de puissance","Configuration du prochain d\u00e9marrage ..."),amtstack.SetBootConfigRole(1,powerActionResponse3x,0,1))}
function powerActionResponse3x(b,c,a,d){b=d5actionSelect.value;c=null;if(999==b)0<c41.value&&(c=["ForceCD/DVDBoot","ForcePXEBoot","ForceHard-driveBoot","ForceDiagnosticBoot"][c41.value-1]);else{if(300==b||301==b)c="ForceDiagnosticBoot";if(400==b||401==b)c="ForcePXEBoot";if(600==b||601==b)c="ForceOCRUEFIHTTPSBoot"}Q("c41").value=0;console.log("ChangeBootOrder:"+c);amtstack.CIM_BootConfigSetting_ChangeBootOrder(null==c?c:'<Addressxmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParametersxmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURIxmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootSourceSetting</ResourceURI><SelectorSetxmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><SelectorName="InstanceID">Intel(r) AMT: '+
function powerActionResponse3(b,c,a,d){console.log("powerActionResponse3("+c+","+a+","+d+")");if(!errcheck(d,b))if(0!=a.Body.ReturnValue)messagebox("Change Boot Order","(2) Change Boot Order returns "+a.Body.ReturnValueStr);else{statusbox("Action de puissance","Ex\u00e9cution d'une action de puissance ...");b=d5actionSelect.value;if(100==b||201==b||203==b||300==b||401==b||601==b)b=2;if(101==b||200==b||202==b||301==b||400==b||600==b)b=10;104==b&&(b=2);105==b&&(b=10);106==b&&(b=2);107==b&&(b=10);999==
b&&(b=AvdPowerDlg.Action);targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+b+")"),amtstack.RequestPowerStateChange(b,powerActionResponse4)):messagebox("Action de puissance","Jeu d'actions de d\u00e9marrage suivant.")}}
function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"Action de puissance termin\u00e9e."),setDialogMode(1,"Action de puissance",0),setTimeout(function(){setDialogMode(0)},1300));amtstack.Get("CIM_AssociatedPowerManagementService",powerActionResponse5,0,1)}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;
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)))}
var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
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 g=b[c].app?b[c].app:"";a[d][g]||(a[d][g]={});b[c].name&&(a[d][g][b[c].name]=b[c])}xxStorage.content=
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><tdclass=r1style=padding-left:15px><br>G\u00e9rez le stockage Intel® AMT pour cet ordinateur.<br><br>";var v,n,g="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,e;for(e in b[c][p]){q++;if(c!=v||p!=n)""!=g&&(a+=g,g="<br>"),v=c,n=p,g=""!=c?g+EscapeHtml(c+
(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()"))}
function showStorageDetails(b,c,a,d){if(!xxdialogMode){var g="",v=xxStorage.content[b][c][a];""!=b&&(g+=addHtmlValue("Vendeur",b));""!=c&&(g+=addHtmlValue("Application",c));g+=addHtmlValue("Nom",a);g+=addHtmlValue("Taille",v.size+" bytes");v.link&&(g+=addHtmlValue("Lien",v.link));setDialogMode(11,"Article de stockage",5,showStorageDetailsEx,g,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
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)}
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()}}function PushToStorage(b,c,a){var d=null;7E3<c.length&&(d=[b,c.substring(7E3)],c=c.substring(0,7E3));wsstack.comm.PerformAjax(c,PushToStorageResponse,d,0,"/amt-storage/"+b+(1==a?"?append=":""),"PUT")}
function PushToStorageResponse(b,c,a){200!=c?messagebox("Espace de rangement",format("Impossible de pousser le fichier (ERR {0}), v\u00e9rifiez que l'ordinateur est sous tension.",c)):null!=a?PushToStorage(a[0],a[1],!0):PullStorage()}
function UploadToStorage(b,c){if(!xxdialogMode){c||(c="");var a;a="<br>S\u00e9lectionnez un petit fichier \u00e0 t\u00e9l\u00e9charger vers le stockage et entrez un fournisseur, une application et un nom de fichier.<br>";a=(b?a+('<br><divstyle=height:20px><inputid=mstoragefilestyle=float:right;width:240pxreadonlydisabled=disabledvalue="'+c+'"><div>T\u00e9l\u00e9verser un fichier</div></div>'):a+"<br><divstyle=height:20px><inputtype=fileid=mstoragefilestyle=float:right;width:240pxonchange=SetStorageName()><div>Upload file</div></div>")+
'<br><divstyle=height:16px><inputid=mstoragevendorplaceholder="Vendeur"list=mstoragevendorlistmaxlength=11style=float:right;width:240px><div>Nom du vendeur</div></div>';a+='<br><divstyle=height:16px><inputid=mstorageapplicationplaceholder="App"list=mstorageapplicationlistmaxlength=11style=float:right;width:240px><div>Nom de l\'application</div></div>';a+='<br><divstyle=height:16px><inputid=mstoragefilenameplaceholder="Nom de fichier"maxlength=11style=float:right;width:240px><div>Nom de fichier</div></div>';
a+="<br><divstyle=height:16px><inputid=mstoragetypeplaceholder=application/octet-streamlist=mstoragetypeliststyle=float:right;width:240px><div>Type MIME</div></div>";a+='<br><divstyle=height:16px><inputid=mstoragelinkstyle=float:right;width:240px><divtitle="S\'il est d\u00e9fini, cr\u00e9e un lien vers ce contenu \u00e0 partir de la page Web principale">Lien</div></div><br>';a+="<datalistid=mstoragevendorlist>";for(var d in xxStorageVendors)a+='<optionvalue="'+xxStorageVendors[d]+'">';
a+="</datalist>";a+="<datalistid=mstorageapplicationlist>";for(d in xxStorageApplications)a+='<optionvalue="'+xxStorageApplications[d]+'">';a+='</datalist><datalistid=mstoragetypelist><optionvalue="application/octet-stream"><optionvalue="image/jpeg"><optionvalue="text/html"><optionvalue="text/plain"></datalist>';setDialogMode(11,"T\u00e9l\u00e9chargement de stockage",3,UploadToStorageEx,a,b);b&&SetStorageName(c)}}
function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx2,d.filename=Q("mstoragefile").value,d.readAsBinaryString(c);else{var a=Q("mstoragefile");if(1==a.files.length){var d=new FileReader;d.onload=UploadToStorageEx2;d.filename=a.files[0].name;d.readAsBinaryString(a.files[0])}}}
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=
function PullAlarms(){var b=TableStart2()+"<tr><tdclass=r1style=padding-left:15px><br>G\u00e9rez les alarmes de r\u00e9veil.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,g){if(200==g){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&&
(a+=", supprimer une fois termin\u00e9"),b+="<divclass=itemBaronclick=showAlertDetails("+c+")><divstyle=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u00c9diter...",'showAddAlarm(" + i + ")')),b+="</div><divstyle=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<divstyle=padding-left:15px><br><i>Aucune alarme de r\u00e9veil enregistr\u00e9e.</i></div><br>";d="<div> "+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Supprimer toutes les alarmes",
function prepareAlarmOccurenceTemplate(b,c,a,d,g){return'<d:AlarmTemplatexmlns:d="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService"xmlns:s="http://intel.com/wbem/wscim/1/ips-schema/1/IPS_AlarmClockOccurrence"><s:InstanceID>'+b+'</s:InstanceID><s:StartTime><p:Datetimexmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+a+'</p:Datetime></s:StartTime><s:Interval><p:Intervalxmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Interval></s:Interval><s:DeleteOnCompletion>"+
g+"</s:DeleteOnCompletion></d:AlarmTemplate>"}function RemoveAllAlarms(){setDialogMode(1,"Supprimer toutes les alarmes de r\u00e9veil",3,RemoveAllAlarmsEx,"Confirmer la suppression de toutes les alarmes de r\u00e9veil?")}function RemoveAllAlarmsEx(){var b=xxAlarms.length,c;for(c in xxAlarms)amtstack.Delete("IPS_AlarmClockOccurrence",xxAlarms[c],function(a,c,g,v){0==--b&&PullAlarms()})}
Q("d25alarm_stime").value=c.getHours()+":"+_fmttimepad(c.getMinutes())+":00",Q("d25alarm_interval").value="",Q("d25alarm_doc").value=0;setDialogMode(25,"Ajouter une nouvelle alarme",void 0!=b?7:3,showAddAlarmOk,"",b);alertDialogUpdate()}}function alertDialogUpdate(){var b=Q("d25alarm_interval").value.split("-").length,b=0<Q("d25alarm_name").value.length&&3==Q("d25alarm_sdate").value.split("-").length&&3==Q("d25alarm_stime").value.split(":").length&&(1==b||3==b);QE("c54",b)}
function showAddAlarmOk(b,c){if(2==b)showAlertDetailsDelete(b,c);else{var a=Q("d25alarm_name").value,d=Q("d25alarm_sdate").value.split("-"),g=Q("d25alarm_stime").value.split(":"),d=new Date(d[0],d[1]-1,d[2],g[0],g[1],g[2],0),d=_fmttimepad(d.getUTCFullYear())+"-"+_fmttimepad(d.getUTCMonth()+1)+"-"+_fmttimepad(d.getUTCDate())+"T"+_fmttimepad(d.getUTCHours())+":"+_fmttimepad(d.getUTCMinutes())+":"+_fmttimepad(d.getUTCSeconds())+"Z",g=Q("d25alarm_interval").value.split("-");3!=g.length&&(g=[0,0,0]);var g=
"P"+g[0]+"DT"+g[1]+"H"+g[2]+"M",v=1==Q("d25alarm_doc").value,a=prepareAlarmOccurenceTemplate(a,a,d,g,v);void 0==c?wsstack.ExecMethodXml(amtstack.CompleteName("AMT_AlarmClockService"),"AddAlarm",a,function(a,b,c,d){200!=d?messagebox("Ajouter une alarme",format("Impossible d'ajouter l'alarme. Statut: {0}. <br/> V\u00e9rifiez que l'alarme est pour une heure future.",d)):0!=c.Body.ReturnValue?messagebox("Ajouter une alarme",format("\u00c9chec de l'ajout de l'alarme {0}. <br/> V\u00e9rifiez que l'alarme est pour une heure future.",
c.Body.ReturnValueStr)):PullAlarms()}):(a=Clone(xxAlarms[c]),a.StartTime='<p:Datetimexmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+d+"</p:Datetime>",a.Interval='<p:Intervalxmlns:p="http://schemas.dmtf.org/wbem/wscim/1/common">'+g+"</p:Interval>",a.DeleteOnCompletion=v,amtstack.Put("IPS_AlarmClockOccurrence",a,function(a,b,c,d){200!=d?messagebox("Modifier l'alarme",format("Failed to change alarm. Status: {0}.<br/>Verify the alarm for at a future time.",d)):PullAlarms()},null,null,{InstanceID:a.InstanceID}))}}
function showAlertDetails(b){if(!xxdialogMode){var c=xxAlarms[b],a=new Date(c.StartTime.Datetime),a="<divstyle=text-align:left>"+addHtmlValue("Nom",c.ElementName)+addHtmlValue("Heure de r\u00e9veil",a.toLocaleString().replace(", "," at "));void 0!=c.Interval&&(a+=addHtmlValue("Interne",_fmtinterval(c.Interval.Interval)));a+=addHtmlValue("Apr\u00e8s le r\u00e9veil",1==c.DeleteOnCompletion?"Supprimer l'alarme":"Garder l'alarme")+"</div>";messagebox(format("Alarme {0}",c.ElementName),a);setDialogMode(11,
function setDialogMode(b,c,a,d,g,v){xxdialogMode=b;xxdialogFunc=d;xxdialogButtons=a;xxdialogTag=v;QE("c54",!0);QV("c54",a&1);QV("c53",a&2);QV(58,a&2);QV("c55",a&4);c&&QH(59,c);for(c=1;27>c;c++)QV("dialog"+c,c==b);QV("dialog",b);g&&(11==b?QH(63,g):QH(60,g));0!=xxdialogMode&&iderToggleDiskMap(!1)}
function center(){QS("dialog").left=(getDocWidth()-400)/2+"px";var b=0,c=Q(8).offsetHeight-(0==fullscreen?126:53);""==QS(9).display&&(b+=32);QS(14).height=Q(8).offsetHeight-b-(0==fullscreen?16:0)+"px";QS("Desk")["max-height"]=c-b+"px";QS("Desk")["max-width"]=Q(8).offsetWidth-(0==fullscreen?32:0)+"px";0!=Q(41).offsetWidth&&(QS("Desk")["max-width"]=Q(41).offsetWidth);fullscreen?(QS(14)["overflow-y"]=
function SaveJsonFile(b,c,a,d){var g="",v={},n=new Date;amtsysstate&&(g="-"+amtsysstate.AMT_GeneralSettings.response.HostName,v={webappversion:version,description:a,hostname:amtsysstate.AMT_GeneralSettings.response.HostName,localtime:Date(),utctime:(new Date).toUTCString(),isotime:(new Date).toISOString()},HardwareInventory&&(v.systemid=guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));g+="-"+n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+
n.getDate()).slice(-2)+"-"+("0"+n.getHours()).slice(-2)+"-"+("0"+n.getMinutes()).slice(-2);v[c]=d;saveAs(data2blob(JSON.stringify(v,null," ").replace(/\n/g,"\r\n")),b+g+".json")}var httpErrorTable={200:"D'accord",401:"Erreur d'authentification",408:"Erreur de temporisation",601:"Erreur d'analyse WSMAN",602:"Impossible d'analyser l'en-t\u00eate de r\u00e9ponse HTTP",603:"R\u00e9ponse d'\u00e9num\u00e9ration HTTP inattendue",604:"R\u00e9ponse de pull HTTP inattendue",997:"Domaine de r\u00e9sum\u00e9 non valide"};
function errcheck(b,c){if(null==wsstack||amtstack!=c)return!0;200!=b&&9!=b&&(setDialogMode(),wsstack.comm.FailAllError=999,amtstack.CancelAllQueries(999),QH(5,httpErrorTable[b]?httpErrorTable[b]:format("Erreur # {0}",b)),401==b&&QH(5,'Erreur d\'authentification<br/><br/><inputtype=buttonvalue="Set new credentials"onclick=meshcentral2credCallback(true)></input>'),go(100),QS(3).width=0);return 200!=b}
function goiFrame(b,c,a){if(!xxdialogMode){go(c);if(1==b.shiftKey||0==Q(13).src.endsWith(a))Q(13).src=a;QV(14,!1);QV(12,!0)}}function go(b,c){if(!xxdialogMode||1==c){QV(12,!1);QV(14,!0);QV(4,100==b);QV(6,100>b);for(var a=0;80>a;a++){QV("p"+a,a==b);var d=QS("go"+a);d&&(d["background-color"]=a==b?"#abcae1":"");d&&(d["background-color"]=a==b?"gray":"")}currentView=b;center()}}
function portsFromHost(b,c){b=decodeURIComponent(b);var a=b.split(":"),d=0==c?16992:16993,g=0==c?16994:16995;if(0==a[0].indexOf("[")){a=b.split("]:");if(1==a.length)return{host:b.substring(1,b.length-1),http:d,redir:g};if(1<a.length){varv=a[1].split(":");0<v.length&&(d=parseInt(v[0]));1<v.length&&(g=parseInt(v[1]))}return{host:a[0].substring(1),http:d,redir:g}}1<a.length&&(d=parseInt(a[1]));2<a.length&&(g=parseInt(a[2]));return{host:a[0],http:d,redir:g}}
function TableStart2(){return"<tableclass='log1 us'cellpadding=0cellspacing=0style=width:100%;border-radius:8px><tr><td><p><td>"}function TableEntry(b,c){return"<tr><tdclass=r1><p>"+b+"<tdclass=r1>"+c}function FullTable(b,c){var a=TableStart();for(i in b)i&&b[i]&&(a+=TableEntry(i,b[i]));return a+TableEnd(c)}function TableEnd(b){return"<tr><tdcolspan=2><p>"+(b?b:"")+"</table>"}function AddButton(b,c){return"<inputtype=buttonvalue='"+b+"'onclick='"+c+"'style=margin:4px>"}
function AddButton2(b,c,a){return"<inputtype=buttonvalue='"+b+"'onclick='"+c+"'"+a+">"}function AddRefreshButton(b){return'<inputtype=buttonname=refreshbtnvalue="Rafra\u00eechir"onclick=\'refreshButtons(false);'+b+"'style=margin:4px"+(0==refreshButtonsState?"disabled":"")+">"}function MoreStart(){return'<astyle=cursor:pointer;color:blueid=morexxx1onclick=QV("morexxx1",false);QV("morexxx2",true)>▼ More</a><divid=morexxx2style=display:none><br><hr>'}
function MoreEnd(){return'<astyle=cursor:pointer;color:blueonclick=QV("morexxx2",false);QV("morexxx1",true)>▲ Less</a></div>'}function getSelectedOptions(b){for(var c=[],a,d=0,g=b.options.length;d<g;d++)a=b.options[d],a.selected&&c.push(a.value);returnc}functiongetInstance(b,c){for(varainb)if(b[a].InstanceID==c)returnb[a];returnnull}functiongetItem(b,c,a){for(vardinb)if(b[d][c]==a)returnb[d];returnnull}
function guidToStr(b){return b.substring(6,8)+b.substring(4,6)+b.substring(2,4)+b.substring(0,2)+"-"+b.substring(10,12)+b.substring(8,10)+"-"+b.substring(14,16)+b.substring(12,14)+"-"+b.substring(16,20)+"-"+b.substring(20)}function getUrlVars(){for(var b,c=[],a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<a.length;d++)b=a[d].indexOf("="),0<b&&(c[a[d].substring(0,b)]=a[d].substring(b+1,a[d].length));returnc}
function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}
function getDocHeight(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight&&0!=document.documentElement.clientHeight?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}function addHtmlValue(b,c){return'<divstyle=height:20px><divstyle=float:right;width:220px;overflow:hidden><btitle="'+c+'">'+c+"</b></div><div>"+b+"</div></div>"}
function addHtmlValueNoTitle(b,c){return"<divstyle=height:20px><divstyle=float:right;width:220px;overflow:hidden>"+c+"</b></div><div>"+b+"</div></div>"}function numbersOnly(b,c){return 0==event.charCode||event.charCode==c||48<=event.charCode&&57>=event.charCode}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})}startup();