var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
  let window = _____WB$wombat$assign$function_____("window");
  let self = _____WB$wombat$assign$function_____("self");
  let document = _____WB$wombat$assign$function_____("document");
  let location = _____WB$wombat$assign$function_____("location");
  let top = _____WB$wombat$assign$function_____("top");
  let parent = _____WB$wombat$assign$function_____("parent");
  let frames = _____WB$wombat$assign$function_____("frames");
  let opener = _____WB$wombat$assign$function_____("opener");

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/rambler-id-helper/",n(n.s=26)}({1:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.INSTALL="install",e.INSTALLED="installed",e.ERROR="error",e.LOGIN="login",e.OAUTHLOGIN="oauthlogin",e.LOGOUT="logout",e.CLOSE="close",e.REDIRECT="redirect",e.RESIZE="resize",e.LOADED="loaded"}(r||(r={}))},10:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(8),o=function(e){var t,n=null;try{n=JSON.parse(null!==(t=r.get(e))&&void 0!==t?t:"")}catch(e){}return n},i=function(e,t,n){try{r.set(e,JSON.stringify(t),n)}catch(e){}},a=function(e,t){try{r.remove(e,t)}catch(e){}}},16:function(e,t,n){var r;!function(n){"use strict";var o=function(e,t,n){if(!Array.isArray(e))throw new TypeError("each() expects array as first argument");if("function"!=typeof t)throw new TypeError("each() expects function as second argument");if("function"!=typeof n&&(n=Function.prototype),0===e.length)return n(void 0,e);var r=new Array(e.length),o=0,i=!1;e.forEach((function(a,s){t(a,(function(t,a){if(!i)return t?(i=!0,n(t)):(r[s]=a,(o+=1)===e.length?n(void 0,r):void 0)}))}))};void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},2:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r="ramblerIdHelper",o="ramblerIdHelperSentry"},26:function(e,t,n){"use strict";n.r(t),n.d(t,"registerHelper",(function(){return Y}));var r,o,i=n(2),a=n(16),s=n.n(a),u=n(4),c=n(10),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},l={domain:"."+window.location.hostname.split(".").slice(-2).join("."),path:"/"},p=function(e){if(e){var t=e;e instanceof Error&&(t={message:e.message},"code"in e&&(t.code=e.code,t.method=e.method,t.requestId=e.requestId));var n=e instanceof Error&&"need session"!==e.message?1/24/30:1/24/12;c.c("rchainid",t,d(d({},l),{expires:n}))}},f=function(){c.b("rchainid",l)},m="requestStorageAccess"in document&&"function"==typeof document.requestStorageAccess,h=["id.rambler.ru","id.championat.com","idrambler.afisha.ru","rid.eda.ru","id.gazeta.ru","id.lenta.ru","id.moslenta.ru","id.secretmag.ru","id.motor.ru","id.passion.ru","id.autorambler.ru","id.wmj.ru","id.letidor.ru","id.ferra.ru","id.quto.ru","id.indicator.ru","id-loyalty.rambler-co.ru","id.eagleplatform.com"],y=function(e){return e.split(".").slice(-2).join(".")},v=function(){var e=window.location.hostname,t=(m?h.filter((function(t){return y(t)===y(e)})):[])[0];return t?"https://"+t:"https://webcf.waybackmachine.org/web/20200814032857/https://id.rambler.ru"},b=function(e,t){var n=new XMLHttpRequest;n.open("get",e,!0),n.onreadystatechange=function(){4===n.readyState&&0!==n.status&&t(null,n.responseText)},n.onerror=function(){t(new u.a({message:"location does not respond",code:0,method:e,sendToSentry:!1}))},n.send(null)},g=function(){return(Date.now().toString(36)+Math.random().toString(36).slice(2)).slice(0,17)},O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},w=v(),E=[-11,-4e3,-2e3,-2002,"need session"],R=function(e,t,n){var r=new XMLHttpRequest,o="rid"+g(),i={method:e,params:[t],rpc:"2.0"};r.open("post",w+"/jsonrpc",!0),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("X-Client-Request-Id",o),r.withCredentials=!0,r.onreadystatechange=function(){var t;if(4===r.readyState&&200===r.status){var i=JSON.parse(r.responseText).result,a=i.status,s=i.error,c=O(i,["status","error"]);if("OK"!==a||null!=s)if(null!=s){var d=s.errno,l=null===(t=s.strerror)||void 0===t?void 0:t.toLowerCase(),p=!~E.indexOf(l)&&!~E.indexOf(d);n(new u.a({message:l,code:d,method:e,requestId:o,sendToSentry:p}))}else n(new u.a({message:"api failed",code:0,method:e,requestId:o}));else n(null,c)}},r.onerror=function(){n(new u.a({message:"api does not respond",code:0,method:e,requestId:o,sendToSentry:!1}))},r.send(JSON.stringify(i))},L=R.bind(null,"Rambler::Id::get_profile_info"),I=R.bind(null,"Rambler::Id::destroy_session"),T=R.bind(null,"Rambler::Id::get_variti_url"),S=R.bind(null,"Rambler::Id::Aux::get_rsidx"),x=R.bind(null,"Rambler::Id::get_rccid"),j=function(e,t,n,r){var o=new XMLHttpRequest,i="rid"+g(),a="https://webcf.waybackmachine.org/web/20200814032857/https://prime.rambler.ru/api/v3"+t;"get"===e&&(a+="?"+Object.keys(n).reduce((function(e,t){return e.concat(t+"="+encodeURIComponent(n[t]&&"object"==typeof n[t]?JSON.stringify(n[t]):n[t]))}),[]).join("&"));o.open(e,a,!0),o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("X-Client-Request-Id",i),o.onreadystatechange=function(){if(4===o.readyState&&200===o.status){var e=JSON.parse(o.responseText),n=e.success,a=e.error,s=e.result;if(n&&null==a)r(null,s);else{var c=null==a?"UNKNOW_ERROR":a.type+"_"+a.subtype;r(new u.a({message:"api failed",code:c,requestId:i,method:t}))}}},o.onerror=function(){r(new u.a({message:"api does not respond",code:"UNKNOW_ERROR",requestId:i,method:t,sendToSentry:!1}))},o.send("get"===e?null:JSON.stringify(n))},A=j.bind(null,"get","/prime/getActiveAdblockInfo"),P=j.bind(null,"post","/prime/createAdblockOrder"),C=n(1),N=n(9),_=function(e){r?e(r):Object(N.a)("https://webcf.waybackmachine.org/web/20200814032857/https://id.rambler.ru/rambler-id-helper/sentry.js?69688fe1bd1ed978d31bf5ab045af0c760e7d45e",(function(t){r?e(r):t||(r=window[i.b],delete window[i.b],e(r))}))},k=function(e,t){return e+"?"+Object.keys(t).map((function(e){var n=t[e];return n&&"object"==typeof n&&(n=JSON.stringify(n)),e+"="+encodeURIComponent(n)})).join("&")},U=function(){return(U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},q=function(e,t){e.onload=function(){t(null,e)},e.onerror=function(){t(new u.a({message:"frame does not loaded"}))}},M=function(){return(M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},F=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},D=function(){function e(){var t=this;this.firstPartyOrigin=v(),this.currentTabId=g(),this.listeners={},this.listenStorage=function(n){var r=n.data;if(r&&"object"==typeof r){var o=r.emitter,a=r.eventType,s=r.redirectUrl,u=r.data,c=r.frameInfo,d=void 0===c?u||{}:c,l=G(r,["emitter","eventType","redirectUrl","data","frameInfo"]);o===i.a&&(!s||"object"!=typeof d||d instanceof Error||(d.redirectUrl=s),e.isAuthEvent(a)?t.emit(a,u,l):t.emit(a,d,s))}},this.storage=document.createElement("iframe"),this.storage.src=this.firstPartyOrigin+"/rambler-id-helper/storage?69688fe1bd1ed978d31bf5ab045af0c760e7d45e",this.storage.style.width="0",this.storage.style.height="0",this.storage.style.border="0",this.storage.style.position="absolute",this.storage.style.left="-9999px",this.storage.setAttribute("aria-hidden","true"),this.storage.onload=function(){var e,n={eventType:C.a.INSTALL,emitter:i.a,data:{providerOrigin:window.location.href}};try{null===(e=t.storage.contentWindow)||void 0===e||e.postMessage(n,t.firstPartyOrigin),t.emit(C.a.INSTALLED)}catch(e){t.emit(C.a.ERROR,new Error("storage is not installed"))}},this.storage.onerror=function(){t.emit(C.a.INSTALLED),t.emit(C.a.ERROR,new Error("storage is not loaded"))},document.body&&document.body.appendChild(this.storage),window.addEventListener("message",this.listenStorage,!1)}return e.isAuthEvent=function(t){return Boolean(~e.AUTH_EVENTS.indexOf(t))},e.canPropagateEvent=function(e){return e!==C.a.ERROR},e.prototype.getBroadcastNodes=function(t){var n=window.opener,r=window.parent,o=e.isAuthEvent(t)?Array.prototype.slice.call(document.getElementsByTagName("iframe")).filter((function(e){return/^https?:\/\/[^/]+\.rambler\.ru\//.test(e.src)})).map((function(e){return e.contentWindow})):[];return[n,r!==window&&r].concat(o).filter(Boolean)},e.prototype.existsListener=function(e,t){return this.listeners[e]&&-1!==this.listeners[e].indexOf(t)},e.prototype.addListener=function(e,t){this.listeners[e]=this.listeners[e]||[],"function"!=typeof t||this.existsListener(e,t)||this.listeners[e].push(t)},e.prototype.removeListener=function(e,t){this.existsListener(e,t)&&this.listeners[e].splice(this.listeners[e].indexOf(t),1)},e.prototype.emit=function(t,n,r){for(var o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];var s,u=this,c=u.listeners,d=u.currentTabId,l=u.latestEvent;if(e.canPropagateEvent(t)){var p=r&&"object"==typeof r?r:{},f=p.tabId,m=void 0===f?null:f,h=p.time,y=void 0===h?Date.now():h,v=G(p,["tabId","time"]);if(y===l)return;var b=!n||"object"!=typeof n||n instanceof Error?{}:n,g=b.silentCurrentTab,O=void 0===g?v.silentCurrentTab:g,w=b.redirectUrl,E=void 0===w?"":w,R=!m||m===d;s=E;var L={emitter:i.a,eventType:t,time:y,data:n,tabId:m||d};try{var I=this.getBroadcastNodes(t);I.forEach((function(e){e.postMessage(L,"*")}))}catch(e){}if(this.latestEvent=y,R&&O)return}setTimeout((function(){c[t]&&c[t].forEach((function(e){e.apply(void 0,F([n,s||r],o))}))}),10)},e.AUTH_EVENTS=[C.a.LOGIN,C.a.OAUTHLOGIN,C.a.LOGOUT],e}(),W=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),z=function(){return(z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},J=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},B=function(){},X=function(e){function t(){var t=e.call(this)||this;return t.Events=C.a,t.sendError=function(e){"sendToSentry"in e&&!e.sendToSentry||_((function(t){t.withScope((function(n){"method"in e&&(n.setExtra("code",e.code),n.setExtra("method",e.method)),"requestId"in e&&n.setExtra("X-Client-Request-Id",e.requestId),t.captureException(e)}))}))},t.redirect=function(e,t){window.location.href=t},t.closeAuth=function(e){void 0===e&&(e=B);var n=t,r=n.authFrame,o=n.authContainer;if(r){if(r instanceof Window&&"function"==typeof r.close)return r.close(),void("function"==typeof e&&e());o instanceof HTMLElement&&"own"===o.getAttribute("data-id-frame")&&(o.style.zIndex="-1",o.style.transform="translateY(-100vh)",o.style.opacity="0",document.documentElement instanceof HTMLElement&&(document.documentElement.style.overflow="")),"function"==typeof e&&e()}},t.resizeAuth=function(e){var n=e.height,r=t.authContainer;r instanceof HTMLElement&&(r.style.height=n+"px")},t.destroyAuth=function(e){"object"==typeof e&&((null==e?void 0:e.keepWindow)||"registration"===(null==e?void 0:e.on))||t.closeAuth((function(){var e=t,n=e.authFrame,r=e.authContainer;n instanceof HTMLIFrameElement&&r instanceof HTMLElement&&(t.removeListener(C.a.RESIZE,t.resizeAuth),t.removeListener(C.a.CLOSE,t.closeAuth),t.removeListener(C.a.LOGIN,t.destroyAuth),t.removeListener(C.a.OAUTHLOGIN,t.destroyAuth),t.removeListener(C.a.REDIRECT,t.redirect),"embed"!==r.getAttribute("data-id-frame")?document.body&&(document.body.removeChild(r),delete t.authFrame):setTimeout((function(){r.removeChild(n),r.removeAttribute("data-id-frame"),delete t.authFrame}),500))}))},t.registerOnFrameRedirect=t.addListener.bind(t,C.a.REDIRECT),t.registerOnFrameCloseCallback=t.addListener.bind(t,C.a.CLOSE),t.registerOnPossibleLoginCallback=t.addListener.bind(t,C.a.LOGIN),t.registerOnPossibleOauthLoginCallback=t.addListener.bind(t,C.a.OAUTHLOGIN),t.registerOnPossibleLogoutCallback=t.addListener.bind(t,C.a.LOGOUT),t.emitLogin=t.emit.bind(t,C.a.LOGIN),t.emitLogout=t.emit.bind(t,C.a.LOGOUT),t.addListener(C.a.LOGIN,f),t.addListener(C.a.OAUTHLOGIN,f),t.addListener(C.a.LOGOUT,f),t.addListener(C.a.ERROR,t.sendError),t}return W(t,e),Object.defineProperty(t.prototype,"hasTrackingPrevention",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"authContainer",{get:function(){var e=null;try{e=this.authFrame instanceof HTMLIFrameElement?this.authFrame.parentElement:null}catch(e){}return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){void 0===e&&(e=B),e()},t.prototype.rpc=function(e,t,n){var r=this;void 0===n&&(n=B),R(e,t,(function(e,t){e&&r.emit(C.a.ERROR,e),n(e,t)}))},t.prototype.logout=function(e,t){var n=this;void 0===t&&(t=B),"function"==typeof e&&(t=e,e=void 0),I({},(function(r){r&&n.emit(C.a.ERROR,r),n.emit(C.a.LOGOUT,e),t(null,r)}))},t.prototype.getProfileInfo=function(e,t){var n=this;void 0===t&&(t=B),"function"==typeof e&&(t=e,e={}),L(e,(function(e,r){e&&n.emit(C.a.ERROR,e),t(r?r.profile:null,e)}))},t.prototype.getCurrentUserInfo=function(e){void 0===e&&(e=B),this.getProfileInfo((function(t,n){if(t){var r=t.display.avatar.url;/avatars\.rambler\.ru/.test(r)&&(r=r.replace(/\/default$/,"").replace(/\/get/,"/100x100"));var o={provider:t.display.avatar.provider,iconUrl:t.display.avatar.provider_icon,avatarUrl:r,shortName:t.display.short_name,displayName:t.display.display_name,mailboxExists:"general"===t.__type?1:0};e(o,n)}else e(null,n)}))},t.prototype.createSession=function(e,t){var n=this;void 0===t&&(t=B),Object(N.a)("https://webcf.waybackmachine.org/web/20200814032857/https://id.rambler.ru/script/create_session.js?token="+e,(function(e){e?n.emit(C.a.ERROR,e):t()}))},t.prototype.exportsid=function(e){var t=this;void 0===e&&(e=B),Object(N.a)("https://webcf.waybackmachine.org/web/20200814032857/https://id.rambler.ru/script/exportsid.js",(function(n){n?t.emit(C.a.ERROR,n):e(window.RamblerId)}))},t.prototype.variti=function(e){var t=this;void 0===e&&(e=B),T({},(function(n,r){if(n&&t.emit(C.a.ERROR,n),r&&r.vrt_ticket){var o=r.vrt_ticket,i=o.vrtUrl,a=J(o,["vrtUrl"]);b(i,(function(n){n&&t.emit(C.a.ERROR,n),e(a,n)}))}else e(null,n)}))},t.prototype.getSessionToken=function(e){var t=this;void 0===e&&(e=B),S({},(function(n,r){n&&t.emit(C.a.ERROR,n),p(null!=n?n:null==r?void 0:r.result.rccid),e(r?r.result:null,n)}))},t.prototype.getDefaultChainId=function(e){var t=this;void 0===e&&(e=B);var n=function(){var e=c.a("rchainid");if(!e||"string"==typeof e)return e;var t=e.code,n=e.message,r=e.method,o=e.requestId;return o?new u.a({message:n,code:t,method:r,requestId:o}):new Error(n)}();n instanceof Error?e(null,n):n?e({rccid:n}):x({},(function(n,r){n&&t.emit(C.a.ERROR,n),p(null!=n?n:null==r?void 0:r.rccid),e(r?{rccid:r.rccid}:null,n)}))},t.prototype.propagateSession=function(e,t,n){var r=this;void 0===t&&(t={eventType:C.a.LOGIN}),void 0===n&&(n=B);var o=t.eventType,i=void 0===o?C.a.LOGIN:o,a=t.shortSession,c=void 0!==a&&a,d=t.openWindow,l=void 0!==d&&d,p=J(t,["eventType","shortSession","openWindow"]);if(p.keepWindow&&(p.data=p.data||{},p.data.keepWindow=p.keepWindow),this.hasTrackingPrevention){s()(h,(function(e,t){b("https://"+e+"/api/itp/v2/ping",(function(n,r){var o;try{o=JSON.parse(r)}catch(e){}t(null,[e,null==o?void 0:o.response,n])}))}),(function(t,o){var a=o.filter((function(e){return e[0]===h[0]})).map((function(e){return e[1]}))[0],s=[],d=[];o.forEach((function(e){var t=e[0],n=e[1],r=e[2];a&&a===n?s.push(t):d.push(r||new u.a({message:"ping response wrong",code:0,method:"https://"+t+"/api/itp/v2/ping"}))})),d.length>0&&_((function(){d.forEach((function(e){return r.emit(C.a.ERROR,e)}))}));var f=s[0],m=s.slice(1),y="https://webcf.waybackmachine.org/web/20200814032857/https://id.rambler.ru/rambler-id-helper/propagate?69688fe1bd1ed978d31bf5ab045af0c760e7d45e&extra="+encodeURIComponent(JSON.stringify(z({eventType:i},p))),v="https://"+f+"/api/itp/v2/redirector?rsid="+(e||"")+"&setShortCookie="+(c?1:0)+m.map((function(e){return"&to="+e})).join("")+"&back="+encodeURIComponent(y);if(!l)return n(),void(window.location.href=v);var b=function(){r.removeListener(i,b),n()};r.addListener(i,b),window.open(v,"","status=1,toolbar=0,menubar=0,resizable=1,scrollbars=1,width=250px,height=100px,top=100px,left=100px")}))}else{if(p.back&&!p.popup){var f=function(){setTimeout((function(){var e;r.removeListener(i,f),n(),window.location.href=null!==(e=p.back)&&void 0!==e?e:""}),500)};this.addListener(i,f)}else n();this.emit(i,p.data)}},t.prototype.getPrimeSubscription=function(e,t){var n=this;void 0===t&&(t=B),"function"==typeof e&&(t=e,e={}),this.getSessionToken((function(r,o){var i=!1;if(r&&r.token){var a={params:e,sessionId:r.token};A(a,(function(e,r){e&&n.emit(C.a.ERROR,e),i=!!r&&!!r.adblockInfoList&&r.adblockInfoList.length>0,t(i,e)}))}else t(i,o)}))},t.prototype.createPrimeSubscriptionOrder=function(e,t){var n=this;void 0===t&&(t=B);var r=e.code,o=e.cpsEmail,i=e.useForSubscription,a=void 0!==i&&i,s=J(e,["code","cpsEmail","useForSubscription"]);r?o?this.getSessionToken((function(e,i){if(e&&e.token){var u={params:{code:r,useForSubscription:a,paymentCpsEmail:o},sessionId:e.token};P(u,(function(e,i){if(e)return n.emit(C.a.ERROR,e),void t(null,e);var u=i.shopId,c=i.scId,d=i.orderNumber,l=i.requestSign,p=i.orderAmount,f=i.discountPrice,m=i.tax,h=i.publicName,y=i.publicDescription,v=i.publicPicture;!function(e,t,n){window.RamblerPayment=window.RamblerPayment||[],window.RamblerPayment.push((function(){var r=window.RamblerPayment.buildWidget("PaymentPopup",M({lang:"ru"},e));void 0!==r&&r.then((function(e){return e.show(),e.initializeOrder(t).then((function(){var t,r=null;e.on("close",(function(){e.destroy(),n(r,t)})),e.on("fail",(function(){r=new Error("payment failed")})),e.on("success",(function(e){t=e}))}))})).catch((function(e){n(e)}))})),Object(N.a)("https://webcf.waybackmachine.org/web/20200814032857/https://payment.rambler.ru/widget/sdk.js",(function(e){e&&n(e)}))}(s,{order:{shopId:u,scId:c,orderNumber:d,requestSign:l,orderAmount:p,cpsEmail:o,productName:r,paymentAddParams:{rebillingOn:a?1:0}},products:[{offer:{name:h,description:y,picture:v,price:f,tax:m,taxValue:0},count:1,total:{price:f,currencyId:"RUB"}}]},(function(e,r){e&&n.emit(C.a.ERROR,e),t(r,e)}))}))}else t(null,i)})):t(null,new Error("missing `cpsEmail` in params")):t(null,new Error("missing `code` of product in params"))},t.prototype.redirectToAuth=function(e){void 0===e&&(e={});var t=e.path,n=void 0===t?"/login-20/login":t,r=J(e,["path"]);r.back=window.location.href;var o=k("https://webcf.waybackmachine.org/web/20200814032857/https://id.rambler.ru"+n,r);window.location.href=o},t.prototype.openAuth=function(e,t){var n=this;void 0===t&&(t=B),function(e,t,n){var r,o=(t=null!==(r=U({},t))&&void 0!==r?r:{}).container;delete t.container;var i=t.path,a=void 0===i?"/login-20/login":i,s=H(t,["path"]),u=o instanceof HTMLElement?"embed":m?"popup":"iframe",c=window.location,d=c.href,l=c.protocol,p=c.host;s.back=d,s.param=u,s.iframeOrigin=l+"//"+p;var f=k("https://webcf.waybackmachine.org/web/20200814032857/https://id.rambler.ru"+a,s),h=e,y=null;try{y=h instanceof HTMLIFrameElement?h.parentElement:null}catch(e){}"popup"!==u&&h instanceof HTMLIFrameElement&&(null==o||o instanceof HTMLElement&&o===y)?(q(h,n),h.src=f):"popup"===u?(h=window.open(f,"idFrame","status=1,toolbar=0,menubar=0,resizable=1,scrollbars=1,width=800px,height=700px,top=100px,left=100px"),n(null,h)):((h=document.createElement("iframe")).src=f,h.frameBorder="0",h.style.display="none",h.style.width="100%",h.style.height="100%",e=h,q(h,(function(){h instanceof HTMLIFrameElement&&(h.style.display="block"),n(null,h)})),o instanceof HTMLElement?o.setAttribute("data-id-frame","embed"):((o=document.createElement("div")).style.position="fixed",o.style.top="0px",o.style.left="0px",o.style.right="0px",o.style.bottom="0px",o.style.zIndex="-1",o.style.transform="translateY(-100vh)",o.style.opacity="0",o.style.transition="all 250ms",o.style.overflowY="auto",o.style.webkitOverflowScrolling="touch",o.setAttribute("data-id-frame","own")),o.appendChild(h),document.body&&null==o.parentElement&&document.body.appendChild(o))}(this.authFrame,e,(function(e,r){if(e&&n.emit(C.a.ERROR,e),r){n.authFrame=r;var o,i=n.authContainer;i instanceof HTMLElement&&("embed"===(o=i.getAttribute("data-id-frame"))&&n.addListener(C.a.RESIZE,n.resizeAuth),"own"===o&&(i.style.zIndex="10000",i.style.transform="translateY(0)",i.style.opacity="1",document.documentElement instanceof HTMLElement&&(document.documentElement.style.overflow="hidden"))),"embed"!==o&&(n.addListener(C.a.CLOSE,n.closeAuth),n.addListener(C.a.LOGIN,n.destroyAuth),n.addListener(C.a.OAUTHLOGIN,n.destroyAuth)),n.addListener(C.a.REDIRECT,n.redirect),t()}}))},t}(D),Y=function(){if(Array.isArray(window[i.a])||!window[i.a]){var e=window[i.a]||[];window[i.a]=new X,e.forEach((function(e){return e()}))}};document.body?Y():document.addEventListener("DOMContentLoaded",Y,!1)},4:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r,o=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=function(e){function t(t){var n,r,o=e.call(this)||this;return o.name="ApiError",o.message=t.message,o.code=null!==(n=t.code)&&void 0!==n?n:"unknow",o.method=t.method,o.requestId=t.requestId,o.sendToSentry=null===(r=t.sendToSentry)||void 0===r||r,o}return o(t,e),t}(Error)},8:function(e,t,n){"use strict";e.exports.get=function(e){if(document.cookie&&document.cookie.length){for(var t,n=document.cookie.split(";"),r={},o=0,i=n.length;o<i;o++)r[(t=n[o].replace(/^(\s|\u00A0)+/g,"").split("="))[0]]=decodeURIComponent(t[1]);return e?r[e]:r}},e.exports.set=function(e,t,n){if(void 0!==e&&void 0!==t){var r=(n=n||{}).expires||{};"number"==typeof n.expires&&(r=new Date).setTime(r.getTime()+24*n.expires*60*60*1e3);var o=e+"="+encodeURIComponent(t);return o+=r.toUTCString?"; expires="+r.toUTCString():"",o+=n.path?"; path="+n.path:"",o+=n.domain?"; domain="+n.domain:"",o+=n.secure?"; secure":"",document.cookie=o,o}},e.exports.remove=function(t,n){return(n=n||{}).expires=-1,e.exports.set(t,"",n)}},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(4),o=function(e,t){var n=document.createElement("script");n.src=e,n.onload=function(){t(null),document.body&&document.body.removeChild(n)},n.onerror=function(){t(new r.a({message:"script does not loaded"}))},document.body&&document.body.appendChild(n)}}});
//# sourceMappingURL=auth_events.js.map?69688fe1bd1ed978d31bf5ab045af0c760e7d45e

}
/*
     FILE ARCHIVED ON 03:28:57 Aug 14, 2020 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 04:34:27 Nov 19, 2024.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
/*
playback timings (ms):
  captures_list: 1.097
  exclusion.robots: 0.057
  exclusion.robots.policy: 0.041
  esindex: 0.014
  cdx.remote: 17.405
  LoadShardBlock: 926.438 (6)
  PetaboxLoader3.datanode: 827.089 (12)
  PetaboxLoader3.resolve: 270.619 (4)
  load_resource: 379.393 (2)
*/