$q.define("UNOUNO.pages.MailXchange",{statics:{priceCalculator:null,priceCalculatorTimer:null,initializePriceCalculator:function(){this.priceCalculator=new WS_ArticleCostsService(this);$q(".package-users-individual-amount").on("keyup",function(e){window.clearTimeout(this.priceCalculatorTimer);this.priceCalculatorTimer=null;
var value=$q(e.getTarget()).getValue();if(value&&!!value.length){this.priceCalculatorTimer=window.setTimeout(function(){this.priceCalculatorCall($q(e.getTarget()).getValue());}.bind(this),150);}},this);},priceCalculatorCall:function(amount){amount=amount||$q(".package-users-individual-amount").getValue()||1;
$q(".package-users-individual-amount-text").setTextContent(Number(amount)||1);this.priceCalculator.getArticleCosts("addon-mailxchange","default",String(amount));},getArticleCosts:function(result){$q(".error").hide();var regularPriceContainer=$q(".package-users-price");if(result.error){$q("#error-"+$q.string.escapeRegexpChars(result.errorCode)).show();
var alterantivePriceContainer=$q("#price-"+$q.string.escapeRegexpChars(result.errorCode));if(!!alterantivePriceContainer.length){alterantivePriceContainer.show();regularPriceContainer.hide();return ;}}regularPriceContainer.show();for(var key in result){if(result.hasOwnProperty(key)){var elements=$q("."+$q.string.escapeRegexpChars(key));
if(!!elements.length){var webfontPrice=$q.webfontPrice(result[key],{currency:false});elements.forEach(function(element){element=$q(element);var spinnerSet=element.getAncestors(".spinner");if(!!spinnerSet.length){spinnerSet.forEach(function(ancestor){ancestor=$q(ancestor);ancestor.removeClass("spinner");
});}webfontPrice.draw(element);},this);}}}},calculateCurrentUserPrice:function(){this.priceCalculatorCall();},init:function(){this.initializePriceCalculator();this.calculateCurrentUserPrice();$q("#button-ct-btn-continue-package-m").on("click",function(e){e.preventDefault();this.priceCalculatorCall(5);
window.setTimeout(function(){window.location=$q(e.getTarget()).getAncestors("a:eq(0)").getAttribute("href");},100);},this);$q("#button-ct-btn-continue-package-l").on("click",function(e){e.preventDefault();this.priceCalculatorCall(10);window.setTimeout(function(){window.location=$q(e.getTarget()).getAncestors("a:eq(0)").getAttribute("href");
},100);},this);}}});$q.ready(function(){UNOUNO.pages.MailXchange.init();});
if(!window.pfx){pfx={};}if(!pfx.net){pfx.net={};}var _browser;if(window.opera){_browser="opera";}else{if(typeof navigator.vendor=="string"&&navigator.vendor=="KDE"){_browser="khtml";}else{if(typeof navigator.product=="string"&&navigator.product=="Gecko"){_browser="gecko";}else{if(/msie/i.test(navigator.userAgent)){_browser="mshtml";
}}}}_isMshtml=_browser=="mshtml";_isGecko=_browser=="gecko";_isOpera=_browser=="opera";_isKhtml=_browser=="khtml";pfx.net.HTTPRequest=function(){this.method=arguments[0];this.url=arguments[1];this.callback=arguments[2];this.context=arguments[3];this.headers=[];this.errors=[];this.status=0;this.statusText="";
var self=this;this.customOnReadyStateChange=function(){self._customOnReadyStateChange();};this.cancelOnReadyStateChange=function(i,msg){self._cancelOnReadyStateChange(i,msg);};};pfx.net.HTTPRequest._xml=[];pfx.net.HTTPRequest._xmlThis=[];pfx.net.HTTPRequest._xmlTimer=[];pfx.net.HTTPRequest._xmlTimerCount=[];
pfx.net.HTTPRequest._xmlTimerCountMax=1000;pfx.net.HTTPRequest._xmlTimerInterval=5;pfx.net.HTTPRequest.builtin=window.XMLHttpRequest?true:false;pfx.net.HTTPRequest.IFRAMES_NEVER=-1;pfx.net.HTTPRequest.IFRAMES_FALLBACK=0;pfx.net.HTTPRequest.IFRAMES_ONLY=1;pfx.net.HTTPRequest.prototype.iframes=pfx.net.HTTPRequest.IFRAMES_FALLBACK;
pfx.net.HTTPRequest.msXmlHttp=null;if(!pfx.net.HTTPRequest.builtin&&!_isOpera&&window.ActiveXObject){var msXmlHttpList=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","MICROSOFT.XMLHTTP.1.0","MICROSOFT.XMLHTTP.1","MICROSOFT.XMLHTTP"];var obj;for(var j=0;j<msXmlHttpList.length;
j++){try{obj=new ActiveXObject(msXmlHttpList[j]);pfx.net.HTTPRequest.msXmlHttp=msXmlHttpList[j];break;}catch(e){}}}pfx.net.HTTPRequest.activeX=typeof pfx.net.HTTPRequest.msXmlHttp=="string";pfx.net.HTTPRequest.prototype.start=function(content,headers,reqId){var i=pfx.net.HTTPRequest._xml.length;if(this.iframes!=pfx.net.HTTPRequest.IFRAMES_ONLY){if(pfx.net.HTTPRequest.builtin){try{pfx.net.HTTPRequest._xml[i]=new XMLHttpRequest();
}catch(e){pfx.net.HTTPRequest._xml[i]=null;if(this.iframes==pfx.net.HTTPRequest.IFRAMES_NEVER){throw new Error("HTTP_Request: Could not create XMLHttpRequest");}}}else{if(pfx.net.HTTPRequest.activeX){try{pfx.net.HTTPRequest._xml[i]=new ActiveXObject(pfx.net.HTTPRequest.msXmlHttp);}catch(e){pfx.net.HTTPRequest._xml[i]=null;
if(this.iframes==pfx.net.HTTPRequest.IFRAMES_NEVER){throw new Error("HTTP_Request: Could not create ActiveXObject "+pfx.net.HTTPRequest.msXmlHttp);}}}}if(typeof pfx.net.HTTPRequest._xml[i]!="undefined"){if(this.callback){try{var self=this;if(pfx.net.HTTPRequest.activeX){pfx.net.HTTPRequest._xml[i].onreadystatechange=function(){if(pfx.net.HTTPRequest._xml[i].readyState==4){var reqId;
try{reqId=pfx.net.HTTPRequest._xml[i].getResponseHeader("Request-Id");}catch(e){}var content=self._getResponse(pfx.net.HTTPRequest._xml[i]);if(content!=null){self.callback.call(self.context,content,reqId);}else{if(!pfx.net.HTTPRequest._xml[i].aborted){throw new Error("Empty response");}}pfx.net.HTTPRequest._xml[i]=null;
}};}else{pfx.net.HTTPRequest._xml[i].onreadystatechange=function(){if(pfx.net.HTTPRequest._xml[i].readyState==4){try{self.status=pfx.net.HTTPRequest._xml[i].status;self.statusText=pfx.net.HTTPRequest._xml[i].statusText;}catch(e){}if(self.status&&self.status>=400){throw new Error("HTTP_Request: Asynchronous call failed"+" (status "+self.status+", "+self.statusText+")");
}var reqId;try{reqId=pfx.net.HTTPRequest._xml[i].getResponseHeader("Request-Id");}catch(e){}var content=self._getResponse(pfx.net.HTTPRequest._xml[i]);if(content!=null){self.callback.call(self.context,content,reqId);}else{if(!pfx.net.HTTPRequest._xml[i].aborted){throw new Error("Empty response");}}pfx.net.HTTPRequest._xml[i]=null;
}};}}catch(e){pfx.net.HTTPRequest._xml[i]=null;throw new Error("HTTP_Request: Onreadystatechange failed");}}try{pfx.net.HTTPRequest._xml[i].open(this.method,this.url,this.callback?true:false);for(var j=0;j<this.headers.length;j++){try{pfx.net.HTTPRequest._xml[i].setRequestHeader(this.headers[j][0],this.headers[j][1]);
}catch(e){}}if(this.callback&&typeof reqId!="undefined"){try{pfx.net.HTTPRequest._xml[i].setRequestHeader("Request-Id",reqId.toString());}catch(e){}}pfx.net.HTTPRequest._xml[i].send(content);if(!this.callback){this.status=pfx.net.HTTPRequest._xml[i].status;this.statusText=pfx.net.HTTPRequest._xml[i].statusText;
return this._getResponse(pfx.net.HTTPRequest._xml[i]);}else{return true;}}catch(e){pfx.net.HTTPRequest._xml[i]=null;throw new Error("HTTP_Request: Call failed [Cause: "+e+"]");}}}if(this.iframes!=pfx.net.HTTPRequest.IFRAMES_NEVER&&!pfx.net.HTTPRequest._xml[i]&&document.createElement){if(!this.callback){throw new Error("HTTP_Request: Synchronous call by iframe not supported");
}try{var el;if(!(_isMshtml||_isOpera)){el=document.createElement("iframe");el.style.display="none";el.name="pfxreqiframe"+i;el.id="pfxreqiframe"+i;document.body.appendChild(el);}else{el=document.createElement("div");el.style.display="none";el.id="pfxreqdiv"+i;document.body.appendChild(el);document.getElementById("pfxreqdiv"+i).innerHTML="<"+'iframe id="pfxreqiframe'+i+'" name="pfxreqiframe'+i+'" style="display:block"><'+"/iframe>";
}var url=this.url;if(reqId){url=this.setQueryParameter(url,"PFX_Request_ID",reqId);}if(this.method.toLowerCase()=="get"){el.src=url;document.body.appendChild(el);var self=this;pfx.net.HTTPRequest._xmlTimer[i]=window.setInterval(self.customOnReadyStateChange,pfx.net.HTTPRequest._xmlTimerInterval);}else{if(this.method.toLowerCase()=="post"){el=document.createElement("div");
el.style.display="none";el.id="pfxreqformdiv"+i;pfx.net.HTTPRequest._xml[i]=this.callback;pfx.net.HTTPRequest._xmlThis[i]=this;pfx.net.HTTPRequest._xmlTimer[i]=true;pfx.net.HTTPRequest._xmlTimerCount[i]=0;var self=this;window.setTimeout(function(){var elForm=document.createElement("form");elForm.action=url;
elForm.target="pfxreqiframe"+i;elForm.method=self.method;elForm.id="pfxreqform"+i;var elField=document.createElement("textarea");elField.name="message";elField.value=content;elForm.appendChild(elField);for(var h=0;h<self.headers.length;h++){elField=document.createElement("input");elField.type="hidden";
elField.name=self.headers[h][0];elField.value=self.headers[h][1];elForm.appendChild(elField);}if(_isMshtml){elField=document.createElement("input");elField.type="hidden";elField.name="insertpi";elField.value="1";elForm.appendChild(elField);}el.appendChild(elForm);document.body.appendChild(el);document.getElementById("pfxreqform"+i).target="pfxreqiframe"+i;
window.setTimeout(function(){var form=document.getElementById("pfxreqform"+i);form.submit();},1);},1);pfx.net.HTTPRequest._xmlTimer[i]=window.setInterval(self.customOnReadyStateChange,pfx.net.HTTPRequest._xmlTimerInterval);}else{throw new Error("HTTP_Request: Iframes do not support method "+this.method);
}}return"iframe";}catch(e){throw new Error("HTTP_Request: Iframes failed"+e);}}throw new Error("HTTP_Request: Failure");};pfx.net.HTTPRequest.prototype.setRequestHeader=function(field,value){this.headers.push([field,value]);};pfx.net.HTTPRequest.prototype.setQueryParameter=function(url,field,value){url+=((url.indexOf("?")+1)?"&":"?")+field+"="+encodeURI(value);
return url;};pfx.net.HTTPRequest.prototype.getQueryParameter=function(url,field){var pairs=url.substr(url.indexOf("?")+1).split("&");var param;for(var i=0;i<pairs.length;i++){param=pairs[i].split("=");if(param[0]==field){return param[1];}}return null;};pfx.net.HTTPRequest.prototype._getResponse=function(request){var ctype=request.getResponseHeader("Content-Type");
if(ctype==null){if(request.status==0){request.aborted=true;return null;}throw new Error("Missing response content type");}else{if(ctype.indexOf("text/plain")==0||ctype.indexOf("text/html")==0){return request.responseText;}else{if(ctype.indexOf("text/xml")==0){return request.responseXML;}else{throw new Error("Illegal response content type: "+ctype);
}}}};pfx.net.HTTPRequest.prototype._customOnReadyStateChange=function(){var win=null;for(var i=0;i<pfx.net.HTTPRequest._xml.length;i++){if(pfx.net.HTTPRequest._xmlTimer[i]&&pfx.net.HTTPRequest._xml[i]){try{if(pfx.net.HTTPRequest._xmlTimerCount[i]<pfx.net.HTTPRequest._xmlTimerCountMax){win=window.frames["pfxreqiframe"+i];
if(win&&win.document&&win.location.href!="about:blank"&&(_isMshtml?win.document.readyState=="complete":true)){var resdoc=_isMshtml?win.document.body:win.document;var text=resdoc.getElementsByTagName("pre")[0].firstChild.nodeValue;pfx.net.HTTPRequest._xml[i].call(pfx.net.HTTPRequest._xmlThis[i].context,text,pfx.net.HTTPRequest._xmlThis[i].getQueryParameter(win.location.href,"PFX_Request_ID"));
this.cancelOnReadyStateChange(i);}else{pfx.net.HTTPRequest._xmlTimerCount[i]++;}}else{this.cancelOnReadyStateChange(i,"too many intervals "+i+", "+pfx.net.HTTPRequest._xmlTimerCount[i]);}}catch(e){this.cancelOnReadyStateChange(i,"Exception:"+e);}}}};pfx.net.HTTPRequest.prototype._cancelOnReadyStateChange=function(i,msg){try{window.clearInterval(pfx.net.HTTPRequest._xmlTimer[i]);
pfx.net.HTTPRequest._xmlTimer[i]=null;pfx.net.HTTPRequest._xml[i]=null;pfx.net.HTTPRequest._xmlThis[i]=null;pfx.net.HTTPRequest._xmlTimerCount[i]=0;}catch(e){msg="Could not cancel";}var el;try{if(el=document.getElementById("pfxreqiframe"+i)){document.body.removeChild(el);}}catch(e){}try{if(el=document.getElementById("pfxreqdiv"+i)){document.body.removeChild(el);
}}catch(e){}try{if(el=document.getElementById("pfxreqform"+i)){document.body.removeChild(el);}}catch(e){}try{if(el=document.getElementById("pfxreqformdiv"+i)){document.body.removeChild(el);}}catch(e){}if(msg){throw new Error("HTTP_Request: "+msg);}};
if(!window.pfx){pfx={};}if(!pfx.ws){pfx.ws={};}if(!pfx.ws.json){pfx.ws.json={};}pfx.ws.json.deserialize=function(response){if(this._debug==true){alert("Response: "+response);}eval("res="+response);return res;};pfx.ws.json.serialize=function(obj){var json=null;if(obj!=null){if(obj.constructor==String){json=pfx.ws.json.escapeJSONString(obj);
}else{if(obj.constructor==Number){json=obj.toString();}else{if(obj.constructor==Boolean){json=obj.toString();}else{if(obj.constructor==Date){json="new Date("+obj.valueOf()+")";}else{if(obj.constructor==Array){var arr=[];for(var i=0;i<obj.length;i++){arr.push(pfx.ws.json.serialize(obj[i]));}json="["+arr.join(",")+"]";
}else{var arr=[];for(attr in obj){var attrObj=obj[attr];if(attrObj==null){arr.push('"'+attr+'": null');}else{if(typeof attrObj!="function"){arr.push(pfx.ws.json.escapeJSONString(attr)+":"+pfx.ws.json.serialize(attrObj));}}}json="{"+arr.join(",")+"}";}}}}}}else{json="null";}return json;};pfx.ws.json.escapeJSONChar=function(ch){if(ch=='"'||ch=="\\"){return"\\"+ch;
}else{if(ch=="\b"){return"\\b";}else{if(ch=="\f"){return"\\f";}else{if(ch=="\n"){return"\\n";}else{if(ch=="\r"){return"\\r";}else{if(ch=="\t"){return"\\t";}}}}}}var hex=ch.charCodeAt(0).toString(16);if(hex.length==1){return"\\u000"+hex;}else{if(hex.length==2){return"\\u00"+hex;}else{if(hex.length==3){return"\\u0"+hex;
}else{return"\\u"+hex;}}}};pfx.ws.json.replaceCallbackSupport=null;pfx.ws.json.escapeJSONString=function(str){if(pfx.ws.json.replaceCallbackSupport==null){if(navigator.userAgent.indexOf("Safari")!=-1){pfx.ws.json.replaceCallbackSupport=false;}else{pfx.ws.json.replaceCallbackSupport=true;}}if(pfx.ws.json.replaceCallbackSupport){return'"'+str.replace(/([^\u0020-\u007f]|[\\\"])/g,pfx.ws.json.escapeJSONChar)+'"';
}else{var escStr=[];for(var i=0;i<str.length;i++){if(str.charAt(i)=='"'||str.charAt(i)=="\\"||str.charCodeAt(i)<32||str.charCodeAt(i)>=128){escStr[i]=pfx.ws.json.escapeJSONChar(str.charAt(i));}else{escStr[i]=str.charAt(i);}}return'"'+escStr.join("")+'"';}};pfx.ws.json.BaseStub=function(service,context,scope,requestPath){this._service=service;
this._context=context;this._scope=scope;this._requestPath=requestPath;this._protocol="jsonws";this._uri=null;};pfx.ws.json.BaseStub.prototype.setService=function(service){this._service=service;this._uri=null;};pfx.ws.json.BaseStub.prototype.setContext=function(context){this._context=context;};pfx.ws.json.BaseStub.prototype.setRequestPath=function(requestPath){this._requestPath=requestPath;
this._uri=null;};pfx.ws.json.BaseStub.prototype.setDebug=function(debug){this._debug=debug;};pfx.ws.json.BaseStub.prototype.getURI=function(){if(this._uri==null){var session="";var matches=window.location.href.match(/;jsessionid=[A-Z0-9]+(\.[a-zA-Z0-9]+)?/);if(matches){session=matches[0];}var reqpath=this._requestPath+"/"+this._service;
this._uri=window.location.protocol+"//"+window.location.host+reqpath+session;}return this._uri;};pfx.ws.json.BaseStub.prototype.callMethod=function(method,args,expLen){var wsCall=new pfx.ws.json.Call(this.getURI(),this._context,this._scope,this._debug);return wsCall.invoke(method,args,expLen);};pfx.ws.json.DynamicProxy=function(service,context){pfx.ws.json.BaseStub.call(this,service,context);
this._proxySetup();};pfx.ws.json.DynamicProxy.prototype=new pfx.ws.json.BaseStub;pfx.ws.json.DynamicProxy.prototype._proxySetup=function(){var req=new pfx.net.HTTPRequest("POST",this.getURI()+"?json",this._proxySetupCB,this);req.setRequestHeader("wstype",this._protocol);req.start("",0);};pfx.ws.json.DynamicProxy.prototype._proxySetupCB=function(response){eval("response="+response);
var methods=response.result;for(var i=0;i<methods.length;i++){this._createMethod(methods[i]);}};pfx.ws.json.DynamicProxy.prototype._createMethod=function(name){var f=function(){return f.ownerObject._callMethod.call(f.ownerObject,f.methodName,arguments);};f.ownerObject=this;f.methodName=name;this[name]=f;
};pfx.ws.json.DynamicProxy.prototype._callMethod=function(method,args){var wsCall=new pfx.ws.json.Call(this.getURI(),this._context,this._debug);return wsCall.invoke(method,args);};pfx.ws.json.Call=function(uri,context,scope,debug){this._uri=uri;this._context=context;this._scope=scope;this._debug=debug;
this._opName=null;this._userCallback=null;};pfx.ws.json.Call.prototype.invoke=function(method,args,expLen){this._opName=method;var jsonReq={};jsonReq.method=method;var argLen=args.length;if(expLen){if(argLen==expLen+1){if(typeof args[argLen-1]=="function"||typeof args[argLen-1]=="object"){this._userCallback=args[argLen-1];
}else{this._requestId=args[argLen-1];}argLen=argLen-1;}else{if(argLen==expLen+2&&(typeof args[argLen-2]=="function"||typeof args[argLen-2]=="object")&&typeof args[argLen-1]=="string"){this._userCallback=args[argLen-2];this._requestId=args[argLen-1];argLen=argLen-2;}else{if(argLen!=expLen){throw new Error("Wrong number of arguments: "+argLen+" - "+expLen);
}}}}else{if(argLen>0&&typeof args[argLen-1]=="function"){this._userCallback=args[argLen-1];argLen=argLen-1;}else{if(argLen>1&&typeof args[argLen-2]=="function"){this._requestId=args[argLen-1];this._userCallback=args[argLen-2];argLen=argLen-2;}}}if(this._requestId){jsonReq.id=this._requestId;}var jsonParams=[];
for(var i=0;i<argLen;i++){jsonParams[i]=args[i];}jsonReq.params=jsonParams;var jsonStr=pfx.ws.json.serialize(jsonReq);if(this._debug==true){alert("Request: "+jsonStr);}if(this._userCallback||this._context){var httpReq=new pfx.net.HTTPRequest("POST",this._uri,this.callback,this);httpReq.setRequestHeader("Content-Type","text/plain");
httpReq.setRequestHeader("wstype","jsonws");httpReq.start(jsonStr,null,jsonReq.id);}else{var httpReq=new pfx.net.HTTPRequest("POST",this._uri);httpReq.setRequestHeader("Content-Type","text/plain");httpReq.setRequestHeader("wstype","jsonws");var response=httpReq.start(jsonStr,null,jsonReq.id);return this.callback(response);
}};pfx.ws.json.Call.prototype.callback=function(text){var res=pfx.ws.json.deserialize(text);if(res.error){var error=new Error();error.name=res.error.name;error.message=res.error.message;if(this._userCallback){this._userCallback(null,res.id,error);}else{if(this._context){this._context[this._opName].call(this._scope?this._scope:this._context,null,res.id,error);
}else{throw error;}}}else{if(this._userCallback){this._userCallback(res.result,res.id,null);}else{if(this._context){this._context[this._opName].call(this._scope?this._scope:this._context,res.result,res.id,null);}else{return res.result;}}}};
//### zip:baseLib-0.9.22.jar/PUSTEFIX-INF/script/keyevent-min.js
(function(){var a=window.qxWeb.$$qx;a.Bootstrap.setRoot({qx:window.qxWeb.$$qx,baselib:window.baselib,qui:window.qui});a.$$packageData["0"]={locales:{},resources:{},translations:{}};(function(){a.Bootstrap.define("baselib.KeyEvent",{defer:function(){if(qxWeb.env.get("qx.debug")&&window.console){var a;a="This 'key-event' module contains no longer any implementation code! It is only added for migration purpose. Please make sure to remove this module from your configuration!";window.console.warn(a)}}})})()})();

