var XsollaLogin=function(e){"use strict";var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,r)};function r(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]])}return r}var i=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}};function a(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var s=Object.prototype.toString;function c(e){return"[object Array]"===s.call(e)}function u(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===s.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var p={isArray:c,isArrayBuffer:function(e){return"[object ArrayBuffer]"===s.call(e)},isBuffer:function(e){return null!=e&&(a(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&a(e.slice(0,0))}(e)||!!e._isBuffer)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===s.call(e)},isFile:function(e){return"[object File]"===s.call(e)},isBlob:function(e){return"[object Blob]"===s.call(e)},isFunction:l,isStream:function(e){return u(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:f,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)f(arguments[n],r);return t},extend:function(e,t,r){return f(t,function(t,n){e[n]=r&&"function"==typeof t?i(t,r):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},d="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function y(){throw new Error("setTimeout has not been defined")}function h(){throw new Error("clearTimeout has not been defined")}var g=y,m=h;function v(e){if(g===setTimeout)return setTimeout(e,0);if((g===y||!g)&&setTimeout)return g=setTimeout,setTimeout(e,0);try{return g(e,0)}catch(t){try{return g.call(null,e,0)}catch(t){return g.call(this,e,0)}}}"function"==typeof d.setTimeout&&(g=setTimeout),"function"==typeof d.clearTimeout&&(m=clearTimeout);var b,w=[],S=!1,E=-1;function O(){S&&b&&(S=!1,b.length?w=b.concat(w):E=-1,w.length&&j())}function j(){if(!S){var e=v(O);S=!0;for(var t=w.length;t;){for(b=w,w=[];++E<t;)b&&b[E].run();E=-1,t=w.length}b=null,S=!1,function(e){if(m===clearTimeout)return clearTimeout(e);if((m===h||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(e);try{m(e)}catch(t){try{return m.call(null,e)}catch(t){return m.call(this,e)}}}(e)}}function P(e,t){this.fun=e,this.array=t}P.prototype.run=function(){this.fun.apply(null,this.array)};function x(){}var A=x,_=x,T=x,k=x,C=x,I=x,L=x;var R=d.performance||{},M=R.now||R.mozNow||R.msNow||R.oNow||R.webkitNow||function(){return(new Date).getTime()};var N=new Date;var U={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];w.push(new P(e,t)),1!==w.length||S||v(j)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:A,addListener:_,once:T,off:k,removeListener:C,removeAllListeners:I,emit:L,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*M.call(R),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-N)/1e3}},D=function(e,t,r,n,o){return function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e}(new Error(e),t,r,n,o)};function B(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var F=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],G=p.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=p.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function V(){this.message="String contains an invalid character"}V.prototype=new Error,V.prototype.code=5,V.prototype.name="InvalidCharacterError";var H=function(e){for(var t,r,n=String(e),o="",i=0,a=W;n.charAt(0|i)||(a="=",i%1);o+=a.charAt(63&t>>8-i%1*8)){if((r=n.charCodeAt(i+=.75))>255)throw new V;t=t<<8|r}return o},q=p.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),p.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),p.isString(n)&&a.push("path="+n),p.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},X="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||H,z=function(e){return new Promise(function(t,r){var n=e.data,o=e.headers;p.isFormData(n)&&delete o["Content-Type"];var i=new XMLHttpRequest,a="onreadystatechange",s=!1;if("test"===U.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in i||G(e.url)||(i=new window.XDomainRequest,a="onload",s=!0,i.onprogress=function(){},i.ontimeout=function(){}),e.auth){var c=e.auth.username||"",u=e.auth.password||"";o.Authorization="Basic "+X(c+":"+u)}if(i.open(e.method.toUpperCase(),function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(p.isURLSearchParams(t))n=t.toString();else{var o=[];p.forEach(t,function(e,t){null!=e&&(p.isArray(e)?t+="[]":e=[e],p.forEach(e,function(e){p.isDate(e)?e=e.toISOString():p.isObject(e)&&(e=JSON.stringify(e)),o.push(B(t)+"="+B(e))}))}),n=o.join("&")}return n&&(e+=(-1===e.indexOf("?")?"?":"&")+n),e}(e.url,e.params,e.paramsSerializer),!0),i.timeout=e.timeout,i[a]=function(){if(i&&(4===i.readyState||s)&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var n,o,a,c,u,l="getAllResponseHeaders"in i?(n=i.getAllResponseHeaders(),u={},n?(p.forEach(n.split("\n"),function(e){if(c=e.indexOf(":"),o=p.trim(e.substr(0,c)).toLowerCase(),a=p.trim(e.substr(c+1)),o){if(u[o]&&F.indexOf(o)>=0)return;u[o]="set-cookie"===o?(u[o]?u[o]:[]).concat([a]):u[o]?u[o]+", "+a:a}}),u):u):null,f={data:e.responseType&&"text"!==e.responseType?i.response:i.responseText,status:1223===i.status?204:i.status,statusText:1223===i.status?"No Content":i.statusText,headers:l,config:e,request:i};!function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(D("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}(t,r,f),i=null}},i.onerror=function(){r(D("Network Error",e,null,i)),i=null},i.ontimeout=function(){r(D("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",i)),i=null},p.isStandardBrowserEnv()){var l=q,f=(e.withCredentials||G(e.url))&&e.xsrfCookieName?l.read(e.xsrfCookieName):void 0;f&&(o[e.xsrfHeaderName]=f)}if("setRequestHeader"in i&&p.forEach(o,function(e,t){void 0===n&&"content-type"===t.toLowerCase()?delete o[t]:i.setRequestHeader(t,e)}),e.withCredentials&&(i.withCredentials=!0),e.responseType)try{i.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&i.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){i&&(i.abort(),r(e),i=null)}),void 0===n&&(n=null),i.send(n)})},$={"Content-Type":"application/x-www-form-urlencoded"};function J(e,t){!p.isUndefined(e)&&p.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var K,Z={adapter:("undefined"!=typeof XMLHttpRequest?K=z:void 0!==U&&(K=z),K),transformRequest:[function(e,t){return function(e,t){p.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}(t,"Content-Type"),p.isFormData(e)||p.isArrayBuffer(e)||p.isBuffer(e)||p.isStream(e)||p.isFile(e)||p.isBlob(e)?e:p.isArrayBufferView(e)?e.buffer:p.isURLSearchParams(e)?(J(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):p.isObject(e)?(J(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};Z.headers={common:{Accept:"application/json, text/plain, */*"}},p.forEach(["delete","get","head"],function(e){Z.headers[e]={}}),p.forEach(["post","put","patch"],function(e){Z.headers[e]=p.merge($)});var Y=Z;function Q(){this.handlers=[]}Q.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},Q.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Q.prototype.forEach=function(e){p.forEach(this.handlers,function(t){null!==t&&e(t)})};var ee=Q,te=function(e,t,r){return p.forEach(r,function(r){e=r(e,t)}),e},re=function(e){return!(!e||!e.__CANCEL__)};function ne(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var oe=function(e){var t,r,n;return ne(e),e.baseURL&&(n=e.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(n))&&(e.url=(t=e.baseURL,(r=e.url)?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t)),e.headers=e.headers||{},e.data=te(e.data,e.headers,e.transformRequest),e.headers=p.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),p.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||Y.adapter)(e).then(function(t){return ne(e),t.data=te(t.data,t.headers,e.transformResponse),t},function(t){return re(t)||(ne(e),t&&t.response&&(t.response.data=te(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})},ie="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ae(e,t){return e(t={exports:{}},t.exports),t.exports}var se=ae(function(e){var t=function(){function e(t,n,o,i){"object"==typeof n&&(o=n.depth,i=n.prototype,n.filter,n=n.circular);var a=[],s=[],c="undefined"!=typeof Buffer;return void 0===n&&(n=!0),void 0===o&&(o=1/0),function t(o,u){if(null===o)return null;if(0==u)return o;var l,f;if("object"!=typeof o)return o;if(e.__isArray(o))l=[];else if(e.__isRegExp(o))l=new RegExp(o.source,r(o)),o.lastIndex&&(l.lastIndex=o.lastIndex);else if(e.__isDate(o))l=new Date(o.getTime());else{if(c&&Buffer.isBuffer(o))return l=Buffer.allocUnsafe?Buffer.allocUnsafe(o.length):new Buffer(o.length),o.copy(l),l;void 0===i?(f=Object.getPrototypeOf(o),l=Object.create(f)):(l=Object.create(i),f=i)}if(n){var p=a.indexOf(o);if(-1!=p)return s[p];a.push(o),s.push(l)}for(var d in o){var y;f&&(y=Object.getOwnPropertyDescriptor(f,d)),y&&null==y.set||(l[d]=t(o[d],u-1))}return l}(t,o)}function t(e){return Object.prototype.toString.call(e)}function r(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=t,e.__isDate=function(e){return"object"==typeof e&&"[object Date]"===t(e)},e.__isArray=function(e){return"object"==typeof e&&"[object Array]"===t(e)},e.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===t(e)},e.__getRegExpFlags=r,e}();e.exports&&(e.exports=t)}),ce=function(e,t){return e=e||{},Object.keys(t).forEach(function(r){void 0===e[r]&&(e[r]=se(t[r]))}),e};function ue(e){this.defaults=e,this.interceptors={request:new ee,response:new ee}}ue.prototype.request=function(e){"string"==typeof e&&(e=p.merge({url:arguments[0]},arguments[1])),(e=p.merge(ce,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[oe,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},p.forEach(["delete","get","head","options"],function(e){ue.prototype[e]=function(t,r){return this.request(p.merge(r||{},{method:e,url:t}))}}),p.forEach(["post","put","patch"],function(e){ue.prototype[e]=function(t,r,n){return this.request(p.merge(n||{},{method:e,url:t,data:r}))}});var le=ue;function fe(e){this.message=e}fe.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},fe.prototype.__CANCEL__=!0;var pe=fe;function de(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new pe(e),t(r.reason))})}de.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},de.source=function(){var e;return{token:new de(function(t){e=t}),cancel:e}};var ye=de;function he(e){var t=new le(e),r=i(le.prototype.request,t);return p.extend(r,le.prototype,t),p.extend(r,t),r}var ge=he(Y);ge.Axios=le,ge.create=function(e){return he(p.merge(Y,e))},ge.Cancel=pe,ge.CancelToken=ye,ge.isCancel=re,ge.all=function(e){return Promise.all(e)},ge.spread=function(e){return function(t){return e.apply(null,t)}};var me=ge,ve=ge;me.default=ve;var be=me,we=Array.prototype.slice,Se=Object.prototype.toString,Ee=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Se.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=we.call(arguments,1),o=Math.max(0,t.length-n.length),i=[],a=0;a<o;a++)i.push("$"+a);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var o=t.apply(this,n.concat(we.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(we.call(arguments)))}),t.prototype){var s=function(){};s.prototype=t.prototype,r.prototype=new s,s.prototype=null}return r},Oe=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},je="undefined"!=typeof Symbol&&Symbol,Pe=function(){return"function"==typeof je&&("function"==typeof Symbol&&("symbol"==typeof je("foo")&&("symbol"==typeof Symbol("bar")&&Oe())))},xe=Ee.call(Function.call,Object.prototype.hasOwnProperty),Ae=SyntaxError,_e=Function,Te=TypeError,ke=function(e){try{return _e('"use strict"; return ('+e+").constructor;")()}catch(e){}},Ce=Object.getOwnPropertyDescriptor;if(Ce)try{Ce({},"")}catch(e){Ce=null}var Ie=function(){throw new Te},Le=Ce?function(){try{return Ie}catch(e){try{return Ce(arguments,"callee").get}catch(e){return Ie}}}():Ie,Re=Pe(),Me=Object.getPrototypeOf||function(e){return e.__proto__},Ne={},Ue="undefined"==typeof Uint8Array?void 0:Me(Uint8Array),De={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":Re?Me([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":Ne,"%AsyncGenerator%":Ne,"%AsyncGeneratorFunction%":Ne,"%AsyncIteratorPrototype%":Ne,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":_e,"%GeneratorFunction%":Ne,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Re?Me(Me([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Re?Me((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Re?Me((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Re?Me(""[Symbol.iterator]()):void 0,"%Symbol%":Re?Symbol:void 0,"%SyntaxError%":Ae,"%ThrowTypeError%":Le,"%TypedArray%":Ue,"%TypeError%":Te,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},Be={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Fe=Ee.call(Function.call,Array.prototype.concat),Ge=Ee.call(Function.apply,Array.prototype.splice),We=Ee.call(Function.call,String.prototype.replace),Ve=Ee.call(Function.call,String.prototype.slice),He=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,qe=/\\(\\)?/g,Xe=function(e,t){var r,n=e;if(xe(Be,n)&&(n="%"+(r=Be[n])[0]+"%"),xe(De,n)){var o=De[n];if(o===Ne&&(o=function e(t){var r;if("%AsyncFunction%"===t)r=ke("async function () {}");else if("%GeneratorFunction%"===t)r=ke("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=ke("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=Me(o.prototype))}return De[t]=r,r}(n)),void 0===o&&!t)throw new Te("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new Ae("intrinsic "+e+" does not exist!")},ze=function(e,t){if("string"!=typeof e||0===e.length)throw new Te("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Te('"allowMissing" argument must be a boolean');var r=function(e){var t=Ve(e,0,1),r=Ve(e,-1);if("%"===t&&"%"!==r)throw new Ae("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new Ae("invalid intrinsic syntax, expected opening `%`");var n=[];return We(e,He,function(e,t,r,o){n[n.length]=r?We(o,qe,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",o=Xe("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],Ge(r,Fe([0,1],c)));for(var u=1,l=!0;u<r.length;u+=1){var f=r[u],p=Ve(f,0,1),d=Ve(f,-1);if(('"'===p||"'"===p||"`"===p||'"'===d||"'"===d||"`"===d)&&p!==d)throw new Ae("property names with quotes must have matching quotes");if("constructor"!==f&&l||(s=!0),xe(De,i="%"+(n+="."+f)+"%"))a=De[i];else if(null!=a){if(!(f in a)){if(!t)throw new Te("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ce&&u+1>=r.length){var y=Ce(a,f);a=(l=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[f]}else l=xe(a,f),a=a[f];l&&!s&&(De[i]=a)}}return a},$e=ae(function(e){var t=ze("%Function.prototype.apply%"),r=ze("%Function.prototype.call%"),n=ze("%Reflect.apply%",!0)||Ee.call(r,t),o=ze("%Object.getOwnPropertyDescriptor%",!0),i=ze("%Object.defineProperty%",!0),a=ze("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=n(Ee,r,arguments);o&&i&&(o(t,"length").configurable&&i(t,"length",{value:1+a(0,e.length-(arguments.length-1))}));return t};var s=function(){return n(Ee,t,arguments)};i?i(e.exports,"apply",{value:s}):e.exports.apply=s}),Je=($e.apply,Object.prototype.toString),Ke=function(e){var t=Je.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===Je.call(e.callee)),r},Ze=Object.prototype.hasOwnProperty,Ye=Object.prototype.toString,Qe=Array.prototype.slice,et=Object.prototype.propertyIsEnumerable,tt=!et.call({toString:null},"toString"),rt=et.call(function(){},"prototype"),nt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ot=function(e){var t=e.constructor;return t&&t.prototype===e},it={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},at=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!it["$"+e]&&Ze.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{ot(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),st=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===Ye.call(e),n=Ke(e),o=t&&"[object String]"===Ye.call(e),i=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var a=rt&&r;if(o&&e.length>0&&!Ze.call(e,0))for(var s=0;s<e.length;++s)i.push(String(s));if(n&&e.length>0)for(var c=0;c<e.length;++c)i.push(String(c));else for(var u in e)a&&"prototype"===u||!Ze.call(e,u)||i.push(String(u));if(tt)for(var l=function(e){if("undefined"==typeof window||!at)return ot(e);try{return ot(e)}catch(e){return!1}}(e),f=0;f<nt.length;++f)l&&"constructor"===nt[f]||!Ze.call(e,nt[f])||i.push(nt[f]);return i};st.shim=function(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var e=Object.keys;Object.keys=function(t){return Ke(t)?e(Qe.call(t)):e(t)}}}else Object.keys=st;return Object.keys||st};var ct=st,ut="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),lt=Object.prototype.toString,ft=Array.prototype.concat,pt=Object.defineProperty,dt=pt&&function(){var e={};try{for(var t in pt(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),yt=function(e,t,r,n){var o;t in e&&("function"!=typeof(o=n)||"[object Function]"!==lt.call(o)||!n())||(dt?pt(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},ht=function(e,t){var r=arguments.length>2?arguments[2]:{},n=ct(t);ut&&(n=ft.call(n,Object.getOwnPropertySymbols(t)));for(var o=0;o<n.length;o+=1)yt(e,n[o],t[n[o]],r[n[o]])};ht.supportsDescriptors=!!dt;var gt=ht,mt=function(){if("function"!=typeof Promise)throw new TypeError("`Promise.any` requires a global `Promise` be available.")},vt=$e(ze("String.prototype.indexOf")),bt=function(e,t){var r=ze(e,!!t);return"function"==typeof r&&vt(e,".prototype.")>-1?$e(r):r},wt=function(e){return"number"==typeof e&&e>=55296&&e<=56319},St=function(e){return"number"==typeof e&&e>=56320&&e<=57343},Et=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}(e)},Ot=ze("%TypeError%"),jt=ze("%String.fromCharCode%"),Pt=function(e,t){if(!wt(e)||!St(t))throw new Ot("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return jt(e)+jt(t)},xt=ze("%TypeError%"),At=bt("String.prototype.charAt"),_t=bt("String.prototype.charCodeAt"),Tt=ze("%Math.abs%"),kt=Math.floor,Ct=Number.isNaN||function(e){return e!=e},It=Number.isNaN||function(e){return e!=e},Lt=Number.isFinite||function(e){return"number"==typeof e&&!It(e)&&e!==1/0&&e!==-1/0},Rt=function(e){if("number"!=typeof e||Ct(e)||!Lt(e))return!1;var t=Tt(e);return function(e){return kt(e)}(t)===t},Mt=ze("%Math%"),Nt=ze("%Number%").MAX_SAFE_INTEGER||Mt.pow(2,53)-1,Ut=ze("%TypeError%"),Dt=function(e,t,r){if("String"!==Et(e))throw new Ut("Assertion failed: `S` must be a String");if(!Rt(t)||t<0||t>Nt)throw new Ut("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==Et(r))throw new Ut("Assertion failed: `unicode` must be a Boolean");return r?t+1>=e.length?t+1:t+function(e,t){if("String"!==Et(e))throw new xt("Assertion failed: `string` must be a String");var r=e.length;if(t<0||t>=r)throw new xt("Assertion failed: `position` must be >= 0, and < the length of `string`");var n=_t(e,t),o=At(e,t),i=wt(n),a=St(n);if(!i&&!a)return{"[[CodePoint]]":o,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(a||t+1===r)return{"[[CodePoint]]":o,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var s=_t(e,t+1);return St(s)?{"[[CodePoint]]":Pt(n,s),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":o,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}(e,t)["[[CodeUnitCount]]"]:t+1},Bt=ze("%Object.defineProperty%",!0);if(Bt)try{Bt({},"a",{value:1})}catch(e){Bt=null}var Ft=bt("Object.prototype.propertyIsEnumerable"),Gt=ze("%TypeError%"),Wt=ze("%SyntaxError%"),Vt={"Property Descriptor":function(e,t){if("Object"!==e(t))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(xe(t,n)&&!r[n])return!1;var o=xe(t,"[[Value]]"),i=xe(t,"[[Get]]")||xe(t,"[[Set]]");if(o&&i)throw new Gt("Property Descriptors may not be both accessor and data descriptors");return!0}},Ht=function(e,t,r,n){var o=Vt[t];if("function"!=typeof o)throw new Wt("unknown record type: "+t);if(!o(e,n))throw new Gt(r+" must be a "+t)},qt=function(e){if(void 0===e)return e;Ht(Et,"Property Descriptor","Desc",e);var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=e["[[Configurable]]"]),t},Xt=ze("%Object.getOwnPropertyDescriptor%");if(Xt)try{Xt([],"length")}catch(e){Xt=null}var zt,$t,Jt,Kt,Zt=Xt,Yt=ze("%Array%"),Qt=!Yt.isArray&&bt("Object.prototype.toString"),er=Yt.isArray||function(e){return"[object Array]"===Qt(e)},tr=function(e){return"string"==typeof e||"symbol"==typeof e},rr=function(){return Oe()&&!!Symbol.toStringTag},nr=rr();if(nr){zt=bt("Object.prototype.hasOwnProperty"),$t=bt("RegExp.prototype.exec"),Jt={};var or=function(){throw Jt};Kt={toString:or,valueOf:or},"symbol"==typeof Symbol.toPrimitive&&(Kt[Symbol.toPrimitive]=or)}var ir,ar,sr=bt("Object.prototype.toString"),cr=Object.getOwnPropertyDescriptor,ur=nr?function(e){if(!e||"object"!=typeof e)return!1;var t=cr(e,"lastIndex");if(!(t&&zt(t,"value")))return!1;try{$t(e,Kt)}catch(e){return e===Jt}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===sr(e)},lr=function(e){return!!e},fr=ze("%Symbol.match%",!0),pr=Function.prototype.toString,dr="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof dr&&"function"==typeof Object.defineProperty)try{ir=Object.defineProperty({},"length",{get:function(){throw ar}}),ar={},dr(function(){throw 42},null,ir)}catch(e){e!==ar&&(dr=null)}else dr=null;var yr=/^\s*class\b/,hr=function(e){try{var t=pr.call(e);return yr.test(t)}catch(e){return!1}},gr=Object.prototype.toString,mr="function"==typeof Symbol&&!!Symbol.toStringTag,vr="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{},br=dr?function(e){if(e===vr)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{dr(e,null,ir)}catch(e){if(e!==ar)return!1}return!hr(e)}:function(e){if(e===vr)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(mr)return function(e){try{return!hr(e)&&(pr.call(e),!0)}catch(e){return!1}}(e);if(hr(e))return!1;var t=gr.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},wr=ze("%TypeError%"),Sr=ze("%TypeError%"),Er=bt("Object.prototype.propertyIsEnumerable"),Or=function(e,t){if("Object"!==Et(e))throw new Sr("Assertion failed: O must be an Object");if(!tr(t))throw new Sr("Assertion failed: P must be a Property Key");if(xe(e,t)){if(!Zt){var r=er(e)&&"length"===t,n=function(e){if(!e||"object"!=typeof e)return!1;if(fr){var t=e[fr];if(void 0!==t)return lr(t)}return ur(e)}(e)&&"lastIndex"===t;return{"[[Configurable]]":!(r||n),"[[Enumerable]]":Er(e,t),"[[Value]]":e[t],"[[Writable]]":!0}}return function(e){if("Object"!==Et(e))throw new wr("ToPropertyDescriptor requires an object");var t={};if(xe(e,"enumerable")&&(t["[[Enumerable]]"]=lr(e.enumerable)),xe(e,"configurable")&&(t["[[Configurable]]"]=lr(e.configurable)),xe(e,"value")&&(t["[[Value]]"]=e.value),xe(e,"writable")&&(t["[[Writable]]"]=lr(e.writable)),xe(e,"get")){var r=e.get;if(void 0!==r&&!br(r))throw new wr("getter must be a function");t["[[Get]]"]=r}if(xe(e,"set")){var n=e.set;if(void 0!==n&&!br(n))throw new wr("setter must be a function");t["[[Set]]"]=n}if((xe(t,"[[Get]]")||xe(t,"[[Set]]"))&&(xe(t,"[[Value]]")||xe(t,"[[Writable]]")))throw new wr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}(Zt(e,t))}},jr=function(e){return void 0!==e&&(Ht(Et,"Property Descriptor","Desc",e),!(!xe(e,"[[Value]]")&&!xe(e,"[[Writable]]")))},Pr=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},xr=ze("%Object%"),Ar=xr.preventExtensions,_r=xr.isExtensible,Tr=Ar?function(e){return!Pr(e)&&_r(e)}:function(e){return!Pr(e)},kr=function(e,t){return e===t?0!==e||1/e==1/t:Ct(e)&&Ct(t)},Cr=ze("%TypeError%"),Ir=function(e,t,r){if("Object"!==Et(e))throw new Cr("Assertion failed: Type(O) is not Object");if(!tr(t))throw new Cr("Assertion failed: IsPropertyKey(P) is not true");var n=Or(e,t),o=!n||Tr(e);return!(n&&(!n["[[Writable]]"]||!n["[[Configurable]]"])||!o)&&function(e,t,r,n,o,i){if(!Bt){if(!e(i))return!1;if(!i["[[Configurable]]"]||!i["[[Writable]]"])return!1;if(o in n&&Ft(n,o)!==!!i["[[Enumerable]]"])return!1;var a=i["[[Value]]"];return n[o]=a,t(n[o],a)}return Bt(n,o,r(i)),!0}(jr,kr,qt,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":r,"[[Writable]]":!0})},Lr=ze("%TypeError%"),Rr=function(e,t,r){if("Object"!==Et(e))throw new Lr("Assertion failed: Type(O) is not Object");if(!tr(t))throw new Lr("Assertion failed: IsPropertyKey(P) is not true");var n=Ir(e,t,r);if(!n)throw new Lr("unable to create data property");return n},Mr=ze("%TypeError%"),Nr=function(e,t){if(null==e)throw new Mr(t||"Cannot call method on "+e);return e},Ur=ze("%Object%"),Dr=ze("%TypeError%"),Br=function(e,t){if(!tr(t))throw new Dr("Assertion failed: IsPropertyKey(P) is not true");var r;return(Nr(r=e),Ur(r))[t]},Fr=ze("%TypeError%"),Gr=function(e,t){if(!tr(t))throw new Fr("Assertion failed: IsPropertyKey(P) is not true");var r=Br(e,t);if(null!=r){if(!br(r))throw new Fr(t+"is not a function");return r}},Wr=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8},Vr=ae(function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),Hr=ae(function(e,t){var r=/%[sdj%]/g;t.format=function(e){if(!h(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}n=1;for(var o=arguments,a=o.length,s=String(e).replace(r,function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(e){return"[Circular]"}default:return e}}),c=o[n];n<a;c=o[++n])d(c)||!v(c)?s+=" "+c:s+=" "+i(c);return s},t.deprecate=function(e,r){if(g(ie.process))return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){return n||(console.error(r),n=!0),e.apply(this,arguments)}};var n,o={};function i(e,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),c(n,e,n.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function c(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return h(o)||(o=c(e,o,n)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(h(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(d(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),w(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return u(r);if(0===a.length){if(S(r)){var v=r.name?": "+r.name:"";return e.stylize("[Function"+v+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(b(r))return e.stylize(Date.prototype.toString.call(r),"date");if(w(r))return u(r)}var E,O="",j=!1,x=["{","}"];(f(r)&&(j=!0,x=["[","]"]),S(r))&&(O=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(O=" "+RegExp.prototype.toString.call(r)),b(r)&&(O=" "+Date.prototype.toUTCString.call(r)),w(r)&&(O=" "+u(r)),0!==a.length||j&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),E=j?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)P(t,String(a))?i.push(l(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(l(e,t,r,n,o,!0))}),i}(e,r,n,s,a):a.map(function(t){return l(e,r,n,s,t,j)}),e.seen.pop(),function(e,t,r){if(e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(E,O,x)):x[0]+O+x[1]}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),P(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=d(r)?c(e,u.value,null):c(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function f(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function d(e){return null===e}function y(e){return"number"==typeof e}function h(e){return"string"==typeof e}function g(e){return void 0===e}function m(e){return v(e)&&"[object RegExp]"===E(e)}function v(e){return"object"==typeof e&&null!==e}function b(e){return v(e)&&"[object Date]"===E(e)}function w(e){return v(e)&&("[object Error]"===E(e)||e instanceof Error)}function S(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(n)&&(n=""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(n)){var r=U.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=p,t.isNull=d,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=h,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=m,t.isObject=v,t.isDate=b,t.isError=w,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=Wr;var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":"),[e.getDate(),j[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=Vr,t._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}),qr=(Hr.format,Hr.deprecate,Hr.debuglog,Hr.inspect,Hr.isArray,Hr.isBoolean,Hr.isNull,Hr.isNullOrUndefined,Hr.isNumber,Hr.isString,Hr.isSymbol,Hr.isUndefined,Hr.isRegExp,Hr.isObject,Hr.isDate,Hr.isError,Hr.isFunction,Hr.isPrimitive,Hr.isBuffer,Hr.log,Hr.inherits,Hr._extend,Hr.inspect),Xr="function"==typeof Map&&Map.prototype,zr=Object.getOwnPropertyDescriptor&&Xr?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$r=Xr&&zr&&"function"==typeof zr.get?zr.get:null,Jr=Xr&&Map.prototype.forEach,Kr="function"==typeof Set&&Set.prototype,Zr=Object.getOwnPropertyDescriptor&&Kr?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Yr=Kr&&Zr&&"function"==typeof Zr.get?Zr.get:null,Qr=Kr&&Set.prototype.forEach,en="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,tn="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,rn="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,nn=Boolean.prototype.valueOf,on=Object.prototype.toString,an=Function.prototype.toString,sn=String.prototype.match,cn="function"==typeof BigInt?BigInt.prototype.valueOf:null,un=Object.getOwnPropertySymbols,ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,fn="function"==typeof Symbol&&"object"==typeof Symbol.iterator,pn=Object.prototype.propertyIsEnumerable,dn=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),yn=qr.custom,hn=yn&&Sn(yn)?yn:null,gn="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null,mn=function e(t,r,n,o){var i=r||{};if(On(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(On(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!On(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(On(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n=t.length-r.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return e(t.slice(0,r.maxStringLength),r)+o}var i=t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,xn);return vn(i,"single",r)}(t,i);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var s=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=s&&s>0&&"object"==typeof t)return wn(t)?"[Array]":"[Object]";var c=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(i,n);if(void 0===o)o=[];else if(Pn(o,t)>=0)return"[Circular]";function u(t,r,a){if(r&&(o=o.slice()).push(r),a){var s={depth:i.depth};return On(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t){var l=function(e){if(e.name)return e.name;var t=sn.call(an.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),f=Cn(t,u);return"[Function"+(l?": "+l:" (anonymous)")+"]"+(f.length>0?" { "+f.join(", ")+" }":"")}if(Sn(t)){var p=fn?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):ln.call(t);return"object"!=typeof t||fn?p:An(p)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var d="<"+String(t.nodeName).toLowerCase(),y=t.attributes||[],h=0;h<y.length;h++)d+=" "+y[h].name+"="+vn(bn(y[h].value),"double",i);return d+=">",t.childNodes&&t.childNodes.length&&(d+="..."),d+="</"+String(t.nodeName).toLowerCase()+">"}if(wn(t)){if(0===t.length)return"[]";var g=Cn(t,u);return c&&!function(e){for(var t=0;t<e.length;t++)if(Pn(e[t],"\n")>=0)return!1;return!0}(g)?"["+kn(g,c)+"]":"[ "+g.join(", ")+" ]"}if(function(e){return!("[object Error]"!==jn(e)||gn&&"object"==typeof e&&gn in e)}(t)){var m=Cn(t,u);return 0===m.length?"["+String(t)+"]":"{ ["+String(t)+"] "+m.join(", ")+" }"}if("object"==typeof t&&a){if(hn&&"function"==typeof t[hn])return t[hn]();if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!$r||!e||"object"!=typeof e)return!1;try{$r.call(e);try{Yr.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var v=[];return Jr.call(t,function(e,r){v.push(u(r,t,!0)+" => "+u(e,t))}),Tn("Map",$r.call(t),v,c)}if(function(e){if(!Yr||!e||"object"!=typeof e)return!1;try{Yr.call(e);try{$r.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var b=[];return Qr.call(t,function(e){b.push(u(e,t))}),Tn("Set",Yr.call(t),b,c)}if(function(e){if(!en||!e||"object"!=typeof e)return!1;try{en.call(e,en);try{tn.call(e,tn)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return _n("WeakMap");if(function(e){if(!tn||!e||"object"!=typeof e)return!1;try{tn.call(e,tn);try{en.call(e,en)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return _n("WeakSet");if(function(e){if(!rn||!e||"object"!=typeof e)return!1;try{return rn.call(e),!0}catch(e){}return!1}(t))return _n("WeakRef");if(function(e){return!("[object Number]"!==jn(e)||gn&&"object"==typeof e&&gn in e)}(t))return An(u(Number(t)));if(function(e){if(!e||"object"!=typeof e||!cn)return!1;try{return cn.call(e),!0}catch(e){}return!1}(t))return An(u(cn.call(t)));if(function(e){return!("[object Boolean]"!==jn(e)||gn&&"object"==typeof e&&gn in e)}(t))return An(nn.call(t));if(function(e){return!("[object String]"!==jn(e)||gn&&"object"==typeof e&&gn in e)}(t))return An(u(String(t)));if(!function(e){return!("[object Date]"!==jn(e)||gn&&"object"==typeof e&&gn in e)}(t)&&!function(e){return!("[object RegExp]"!==jn(e)||gn&&"object"==typeof e&&gn in e)}(t)){var w=Cn(t,u),S=dn?dn(t)===Object.prototype:t instanceof Object||t.constructor===Object,E=t instanceof Object?"":"null prototype",O=!S&&gn&&Object(t)===t&&gn in t?jn(t).slice(8,-1):E?"Object":"",j=(S||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(O||E?"["+[].concat(O||[],E||[]).join(": ")+"] ":"");return 0===w.length?j+"{}":c?j+"{"+kn(w,c)+"}":j+"{ "+w.join(", ")+" }"}return String(t)};function vn(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function bn(e){return String(e).replace(/"/g,"&quot;")}function wn(e){return!("[object Array]"!==jn(e)||gn&&"object"==typeof e&&gn in e)}function Sn(e){if(fn)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!ln)return!1;try{return ln.call(e),!0}catch(e){}return!1}var En=Object.prototype.hasOwnProperty||function(e){return e in this};function On(e,t){return En.call(e,t)}function jn(e){return on.call(e)}function Pn(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function xn(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function An(e){return"Object("+e+")"}function _n(e){return e+" { ? }"}function Tn(e,t,r,n){return e+" ("+t+") {"+(n?kn(r,n):r.join(", "))+"}"}function kn(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function Cn(e,t){var r=wn(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=On(e,o)?t(e[o],e):""}var i,a="function"==typeof un?un(e):[];if(fn){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)On(e,c)&&(r&&String(Number(c))===c&&c<e.length||fn&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof un)for(var u=0;u<a.length;u++)pn.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}var In=Pe(),Ln=ze("%Symbol.iterator%",!0),Rn=bt("String.prototype.slice"),Mn=function(e,t){var r;return In?r=e.GetMethod(t,Ln):e.IsArray(t)?r=function(){var e=-1,t=this;return{next:function(){return{done:(e+=1)>=t.length,value:t[e]}}}}:"String"===e.Type(t)&&(r=function(){var r=0;return{next:function(){var n=e.AdvanceStringIndex(t,r,!0),o=Rn(t,r,n);return r=n,{done:n>t.length,value:o}}}}),r},Nn=ze("%TypeError%"),Un=ze("%Reflect.apply%",!0)||bt("%Function.prototype.apply%"),Dn=function(e,t){var r=arguments.length>2?arguments[2]:[];if(!er(r))throw new Nn("Assertion failed: optional `argumentsList`, if provided, must be a List");return Un(e,t,r)},Bn=ze("%TypeError%"),Fn=ze("%Symbol.asyncIterator%",!0),Gn=Pe(),Wn=ze("%TypeError%"),Vn=function(e,t){if("Object"!==Et(e))throw new Wn("Assertion failed: Type(O) is not Object");if(!tr(t))throw new Wn("Assertion failed: IsPropertyKey(P) is not true, got "+mn(t));return e[t]},Hn=ze("%TypeError%"),qn=ze("%TypeError%"),Xn=ze("%TypeError%"),zn=function(e,t){var r=function(e,t){if(!tr(t))throw new qn("Assertion failed: P must be a Property Key");var r=arguments.length>2?arguments[2]:[];if(!er(r))throw new qn("Assertion failed: optional `argumentsList`, if provided, must be a List");var n=Br(e,t);return Dn(n,e,r)}(e,"next",arguments.length<2?[]:[t]);if("Object"!==Et(r))throw new Xn("iterator next must return an object");return r},$n=function(e){var t=zn(e);return!0!==function(e){if("Object"!==Et(e))throw new Hn("Assertion failed: Type(iterResult) is not Object");return lr(Vn(e,"done"))}(t)&&t},Jn=ze("%TypeError%"),Kn=function(e){if("Object"!==Et(e))throw new Jn("Assertion failed: Type(iterResult) is not Object");return Vn(e,"value")},Zn=bt("Array.prototype.push"),Yn=function(e,t){for(var r=function(e,t,r){var n=t;if(arguments.length<2&&(n="sync"),"sync"!==n&&"async"!==n)throw new Bn("Assertion failed: `hint` must be one of 'sync' or 'async', got "+mn(t));var o=r;if(arguments.length<3)if("async"===n){if(Gn&&Fn&&(o=Gr(e,Fn)),void 0===o)throw new Bn("async from sync iterators aren't currently supported")}else o=Mn({AdvanceStringIndex:Dt,GetMethod:Gr,IsArray:er,Type:Et},e);var i=Dn(o,e);if("Object"!==Et(i))throw new Bn("iterator must return an object");return i}(e,"sync",t),n=[],o=!0;o;)if(o=$n(r)){var i=Kn(o);Zn(n,i)}return n},Qn=ze("%Object.setPrototypeOf%",!0),eo=ze("%Array.prototype%"),to=Qn||([].__proto__!==eo?null:function(e,t){return e.__proto__=t,e}),ro=ze("%Object.getPrototypeOf%",!0),no=ze("%Array.prototype%"),oo=ro||([].__proto__===no?function(e){return e.__proto__}:null),io=ze("%TypeError%"),ao=ze("%TypeError%"),so=function(e,t){if("Object"!==Et(t)&&"Null"!==Et(t))throw new ao("Assertion failed: V must be Object or Null");try{to(e,t)}catch(e){return!1}return function(e){if("Object"!==Et(e))throw new io("Assertion failed: O must be an Object");if(!oo)throw new io("This environment does not support fetching prototypes.");return oo(e)}(e)===t},co=ze("%Error%");function uo(e,t){var r=new co(t);so(r,lo),delete r.constructor;var n=Yn(e,Mn({AdvanceStringIndex:Dt,GetMethod:Gr,IsArray:er,Type:Et},e));return Rr(r,"errors",n),r}var lo=uo.prototype;gt(uo.prototype,{constructor:uo,message:"",name:"AggregateError"}),so(uo.prototype,Error.prototype);var fo=uo,po=ze("%Promise.resolve%",!0),yo=po&&$e(po),ho=rr(),go=bt("Object.prototype.toString"),mo=function(e){return!(ho&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===go(e)},vo=function(e){return!!mo(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==go(e)&&"[object Function]"===go(e.callee)},bo=function(){return mo(arguments)}();mo.isLegacyArguments=vo;var wo,So=bo?mo:vo,Eo={}.toString,Oo=Array.isArray||function(e){return"[object Array]"==Eo.call(e)},jo=String.prototype.valueOf,Po=Object.prototype.toString,xo=rr(),Ao=function(e){return"string"==typeof e||"object"==typeof e&&(xo?function(e){try{return jo.call(e),!0}catch(e){return!1}}(e):"[object String]"===Po.call(e))},_o="function"==typeof Map&&Map.prototype?Map:null,To="function"==typeof Set&&Set.prototype?Set:null;_o||(wo=function(e){return!1});var ko=_o?Map.prototype.has:null,Co=To?Set.prototype.has:null;wo||ko||(wo=function(e){return!1});var Io,Lo=wo||function(e){if(!e||"object"!=typeof e)return!1;try{if(ko.call(e),Co)try{Co.call(e)}catch(e){return!0}return e instanceof _o}catch(e){}return!1},Ro="function"==typeof Map&&Map.prototype?Map:null,Mo="function"==typeof Set&&Set.prototype?Set:null;Mo||(Io=function(e){return!1});var No=Ro?Map.prototype.has:null,Uo=Mo?Set.prototype.has:null;Io||Uo||(Io=function(e){return!1});var Do=Io||function(e){if(!e||"object"!=typeof e)return!1;try{if(Uo.call(e),No)try{No.call(e)}catch(e){return!0}return e instanceof Mo}catch(e){}return!1},Bo=ae(function(e){if(Pe()||Oe()){var t=Symbol.iterator;e.exports=function(e){return null!=e&&void 0!==e[t]?e[t]():So(e)?Array.prototype[t].call(e):void 0}}else{var r=Oo,n=Ao,o=ze,i=o("%Map%",!0),a=o("%Set%",!0),s=bt,c=s("Array.prototype.push"),u=s("String.prototype.charCodeAt"),l=s("String.prototype.slice"),f=function(e){var t=0;return{next:function(){var r,n=t>=e.length;return n||(r=e[t],t+=1),{done:n,value:r}}}},p=function(e,t){if(r(e)||So(e))return f(e);if(n(e)){var o=0;return{next:function(){var t=function(e,t){if(t+1>=e.length)return t+1;var r=u(e,t);if(r<55296||r>56319)return t+1;var n=u(e,t+1);return n<56320||n>57343?t+1:t+2}(e,o),r=l(e,o,t);return o=t,{done:t>e.length,value:r}}}}return t&&void 0!==e["_es6-shim iterator_"]?e["_es6-shim iterator_"]():void 0};if(i||a){var d=Lo,y=Do,h=s("Map.prototype.forEach",!0),g=s("Set.prototype.forEach",!0);if(void 0===U||!U.versions||!U.versions.node)var m=s("Map.prototype.iterator",!0),v=s("Set.prototype.iterator",!0),b=function(e){var t=!1;return{next:function(){try{return{done:t,value:t?void 0:e.next()}}catch(e){return t=!0,{done:!0,value:void 0}}}}};var w=s("Map.prototype.@@iterator",!0)||s("Map.prototype._es6-shim iterator_",!0),S=s("Set.prototype.@@iterator",!0)||s("Set.prototype._es6-shim iterator_",!0);e.exports=function(e){return function(e){if(d(e)){if(m)return b(m(e));if(w)return w(e);if(h){var t=[];return h(e,function(e,r){c(t,[r,e])}),f(t)}}if(y(e)){if(v)return b(v(e));if(S)return S(e);if(g){var r=[];return g(e,function(e){c(r,e)}),f(r)}}}(e)||p(e)}}else e.exports=function(e){if(null!=e)return p(e,!0)}}}),Fo=TypeError,Go=function(e){if(!e||"function"!=typeof e.next)throw new Fo("iterator must be an object with a `next` method");if(arguments.length>1){var t=arguments[1];if("function"!=typeof t)throw new Fo("`callback`, if provided, must be a function")}for(var r,n=t||[];(r=e.next())&&!r.done;)t?t(r.value):n.push(r.value);if(!t)return n},Wo=TypeError,Vo=ze("%TypeError%"),Ho=function(e,t){if(null==e)throw new Vo(t||"Cannot call method on "+e);return e},qo=function(e){return"string"==typeof e||"symbol"==typeof e},Xo=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}(e)},zo=ze("%TypeError%"),$o=function(e,t){if("Object"!==Xo(e))throw new zo("Assertion failed: Type(O) is not Object");if(!qo(t))throw new zo("Assertion failed: IsPropertyKey(P) is not true, got "+mn(t));return e[t]},Jo=ze("%Array%"),Ko=!Jo.isArray&&bt("Object.prototype.toString"),Zo=Jo.isArray||function(e){return"[object Array]"===Ko(e)},Yo=ze,Qo=ze("%TypeError%"),ei=function(e,t){if("Object"!==e.Type(t))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(xe(t,n)&&!r[n])return!1;if(e.IsDataDescriptor(t)&&e.IsAccessorDescriptor(t))throw new Qo("Property Descriptors may not be both accessor and data descriptors");return!0},ti=ze("%Object.defineProperty%",!0);if(ti)try{ti({},"a",{value:1})}catch(e){ti=null}var ri,ni,oi=bt("Object.prototype.propertyIsEnumerable"),ii=function(e,t,r,n,o,i){if(!ti){if(!e(i))return!1;if(!i["[[Configurable]]"]||!i["[[Writable]]"])return!1;if(o in n&&oi(n,o)!==!!i["[[Enumerable]]"])return!1;var a=i["[[Value]]"];return n[o]=a,t(n[o],a)}return ti(n,o,r(i)),!0},ai=ze("%TypeError%"),si=ze("%SyntaxError%"),ci={"Property Descriptor":function(e,t){if("Object"!==e(t))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(xe(t,n)&&!r[n])return!1;var o=xe(t,"[[Value]]"),i=xe(t,"[[Get]]")||xe(t,"[[Set]]");if(o&&i)throw new ai("Property Descriptors may not be both accessor and data descriptors");return!0}},ui=function(e,t,r,n){var o=ci[t];if("function"!=typeof o)throw new si("unknown record type: "+t);if(!o(e,n))throw new ai(r+" must be a "+t)},li=function(e){if(void 0===e)return e;ui(Xo,"Property Descriptor","Desc",e);var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=e["[[Configurable]]"]),t},fi=function(e){return void 0!==e&&(ui(Xo,"Property Descriptor","Desc",e),!(!xe(e,"[[Get]]")&&!xe(e,"[[Set]]")))},pi=function(e){return void 0!==e&&(ui(Xo,"Property Descriptor","Desc",e),!(!xe(e,"[[Value]]")&&!xe(e,"[[Writable]]")))},di=Number.isNaN||function(e){return e!=e},yi=function(e,t){return e===t?0!==e||1/e==1/t:di(e)&&di(t)},hi=function(e){return!!e},gi=Function.prototype.toString,mi="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof mi&&"function"==typeof Object.defineProperty)try{ri=Object.defineProperty({},"length",{get:function(){throw ni}}),ni={},mi(function(){throw 42},null,ri)}catch(e){e!==ni&&(mi=null)}else mi=null;var vi=/^\s*class\b/,bi=function(e){try{var t=gi.call(e);return vi.test(t)}catch(e){return!1}},wi=Object.prototype.toString,Si="function"==typeof Symbol&&!!Symbol.toStringTag,Ei="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{},Oi=mi?function(e){if(e===Ei)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{mi(e,null,ri)}catch(e){if(e!==ni)return!1}return!bi(e)}:function(e){if(e===Ei)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(Si)return function(e){try{return!bi(e)&&(gi.call(e),!0)}catch(e){return!1}}(e);if(bi(e))return!1;var t=wi.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},ji=ze("%TypeError%"),Pi=function(e){if("Object"!==Xo(e))throw new ji("ToPropertyDescriptor requires an object");var t={};if(xe(e,"enumerable")&&(t["[[Enumerable]]"]=hi(e.enumerable)),xe(e,"configurable")&&(t["[[Configurable]]"]=hi(e.configurable)),xe(e,"value")&&(t["[[Value]]"]=e.value),xe(e,"writable")&&(t["[[Writable]]"]=hi(e.writable)),xe(e,"get")){var r=e.get;if(void 0!==r&&!Oi(r))throw new ji("getter must be a function");t["[[Get]]"]=r}if(xe(e,"set")){var n=e.set;if(void 0!==n&&!Oi(n))throw new ji("setter must be a function");t["[[Set]]"]=n}if((xe(t,"[[Get]]")||xe(t,"[[Set]]"))&&(xe(t,"[[Value]]")||xe(t,"[[Writable]]")))throw new ji("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t},xi=ze("%TypeError%"),Ai=function(e,t,r){if("Object"!==Xo(e))throw new xi("Assertion failed: Type(O) is not Object");if(!qo(t))throw new xi("Assertion failed: IsPropertyKey(P) is not true");var n=ei({Type:Xo,IsDataDescriptor:pi,IsAccessorDescriptor:fi},r)?r:Pi(r);if(!ei({Type:Xo,IsDataDescriptor:pi,IsAccessorDescriptor:fi},n))throw new xi("Assertion failed: Desc is not a valid Property Descriptor");return ii(pi,yi,li,e,t,n)},_i=ae(function(e){var t=Yo("%Reflect.construct%",!0),r=Ai;try{r({},"",{"[[Get]]":function(){}})}catch(e){r=null}if(r&&t){var n={},o={};r(o,"length",{"[[Get]]":function(){throw n},"[[Enumerable]]":!0}),e.exports=function(e){try{t(e,o)}catch(e){return e===n}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}}),Ti=ze("%Math.abs%"),ki=Math.floor,Ci=Number.isNaN||function(e){return e!=e},Ii=Number.isFinite||function(e){return"number"==typeof e&&!Ci(e)&&e!==1/0&&e!==-1/0},Li=function(e){if("number"!=typeof e||di(e)||!Ii(e))return!1;var t=Ti(e);return function(e){return ki(e)}(t)===t},Ri=ze("%Array%"),Mi=ze("%Symbol.species%",!0),Ni=ze("%TypeError%"),Ui=ze("%TypeError%"),Di=ze("%Reflect.apply%",!0)||bt("%Function.prototype.apply%"),Bi=function(e,t){var r=arguments.length>2?arguments[2]:[];if(!Zo(r))throw new Ui("Assertion failed: optional `argumentsList`, if provided, must be a List");return Di(e,t,r)},Fi=ze("%Object.getOwnPropertyDescriptor%");if(Fi)try{Fi([],"length")}catch(e){Fi=null}var Gi,Wi,Vi,Hi,qi=Fi,Xi=rr();if(Xi){Gi=bt("Object.prototype.hasOwnProperty"),Wi=bt("RegExp.prototype.exec"),Vi={};var zi=function(){throw Vi};Hi={toString:zi,valueOf:zi},"symbol"==typeof Symbol.toPrimitive&&(Hi[Symbol.toPrimitive]=zi)}var $i=bt("Object.prototype.toString"),Ji=Object.getOwnPropertyDescriptor,Ki=Xi?function(e){if(!e||"object"!=typeof e)return!1;var t=Ji(e,"lastIndex");if(!(t&&Gi(t,"value")))return!1;try{Wi(e,Hi)}catch(e){return e===Vi}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===$i(e)},Zi=ze("%Symbol.match%",!0),Yi=ze("%TypeError%"),Qi=bt("Object.prototype.propertyIsEnumerable"),ea=function(e,t){if("Object"!==Xo(e))throw new Yi("Assertion failed: O must be an Object");if(!qo(t))throw new Yi("Assertion failed: P must be a Property Key");if(xe(e,t)){if(!qi){var r=Zo(e)&&"length"===t,n=function(e){if(!e||"object"!=typeof e)return!1;if(Zi){var t=e[Zi];if(void 0!==t)return hi(t)}return Ki(e)}(e)&&"lastIndex"===t;return{"[[Configurable]]":!(r||n),"[[Enumerable]]":Qi(e,t),"[[Value]]":e[t],"[[Writable]]":!0}}return Pi(qi(e,t))}},ta=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},ra=ze("%Object%"),na=ra.preventExtensions,oa=ra.isExtensible,ia=na?function(e){return!ta(e)&&oa(e)}:function(e){return!ta(e)},aa=ze("%TypeError%"),sa=ze("%TypeError%"),ca=function(e,t,r){if("Object"!==Xo(e))throw new sa("Assertion failed: Type(O) is not Object");if(!qo(t))throw new sa("Assertion failed: IsPropertyKey(P) is not true");var n=function(e,t,r){if("Object"!==Xo(e))throw new aa("Assertion failed: Type(O) is not Object");if(!qo(t))throw new aa("Assertion failed: IsPropertyKey(P) is not true");var n=ea(e,t),o=!n||ia(e);return!(n&&(!n["[[Writable]]"]||!n["[[Configurable]]"])||!o)&&ii(pi,yi,li,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":r,"[[Writable]]":!0})}(e,t,r);if(!n)throw new sa("unable to create data property");return n},ua=ze("%TypeError%"),la=function(e,t){if("Object"!==Xo(e))throw new ua("Assertion failed: `O` must be an Object");if(!qo(t))throw new ua("Assertion failed: `P` must be a Property Key");return t in e},fa=ze("RegExp.prototype.test"),pa=function(e){return $e(fa,e)},da=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},ya=Function.prototype.toString,ha=/^\s*class\b/,ga=function(e){try{var t=ya.call(e);return ha.test(t)}catch(e){return!1}},ma=Object.prototype.toString,va="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,ba=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(va)return function(e){try{return!ga(e)&&(ya.call(e),!0)}catch(e){return!1}}(e);if(ga(e))return!1;var t=ma.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},wa=Date.prototype.getDay,Sa=Object.prototype.toString,Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Oa=function(e){return"object"==typeof e&&null!==e&&(Ea?function(e){try{return wa.call(e),!0}catch(e){return!1}}(e):"[object Date]"===Sa.call(e))},ja=ie.Symbol,Pa=function(){return"function"==typeof ja&&("function"==typeof Symbol&&("symbol"==typeof ja("foo")&&("symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}())))},xa=ae(function(e){var t=Object.prototype.toString;if(Pa()){var r=Symbol.prototype.toString,n=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==t.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&n.test(r.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}}),Aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,_a=function(e){if(da(e))return e;var t,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),Aa&&(Symbol.toPrimitive?t=function(e,t){var r=e[t];if(null!=r){if(!ba(r))throw new TypeError(r+" returned for property "+t+" of object "+e+" is not a function");return r}}(e,Symbol.toPrimitive):xa(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var n=t.call(e,r);if(da(n))return n;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(Oa(e)||xa(e))&&(r="string"),function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var r,n,o,i="string"===t?["toString","valueOf"]:["valueOf","toString"];for(o=0;o<i.length;++o)if(r=e[i[o]],ba(r)&&(n=r.call(e),da(n)))return n;throw new TypeError("No default value")}(e,"default"===r?"number":r)},Ta=ze("%TypeError%"),ka=ze("%Number%"),Ca=ze("%RegExp%"),Ia=ze("%parseInt%"),La=bt("String.prototype.slice"),Ra=pa(/^0b[01]+$/i),Ma=pa(/^0o[0-7]+$/i),Na=pa(/^[-+]0x[0-9a-f]+$/i),Ua=pa(new Ca("["+["","​","￾"].join("")+"]","g")),Da=["\t\n\v\f\r   ᠎    ","         　\u2028","\u2029\ufeff"].join(""),Ba=new RegExp("(^["+Da+"]+)|(["+Da+"]+$)","g"),Fa=bt("String.prototype.replace"),Ga=function e(t){var r=ta(t)?t:function(e){return arguments.length>1?_a(e,arguments[1]):_a(e)}(t,ka);if("symbol"==typeof r)throw new Ta("Cannot convert a Symbol value to a number");if("bigint"==typeof r)throw new Ta("Conversion from 'BigInt' to 'number' is not allowed.");if("string"==typeof r){if(Ra(r))return e(Ia(La(r,2),2));if(Ma(r))return e(Ia(La(r,2),8));if(Ua(r)||Na(r))return NaN;var n=function(e){return Fa(e,Ba,"")}(r);if(n!==r)return e(n)}return ka(r)},Wa=ze("%Object%"),Va=ze("%String%"),Ha=ze("%TypeError%"),qa=function(e){if("symbol"==typeof e)throw new Ha("Cannot convert a Symbol value to a string");return Va(e)},Xa=Object("a"),za="a"!==Xa[0]||!(0 in Xa),$a=bt("String.prototype.split"),Ja=function(e){var t,r,n,o=(Ho(t=this),Wa(t)),i=za&&Ao(o)?$a(o,""):o,a=(r=i.length,Ga(r)>>>0);if(!Oi(e))throw new TypeError("Array.prototype.map callback must be a function");arguments.length>1&&(n=arguments[1]);for(var s=function(e,t){if(!Li(t)||t<0)throw new Ni("Assertion failed: length must be an integer >= 0");var r,n=0===t?0:t;if(Zo(e)&&(r=$o(e,"constructor"),Mi&&"Object"===Xo(r)&&null===(r=$o(r,Mi))&&(r=void 0)),void 0===r)return Ri(n);if(!_i(r))throw new Ni("C must be a constructor");return new r(n)}(o,a),c=0;c<a;){var u=qa(c);if(la(o,u)){var l=$o(o,u),f=Bi(e,n,[l,c,o]);ca(s,u,f)}c+=1}return s},Ka=function(){var e=Array.prototype.map;return function(e){var t=!0,r=!0,n=!1;if("function"==typeof e){try{e.call("f",function(e,r,n){"object"!=typeof n&&(t=!1)}),e.call([null],function(){r="string"==typeof this},"x")}catch(e){n=!0}return!n&&t&&r}return!1}(e)?e:Ja},Za=Ka(),Ya=bt("Array.prototype.slice"),Qa=function(e,t){return Ho(e),Za.apply(e,Ya(arguments,1))};gt(Qa,{getPolyfill:Ka,implementation:Ja,shim:function(){var e=Ka();return gt(Array.prototype,{map:e},{map:function(){return Array.prototype.map!==e}}),e}});var es=Qa;mt();var ts="function"==typeof AggregateError?AggregateError:fo,rs=$e(ze("%Promise.all%")),ns=$e(ze("%Promise.reject%")),os=function(e){return e},is=function(e){var t,r=this;if("Object"!==("symbol"==typeof(t=r)?"Symbol":"bigint"==typeof t?"BigInt":function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}(t)))throw new TypeError("`this` value must be an object");var n=function(e){return ns(r,e)};return rs(r,es(function(e){var t=Bo(e);if(!t)throw new Wo("non-iterable value provided");return arguments.length>1?Go(t,arguments[1]):Go(t)}(e),function(e){var t=function(e,t){if(!yo)throw new SyntaxError("This environment does not support Promises.");return yo(e,t)}(r,e);try{return t.then(n,os)}catch(e){return e}})).then(function(e){throw new ts(e,"Every promise rejected")},os)},as=function(){return mt(),"function"==typeof Promise.any?Promise.any:is};mt();var ss=$e(as()),cs=function(e){return ss(void 0===this?Promise:this,e)};gt(cs,{getPolyfill:as,implementation:is,shim:function(){mt();var e=as();return gt(Promise,{any:e},{any:function(){return Promise.any!==e}}),e}});var us,ls,fs,ps,ds=cs,ys=function(e){function t(r){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var i=e.apply(this,n)||this;return i.code=r,i.name=i.constructor.name,i.message=r,Object.setPrototypeOf(i,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,t),i}return r(t,e),t}(Error),hs=function(e){function t(r){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var i=e.apply(this,n)||this;return i.message=r,i.name=i.constructor.name,i.message=r,Object.setPrototypeOf(i,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,t),i}return r(t,e),t}(Error),gs=["ar","bg","cs","de","en","es","fr","he","hu","it","ja","ko","pl","pt","ro","ru","th","tr","vi","zh"],ms=[navigator.language].concat(navigator.languages),vs=function(e){return r=[t=e].concat(ms).find(function(e){return!!e&&gs.includes(e.substring(0,2))})||"en-XX",t&&r!==t?(console.error("Locale "+r+" cannot be applied, language code should be one of "+gs.join(", ")),"en-XX"):r;var t,r};(us=e.ConfirmationType||(e.ConfirmationType={})).CODE="code",us.LINK="link",(ls=e.PostMessageEvents||(e.PostMessageEvents={})).ThemeUpdate="@xsolla-login/sdk:theme-update",ls.Close="@xsolla-login/sdk:close",ls.Open="@xsolla-login/sdk:open",ls.PageOpen="@xsolla-login/sdk:page:open",ls.IframeOpen="@xsolla-login/sdk:iframe:open",ls.GetRedirectCode="@xsolla-login/sdk:get-redirect-url",ls.WidgetStep="@xsolla-login/sdk:widget:step",ls.GoogleOneTapOpen="@xsolla-login/sdk:google-one-tap:open",ls.GoogleOneTapSuccess="@xsolla-login/sdk:google-one-tap:success",ls.LoginSuccess="@xsolla-login/sdk:login:success",ls.LoginError="@xsolla-login/sdk:login:error",ls.SignupSuccess="@xsolla-login/sdk:signup:success",ls.SignupError="@xsolla-login/sdk:signup:error",ls.SocialLogin="@xsolla-login/sdk:social-login",ls.BabkaLogin="@xsolla-login/sdk:babka-login",(fs=e.WidgetPages||(e.WidgetPages={})).SignUpPage="signUp",fs.LogInPage="logIn",fs.LogInPresetPage="logInUserPreset",fs.ResetPasswordPage="passwordReset",fs.SetPasswordPage="passwordSet",fs.AskPage="ask",fs.ErrorPage="error",fs.SocialsPage="socials",fs.AgreementPage="agreement",fs.TwoFactorPage="otp",(ps=e.CloseSource||(e.CloseSource={}))[ps.Button=0]="Button";var bs=function(t){var r=t.message,o=t.targetOrigin,i=t.target,a=t.globalObject,s=void 0===a?window:a,c=s.parent;if(!c||c===s){if(void 0!==i)switch(r.type){case e.PostMessageEvents.PageOpen:case e.PostMessageEvents.ThemeUpdate:case e.PostMessageEvents.GoogleOneTapSuccess:case e.PostMessageEvents.IframeOpen:i.postMessage(n({},r),o)}}else switch(r.type.replace("@xsolla/login-sdk","@xsolla-login/sdk")){case e.PostMessageEvents.Close:case e.PostMessageEvents.Open:case e.PostMessageEvents.WidgetStep:case e.PostMessageEvents.PageOpen:case e.PostMessageEvents.GetRedirectCode:case e.PostMessageEvents.GoogleOneTapOpen:case e.PostMessageEvents.LoginSuccess:case e.PostMessageEvents.LoginError:case e.PostMessageEvents.SignupSuccess:case e.PostMessageEvents.SignupError:case e.PostMessageEvents.SocialLogin:c.postMessage(n({},r),o);break;case e.PostMessageEvents.ThemeUpdate:case e.PostMessageEvents.IframeOpen:case e.PostMessageEvents.GoogleOneTapSuccess:void 0!==i&&i.postMessage(n({},r),o);break;case e.PostMessageEvents.BabkaLogin:c.opener.postMessage(n({},r),"*")}},ws=window.addEventListener?"addEventListener":"attachEvent",Ss=window[ws],Es="addEventListener"!==ws?"on":"";var Os,js;ae(function(e){var t;t=function(e){var t={counterId:0,clientId:0,siteDomains:null,server:"",hitUrl:"",userParamsUrl:"",externalId:null,extraValues:"",hit:!0,extLink:!0,click:!0,scroll:!0,sendLoadMetrics:!1,abParams:"",isBrowser:"undefined"!=typeof window},r=null,n=!1,o=!1,i=!1,a=0,s=0;t.isBrowser&&(s="hidden"===document.visibilityState?0:1/0);var c={isArray:function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)},random:function(e,t){return 2>arguments.length&&(t=e,e=0),1>arguments.length&&(t=1073741824),Math.floor(Math.random()*(t-e))+e},mergeObjects:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},apiHelper:function(e,r){2!=e&&(n=!1,o=!1,i=!1);var a=r&&r.eid?r.eid:t.externalId,s=r&&r.exv?JSON.stringify(r.exv):t.extraValues,u=r&&"object"==typeof r.abParams?JSON.stringify(r.abParams):t.abParams,l={et:e,eid:a};return s&&(l.exv=s),u&&(l.abParams=u),"object"!=typeof r&&(r={}),r=c.mergeObjects(r,l)}},u=function(){if(0===s)return null;var e=0;if(window.performance&&window.performance.getEntriesByType){for(var t=window.performance.getEntriesByType("paint"),r=0;r<t.length;r++)if("first-contentful-paint"===t[r].name)return(e=Math.round(t[r].startTime))<s?e:null;return null}if("object"==typeof window.chrome&&window.chrome.loadTimes){var n=window.chrome.loadTimes();if(n.requestTime&&n.firstPaintTime&&window.performance&&window.performance.timing)return(e=Math.round(1e3*n.firstPaintTime-window.performance.timing.navigationStart))<s?e:null}else if(window.performance&&window.performance.timing&&((n=window.performance.timing).navigationStart&&n.msFirstPaint))return(e=n.msFirstPaint-n.navigationStart)<s?e:null;return null},l=function(){try{function e(e){if(e.startTime<s&&(a=Math.round(e.startTime),t.sendLoadMetrics)){var r=document.documentElement.scrollHeight||0;(document.documentElement.clientHeight||0)>=r&&O.eventForLCP()}}var r=new PerformanceObserver(function(t){for(var r=t.getEntries(),n=0;n<r.length;n++)e(r[n])});r.observe({type:"largest-contentful-paint",buffered:!0}),document.addEventListener("visibilitychange",function t(){if("hidden"===document.visibilityState){document.removeEventListener("visibilitychange",t,!0);var n=[];r.takeRecords&&(n=r.takeRecords());for(var o=0;o<n.length;o++)e(n[o]);r.disconnect()}},!0)}catch(e){}},f=function(){var e=(navigator.connection||{type:""}).type;return void 0===e?"":e},p=function(){var e=(window.navigator?navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage:"").toLowerCase();return c.isString(e)?e:""},d=function(){try{return navigator.javaEnabled()}catch(e){return!1}},y=function(){try{var e=Notification.permission}catch(e){}switch(e){case"denied":return 0;case"granted":return 1}},h=function(){try{return window.top!==window.self}catch(e){return!1}},g=function(){if(navigator.cookieEnabled)return!0;document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e},m=function(){return Math.round(+new Date/1e3)},v=function(){return-(new Date).getTimezoneOffset()},b={getVid:function(){var e=w.isFromAd()?0:this.readM("vid");return e||(e=m()+""+c.random()),this.create("vid",e,30),e},getUid:function(){this.globalDomain();var e=this.readM("uid"),t=this.readLocalStorage("uid");return e||t?!e&&t?(e=t,this.create("uid",t,1036800)):e&&!t&&this.createLocalStorage("uid",e):(e=m()+""+c.random(),this.create("uid",e,1036800),this.createLocalStorage("uid",e)),e},getXsollauid:function(e){this.globalDomain();var t=this.readM("xsollauid"),r=this.readLocalStorage("xsollauid");return e?(this.create("xsollauid",e,5184e3),this.createLocalStorage("xsollauid",e),e):(t&&!r?this.createLocalStorage("xsollauid",t):!t&&r&&this.create("xsollauid",r,5184e3),t||r)},createLocalStorage:function(e,t){try{localStorage.setItem(this._prepareName(e),encodeURIComponent(t))}catch(e){}},create:function(e,t,r){var n,o=[this._prepareName(e)+"="+encodeURIComponent(t)];r&&((n=new Date).setTime(n.getTime()+6e4*r),o.push("expires="+n.toGMTString())),this._domain&&o.push("domain="+this._domain),o.push("path=/");try{document.cookie=o.join(";")}catch(e){}},globalDomain:function(){return this._domain=w.extractHostname(window.location.host),this._domain},readM:function(e){return e=this._prepareName(e),this.read(e)},read:function(e){try{var t=document.cookie}catch(e){}return t&&t.match(new RegExp("(?:^|;\\s*)"+e+"=([^;]*)"))?decodeURIComponent(RegExp.$1):null},readLocalStorage:function(e){e=this._prepareName(e);try{return localStorage.getItem(e)}catch(e){return null}},erase:function(e){this.create(e,"",-1)},_prepareName:function(e){return"xsollauid"===e?e:"_mm_"+e+(t.counterId?"_"+t.counterId:"")}},w={getDocumentCharset:function(){return(""+(document.characterSet||document.charset||"")).toLowerCase()},getRootElement:function(){var e=document.documentElement;return"CSS1Compat"===document.compatMode?e:document.body||e},getViewportSize:function(){var e=this.getRootElement();return[e.clientWidth||window.innerWidth,e.clientHeight||window.innerHeight]},getDocumentTitle:function(){var e=document.title;return"string"!=typeof e&&(e=(e=document.getElementsByTagName("title"))&&e.length?e[0].innerHTML:""),e},isFromAd:function(){if(!document.referrer)return!1;var e=["adfox","admitad","adnews","adnous","adriver","advmaker","aport","aport.ru","AvitoPromo","AvitoContext","begun","bing","B2BContext","criteo","directadvert","directadvert.ru","drivenetwork","facebook","fb","facebook.com","fb.com","giraffio","google","adwords","adsense","instagram","kavanga","ladycenter","link","magna","marketgid","medialand","merchant","moimir","nnn","nnn.ru","odnoklassniki","price","price.ru","prre","mytarget","targetmailru","taboola","torg.mail.ru","trorer","rorer","Ttarget","ubn.ua","banner.ua","videonow","vkontakte","vk","vk.com","whisla","youtube"],t=["cpc","ppc","paidsearch","cpv","cpa","cpp","display","cpm","banner"],r=window.location.search.replace("?","").split("&"),n=window.location.hash.replace("#","").split("&").concat(r),o=!1;return n.forEach(function(r){var n=r.split("=");return"utm_source"===n[0]&&n[1]&&e.indexOf(n[1])?o=!0:"utm_medium"===n[0]&&n[1]&&t.indexOf(n[1])?o=!0:void 0}),o},extractHostname:function(e){return void 0===e||""===e?"":(e.indexOf("://")>-1?e.split("/")[2]:e.split("/")[0]).split(":")[0].split("?")[0].replace(/^www\./,"").replace("#","")},isExternal:function(e){var r=this.extractHostname(e);return Array.isArray(t.siteDomains)?!(t.siteDomains.indexOf(r)>-1||""===r):!(this.extractHostname(window.location.hostname)===r||""===r)},isInternal:function(e){var r=this.extractHostname(e);return this.extractHostname(window.location.hostname)!==r&&(!Array.isArray(t.siteDomains)||(t.siteDomains.indexOf(r)>-1||""===r))}},S={send:function(e,r){if(e===t.hitUrl&&(r.ident=this.prepareBrowserInfo()),t.xsollauid&&-1===e.indexOf("_xm")){var n="_xm="+t.xsollauid;e=-1===e.indexOf("?")?e+"?"+n:e+"&"+n}var o="string"!=typeof r?JSON.stringify(r):r;t.xsollauid||0!==t.hitCount?t.xsollauid||1!==t.hitCount?this.sendBeacon(e,o)||this.sendXHR(e,o):setTimeout(function(){t.hitCount=2,S.send(e,r)},1e3):(t.hitCount=1,this.sendXHR(e,o))},sendUserParams:function(e){e.clid=t.clientId,e.cid=t.counterId;var r=JSON.stringify(e),n=t.userParamsUrl;this.sendBeacon(n,r)||this.sendXHR(n,r)},sendBeacon:function(e,t){return!("function"!=typeof navigator.sendBeacon||!navigator.onLine)&&(navigator.sendBeacon(e,t),!0)},sendXHR:function(e,r){if(window.XMLHttpRequest){var n=new XMLHttpRequest;try{n.open("POST",e,!0)}catch(e){return!1}return n.timeout=1e4,n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.withCredentials=!0,n.ontimeout=function(){S.sendXHR(e,r)},n.onload=function(){var e=S.getValueFromUrl(n.responseURL,"_xm");if(e&&e!==t.xsollauid)t.xsollauid=b.getXsollauid(e);else{var r=S.getValueFromBody(n.responseText,"xsollauid");r&&r!==t.xsollauid&&(t.xsollauid=b.getXsollauid(r))}},n.send(r),!0}return!1},getValueFromUrl:function(e,t){if(e&&e.indexOf(t+"=")>-1){var r=new RegExp("https?://.*"+t+"=([^&]*)"),n=e.match(r);if(n&&n.length>1)return n[1]}return null},getValueFromBody:function(e,t){try{var r=e?JSON.parse(e)[t]:null}catch(e){r=null}return r},setXsollauidFromUrl:function(e){var r=S.getValueFromUrl(e,"_xm");r?(r=r.split("."))&&2===r.length&&r[0]===""+t.counterId&&r[1]!==t.xsollauid&&(t.xsollauid=b.getXsollauid(r[1])):(r=S.getValueFromUrl(e,"_xsollauid"))&&r!==t.xsollauid&&(t.xsollauid=b.getXsollauid(r))},prepareBrowserInfo:function(){var e={},r=window.screen,n=y();""!==n&&(e.ntf=n);var o=f();""!==o&&(e.net=o),e.t=w.getDocumentTitle(),e.pc=w.getDocumentCharset(),e.tz=v();var i=w.getViewportSize();e.wcw=i[0],e.wch=i[1],e.plt=u(),e.lcp=t.sendLoadMetrics?a:0,e.la=p(),e.j=d()?1:0,e.clid=t.clientId,e.cid=t.counterId,e.vid=b.getVid(),e.c=g()?1:0,e.sw=r.width,e.sh=r.height,e.sc=r.colorDepth||r.pixelDepth,h()&&(e.ifr=1);var s=b.read("_ym_uid");s&&(e.yid=s);try{var c=b.read("_ga");c.length>0&&(c=c.split("."),e.gaid=c[2]+"."+c[3])}catch(e){}var l=b.read("paystation_visit");l&&(e.pv=l);var m=b.read("corpsite_visit");m&&(e.cv=m);var S=b.read("pa_visit");S&&(e.pav=S);var E=b.read("dev_visit");E&&(e.dv=E);var O=b.read("first_visit");return O&&(e.fvp=O),e}},E={setHandlers:function(e,t,r,n,o,i){o&&this.documentVisibilityChange(),o&&this.documentReadyEvent(l),e&&this.documentReadyEvent(this.onDocumentReady),t&&this.documentReadyEvent(this.clickEvent),r&&this.documentReadyEvent(this.selectorEvent),n&&this.documentReadyEvent(this.scrollEvent),i&&this.documentReadyEvent(this.externalTransitionEvent)},documentReadyEvent:function(e){(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?e():document.addEventListener("DOMContentLoaded",e)},documentVisibilityChange:function(){document.addEventListener("visibilitychange",function e(t){"hidden"===document.visibilityState&&(s=Math.min(s,Math.round(t.timeStamp)),document.removeEventListener("visibilitychange",e))})},clickEvent:function(){for(var e=document.getElementsByTagName("a"),t=0;t<e.length;t++)E.setEvents(e[t],"click",E.onClick)},setEvents:function(e,t,r){e.addEventListener?e.addEventListener(t,r):e.attachEvent&&e.attachEvent("on"+t,r)},onDocumentReady:function(){var e=window.location.href,r={et:1,url:e,eid:t.externalId,exv:t.extraValues,abParams:t.abParams};r.eid&&2340===r.eid||(document.referrer&&(r.referer=document.referrer,w.isExternal(r.referer)||(r.ss=1),S.setXsollauidFromUrl(e)),S.send(t.hitUrl,r))},onClick:function(){w.isExternal(this.href)&&S.send(t.hitUrl,{et:2,referer:window.location.href,url:this.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})},selectorEvent:function(){for(var e=document.querySelectorAll("[data-analytics]"),t=0;t<e.length;t++)E.setEvents(e[t],"click",E.onSelectorClick)},onSelectorClick:function(){S.send(t.hitUrl,{et:3,en:this.dataset.analytics,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})},scrollEvent:function(){E.setEvents(window,"scroll",E.onScroll)},onScroll:function(){null!==r&&clearTimeout(r),r=setTimeout(function(){var e=document.documentElement.scrollTop||document.body.scrollTop,r=document.documentElement.scrollHeight||document.body.scrollHeight;!n&&e>0&&(n=!0,S.send(t.hitUrl,{et:10,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})),!o&&2*e>r-document.documentElement.clientHeight&&(o=!0,S.send(t.hitUrl,{et:11,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams})),!i&&e>=.9*(r-document.documentElement.clientHeight)&&(i=!0,S.send(t.hitUrl,{et:12,url:window.location.href,eid:t.externalId,exv:t.extraValues,abParams:t.abParams}))},150)},onFormSubmit:function(){},externalTransitionEvent:function(){E.setEvents(document,"mousedown",E.onExternalTransition),E.setEvents(document,"keyup",E.onExternalTransition)},onExternalTransition:function(e){e:{var r=(e=e||window.event).target||e.srcElement;for(e=100;r&&0<e;){if(r.href&&r.nodeName.match(/^a(?:rea)?$/i)){var n=r;break e}r=r.parentNode,e--}n={}}if(("http:"===n.protocol||"https:"===n.protocol)&&n.href&&w.isInternal(n.href)&&!(n.href.indexOf("_xm=")>-1)&&t.xsollauid&&t.counterId){var o="_xm="+t.counterId+"."+t.xsollauid;n.href=-1!==n.href.indexOf("?")?n.href+"&"+o:n.href+"?"+o}}},O={hit:function(e,r){if(t.isBrowser){var n=c.apiHelper(1,r),o=window.location!=window.parent.location?document.referrer:document.location.href,i=n&&n.referer?n.referer:o;n.referer=i,n.referer!=document.location.href&&S.setXsollauidFromUrl(e),n.url=e,S.send(t.hitUrl,n)}},externalLink:function(e,r){if(t.isBrowser){var n=c.apiHelper(2,r);n.referer=window.location.href,n.url=e,S.send(t.hitUrl,n)}},elementClick:function(e,r){if(t.isBrowser){var n=c.apiHelper(3,r);n.url=window.location.href,n.en=e,S.send(t.hitUrl,n)}},formData:function(e,r,n){if(t.isBrowser){var o=c.apiHelper(4,n);o.url=window.location.href;var i=r?JSON.stringify(r):"";o.form=i,o.en=e,S.send(t.hitUrl,o)}},customEvent:function(e,r){if(t.isBrowser){var n=c.apiHelper(5,r);n.url=window.location.href,n.en=e,S.send(t.hitUrl,n)}},eventForLCP:function(){if(t.isBrowser){var e={et:6,url:window.location.href};S.send(t.hitUrl,e)}},setABParams:function(e){t.isBrowser&&(t.abParams="object"==typeof e?JSON.stringify(e):"")},setUserParams:function(e){var t="object"!=typeof e?"":{uprm:e};t&&S.sendUserParams(t)},addXsollauidToUrl:function(e){if(e.indexOf("_xsollauid=")>-1)return e;var t=b.getXsollauid(),r=t?"_xsollauid="+t:"";return r?-1!==e.indexOf("?")?e+"&"+r:e+"?"+r:e},sendCustomData:function(e,r){var n=e?t.server+"/"+e:"",o=t.xsollauid?"_xm="+t.xsollauid:"";(n=o?-1!==n.indexOf("?")?n+"&"+o:n+"?"+o:n)&&S.send(n,r)}};t.counterId=e.id,t.siteDomains=e.siteDomains;var j=e.server.match(/(https?:\/\/[^\/]*)/g);return t.server=j&&j.length?j[0]:console.log("Не удалось извлечь адрес сервера! Установлено значение по умолчанию - https://datagather.xsolla.com")||"https://datagather.xsolla.com",t.hitUrl=t.server+"/hit",t.userParamsUrl=t.server+"/users_params",t.externalId=e.externalId||e.merchantId,t.extraValues=e.extraValues?JSON.stringify(e.extraValues):"",t.hit=void 0===e.hit||e.hit,t.extLink=void 0===e.extLink||e.extLink,t.click=void 0===e.click||e.click,t.scroll=void 0===e.scroll||e.scroll,t.sendLoadMetrics=void 0!==e.sendLoadMetrics&&e.sendLoadMetrics,t.crossDomainTracking=void 0===e.crossDomainTracking||e.crossDomainTracking,t.hitCount=0,t.isBrowser&&(t.clientId=b.getUid(),t.visitId=b.getVid(),t.xsollauid=e.xsollauid||b.getXsollauid(),e.abParams&&O.setABParams(e.abParams),t.server&&t.counterId&&E.setHandlers(t.hit,t.extLink,t.click,t.scroll,t.sendLoadMetrics,t.crossDomainTracking),e.userParams&&O.setUserParams(e.userParams)),O},"undefined"!=typeof window?window.XsollaAnalytics=t:e.exports=t});(Os=e.MetrikaEventNames||(e.MetrikaEventNames={})).initiate="login-widget_sign-in_initiate",Os.secure_account="login-widget_sign-in_secure-account",Os.email_confirm="login-widget_email-verification_confirm",Os.confirm_secure_email="login-widget_email-verification_secure-confirm",Os.phone_confirm="login-widget_phone-verification_confirm",Os.confirm_secure_phone="login-widget_phone-verification_secure-confirm",Os.sign_up="login-widget_sign-up_email",Os.reset_pass_init="login-widget_reset-pass_initiate",Os.widget_open="login-widget_opening_initiate",Os.performance="widget_performance",Os.performanceJSLoad="widget_performance_js_load",Os.performanceRequest="widget_performance_request",Os.pageOpen="widget_page_open",Os.passwordlessAuthDeclined="passwordless_auth_declined",Os.babka_login_consent_open="babka-login_consent_open",Os.babka_login_consent_allow="babka-login_consent_allow",Os.babka_login_consent_deny="babka-login_consent_deny",Os.babka_login_consent_error="babka-login_consent_error",(js=e.SocialPosition||(e.SocialPosition={})).primary="primary",js.secondary="secondary",js.other="other";var Ps=function(e,t){var r=function(e){return"object"==typeof e?"lg_"+e.block+"_"+e.section+"_"+e.action:"lg_"+e}(e);window.XA&&window.XA.elementClick(r,t)},xs={AD:6,AE:6,AF:6,AG:6,AI:6,AL:1,AM:4,AO:6,AQ:6,AR:4,AS:5,AT:1,AU:6,AW:5,AX:1,AZ:4,BA:1,BB:5,BD:6,BE:1,BF:6,BG:1,BH:6,BI:6,BJ:6,BL:5,BM:5,BN:6,BO:5,BQ:5,BR:5,BS:5,BT:6,BV:6,BW:6,BY:4,BZ:5,CA:5,CC:5,CD:6,CF:6,CG:6,CH:1,CI:6,CK:6,CL:1,CM:6,CN:2,CO:1,CR:1,CU:1,CV:6,CW:5,CX:6,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:5,DO:5,DZ:6,EC:5,EE:1,EG:6,EH:6,ER:6,ES:1,ET:6,FI:1,FJ:6,FK:5,FM:5,FO:6,FR:1,GA:6,GB:1,GD:5,GE:4,GF:5,GG:1,GH:6,GI:1,GL:6,GM:6,GN:6,GP:5,GQ:6,GR:1,GS:1,GT:5,GU:6,GW:6,GY:6,HK:2,HM:6,HN:5,HR:1,HT:5,HU:1,ID:6,IE:1,IL:6,IM:1,IN:6,IO:6,IQ:6,IR:6,IS:6,IT:1,JE:1,JM:5,JO:6,JP:6,KE:6,KG:4,KH:6,KI:6,KM:6,KN:5,KP:3,KR:3,KW:6,KY:5,KZ:4,LA:6,LB:6,LC:5,LI:1,LK:6,LR:6,LS:6,LT:1,LU:1,LV:1,LY:6,MA:6,MC:1,MD:4,ME:1,MF:1,MG:6,MH:6,MK:1,ML:6,MM:6,MN:6,MO:2,MP:6,MQ:1,MR:5,MS:5,MT:1,MU:6,MV:6,MW:6,MX:5,MY:6,MZ:6,NA:6,NC:6,NE:6,NF:6,NG:6,NI:5,NL:1,NO:1,NP:6,NR:6,NU:6,NZ:6,OM:6,PA:5,PE:5,PF:6,PG:6,PH:6,PK:6,PL:1,PM:5,PN:6,PR:6,PS:6,PT:1,PW:6,PY:5,QA:6,RE:6,RO:1,RS:1,RU:4,RW:6,SA:6,SB:6,SC:6,SD:6,SE:1,SG:6,SH:6,SI:1,SJ:6,SK:1,SL:6,SM:1,SN:6,SO:6,SR:5,SS:6,ST:6,SV:5,SX:5,SY:6,SZ:6,TC:5,TD:6,TF:6,TG:6,TH:6,TJ:4,TK:6,TL:6,TM:4,TN:6,TO:6,TR:1,TT:5,TV:6,TW:2,TZ:6,UA:4,UG:6,UM:6,US:5,UY:5,UZ:4,VA:1,VC:5,VE:5,VG:6,VI:6,VN:6,VU:6,WF:1,WS:6,YE:6,YT:6,ZA:6,ZM:6,ZW:6,ZZ:6},As=function(e,t){var r=e;return Object.entries(t).forEach(function(e,t){var n=e[0],o=e[1];0!==t||r.includes("?")?r+="&"+n+"="+o:r+="?"+n+"="+o}),r},_s=function(e){return e.appendIfNotEmpty=function(t,r){r&&e.append(t,r)},e},Ts=function(e,t){return e?As(e,{xsolla_lang:t}):""},ks=function(e,t){var r=document.createElement("script");r.type="text/javascript",r.src="https://accounts.google.com/gsi/client",r.async=!0,r.defer=!0,document.getElementsByTagName("head")[0].appendChild(r),window.onGoogleLibraryLoad=function(){window.google.accounts.id.initialize({client_id:e,callback:function(e){return t(e)},context:"signin",cancel_on_tap_outside:!1}),window.google.accounts.id.prompt()}};var Cs,Is={apiUrl:"https://login.xsolla.com/api/",cdnUrl:"https://cdn.xsolla.net/login-widget/",consentUrl:"https://consent-api.xsolla.com/v2/consen",projectId:"",theme:{background:{color:"#FFFFFF",image:{url:"",opacity:"1"}},primary_color:"#0073F7",secondary_color:"#DADADA",text_color:"#000000",error_color:"#eb002f",button_image:"",rounding:{inputs:"6px",buttons:"100px",widget:"6px"},scene:{color:"#f7faff"}},is_oauth2:!1},Ls=function(e){return e&&e.data&&e.data.error&&(e.data.error.code||0===e.data.error.code&&"0")||null},Rs=["clientId","scope","state","redirectUri","responseType"],Ms=Rs.concat(["audience"]),Ns=["projectId","fullLocale","callbackUrl","payload","with_logout"],Us=["customStyle","customLabels"],Ds=["emailTemplate"],Bs=["challenge_id","fullLocale"],Fs=function(e,t){void 0===t&&(t=[]);var r={projectId:e.projectId};return t.forEach(function(t){if(e[t])switch(t){case"callbackUrl":r.login_url=e.callbackUrl;break;case"fullLocale":r.locale=e.fullLocale?e.fullLocale.replace("-","_"):e.fullLocale;break;case"clientId":r.client_id=e.clientId;break;case"redirectUri":r.redirect_uri=e.redirectUri;break;case"responseType":r.response_type=e.responseType;break;case"emailTemplate":r.email_template=e.emailTemplate;break;default:r[t]=e[t]}}),r},Gs=function(t){return function(r){var i=be.create();return i.defaults.baseURL=t.apiUrl||"https://login.xsolla.com/api",i.defaults.withCredentials=!0,i.interceptors.request.use(function(e){return e.analytics={requestName:r,requestUrl:""+e.baseURL+e.url,projectId:t.projectId,startTime:(new Date).getTime(),requestType:e.method},e},function(e){return Promise.reject(e)}),i.interceptors.response.use(function(t){var r=t.config.analytics,i=r.startTime,a=o(r,["startTime"]);return Ps(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:!1,load_time:(new Date).getTime()-i})}),t},function(t){var r=t.response.config.analytics,i=r.startTime,a=o(r,["startTime"]),s=Ls(t.response);return Ps(e.MetrikaEventNames.performanceRequest,{exv:n({},a,{isError:s,load_time:(new Date).getTime()-i})}),Promise.reject(t)}),i}},Ws=function(){function t(e){this.config=Is,this.updateConfig(e),this.loginApi=Gs(e)}return t.prototype.getConfig=function(){return this.config},t.prototype.updateConfig=function(e){var t=function e(t){if(null!=t){var r=Array.isArray(t)?[]:{};return Object.keys(t).forEach(function(n){var o=t[n];"object"==typeof o?r[n]=e(o):""!==o&&(r[n]=o)}),r}}(e);!function e(t,r){if(void 0===t)return r;for(var n in r)n in t&&"object"==typeof r[n]?e(t[n],r[n]):void 0!==r[n]&&(t[n]=r[n]);return t}(this.config,t);var r=this.config,n=r.clientId,o=r.redirectUri,i=r.responseType,a=r.state;return n&&i&&o&&a&&(this.config.is_oauth2=!0),this.config},t.prototype.fetchConfig=function(){var t=this,r=Fs(this.config,Ns.concat(Rs)),o=this.config,i=o.settingsJSON,a=o.socialsJSON,s=o.themeJSON,c=o.projectId,u=o.apiUrl,l=o.disableCache,f=Date.now(),p=[be.get(i||"https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/auth"+(l?"?currTime="+f:""),{withCredentials:!1}),be.get(a||"https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/socials/by_region"+(l?"?currTime="+f:""),{withCredentials:!1}),be.get(s||"https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/widget"+(l?"?currTime="+f:""),{withCredentials:!1}),this.loginApi("details").get("/client/details")],d=Promise.all(p),y=be.get(u+"/widget/ng/settings",{params:r}),h=(new Date).getTime(),g={projectId:c,requestName:"fetchConfigWidget",requestType:"get",requestUrl:["https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/auth","https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/socials/by_region","https://cdn.xsolla.net/xsolla-login-widget/projects/"+c+"/settings/widget",u+"/client/details",u+"/widget/ng/settings"]};return ds([d,y]).then(function(o){if(Ps(e.MetrikaEventNames.performanceRequest,{exv:n({},g,{isError:!1,load_time:(new Date).getTime()-h})}),!o.data){var i=o,a=i[0],s=i[1],c=i[2],u=i[3].data.geo_ip_country.toUpperCase()||"US",l=function(e,t,r,o){var i=o.projectId,a=o.client_id,s=void 0===a?"":a,c=o.scope,u=void 0===c?"":c,l=o.state,f=void 0===l?"":l,p=o.response_type,d=void 0===p?"":p,y=o.redirect_uri,h=void 0===y?"":y,g=o.login_url,m=void 0===g?"":g,v=o.payload,b=void 0===v?"":v,w=o.locale,S=void 0===w?"":w,E=_s(new URLSearchParams);E.appendIfNotEmpty("projectId",i),E.appendIfNotEmpty("login_url",m),E.appendIfNotEmpty("payload",b),E.appendIfNotEmpty("locale",S),r&&(E.appendIfNotEmpty("client_id",s.toString()),E.appendIfNotEmpty("redirect_uri",h),E.appendIfNotEmpty("response_type",d),E.appendIfNotEmpty("scope",u),E.appendIfNotEmpty("state",f));var O="?"+E.toString(),j=Object.keys(xs).includes(t)?e[xs[t]]:e[xs.US];return{primary:n({},j.primary.map(function(e){return{name:e.name,url:r?""+e.oauth2+O:""+e.jwt+O}})),secondary:n({},j.secondary.map(function(e){return{name:e.name,url:r?""+e.oauth2+O:""+e.jwt+O}})),other:[],showOtherLink:!1}}(s.data,u,t.config.is_oauth2||!1,r),f=(p=a.data,d=p.tos_url,y=p.consent_url,m=p.cookie_policy,v=p.privacy_policy,b="en",navigator.language&&(b=navigator.language.trim().split(/-|_/)[0]),n({},p,{tos_url:Ts(d,b),consent_url:Ts(y,b),cookie_policy:Ts(m,b),privacy_policy:Ts(v,b)}));return t.updateConfig(n({apiUrl:"",projectId:""},f,{social_links:n({},l),theme:c.data,geo_ip_country:u}))}var p,d,y,m,v,b,w=function(e,t){var r=t.locale,o=void 0===r?"":r;return o?{primary:e.primary.map(function(e){return n({},e,{url:As(e.url,{locale:o})})}),secondary:e.secondary.map(function(e){return n({},e,{url:As(e.url,{locale:o})})})}:e}(o.data.social_links,r);return t.updateConfig(n({},o.data,{social_links:n({},w)}))}).catch(function(t){var r=Ls(t.response);if(Ps(e.MetrikaEventNames.performanceRequest,{exv:n({},g,{isError:r,load_time:(new Date).getTime()-h})}),r)throw new ys(r);throw t})},t.prototype.signup=function(e){var t=e.userInfo,r=Fs(this.config,Ns.concat(Rs,Ds)),n=this.config.is_oauth2?"/oauth2/user":"/user";return this.loginApi("signup").post(n,t,{params:r}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.login=function(e){var t=e.credentials,r=e.captchaData,n=Fs(this.config,Ns.concat(Rs)),o={};this.config.callbackUrl&&(n.login_url=this.config.callbackUrl),r&&(o["X-LOT-NUMBER"]=r.lot_number,o["X-CAPTCHA-OUTPUT"]=r.captcha_output,o["X-PASS-TOKEN"]=r.pass_token,o["X-GEN-TIME"]=r.gen_time);var i=this.config.is_oauth2?"/oauth2/login":"/login";return this.loginApi("login").post(i,t,{params:n,headers:o}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response),r=e.response.headers["x-captcha-enabled"];if("003-038"===t&&r&&"1"===r)throw new ys("003-338");if(t)throw new ys(t);throw e})},t.prototype.agreement=function(e){var t=e.token,r=e.isAccepted,n=e.consentId,o={token:t,projectId:this.config.projectId,accept_consent:r};return n&&(o.consent_id=n),this.loginApi("socialConsent").put("/social/consent",o).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.reset=function(e){var t=Fs(this.config,Ns.concat(Ds));return this.config.callbackUrl&&(t.login_url=this.config.callbackUrl),this.loginApi("passwordResetRequest").post("/password/reset/request",e,{params:t}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.set=function(e){var t=Fs(this.config,Ns);this.config.callbackUrl&&(t.login_url=this.config.callbackUrl);var r={new_password:e.newPassword,reset_code:e.code,user_id:e.user_id};return this.loginApi("passwordResetConfirm").post("/password/reset/confirm",r,{params:t}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.getConfirmCode=function(e){var t={projectId:this.config.projectId,login:e.login.toLowerCase(),operation_id:e.operation_id};return this.loginApi("getConfirmCode").get("/otc/code",{params:t,cancelToken:e.cancelToken.token}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.pushConfirmCode=function(e){var t=n({projectId:this.config.projectId},e);return this.loginApi("pushConfirmCode").get("/otc/push",{params:t}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.ask=function(e){var t,r=Fs(this.config,Ns.concat(Rs,Ds,Us)),n=r.customLabels,i=void 0===n?"":n,a=r.customStyle,s=void 0===a?"":a,c=o(r,["customLabels","customStyle"]),u=_s(new URLSearchParams);u.appendIfNotEmpty("customStyle",s),u.appendIfNotEmpty("customLabels",i);var l=u.toString(),f=((t={})[e.fields.email?"email":"phone_number"]={link_url:l?e.link_url+"/?"+l:e.link_url,send_link:this.config.enable_magic_link&&!this.config.disableConfirmByLink},t),p={};e.captchaData&&(p["X-LOT-NUMBER"]=e.captchaData.lot_number,p["X-CAPTCHA-OUTPUT"]=e.captchaData.captcha_output,p["X-PASS-TOKEN"]=e.captchaData.pass_token,p["X-GEN-TIME"]=e.captchaData.gen_time);var d={updatedFields:e.fields,token:e.token,settings:f,email:this.config.is_oauth2?e.fields.email:""},y=this.config.is_oauth2?"/oauth2/user/ask":"/token/update";return this.loginApi("userAsk").post(y,d,{params:c,headers:p}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response),r=e.response.headers["x-captcha-enabled"];if("003-038"===t&&r&&"1"===r)throw new ys("003-338");if(t)throw new ys(t);throw e})},t.prototype.getAskFields=function(e){var t={projectId:this.config.projectId},r={};return r.Authorization="Bearer "+e,this.loginApi("getAskFields").get("/users/me/ask",{params:t,headers:r}).then(function(e){return 0!==e.data.length?e.data:function(){var e=[],t=new URLSearchParams(window.location.search).getAll("fields");if(0!==t.length)for(var r=0,n=t[0].split(",");r<n.length;r++)if("email"===n[r]){e.push({name:"email",required:!0,type:"email",validation:{regexps:[]},step:0});break}return e}()}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.otpLogin=function(e){var t=e.code,r=e.remember_me,n=void 0===r||r,o=Fs(this.config,Bs);return this.loginApi("otpLoginValidate").get("/otp/validate",{params:{code:t,remember_me:n,challenge_id:o.challenge_id}}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.otpResendCode=function(){var e=Fs(this.config,Bs);return this.loginApi("otpResendCode").put("/otp/resend",{locale:e.locale},{params:{challenge_id:e.challenge_id}}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.phoneGetCode=function(e){var t=e.phone_number,r=e.link_url,n=e.isOauth2,i=e.captchaData,a=Fs(this.config,Ns.concat(Rs,Us)),s=a.customLabels,c=void 0===s?"":s,u=a.customStyle,l=void 0===u?"":u,f=o(a,["customLabels","customStyle"]),p={};i&&(p["X-LOT-NUMBER"]=i.lot_number,p["X-CAPTCHA-OUTPUT"]=i.captcha_output,p["X-PASS-TOKEN"]=i.pass_token,p["X-GEN-TIME"]=i.gen_time);var d=(n?"/oauth2":"")+"/login/phone/request",y=_s(new URLSearchParams);y.appendIfNotEmpty("customStyle",l),y.appendIfNotEmpty("customLabels",c);var h=y.toString();return this.loginApi("phoneGetCode").post(d,{link_url:h?r+"/?"+h:r,phone_number:t||"",send_link:this.config.enable_magic_link&&!this.config.disableConfirmByLink},{params:f,headers:p}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response),r=e.response.headers["x-captcha-enabled"];if("003-038"===t&&r&&"1"===r)throw new ys("003-338");if(t)throw new ys(t);throw e})},t.prototype.loginWithPhoneCode=function(e){var t=e.phone_number,r=e.code,n=e.operation_id,o=e.isOauth2,i=Fs(this.config,Ns.concat(Rs)),a=(o?"/oauth2":"")+"/login/phone/confirm";return this.loginApi("loginWithPhoneCodeConfirm").post(a,{phone_number:t,code:r,operation_id:n},{params:i}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.emailGetCode=function(e){var t=e.email,r=e.isOauth2,n=e.link_url,i=e.captchaData,a=Fs(this.config,Ns.concat(Rs,Us)),s=a.customLabels,c=void 0===s?"":s,u=a.customStyle,l=void 0===u?"":u,f=o(a,["customLabels","customStyle"]),p={};i&&(p["X-LOT-NUMBER"]=i.lot_number,p["X-CAPTCHA-OUTPUT"]=i.captcha_output,p["X-PASS-TOKEN"]=i.pass_token,p["X-GEN-TIME"]=i.gen_time);var d=(r?"/oauth2":"")+"/login/email/request",y=_s(new URLSearchParams);y.appendIfNotEmpty("customStyle",l),y.appendIfNotEmpty("customLabels",c);var h=y.toString();return this.loginApi("emailGetCode").post(d,{link_url:h?n+"/?"+h:n,email:t?t.toLowerCase():"",send_link:this.config.enable_magic_link&&!this.config.disableConfirmByLink},{params:f,headers:p}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response),r=e.response.headers["x-captcha-enabled"];if("003-038"===t&&r&&"1"===r)throw new ys("003-338");if(t)throw new ys(t);throw e})},t.prototype.loginWithEmailCode=function(e){var t=e.email,r=e.code,n=e.operation_id,o=e.isOauth2,i=Fs(this.config,Ns.concat(Rs)),a=(o?"/oauth2":"")+"/login/email/confirm";return this.loginApi("loginWithEmail_CodeConfirm").post(a,{email:t,code:r,operation_id:n},{params:i}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.resendEmail=function(e){var t=Fs(this.config,Ns.concat(Rs,Ds)),r=(this.config.is_oauth2?"/oauth2":"")+"/user/resend_confirmation_link";return this.loginApi("resendEmailConfirmationLink").post(r,{username:e},{params:t}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.oneTapLogin=function(e,t){var r=Fs(this.config,Ns.concat(Rs)),n=(this.config.is_oauth2?"/oauth2":"")+"/social/"+t+"/one_tap/complete";return this.loginApi("oneTapLoginComplete").post(n,{access_token:e},{params:r}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.checkUserAuthSSO=function(){var e=Fs(this.config,Ns);return this.loginApi("oneTapLoginComplete").get("/jwt/sso",{params:e}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.userAuthSSOWithRedirect=function(e){var t=Fs(this.config,Ns);return this.loginApi("userAuthSSOWithRedirect").get("/jwt/sso/redirect",{params:n({},t,{login_url:e})}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.logout=function(e,t){var r={};return r.Authorization="Bearer "+e,this.loginApi("logout").get("/oauth2/logout",{headers:r,params:{sessions:t}}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.oauth2Auth=function(){var t=Fs(this.config,Ms),r=this.config.apiUrl+"/oauth2/auth?response_type=code";Object.entries(t).forEach(function(e){var t=e[0],n=e[1];r+="&"+t+"="+encodeURIComponent(n)}),window.parent.opener?(bs({message:{loginUri:r,type:e.PostMessageEvents.BabkaLogin},targetOrigin:"*"}),window.parent.close()):window.top&&(window.top.location.href=r)},t.prototype.oauth2ConsentValidate=function(e){var t=Fs(this.config,Rs),r={};return r.Authorization="Bearer "+e,this.loginApi("oauth2ConsentValidate").post("/oauth2/consent/validate",{client_id:t.client_id,scope:t.scope},{headers:r}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t.prototype.oauth2PostConsent=function(e,t){var r=Fs(this.config,Rs),o={};return o.Authorization="Bearer "+e,this.loginApi("oauth2PostConsent").post("/oauth2/consent",n({},r,{approval:t}),{headers:o}).then(function(e){return e.data}).catch(function(e){var t=Ls(e.response);if(t)throw new ys(t);throw e})},t}(),Vs="object"==typeof Reflect?Reflect:null,Hs=Vs&&"function"==typeof Vs.apply?Vs.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};Cs=Vs&&"function"==typeof Vs.ownKeys?Vs.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var qs=Number.isNaN||function(e){return e!=e};function Xs(){Xs.init.call(this)}var zs=Xs;Xs.EventEmitter=Xs,Xs.prototype._events=void 0,Xs.prototype._eventsCount=0,Xs.prototype._maxListeners=void 0;var $s=10;function Js(e){return void 0===e._maxListeners?Xs.defaultMaxListeners:e._maxListeners}function Ks(e,t,r,n){var o,i,a,s;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=Js(e))>0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function Zs(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,Hs(this.listener,this.target,e))}.bind(n);return o.listener=r,n.wrapFn=o,o}function Ys(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):ec(o,o.length)}function Qs(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function ec(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(Xs,"defaultMaxListeners",{enumerable:!0,get:function(){return $s},set:function(e){if("number"!=typeof e||e<0||qs(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");$s=e}}),Xs.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Xs.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||qs(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Xs.prototype.getMaxListeners=function(){return Js(this)},Xs.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var s=o[e];if(void 0===s)return!1;if("function"==typeof s)Hs(s,this,t);else{var c=s.length,u=ec(s,c);for(r=0;r<c;++r)Hs(u[r],this,t)}return!0},Xs.prototype.addListener=function(e,t){return Ks(this,e,t,!1)},Xs.prototype.on=Xs.prototype.addListener,Xs.prototype.prependListener=function(e,t){return Ks(this,e,t,!0)},Xs.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,Zs(this,e,t)),this},Xs.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,Zs(this,e,t)),this},Xs.prototype.removeListener=function(e,t){var r,n,o,i,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},Xs.prototype.off=Xs.prototype.removeListener,Xs.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},Xs.prototype.listeners=function(e){return Ys(this,e,!0)},Xs.prototype.rawListeners=function(e){return Ys(this,e,!1)},Xs.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Qs.call(e,t)},Xs.prototype.listenerCount=Qs,Xs.prototype.eventNames=function(){return this._eventsCount>0?Cs(this._events):[]};var tc,rc={projectId:"8513c380-0336-4927-b351-02ccec7f3cb6",url:"https://login-widget.xsolla.com/latest",popupBackgroundColor:"rgba(0, 0, 0, 0.6)",showPopupBackground:!0,iframeZIndex:9e3,siteHaveGDPRBanner:!1,showCloseButton:!1},nc=["preferredLocale","callbackUrl","disableConfirmByLink","payload","with_logout","clientId","emailTemplate","scope","state","redirectUri","responseType","isDemo","challenge_id","analyticsProductName","theme","authData","page","customStyle","customLabels","parentIsFrame","settingsJSON","socialsJSON","themeJSON","siteHaveGDPRBanner","sendLoadMetrics","enablePostMessageLogin","disableCache","audience","token","showCloseButton"],oc={signUp:"/sign-up",confirm:"/confirm",logIn:"/",passwordReset:"/password/reset",passwordSet:"/password/set",ask:"/ask",error:"/404",socials:"/socials",agreement:"/agreement",otp:"/otp",logInUserPreset:"/",externalOauth2:"/external_oauth2"},ic=function(t){function o(r){var o=t.call(this)||this;return o.events=e.PostMessageEvents,o.eventsArray=Object.values(e.PostMessageEvents),o.handler={},o.config=n({},rc,r),o.api=new Ws(n({},Is,r)),o.inFullscreenMode=!1,o.page=o.config.page?oc[o.config.page]:"",o.setLocale(o.config.preferredLocale),o.on("newListener",function(t){if(!(o.eventsArray.indexOf(t)>-1))throw new hs("Invalid event");t===e.PostMessageEvents.Close&&(o.handler[t]=!0)}),o}return r(o,t),o.prototype.mount=function(t){var r=this.config.isHardMounted;this.iframe=document.createElement("iframe"),this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.border="none",this.iframe.style.borderRadius="inherit",r&&(this.iframe.style.position="absolute",this.iframe.style.top="0",this.iframe.style.bottom="0",this.iframe.style.left="0",this.iframe.style.right="0"),this.iframe.sandbox&&(this.iframe.sandbox.add("allow-forms"),this.iframe.sandbox.add("allow-scripts"),this.iframe.sandbox.add("allow-same-origin"),this.iframe.sandbox.add("allow-top-navigation"),this.iframe.sandbox.add("allow-modals"),this.iframe.sandbox.add("allow-popups"),this.iframe.sandbox.add("allow-popups-to-escape-sandbox"),this.iframe.sandbox.add("allow-presentation"),this.iframe.sandbox.add("allow-orientation-lock"),this.iframe.sandbox.add("allow-pointer-lock"));var n=r?document.body:document.getElementById(t);if(n){var o=window.getComputedStyle(n);this.config.sendLoadMetrics="none"!==o.display&&"hidden"!==o.visibility,n.appendChild(this.iframe)}this.updateWidget(),Ps(e.MetrikaEventNames.widget_open),this.initDispatcher()},o.prototype.setLocale=function(e){e&&(this.locale=vs(e),this.updateWidget())},o.prototype.setTheme=function(t){if(!this.iframe||!this.iframe.contentWindow)throw new hs("Widget is not mounted");bs({message:{theme:t,type:e.PostMessageEvents.ThemeUpdate},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow})},o.prototype.setPage=function(t){if(t){if(!this.iframe||!this.iframe.contentWindow)throw new hs("Widget is not mounted");bs({message:{page:t,type:e.PostMessageEvents.PageOpen},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow})}},o.prototype.open=function(){if(!this.iframe||!this.iframe.contentWindow)return Error("Widget is not mounted");var t=this.iframe.style;t.position="fixed",t.zIndex=String(this.config.iframeZIndex),t.left="0",t.top="0",t.width="100%",t.height="100%",this.inFullscreenMode=!0,this.config.showPopupBackground&&this.config.popupBackgroundColor?t.backgroundColor=this.config.popupBackgroundColor:t.backgroundColor="transparent",Ps(e.MetrikaEventNames.widget_open),bs({message:{type:e.PostMessageEvents.IframeOpen},targetOrigin:this.config.url||window.location.origin,target:this.iframe.contentWindow})},o.prototype.close=function(){if(!this.iframe||!this.iframe.contentWindow)return Error("Widget is not mounted");var e=this.iframe.style;e.position="",e.zIndex="",e.left="",e.top="",e.width="0",e.height="0",e.backgroundColor=""},o.prototype.initDispatcher=function(){var t=this;Ss(Es+"message",function(r){r.data.type!==e.PostMessageEvents.Close||t.handler[e.PostMessageEvents.Close]||t.onCloseEvent(r.data.source),r.data.type===e.PostMessageEvents.GoogleOneTapOpen?t.onOpenGoogleOneTapEvent(r.data.params):t.emit(r.data.type,r.data)},!1)},o.prototype.unmount=function(){if(!this.iframe||!this.iframe.parentNode)throw new hs("Widget is not mounted");this.iframe.parentNode.removeChild(this.iframe)},o.prototype.onCloseEvent=function(t){(this.inFullscreenMode||t===e.CloseSource.Button)&&this.close()},o.prototype.onOpenGoogleOneTapEvent=function(t){var r=this;if(!this.iframe||!this.iframe.parentNode)throw new hs("Widget is not mounted");var n=t.appId;ks(n,function(t){bs({message:{type:e.PostMessageEvents.GoogleOneTapSuccess,credential:t.credential},targetOrigin:r.config.url||window.location.origin,target:r.iframe.contentWindow})})},o.prototype.updateWidget=function(){var e=this;if(this.iframe){var t="";nc.forEach(function(r){var n=e.config[r];if(n)switch(r){case"preferredLocale":t+="&locale="+n;break;case"clientId":t+="&client_id="+n;break;case"redirectUri":t+="&redirect_uri="+n;break;case"responseType":t+="&response_type="+n;break;case"theme":t+="&theme="+JSON.stringify(n);break;case"authData":t+="&auth_data="+JSON.stringify(n);break;case"siteHaveGDPRBanner":default:t+="&"+r+"="+n}}),this.iframe.src=""+this.config.url+this.page+"?projectId="+this.config.projectId,this.iframe.src+=t}},o}(zs);return(tc=e.Socials||(e.Socials={})).amazon="amazon",tc.apple="apple",tc.babka="babka",tc.baidu="baidu",tc.battlenet="battlenet",tc.china_telecom="china_telecom",tc.discord="discord",tc.email="email",tc.epicgames="epicgames",tc.facebook="facebook",tc.github="github",tc.google="google",tc["google-plus"]="google-plus",tc.instagram="instagram",tc.kakao="kakao",tc.kefir="kefir",tc.linkedin="linkedin",tc.mailru="mailru",tc.microsoft="microsoft",tc.msn="msn",tc.naver="naver",tc.ok="ok",tc.paradox="paradox",tc.paypal="paypal",tc.pinterest="pinterest",tc.qq="qq",tc.reddit="reddit",tc.steam="steam",tc.slack="slack",tc.twitch="twitch",tc.twitter="twitter",tc.vimeo="vimeo",tc.vk="vk",tc.wbgames="wbgames",tc.wechat="wechat",tc.weibo="weibo",tc.xbox="xbox",tc.yahoo="yahoo",tc.yandex="yandex",tc.youtube="youtube",e.Api=Ws,e.defaultConfig=Is,e.Widget=ic,e.APIError=ys,e.SUPPORTED_LANGUAGES=gs,e.LANGUAGE_MAP={ae:"ar",bh:"ar",dz:"ar",eg:"ar",iq:"ar",jo:"ar",km:"ar",kw:"ar",lb:"ar",ly:"ar",ma:"ar",mr:"ar",om:"ar",ps:"ar",qa:"ar",sa:"ar",sd:"ar",sy:"ar",tn:"ar",ye:"ar",bg:"bg",cz:"cs",de:"de",at:"de",li:"de",ch:"de",es:"es",ar:"es",bo:"es",cl:"es",co:"es",cr:"es",cu:"es",do:"es",ec:"es",eh:"es",gq:"es",gt:"es",hn:"es",mx:"es",ni:"es",pa:"es",pe:"es",pr:"es",py:"es",sv:"es",uy:"es",ve:"es",fr:"fr",bf:"fr",bi:"fr",bj:"fr",bl:"fr",cd:"fr",cf:"fr",cg:"fr",ci:"fr",dj:"fr",ga:"fr",gf:"fr",gn:"fr",gp:"fr",ht:"fr",lu:"fr",mc:"fr",mg:"fr",ml:"fr",mq:"fr",nc:"fr",ne:"fr",pf:"fr",pm:"fr",re:"fr",sc:"fr",sn:"fr",td:"fr",tf:"fr",tg:"fr",wf:"fr",yt:"fr",il:"he",hu:"hu",it:"it",sm:"it",va:"it",jp:"ja",kr:"ko",kp:"ko",pt:"pt",ao:"pt",br:"pt",cv:"pt",gw:"pt",mz:"pt",st:"pt",tl:"pt",ro:"ro",md:"ro",ru:"ru",kz:"ru",ua:"ru",by:"ru",th:"th",tr:"tr",vn:"vi",cn:"zh",hk:"zh",mo:"zh",tw:"zh"},e.sendMessage=bs,e.initGoogleOneTap=ks,e.getUrlVersion=function(e){var t=e.match(/\/([^\/]+)\//);return null!==t?t[1]:"latest"},e.getPageName=function(e){var t=e.lastIndexOf("/");return e.substring(t+1,e.length)},e.initAnalytics=function(e,t,r){void 0===r&&(r=!1);try{var o={projectId:e};t&&(o.productName=t);var i={extraValues:o,sendLoadMetrics:r,server:"https://datagather.xsolla.com/hit",externalId:e};return window.XA=new window.XsollaAnalytics(n({},i,{id:2222,siteDomains:["login-widget.xsolla.com"]})),window.XA_BabkaLogin=new window.XsollaAnalytics(n({},i,{id:2002,hit:!1,extLink:!1,click:!1,scroll:!1,siteDomains:["login-widget.xsolla.com","accounts.babka.com"]})),!0}catch(e){return e}},e.addEvent=Ps,e.openEvent=function(e,t){window.XA&&window.XA.hit(e,t)},e.addBabkaLoginEvent=function(e,t){window.XA_BabkaLogin&&window.XA_BabkaLogin.elementClick(e,t)},e.addQueryParamsToURL=As,e}({});
//# sourceMappingURL=sdk.js.map
