// server injected code
/* Debug info: {"server":"WEB506","utc_time":"2016-11-18T01:05:19.880Z","method":"HTTPS","api_key":"2_DGuCTo4P8ts08o-9k7vrnlREmzgK-D2xVOrYmspM4SPv9awRLJui0F50QEcF8BMI","site_found":true} */
if (typeof gigya == 'undefined' || !gigya.isGigya) { gigya = { isGigya: true } };
if (!gigya.__initialized) {
gigya.__initialized = true;
gigya.env='prod';
gigya.gaeDomain='chat.gigya.com';
gigya.build={version:'6.5.20',time:'Mon 11/14/2016 18:48:24.65'};
if (typeof gigya.partnerSettings == 'undefined') {
    gigya.partnerSettings={"authMode":"cookie","baseDomains":"hbr.org"};
    gigya.partnerSettings.plugins={"apiDomain":"US1.gigya.com"};
}
gigya.providersConfig = {"facebook":{"appID":"115617178455940","version":"v1.0"}};
gigya.abTesting = null;
gigya.samlConfig = null;
//end server injected code
// API adapters
var gigya;
(function(b){(function(f){(function(f){(function(e){(function(e){function h(a){var d=document.getElementById("gig_sso"),d=document.createElement("iframe");b.localInfo.isIOS||b.localInfo.isIOSChrome||b.localInfo.isAndroid?(d.style.width="0px",d.style.height="0px",d.style.display="none"):(d.style.width="30px",d.style.height="10px",d.style.position="absolute",d.style.top="-1000px",d.style.left="-1000px");d.id="gig_sso_"+a;return d}var c=0;e._request=function(a,d){if(b.partnerSettings.ssoKey){var g;g=
d?b.utils.object.clone(d):{};var e;g.m=a;g.d=b.localInfo.protocol+"://"+document.location.hostname;document.location.port&&(g.d+=":"+document.location.port);g.lid=b.utils.xd._flashListenerID;"string"===typeof b.thisScript.globalConf.legacyCrossSiteMethod&&"localstorage"!==b.thisScript.globalConf.legacyCrossSiteMethod.toLowerCase()&&(g.lid=b.thisScript.globalConf.legacyCrossSiteMethod+":"+b.utils.xd._flashListenerID);g.callbackID="gig_sso_cb"+(new Date).getTime()+"_"+c++;b.utils.xd.addMessageListener(g.callbackID,
{},!1,function(g){e.parentNode.removeChild(e);g&&(g.errorCode&&"string"===typeof g.errorCode&&(g.errorCode=Number(g.errorCode)),g.expires_in&&"string"===typeof g.expires_in&&(g.expires_in=Number(g.expires_in)));b.log.addLog("SSO: About to invoke callback for "+a+" with this response",g);d&&d.callback&&d.callback(g)});g.sAPIKey=b.thisScript.APIKey;var m=b.utils.keyValue.serialize(g);e=h(g.callbackID);var n=function(){e.src="https://cdns.gigya.com/gs/sso.htm?APIKey="+b.partnerSettings.ssoKey+"&version=2#"+
m;b.utils.DOM.removeEventListener(e,"load",n)};b.utils.DOM.addEventListener(e,"load",n);b.log.addLog("SSO: Calling "+a,{SSOKey:b.partnerSettings.ssoKey,params:g});document.body?b.utils.DOM.appendToBody(e):b.utils.functions.invokeOnPageLoad(function(){return b.utils.DOM.appendToBody(e)})}else d&&d.callback&&d.callback({})};e.getGroupToken=function(a){e._request("getToken",{callback:function(b){e._storedLoginTokenExp=b.gltexp;a&&a.callback&&a.callback(b)}})};e.setGroupTokenFromResponse=function(a,b){a.sessionInfo&&
(a=a.sessionInfo);var g="string"===typeof a.expires_in&&a.expires_in?Number(a.expires_in):a.expires_in;if(0===g)g=0;else var c=void 0,c=g?1E3*g:47304E7,g=Date.now()+c;e.setGroupToken({lt:a.login_token,expiration:g,callback:b})};e.setGroupToken=function(a){a.gltexp||(a.gltexp=b.utils.cookie.get("gltexp_"+b.thisScript.APIKey));e._request("setToken",a)};e.logout=function(a){e._request("logout",a)};e.removeGroupToken=function(a){e._request("removeToken",a)};e.setLoginTokenExp=function(a){e._storedLoginTokenExp&&
a.loginTokenExp===e._storedLoginTokenExp?a.callback&&a.callback():(e._storedLoginTokenExp=a.loginTokenExp,e._request("setLoginTokenExp",a))}})(e.sso||(e.sso={}))})(f.web||(f.web={}))})(f.apiAdapters||(f.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));
(function(b){(function(f){(function(f){(function(e){var f=function(){function h(b,a,d,g,e,m){void 0===m&&(m={});this.id=b;this.baseUrl=a;this.methodName=d;this.params=g;this.callback=e;this.settings=m}h.prototype.getUrl=function(){return this.baseUrl+"/"+this.methodName};h.prototype.getAuthParams=function(){var c={};if(this.params.oauth_token)this.params.authMode="token";else if(!this.params.noAuth&&!window._isAPIProxy&&!this.params.regToken){var a=e.tokenStore.get(this.params.APIKey);if(a){this.sentLoginToken=
a;var d=b.utils.cookie.get("gltexp_"+this.params.APIKey);null!=d&&(c.loginTokenExp=d);c.login_token=a}c.authMode="cookie"}delete this.params.noAuth;b.localInfo.isAndroidBrowser&&(delete this.params.login_token,delete this.params.loginTokenExp,delete this.params.authMode);return c};return h}();e.BaseRequest=f})(f.web||(f.web={}))})(f.apiAdapters||(f.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));
var __extends=this&&this.__extends||function(b,f){function l(){this.constructor=b}for(var e in f)f.hasOwnProperty(e)&&(b[e]=f[e]);b.prototype=null===f?Object.create(f):(l.prototype=f.prototype,new l)};
(function(b){(function(f){(function(f){(function(e){e.callback=function(b,c){!c&&b&&(c=b.context);if(c){var a=e.pendingRequests[c];a&&a.handleResponse(b)}};var f=function(f){function c(){f.apply(this,arguments);this.ifrName="gigyaPostIframe_"+(new Date).getTime();this.retry=0}__extends(c,f);c.prototype.addDefaultParams=function(){this.params.format="jsonp";this.params.callback=c.callbackName;this.params.context=this.id;var a=this.getAuthParams();this.paramsLoginToken=this.params.login_token;b.utils.object.add(this.params,
a,!0);this.sentLoginToken=this.params.login_token};c.prototype.getCacheKey=function(){return this.methodName+"_"+b.utils.keyValue.serialize(this.params)};c.prototype.send=function(a){var d=this;if(!this.inProgress){e.pendingRequests[this.id]=this;this.inProgress=!0;this.params.sdk="js_"+b.build.version;this.addDefaultParams();var g=b.utils.keyValue.serialize(this.params);if(!a&&this.settings.cacheTimeout)g=this.getCacheKey(),b.utils.sessionCache.get(g,this.settings.cacheTimeout,function(a){a?(delete d.settings.cacheTimeout,
e.callback(a,d.id)):(d.inProgress=!1,d.send(!0))});else{a=0;b.localInfo.isIE&&(a=2048);var c=this.getUrl();b.events.global.dispatch({eventName:"jsonp-beforeRequest",url:c,params:this.params,level:9});4096>=c.length+1+g.length+a&&!this.settings.forcePost?b.utils.script.load(c+"?"+g,function(){e.callback({context:d.id,errorCode:500026,errorMessage:"Network_error"})}):b.utils.functions.invokeOnPageLoad(function(){var a=document.getElementById("gigyaRequestForms");null==a&&(a=document.createElement("span"),
a.id="gigyaRequestForms",a.style.display="none",b.utils.DOM.appendToBody(a));var g=d.getPostContainer();a.appendChild(g)})}}};c.prototype.createParamFormElements=function(){var a=[],d="";for(d in this.params)a=a.concat(['<textarea name="',d,'">']),"object"===typeof this.params[d]?a.push(b.utils.URL.URLEncode(b.utils.JSON.serialize(this.params[d]))):a.push(this.params[d]),a.push("</textarea>");return a.join("")};c.prototype.getPostContainer=function(){var a=this;if(!this.postContainer){var d=document.createElement("span"),
g=this.ifrName+"form",c=this.id;d.innerHTML=['<form accept-charset="UTF-8" id="',g,'" method="post" action="',this.getUrl(),"?context="+this.id+"&saveResponseID="+this.id+'" target="',this.ifrName,'">',this.createParamFormElements(),'<input name="utf8" type="hidden" value="&#x2713;" /><input type="submit" value="" /></form>'].join("");var e,f=b.utils.DOM.createElement("iframe",this.ifrName);f.setAttribute("id",this.ifrName);b.utils.DOM.addEventListener(f,"load",function(){e?a.getSavedFormResponse(c):
(window.setTimeout(function(){var a=document.getElementById(g);a&&a.submit()},10),e=!0)});d.appendChild(f);this.postContainer=d}return d};c.prototype.getSavedFormResponse=function(a){var b=this;(new c(a,this.baseUrl,"socialize.getSavedResponse",{APIKey:this.params.APIKey,saveResponseID:this.id,ucid:this.params.ucid,noAuth:!0},function(a){b.handleResponse(a)})).send()};c.prototype.getDataPendingTimeout=function(a){return 4>=a?500:8>=a?1E3:21>=a?2E3:39>=a?5E3:-1};c.prototype.handleResponse=function(a){var d=
this;this.settings.cacheTimeout&&b.utils.sessionCache.set(this.getCacheKey(),0==a.errorCode?a:null);null!=this.retryTimerID&&window.clearTimeout(this.retryTimerID);this.loaded=!0;this.inProgress=!1;100001==a.errorCode?(a=this.getDataPendingTimeout(this.retry++),0<a&&window.setTimeout(function(){d.send()},a)):(this.dispose(),this.callback(a))};c.prototype.dispose=function(){delete e.pendingRequests[this.id];this.postContainer&&b.utils.DOM.removeElement(this.postContainer);delete this.postContainer};
c.callbackName="gigya._.apiAdapters.web.callback";return c}(e.BaseRequest);e.JsonpRequest=f})(f.web||(f.web={}))})(f.apiAdapters||(f.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));
(function(b){(function(f){(function(l){(function(e){var k=function(h){function c(a,b,g,c,e,f){void 0===f&&(f={});h.call(this,a,b,g,c,e,f);this.windowName=this.methodName.replace(/\./g,"_").replace(/\//g,"")+"_"+(new Date).getTime();this.requestID=this.windowName+(new Date).getTime()}__extends(c,h);c.prototype.beforeRequest=function(){};c.prototype.afterResponse=function(a){a.dontClose&&"false"!==a.dontClose||b.utils.win.close(this.windowName);this.callback(a)};c.prototype.getAuthFlow=function(){return this.params.authFlow?
this.params.authFlow:"popup"};c.prototype.getStateString=function(){var a=b.utils.xd._flashListenerID;if(b.thisScript.globalConf.legacyCrossSiteMethod&&"localstorage"!==b.thisScript.globalConf.legacyCrossSiteMethod.toLowerCase()||b.localInfo.isIE&&window.navigator.msDoNotTrack)a=b.thisScript.globalConf.legacyCrossSiteMethod+":"+b.utils.xd._flashListenerID;var d=this.getAuthFlow(),a={domain:document.location.href.split("?")[0].split("#")[0],id:this.requestID,lid:a,messaging:b.localInfo.messagingMethod,
addUserInfo:!0};b.localInfo.isIE11&&window.indexedDB&&(a.messaging=f.MessagingMethod.LocalStorageListener);if("redirect"===d||b.localInfo.isWindowsPhone)a.sourceURL=window.top.document.location.href,this.params.redirectURL?(a.redirectURL=b.utils.URL.addParamsToURL(this.params.redirectURL,{gig_events:b.events.global.getEventsForOperation(this.methodName)}),this.params.redirectMethod&&(a.redirectMethod=this.params.redirectMethod)):a.sourceURL=b.utils.URL.addParamsToURL(a.sourceURL,{gig_events:b.events.global.getEventsForOperation(this.methodName)});
this.params.provider&&"facebook"==this.params.provider.toLowerCase()&&(a.invite=this.params.invite);(d=b.external.backplane.getChannelId())&&(a.bp_channel_url=d);return b.utils.keyValue.serialize(a)};c.prototype.getServerParamsString=function(){var a={},d;for(d in this.params)0!==d.indexOf("x_")&&null!=this.params[d]&&(a["x_"+d]=this.params[d],delete a[d]);a.x_APIKey&&(a.client_id=a.x_APIKey,delete a.x_APIKey);a.x_oauth_token&&(a.oauth_token=a.x_oauth_token,delete a.x_oauth_token);a.redirect_uri=
"/GS/AfterLogin.aspx";a.response_type=this.params.authCodeOnly?"code":"server_token";a.format="jsonp";a.x_sdk="js_"+b.build.version;(d=b.utils.cookie.get("_gigRefUid_"+this.params.APIKey))&&(a.x_refUID=d);a.state=this.getStateString();b.utils.object.add(a,this.getAuthParams());e.useAPIProxy&&e.gmidTicket&&(a.gmidTicket=e.gmidTicket);delete a.redirectURL;this.sentLoginToken=a.login_token;return b.utils.keyValue.serialize(a)};c.prototype.send=function(){var a=this;this.beforeRequest();var d=this.getServerParamsString(),
g;this.params.provider&&(g=b.socialize._getProviderByName(this.params.provider));var c={menubar:0,resizable:1,scrollbars:1,width:g?g.width:void 0,height:g?g.height:void 0};this.params.enablePopupLocation?(c.location=1,c.toolbar=1):c.toolbar=0;var e=this.methodName.split(".");b.reports.report(this.params.originalMethodName||e[e.length-1],this.params.APIKey,this.params.cid,this.params.source,this.params.sourceData,{sn:g?g.toString():null});d=this.getUrl()+"?"+d;"redirect"===this.getAuthFlow()?window.top.document.location.href=
d:(b.utils.xd.addMessageListener(this.requestID,this.params,!0,function(b){a.afterResponse(b)}),b.utils.win.open(d,this.windowName,c))};return c}(e.BaseRequest);e.OauthRequest=k})(l.web||(l.web={}))})(f.apiAdapters||(f.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));
(function(b){(function(f){(function(f){(function(e){var f=function(f){function c(){f.apply(this,arguments)}__extends(c,f);c.prototype.send=function(a){var d=this;if(e.proxyState.ready){var g=function(a){(a=b.utils.JSON.deserialize(a.data))&&a.id==d.id&&(b.utils.DOM.removeEventListener(window,"message",g),d.callback(a.response))};b.utils.DOM.addEventListener(window,"message",g);b.utils.object.add(this.params,this.getAuthParams());e.ifrAPIProxy.contentWindow.postMessage(this.json(),"https://cdns.gigya.com")}else e.proxyState.error&&
this.callback({context:this.id,errorCode:500026,errorMessage:"APIProxy error: "+e.proxyState.error})};c.prototype.json=function(){return b.utils.JSON.serialize({id:this.id,methodName:this.methodName,params:this.params,settings:this.settings})};return c}(e.BaseRequest);e.APIProxyRequest=f})(f.web||(f.web={}))})(f.apiAdapters||(f.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));
(function(b){(function(f){(function(l){(function(e){(function(k){function h(a){void 0===a&&(a=b.thisScript.APIKey);return a?"glt_"+a:"_gig_lt"}var c={};k.activeNamespaces={};k.get=function(a){void 0===a&&(a=b.thisScript.APIKey);return(a=b.utils.cookie.get(h(a)))?a.split("|")[0]:null};k.set=function(a,d,g){b.utils.localStorage.removeItem("gigyaSettings");a||(a=b.thisScript.APIKey);a?(b.utils.cookie.set("glt_"+a,d,g),b.utils.cookie.remove("gac_"+a)):b.utils.cookie.set("_gig_lt",d,g)};k.setFromGAC=function(a,
d){if(b.thisScript.APIKey){var g=b.utils.cookie.get("gac_"+b.thisScript.APIKey);g&&!a.neverTryGAC?('"'===g.charAt(0)&&'"'===g.charAt(g.length-1)&&(g=g.substring(1,g.length-1)),c[g]?d():(c[g]=!0,b.socialize.updateRefUID(),b.socialize.notifyLogin({ignoreApiQueue:!0,neverTryGAC:!0,authCode:g,APIKey:b.thisScript.APIKey,client_id:b.thisScript.APIKey},{callback:function(){b.utils.cookie.remove("gac_"+b.thisScript.APIKey);d();b.socialize.refreshUI({neverTryGAC:!0})}}))):d()}else d()};k.setFromSsoResponse=
function(a,d){void 0===d&&(d=b.thisScript.APIKey);if(0==a.errorCode){k.set(d,a.login_token,a.gltexp?b.utils.cookie.getInfiniteExpirationTimeInSeconds():a.expires_in);var g="gltexp_"+d;a.gltexp&&!b.utils.cookie.get(g)&&b.utils.cookie.set(g,a.gltexp);b.accounts.verifyLogin({include:"profile,data",extraProfileFields:"samlData",callback:function(a){b.events.global.dispatchWhenHandlerAdded({eventName:"socialize.login"},null,function(d,g){b.socialize.getUserInfo({signIDs:!0,extraFields:"samlData",callback:function(c){d||
(d={});0==a.errorCode&&0==c.errorCode?(d=f.addUserInfoToEvent(c,{eventName:"login"},!0),b.external.backplane.executeOnInit(function(){var a=b.external.backplane.getChannelId();a&&b.socialize.notifySSOLogin({bp_channel_url:a})})):d.cancel=!0;g(d)}})});b.events.global.dispatchWhenHandlerAdded({eventName:"accounts.login"},null,function(d,g){d||(d={});0==a.errorCode?(d.eventName="accounts.login",b.utils.object.extractProperties(a,d,"signature|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID|profile|data")):
d.cancel=!0;g(d)})}})}};k.remove=function(a){void 0===a&&(a=b.thisScript.APIKey);e.sso.removeGroupToken();b.utils.cookie.remove("glt_"+a);b.utils.cookie.remove("_gig_lt");b.utils.cookie.remove("gltexp_"+a)};k.migrateExisting=function(){var a=b.utils.cookie.get("_gig_lt");a&&b.thisScript.APIKey&&!k.get(b.thisScript.APIKey)&&(b.utils.cookie.remove("_gig_lt"),k.set(b.thisScript.APIKey,a))};k.getTokenParam=function(a,d){var g=b.utils.cookie.get(h(a));if(g)return g=g.split("|"),1<g.length?b.utils.keyValue.deserialize(g[1])[d]:
null}})(e.tokenStore||(e.tokenStore={}))})(l.web||(l.web={}))})(f.apiAdapters||(f.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));gigya.isGigya||(gigya.isGigya=!0);
(function(b){(function(f){(function(l){(function(e){e.newApiAdapter=function(b){return new h(b)};var k=function(){return function(){}}();e.APIProxyState=k;e.callbacks={};e.pendingRequests={};var h=function(){function c(a){this.name="Web"}c.prototype.init=function(a){var d=this;this.initAPIProxy(function(){b.utils.functions.createAlias("gigya.auth.loginToken.get",e.tokenStore.get);d.checkReturnFromURL();d.isSessionValid(void 0,function(d){!d&&b.partnerSettings.ssoKey?e.sso.getGroupToken({callback:function(b){b&&
e.tokenStore.setFromSsoResponse(b);a()}}):a()})})};c.prototype.initAPIProxy=function(a){e.ifrAPIProxy&&(b.utils.DOM.removeElement(e.ifrAPIProxy),e.ifrAPIProxy=null);this.isAPIProxyNeeded()?this.loadAPIProxy(a):this.isThirdPartyCookiesBlockCheckNeeded()?this.checkThirdPartyCookiesBlocked(a):(e.useAPIProxy=!1,a())};c.prototype.isAPIProxyNeeded=function(){e.useAPIProxy=!1;if(b.partnerSettings.ssoKey&&b.partnerSettings.customAPIDomainPrefix||"1"===b.utils.localStorage.getItem("_gig_APIProxy_enabled"))b.utils.localStorage.setItem("_gig_APIProxy_enabled",
"1"),e.useAPIProxy=!0;return e.useAPIProxy};c.prototype.isThirdPartyCookiesBlockCheckNeeded=function(){var a=b.thisScript.globalConf.bypassCookiePolicy||"whenBlockedByDefault";return("whenBlockedByDefault"===a&&b.localInfo.isSafari||"always"===a)&&!window._isAPIProxy&&b.localInfo.supportsPostMessage&&!b.partnerSettings.customAPIDomainPrefix};c.prototype.checkThirdPartyCookiesBlocked=function(a){var d=this,g,c=function(f){(f=b.utils.JSON.deserialize(f.data))&&"3pcTestResult"===f.id&&(b.utils.DOM.removeEventListener(window,
"message",c),!0===f.enabled?(e.useAPIProxy=!1,e.gmidTicket=null,a()):(b.utils.localStorage.setItem("_gig_APIProxy_enabled","1"),e.useAPIProxy=!0,d.loadAPIProxy(a)),g.parentElement.removeChild(g))};b.utils.DOM.addEventListener(window,"message",c);var f=b.localInfo.protocol+"://"+document.location.href.split("?")[0].split("#")[0].split("/")[2];g=b.utils.DOM.createHiddenIframe(("https"===b.localInfo.protocol?"https://cdns.gigya.com":"http://cdn.gigya.com")+"/gs/3PCTest.html#domain="+encodeURIComponent(f))};
c.prototype.loadAPIProxy=function(a){var d=b.localInfo.protocol+"://"+document.location.href.split("?")[0].split("#")[0].split("/")[2];e.gmidTicket=b.utils.localStorage.getItem("_gig_gmidt");var d="https://cdns.gigya.com/gs/APIProxy.html#apikey="+encodeURIComponent(b.thisScript.APIKey)+"&domain="+encodeURIComponent(d)+"&hasTicket="+(e.gmidTicket?"true":"false"),g=function(d){(d=b.utils.JSON.deserialize(d.data))&&d.apiKey==b.thisScript.APIKey&&(e.proxyState=d,e.proxyState.gmidTicket&&(e.gmidTicket=
e.proxyState.gmidTicket,b.utils.localStorage.setItem("_gig_gmidt",e.gmidTicket,86400)),b.utils.DOM.removeEventListener(window,"message",g),a())};b.utils.DOM.addEventListener(window,"message",g);e.ifrAPIProxy=b.utils.DOM.createHiddenIframe(d)};c.prototype.isSessionValid=function(a,b){void 0===a&&(a={});e.tokenStore.setFromGAC(a,function(){if(b){var g=null!=e.tokenStore.get(a.APIKey)||null!=a.oauth_token;b(g)}})};c.prototype.registerForNamespaceEvents=function(a){};c.prototype.onPluginEvent=function(a){};
c.prototype.onJSLog=function(a,b){};c.prototype.getGmidTicket=function(a){a&&a(e.useAPIProxy?e.gmidTicket:null)};c.prototype.sendRequest=function(a,b,g,c){var m=this;void 0===c&&(c={});this.beforeRequest(a,b,c);var h=this.getBaseUrl(a,b,c),k=this.getRequestId({baseUrl:h,methodName:a,params:b,settings:c});e.callbacks[k]=e.callbacks[k]||[];e.callbacks[k].push(g);if(!e.pendingRequests[k]){var l;g=function(a){m.afterResponse(l,a,function(a){m.dispatchCallbacks(k,a)})};l=e.useAPIProxy&&0!==h.indexOf("http://")?
new e.APIProxyRequest(k,h,a,b,g,c):new e.JsonpRequest(k,h,a,b,g,c);l.send();f.logoutMethods[a]&&f.logoutBehaviour.logoutBeforeServerResponse&&this.clearSession(b)}};c.prototype.clearSession=function(a,b){e.tokenStore.remove(a.APIKey);b&&b()};c.prototype.sendOauthRequest=function(a,b,g,c){var f=this;this.beforeRequest(a,b,c);var h=this.getBaseUrl(a,b,c),k=new e.OauthRequest("",h,a,b,function(a){f.afterResponse(k,a,function(a){g(a)})},c);k.send()};c.prototype.getBaseUrl=function(a,d,g){a=a.split(".");
a=g.forceGigyaDomain?b.utils.stringUtils.format("{0}.{1}",a[0],b.partnerSettings.plugins.originalApiDomain):b.partnerSettings.customAPIDomainPrefix?b.partnerSettings.customAPIDomainPrefix+"."+b.partnerSettings.baseDomain:b.utils.stringUtils.format("{0}.{1}",a[0],d.apiDomain?d.apiDomain:b.partnerSettings.plugins.apiDomain);return((e.tokenStore.get()||d.regToken||d.oauth_token)&&!d.noAuth||g.forceHttps||"https"===b.localInfo.protocol?"https://":"http://")+a};c.prototype.beforeRequest=function(a,d,g){void 0===
g&&(g={});(g.clearSession||g.clearSessionCondition&&g.clearSessionCondition(d))&&e.tokenStore.remove(d.APIKey);!b.utils.localStorage.getItem("_gig_3pc_enabled")&&b.thisScript.globalConf.enableSSOToken&&f.loginMethods[a]&&(d.includeSSOToken=!0)};c.prototype.afterResponse=function(a,b,g){var c=this;this.handleTokenResponse(a,b,function(){c.logoutSsoIfNeeded(a,b,function(){g(b)})})};c.prototype.onSDKEvent=function(a){};c.prototype.getTokenParam=function(a,b){return e.tokenStore.getTokenParam(a,b)};c.prototype.checkReturnFromURL=
function(){var a=b.utils.URL.getParamsFromURL(document.location.href);a.gig_events&&0==a.errorCode&&null!=e.tokenStore.get()&&e.sso.setGroupTokenFromResponse({errorCode:0,login_token:e.tokenStore.get(),expires_in:a.expires_in},function(d){var c=a.gig_events.split(",");-1!==b.utils.array.indexOf(c,"accounts.login")?b.accounts.getAccountInfo({extraProfileFields:"samlData",include:"profile,data,userinfo",callback:function(a){var d={errorCode:0,eventName:"accounts.login"};b.utils.object.extractProperties(a,
d,"signature|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID|profile|data");b.events.global.dispatchWhenHandlerAdded(d);-1!==b.utils.array.indexOf(c,"socialize.login")&&(a=f.addUserInfoToEvent(a,{errorCode:0,eventName:"socialize.login"},!0),b.events.global.dispatchWhenHandlerAdded(a))}}):b.socialize.getUserInfo({signIDs:!0,extraFields:"samlData",callback:function(a){for(var d=0;d<c.length;d++){var e=b._.addUserInfoToEvent(a,{errorCode:0,eventName:c[d]},!0);b.events.global.dispatchWhenHandlerAdded(e)}}})})};
c.prototype.setNewLoginTokenFromResponse=function(a,d,c){var f=d.sessionInfo?d.sessionInfo.login_token:d.login_token;if(f){var m=null!=d.sessionInfo?d.sessionInfo.expires_in:d.expires_in;(!m||0==m)&&0>a.params.sessionExpiration&&(m=b.utils.cookie.getInfiniteExpirationTimeInSeconds());e.tokenStore.set(a.params.APIKey,f,m);b.utils.cookie.remove("gltexp_"+a.params.APIKey);b.reports.trackAddressBarShares();e.sso.setGroupTokenFromResponse(d,c)}else c()};c.prototype.onInvalidTokenResponse=function(a,b){var c=
this;a.paramsLoginToken?b():e.sso.getGroupToken({callback:function(f){f&&f.login_token&&f.login_token.split("|")[0]!==a.sentLoginToken&&!a.paramsLoginToken?c.initAPIProxy(function(){e.tokenStore.setFromSsoResponse(f,a.params.APIKey);a.params.login_token=void 0;a.send()}):(e.tokenStore.remove(a.params.APIKey),a.settings.requiresSession()?b():(delete a.params.login_token,delete a.sentLoginToken,a.send()))}})};c.prototype.handleTokenResponse=function(a,d,c){var h=this;d=b.utils.object.clone(d);if(d.ssoToken){var m=
(new Date).getTime(),m=(new Date(m+3E5)).getTime();b.utils.localStorage.setItem("_gig_ssoToken",b.utils.JSON.serialize({ssoToken:d.ssoToken,exp:m}))}if(403030==d.errorCode){if(this.shouldWaitForService(a,d))return}else 409012==d.errorCode&&(e.gmidTicket=null,b.utils.localStorage.removeItem("_gig_gmidt"));a.sentLoginToken&&f.logoutMethods[a.methodName]&&0==d.errorCode&&d.logoutActiveSession&&this.clearSession(a.params);b.partnerSettings.ssoKey&&a.sentLoginToken&&0==d.errorCode&&a.params.loginTokenExp&&
e.sso.setLoginTokenExp({loginTokenExp:a.params.loginTokenExp});this.setNewLoginTokenFromResponse(a,d,function(){if(a.sentLoginToken&&403005==d.errorCode)h.onInvalidTokenResponse(a,c);else c()})};c.prototype.logoutSsoIfNeeded=function(a,d,c){var h=this;b.partnerSettings.ssoKey&&f.logoutMethods[a.methodName]&&0==d.errorCode&&d.logoutActiveSession?document.location.href!=b.partnerSettings.ssoLogoutUrl?e.sso.logout({callback:function(b){var e;void 0!==a.params.sustainLogoutURLs&&(e=!a.params.sustainLogoutURLs);
h.loadLogoutUrls(b.logoutURLs,c,{UID:d.UID,UIDSignature:d.UIDSignature,signatureTimestamp:d.signatureTimestamp},e)}}):c():c()};c.prototype.loadLogoutUrls=function(a,d,c,e){var f=0,h=a?a.split(","):[];a=function(){f++;f>h.length&&d()};for(var k=0;k<h.length;k++)if(h[k]){var l=b.utils.URL.addParamsToURL(h[k],c);this.loadLogoutUrl(l,a,e)}else a();a()};c.prototype.loadLogoutUrl=function(a,d,c){void 0===c&&(c=5E3);var e=document.createElement("iframe");e.src=a;e.style.position="absolute";e.style.top="-1000px";
e.style.left="-1000px";var f=!1,h=function(){f=!0;!1!==c&&e.parentElement.removeChild(e);d()};window.setTimeout(function(){f||h()},c);e.onload=function(){h()};b.utils.DOM.appendToBody(e)};c.prototype.shouldWaitForService=function(a,d){return a.params.retryPossible?(a.params.retryPossible=!1,b.external.facebook.runWhenLoaded(function(){a.send()}),!0):!1};c.prototype.dispatchCallbacks=function(a,d){var c=e.callbacks[a];if(c)for(var f=0;f<c.length;f++)if("function"===typeof c[f])c[f](b.utils.object.clone(d,
!0));delete e.callbacks[a]};c.prototype.getRequestId=function(a){var d=a.settings.jsSdkRequestId;if(d)return d;if(a.settings.disableCache||this.getIsForceBrowserRequest(a))return"R"+(new Date).getTime()+"_"+Math.random();var d=b.utils.object.clone(a.params),c;for(c in d)0!==c.indexOf("fb_")&&"source"!==c&&"sourceData"!==c||delete d[c];return"R"+b.utils.object.getMurmurHash(a.baseUrl+a.methodName+b.utils.object.getHash(d))};c.prototype.getIsForceBrowserRequest=function(a){return b.localInfo.isSafari||
b.localInfo.isIE10&&"accounts.getAccountInfo"===a.methodName?!0:!1};return c}();e.WebAdapter=h})(l.web||(l.web={}))})(f.apiAdapters||(f.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));
(function(b){(function(f){(function(f){(function(e){var f=function(){function e(){var c=b.utils.keyValue.deserialize(document.location.href.split("#")[1],"&",!0);this.apiKey=c.apikey;this.originDomain=c.domain;this.hasTicket="true"===c.hasTicket;this.urlScheme=0===document.location.href.indexOf("https:")?"https":"http"}e.init=function(){e.instance=new e;e.instance.init()};e.prototype.init=function(){var c=this;this.isOriginDomainValid()?this.loadIDs(function(a){if(a)c.postState({ready:!1,error:a});
else{if(c.gmid&&c.ucid)c.hasTicket?c.postState({ready:!0}):c.getGmidTicketFromServer(function(a){c.postState({ready:!0,gmidTicket:a})});else{var d,e=10,f=function(a,b,f,h,k){0!==a&&403036!==a&&--e?window.setTimeout(d,10):(c.gmid=b,c.ucid=h,c.storeIDs(function(){c.postState({ready:0==a,gmidTicket:f,error:k})}))};d=function(){return c.getIDsFromServer(f)};d()}b.utils.DOM.addEventListener(window,"message",function(a){return c.onRequest(a)})}}):this.postState({ready:!1,error:"domain_mismatch"})};e.prototype.onRequest=
function(c){var a=this;c=b.utils.JSON.deserialize(c.data);var d,e;if(c&&"object"===typeof c&&c.methodName&&c.id&&c.params){d=c.methodName;e=c.id;var f=b.utils.object.clone(c.params,!0,!0);f.gmid=this.gmid;f.ucid=this.ucid;(new b._.apiAdapters.web.JsonpRequest(e,this.getAPIBaseUrl(d),d,f,function(c){c=b.utils.JSON.serialize({id:e,response:c});b.utils.JSON.deserialize(c)||(c=b.utils.JSON.serialize({id:e,response:{errorCode:400004,errorMessage:"Invalid parameter format. One of the parameters of this request has been set with a value which is not in the expected format."}}));
window.parent.postMessage(c,a.originDomain)},c.settings)).send()}};e.prototype.isOriginDomainValid=function(){return Boolean(b._.getPageBaseDomain(this.originDomain))};e.prototype.getIDsFromServer=function(c){var a={APIKey:this.apiKey,includeTicket:!0,ticketExpires:86400};(new b._.apiAdapters.web.JsonpRequest("idsRequest",this.getAPIBaseUrl("socialize.getIDs"),"socialize.getIDs",a,function(a){var e=a.errorCode;0!==e&&b.log.addLog("Failed to get IDs from server",a);c(e,a.gcid,a.gmidTicket,a.ucid,a.errorMessage)})).send()};
e.prototype.getGmidTicketFromServer=function(c){var a={gmid:this.gmid,APIKey:this.apiKey,expires:86400};(new b._.apiAdapters.web.JsonpRequest("gmidTicketRequest",this.getAPIBaseUrl("socialize.getGmidTicket"),"socialize.getGmidTicket",a,function(a){c(a.gmidTicket)})).send()};e.prototype.getAPIBaseUrl=function(c){c=c.split(".");return"https://"+b.utils.stringUtils.format("{0}.{1}",c[0],b.partnerSettings.plugins.apiDomain)};e.prototype.postState=function(c){c||(c={});c.apiKey=this.apiKey;window.parent.postMessage(b.utils.JSON.serialize(c),
this.originDomain)};e.prototype.loadIDs=function(b){var a=this;this.getIDsFromStorage(function(d,e,f,h){a.gmid=d;a.ucid=e;if(f&&(a.hasTicket=!1,a.gmid)){a.storeIDs(function(){b(h)});return}b(h)})};e.prototype.getIDsFromStorage=function(c){var a,d,g,f;b.utils.localStorage.waitForService(function(k){!1===k.isPersistent()&&c(null,null,!1,"no_supported_cookie_storage");a=b.utils.localStorage.getItem(e.SSO_GMID_STORAGE_KEY);d=k.getItem(e.GMID_STORAGE_KEY);g=k.getItem(e.UCID_STORAGE_KEY);a&&a!==d&&(f=!0,
d=a);c(d,g,f)})};e.prototype.storeIDs=function(c){var a=this;b.utils.localStorage.waitForService(function(b){b.setItem(e.GMID_STORAGE_KEY,a.gmid);b.setItem(e.UCID_STORAGE_KEY,a.ucid);c()})};e.SSO_GMID_STORAGE_KEY="gig_sso_gmid";e.GMID_STORAGE_KEY="gig_gmid";e.UCID_STORAGE_KEY="gig_ucid";return e}();e.APIProxy=f})(f.web||(f.web={}))})(f.apiAdapters||(f.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));
var gigya;
(function(b){(function(g){(function(e){(function(h){h.newApiAdapter=function(a){return new d(a)};h.mobileCallbacks={};var e="is_session_valid send_request send_oauth_request get_ids on_plugin_event on_custom_event register_for_namespace_events".split(" "),f={logLevel:[]},d=function(){function a(c){this.adapterSettings=c;this.name="Mobile"}a.prototype.init=function(c){var a=this;this.features=this.adapterSettings&&"function"===typeof this.adapterSettings.getFeatures?b.utils.JSON.deserialize(this.adapterSettings.getFeatures()):e;
this.adapterSettings&&"function"===typeof this.adapterSettings.getSettings?(this.settings=b.utils.JSON.deserialize(this.adapterSettings.getSettings())||{},this.settings.logLevel=b.utils.array.getArrayFromString(this.settings.logLevel||f.logLevel.join(","),",")):this.settings=f;b.events.addMap({defaultMethod:function(c){a.onPluginEvent(c)},eventMap:[{events:"*",args:["$event"]}]});this.sendToMobile("get_ids",null,function(d){a.ucid=d.ucid;a.gcid=d.gcid;for(var l in b.events.global._activeNamespaces)a.registerForNamespaceEvents(l);
b.localInfo.isNativeMobileApp=!0;c()})};a.prototype.getTokenParam=function(c,a){return""};a.prototype.onPluginEvent=function(c){c.isGlobal||this.sendToMobile("on_plugin_event",c)};a.prototype.onCustomEvent=function(c){this.sendToMobile("on_custom_event",c)};a.prototype.onJSLog=function(c,a){this.isLogLevelSupported(c)&&this.sendToMobile("on_js_log",{logType:c,logInfo:a})};a.prototype.registerForNamespaceEvents=function(c){this.sendToMobile("register_for_namespace_events",{namespace:c})};a.prototype.getGmidTicket=
function(c){c&&this.sendRequest("socialize.getGmidTicket",{expires:30},function(a){c(a.gmidTicket)},{forceHttps:!0})};a.prototype.clearSession=function(c,a){this.sendToMobile("clear_session",c,a)};a.prototype.isSessionValid=function(c,a){this.sendToMobile("is_session_valid",{},a)};a.prototype.sendRequest=function(c,a,b,d){this.sendToMobile("send_request/"+c,a,b,d)};a.prototype.sendOauthRequest=function(a,b,d,e){this.sendToMobile("send_oauth_request/"+a,b,d,e)};a.prototype.sendToMobile=function(a,
d,e,g){if(this.isActionSupported(a)){var f=document.createElement("iframe");f.style.display="none";d&&delete d.APIKey;if(e){var k=(new Date).getTime()+"_"+Math.random();h.mobileCallbacks[k]=function(a){e(a);document.documentElement.removeChild(f);delete h.mobileCallbacks[k]}}a="gsapi://"+a+"?callbackID="+(k||"")+"&params="+(d?encodeURIComponent(b.utils.keyValue.serialize(d)):"")+"&settings="+(g?encodeURIComponent(b.utils.keyValue.serialize(g)):"");f.src=a;window.setTimeout(function(){return document.documentElement.appendChild(f)},
0)}else e&&e({errorCode:400096,errorMessage:"Mobile SDK does not support feature "+a})};a.prototype.onSDKEvent=function(a){a&&a.user&&g.convertIdentitiesArrayToObject(a.user);b.events.global.dispatch(a)};a.prototype.isActionSupported=function(a){if(!a)return!1;a=a.split("/")[0].toLowerCase();return-1<b.utils.array.indexOf(this.features,a)};a.prototype.isLogLevelSupported=function(a){return-1!=b.utils.array.indexOf(this.settings.logLevel,"*")||-1!=b.utils.array.indexOf(this.settings.logLevel,a)};return a}();
h.MobileAdapter=d})(e.mobile||(e.mobile={}))})(g.apiAdapters||(g.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));
(function(b){(function(g){(function(e){(function(e){e.showPlugin=function(e,f){var d=e.split("."),a=d.splice(d.length-1,1)[0];d.length||(d=["socialize"]);"commentsUI"==e&&(d=["comments"]);a="show"+b.utils.stringUtils.capitalize(a);d.push(a);for(a=b;a&&d.length;)a=a[d.shift()];if("function"!==typeof a)return b.events.dispatchInvalidParamError(b.utils.object.merge([{plugin:e},f]),"plugin");a(f)}})(e.mobile||(e.mobile={}))})(g.apiAdapters||(g.apiAdapters={}))})(b._||(b._={}))})(gigya||(gigya={}));

// end API adapters
var gigya;
(function(a){var b=navigator.userAgent.toLowerCase(),g="function"===typeof FileReader||"object"===typeof FileReader?!0:!1,k=new Date,f=document.location.hostname,e="http:"==document.location.protocol?"http":"https",d=-1!=b.indexOf("win"),c=-1!=b.indexOf("msie")||-1!=b.indexOf("mozilla")&&-1!=b.indexOf("trident"),h=-1!=b.indexOf("msie 6."),r=-1!=b.indexOf("msie 7."),p=-1!=b.indexOf("msie 8."),l=-1!=b.indexOf("msie 9."),n=-1!=b.indexOf("msie 10."),q=-1!=b.indexOf("mozilla")&&-1!=b.indexOf("trident/7.0"),m=
-1!=b.indexOf("edge"),t=-1!=b.indexOf("iphone")||-1!=b.indexOf("ipad")||-1!=b.indexOf("ipod"),u=-1!=b.indexOf("safari/534"),v;v=-1!=b.indexOf("applewebkit")&&-1!=b.indexOf("version/")?parseInt(b.split("version/")[1].split(" ")[0]):0;var w=-1!=b.indexOf("android"),A=function(a){return-1===a.indexOf("mozilla/5.0")||-1===a.indexOf("android 4")||-1===a.indexOf("applewebkit")||-1!==a.indexOf("windows phone")?!1:(a=/chrome\/(\d+)/.exec(a))?20>parseInt(a[1]):!0}(b),x;x=-1!=b.indexOf("android")?parseFloat(b.slice(b.indexOf("android")+
8)):0;a.localInfo={isBrowserSupportsFilesAPI:g,initTime:k,version:0,pageDomain:f,protocol:e,userAgent:b,isWin:d,isIE:c,isIE6:h,isIE7:r,isIE8:p,isIE9:l,isIE10:n,isIE11:q,isEdge:m,isIOS:t,isSafari534:u,iosVersion:v,isAndroid:w,isAndroidBrowser:A,currentBrowser:"",androidVersion:x,isChrome:-1!=b.indexOf("chrome")&&-1==b.indexOf("edge"),isGoogleBot:-1!=b.indexOf("googlebot"),isFF:-1!=b.indexOf("firefox"),isOpera:-1!=b.indexOf("opera"),isSafari:navigator.appVersion&&-1!=navigator.appVersion.toLowerCase().indexOf("safari")&&
-1==navigator.appVersion.toLowerCase().indexOf("chrome")&&-1==b.indexOf("android"),isIOSWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),isIOSChrome:-1!=b.indexOf("crios"),isMAC:navigator.appVersion&&-1!=navigator.appVersion.toLowerCase().indexOf("mac")?!0:!1,isWindowsPhone:-1!=b.indexOf("windows phone"),supportsPostMessage:null!=window.postMessage&&(-1==b.indexOf("msie")||-1!=b.indexOf("iemobile")),supportsLocalStorage:!1,supportsSessionStorage:!1,supportsFlash:function(){var a=
!1;try{navigator.mimeTypes&&void 0!=navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin?a=!0:new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(c){}return a}(),quirksMode:"BackCompat"==document.compatMode&&-1!=b.indexOf("msie"),backCompat:"BackCompat"==document.compatMode,isMobile:function(){var a="iphone;ipod;android;midp;240x320;blackberry;netfront;nokia;panasonic;portalmmm;sharp;sie-;sonyericsson;symbian;windows ce;benq;mda;mot-;opera mini;philips;pocket pc;sagem;samsung;htc".split(";"),
c;for(c in a)if(-1!=b.indexOf(a[c]))return!0;return!1}(),isMobileApp:function(){if(!document.getElementsByTagName)return!1;for(var a=document.getElementsByTagName("meta"),c=0;c<a.length;c++)if("viewport"==a[c].getAttribute("name")){var d=a[c].getAttribute("content");if(d&&-1!==d.indexOf("width=device-width"))return!0}return!1}(),isNativeMobileApp:!1,isTouch:function(){if("ontouchstart"in window)return!0;if("onmsgesturechange"in window)try{new ActiveXObject("htmlfile")}catch(a){return!0}return!1}(),
messagingMethod:0};g=function(c){if(!c||a.localInfo.isSafari&&window.parent!==window&&!window._isAPIProxy)return!1;try{c.setItem("_gig_localStorage_test","just checking for localStorage");var d="just checking for localStorage"===c.getItem("_gig_localStorage_test");c.removeItem("_gig_localStorage_test");return d}catch(h){return!1}};a.localInfo.supportsLocalStorage=g(window.localStorage);a.localInfo.supportsSessionStorage=g(window.sessionStorage);a.localInfo.isIE11&&!window.indexedDB&&(a.localInfo.supportsPostMessage=
!1);a.localInfo.isMAC=a.localInfo.isMAC&&!a.localInfo.isIOS;(g=a.localInfo.isWin?"windows":a.localInfo.isWindowsPhone?"winphone":a.localInfo.isIOS?"ios-v"+a.localInfo.iosVersion:a.localInfo.isMAC?"mac":a.localInfo.isAndroid?"android":"")&&(g+=" ");a.localInfo.currentBrowser=g+(a.localInfo.isChrome?"chrome":a.localInfo.isFF?"firefox":a.localInfo.isSafari?"safari":a.localInfo.isEdge?"edge":a.localInfo.isIE11?"ie11":a.localInfo.isIE10?"ie10":a.localInfo.isIE9?"ie9":a.localInfo.isIE8?"ie8":"")})(gigya||
(gigya={}));
(function(a){(function(a){(function(a){function b(a){return a.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}a.trim=function(a){return a.replace(/^\s*(\S*(.*\S)?)\s*$/,"$1")};a.format=function(a){for(var e=1;e<arguments.length;e++);for(e=0;e<arguments.length-1;e++)null!=arguments[e+1]&&(a=a.split("{"+e+"}").join(arguments[e+1]));return a};a.capitalize=function(a){return a.substring(0,1).toUpperCase()+a.substring(1)};a.endsWith=function(a,e){return-1!==a.indexOf(e,a.length-e.length)};a.escapeRegExp=b;
a.replaceAll=function(a,e,d){return e?a.replace(new RegExp(b(e),"g"),d):a}})(a.stringUtils||(a.stringUtils={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){function g(f){var e=a.thisScript?a.thisScript.baseDomain:"";if(!e||a.utils.stringUtils.endsWith(e,".gigya.com"))e=b.CDN_HOSTS[a.localInfo.protocol],e.length<=k&&(k=0),e=e[k++];f&&0!==f.indexOf("/")&&(f="/"+f);return a.localInfo.protocol+"://"+e+(f||"")}var k=0;b.CDN_HOSTS={http:["cdn.gigya.com","cdn1.gigya.com","cdn2.gigya.com","cdn3.gigya.com"],https:["cdns.gigya.com","cdns1.gigya.com","cdns2.gigya.com","cdns3.gigya.com"]};b.getCdnResource=g;b.getImgCdnResource=function(){return g("/gs/i/")}})(a._||
(a._={}))})(gigya||(gigya={}));
(function(a){(function(a){(function(a){function b(a,c){for(var h=0;h<a.length;++h)c(a[h],h,a)}function f(a,c){for(var h=0;h<a.length;++h)if(c(a[h],h,a))return!0;return!1}function e(a,c){var h=-1;f(a,function(a,d,e){return c(a,d,e)?(h=d,!0):!1});return h}a.indexOf=function(a,c){for(var h=0;h<a.length;h++)if(a[h]==c)return h;return-1};a.clone=function(a){for(var c=[],h=0;h<a.length;h++)c[h]=a[h];return c};a.removeByValue=function(a,c){if(a)for(var h=a.length-1;0<=h;h--)a[h]==c&&a.splice(h,1)};a.removeByProperty=
function(a,c,h){if(a)for(var e=a.length-1;0<=e;e--)a[e][c]==h&&a.splice(e,1)};a.getArrayFromString=function(a,c,h){if(!a||"string"!=typeof a)return[];h&&(a=a.toLowerCase());return(a=a.replace(/[ ]/g,"").replace(/,,/g,","))?a.split(c):[]};a.intersect=function(a){for(var c=1;c<arguments.length;c++);if(null==a)return[];for(var c=[],h=arguments.length,e=0,b=a.length;e<b;e++){var f=a[e];if(-1==this.indexOf(c,f)){for(var g=1;g<h;g++){var k=arguments[g];if(null==k||-1==this.indexOf(k,f))break}g===h&&c.push(f)}}return c};
a.lastIndexOf=function(a,c,h){void 0===h&&(h=0);for(var e=a.length;--e>=h;)if(a[e]===c)return e;return-1};a.forEach=b;a.forEachProp=function(a,c){for(var h in a)a.hasOwnProperty(h)&&c(a[h],h,a)};a.some=f;a.every=function(a,c){for(var h=0;h<a.length;++h)if(!c(a[h],h,a))return!1;return!0};a.everyProp=function(a,c){for(var h in a)if(a.hasOwnProperty(h)&&!c(a[h],h,a))return!1;return!0};a.map=function(a,c){var h=[];b(a,function(a,d,e){return h.push(c(a,d,e))});return h};a.firstIndex=e;a.first=function(a,
c){return a[e(a,c)]};a.getAllEnumValues=function(a){var c=[],h;for(h in a)"number"==typeof a[h]&&c.push(a[h]);return c}})(a.array||(a.array={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));(function(a){(function(a){(function(a){a.create=function(a,b){return function(){for(var e=[],d=0;d<arguments.length;d++)e[d-0]=arguments[d];return b.apply(a,e)}}})(a.delegate||(a.delegate={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b.fill=function(b,f){"function"==typeof b&&(b=b(f));b instanceof Array&&(b=b.join(""));var e=/(\$)(!?)([a-z_][a-z_.\d]*)([(][^()]*[)])?|(\$)(!?)\{([a-z_][a-z_.\d]*)([(][^()]*[)])?\}/gi;e.lastIndex=0;for(var d=b,c=e.exec(d),h;null!=c;){h="$"==c[1]?0:4;var r="!"==c[2+h],g=c[3+h];h=c[4+h];null==h&&(h="");"."==g.substring(0,1)&&(g=g.substring(1));"DBG"==g.substring(0,3)&&(g=g.substring(3));var l="";for(h=g+h;h!=l;){var l=h,n=e.lastIndex;h=a.utils.templates.fill(l,
f);e.lastIndex=n}l="";n=0;if(null!=f[g.split(".")[0]])try{l=(new Function("o","p",'return eval("o." + p)'))(f,h)}catch(q){}else l="$"+(r?"!":"")+h,n=1;d=r?d.replace(c[0],""):d.substr(0,c.index)+l+d.substr(c.index+c[0].length);e.lastIndex=c.index+n;c=e.exec(d)}return d}})(b.templates||(b.templates={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(a){(function(a){function b(){var a=0,d=0;"number"==typeof window.pageYOffset?(d=window.pageYOffset,a=window.pageXOffset):document.body&&(document.body.scrollLeft||document.body.scrollTop)?(d=document.body.scrollTop,a=document.body.scrollLeft):document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)&&(d=document.documentElement.scrollTop,a=document.documentElement.scrollLeft);return{left:a,top:d}}function f(){var a,d;d=document.documentElement;
var c=document.body;window.innerHeight?(a=window.innerHeight,d=window.innerWidth):(a=d.clientHeight,0==a&&(a=c.clientHeight),d=d.clientWidth,0==d&&(d=c.clientWidth));return{w:d,h:a}}a.getScroll=b;a.getFullSize=function(){var a=document.documentElement,d=document.body,c=a.clientHeight;0==c&&(c=d.clientHeight);a=a.clientWidth;0==a&&(a=d.clientWidth);return{w:a,h:c}};a.getOrientation=function(){var a=parseInt(window.orientation||"0");0>a&&(a+=360);return a};a.getInnerSize=f;a.getMiddleCenter=function(){var a=
b(),d=f();return{top:a.top+Math.floor(d.h/2),left:a.left+Math.floor(d.w/2)}};a.isRectHorizontallyVisible=function(a){var d=b(),c=f();return a.left>=d.left&&a.right<=d.left+c.w};a.isRectFullyVisible=function(a){var d=b(),c=f();return a.top>=d.top&&a.bottom<=d.top+c.h&&a.left>=d.left&&a.right<=d.left+c.w};a.scrollIntoView=function(a){a&&a.scrollIntoView&&a.scrollIntoView()}})(a.viewport||(a.viewport={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(a){(function(a){function b(a,e,d,c,h){void 0===e&&(e=!1);void 0===d&&(d=!1);void 0===c&&(c=0);void 0===h&&(h=20);c||(c=0);if(c>h)return"[Too deep]";var r=h="",g="";if(d)for(var g="\t",r="\n",l=0;l<c+1;l++)h+=g;var n=typeof a;if("function"==n)return n.toString();if("object"!=n||null===a)return"string"==n&&(a='"'+a.replace(/(\"|\\)/g,"\\$1").replace(/\r\n|\r|\n/g,"\\n")+'"'),String(a);var q,m,t=[],u=a&&a.constructor==Array;if(u)for(l=0;l<a.length;l++)m=a[l],n=typeof m,null==m||
"undefined"==n?m="":"string"==n?m='"'+m.replace(/(\"|\\)/g,"\\$1").replace(/\r\n|\r|\n/g,"\\n")+'"':"function"==n?m=e?"Function":"":m.parentNode&&m.innerHTML?m="HTMLElement":m.constructor==Date?m="":"object"==n&&null!==m&&(m=b(m,e,d,c+1)),""!=String(m)&&t.push(h+g+String(m));else for(q in a)m=a[q],n=typeof m,null==m||"undefined"==n?m=String(m):"string"==n?m='"'+m.replace(/(\"|\\)/g,"\\$1").replace(/\r\n|\r|\n/g,"\\n")+'"':"function"==n?m=e?"Function":"":m.parentNode&&m.innerHTML?m="HTMLElement":m.constructor==
Date?m="":"object"==n&&null!==m&&(m=r+b(m,e,d,c+1)),""!=String(m)&&t.push(h+g+'"'+q.replace(/(\"|\\)/g,"\\$1").replace(/\r\n|\r|\n/g,"\\n")+'":'+String(m));return r+h+(u?"[":"{")+r+t.join(","+r)+r+h+(u?"]":"}")}a.serialize=b;a.deserialize=function(a){""===a&&(a='""');eval("var o");try{eval("o="+a)}catch(e){}return eval("o")}})(a.JSON||(a.JSON={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(g){function k(a){var c=[];"string"===typeof a.className&&(c=a.className.split(" "));return c}function f(a,c){if(a){if(!c)return!0;if(!a.className)return!1}else return!1;for(var h=!1,e=k(a),b=0;b<e.length;b++)if(e[b]===c){h=!0;break}return h}g._nextZIndex=999999999;g._popupContainers=[];g._pseudoContainers=[];var e=null;g.getGigyaScriptElement=function(a){for(var c=document.getElementsByTagName("script"),h,e=/\/\/cdn(s)?\.(ru1\.)?gigya.com/,b=c.length-1;0<=b;b--){var f=
c[b],g=f.src.toLowerCase();if(""!==g&&(e.test(g)||-1<g.indexOf("?apikey="))&&(0===a.length||a.some(function(a){return-1<g.indexOf(a)}))){h=f;break}}return h};g.dispatch=function(a,c){var h;try{h=new Event(c)}catch(e){h=document.createEvent("CustomEvent"),h.initCustomEvent(c,!0,!0,{})}a.dispatchEvent(h)};g.addEventListener=function(a,c,h){a&&h&&(a.addEventListener?a.addEventListener(c,h,!0):a.attachEvent("on"+c,h))};g.removeEventListener=function(a,c,h){h&&(a.removeEventListener?a.removeEventListener(c,
h,!0):a.detachEvent("on"+c,h))};g.disableDefaultEventHandling=function(a){a.preventDefault?a.preventDefault():window.event&&(window.event.returnValue=!1)};g.addDialogBackListener=function(d){a.utils.DOM._removeDialogBackListener();e=function(c){c&&c.newURL&&-1==c.newURL.indexOf("|gigyaMobileDialog")&&(d(c),a.utils.DOM._removeDialogBackListener())};window.setTimeout(function(){-1==window.location.hash.indexOf("|gigyaMobileDialog")&&(window.location.hash+="|gigyaMobileDialog");a.utils.DOM.addEventListener(window,
"hashchange",e)},50)};g._removeDialogBackListener=function(){e&&(a.utils.DOM.removeEventListener(window,"hashchange",e),e=null,window.location.hash=window.location.hash.replace("|gigyaMobileDialog",""))};g.appendToBody=function(a){document.body&&(document.body.insertBefore&&document.body.firstChild?document.body.insertBefore(a,document.body.firstChild):document.body.appendChild(a))};g.removeElement=function(a){a&&a.parentElement&&a.parentElement.removeChild(a)};g.isChildOf=function(a,c){for(var h=
a.parentNode;h;){if(c==h)return!0;h=h.parentNode}return!1};g.isVisible=function(a){for(;a;){var c=getComputedStyle(a);if("none"===c.display||"hidden"===c.visibility)return!1;a=a.parentElement}return!0};g.getCenteredDivID=function(d){return"gig_"+a.localInfo.initTime.getTime().toString()+"_"+d};g.createTopLevelDiv=function(d){var c;c=document.createElement("iframe");c.id="gigya_ifr_"+d;c.frameborder="0";c.frameBorder="0";c.allowtransparency=!0;c.hidden=!0;c.style.position="absolute";c.style.width=
a.localInfo.isChrome?"30px":"1px";c.style.height="1px";null!=c.style.zIndex&&(c.style.zIndex=a.utils.DOM._nextZIndex++);var h=document.createElement("div");null!=h.style.zIndex&&(h.style.zIndex=""+a.utils.DOM._nextZIndex++);h.innerHTML="";d&&(h.id=d);document.body&&(document.body.insertBefore&&document.body.firstChild?(document.body.insertBefore(c,document.body.firstChild),document.body.insertBefore(h,document.body.firstChild)):document.body.appendChild&&(document.body.appendChild(c),document.body.appendChild(h)));
return h};g.hideByID=function(a){if(a=document.getElementById(a))a.style.display="none"};g.showByID=function(d){if(d=document.getElementById(d))d.style.display=a.localInfo.isIE6?"TD"==d.tagName?"table-cell":"TR"==d.tagName?"":"TABLE"==d.tagName?"":"block":""};g.clearByID=function(a){try{var c=document.getElementById(a);null!=c&&(c.innerHTML="")}catch(h){}};g.getHTMLSize=function(a,c){var h=document.createElement("div");h.style.position="absolute";h.style.left="-1000px";h.innerHTML=a;c.appendChild(h);
var e=h.offsetWidth,b=h.offsetHeight;h.parentNode.removeChild(h);return{w:e,h:b}};g.getElementsByClass=function(a,c,h){if(!a)return[];var e=[];h&&f(a,c)&&e.push(a);a=a.getElementsByTagName("*");for(h=0;h<a.length;h++)f(a[h],c)&&e.push(a[h]);return e||[]};g.getElementsByAttribute=function(a,c,h,e){var b=[];a=a.getElementsByTagName(c);for(c=0;c<a.length;c++)a[c].getAttribute(h)==e&&b.push(a[c]);return b};g.getElementPosition=function(d){if(!d)return{left:0,top:0,bottom:0,right:0};d=d.getBoundingClientRect();
var c=a.utils.viewport.getScroll(),h=d.left+c.left,c=d.top+c.top;return{left:h,top:c,right:h+d.width,bottom:c+d.height}};g.addClassToElement=function(a,c){if(a){var h=a.className?k(a):[],e=h.length,b=c.split(" "),f;for(f in b){var g=!1;if(!b[f])break;for(var q in h)if(h[q]===b[f]){g=!0;break}g||h.push(b[f])}h.length!==e&&(a.className=h.join(" "))}};g.removeClassFromElement=function(a,c,h){void 0===h&&(h=!1);if(a){for(var e=k(a),b=e.length-1;0<=b;b--)(e[b]===c||h&&-1!==e[b].indexOf(c))&&e.splice(b,
1);a.className=e.join(" ")}};g.getClassNames=k;g.isElementClass=f;g.cancelEvent=function(a){a&&("cancelable"in a?a.preventDefault():a.returnValue=!1)};g.createElement=function(a,c){var h=document.createElement("div");c=c||"";h.innerHTML="<"+a+' name="'+c+'" id="'+c+'"></'+a+">";return h.firstChild};g.setSize=function(d,c,h,e){if(null!=d&&null!=d.style){if(c){c=""+c;var f=0<c.indexOf("%");if(!isNaN(c)||f)f=""+(f?c:c+"px"),d.style.width!=f&&(d.style.width=f)}h&&(h=""+h,f=0<h.indexOf("%"),!isNaN(c)||
f)&&(f=""+(f?h:h+"px"),d.style.height!==f&&(d.style.height=f));if(e&&c&&h){if(null==d.style.zIndex||e)d.style.zIndex=(this._nextZIndex++).toString();e=b.viewport.getInnerSize();var f=a.utils.viewport.getScroll(),g=f.left;d.style.top=""+Math.max(0,f.top+Math.floor((e.h-h)/2))+"px";d.style.left=""+Math.max(0,g+Math.floor((e.w-c)/2))+"px";d.style.visibility=""}}};g.createHiddenIframe=function(d){var c=document.createElement("iframe");c.src=d;c.style.width="30px";c.style.height="10px";c.style.position=
"absolute";c.style.top="-1000px";c.style.left="-1000px";document.body?a.utils.DOM.appendToBody(c):a.utils.functions.invokeOnPageLoad(function(){a.utils.DOM.appendToBody(c)});return c};g.attributeEncode=function(a){return a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/\'/g,"&#39;")}})(b.DOM||(b.DOM={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b.callFunction=function(a,b){var e=eval(a),d=a.split(".");d.splice(d.length-1,1);d=eval(d.join("."));e.apply(d,b)};b.invokeOnPageLoad=function(b,f){if(!document.readyState&&document.body||"loaded"===document.readyState||"complete"===document.readyState||!f&&"interactive"===document.readyState&&document.body)b();else{var e=!1,d=function(){e||(e=!0,b())};window.setTimeout(d,2E4);a.utils.DOM.addEventListener(window,"load",d);a.utils.DOM.addEventListener(document,
"DOMContentLoaded",d)}};b.createAlias=function(a,b){for(var e=a.split("."),d=window,c=0;c<e.length-1;c++){var h=e[c];d[h]||(d[h]={});d=d[h]}d[e[e.length-1]]=b};b.debounce=function(a,b){var e=void 0;return function(){void 0!==e&&clearTimeout(e);e=setTimeout(function(){e=void 0;a()},b)}}})(b.functions||(b.functions={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){function k(a,e,d,c){var h;"string"===typeof a?(h=parseInt(a),-1!==a.indexOf("%")&&(h=.01*parseInt(a)*e,c&&(h-=c/2))):h=a;h=Math.round(h);isNaN(h)&&void 0!==d&&(h=k(d,e,void 0,c));return h}b._openedWindows={};b._uniqueWindowCounter=0;b._calcPixels=k;b.open=function(f,e,d){d||(d={menubar:0,toolbar:0,resizable:1,scrollbars:1});d.width=k(d.width,screen.width,960);d.height=k(d.height,screen.height,680);d.left=k(d.left,screen.width,"50%",d.width);d.top=k(d.top,screen.height,
"50%",d.height);var c="",h;for(h in d)c+=","+h+"="+d[h];c=c.substr(1);d=a.localInfo.isIE&&2048<f.length||4096<f.length;h=f;d&&(h="",a.localInfo.isIE&&(h="about:blank"));e||(e="_gigWindow_"+(new Date).getTime()+"_"+ ++b._uniqueWindowCounter);(c=window.open(h,e,c))&&c.focus&&c.focus();b._openedWindows[e]=c;c=a.utils.URL.getParamsFromURL(f);d&&a.utils.HTTP.redirect(f.split("?")[0],[c],"POST",e);a.events.global.dispatch({eventName:"windowOpened",url:f,params:c});return null!=b._openedWindows[e]};b.close=
function(f){if(null!=b._openedWindows[f]){var e=function(){try{null!=b._openedWindows[f]&&b._openedWindows[f].close(),delete b._openedWindows[f]}catch(a){}};6<=a.localInfo.iosVersion?e():window.setTimeout(e,10)}}})(b.win||(b.win={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(a){(function(a){a.isExplicitTrue=function(a){a=(""+a).toLowerCase();return"true"==a||"1"==a};a.isExplicitFalse=function(a){a=(""+a).toLowerCase();return"false"==a||"0"==a}})(a.validation||(a.validation={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){function k(a,d,e){if(!d)return a;d=d.split(".");for(var b=0;b<d.length;b++){var f=d[b];e&&!a[f]&&(a[f]={});if(a[f]||!1===a[f])a=a[f];else return null}return a}function f(a,d,e,b,g,k){void 0===b&&(b=20);void 0===g&&(g=0);if(g>b||"undefined"==typeof a||null==a||"function"==typeof a&&e)return null;if(a.constructor==Array){for(var q=[],m=0;m<a.length;m++)e&&"function"==typeof a[m]||(q[m]=d?f(a[m],d,e,b,g+1,k):a[m]);return q}if("object"==typeof a){q={};for(m in a)k&&
"context"==m||e&&"function"==typeof a[m]||(q[m]=d?f(a[m],d,e,b,g+1,k):a[m]);return q}return a}function e(a,d){for(var b={},f=0;f<a.length;f++)if(a[f]&&a[f].length)for(var g=0;g<a[f].length;g++)for(var k in a[f][g])b[k]=a[f][g][k];else if(d)for(k in a[f])b[k]="object"!==typeof b[k]?a[f][k]:e([b[k],a[f][k]],!0);else for(k in a[f])b[k]=a[f][k];return b}function d(c,e,b){if(null!=c){null==e&&(e={});if(c.constructor==Array)for(var f=0;f<c.length;f++)d(c[f],e,b);else if(b){b=b.split("|");var f={},g;for(g in c)f[g.toLowerCase()]=
1;for(g=0;g<b.length;g++){var k=b[g];f[k.toLowerCase()]&&(e[k]=c[k])}}else e=a.utils.object.clone(c,!1);return e}}b.removeUndefined=function(a){var d={},e;for(e in a)null!=a[e]&&void 0!=a[e]&&(d[e]=a[e]);return d};b.getPropertyBySerializedName=k;b.setPropertyBySerializedName=function(a,d,e){d=d.split(".");var b=d.pop();k(a,d.join("."),!0)[b]=e};b.add=function(a,d,e){for(var b in d)e&&"undefined"!==typeof a[b]||(a[b]=d[b])};b.getHash=function(c){var d=[],e;for(e in c){var b;"object"==typeof c[e]?b=
a.utils.JSON.serialize(c[e],!1):c[e]&&(b=c[e].toString());d.push(e+"="+b)}return d.sort().join("&")};b.getMurmurHash=function(a,d){d||(d=0);var e,b,f,g,k;e=a.length&3;b=a.length-e;f=d;for(k=0;k<b;)g=a.charCodeAt(k)&255|(a.charCodeAt(++k)&255)<<8|(a.charCodeAt(++k)&255)<<16|(a.charCodeAt(++k)&255)<<24,++k,g=3432918353*(g&65535)+((3432918353*(g>>>16)&65535)<<16)&4294967295,g=g<<15|g>>>17,g=461845907*(g&65535)+((461845907*(g>>>16)&65535)<<16)&4294967295,f^=g,f=f<<13|f>>>19,f=5*(f&65535)+((5*(f>>>16)&
65535)<<16)&4294967295,f=(f&65535)+27492+(((f>>>16)+58964&65535)<<16);g=0;switch(e){case 3:g^=(a.charCodeAt(k+2)&255)<<16;case 2:g^=(a.charCodeAt(k+1)&255)<<8;case 1:g^=a.charCodeAt(k)&255,g=3432918353*(g&65535)+((3432918353*(g>>>16)&65535)<<16)&4294967295,g=g<<15|g>>>17,f^=461845907*(g&65535)+((461845907*(g>>>16)&65535)<<16)&4294967295}f^=a.length;f^=f>>>16;f=2246822507*(f&65535)+((2246822507*(f>>>16)&65535)<<16)&4294967295;f^=f>>>13;f=3266489909*(f&65535)+((3266489909*(f>>>16)&65535)<<16)&4294967295;
return(f^f>>>16)>>>0};b.clone=f;b.merge=e;b.unflatten=function(a){if(Object(a)!==a||Array.isArray(a))return a;var d={},e;for(e in a){for(var b=d,f="",g=e.split("."),k=0;k<g.length;k++)var m=!isNaN(Number(g[k])),b=b[f]||(b[f]=m?[]:{}),f=g[k];b[f]=a[e]}return d[""]||{}};b.flatten=function(a){function d(a,c){if(Object(a)!==a)e[c]=a;else if(Array.isArray(a)){for(var b=a.length,f=0;f<b;f++)d(a[f],c?c+"."+f:String(f));0===b&&(e[c]=[])}else{b=!0;for(f in a)b=!1,d(a[f],c?c+"."+f:f);b&&""!==c&&(e[c]={})}}
var e={};d(a,"");return e};b.extractProperties=d;b.extractProperty=function(a,e){return d(a,void 0,e)[e]}})(b.object||(b.object={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){function k(f,e,d,c,h){var r=a.localInfo.pageDomain,k=b._getBaseDomain();null==c&&(c=0<k.length&&r.length>=k.length&&r.lastIndexOf(k)===r.length-k.length?k:r);d=null==d||""===d||isNaN(d)?47304E7:0==d?null:1E3*d;k=new Date;k.setTime(k.getTime()+d);c=f+"="+escape(e)+(h?"":"; path=/")+(null==d?"":"; expires="+k.toUTCString())+(c&&""!=c&&-1!=c.indexOf(".")?"; domain="+c:"");document.cookie=c;d&&!(0<d)||b.get(f)||(c=f+"="+escape(e)+(h?"":"; path=/")+(null==d?"":"; expires="+
k.toUTCString())+(r&&""!=r&&-1!=r.indexOf(".")?"; domain="+r:""),document.cookie=c)}b._getBaseDomain=function(){return a.partnerSettings&&a.partnerSettings.baseDomain?a.partnerSettings.baseDomain:""};b.get=function(a){a=a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1").replace(/^[ \t]+|[ \t]+$/g,"");return(a=document.cookie.match(new RegExp("(?:^|;)\\s?"+a+"=(.*?)(?:;|$)")))&&unescape(a[1])};b.set=k;b.remove=function(f){var e=a.localInfo.pageDomain,d=b._getBaseDomain();0<d.length&&e.length>=d.length&&
e.lastIndexOf(d)===e.length-d.length&&(k(f,"",-1,d),k(f,"",-1,d,!0));k(f,"",-1,a.localInfo.pageDomain);k(f,"",-1,a.localInfo.pageDomain,!0);k(f,"",-1,"");k(f,"",-1,"",!0)};b.getInfiniteExpirationTimeInSeconds=function(){return 47304E4}})(b.cookie||(b.cookie={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(a){(function(a){a.sanitizeHTML=function(a){return null==a||"undefined"==typeof a?a:a.replace(/&/g,"&#38;").replace(/</g,"&#60;").replace(/>/g,"&#62;").replace(/\"/g,"&#34;").replace(/'/g,"&#39;").replace(/&#38;#173;/g,"&#173;")};a.sanitizeAttribute=function(a){return null==a||"undefined"==typeof a?a:a.replace(/&/g,"&#38;").replace(/</g,"&#60;").replace(/>/g,"&#62;").replace(/\"/g,"&#34;").replace(/\=/g,"&#61;")}})(a.sanitize||(a.sanitize={}))})(a.utils||(a.utils={}))})(gigya||
(gigya={}));(function(a){(function(a){(function(a){a.getPosition=function(){var a=0,b=0;if(document.body){var e=null,e={clientX:0,clientY:0};if(e.pageX||e.pageY)a=e.pageX,b=e.pageY;else if(e.clientX||e.clientY)a=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,b=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return{x:a,y:b}}}})(a.mouse||(a.mouse={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){var g=function(){function b(a,e){void 0===e&&(e="/");this.domain=a;this.path=e}b.prototype.isIn=function(a){return(this.domain==a.domain||this.isSubDomainOf(a))&&(!a.path||0==this.path.indexOf(a.path))};b.prototype.isForSubDomains=function(){return 0==this.domain.indexOf(".")};b.prototype.isSubDomainOf=function(b){var e="";b.isForSubDomains()||(e=".");e+=b.domain;return a.utils.stringUtils.endsWith(this.domain,e)};b.parse=function(a,e){void 0===e&&(e=!0);if(a){var d=document.createElement("a");
e&&0!=a.indexOf("http")&&(a="http://"+a);d.href=a;return new b(d.hostname,d.pathname)}};return b}();b.Uri=g})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b.URLEncode=function(a){return encodeURIComponent(a)};b.URLDecode=function(a){return decodeURIComponent(a.replace(/\+/g," "))};b.getParamsFromURL=function(b,f){return b&&-1!==b.indexOf("?")?a.utils.keyValue.deserialize(b.split("#")[0].split("?")[1],"&",f):{}};b.getParamValueFromURL=function(a,b,e){if(null==b||""==b)return e;var d=b.indexOf("?");if(-1===d)return e;d="&"+b.substr(d+1);b=d.toLowerCase().indexOf("&"+a.toLowerCase()+"=");if(-1===b)return e;a=d.substr(b+
(1+a.length+1))+"&";b=a.indexOf("&");return a.substr(0,b)};b.addParamsToURL=function(b,f){var e=a.utils.URL.getParamsFromURL(b);a.utils.object.add(e,f);var d=b.split("#"),e=d[0].split("?")[0]+"?"+a.utils.keyValue.serialize(e,"&");1<d.length&&(e+="#"+d[1]);return e}})(b.URL||(b.URL={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b.serialize=function(b,f){var e=[];f||(f="&");for(var d in b)switch(typeof b[d]){case "function":break;case "array":case "object":null!=b[d]&&e.push(d+"="+a.utils.URL.URLEncode(a.utils.JSON.serialize(b[d])));break;case "undefined":break;default:e.push(d+"="+a.utils.URL.URLEncode(b[d]))}return e.join(f)};b.deserialize=function(b,f,e,d){var c={};if(!b)return c;f||(f="&");b=b.split(f);for(f=0;f<b.length;f++){var h=b[f],g=h.indexOf("=");if(-1===g){var p=e?h.toLowerCase():
h;c[p]="1"}else{p=h.substr(0,g);e&&(p=p.toLowerCase());h=h.substr(g+1).replace(/\+/g," ");try{c[p]=d?unescape(h):a.utils.URL.URLDecode(h)}catch(l){c[p]=unescape(h)}}}return c}})(b.keyValue||(b.keyValue={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(g){function k(a){return a.replace(/^http(s?):\/\/cdn(s?)[0-9]*.gigya.com\//,"http$1://cdn$2.gigya.com/")}function f(d,b,e,h,f,g){void 0===f&&(f=5E3);var t;0===d.indexOf("//")&&(d=a.localInfo.protocol+":"+d);if(h){h=k(d);if(c[h]){c[h].loaded?e&&e():(c[h].onLoad.push(e),c[h].onError.push(b));return}t=c[h]={loaded:!1,onLoad:[e],onError:[b]};g&&0<g.length&&a.utils.array.forEach(g,function(a){c[a]=t})}else t={loaded:!1,onLoad:[e],onError:[b]};b=function(){var b=document.createElement("script");
b.async=!0;b.type="text/javascript";b.charset="UTF-8";var e=!1,h=function(){if(!e){if(t.onLoad&&t.onLoad.length)for(var a=0;a<t.onLoad.length;a++)if("function"===typeof t.onLoad[a])t.onLoad[a]();t.loaded=!0;t.onError=t.onLoad=null;e=!0;!0===f&&(f=0);!1!==f&&setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b)},f)}};b.onload=h;b.onreadystatechange=function(){"loaded"===this.readyState&&h()};b.onerror=function(){for(var a=0;a<t.onError.length;a++)if("function"===typeof t.onError[a])t.onError[a]();
delete c[d]};var g=document.getElementsByTagName("head");g&&0<g.length&&g[0].appendChild(b);g=function(){b.src=d};6<=a.localInfo.iosVersion?g():setTimeout(g,1)};a.localInfo.isIE?a.utils.functions.invokeOnPageLoad(b):b()}function e(a,c){var d=new Image,b=!1;d.onload=d.onerror=function(){b||(b=!0,c())};d.src=a}function d(c,d,e){void 0===e&&(e=5E3);var h=document.createElement("iframe");h.style.width="30px";h.style.height="10px";h.style.position="absolute";h.style.top="-1000px";h.style.left="-1000px";
!0===e&&(e=0);var f=function(a){var c;c=a&&a.srcElement?a.srcElement:a&&a.target?a.target:this;!c.loaded&&c.parentNode&&(c.loaded=!0,d(),!1!==e&&window.setTimeout(function(){try{document.body.removeChild(c)}catch(a){}},e))};b.DOM.addEventListener(h,"load",f);b.DOM.addEventListener(h,"error",f);h.onload=function(a){f(a)};h.onerror=f;h.src=c;a.utils.DOM.appendToBody(h)}var c={};g.isLoaded=function(a){a=k(a);return Boolean(c[a]&&c[a].loaded)};g.load=f;(function(a){a[a.script=0]="script";a[a.image=1]=
"image";a[a.iframe=2]="iframe"})(g.ResourceTypes||(g.ResourceTypes={}));var h=g.ResourceTypes;g.triggerResource=function(a,c,b,g){void 0===b&&(b=h.image);void 0===g&&(g=5E3);switch(b){case h.script:f(a,c,c,!1,g);break;case h.image:e(a,c);break;case h.iframe:d(a,c,g);break;default:throw Error("Unsupported resource type");}};g.loadService=function(c,d,b){var e=a._.getCdnResource()+"/js/gigya.services."+c+".js";f(e,function(){"object"===typeof console&&console.error&&(console.error("error loading gigya service "+
c+" from url: "+e),d&&d())},b,!0)}})(b.script||(b.script={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));var __extends=this&&this.__extends||function(a,b){function g(){this.constructor=a}for(var k in b)b.hasOwnProperty(k)&&(a[k]=b[k]);a.prototype=null===b?Object.create(b):(g.prototype=b.prototype,new g)};
(function(a){(function(b){(function(b){function k(a){for(var c,d=0,h=b.adapters;d<h.length;d++){var f=h[d];if(f.isAvailable()&&(!(f.prototype instanceof e)||a)){c=new f;break}}c||(c=new l);a&&(c instanceof e?c.waitForService(function(){a(c)}):a(c));return c}var f=function(){function c(){}c.prototype.setObject=function(c,d){this.setItem(c,a.utils.JSON.serialize(d))};c.prototype.getObject=function(c){return a.utils.JSON.deserialize(this.getItem(c))};c.prototype.isPersistent=function(){return!0};return c}();
b.AbstractLocalStorageAdapter=f;var e=function(a){function c(){a.call(this);this.isLoaded=!1}__extends(c,a);c.prototype.isReady=function(){return this.isLoaded};c.prototype.waitForService=function(a){var c=this;this.isReady()?a():setTimeout(function(){return c.waitForService(a)},50)};return c}(f);b.AbstractAsyncLocalStorageAdapter=e;var d=function(c){function d(){c.call(this);this.storage=window.localStorage}__extends(d,c);d.isAvailable=function(){return a.localInfo.supportsLocalStorage};d.prototype.getItem=
function(a){return this.storage[a]};d.prototype.setItem=function(a,c,d){try{this.storage[a]=c}catch(b){}};d.prototype.removeItem=function(a){this.storage.removeItem(a)};return d}(f),c=function(c){function d(){c.call(this);this.storage=window.sessionStorage}__extends(d,c);d.isAvailable=function(){return a.localInfo.supportsSessionStorage};return d}(d),h=function(c){function d(){c.apply(this,arguments)}__extends(d,c);d.isAvailable=function(){return a.localInfo.isFF&&window.globalStorage};d.prototype.getItem=
function(a){return window.globalStorage[location.hostname][a]};d.prototype.setItem=function(a,c,d){try{window.globalStorage[location.hostname][a]=c}catch(b){}};d.prototype.removeItem=function(a){delete window.globalStorage[location.hostname][a]};return d}(f),r=function(c){function d(){var a=this;c.call(this);this.loadSwfStore(function(c){a.isLoaded=!0})}__extends(d,c);d.isAvailable=function(){return a.localInfo.supportsFlash};d.prototype.loadSwfStore=function(c){var d=this;window.SwfStore?this.initializeSwfStore(function(){return d.loadSwfStore(c)}):
a.utils.script.load("https://cdns.gigya.com/gs/js/swfstore.min.js",function(){console.log("Failed to load Gigya SwfStore.");c(!1)},function(){d.initializeSwfStore(c)},!0)};d.prototype.initializeSwfStore=function(a){this.swfStore=new SwfStore({namespace:"gigSSO",swf_url:"https://cdns.gigya.com/gs/swf/swfstore.swf",onready:function(){a(!0)},onerror:function(){console.log("Failed to initialize Gigya SwfStore.");a(!1)}})};d.prototype.getItem=function(a){return this.swfStore.get(a)};d.prototype.setItem=
function(a,c,d){this.swfStore.set(a,c)};d.prototype.removeItem=function(a){this.swfStore.clear(a)};return d}(e),p=function(c){function d(){c.apply(this,arguments)}__extends(d,c);d.isAvailable=function(){return!0};d.prototype.getItem=function(c){return a.utils.cookie.get(c)};d.prototype.setItem=function(c,d,b){a.utils.cookie.set(c,d,b)};d.prototype.removeItem=function(c){a.utils.cookie.remove(c)};return d}(f),l=function(a){function c(){a.call(this);this.memory={}}__extends(c,a);c.isAvailable=function(){return!0};
c.prototype.getItem=function(a){return this.memory[a]};c.prototype.setItem=function(a,c,d){this.memory[a]=c};c.prototype.removeItem=function(a){delete this.memory[a]};c.prototype.isPersistent=function(){return!1};return c}(f);b.adapters=[d,c,h,r,p];b.waitForService=k;var n=k();b.getItem=function(a){return n.getItem(a)};b.setItem=function(a,c,d){return n.setItem(a,c,d)};b.removeItem=function(a){return n.removeItem(a)};b.setObject=function(a,c){return n.setObject(a,c)};b.getObject=function(a){return n.getObject(a)}})(b.localStorage||
(b.localStorage={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){function k(c){c=a.utils.object.clone(c);var b=function(){var b=c.data.split("="),h=d[b[0]];if(null!=h){if("function"==typeof h.callback){var f=unescape(b[1]),f=a.utils.keyValue.deserialize(f,null,null,!0);h.callback(f,h.context)}e(b[0]);(b=document.getElementById(b[0]))&&b.parentElement&&b.parentElement.removeChild(b)}};c&&c.data&&c.data.split&&(6<=a.localInfo.iosVersion?b():window.setTimeout(b,100))}function f(c){var d=document.createElement("iframe");d.style.width=
"30px";d.style.height="10px";d.style.position="absolute";d.style.top="-1000px";d.style.left="-1000px";d.id=c;d.src="https://cdns.gigya.com/gs/LocalStorageListener.htm?mode=receive&id="+encodeURIComponent(c);a.utils.DOM.appendToBody(d);return d}function e(a){delete d[a]}var d={};b._flashListenerID="flid"+(new Date).getTime();var c=!1,h={};b._onFlashMessage=function(c){c=a.utils.keyValue.deserialize(c,null,null,!0);var b=c.id,h=d[b];null!=h&&("function"==typeof h.callback&&h.callback(c,h.context),e(b))};
b.addMessageListener=function(e,p,l,n){d[e]={callback:n,context:p,t:(new Date).getTime()};p=a.localInfo.messagingMethod;a.localInfo.isIE11&&l&&window.indexedDB&&(p=a._.MessagingMethod.LocalStorageListener);if(p==a._.MessagingMethod.LocalStorageListener||p==a._.MessagingMethod.PostMessage)p==a._.MessagingMethod.LocalStorageListener&&l&&f(e),c||(e=function(a){if(a&&a.data&&"string"===typeof a.data){var c=a.data.split("=")[0];d[c]&&k(a)}},window.addEventListener?window.addEventListener("message",e,!1):
window.attachEvent&&window.attachEvent("onmessage",e),c=!0);else{var q="localstorage";a.thisScript.globalConf.legacyCrossSiteMethod&&"localstorage"!=a.thisScript.globalConf.legacyCrossSiteMethod.toLowerCase()&&(q=a.thisScript.globalConf.legacyCrossSiteMethod);h[q]||window.setTimeout(function(){var c=document.createElement("div");c.style.width="1px";c.style.height="1px";c.style.overflow="hidden";c.style.position="absolute";c.style.left="-1000px";var d=b._flashListenerID;"localstorage"!=q&&(d=q+":"+
b._flashListenerID);var e=a.localInfo.protocol+"://"+document.location.href.split("?")[0].split("#")[0].split("/")[2],f=(new Date).getTime(),k=document.createElement("object");k.setAttribute("id","eventsBroadcaster"+f);k.setAttribute("codebase","https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0");k.setAttribute("width","50");k.setAttribute("height","50");k.setAttribute("src","https://cdns.gigya.com/GS/swf/eventsBroadcaster2.swf");k.setAttribute("data","https://cdns.gigya.com/GS/swf/eventsBroadcaster2.swf");
k.setAttribute("style","display:inline");f=document.createElement("param");f.name="movie";f.setAttribute("value","https://cdns.gigya.com/GS/swf/eventsBroadcaster2.swf");k.appendChild(f);f=document.createElement("param");f.setAttribute("name","allowScriptAccess");f.setAttribute("value","always");k.appendChild(f);f=document.createElement("param");f.setAttribute("name","FlashVars");f.setAttribute("value","action=listen&id="+d+"&eventName=loginComplete&callback=gigya.utils.xd._onFlashMessage&domain="+
e);k.appendChild(f);c.appendChild(k);a.utils.functions.invokeOnPageLoad(function(){a.utils.DOM.appendToBody(c);k.setAttribute("type","application/x-shockwave-flash");k.setAttribute("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000")});h[q]=!0},500)}};b.removeMessageListener=e})(b.xd||(b.xd={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){var k;try{k=Boolean(window.sessionStorage)}catch(f){k=!1}b.set=function(b,d){if(k){var c;try{(c=a.utils.JSON.deserialize(window.sessionStorage.getItem("gigyaCache")))||(c={}),null==d&&c[b]?delete c[b]:c[b]={response:d,time:(new Date).getTime()},window.sessionStorage.setItem("gigyaCache",a.utils.JSON.serialize(c))}catch(h){}a.utils.queue.release("cache","cache_"+b)}};b.get=function(b,d,c){if(k)try{if(!a.utils.queue.isActive("cache_"+b)){var h=window.sessionStorage.getItem("gigyaCache"),
f=a.utils.JSON.deserialize(h),g=f?f[b]:null;if(g){if(d&&d+g.time>(new Date).getTime()){c(g.response);return}a.utils.sessionCache.remove(b);g=null}if(!g){a.utils.queue.hold("cache","cache_"+b);c(null);return}}a.utils.queue.isActive("cache_"+b)&&a.utils.queue.waitFor("cache_"+b,a.utils.sessionCache.get,arguments)}catch(l){c(null)}else"function"==typeof c&&c(null)};b.remove=function(b){a.utils.sessionCache.set(b,null)}})(b.sessionCache||(b.sessionCache={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){var k=navigator.userAgent.toLowerCase(),f=null;b.isModern=function(){return a.localInfo.isChrome||a.localInfo.isFF||a.localInfo.isOpera||a.localInfo.isIOSWebView||a.localInfo.isIE&&9<=a.utils.browser.getVersion()||a.localInfo.isEdge||a.localInfo.isSafari&&4<=a.utils.browser.getVersion()||a.localInfo.isGoogleBot};b.getVersion=function(){if(f)return f;try{var a=k.match(/(opera|chrome|safari|firefox|msie|trident.*rv:)\/?\s*(\.?\d+(\.\d+)*)/i);if(a[2]){var d=a[2].split(".")[0];
if(!isNaN(parseInt(d)))return f=parseInt(d)}}catch(c){}return 0}})(b.browser||(b.browser={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){function k(a){if(!f[a])return!1;for(var d in f[a].ids)return!0;return!1}var f={};b._servicesStatus=function(){var a={},d;for(d in f)k(d)?a[d]={active:!0,waitingFor:f[d].ids,queuedCount:f[d].q.length}:a[d]={active:!1};return a};b.isActive=k;b.release=function(a,d){if(f[d]&&(delete f[d].ids[a],!k(d))){var c=f[d].q;for(f[d].q=[];0<c.length;){var b=c.splice(0,1)[0];try{b.func.apply(this,b.args)}catch(g){"object"==typeof console&&console.log&&console.log("Gigya: Exception while invoking queued method ("+
d+": "+a+")")}if(k(d)){f[d].q=c;break}}}};b.hold=function(a,d){f[d]||(f[d]={q:[],ids:{}});f[d].ids[a]=!0};b.waitFor=function(a,d,c){f[a]||(f[a]={q:[],ids:{}});f[a].q.push({func:d,args:c})};b.queueForExecution=function(b,d,c){c=c||[];a.utils.queue.isActive(b)?a.utils.queue.waitFor(b,d,c):d.apply(this,c)}})(b.queue||(b.queue={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b.redirect=function(b,f,e,d){if(e&&"post"==e.toLowerCase()){e=document.createElement("form");var c=[];e.setAttribute("accept-charset","UTF-8");e.setAttribute("method","POST");e.setAttribute("action",b);d&&e.setAttribute("target",d);b=a.utils.object.merge(f);for(var h in b)"boolean"!=typeof b[h]&&"string"!=typeof b[h]||"eventName"==h||c.push('<textarea name="'+encodeURIComponent(h)+'">'+b[h].toString().replace(/\&/g,"&amp;")+"</textarea>");e.innerHTML=c.join("");
e.style.display="none";a.utils.DOM.appendToBody(e);e.submit()}else{e=b.split("?");b=e[0];d={};if(1<e.length)for(e=e[1].split("&"),c=0;c<e.length;c++){var g=e[c].split("=");d[decodeURIComponent(g[0])]=decodeURIComponent(g[1])}for(e=0;e<f.length;e++)for(h in c=f[e],c)"boolean"!=typeof c[h]&&"number"!=typeof c[h]&&"string"!=typeof c[h]||"eventName"==h||(d[h]=c[h]);f=[];for(h in d)f.push(h+"="+encodeURIComponent(d[h]));document.location.href=b+"?"+f.join("&")}}})(b.HTTP||(b.HTTP={}))})(a.utils||(a.utils=
{}))})(gigya||(gigya={}));(function(a){(function(b){(function(b){b.onHotKeyClicked=function(b,f){a.utils.DOM.addEventListener(b.elementContext?b.elementContext:document.body,"keyup",function(a){a.which==b.key&&f()})}})(b.keyboard||(b.keyboard={}))})(a.utils||(a.utils={}))})(gigya||(gigya={}));(function(a){a.socialize={};a.gcs={};a.gm={};a.comments={};a.accounts={};a.chat={};a.gscounters={}})(gigya||(gigya={}));
(function(a){(function(b){var g={};b.getApi=function(a){return g[a]};var k=function(){function b(a,d){this.methodName=a;this.settings=d;this.addAlias();g[a]=this}b.prototype.preprocessRequest=function(a,d){this.settings.preprocessor?this.settings.preprocessor(a,d):d()};b.prototype.addAlias=function(){var b=this;a.utils.functions.createAlias("gigya."+this.methodName,function(){for(var d=[],c=0;c<arguments.length;c++)d[c-0]=arguments[c];var h=a.utils.object.merge([d]),d=function(){var c=a.utils.object.merge([a.thisScript.globalConf,
h]);b.run(c)};a.thisScript&&a.thisScript.globalConf?d():a.utils.queue.queueForExecution("API",d)})};return b}();b.BaseApi=k})(a._||(a._={}))})(gigya||(gigya={}));(function(a){a.defaultEventMaps=a.defaultEventMaps||[]})(gigya||(gigya={}));
(function(a){(function(b){function g(a){return"on"===a.substring(0,2)?a:"on"+a.substring(0,1).toUpperCase()+a.substring(1)}function k(b,e){var d;try{"function"==typeof b?d=b(e):b instanceof Array?a.utils.array.forEach(b,function(c){"function"==typeof c?c(e):a.log.addLog("Not a function registered to event: "+c,c)}):a.log.addLog("Not a function or function array registered to event",b)}catch(c){a.log.addLog("Error invoking function registered to event",b)}return d}(function(b){function e(c,b,d,e){var f=
function(c){var d=0;c.cancel||(d=a.events.global.dispatch(c,b));e&&e(d)};d?d(c,f):f(c)}var d={},c={};b._activeNamespaces={};b.add=function(b,f,k,l,n,q){void 0===k&&(k="other");void 0===n&&(n="socialize");b=n+"_"+g(b);d[b]||(d[b]=[]);f={handler:f,type:k,context:l,params:q,fullEventName:b};d[b].push(f);!this._activeNamespaces[n]&&a._.apiAdapter&&a._.apiAdapter.registerForNamespaceEvents(n);this._activeNamespaces[n]=1;if((n=c[b])&&"other"==k)for(c[b]=[],k=0;k<n.length;k++)b=n[k],e(b.eventObj,b.params,
b.preProcess);return f};b.remove=function(c,b){d[c]&&a.utils.array.removeByValue(d[c],b)};b.dispatch=function(c,b){var e=0,f=c.isInternal,k=c.eventName.split(",");a.log.addLog('Dispatching global event "'+c.eventName+'" with this event object',c);for(var q=0;q<k.length;q++){var m=k[q].split("."),t=1<m.length?m.shift():"socialize",u=m[0],m=g(u),v=a.utils.object.clone(d[t+"_"+m]);v||(v=[]);m=a.utils.object.clone(c);m.isGlobal=!0;m.eventName=u;b&&(b.source&&(m.source=b.source),b.sourceData&&(m.sourceData=
b.sourceData),b.context&&(m.context=b.context));u=["component"];f||u.push("other");for(var w=0;w<u.length;w++)for(var A=u[w],x=0;x<v.length;x++){var z=v[x];if(z.type==A){var y=a.utils.object.clone(m);null==y.context&&null!=z.context&&(y.context=z.context);null==y.context&&delete y.context;"component"!=A&&(e++,a._.handleSpecialFields(y));z.params&&z.params.signKey&&(y.UIDSignature=c.signKeysUIDSignature[z.params.signKey],delete y.signKeysUIDSignature);try{z.handler(y)}catch(B){a.log.addLog('Error while trying to invoke "'+
c.eventName+'" global event handler',B)}}}f||a.events._dispatchFromMaps(m,!0);v=window.GenesisExchange_Gigya;u=window.gigya_omniture_conf;w=window.myOmnitureIntegrationFunc;f||"undefined"==typeof v||"undefined"==typeof u||"socialize"!=t||((new v(u)).processAction(m),"undefined"!=typeof w&&w(u,m))}return e};b.dispatchWhenHandlerAdded=function(a,b,d){void 0===b&&(b={});var f=a.eventName.split("."),g=1<f.length?f.shift():"socialize",k=f[0];e(a,b,d,function(e){0==e&&(e="on"+k.substring(0,1).toUpperCase()+
k.substring(1),e=g+"_"+e,c[e]||(c[e]=[]),c[e].push({eventObj:a,params:b,preProcess:d}))})};b.getEventsForOperation=function(a){var c=[];-1!=a.toLowerCase().indexOf("login")?(this._activeNamespaces.socialize&&c.push("socialize.login"),this._activeNamespaces.accounts&&c.push("accounts.login")):-1!=a.toLowerCase().indexOf("addconnection")&&this._activeNamespaces.socialize&&c.push("socialize.connectionAdded");return c.join(",")}})(b.global||(b.global={}));b.addMap=function(b){a.defaultEventMaps.splice(0,
0,b)};b.dispatchErrorFromResponse=function(b,e,d){e||(e={});var c=e;c.response&&(c=c.response);e={eventName:"error",status:c.status?c.status:"FAIL",statusMessage:c.statusMessage?c.statusMessage:"General Server Error",errorMessage:c.errorMessage?c.errorMessage:"General Server Error",errorDetails:c.errorDetails?c.errorDetails:"",errorCode:c.errorCode?c.errorCode:500001,response:e};a.utils.object.add(e,d);a.events.dispatchForWidget(e,b)};b.dispatchInvalidParamError=function(b,e){var d={eventName:"error"};
"undefined"==typeof b[e]||null==b[e]?(d.errorCode=400002,d.errorMessage="Missing_required_parameter ("+e+")"):(d.errorCode=400006,d.errorMessage="Invalid_parameter_value ("+e+")");d.status=d.errorCode;d.statusMessage=d.errorMessage;a.events.dispatchForWidget(d,b)};b.dispatchForWidget=function(b,e){if(b&&b.eventName){var d=b.eventName;a.log.addLog('Dispatching widget event "'+d+'" for '+e.lastSource+" with this event object",b);a._.handleSpecialFields(b);for(var c=d.split(","),h,r=0;r<c.length;r++){var d=
c[r],p=g(d);e&&(e.context&&(b.context=e.context),e.source&&(b.source=e.source),e.sourceData&&(b.sourceData=e.sourceData),e.containerID&&(b.sourceContainerID=e.containerID),e.instanceID&&(b.instanceID=e.instanceID));e[p]&&(h=k(e[p],b));"undefined"===typeof h&&(h=!0);if(-1==d.indexOf("login")&&-1==d.indexOf("logout")&&"connectionRemoved"!=d&&"connectionAdded"!=d){this._dispatchFromMaps(b);var d=window.GenesisExchange_Gigya,p=window.gigya_omniture_conf,l=window.myOmnitureIntegrationFunc;"undefined"!=
typeof d&&"undefined"!=typeof p&&((new d(p)).processAction(b),"undefined"!=typeof l&&l(p,b))}}return h}};b.dispatchEventObject=k;b._dispatchFromMaps=function(b,e){for(var d=[],c=!1,h=0;h<a.defaultEventMaps.length;h++){for(var g=a.defaultEventMaps[h].eventMap,k=a.defaultEventMaps[h].defaultMethod,l=0;l<g.length;l++){var n=g[l],q=[];n.args||(n.args=[]);for(var m=0;m<n.args.length;m++)"$event"==n.args[m]?q.push(b):q.push(a.utils.templates.fill(n.args[m],b));n.events.split(",");m=","+n.events.toLowerCase()+
",";-1==m.indexOf(",*,")&&(-1==m.indexOf(",on"+b.eventName.toLowerCase()+",")&&-1==m.indexOf(","+b.eventName.toLowerCase()+",")||(b.source||n.sources)&&n.sources&&-1==n.sources.indexOf(b.source))||(d.push(n),(n.method?n.method:k).apply(this,q),n.override&&(c=!0))}if(c)break}}})(a.events||(a.events={}))})(gigya||(gigya={}));
(function(a){(function(b){var g=function(g){function f(a,b,c,h,f,p){void 0===h&&(h={});void 0===f&&(f={});g.call(this,a,h);this.schema=b;this.requiresSession=c;this.settings=h;this.adapterSettings=f;this.altSessionParams=p;"undefined"===typeof f.requiresSession&&(f.requiresSession=function(){return c})}__extends(f,g);f.prototype.run=function(e){var d=this;e.ignoreApiQueue?(new b.ServerApiRequest(d,e)).start():a.utils.queue.queueForExecution("API",function(){(new b.ServerApiRequest(d,e)).start()})};
return f}(b.BaseApi);b.ServerApi=g})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){function g(a){return{status:"OK",statusMessage:"",errorCode:0,statusCode:0,errorMessage:"",errorDetails:"",statusReason:"",originalResponse:a}}var k;a.events.global.add("onFBCRefreshed",function(){k=!1},"component");var f;(function(a){a[a._unknown=0]="_unknown";a[a.facebook=1]="facebook";a[a.yahoo=2]="yahoo";a[a.googleplus=3]="googleplus";a[a.linkedin=4]="linkedin";a[a.samlProvider=5]="samlProvider";a[a.samlSession=6]="samlSession"})(f||(f={}));var e=function(){function d(c,
b){this.api=c;this.params=a.utils.object.merge([a.utils.object.clone(b),c.settings.defaultParams]);this.originalParams=a.utils.object.clone(b);this.callback=b.callback}d.prototype.start=function(){var c=this;b.apiAdapter.isSessionValid(this.params,function(b){!c.api.adapterSettings.requiresSession()||b||c.doesHaveAltSessionParam()?c.sendRequest(b):c.afterServerApiResponse(a.utils.object.clone({status:"FAIL",errorMessage:"Unauthorized user",statusMessage:"Unauthorized user",errorCode:403005}),!1)})};
d.prototype.sendRequest=function(c){var d=this,e=a.utils.object.merge([this.api.adapterSettings,{cacheTimeout:this.params.cacheTimeout,forceGigyaDomain:!c&&this.api.adapterSettings.forceGigyaDomain}]);this.beforeRequest(c,function(f){f?d.afterServerApiResponse(f,c):(a.events.global.dispatch({eventName:"beforeRequest",methodName:d.api.methodName,rawParams:d.originalParams,params:d.params},d.originalParams),d.api.settings.oauth?b.apiAdapter.sendOauthRequest(d.api.methodName,d.params,function(a){d.afterServerApiResponse(a,
c)},e):b.apiAdapter.sendRequest(d.api.methodName,d.params,function(a){d.afterServerApiResponse(a,c)},e))})};d.prototype.beforeRequest=function(c,d){var e=this;a.external.backplane.isLoaded()&&!a.external.backplane._ready&&b.loginMethods[this.api.methodName]?a.external.backplane.executeOnInit(function(){e.beforeRequest(c,d)}):(a._.logoutMethods[this.api.methodName]&&(!c&&!this.params.regToken||a.partnerSettings.ssoLogoutUrl&&document.location.href==a.partnerSettings.ssoLogoutUrl)&&d(g(null)),this.handleDeprecatedParams(),
this.handleCollections(),this.handleConnectWithoutLoginBehavior(c),this.params.extraPermissions=this.params[this.params.provider+"ExtraPermissions"]||this.params.permissions,this.api.preprocessRequest(this.params,function(){e.setOverridableParams(function(){e.setNonOverridableParams(c,function(){e.filterParams(e.params);a.log.logCall(e.api.methodName,e.originalParams,e.originalParams.lastSource);d()})})}))};d.prototype.setOverridableParams=function(c){a.utils.object.merge([{},this.params]);c()};d.prototype.doesHaveAltSessionParam=
function(){if(this.api.altSessionParams){for(var a=this.api.altSessionParams.split("|"),b=0;b<a.length;b++)if(this.params[a[b]])return!0;return!1}};d.prototype.setNonOverridableParams=function(c,d){if(null!=this.params.APIKey){var e=a.utils.cookie.get("gltexp_"+this.params.APIKey);null!=e&&(this.params.loginTokenExp=e)}(e=a.utils.cookie.get("_gigRefUid_"+this.params.APIKey))&&(c||b.loginMethods[this.api.methodName])&&(this.params.refUID=e);if(a.providersConfig.facebook&&!k){var e=a.external.facebook.getParams(),
f;for(f in e)this.params[f]=e[f];k=!0}0===this.api.methodName.indexOf("accounts.")&&(a.events.global._activeNamespaces.socialize&&null==this.params.includeUserInfo&&(this.params.includeUserInfo=!0),this.params.include=this.params.include?this.params.include+",":"profile,data");"accounts.getSchema"===this.api.methodName&&(this.params.includeDynamicSchema="clientOnly");(f=a.external.backplane.getChannelId())&&(this.params.bp_channel_url=f);this.params.targetEnv="jssdk";d()};d.prototype.handleDeprecatedParams=
function(){this.params.pendingRegistration?this.params.pending_registration=this.params.pendingRegistration:this.params.newUsersPendingRegistration&&(this.params.pending_registration=this.params.newUsersPendingRegistration);this.params.alwaysForceAuthentication&&(this.params.forceAuthentication=!0);this.params.timestamp&&(this.params.UIDTimestamp=this.params.timestamp,delete this.params.timestamp);this.params.signature&&0===this.api.methodName.indexOf("socialize.")&&(this.params.UIDSig=this.params.signature,
delete this.params.signature);this.params.nonce&&(this.params.UIDNonce=this.params.nonce,delete this.params.nonce);this.params.format&&!this.params.dataFormat&&(this.params.dataFormat=this.params.format,delete this.params.format)};d.prototype.handleCollections=function(){this.params.recipients&&(this.params.recipients=this.extractListOfGIGUIDs(this.params.recipients));if(this.params.friends){var a=this.extractListOfGIGUIDs(this.params.friends);0<this.params.UIDs.length&&(this.params.UIDs+=",");this.params.UIDs+=
a}};d.prototype.extractListOfGIGUIDs=function(c){var b=this;switch(typeof c){case "string":return c;case "object":if("undefined"!==typeof c.UID)return c.UID;if(c instanceof a.socialize.Collection){var d=[];c.each(function(a,c){var e=b.extractListOfGIGUIDs(a);null!=e&&""!=e&&d.push(e)});return d.join(",")}}};d.prototype.handleConnectWithoutLoginBehavior=function(a){if("socialize.addConnection"===this.api.methodName){var d=this.params.connectWithoutLoginBehavior;"string"===typeof d&&(d=d.toLowerCase());
"loginexistinguser"===d&&(this.params.loginIfExists=!0);a||(this.api=b.getApi("socialize.login"),"alwayslogin"!==d&&(this.params.temporary_account=!0))}};d.prototype.filterParams=function(c){this.params=a.utils.object.extractProperties(c,{},this.getFullSchema())};d.prototype.getFullSchema=function(){if(null==this.api.schema)return"";for(var c=(this.api.schema+"|"+a._.defaultApiSchema).split("|"),b=0;b<c.length;b++){var d=c[b];if(-1!==d.toLowerCase().indexOf("[providercapability=")){for(var e=d.toLowerCase().split("=")[1].split("]")[0],
d=d.split("]")[1],e=a.socialize.getProvidersForRequiredCapabilities(a.socialize.getProvidersByName("*"),[e]),f=[],g=0;g<e.length;g++)f.push(e[g].name+d);c[b]=f.join("|")}}return c.join("|")};d.prototype.preprocessServerResponse=function(c){c.userInfo&&0!==this.api.methodName.indexOf("accounts.")&&("string"===typeof c.userInfo&&(c.userInfo=a.utils.JSON.deserialize(c.userInfo)),c.userInfo&&(c=a.utils.object.merge([c.userInfo,c]),c.errorCode=c.userInfo.errorCode,delete c.userInfo));c.accountInfo&&"string"===
typeof c.accountInfo&&(c.accountInfo=a.utils.JSON.deserialize(c.accountInfo),c.accountInfo&&(c=a.utils.object.merge([c.accountInfo,c]),delete c.accountInfo));try{c.settings&&"string"==typeof c.settings&&(c.settings=a.utils.JSON.deserialize(c.settings))}catch(b){}return c};d.prototype.onAfterLogoutMethod=function(){a.external.backplane.resetChannel()};d.prototype.getExpiredSessionResponse=function(a){switch(this.api.methodName){case "socialize.setUserSettings":this.originalParams.disableLocalSettings||
(b.setGigyaSettings(this.params.group,this.params.settings),a=g(a));break;case "socialize.delUserSettings":this.originalParams.disableLocalSettings||(b.delGigyaSettings(this.params.group),a=g(a));break;case "socialize.getUserSettings":if(!this.originalParams.disableLocalSettings){var d=b.getGigyaSettings(this.params.group);a=g(a);a.settings=d}break;case "socialize.getUserInfo":a.status="OK";a.statusMessage="";a.errorCode=0;a.statusCode=0;a.errorMessage="";a.errorDetails="";a.statusReason="";break;
case "accounts.logout":case "socialize.logout":a=g(a)}return a};d.prototype.afterServerApiResponse=function(c,d){var e=this;b.checkCompleteRegistration(c,this.originalParams,function(f,g,k){c=f;c=e.preprocessServerResponse(c);if(b.logoutMethods[e.api.methodName]&&0==c.errorCode&&c.logoutActiveSession)e.onAfterLogoutMethod();403005==c.errorCode&&(c=e.getExpiredSessionResponse(c));0==c.errorCode&&(d||b.loginMethods[e.api.methodName])&&a.utils.cookie.remove("_gigRefUid_"+e.originalParams.APIKey);e.handleMethodResponse(c,
function(f){c=f;e.addDefaultResponseProperties(c);b.handleSpecialFields(c);e.logoutFromProvidersIfNeeded(c,function(b){b?e.sendRequest(d):(g||e.generateEventsFromResponse(c,d),k?e.sendRequest(d):(a.events.global.dispatch({eventName:"afterResponse",methodName:e.api.methodName,filteredParams:e.params,response:c},e.originalParams),"function"===typeof e.callback&&(a.log.addLog("Calling callback for "+e.api.methodName+" with this response object",c),e.callback(c)),e.api.settings.postprocessor&&e.api.settings.postprocessor(e.originalParams,
c)))})})})};d.prototype.addDefaultResponseProperties=function(a){delete a.statusCode;delete a.statusReason;a.errorCode=a.errorCode||0;a.status=a.status||(0==a.errorCode?"OK":"FAIL");a.errorMessage=a.errorMessage||"";a.statusMessage=a.statusMessage||a.errorMessage;a.requestParams=this.originalParams;a.requestParams.password&&delete a.requestParams.password;a.context=this.originalParams.context;var b=this.api.methodName.split(".")[0];a.operation="socialize"==b?this.api.methodName.split(".")[1]:"/"+
this.api.methodName};d.prototype.handleMethodResponse=function(c,d){if(0==c.errorCode)switch(this.api.methodName){case "accounts.socialLogin":case "socialize.login":c.newUser=c.x_newUser?!0:!1,delete c.x_newUser;case "socialize.notifyLogin":case "socialize.addConnection":case "accounts.linkAccounts":case "accounts.finalizeRegistration":case "accounts.login":case "accounts.register":case "socialize.getUserInfo":delete c.login_token;delete c.expires_in;delete c.id;c.code&&(c.authCode=c.code,delete c.code);
if(!(c.authCode||"socialize.notifyLogin"==this.api.methodName&&this.params.authCode)){var e=c;c.userInfo&&(e=c.userInfo,delete c.userInfo);-1==this.api.methodName.indexOf("accounts.")?(c={user:e},a.utils.object.extractProperties(e,c,"status|statusMessage|callId|errorCode|errorMessage|errorDetails|settings|context|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID|profile|data|newUser|signKeysUIDSignature"),c.user.hasOwnProperty("UIDSig")&&(c.signature=c.user.UIDSig),e.profile&&delete e.profile,
e.data&&delete e.data,delete e.status,delete e.statusMessage,delete e.callId,delete e.errorCode,delete e.errorMessage,delete e.errorDetails,delete e.settings,delete e.context):c!=e&&(c.user=e);""==e.age||isNaN(parseInt(e.age))||(e.age=parseInt(e.age));e.suppressEvents&&(c.suppressEvents=!0);if("string"==typeof e.capabilities){var f=e.capabilities;f||(f="");"object"!=typeof e.capabilities&&(e.capabilities={});f=f.toLowerCase();e.capabilities={actions:-1<f.indexOf("actions"),friends:-1<f.indexOf("friends"),
login:-1<f.indexOf("login"),status:-1<f.indexOf("status"),notifications:-1<f.indexOf("notifications"),contacts:-1<f.indexOf("contacts"),photos:-1<f.indexOf("photos")}}b.convertIdentitiesArrayToObject(e);"string"==typeof e.providers&&(e.providers=e.providers.split(","));this.params.group&&!c.settings&&(e=b.getGigyaSettings(this.params.group),c.settings=e)}break;case "socialize.getAvailableProviders":e={};for(f=0;f<c.availableProviders.length;f++)e[c.availableProviders[f].name]=c.availableProviders[f];
c.availableProviders=e}"socialize.removeConnection"===this.api.methodName&&0==c.errorCode?a.socialize.getUserInfo(this.originalParams,{callback:function(a){d(a)}}):d(c)};d.prototype.logoutFromProvidersIfNeeded=function(c,d){var e=c.errorCode;if(b.logoutMethods[this.api.methodName]&&0==e){c.logoutActiveSession&&a._.apiAdapter.clearSession(this.params.APIKey);var g=[],e=5E3,k=0,n;c.connectedProviders?n=c.connectedProviders.toLowerCase():c.provider&&(n=c.provider.toLowerCase());if(n&&!a.utils.validation.isExplicitFalse(this.originalParams.forceProvidersLogout)){var q=
n.split(",");for(n=0;n<q.length;++n){var m=q[n],t=f[m],u=null,v=5E3;0===m.indexOf("saml-")&&(t=f.samlProvider,u=m.substring(5),v=!1,e=1E4,k=5E3);g.push({type:t,data:u,removeAfter:v})}}if(c.samlContext&&c.connectedSamlSessions)for(q=c.samlContext,m=c.connectedSamlSessions.split(","),n=0;n<m.length;++n)g.push({type:f.samlSession,data:{samlContext:q,samlSession:m[n]},removeAfter:!1}),e=1E4,k=5E3;if(g.length){var w=0,A=!1,x=function(){A||(A=!0,d(!1))};window.setTimeout(x,e);e=function(){w++;w===g.length&&
window.setTimeout(x,k)};for(n=0;n<g.length;n++)this.logoutFromProvider(g[n],e)}else d(!1)}else 403013==c.errorCode&&"accounts.verifyLogin"!==this.api.methodName?a.accounts.verifyLogin({callback:function(a){0==a.errorCode?d(!0):d(!1)}}):d(!1)};d.prototype.logoutFromProvider=function(c,b){var d="",e=!1,g=!0,k;k=a.partnerSettings.customAPIDomainPrefix?a.partnerSettings.customAPIDomainPrefix+"."+a.partnerSettings.baseDomain:"fidm."+a.partnerSettings.plugins.apiDomain;switch(c.type){case f.facebook:if(a.providersConfig.facebook){a.socialize.waitForService({service:"facebook",
callback:function(){a.external.facebook.isLoggedIn&&FB.logout?FB.logout(function(){a.external.facebook.refreshSession();a.utils.cookie.remove("fblo_"+a.providersConfig.facebook.appID);b()}):b()}});return}break;case f.yahoo:d="https://login.yahoo.com/config/login?.src=fpctx&logout=1&r=";break;case f.googleplus:d="https://accounts.google.com/logout";g=!1;break;case f.samlProvider:d=a.utils.URL.addParamsToURL("https://"+k+"/saml/v2.0/"+this.params.APIKey+"/sp/jsslo",{name:c.data});e=!0;g=!1;break;case f.samlSession:d=
a.utils.URL.addParamsToURL("https://"+k+"/saml/v2.0/"+this.params.APIKey+"/idp/slo/continue/",c.data),e=!0,g=!1}d?(g&&(d+=(new Date).getTime()),a.utils.script.triggerResource(d,b,e?a.utils.script.ResourceTypes.iframe:a.utils.script.ResourceTypes.image,c.removeAfter)):b()};d.prototype.generateEventsFromResponse=function(c,d){var e=this,f;if(0==c.errorCode)switch(this.api.methodName){case "accounts.logout":case "socialize.logout":case "socialize.unlinkAccounts":case "socialize.deleteAccount":f={eventName:"logout,accounts.logout"};
break;case "socialize.linkAccounts":case "socialize.setUID":b.addUserInfoToEvent(c,f,!0);break;case "socialize.removeConnection":f={eventName:"connectionRemoved,disconnect",provider:this.params.provider||""};b.addUserInfoToEvent(c,f);break;case "socialize.addConnection":!d&&c.user.isLoggedIn?(f={eventName:"login",provider:this.params.provider},b.addUserInfoToEvent(c,f,!0)):(f={eventName:"connectionAdded,connect",provider:this.params.provider},b.addUserInfoToEvent(c,f));break;case "accounts.linkAccounts":case "accounts.finalizeRegistration":case "accounts.login":case "accounts.register":case "accounts.socialLogin":this.dispatchAccountsLoginEvent(c);
case "socialize.finalizeRegistration":case "socialize.register":case "socialize.login":if(!c.user&&!c.authCode)break;f={eventName:"login"};var g=this.params.provider;if(!g&&c.providerSessions)for(var k in c.providerSessions){g=k;break}f.provider=g||"site";f.loginMode=this.originalParams.loginMode||"standard";f.newUser=c.newUser||!1;c.authCode&&(f.authCode=c.authCode);b.addUserInfoToEvent(c,f,!0);c.user&&g&&(g=g.toLowerCase(),a.utils.cookie.set("_gig_llp",g),a.utils.cookie.set("_gig_llu",c.user.firstName||
""));break;case "socialize.notifyLogin":this.params.authCode||(f||(f={eventName:"login"}),f.provider="site",b.addUserInfoToEvent(c,f,!0));break;case "gm.notifyAction":a.events.global.dispatch({eventName:"actionNotified",isInternal:!0})}b.loginMethods[this.api.methodName]&&this.originalParams.redirectURL&&f&&f.user&&0==c.errorCode&&a.utils.HTTP.redirect(this.originalParams.redirectURL,[f,f.user],this.originalParams.redirectMethod);0==c.errorCode&&f&&"login"===f.eventName&&!c.profile&&a.events.global._activeNamespaces.accounts&&
-1===this.api.methodName.indexOf("accounts")&&a.accounts.getAccountInfo(this.originalParams,{include:"profile,data",includeUserInfo:!1,callback:function(a){e.dispatchAccountsLoginEvent(a)}});null!=f&&(f.context=this.originalParams.context,a.events.global.dispatch(f,this.originalParams))};d.prototype.dispatchAccountsLoginEvent=function(c){var b={eventName:"accounts.login",remember:a.utils.validation.isExplicitTrue(this.originalParams.remember),provider:this.originalParams.provider?this.originalParams.provider.toLowerCase():
"",loginMode:this.originalParams.loginMode||"standard"};a.utils.object.extractProperties(c,b,"newUser|signature|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID|profile|data|signKeysUIDSignature");a.events.global.dispatch(b,this.originalParams)};return d}();b.ServerApiRequest=e})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){b.__pluginsCoreLoaded=!1;var g={showReactionsBarUI:["barID"],showCommentsUI:["categoryID","streamID"],showFeedUI:["feedID"],showChatUI:["configID","streamID","chatID"]},k=function(f){function e(a,c,b,g,k,l){void 0===b&&(b={});void 0===g&&(g={});void 0===k&&(k="");void 0===l&&(l={});f.call(this,e.getApiName(c,a,l),l);this.methodName=a;this.jsName=c;this.settings=l;l.defaultParams=b||{};l.defaultPopupParams=g||{};l.requiredParams=k||""}__extends(e,f);e.getApiName=function(a,
c,b){void 0===b&&(b={});return b.apiName||a.split(".")[0]+"."+c};e.versionSelector=function(d,c,e,f,g){void 0===g&&(g="version");var k=new b.api.VersionSelector(d,f,e);a.utils.functions.createAlias("gigya."+c+"."+d,function(){for(var b=[],c=0;c<arguments.length;c++)b[c-0]=arguments[c];var d=b[0],c=b[1];c||(c=d,d=null);c||(c={},b.push(c));d=a.utils.object.merge([{},d,c]);k.callVersion(""+d[g],c,b)});return k};e.createApi=function(a,c,b,f,g,k){void 0===g&&(g={});g.useBasePlugin=!0;a=new e(a,f,null,
null,null,g);a.namespace=c;a.className=b;a.instanceMethods=k||[];a.addInstanceMethodsAliases();return a};e.prototype.addInstanceMethodsAliases=function(){for(var a=0;a<this.instanceMethods.length;a++)this.createInstanceMethodAlias(this.instanceMethods[a])};e.prototype.createInstanceMethodAlias=function(d){var c=this;a.utils.functions.createAlias("gigya."+this.namespace+"."+d,function(e){if(c.injectionInfo){var f=c.getPublicMethod(d),g=b.plugins.getPluginInstance(e,c.injectionInfo);if(g){var k=[];
a.utils.array.forEach(f.argNames,function(a){a&&void 0!==e[a]&&k.push(e[a])});g[f.instanceMethod].apply(g,k)}else a.log.addLog("couldn't find instance",c,!1)}else a.log.addLog("invalid injection info",c,!1)})};e.prototype.getPublicMethod=function(a){var c;this.injectionInfo.publicMethods&&(c=this.injectionInfo.publicMethods[a]);if(!c)throw Error("public method "+a+" is not configured for "+this.injectionInfo.name);return c};e.prototype.preprocessRequest=function(a,c){var b=this;f.prototype.preprocessRequest.call(this,
a,function(){a.source||b.setSourceData(a);c&&c()})};e.prototype.run=function(b){var c=this;!this.settings.waitForAPIQueue||b.ignoreApiQueue?this.startUI(b):a.utils.queue.queueForExecution("API",function(){c.startUI(b)})};e.prototype.startUI=function(b){var c=this;b=a.utils.object.clone(b);this.prepareParameters(b);this.preprocessRequest(b,function(){c.settings.useBasePlugin?c.loadPluginJS(b,function(e){a.utils.queue.queueForExecution("UI",function(){e&&c.className&&(c.pluginType=eval("gigya._.plugins."+
c.className),c.injectionInfo=c.pluginType.injectionInfo(c));var f=function(){c.startPlugin(b)};0==b.waitForDebug?f():a.utils.queue.queueForExecution("debug",f)})}):c.legacyStartUI(b)})};e.prototype.startPlugin=function(d){var c=this;a.events.global.dispatch({eventName:"beforePluginRequest",methodName:this.methodName,params:d},d);var e=d.originalMethodName||this.methodName;a.log.logCall(e,d);a.reports.reportLoad(e,d);if(this.pluginType){d&&(e=b.plugins.getPluginInstance(d,this.injectionInfo))&&e.dispose&&
!d._allowMultipleInstances&&!d.newModal&&e.dispose();e=new this.pluginType(d,this.injectionInfo);b.plugins.setPluginInstance(d,this.injectionInfo,e);e.onDisposedEvent().add(function(){return b.plugins.removePluginInstance(d,c.injectionInfo)});e.start();if(e.containerID){var f=document.getElementById(e.containerID);f&&(f.gigyaPluginInstance=e)}d.getInstance&&d.getInstance(e)}else a.utils.functions.callFunction("gigya."+this.jsName+"."+this.methodName,[d,d,d])};e.prototype.loadPluginJS=function(d,c){if(this.wasPluginJSLoaded(d))c&&
c(!1);else{var e=!1,f=a._.getCdnResource("/js/"),g="gigya.services."+this.jsName,k=f+g+".min.js"+(d.lang?"?lang="+d.lang:""),f=f+"gigya.services.plugins.base.min.js?services="+g+(d.lang?"&lang="+d.lang:"");b.__pluginsCoreLoaded?g=k:(g=f,e=b.__pluginsCoreLoaded=!0,a.utils.queue.hold("pluginsJS","UI"));a.utils.script.load(g,null,function(){e&&a.utils.queue.release("pluginsJS","UI");c&&c(!0)},!0,void 0,[k,f])}};e.prototype.wasPluginJSLoaded=function(b){var c="gigya."+this.jsName+"."+this.methodName,
e="gigya.services."+this.jsName+".js";try{var f=eval(c),g=a.i18n[e][b.lang]}catch(k){return!1}return"undefined"!==typeof f&&"undefined"!==typeof g};e.prototype.setSourceData=function(a){a.source="socialize.showSimpleShareUI"==this.methodName?"socialize.showShareUI":a.originalMethodName||this.methodName;if(!a.sourceData&&g[this.methodName]){for(var b={},e,f=0;f<g[this.methodName].length;f++){var k=g[this.methodName][f];null!=a[k]&&(e=!0,b[k]=a[k])}e&&(a.sourceData=b)}a.pluginsStack||(a.pluginsStack=
[]);a.pluginsStack.push({source:this.methodName});a.lastSource=this.methodName};e.prototype.validateRequiredParams=function(b){for(var c=this.settings.requiredParams.split("|"),e=0;e<c.length;e++){var f=c[e];if(""!=f&&(null==b[f]||""==b[f]))return a.events.dispatchInvalidParamError(b,f),!1}return!0};e.prototype.setDefaultParams=function(a){var b=!a.containerID||a.isPopup,e;for(e in this.settings.defaultParams)null==a[e]&&(a[e]=b&&this.settings.defaultPopupParams[e]?this.settings.defaultPopupParams[e]:
this.settings.defaultParams[e]);if(b)for(e in this.settings.defaultPopupParams)a[e]||(a[e]=this.settings.defaultParams[e])};e.prototype.prepareParameters=function(b){for(var c in b)-1!=c.toLowerCase().indexOf("provider")&&"string"==typeof b[c]&&(b[c]=a._.providers.replaceProviderAliases(b[c]));b.lang||(b.lang=a.thisScript.lang.langCode);b.source?b.isPopup=!1:this.setSourceData(b)};e.prototype.legacyStartUI=function(b){var c=this,e=b.containerID;if(this.settings.ignoreContainerId)e=b.containerID="";
else if(null==b.containerID&&!this.settings.allowPopup||b.containerID&&!document.getElementById(b.containerID)){a.events.dispatchInvalidParamError(b,"containerID");return}var f=this.settings.allowPopup&&(!e||b.isPopup);f&&this.settings.useNewModal&&(b.useNewModal=!0);this.setDefaultParams(b);this.settings.allowPopup||f||a.utils.DOM.clearByID(e);this.validateRequiredParams(b)&&this.loadPluginJS(b,function(){var e=function(){c.prepareContainer(b,f,function(){c.startPlugin(b)})};a.utils.queue.queueForExecution("UI",
function(){0==b.waitForDebug?e():a.utils.queue.queueForExecution("debug",e)})})};e.prototype.prepareContainer=function(b,c,e){var f=this;if(document.body){var g=b.containerID,k;c&&(g=a.utils.DOM.getCenteredDivID(this.methodName),b.newModal&&(g+=(new Date).getTime()),b.containerID=g,b.isPopup=!0,document.getElementById(g)||(k=a.utils.DOM.createTopLevelDiv(g),k.style.position="absolute"));if(k=k||document.getElementById(g)){var n=k.Reqs?k.Reqs:k.Reqs=[],q=n.length+"@0@"+g;b.rid=q;n[n.length]={rid:q,
container:k,method:this.methodName,context:b.context,c:b,p:b,i:b,operation:this.methodName,isHTML:!0};if(k&&k.style){k.style.display="";k.style.visibility="";if(g=document.getElementById("gigya_ifr_"+g))g.style.display="",g.style.visibility="";null!=g&&(a.utils.DOM.setSize(g,b.width,b.height,c),g.style.visibility="visible");a.utils.DOM.setSize(k,b.width,b.height,c)}g=this.methodName.split(".").pop();k.setAttribute&&k.setAttribute("gigid",(b.source&&b.source!=g?b.source+"_":"")+g)}else a.events.dispatchInvalidParamError(b,
"containerID");e()}else window.setTimeout(function(){f.prepareContainer(b,c,e)},200)};return e}(b.BaseApi);b.UiApi=k})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(a){(function(a){function b(a,e){return a.instanceID?a.instanceID:a.isPopup?"gigya-modal-plugin-container-"+e.methodName:a.containerID?a.containerID:e.name}a.instances={};a.getPluginInstance=function(f,e){var d=b(f,e);return a.instances[d]};a.setPluginInstance=function(f,e,d,c){void 0===c&&(c=!1);e=b(f,e);if(!c){c=e;for(var h=2;a.instances[e];h++)e=c+h.toString()}f.instanceID=e;a.instances[e]=d};a.removePluginInstance=function(f,e){delete a.instances[b(f,e)];delete f.instanceID}})(a.plugins||
(a.plugins={}))})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b.registerPlugin=function(b){a.utils.queue.queueForExecution("UI",b)};b.attachPlugin=function(b,f,e,d){f||(f="socialize");a[f]||(a[f]={});a[f].plugins||(a[f].plugins={});a[f].plugins[e]||(a[f].plugins[e]={instances:[]});var c=a[f].plugins[e];c[d]||(c[d]=function(a){a=new b(a,"gigya."+f+".plugins."+e+".instances["+c.instances.length+"]");c.instances.push(a)});if(b.StaticApi)for(var g in b.StaticApi)a.utils.functions.createAlias("gigya."+f+".plugins."+e+"."+g,
b[b.StaticApi[g]])}})(b.UI||(b.UI={}))})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){var k=function(){function b(a,d,c){this.methodName=a;this._versions=d;if(!this._versions||1>this._versions.length)throw Error(this.methodName+": required at least one valid version");if(c){if(this._defaultVersionIndex=this.findVersionIndexOrDefault(c),-1==this._defaultVersionIndex)throw Error(this.methodName+": default version is not defined as a version");}else this._defaultVersionIndex=0}b.prototype.callVersion=function(a,b,c){void 0===b&&(b={});void 0===c&&
(c=[b]);var f=this.findVersionIndexOrDefault(a);if(-1==f)throw Error("gigya plugin version doesn't exist");if(f=this.findSupportedVersion(f))this.invokeVersionMethod(f,b,c);else throw Error(a+": could not find supported version for this browser");};b.prototype.findSupportedVersion=function(a){for(var b=this._versions.length,c=0;c<b;++c){var f=this._versions[(a-c+b)%b];if(!f.isSupported||f.isSupported({directCall:0==c}))return f}};b.prototype.findVersionIndexOrDefault=function(b){var d=-1;b&&(d=a.utils.array.firstIndex(this._versions,
function(a){return a.versionName==b}));-1==d&&(d=void 0!==this._defaultVersionIndex?this._defaultVersionIndex:-1);return d};b.prototype.invokeVersionMethod=function(a,b,c){void 0===b&&(b={});void 0===c&&(c=[b]);var f;switch(typeof a.method){case "function":f=a.method;break;case "string":f=eval(a.method);b.selectedMethodName=a.method;break;default:throw Error(this.methodName+" "+a.versionName+": unsupported gigya-version method");}for(var g in a.additionalParams)b[g]=a.additionalParams[g];b.originalMethodName=
this.methodName;f.apply(this,c)};return b}();b.VersionSelector=k})(b.api||(b.api={}))})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b.didChatAuthenticate=!1;b.init=function(){a.socialize.addEventHandlers({listenerType:"component"},{onLogin:function(){b.didChatAuthenticate=!1}});b.didChatAuthenticate=!1};b.beforeChatRequest=function(k,f){b.didChatAuthenticate?f():(b.didChatAuthenticate=!0,a.socialize.getUserInfo({signIDs:!0,callback:function(a){0==a.errorCode&&""!=a.user.UID&&""!=a.user.UIDSignature&&""!=a.user.signatureTimestamp&&(k.UID=a.user.UID,k.UIDSignature=a.user.UIDSignature,k.signatureTimestamp=
a.user.signatureTimestamp,k.loginTokenExp=a.user.loginTokenExp?a.user.loginTokenExp:0);f()}}))}})(b.chat||(b.chat={}))})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){b.defaultApiSchema="ctag|APIKey|cid|oauth_token|source|sourceData|usePost|refUID|fb_UID|fb_at|fb_exp|environment";b.defaultOauthSchema="ctag|temporary_account|authFlow|connectWithoutLogin|provider|redirectMethod|redirect_uri|pendingRegistration|lang|regSource|extraPermissions|sessionExpiration|forceAuthentication|includeiRank|includeAllIdentities|extraFields|enabledProviders|disabledProviders|signIDs|openIDUsername|openIDURL|openIDProviderLogo|openIDProviderName|finalizeRegistration|include|actionAttributes|profileAttributes|googlePlayAppID|bp_channel_url|loginIfExists|includeUserInfo|redirectURL|authCodeOnly|enablePopupLocation|invite|regToken|loginMode|apiDomain|conflictHandling|forcePermissions|signKeys";b.postBookmarkSchema=
"provider|URL|url|title|description|target|cid|APIKey|shortURLs|source|sourceData|providerKey|thumbnailURL|tags|userAction|[providerCapability=actions]UserAction|actionAttributes|facebookDialogType";b.loginMethods={"socialize.login":1,"socialize.addConnection":1,"socialize.notifyLogin":1,"socialize.linkAccounts":1,"accounts.login":1,"accounts.socialLogin":1,"accounts.linkAccounts":1,"accounts.register":1,"accounts.finalizeRegistration":1};var g=function(a){return"link"!==a.loginMode&&"reAuth"!==a.loginMode},
k=function(a,b){b()};b.logoutBehaviour={logoutBeforeServerResponse:!0,alwaysSendLogoutToServer:!1};b.logoutMethods={"socialize.logout":1,"accounts.logout":1,"socialize.deleteAccount":1,"socialize.unlinkAccounts":1};var f=function(b,e){a.partnerSettings.ssoKey&&(b.signIDs=!0);e()},e=function(){return!b.logoutBehaviour.alwaysSendLogoutToServer},d={preprocessor:a._.chat.beforeChatRequest};b.arApiList=[new b.ServerApi("socialize.login",b.defaultOauthSchema,!1,{oauth:!0},{preprocessor:k,clearSessionCondition:g,
forceHttps:!0}),new b.ServerApi("socialize.addConnection",b.defaultOauthSchema,!1,{oauth:!0},{forceHttps:!0}),new b.ServerApi("socialize.requestPermissions",b.defaultOauthSchema,!0,{oauth:!0,defaultParams:{forcePermissions:!0}}),new b.ServerApi("accounts.socialLogin",b.defaultOauthSchema,!1,{oauth:!0},{preprocessor:k,clearSessionCondition:g,forceHttps:!0}),new b.UiApi("showDebugUI","socialize.plugins.debug",{},{},"",{allowPopup:!0}),b.UiApi.createApi("showMyPhotoUI","accounts","profilePhoto.MyPhotoPlugin",
"accounts.plugins.profilePhoto"),b.UiApi.createApi("showRatingUI","comments","rating.RatingPlugin","comments.plugins.rating"),b.UiApi.createApi("runJsUnitTests","_","JsUtRunner.Jasmine.JasmineUtRunnerPlugin","_.plugins.jsUtRunner"),b.UiApi.createApi("loadBasePlugin","_","Mock.MockPlugin","_.plugins.mock"),new b.UiApi("showCommentsUI","comments.plugins.comments",{width:500},{},"",{apiName:"comments.showCommentsUI1"}),new b.UiApi("showCommentsUI","comments.plugins.comments2",{width:500},{},"",{apiName:"comments.showCommentsUI2"}),
b.UiApi.versionSelector("showCommentsUI","comments","2",[{versionName:"1",method:a.comments.showCommentsUI1,additionalParams:{ctag:"comments_v1"}},{versionName:"2",method:a.comments.showCommentsUI2,additionalParams:{ctag:"comments_v2"},isSupported:function(){return a.utils.browser.isModern()}}]),new b.UiApi("showShareUI","socialize.plugins.share",{width:520,height:320},{width:595,height:324},"userAction",{allowPopup:!0,preprocessor:function(c,e){var d=c.operationMode;d&&(d=d.toLowerCase().replace(/ /g,
""));c.containerID||(delete c.width,delete c.height);b.apiAdapter.isSessionValid(c,function(b){"simpleshare"==d||"autodetect"==d&&!b?a.socialize.showSimpleShareUI(c):e()})}}),b.UiApi.createApi("showMessageUI","_","messages.MessagesPlugin","_.plugins.messages"),new b.UiApi("showLoginUI_v1","socialize.plugins.login",{width:120,height:110},{width:280,height:220},"",{allowPopup:!0}),b.UiApi.createApi("showLoginUI_v2","socialize","login_v2.LoginPlugin","socialize.plugins.login_v2"),b.UiApi.versionSelector("showLoginUI",
"socialize","1",[{versionName:"1",method:a.socialize.showLoginUI_v1},{versionName:"2",method:a.socialize.showLoginUI_v2}]),new b.UiApi("showAddConnectionsUI_v1","socialize.plugins.login",{width:110,height:65},{width:250,height:200},"",{allowPopup:!0}),b.UiApi.createApi("showAddConnectionsUI_v2","socialize","login_v2.LoginPlugin","socialize.plugins.login_v2"),b.UiApi.versionSelector("showAddConnectionsUI","socialize","1",[{versionName:"1",method:a.socialize.showAddConnectionsUI_v1},{versionName:"2",
method:a.socialize.showAddConnectionsUI_v2}]),new b.UiApi("showFriendSelectorUI","socialize.plugins.friendSelector",{width:400,height:360},{},"",{allowPopup:!0}),new b.UiApi("showFeedUI","socialize.plugins.newsfeed",{width:304,height:265}),new b.UiApi("showChatUI","chat.plugins.chat",{width:300,height:450},{},"",{preprocessor:function(a,b){a.site&&(a.categoryID=a.site);a.stream&&(a.streamID=a.stream);a.skin&&(a.skinID=a.skin);a.streamID=a.streamID||0;b()}}),b.UiApi.createApi("showEditConnectionsUI",
"socialize","editConnections.EditConnectionPlugin","socialize.plugins.edit"),new b.UiApi("showShareBarUI","socialize.plugins.reactions",{shareCountCacheTimeout:30},{},"userAction|shareButtons"),new b.UiApi("showReactionsBarUI","socialize.plugins.reactions",{},{},"userAction|barID|reactions",{preprocessor:function(a,b){a.barID||(a.barID=a.itemID);b()}}),new b.UiApi("showMiniShareUI","socialize.plugins.minishare",{width:320,height:153},{},"",{allowPopup:!0}),new b.UiApi("showFollowBarUI","socialize.plugins.followbar",
{},{},"buttons"),new b.UiApi("showBookmarkUI","socialize.plugins.bookmark",{width:310,height:250},{width:310,height:310}),new b.UiApi("showSimpleShareUI","socialize.plugins.simpleShare",{width:280,height:175},{},"userAction",{allowPopup:!0,dontLoadPluginsCore:!0,waitForAPIQueue:!0}),new b.UiApi("showShareMobileUI","socialize.plugins.shareMobile",{},{},"userAction",{allowPopup:!0}),new b.UiApi("showUserStatusUI","gm.plugins.userStatus",{width:300,hidePoints:!1,hideActions:!1},{},"",{requireSession:!0}),
new b.UiApi("showAchievementsUI","gm.plugins.achievements",{width:300,height:100,excludeChallenges:"_default"}),new b.UiApi("showChallengeStatusUI","gm.plugins.achievements",{width:300,height:100,challenge:"_default"}),new b.UiApi("showLeaderboardUI","gm.plugins.leaderboard",{width:300},{},"",{preprocessor:function(a,b){a&&a.height&&(a.height=null);b()}}),new b.UiApi("showNotifications","gm.plugins.notifications",{},{},"",{preprocessor:function(b,e){var d=a.utils.localStorage.getObject("gmSettings");
d&&d.disableNotifications||(b.containerID="gigNotifications",document.getElementById(b.containerID)||(d=document.createElement("div"),d.id=b.containerID,d.style.position="absolute",d.style.left="-1000px",a.utils.DOM.appendToBody(d)),e())}}),new b.UiApi("showTfaUI","accounts.plugins.tfa",{width:325}),b.UiApi.createApi("showScreenSet","accounts","ScreenSet.ScreenSetPlugin","accounts.plugins.screenSet",void 0,["hideScreenSet","switchScreen"]),new b.ServerApi("socialize.getAvailableProviders","enabledProviders|disabledProviders|requiredCapabilities"),
new b.ServerApi("socialize.notifyLogin","siteUID|UIDTimestamp|UIDSig|UIDNonce|provider|authToken|tokenSecret|regSource|tokenExpiration|sessionHandle|sessionHandleExpiration|userInfo|providerSessions|sessionExpiration|authCode|includeAllIdentitiesincludeiRank|group|settings|extraFields|signIDs|newUser|actionAttributes|profileAttributes|bp_channel_url|signKeys",!1,void 0,{forceHttps:!0,clearSession:!0}),new b.ServerApi("socialize.shortenURL","URL"),new b.ServerApi("socialize.convertAction","userAction|[providerCapability=actions]UserAction|provider"),
new b.ServerApi("socialize.getReactionsCount","barID|buttonIDs|reportLoad"),new b.ServerApi("socialize.incrementReactionsCount","barID|buttonID|count|actionAttributes|profileAttributes"),new b.ServerApi("socialize.deleteAccount",void 0,!0),new b.ServerApi("socialize.delUserSettings","group|settings",!0),new b.ServerApi("socialize.getAlbums","type|enabledProviders|disabledProviders",!0),new b.ServerApi("socialize.getContacts","enabledProviders|disabledProviders",!0),new b.ServerApi("socialize.getFriendsInfo",
"enabledProviders|disabledProviders|detailLevel|UIDs|siteUsersOnly|requiredCapabilities|signIDs",!0),new b.ServerApi("socialize.getPhotos","enabledProviders|disabledProviders|albumIDs|tags",!0),new b.ServerApi("socialize.getRawData","provider|UID|fields|dataFormat|path",!0),new b.ServerApi("socialize.getSessionInfo","provider|paddingMode|encrypt|signIDs|encryptAll",!0),new b.ServerApi("socialize.getUserInfo","enabledProviders|disabledProviders|signIDs|includeiRank|includeAllIdentities|extraFields|group|settings|includeOpenidUID",
!0),new b.ServerApi("socialize.getUserSettings","group|settings|regToken",!0,void 0,{forceHttps:!0},"regToken"),new b.ServerApi("socialize.getPlaces","enabledProviders|disabledProviders|latitude|longitude|query|radius|unifyResults",!0),new b.ServerApi("socialize.checkin","enabledProviders|disabledProviders|placeID|comment|latitude|longitude|actionAttributes|profileAttributes",!0),new b.ServerApi("socialize.logout","signIDs|samlContext|sustainLogoutURLs",!0,{preprocessor:f,disableCache:!0},{requiresSession:e}),
new b.ServerApi("socialize.notifyRegistration","siteUID|UIDTimestamp|UIDSig",!0),new b.ServerApi("socialize.publishUserAction","userAction|[providerCapability=actions]UserAction|enabledProviders|disabledProviders|target|shortURLs|scope|privacy|feedID|userLocation|tags|actionAttributes|profileAttributes",!0),new b.ServerApi("socialize.removeConnection","provider|lastIdentityHandling|removeLoginID",!0),new b.ServerApi("socialize.sendNotification","recipients|body|subject|shortURLs|actionAttributes|profileAttributes",
!0),new b.ServerApi("socialize.setStatus","shortURLs|status|[providerCapability=status]Status|enabledProviders|disabledProviders|userLocation|actionAttributes|profileAttributes",!0),new b.ServerApi("socialize.setUID","siteUID|UIDTimestamp|UIDSig",!0),new b.ServerApi("socialize.setUserSettings","group|settings|regToken",!0,void 0,{forceHttps:!0},"regToken"),new b.ServerApi("socialize.unlinkAccounts",void 0,!0),new b.ServerApi("socialize.getFeed","feedID|startTS|endTS|groups|limit|includeUID"),new b.ServerApi("socialize.sendEmail",
"dontSendEmail|companyName|lang|emails|emailSubject|emailBody|linkBack|senderEmail|senderName|userMsg|shortURLs|userAction|[providerCapability=actions]UserAction|actionAttributes|profileAttributes|captchaTicket|lang",!1,void 0,{forceHttps:!0}),new b.ServerApi("socialize.facebookGraphOperation","graphPath|graphParams|authRequired|method|authType"),new b.ServerApi("socialize.getTopShares","age|tag|limit"),new b.ServerApi("socialize.notifySSOLogin","bp_channel_url"),new b.ServerApi("gm.getChallengeStatus",
"UID|includeChallenges|excludeChallenges|details|lang|actionAttributes|profileAttributes"),new b.ServerApi("gm.resetLevelStatus","challenges|actionAttributes|profileAttributes",!0),new b.ServerApi("gm.getTopUsers","challenge|totalCount|friendsCount|includeSelf|period|lang|actionAttributes|profileAttributes"),new b.ServerApi("gm.getChallengeConfig","UID|includeChallenges|excludeChallenges|lang|actionAttributes|profileAttributes|expandActions"),new b.ServerApi("gm.notifyAction","action|operation|challengeIDs|actionAttributes|profileAttributes",
!0),new b.ServerApi("comments.updateComment","categoryID|streamID|commentID|commentText|commentTitle|ratings|mediaItems|taggedUsers"),new b.ServerApi("comments.postComment","categoryID|streamID|parentID|guestName|guestEmail|commentText|anonymous|mediaItems|privacy|feedID|userAction|[providerCapability=actions]UserAction|scope|enabledProviders|disabledProviders|shortURLs|commentTitle|ratings|tags|taggedUsers|streamTags|actionAttributes|profileAttributes"),new b.ServerApi("comments.getComments","categoryID|streamID|includeSettings|start|startTS|threadLimit|sort|threaded|threadDepth|includeStreamInfo|includeOpenidUID|includeUID|includeReplies|tags|dataFormat|markupType|includeUserOptions|includeUserComments|includeRatingsDims|includeUserHighlighting|pinnedCommentID|lang"),
new b.ServerApi("comments.setStreamInfo","categoryID|streamID|streamTitle|streamURL|streamInfoSig|streamTags"),new b.ServerApi("comments.getTopStreams","categoryID|limit|maxStreamAge|includeLastComment|streamTag|minRatingsCount"),new b.ServerApi("comments.getTopRatedStreams","categoryID|limit|maxStreamAge|ratingClass|minRatingsCount|streamTag"),new b.ServerApi("comments.getStreamInfo","categoryID|streamID|streamIDs|includeLastComment|includeRatingsDims|includeRatingDetails"),new b.ServerApi("comments.flagComment",
"categoryID|streamID|commentID|actionAttributes|profileAttributes"),new b.ServerApi("comments.vote","categoryID|streamID|commentID|vote|actionAttributes|profileAttributes",!0),new b.ServerApi("comments.getUserVotes","categoryID|streamID",!0),new b.ServerApi("comments.getUserComments","categoryID|streamID|tag|senderUID|start|limit|sort|includeReplies|includeStreamInfo|includeUserHighlighting",!0),new b.ServerApi("comments.getFriendsComments","categoryID|streamID|start|limit|includeUID|sort|includeReplies|includeStreamInfo",
!0),new b.ServerApi("comments.getThread","categoryID|streamID|commentID|start|includeUID|limit|threadDepth|sort"),new b.ServerApi("comments.deleteComment","categoryID|streamID|commentID",!0),new b.ServerApi("comments.getRelatedUsers","categoryID|streamID|parentCommentID|usernamePrefix|limit"),new b.ServerApi("comments.analyzeMediaItem","categoryID|urls"),new b.ServerApi("comments.subscribe","categoryID|streamID|email|lang"),new b.ServerApi("comments.unsubscribe","categoryID|streamID|unsubscribeToken"),
new b.ServerApi("comments.setUserOptions","replyNotifications|notificationsEmail|notificationsLanguage",!0),new b.ServerApi("comments.getUserOptions","ServerApiKey",!0),new b.ServerApi("gcs.getUserData","type|fields",!0),new b.ServerApi("gcs.setUserData","data|type|updateBehavior",!0),new b.ServerApi("gcs.search","expTime|querySig|query"),new b.ServerApi("gcs.getSchema","schemaType"),new b.ServerApi("chat.getSettings","categoryID|streamID|skinID|UID|UIDSignature|signatureTimestamp|loginTokenExp",
!1,d),new b.ServerApi("chat.getMessages","categoryID|streamID|start|includeSettings|chatSignature|UID|UIDSignature|signatureTimestamp|loginTokenExp",!1,d),new b.ServerApi("chat.postMessage","categoryID|streamID|messageText|isPrivate|actionAttributes|profileAttributes|signatureTimestamp|loginTokenExp",!0,d),new b.ServerApi("chat.resetChat","categoryID|streamID|timestamp|chatSignature"),new b.ServerApi("chat.blockUser","categoryID|streamID|UID|chatSignature"),new b.ServerApi("chat.blockIP","categoryID|streamID|ip|chatSignature"),
new b.ServerApi("chat.deleteMessage","categoryID|streamID|messageId|chatSignature"),new b.ServerApi("accounts.login","loginID|password|sessionExpiration|targetEnv|regToken|include|actionAttributes|profileAttributes|includeUserInfo|includeDynamicSchema|bp_channel_url|captchaToken|captchaText|loginMode|signKeys",!1,void 0,{preprocessor:k,clearSessionCondition:g,forceHttps:!0,forcePost:!0}),new b.ServerApi("accounts.linkAccounts","loginID|password|sessionExpiration|targetEnv|include|regToken|includeUserInfo|bp_channel_url|signKeys",
!1,void 0,{forceHttps:!0,forcePost:!0}),new b.ServerApi("accounts.initRegistration","sdk",!1,void 0,{clearSession:!0}),new b.ServerApi("accounts.register","username|email|password|UID|regToken|siteUID|secretQuestion|secretAnswer|regSource|profile|data|captchaText|captchaToken|lang|hashedPassword|pwHashAlgorithm|skipVerification|finalizeRegistration|targetEnv|sessionExpiration|include|actionAttributes|profileAttributes|includeUserInfo|bp_channel_url|signKeys",!1,void 0,{forceHttps:!0,forcePost:!0}),
new b.ServerApi("accounts.finalizeRegistration","regToken|targetEnv|include|includeUserInfo|bp_channel_url|allowAccountsLinking|signKeys"),new b.ServerApi("accounts.captchaImage","regToken"),new b.ServerApi("accounts.importProfilePhoto","regToken|URL|publish"),new b.ServerApi("accounts.setProfilePhoto","regToken|publish|photoBytes"),new b.ServerApi("accounts.resetPassword","lang|loginID|passwordResetToken|secretAnswer|securityFields|newPassword|email",!1,void 0,{forceHttps:!0,forcePost:!0}),new b.ServerApi("accounts.isAvailableLoginID",
"loginID"),new b.ServerApi("accounts.resendVerificationCode","regToken|email"),new b.ServerApi("accounts.getCaptcha",""),new b.ServerApi("accounts.getPolicies","sections"),new b.ServerApi("accounts.getSchema","sections|schemaType"),new b.ServerApi("accounts.verifyLogin","include|extraProfileFields|targetEnv",!0),new b.ServerApi("accounts.getAccountInfo","include|extraProfileFields|regToken",!0,{},{},"regToken"),new b.ServerApi("accounts.setAccountInfo","profile|data|regToken|oldPassword|password|newPassword|addLoginEmails|removeLoginEmails|username|secretQuestion|secretAnswer|requirePasswordChange|conflictHandling|tfaStatus|rba",
!1,void 0,{forceHttps:!0,forcePost:!0},"regToken"),new b.ServerApi("accounts.logout","signIDs|samlContext|sustainLogoutURLs",!0,{preprocessor:f,disableCache:!0},{requiresSession:e}),new b.ServerApi("accounts.search","expTime|querySig|query"),new b.ServerApi("accounts.getScreenSets","screenSetIDs|include"),new b.ServerApi("accounts.getConflictingAccount","regToken|loginID"),new b.ServerApi("accounts.incrementCounters","counters",!0,{preprocessor:function(a,b){var e=a.actionCounterPath,d=a.counters;
if(e&&d)for(var f=0;f<d.length;f++){var g=d[f];"object"!=typeof g||g.path||(g.path=e)}b()}}),new b.ServerApi("accounts.getCounters","counters",!0),new b.ServerApi("accounts.tfa.getProviders","regToken",!0,{},{},"regToken"),new b.ServerApi("accounts.tfa.initTFA","provider|mode|regToken",!1,{},{forceHttps:!0}),new b.ServerApi("accounts.tfa.finalizeTFA","gigyaAssertion|providerAssertion|tempDevice|regToken",!0,{},{},"regToken"),new b.ServerApi("accounts.tfa.deactivateProvider","provider",!0),new b.ServerApi("accounts.tfa.unregisterDevice",
"allDevices",!0),new b.ServerApi("accounts.tfa.phone.getRegisteredPhoneNumbers","gigyaAssertion",!1,{},{forceHttps:!0}),new b.ServerApi("accounts.tfa.phone.removePhone","gigyaAssertion|phoneId",!1,{},{forceHttps:!0}),new b.ServerApi("accounts.tfa.phone.sendVerificationCode","gigyaAssertion|lang|phoneID|phone|method",!1,{},{forceHttps:!0}),new b.ServerApi("accounts.tfa.phone.completeVerification","gigyaAssertion|phvToken|code",!1,{},{forceHttps:!0}),new b.ServerApi("accounts.tfa.email.getEmails","gigyaAssertion",
!1,{},{forceHttps:!0}),new b.ServerApi("accounts.tfa.email.sendVerificationCode","emailID|gigyaAssertion|lang",!1,{},{forceHttps:!0}),new b.ServerApi("accounts.tfa.email.completeVerification","gigyaAssertion|phvToken|code",!1,{},{forceHttps:!0}),new b.ServerApi("ds.store","type|data|oid|updateBehavior"),new b.ServerApi("ds.get","type|data|oid|fields"),new b.ServerApi("ds.search","expTime|querySig|query"),new b.ServerApi("ds.getSchema",""),new b.ServerApi("ds.delete","type|oid|fields"),new b.ServerApi("ids.getAccountInfo",
"include|extraProfileFields",!0),new b.ServerApi("ids.setAccountInfo","profile|data|oldPassword|password|newPassword|addLoginEmails|removeLoginEmails|username|secretQuestion|secretAnswer|requirePasswordChange",!1,void 0,{forceHttps:!0,forcePost:!0}),new b.ServerApi("ids.search","expTime|querySig|query"),new b.ServerApi("gscounters.sendReport","reports|noAuth",!1,void 0,{forceGigyaDomain:!0})];a.utils.functions.createAlias("gigya.socialize.showChatUI",a.chat.showChatUI);a.utils.functions.createAlias("gigya.socialize.showCommentsUI",
a.comments.showCommentsUI);a.utils.functions.createAlias("gigya.socialize.showRatingUI",a.comments.showRatingUI);a.utils.functions.createAlias("gigya.services.socialize",a.socialize);a.utils.functions.createAlias("gigya.services.gcs",a.gcs);a.utils.functions.createAlias("gigya.services.gm",a.gm);a.utils.functions.createAlias("gigya.services.comments",a.comments);a.utils.functions.createAlias("gigya.services.accounts",a.accounts);a.utils.functions.createAlias("gigya.socialize.connect",a.socialize.addConnection);
a.utils.functions.createAlias("gigya.socialize.disconnect",a.socialize.removeConnection);a.utils.functions.createAlias("gigya.socialize.linkAccounts",a.socialize.setUID);a.utils.functions.createAlias("gigya.socialize.showConnectUI",a.socialize.showAddConnectionsUI);a.utils.functions.createAlias("gigya.socialize.showNewsfeedUI",a.socialize.showFeedUI);a.utils.functions.createAlias("gigya.showDebugUI",a.socialize.showDebugUI)})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){function g(){for(var b=[],d=0;d<arguments.length;d++)b[d-0]=arguments[d];var b=a.utils.object.merge([a.thisScript.globalConf,b]),d=b.redirectURL||document.location.href,c=null!=a.partnerSettings.ssoKey,f="1"!==a.utils.localStorage.getItem("_gig_3pc_enabled"),g=a.utils.JSON.deserialize(a.utils.localStorage.getItem("_gig_ssoToken"))||{},k=g.ssoToken,l=(new Date).getTime();g.exp>l&&a.thisScript.globalConf.enableSSOToken&&c&&f&&null!=k?a.utils.HTTP.redirect("https://socialize."+
(a.partnerSettings.plugins.originalApiDomain||a.partnerSettings.plugins.apiDomain)+"/gs/SSOGateway.aspx",[{apiKey:b.APIKey,sessionExpiration:b.sessionExpiration,redirectURL:d,ssoToken:k}],"GET","_top"):a.utils.HTTP.redirect(d,[{}],"GET","_top")}a.socialize.addEventHandlers=function(){for(var b=[],d=0;d<arguments.length;d++)b[d-0]=arguments[d];var b=a.utils.object.merge([a.thisScript.globalConf,b]),d=b.namespace?b.namespace:"socialize",c;for(c in b)0==c.indexOf("on")&&a.events.global.add(c,b[c],b.listenerType,
b.context,d,b);"function"==typeof b.callback&&b.callback({status:"OK",statusMessage:"",errorCode:0,errorMessage:"",operation:"addEventHandlers",context:b.context})};a.accounts.addEventHandlers=function(){for(var b=[],d=0;d<arguments.length;d++)b[d-0]=arguments[d];b=a.utils.object.merge([b,{namespace:"accounts"}]);a.socialize.addEventHandlers(b)};a.socialize.isLoggedIn=function(){var b=a.utils.object.merge([a.thisScript.globalConf,arguments]);a.socialize.getUserInfo(b,{callback:function(d){var c=d.user,
c={loggedIn:c?a.utils.validation.isExplicitTrue(c.isLoggedIn):!1};a.utils.object.extractProperties(d,c,"status|statusMessage|callId|errorCode|errorMessage|errorDetails|context");b.callback&&b.callback(c)}})};a.socialize.waitForService=function(){var b=a.utils.object.merge([a.thisScript.globalConf,arguments]),d=b.service;if(d){var d=d.toLowerCase(),c=b.callback;if("fbconnect"==d||"facebook"==d)a.external.facebook.isLoaded()?c({context:b.context}):a.socialize.addEventHandlers({listenerType:"component"},
{onFacebookLoaded:c,context:b.context});"googleplus"==d&&(a.external.googlePlus.isLoaded()?c({context:b.context}):a.socialize.addEventHandlers({listenerType:"component"},{onGooglePlusLoaded:c,context:b.context}))}};b.bookmarkSize={facebook:{w:640,h:370},twitter:{w:880,h:585},messenger:{w:710,h:905},linkedin:{w:560,h:500},yahoobookmarks:{w:840,h:975},digg:{w:1010,h:1045},delicious:{w:890,h:905},googlebookmarks:{w:710,h:905},mixi:{w:640,h:470},googleplus:{w:496,h:420}};a.socialize.postBookmark=function(){var e=
a.utils.object.merge([a.thisScript.globalConf,arguments]);e.APIKey||(e.APIKey=a.thisScript.APIKey);var d={};a.utils.object.extractProperties([e],d,b.postBookmarkSchema);!d.url&&d.URL&&(d.url=d.URL,delete d.URL);d.sdk="js_"+a.build.version;if(!d.url&&d.userAction&&!d.userAction.linkBack)for(var c=document.getElementsByTagName("meta"),f=0;f<c.length;f++)if("og:url"===c[f].getAttribute("property")&&c[f].getAttribute("content")){d.url=c[f].getAttribute("content");break}d.url||!d.userAction||d.userAction.linkBack||
(d.url=document.location.href);d.provider=d.provider?(d.provider+"").toLowerCase():"";"facebook"===d.provider&&(d.providerKey=a.external.opengraph.getMetaTag("fb:app_id"));a._.apiAdapter.getGmidTicket(function(c){c&&(d.gmidTicket=c);c=b.bookmarkSize[d.provider]||{};c={width:e.popupWidth||c.w,height:e.popupHeight||c.h,top:e.popupPositionY,left:e.popupPositionX,menubar:0,resizable:1,scrollbars:1};e.enablePopupLocation?(c.location=1,c.toolbar=1):c.toolbar=0;var f=a.partnerSettings.customAPIDomainPrefix?
"https://{0}/gs/bookmark.aspx?{1}":"https://socialize.{0}/gs/bookmark.aspx?{1}";a.log.logCall("postBookmark",d);a.events.global.dispatch({eventName:"beforeRequest",methodName:"socialize.postBookmark",rawParams:e,params:d});var g=a.utils.keyValue.serialize(d),f=a.utils.stringUtils.format(f,a.partnerSettings.plugins.apiDomain,g);a.utils.win.open(f,"gs_bookmark_"+d.provider,c)})};a.socialize.refreshUI=function(){var e=a.utils.object.merge([a.thisScript.globalConf,arguments]),d=e.callback;a.socialize.getUserInfo(e,
{callback:function(c){var f={eventName:"login",isInternal:!0};e.provider&&(f.provider=e.provider);b.addUserInfoToEvent(c,f,!0);e.context&&(f.context=e.context);a.events.global.dispatch(f);"function"==typeof d&&d(c)}})};var k={"digg.com":"digg","stumbleupon.com":"stumbleupon","del.icio.us.com":"delicious","technorati.com":"technorati","t.co":"twitter","plus.url.google.com":"googlePlus","facebook.com":"facebook","linkedin.com":"linkedIn","pinterest.com":"pinterest","mixi.jp":"mixi","b.hatena.ne.jp":"hatena",
"line.me":"line"},f;a.socialize.trackReferrals=function(){var e=a.utils.object.merge([a.thisScript.globalConf,arguments]),d={eventName:"linkback",CID:e.cid},c={},g={};-1!=document.location.href.indexOf("#")&&(g=a.utils.keyValue.deserialize(document.location.href.split("#")[1]));-1!=document.location.href.indexOf("?")&&(c=a.utils.keyValue.deserialize(document.location.href.split("?")[1].split("#")[0]));a.socialize.updateRefUID(e.APIKey,g,c);var r=null!=g._gus||null!=c._gus;r&&(d.CID=g._gucid||c._gucid,
d.shortCode=g._gsc||c._gsc,d.provider=g._gup||c._gup);if(!f){var p,g={url:document.location.href,ref:document.referrer};c.fb_ref?(p=a.utils.keyValue.deserialize(c.fb_ref,":"),g.uuid=p.uu,g.sn=p.p,p=p.s):document.referrer&&-1!=document.referrer.indexOf("://")&&(c=document.referrer.split("://")[1].split("/")[0],0==c.indexOf("www.")&&(c=c.split("www.")[1]),k[c]&&(d.provider=g.sn=k[c]));g.sn||document.referrer&&(-1!=document.referrer.indexOf("http://soc.li")||-1!=document.referrer.indexOf("https://shr.gs"))||
(c=document.location.href.split("#guid="),1<c.length&&(c=c[1].split("#")[0].split("&")[0],c!=b.apiAdapter.getTokenParam(e.APIKey,"UUID")&&(g.sn="AddressBarShares",g.uuid=c,"_"==c&&delete g.uuid,document.location.replace("#"),a.reports.trackAddressBarShares(),g.url=document.location.href.split("#")[0])));g.uuid&&a.utils.cookie.set("_gigRefUid_"+e.APIKey,g.uuid);g.sn&&!r&&a.reports.report("linkback",e.APIKey,e.cid,p,null,g);(g.sn||r)&&a.events.global.dispatch(a.utils.object.removeUndefined(d));f=!0}"function"==
typeof e.callback&&e.callback({status:"OK",statusMessage:"",operation:"trackReferrals",context:e.context,errorMessage:"",errorCode:0})};a.socialize.updateRefUID=function(b,d,c){b||(b=a.thisScript.globalConf.APIKey);d||(d={},-1!=document.location.href.indexOf("#")&&(d=a.utils.keyValue.deserialize(document.location.href.split("#")[1])));c||(c={},-1!=document.location.href.indexOf("?")&&(c=a.utils.keyValue.deserialize(document.location.href.split("?")[1].split("#")[0])));d.guid&&"_"!=d.guid&&a.utils.cookie.set("_gigRefUid_"+
b,d.guid);(d=d._giguuid||c._giguuid)&&a.utils.cookie.set("_gigRefUid_"+b,d)};a.socialize.hideUI=function(){var b=a.utils.object.merge([a.thisScript.globalConf,arguments]);"function"==typeof b.callback&&b.callback({status:"OK",statusMessage:"",operation:"hideUI",context:b.context,errorMessage:"",errorCode:0})};a.gcs.submitUserForm=function(){var b={},d=a.utils.object.merge([a.thisScript.globalConf,arguments]),c=document.getElementById(d.form);if(!c){var f=document.getElementsByName(d.form);f&&0<f.length&&
(d.form=f[0])}for(f=0;f<c.elements.length;f++){var g=c.elements[f];if(g.name){for(var k=g.name.split("."),l=b,n=0;n<k.length-1;n++){var q=k[n];l[q]||(l[q]={});l=l[q]}l[k[k.length-1]]=g.value}}d.data=b;a.gcs.setUserData(d)};a.socialize.getProviderShareCounts=function(){var b=a.utils.object.merge([a.thisScript.globalConf,arguments]);a.utils.script.load(a._.getCdnResource("/js/gigya.services.socialize.plugins.shareCounts.min.js"),null,function(){a.socialize.plugins.shareCounts.getProviderShareCounts(b)},
!0)};a.utils.functions.createAlias("gigya.setSSOToken",g);a.utils.functions.createAlias("gigya.accounts.setSSOToken",g)})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b.initSSO=function(b){b=a.utils.URL.addParamsToURL(a.samlConfig.proxyPageURL,a.utils.object.merge([{mode:"initSSO"},b]));a.thisScript.globalConf.enableSSOToken?a.setSSOToken({redirectURL:b}):window.location.href=b};b.continueSSO=function(){var b=a.utils.URL.addParamsToURL(a.samlConfig.proxyPageURL,{mode:"afterLogin"});window.location.href=b}})(b.saml||(b.saml={}))})(a.fidm||(a.fidm={}))})(gigya||(gigya={}));
(function(a){a=a._||(a._={});a.apiAdapters||(a.apiAdapters={})})(gigya||(gigya={}));
(function(a){(function(b){(function(b){function k(){if("undefined"!=typeof FB){var d=function(c){b.initializedTime=new Date;b.isConnected="connected"==c.status;b.isLoggedIn="unknown"!=c.status;a.events.global.dispatch({eventName:"FBCRefreshed"})};a.providersConfig.facebook&&a.providersConfig.facebook.appID&&FB&&FB.getLoginStatus&&FB.getLoginStatus(d,!0)}}function f(){for(var a=e,b=0;b<a.length;b++)a[b]();e=[]}var e=[];b.isLoggedIn=!1;b.isConnected=!1;b.isLoaded=function(){return null!=b.initializedTime};
b.load=function(d){if(!b.initializedTime){b.initializedTime=null;window.setInterval(function(){a.external.facebook.refreshSession()},27E5);window.fbAsyncInit=function(){var c=a.utils.object.clone(a.thisScript.globalConf.facebookInitParams);c||(c={});a.providersConfig.facebook?(c.appId=a.providersConfig.facebook.appID,c.version=a.providersConfig.facebook.version):c.version="v1.0";c.status=!1;c.cookie=!0;c.xfbml=!0;c.oauth=!0;FB.init(c);1!=d?FB.getLoginStatus(function(c){b.initializedTime=new Date;
b.isConnected="connected"==c.status;b.isLoggedIn="unknown"!=c.status;a.events.global.dispatch({eventName:"facebookLoaded",isLoggedIn:b.isLoggedIn,isConnected:b.isConnected});a.socialize.addEventHandlers({listenerType:"component"},{listenerDescription:"listener for updating Facebook Connect session",onLogin:function(){k()},onConnect:function(){k()},onLogout:function(){k()}})},!0):(b.initializedTime=new Date,a.events.global.dispatch({eventName:"facebookLoaded",isLoggedIn:b.isLoggedIn,isConnected:b.isConnected}))};
var c=document.createElement("div");c.id="fb-root";a.utils.DOM.appendToBody(c);a.utils.script.load(a.localInfo.protocol+"://connect.facebook.net/"+a.thisScript.lang.full.replace("-","_")+"/sdk.js",null,function(){"none"==document.documentElement.style.display&&(document.documentElement.style.display="")},!0)}};b.refreshSession=k;b.retryPending=f;b.runWhenLoaded=function(a){e.push(a)};b.getParams=function(){var a={};if("undefined"!=typeof FB&&FB.getAuthResponse)try{var b=FB.getAuthResponse();b&&(null!=
b.userID&&(a.fb_UID=b.userID),null!=b.accessToken&&(a.fb_at=b.accessToken),null!=b.expiresIn&&(a.fb_exp=b.expiresIn))}catch(e){}return a};b.autoLogin=function(){a.socialize.waitForService({service:"facebook",callback:function(){a._.apiAdapter.isSessionValid(a.thisScript.globalConf,function(b){var c=a.external.facebook.getParams();!b&&c&&c.fb_at&&!a._.autoLoginInProgress&&(a._.autoLoginInProgress=!0,a.socialize.notifyLogin({providerSessions:{facebook:{authToken:c.fb_at,tokenExpiresIn:c.fb_exp}}}))})}})};
a.events.global.add("facebookLoaded",f,"component");a.events.global.add("onFBCRefreshed",f,"component")})(b.facebook||(b.facebook={}))})(a.external||(a.external={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b.isLoaded=function(){return null!=b.initializedTime};b.load=function(){var k=this;if(!b.initializedTime&&a.providersConfig.googlePlus){b.initializedTime=null;var f=document.createElement("script");f.type="text/javascript";f.async=!0;window.__gigya_handleClientLoad=function(){return k.handleClientLoad()};f.src="https://apis.google.com/js/client.js?onload=__gigya_handleClientLoad";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(f,e)}};
b.handleClientLoad=function(){try{delete window.__gigya_handleClientLoad}catch(k){window.__gigya_handleClientLoad=void 0}b.initializedTime=new Date;a.events.global.dispatch({eventName:"googlePlusLoaded"})};b.refreshSession=function(){};b.autoLogin=function(){a.socialize.waitForService({service:"googlePlus",callback:function(){a._.apiAdapter.isSessionValid(a.thisScript.globalConf,function(b){b||gapi.auth.authorize({client_id:a.providersConfig.googlePlus.clientId,scope:a.providersConfig.googlePlus.scopes,
immediate:!0,response_type:"code"},function(b){b&&b.code&&!a._.autoLoginInProgress&&(a._.autoLoginInProgress=!0,a.socialize.notifyLogin({providerSessions:{googlePlus:{code:b.code}}}))})})}})}})(b.googlePlus||(b.googlePlus={}))})(a.external||(a.external={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(b){b._ready=null;b.executeOnInit=function(b,f){b&&(f||(f=2E3),a.external.backplane.isLoaded()?a.external.backplane.getChannelId()||a.external.backplane._ready?(a.external.backplane._ready=!0,b()):(window.setTimeout(function(){a.external.backplane._ready||(a.external.backplane._ready=!0,b())},f),Backplane(function(){a.external.backplane._ready=!0;b()})):b())};b.isLoaded=function(){return"undefined"!=typeof Backplane};b.getChannelId=function(){if(a.external.backplane.isLoaded())return Backplane.getChannelID()};
b.resetChannel=function(){a.external.backplane.isLoaded()&&Backplane.resetCookieChannel()};a.events.global.add("logout",a.external.backplane.resetChannel)})(b.backplane||(b.backplane={}))})(a.external||(a.external={}))})(gigya||(gigya={}));
(function(a){(function(a){(function(a){a.getMetaTag=function(a){for(var b=document.getElementsByTagName("meta"),e=0;e<b.length;e++)if(b[e].getAttribute("property")==a&&b[e].getAttribute("content"))return b[e].getAttribute("content")}})(a.opengraph||(a.opengraph={}))})(a.external||(a.external={}))})(gigya||(gigya={}));
(function(a){(function(b){(function(a){a[a.LocalStorageListener=0]="LocalStorageListener";a[a.PostMessage=1]="PostMessage";a[a.Flash=2]="Flash"})(b.MessagingMethod||(b.MessagingMethod={}));b.checkCompleteRegistration=function(b,k,f){var e,d,c=!1;if(206005==b.errorCode)c=!0,a.accounts.finalizeRegistration({regToken:b.regToken,ignoreApiQueue:!0,callback:function(a){f(a)}});else if(!k.dontHandleScreenSet&&((b.regToken||k.regToken)&&(200010==b.errorCode||403043==b.errorCode)||206001==b.errorCode||206002==
b.errorCode||206003==b.errorCode||403101==b.errorCode||403102==b.errorCode||403110==b.errorCode||403100==b.errorCode)){var h;403110==b.errorCode&&(h=d=!0);k.defaultMobileRegScreenSet&&a.localInfo.isMobile?e=k.defaultMobileRegScreenSet:k.defaultRegScreenSet&&(e=k.defaultRegScreenSet)}e?a.accounts.showScreenSet({ignoreApiQueue:!0,newModal:h,initialResponse:b,screenSet:e,onError:function(a){f(b)},onHide:function(a){"finished"===a.reason&&a.user?f({errorCode:0,userInfo:a.user},!0,d):f(b)}}):c||f(b)};
b.getGigyaSettings=function(b){var k=a.utils.localStorage.getObject("gigyaSettings")||{};return a.utils.JSON.serialize(k[b])};b.setGigyaSettings=function(b,k){var f=a.utils.localStorage.getObject("gigyaSettings")||(d={},d[b]={},d),e;for(e in k)f[b][e]=k[e];a.utils.localStorage.setItem("gigyaSettings",a.utils.JSON.serialize(f));var d};b.delGigyaSettings=function(b){if(b){var k=a.utils.localStorage.getObject("gigyaSettings")||{};delete k[b];a.utils.localStorage.setItem("gigyaSettings",a.utils.JSON.serialize(k))}else a.utils.localStorage.removeItem("gigyaSettings")};
b.handleSpecialFields=function(g){var k=a.socialize.Collection,f=function(a,d){for(var e=[],f=0,g=a[f];g;)e.push(new d(g)),e[f].identities&&b.convertIdentitiesArrayToObject(e[f]),g=a[++f];return e};g.photos&&(g.photos=new k(g.photos,"photoID"));g.albums&&(g.albums=new k(g.albums,"albumID"));g.contacts&&(g.contacts=new k(f(g.contacts,a.socialize.Contact),"email"));g.friend&&(g.friend=new k(f(g.friend,a.socialize.Friend),"UID"));g.user&&(g.user=new a.socialize.User(g.user));if(g.friends&&g.friends instanceof
Array){for(var e=[],d=0;d<g.friends.length;d++)e.push(g.friends[d].UID);g.UIDs=e.join(",");g.friends=new k(f(g.friends,a.socialize.Friend),"UID")}};b.convertIdentitiesArrayToObject=function(b){if(null==b.identities)b.identities={};else if(b.identities.constructor==Array){var k=b.identities;b.identities={};for(var f=0;f<k.length;f++)b.identities[k[f].provider]=new a.socialize.Identity(k[f])}};b.addUserInfoToEvent=function(b,k,f,e){e=b.user||b.userInfo;null==k&&(k={});null!=e&&(k.user=a.utils.object.clone(e),
null!=b.isLoggedIn&&(k.user.isLoggedIn=b.isLoggedIn),null!=b.isSiteUID&&(k.user.isSiteUID=b.isSiteUID),null!=b.iRank&&(k.user.iRank=b.iRank));f&&(a.utils.object.extractProperties(b,k,"signature|UIDSig|timestamp|UIDSignature|signatureTimestamp|UID|signKeysUIDSignature"),null!=k.user&&(k.UID=e.UID,k.isSiteUID=e.isSiteUID));return k};b.sendEmailNative=function(b){var k=b.userAction||{},f=k.linkBack||"";document.location.href="mailto:?to=&subject="+a.utils.URL.URLEncode(k.title||"")+"&body="+a.utils.URL.URLEncode(f);
a.socialize.sendEmail(b,{dontSendEmail:!0})};b.getPageBaseDomain=function(g,k){void 0===g&&(g=a.localInfo.pageDomain);void 0===k&&(k=a.partnerSettings.baseDomains);if(k){var f=b.Uri.parse(g);if(f){var e=k.split(",");e.push("gigya.com");for(var d=0;d<e.length;d++){var c=a.utils.stringUtils.replaceAll(e[d],"*",""),c=b.Uri.parse(c);if(f.isIn(c))return c.isForSubDomains()?f.domain:c.domain}}}return null}})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){function g(){a.utils.script.load(a._.getCdnResource("/js/gigya.services.socialize.plugins.log.min.js"),null,function(){a.log.showConfig()},!0)}b.CONSOLE_LOG_LEVELS=["debug","info","log","warn","error"];b.selectedConsoleLogLevels=[];b._log=[];b.enable=function(){a.utils.cookie.set("_gig_dbgConsole_log","1",null)};b.disable=function(){a.utils.cookie.set("_gig_dbgConsole_log","0",null)};b._isEnabled=function(){var g=a.utils.cookie.get("_gig_dbgConsole_log");return"undefined"!==
typeof g&&null!=g?"1"===g:0<b.selectedConsoleLogLevels.length};b.addLog=function(g,f,e){void 0===e&&(e=!1);if(a.log._isEnabled()||e){var d=g;f=a.utils.object.clone(f,!0,!1,4,null,!0);null!=f&&(d+=":"+("object"==typeof f?"\n":"")+a.utils.JSON.serialize(f,!0,!0));e&&"object"==typeof console&&console.log&&console.log(d);a.log._isEnabled()&&(b._log.push(d),null!=document.getElementById("gigya_log")&&a.log.show&&a.log.show(),g=-1!=a.utils.array.indexOf(a.log.CONSOLE_LOG_LEVELS,g)?g:"log",a._.apiAdapter.onJSLog(g,
d))}};b.logCall=function(b,f,e){e||(e=f.lastSource);a.log.addLog("Calling "+b+(e&&e!=b?" for "+e:"")+(f.source&&e!=f.source?" initiated from "+f.source:"")+" with these params",f)};b.debug=g;b.showLog=function(){a.utils.script.load(a._.getCdnResource("/js/gigya.services.socialize.plugins.log.min.js"),null,function(){a.log.show()},!0)};b.show=function(){};b.showConfig=function(){};a.utils.functions.createAlias("gigya.debug",g)})(a.log||(a.log={}))})(gigya||(gigya={}));
var defaultObjects={},defaultObjectsDef={User:"personwithuid+isLoggedIn|false,isConnected|false,isSiteUser|false,identities|{},providers|[],timestamp,UIDSig,UIDSignature,signatureTimestamp,loginProvider,loginProviderUID,capabilities|{}",Friend:"personwithuid+timestamp,friendshipSig,friendshipSignature,signatureTimestamp,timestamp,isSiteUser|false,identities|{}",Identity:"person+isExpiredSession|false,allowsLogin|false,providerUID,provider,isLoginIdentity|false,missingPermissions",Contact:"provider,firstName,lastName,nickname,email,photoURL",
person:"nickname,photoURL,thumbnailURL,birthDay|0,birthMonth|0,birthYear|0,gender,email,proxiedEmail,country,state,city,zip,firstName,lastName,profileURL,age|0",personwithuid:"person+UID,isSiteUID|false",UserAction:"actorUID,actorNickname,actionName,date|new Date(),targets|[],images|[],actionData1,actionData2,iconURL,title,linkBack,userMessage,description,actionLinks|[],mediaItems|[],subtitle"},createDefaultObject=function(a){var b={};a=defaultObjectsDef[a];-1!=a.indexOf("+")&&(b=createDefaultObject(a.split("+")[0]),
a=a.split("+")[1]);a=a.split(",");for(var g=0;g<a.length;g++){var k="",f=a[g].split("|");if(1<f.length)try{k=gigya.utils.JSON.deserialize(f[1])}catch(e){}b[f[0]]=k||""}return b},_createConstructor=function(a){return function(b){var g=defaultObjects[a],k;for(k in g)this[k]=gigya.utils.object.clone(g[k]);if("object"==typeof b)for(k in b)"function"!=typeof b[k]&&(this[k]=gigya.utils.object.clone(b[k]))}},def;
for(def in defaultObjectsDef)defaultObjects[def]=createDefaultObject(def),gigya.socialize[def]=_createConstructor(def);gigya.socialize.Collection=function(a,b){this.arr=a;this._key=b?b:""};
gigya.socialize.Collection.prototype={asArray:function(){return this.arr},each:function(a){for(var b=0,g=this.arr[b];g;)a(g,b),b++,g=this.arr[b]},getById:function(a){"undefined"==typeof this._hash&&this._buildHash();return(this._hash?this._hash:this.arr)[a]},getSize:function(){return this.arr.length},_buildHash:function(){var a=this._hash={},b=this._key;this.each(function(g,k){a["function"==typeof g[b]?g[b]():g[b]]=g})}};
gigya.socialize.UserAction.prototype={clone:function(){return new gigya.socialize.UserAction(gigya.utils.object.clone(this,!0,!0))},getTemplate:function(){return this.titleTemplate},setTemplate:function(a){this.titleTemplate=a},getActor:function(a){return{UID:this.actorUID,nickname:this.actorNickname}},setActionName:function(a){this.actionName=a;return this},getActionName:function(a){return this.actionName},getTemplateFields:function(){var a=[],b;for(b in this.templateFields)a.push(this.templateFields[b]);
return new gigya.socialize.Collection(a,"fieldName")},setTemplateField:function(a,b,g){this.templateFields[a]={fieldName:a,text:b,href:g};return this},getTemplateField:function(a){return this.templateFields[a]?this.templateFields[a]:null},addTarget:function(a){if("object"==typeof a)return this.targets.push({UID:a.UID,nickname:a.nickname?a.nickname:""}),this;if("string"==typeof a)return this.targets.push({UID:a,nickname:""}),this},addActionLink:function(a,b){this.actionLinks.push({text:a,href:b?b:
""});return this},addMediaItem:function(a){this.mediaItems.push(a);return this},setTitle:function(a){a&&(this.title=a);return this},setLinkBack:function(a){a&&a.toString&&(a=a.toString());a&&(this.linkBack=a);return this},setUserMessage:function(a){this.userMessage=a?a:"";return this},setDescription:function(a){this.description=a?a:"";return this},addImage:function(a,b){this.addMediaItem({type:"image",src:a,href:b})},getImages:function(){return new gigya.socialize.Collection(this.images,"")},getTargets:function(){return new gigya.socialize.Collection(this.targets,
"UID")},setIconURL:function(a){this.iconURL=a;return this},getIconURL:function(){return this.iconURL},getDate:function(){return this.date},setActionData1:function(a){this.actionData1=a;return this},getActionData1:function(a){return this.actionData1},setActionData2:function(a){this.actionData2=a;return this},getActionData2:function(a){return this.actionData2},setSubtitle:function(a){this.subtitle=a;return this},getSubtitle:function(){return this.subtitle}};
(function(a){(function(b){(function(g){function k(a,b){void 0===b&&(b=g.arProviders);for(var c=0;c<b.length;c++)if(b[c].name.toLowerCase()===a.toLowerCase())return b[c]}function f(a){if(null!=a){a=a.split(",");for(var c=0;c<a.length;c++){var d=a[c].replace(/^\s+|\s+$/g,"");b.providers._aliases[d]&&(a[c]=b.providers._aliases[d])}return a.join(",")}}function e(a,b){void 0===b&&(b=g.arProviders);for(var c=0;c<b.length;c++)if(b[c].ID===a)return b[c]}function d(a,b,c){void 0===b&&(b="");void 0===c&&(c=
g.arProviders);b=b.toLowerCase();b=b.split(" ").join("").split(".").join("").toLowerCase().split(",");b=p(b,c);for(c=0;c<b.length;c++)for(var d=0;d<a.length;d++){var e=a[d];(e=e.name||e.toString())&&(e=e.toLowerCase());e===b[c]&&a.splice(d,1)}return a}function c(a,b){null==b&&(b=[]);for(var c=[],d=0;d<a.length;d++){for(var e=a[d],f=!0,g=0;g<b.length;g++){for(var k=!1,h=0;h<e.arDefaultCapabilities.length;h++)if(e.arDefaultCapabilities[h].toLowerCase()==b[g].toLowerCase()){k=!0;break}if(!k){f=!1;break}}f&&
c.push(e)}return c}function h(){return g.arProviders.concat()}function r(b,c){void 0===c&&(c=g.arProviders);b=(""+b).split(" ").join("").split(".").join("").toLowerCase();b=f(b);for(var d=(""+b).split(","),d=p(d,c),e=[],h=0;h<d.length;h++){var l=k(d[h],c);null!=l&&-1==a.utils.array.indexOf(e,l)&&e.push(l)}return e}function p(a,b){b||(b=g.arProviders);for(var c=[],d=0;d<a.length;d++)if("*"==a[d])for(var e=0;e<b.length;e++){for(var f=!1,k=0;k<a.length;k++)a[k].toLowerCase()===b[e].name.toLowerCase()&&
(f=!0);f||b[e].explicitOnly||c.push(b[e].name)}else c.push(a[d]);return c}g._aliases={};var l=function(){function a(b,c,d,e,f,k,h){this.ID=b;this.displayName=c;this.width=d;this.height=e;this.explicitOnly=k;this.aliases=h;this.arDefaultCapabilities=f.split(",");this.name=c.toLowerCase().split(" ").join("").split("!").join("").split(".").join("").split("+").join("plus");if(h)for(g._aliases||(g._aliases={}),b=h.split("|"),c=0;c<b.length;c++)g._aliases[b[c]]=this.name;switch(this.name){case "messenger":this.displayName=
"Microsoft";break;case "customopenid":this.displayName="OpenID";break;case "paypaloauth":this.displayName="PayPal"}}a.prototype.toString=function(){return this.name};return a}();g.Provider=l;g.arProviders=[new l(64,"Facebook",650,400,"login,friends,places,status,actions,photos"),new l(9012,"Twitter",800,440,"login,friends,notifications,actions,status,places,checkins"),new l(72,"Google+",560,600,"login,friends,contacts",!1,"google|googleplus"),new l(9042,"LinkedIn",865,450,"login,friends,status,actions,notifications,contacts"),
new l(9803,"Yahoo",500,567,"login,friends,contacts,notifications"),new l(1047,"Messenger",380,540,"login, friends",!1,"messenger|microsoft"),new l(9832,"Instagram",440,420,"login,photos"),new l(9222,"Odnoklassniki",888,425,"login"),new l(9007,"FourSquare",1E3,650,"login,friends,places,checkins"),new l(8191,"Renren",450,350,"login,friends,status,actions"),new l(8203,"QQ",570,460,"login,actions"),new l(9821,"Sina",640,380,"login,status,actions"),new l(4228,"Mixi",1E3,720,"login,friends,actions,photos",
!0),new l(9830,"Yahoo! JAPAN",980,700,"login",!0),new l(8205,"Spiceworks",640,380,"login",!0),new l(9041,"VKontakte",610,510,"login,friends,photos,status,actions"),new l(9800,"AOL",530,720,"login"),new l(4096,"WordPress",700,540,"login"),new l(256,"Blogger",760,400,"login"),new l(4218,"Netlog",730,590,"login",!0),new l(4224,"Orange France",730,590,"login",!0),new l(5002,"Livedoor",970,700,"login",!0),new l(5004,"Fox News",730,590,"login",!0),new l(1051,"PayPal",400,550,"login",!0),new l(9058,"Amazon",
785,510,"login",!0),new l(9219,"Xing",785,510,"login,friends",!0),new l(8206,"WeChat",730,590,"login",!1,"wechat|weixin"),new l(4121,"Custom OpenID",730,590,"login",!0),new l(4122,"Custom SAML",730,590,"login",!0),new l(6002,"Site",730,590,"",!0),new l(1052,"PayPalOAuth",730,590,"login",!0),new l(8207,"Line",730,590,"login")];g.getProviderByName=k;g.replaceProviderAliases=f;g.getProviderById=e;g.hideProvidersByName=d;g.getProvidersForRequiredCapabilities=c;g.getAllProviders=h;g.getProvidersByName=
r;g.replaceWildcard=p;a.utils.functions.createAlias("gigya.socialize.getAllProviders",h);a.utils.functions.createAlias("gigya.socialize.replaceProviderAliases",f);a.utils.functions.createAlias("gigya.socialize.getProvidersByName",r);a.utils.functions.createAlias("gigya.socialize._getProviderByName",k);a.utils.functions.createAlias("gigya.socialize.hideProvidersByName",d);a.utils.functions.createAlias("gigya.socialize._getProviderByID",e);a.utils.functions.createAlias("gigya.socialize.getProvidersForRequiredCapabilities",
c)})(b.providers||(b.providers={}))})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){(function(b){function g(){for(;b.queue&&0<b.queue.length;){var f=a.utils.object.clone(b.queue.splice(0,5),!0,!0);a.gscounters.sendReport({reports:f,noAuth:!k(f)})}}function k(a){for(var b=0;b<a.length;b++){var d=a[b];if("loadc"!==d.name&&"load"!==d.name||"loadc"===d.name&&d.reportData&&d.reportData.actionCounterPath)return!0}return!1}b.trackAddressBarShares=function(){if(a.thisScript.globalConf.trackAddressBarShares){var b=a._.apiAdapter.getTokenParam(a.thisScript.APIKey,"UUID"),e=document.location.href.split("#");
1!=e.length&&""!=e[1]&&"guid=_"!=e[1]||document.location.replace("#guid="+(b?b:"_"))}};b.report=function(f,e,d,c,g,r,p){void 0===r&&(r={});void 0===p&&(p=!1);f=a.utils.object.removeUndefined({name:f,time:(new Date).getTime().toString(),source:c,sourceData:g,reportData:r,cid:d});p?(p=[f],a.gscounters.sendReport({reports:p,noAuth:!k(p)})):(b.queue||(b.queue=[]),b.queue.push(f))};b.init=function(){setInterval(g,5E3)};b.reportLoad=function(a,b){if(!b._reportedLoad){b._reportedLoad=!0;var d="load";"gigya.socialize.plugins.reactions.showReactionsBarUI"!=
a&&("gigya.socialize.plugins.simpleshare.showSimpleShareUI"==a&&(d="loadSimple"),this.report(d,b.APIKey,b.cid,b.source,b.sourceData))}}})(a.reports||(a.reports={}))})(gigya||(gigya={}));
(function(a){(function(b){var g=function(){function g(b,e){void 0===e&&(e=!0);this.params=b;this._logger=a.log;this._eventDispatcher=function(b,d){return a.events.dispatchForWidget(b,d)};this._errorDispatcher=a.events;this._globalEventsManager=a.events.global;this._isDisposed=!1;this._eventWrappers={};this._globalEventHandlers={};this._id=++g.instanceCounter;this.params=b?a.utils.object.clone(b):{};e&&this.validateParams();for(var d in b)this[d]&&(this[d]=b[d])}g.prototype.onErrorEvent=function(){return this.getEvent("onError")};
g.prototype.onDisposedEvent=function(){return this.getEvent("onDisposed")};g.prototype.getType=function(){return this.constructor.name||this.getFunctionName(this.constructor)};g.prototype.getFunctionName=function(a){a=a.toString();a=a.substr(9);return a=a.substr(0,a.indexOf("("))};g.prototype.getConfig=function(){this.error(g.NOT_IMPLEMENTED_ERROR,400096);return{}};g.prototype.toString=function(){return this.getType()+" "+this.id()};g.prototype.id=function(){return this._id};g.prototype.warn=function(a,
b){var d=this.id()+" "+this.getType()+" - "+a;this._logger.addLog(d,b,!0)};g.prototype.error=function(a,b,d){void 0===b&&(b=300001);b={errorMessage:a,errorCode:b,errorDetails:this.id(),info:d};this.warn(a,b);this.dispatchEvent("error",b)};g.prototype.validateParams=function(b){b||(b=this.getConfig().requiredParams||[]);this.getConfig().defaultParams&&(this.params=a.utils.object.merge([this.getConfig().defaultParams,this.params]));var e=[];if(0<b.length)for(var d in b)if(b.hasOwnProperty(d)){var c=
b[d];this.params[c]||e.push(c)}return 0<e.length?(this.dispatchInvalidParamError(e[0]),!1):!0};g.prototype.dispatchEvent=function(a,b){void 0===b&&(b={});b.eventName=a;return this._eventDispatcher(b,this.params)};g.prototype.dispatchErrorFromResponse=function(a){this._errorDispatcher.dispatchErrorFromResponse(this.params,a)};g.prototype.dispatchInvalidParamError=function(a){this._errorDispatcher.dispatchInvalidParamError(this.params,a)};g.prototype.getEvent=function(a){this._eventWrappers[a]||(this.params[a]?
this.params[a]instanceof Array||(this.params[a]=[this.params[a]]):this.params[a]=[],this._eventWrappers[a]=new b.EventWrapper(this.params[a]));return this._eventWrappers[a]};g.prototype.addGlobalEventHandlers=function(a){for(var b in a)a.hasOwnProperty(b)&&this.addGlobalEventHandler(b,a[b])};g.prototype.addGlobalEventHandler=function(a,b,d,c){void 0===d&&(d=null);void 0===c&&(c="socialize");this._globalEventHandlers[a]||(this._globalEventHandlers[a]=[]);b=this._globalEventsManager.add(a,b,"component",
d,c,this.params);this._globalEventHandlers[a].push(b)};g.prototype.removeGlobalEventHandlers=function(a){for(var b in a)a.hasOwnProperty(b)&&this.removeGlobalEventHandler(b,a[b])};g.prototype.removeGlobalEventHandler=function(b,e,d,c){void 0===d&&(d=null);void 0===c&&(c="socialize");if(b=this._globalEventHandlers[b])d=a.utils.array.firstIndex(b,function(a){return a.handler==e}),-1<d&&(c=b[d],this._globalEventsManager.remove(c.fullEventName,c),b.splice(d,1))};g.prototype.prepareCallback=function(a){var b=
this;return function(){for(var d=[],c=0;c<arguments.length;c++)d[c-0]=arguments[c];if(!b._isDisposed)return a.apply(this,d)}};g.prototype.dispose=function(){for(var a in this._globalEventHandlers)for(var b in this._globalEventHandlers[a]){var d=this._globalEventHandlers[a][b];this._globalEventsManager.remove(d.fullEventName,d)}this._globalEventHandlers={};this._eventWrappers={};this.params={};this._isDisposed=!0};g.instanceCounter=0;g.NOT_IMPLEMENTED_ERROR="Abstract method not implemented";return g}();
b.BaseObject=g})(a._||(a._={}))})(gigya||(gigya={}));(function(a){a=a._||(a._={});a=a.DeviceTypes||(a.DeviceTypes={});a[a._undefined=0]="_undefined";a[a.desktop=1]="desktop";a[a.mobile=2]="mobile";a[a.auto=3]="auto"})(gigya||(gigya={}));
(function(a){(function(a){var g=function(){function a(b){void 0===b&&(b=[]);this._handlers=b}a.prototype.add=function(a){this._handlers.push(a)};a.prototype.remove=function(a){a=this._handlers.indexOf(a);-1<a&&this._handlers.splice(a,1)};return a}();a.EventWrapper=g})(a._||(a._={}))})(gigya||(gigya={}));
(function(a){a.build||(a.build={version:"",time:""});a.providersConfig||(a.providersConfig={});a.isGigya||(a.isGigya=!0);a.partnerSettings||(a.partnerSettings={authMode:"cookie",baseDomains:"",plugins:{apiDomain:"us1.gigya.com"}});(function(a){})(a._||(a._={}));(function(b){(function(g){function k(){window._isAPIProxy?b.apiAdapters.web.APIProxy.init():(a.utils.queue.hold("bootstrap","API"),a.partnerSettings.baseDomain=h(),a.partnerSettings.plugins.originalApiDomain=a.partnerSettings.plugins.apiDomain,
a.partnerSettings.plugins.apiDomain=r(),(a.localInfo.isIE6||a.localInfo.isIE7||a.localInfo.isIE8)&&"undefined"!=typeof console&&"undefined"!=typeof console.log&&console.log("Gigya: It looks like you're using an old version of Internet Explorer. This browser is not supported. Please upgrade to a newer version of IE."),a.reports.init(),l(function(){t();a.thisScript.globalConf.customEventMap&&a.events.addMap(a.thisScript.globalConf.customEventMap);n(function(){m(function(){a.utils.queue.release("bootstrap",
"API");u();a._.chat.init();q();a.reports.trackAddressBarShares();a.utils.functions.invokeOnPageLoad(function(){return window.setTimeout(a.socialize.trackReferrals,1E3)})})});c();f();"function"==typeof onGigyaServiceReady&&onGigyaServiceReady("socialize");var b={sref:document.referrer};a.thisScript.globalConf.actionCounterPath&&(b.actionCounterPath=a.thisScript.globalConf.actionCounterPath);a.reports.report("loadc",a.thisScript.APIKey,null,null,null,b)}))}function f(){if(a.abTesting)for(var b in a.abTesting)if("optimizely"===
b){var c=a.abTesting[b];if(c.serviceParams&&c.serviceParams.hasOwnProperty("apiKey")){var d=window.location.pathname,e=!1;if(c.disabledPaths)for(var f=0;f<c.disabledPaths.length;f++)if(-1<c.disabledPaths[f].indexOf(d)){e=!0;break}if(!e)for(f=0;f<c.enabledPaths.length;f++)-1<d.indexOf(c.enabledPaths[f])&&a.utils.script.load("//cdn.optimizely.com/js/"+c.serviceParams.apiKey+".js")}}}function e(){function b(d){var e=c[d];c[d]=function(){for(var b=[],f=0;f<arguments.length;f++)b[f-0]=arguments[f];b=Array.prototype.slice.apply(b);
f=b[0];f="object"===typeof f&&null!=f&&f.hasOwnProperty("message")?f:{message:f};a.log.addLog(d,f,!1);e&&(e.apply?e.apply(c,b):e(b.join(" ")))}}var c=window.console;c||(c={});var d=a.utils.array.getArrayFromString(a.thisScript.globalConf.consoleLogLevel,",");if(0!=d.length){var e=a.log.CONSOLE_LOG_LEVELS;-1==a.utils.array.indexOf(d,"*")&&(e=a.utils.array.intersect(d,e));a.log.selectedConsoleLogLevels=e;a.utils.array.forEach(e,function(a){return b(a)})}}function d(b){"1"==a.utils.cookie.get("gig_debug")?
a.socialize.showDebugUI({ignoreApiQueue:!0,waitForDebug:!1,onLoad:b}):b()}function c(){a.utils.functions.invokeOnPageLoad(function(){"undefined"!=typeof window.gigya_omniture_conf&&a.utils.script.load(a._.getCdnResource("/js/GenesisExchange_Gigya.min.js"))})}function h(){return a._.getPageBaseDomain()||document.location.hostname}function r(){return a.partnerSettings.customAPIDomainPrefix?a.partnerSettings.customAPIDomainPrefix+"."+a.partnerSettings.baseDomain:a.partnerSettings.plugins.apiDomain}function p(a){a||
(a="en-US");a=a.replace("_","-").toLowerCase();var b=a.split("-"),c=b[0],b=1<b.length?b[1]:c,b=b.toUpperCase();switch(a){case "es-mx":b="ES";break;case "pt-br":case "zh-cn":case "zh-hk":case "zh-tw":case "te-st":case "fr-inf":case "de-inf":case "es-inf":case "nl-inf":break;default:a=c}return{full:c+"-"+b,langCode:a,countryCode:b}}function l(b){var c=a.utils.DOM.getGigyaScriptElement(["gigya.js","socialize.js","socialize2.js","gsjssdk.js"]);if(c&&!window.__gig_hidescript){var d=a.utils.URL.getParamsFromURL(c.src,
!0)||{},e;""!==c.innerHTML.replace(/^\s+|\s+$/g,"")&&(e=a.utils.JSON.deserialize(c.innerHTML));"object"!==typeof e&&(e={});var f=window.__gigyaConf||{};a.thisScript={scriptElement:c,protocol:a.localInfo.protocol,baseDomain:c.src.split("/")[2],APIKey:d.apikey,lang:p(d.lang||f.lang||e.lang),globalConf:a.utils.object.merge([a.partnerSettings.plugins||{},e,f]),URLParams:d};a.thisScript.globalConf.lang=a.thisScript.lang.langCode;!a.thisScript.APIKey&&"object"===typeof console&&console.warn?console.warn("**** WARNING - Loading socialize.js without an APIKey parameter is unsupported and may result in an unexpected behavior.  ****"):
a.thisScript.globalConf.APIKey=a.thisScript.APIKey;b()}else 10>g.parseScriptRetries?(g.parseScriptRetries++,window.setTimeout(function(){l(b)},200)):(a.thisScript={scriptElement:null,protocol:a.localInfo.protocol,baseDomain:"https"===a.localInfo.protocol?"https://cdns.gigya.com":"http://cdn.gigya.com",APIKey:"",lang:p(""),globalConf:{},URLParams:{}},b())}function n(c){var f="web",g=window.__gigAPIAdapterSettings,h=a.localInfo.supportsLocalStorage,k="__gigAPIAdapterSettings_"+a.thisScript.APIKey+"_"+
a.build.version;if(g&&"mobile"==g.getAdapterName()&&g.getAPIKey()==a.thisScript.APIKey)f="mobile",h&&(h={apiKey:g.getAPIKey?g.getAPIKey():null,adapterName:g.getAdapterName?g.getAdapterName():null,features:g.getFeatures?g.getFeatures():null,settings:g.getSettings?g.getSettings():null},a.utils.localStorage.setItem(k,a.utils.JSON.serialize(h)));else if(h){var l=a.utils.JSON.deserialize(a.utils.localStorage.getItem(k));l&&"mobile"==l.adapterName&&(f="mobile",g={},l.apiKey&&(g.getAPIKey=function(){return l.apiKey}),
l.adapterName&&(g.getAdapterName=function(){return l.adapterName}),l.features&&(g.getFeatures=function(){return l.features}),l.settings&&(g.getSettings=function(){return l.settings}))}b.apiAdapter=b.apiAdapters[f].newApiAdapter(g);a.utils.functions.createAlias("gigya.auth.loginToken.getTokenParam",b.apiAdapter.getTokenParam);e();d(function(){b.apiAdapter.init(c)})}function q(){a.thisScript.globalConf.autoLogin&&(a.external.facebook.autoLogin(),a.external.googlePlus.autoLogin())}function m(c){var d=
a.utils.URL.getParamsFromURL(document.location.href);d.errorCode&&d.regToken?b.checkCompleteRegistration(d,a.thisScript.globalConf,function(){return c()}):c()}function t(){var c=a.localInfo,d;c.isIE11&&!window.indexedDB?(d=b.MessagingMethod.Flash,a.thisScript.globalConf.legacyCrossSiteMethod="localConnection"):d=c.supportsPostMessage?b.MessagingMethod.PostMessage:b.MessagingMethod.Flash;c.messagingMethod=d}function u(){a.utils.queue.queueForExecution("API",function(){a.utils.functions.invokeOnPageLoad(function(){a.providersConfig.facebook&&
a.external.facebook.load(!1);a.providersConfig.googlePlus&&a.external.googlePlus.load()})})}g.parseScriptRetries=0;g.init=k;g.warnOnUnsupportedBrowser=function(){};g.loadABTesting=f;g.wrapJSConsole=e;g.startDebugIfNeeded=d;g.loadOmniture=c;g.getBaseDomain=h;g.getAPIDomain=r;g.parseLang=p;g.parseScriptElement=l;g.initApiAdapter=n;g.autoLogin=q;g.checkReturnFromRedirect=m;g.setMessagingMethod=t;g.injectExternalSdks=u;k()})(b.bootstrap||(b.bootstrap={}))})(a._||(a._={}))})(gigya||(gigya={}));


} else if (typeof console == 'object' && console.warn) {
console.warn('**** gigya.js loaded twice ****');
}
