var wService_orig="sisthemispremium/Sisthemis3.aspx";function sendRemarks(r){return new Promise(function(n,c){try{let e="action=send_remarks&user=#{USER}&text=#{COMENTARIOS}&src=online".replace(/#\{USER\}/g,cfg_username).replace(/#\{COMENTARIOS\}/g,r);cfg_test_mails&&(e+="&tstmail=1"),httpPostAsync("send_remarks",wService_orig,e,!1).then(function(e){e=process_data_enviar_comentarios(e);n(e)}).catch(function(e){cursorWaiting(!1),c()})}catch(e){console_log("webService_call","sendRemarks",e),c()}})}function sendCorr_Suggestions(r,o,a,s,t,i,_){return new Promise(function(n,c){try{let e="action=send_corr_suggestions&usr=#{USER}&obra=#{OBRA}&ley=#{LEY}&anio=#{YEAR}&nodeLevel=#{NODELEVEL}&text=#{COMENTARIOS}&fracc=#{FRACCION}&corrid=#{CORR_ID}&src=online".replace(/#\{USER\}/g,cfg_username).replace(/#\{OBRA\}/g,r).replace(/#\{FRACCION\}/g,i).replace(/#\{LEY\}/g,o).replace(/#\{YEAR\}/g,a).replace(/#\{NODELEVEL\}/g,s).replace(/#\{COMENTARIOS\}/g,t).replace(/#\{CORR_ID\}/g,_);cfg_test_mails&&(e+="&tstmail=1"),httpPostAsync("send_corr_suggestions",wService_orig,e,!1).then(function(e){e=process_data_enviar_corr_sugerencias(e);n(e)}).catch(function(e){cursorWaiting(!1),c()})}catch(e){console_log("webService_call","sendCorr_Suggestions",e),c()}})}function process_data_enviar_comentarios(e){try{var n=JSON.parse(e),c=n[0].enviado;return 1==c?alerta("comentario_enviado","",[],[]):alerta("comentario_noEnviado","",[],[]),c}catch(e){console_log("webService_call","process_data_enviar_comentarios",e)}}function process_data_enviar_corr_sugerencias(e){try{var n=JSON.parse(e),c=n[0].enviado;return 1==c?alerta("sugerencia_enviado","",[],[]):alerta("sugerencia_noEnviado","",[],[]),c}catch(e){console_log("webService_call","process_data_enviar_corr_sugerencias",e)}}function review_online_sesions(e){try{var n,c,r,o;cfg_enableConcurrenceSocket&&""!=cfg_username&&cfg_stat&&(o=null,n=cfg_serverWs.replace(/(^\w+:|^)\/\//,""),c=""!=ws_apache?("/"==n[n.length-1]?n.substring(0,n.length-1):n)+"/"+ws_apache:("/"==n[n.length-1]?n.substring(0,n.length-1):n)+":"+cfg_portsocket,r=!1,o=((r="1"==cfg_use_wss?!0:r)?"wss://":"ws://")+c+"/"+cfg_username+"/online",webSocket_iniciado&&(webSocket.close(),webSocket_iniciado=!1),(webSocket=new WebSocket(o)).onopen=function(e){webSocket_iniciado=!0},webSocket.onclose=function(e){webSocket_iniciado=!1,clearTimeout(this.pingTimeout)},webSocket.onerror=function(e){},webSocket.onmessage=function(e){e=e.data.split("|");"1"==e[0]&&alerta(e[1],"alerta",[],[]).then(function(){mnuArchivo_salir()}).catch(function(e){cursorWaiting(!1),mnuArchivo_salir()})})}catch(e){console_log("webService_call","review_online_sesions",e)}}