fansunited-sdk-umd 1.28.0 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.FansUnitedSDK=e():t.FansUnitedSDK=e()}(self,(function(){return(()=>{var t={9669:(t,e,n)=>{t.exports=n(1609)},5448:(t,e,n)=>{"use strict";var r=n(4867),i=n(6026),s=n(4372),a=n(5327),o=n(4097),u=n(4109),c=n(7985),l=n(5061),d=n(5655),h=n(5263);t.exports=function(t){return new Promise((function(e,n){var p,f=t.data,m=t.headers,v=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}r.isFormData(f)&&delete m["Content-Type"];var g=new XMLHttpRequest;if(t.auth){var w=t.auth.username||"",b=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var _=o(t.baseURL,t.url);function E(){if(g){var r="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,s={data:v&&"text"!==v&&"json"!==v?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g};i((function(t){e(t),y()}),(function(t){n(t),y()}),s),g=null}}if(g.open(t.method.toUpperCase(),a(_,t.params,t.paramsSerializer),!0),g.timeout=t.timeout,"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(E)},g.onabort=function(){g&&(n(l("Request aborted",t,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",t,null,g)),g=null},g.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||d.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var I=(t.withCredentials||c(_))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;I&&(m[t.xsrfHeaderName]=I)}"setRequestHeader"in g&&r.forEach(m,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete m[e]:g.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(g.withCredentials=!!t.withCredentials),v&&"json"!==v&&(g.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&g.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){g&&(n(!t||t&&t.type?new h("canceled"):t),g.abort(),g=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),f||(f=null),g.send(f)}))}},1609:(t,e,n)=>{"use strict";var r=n(4867),i=n(1849),s=n(321),a=n(7185),o=function t(e){var n=new s(e),o=i(s.prototype.request,n);return r.extend(o,s.prototype,n),r.extend(o,n),o.create=function(n){return t(a(e,n))},o}(n(5655));o.Axios=s,o.Cancel=n(5263),o.CancelToken=n(4972),o.isCancel=n(6502),o.VERSION=n(7288).version,o.all=function(t){return Promise.all(t)},o.spread=n(8713),o.isAxiosError=n(6268),t.exports=o,t.exports.default=o},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,n)=>{"use strict";var r=n(5263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},i.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(4867),i=n(5327),s=n(782),a=n(3572),o=n(7185),u=n(4875),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new s,response:new s}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=o(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(s),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var d=t;n.length;){var h=n.shift(),p=n.shift();try{d=h(d)}catch(t){p(t);break}}try{i=a(d)}catch(t){return Promise.reject(t)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},l.prototype.getUri=function(t){return t=o(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(o(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(o(r||{},{method:t,url:e,data:n}))}})),t.exports=l},782:(t,e,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},4097:(t,e,n)=>{"use strict";var r=n(1793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},5061:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,s){var a=new Error(t);return r(a,e,n,i,s)}},3572:(t,e,n)=>{"use strict";var r=n(4867),i=n(8527),s=n(6502),a=n(5655),o=n(5263);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new o("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(u(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},7185:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function a(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function u(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||s,i=e(t);r.isUndefined(i)&&e!==u||(n[t]=i)})),n}},6026:(t,e,n)=>{"use strict";var r=n(5061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},8527:(t,e,n)=>{"use strict";var r=n(4867),i=n(5655);t.exports=function(t,e,n){var s=this||i;return r.forEach(n,(function(n){t=n.call(s,t,e)})),t}},5655:(t,e,n)=>{"use strict";var r=n(4867),i=n(6016),s=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function o(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(5448)),u),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(o(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(o(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||c.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(a){if("SyntaxError"===t.name)throw s(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(a)})),t.exports=c},7288:t=>{t.exports={version:"0.24.0"}},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},5327:(t,e,n)=>{"use strict";var r=n(4867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var s;if(n)s=n(e);else if(r.isURLSearchParams(e))s=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),s=a.join("&")}if(s){var o=t.indexOf("#");-1!==o&&(t=t.slice(0,o)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,s,a){var o=[];o.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),r.isString(i)&&o.push("path="+i),r.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},6268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},7985:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},6016:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},4109:(t,e,n)=>{"use strict";var r=n(4867),i=["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"];t.exports=function(t){var e,n,s,a={};return t?(r.forEach(t.split("\n"),(function(t){if(s=t.indexOf(":"),e=r.trim(t.substr(0,s)).toLowerCase(),n=r.trim(t.substr(s+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var s={};i.transitional=function(t,e,n){function i(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(i(r," has been removed"+(e?" in "+e:"")));return e&&!s[r]&&(s[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var s=r[i],a=e[s];if(a){var o=t[s],u=void 0===o||a(o,s,t);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:i}},4867:(t,e,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function s(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function o(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:o,isPlainObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return o(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):s(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},6245:(t,e,n)=>{"use strict";function r(t){this.message=t}n.r(e),n.d(e,{default:()=>o,InvalidTokenError:()=>a}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,s=0,a=0,o="";i=e.charAt(a++);~i&&(n=s%4?64*n+i:i,s++%4)?o+=String.fromCharCode(255&n>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function s(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(i(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return i(e)}}function a(t){this.message=t}a.prototype=new Error,a.prototype.name="InvalidTokenError";const o=function(t,e){if("string"!=typeof t)throw new a("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(s(t.split(".")[n]))}catch(t){throw new a("Invalid token specified: "+t.message)}}},6595:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(682),i=n(2141),s=n(4241),a=n(6391),o=n(1512),u=n(4392),c=n(320),l=n(7631),d=n(6965),h=n(9158);e.default=function(){var t=this;this.validate=function(e){var n=t.checkFieldsForValues(e);return n.isValid=t.containsErrorMessage(n),n},this.checkFieldsForValues=function(t){for(var e=new l.default,n={apiKey:new o.default,environment:new a.default,idSchema:new u.default,clientId:new d.default,lang:new s.default,errorHandlingMode:new h.default,authProvider:new c.default},r=0,i=Object.entries(e);r<i.length;r++){var p=i[r],f=p[0];p[1],"isValid"!==f&&n[f].validate(t)}return Object.keys(n).forEach((function(r){e[r]=n[r].validate(t)})),e},this.containsErrorMessage=function(t){for(var e=!0,n=0,s=Object.entries(t);n<s.length;n++){var a=s[n],o=a[0],u=a[1];if(o!==r.ConfigFieldEnum.authProvider){if("isValid"!==o&&u.message.type===i.LogEnum.ERROR)return!1;if("isValid"!==o&&u.message.type===i.LogEnum.WARNING)return!0}else if(u.message.type===i.LogEnum.ERROR)return!1}return e}}},682:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigFieldEnum=void 0,(n=e.ConfigFieldEnum||(e.ConfigFieldEnum={})).apiKey="apiKey",n.environment="environment",n.idSchema="idSchema",n.clientId="clientId",n.lang="lang",n.authProvider="authProvider"},2671:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentEnum=void 0,(n=e.EnvironmentEnum||(e.EnvironmentEnum={})).DEV="dev",n.PROD="prod",n.STAGING="staging"},9580:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorHandlingModeEnum=void 0,(n=e.ErrorHandlingModeEnum||(e.ErrorHandlingModeEnum={})).DEFAULT="default",n.STANDARD="standard"},4946:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.IdSchemaEnum=void 0,(n=e.IdSchemaEnum||(e.IdSchemaEnum={})).NATIVE="native",n.ENETPULSE="enetpulse",n.SPORTRADAR="sportradar",n.SPORTAL_365="sportal365"},9377:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LangEnum=void 0,(n=e.LangEnum||(e.LangEnum={})).EN="en",n.BG="bg",n.RO="ro",n.EL="el"},2141:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LogEnum=void 0,(n=e.LogEnum||(e.LogEnum={})).ERROR="error",n.WARNING="warning"},9028:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationMessageEnum=void 0,(n=e.ValidationMessageEnum||(e.ValidationMessageEnum={})).API_KEY="The field apiKey with valid value must be provided to use Fans United JS SDK",n.CLIENT_ID="The field clientId must be provided to use Fans United JS SDK",n.LANG_MISSING="If no lang is passed the default one will be set which is: en",n.LANG_INVALID="This lang value is not supported, the default one will be set which is: en",n.ID_SCHEMA_MISSING="If no idSchema is passed the default one will be set which is: native",n.ID_SCHEMA_INVALID="This idSchema value is not supported, the default one will be set which is: native",n.ENVIRONMENT_MISSING="If no environment is passed the default one will be set which is: prod",n.ENVIRONMENT_INVALID="This environment value is not supported, the default one will be set which is: prod",n.ERROR_HANDLING_MODE_MISSING="If no errorHandlingMode is passed the default one will be set which is: default",n.ERROR_HANDLING_MODE_INVALID="This errorHandlingMode value is not supported, the default one will be set which is: default",n.AUTH_PROVIDER_CONFIG_PROP_MISSING="The following property is missing from the authProvider object:",n.AUTH_PROVIDER_CONFIG_INVALID_PROP="You have passed a property which is not supported for the authentication provider:",n.AUTH_PROVIDER_CONFIG_MISSING="The field authProvider must be provided to use this SDK",n.AUTH_PROVIDER_CONFIG_MISSING_CONFIG="The field authProvider has missing properties"},9627:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationResponseEnum=void 0,(n=e.ValidationResponseEnum||(e.ValidationResponseEnum={})).MISSING_VALUE="missing",n.INVALID_VALUE="invalid",n.VALID_VALUE="valid"},7070:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.getIdToken=null,this.logout=null}},2379:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3220);e.default=function(){this.validation=null,this.message=new r.default,this.getIdToken={validation:null,message:new r.default},this.logout={validation:null,message:new r.default}}},7631:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3074);e.default=function(){this.apiKey=null,this.environment=null,this.idSchema=null,this.clientId=null,this.lang=null,this.errorHandlingMode=null,this.authProvider={getIdToken:new r.default,logout:new r.default},this.isValid=!1}},3220:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.text=null,this.type=null}},3074:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},1512:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.API_KEY),t===r.ValidationResponseEnum.VALID_VALUE&&(n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.apiKey);return{validation:e,message:this.generateMessage(e)}},t}();e.default=a},320:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(7070),o=n(2379),u=function(){function t(){this.validateAuthProvider=function(t){var e=Object.keys(new a.default),n=new o.default;if(t){var u=Object.keys(t).filter((function(t){return!e.includes(t)}));u.length>0?(n.validation=r.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_INVALID_PROP+" "+u.join(",")):n.validation=r.ValidationResponseEnum.VALID_VALUE}else n.validation=r.ValidationResponseEnum.MISSING_VALUE,n.message.type=s.LogEnum.ERROR,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;return n},this.validateAuthProviderConfigFields=function(t,e){return Object.keys(new a.default).forEach((function(n){t[n]?e[n].validation=r.ValidationResponseEnum.VALID_VALUE:e[n].validation=r.ValidationResponseEnum.MISSING_VALUE})),e},this.generateAuthProviderConfigMessages=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){var n=t[e];n.validation===r.ValidationResponseEnum.MISSING_VALUE&&(n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING+" "+e,n.message.type=s.LogEnum.ERROR)})),t},this.checkAuthProviderConfigMessagesForErrors=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){t[e].validation===r.ValidationResponseEnum.MISSING_VALUE&&t.validation===r.ValidationResponseEnum.VALID_VALUE&&(t.validation=r.ValidationResponseEnum.INVALID_VALUE,t.message.type=s.LogEnum.ERROR,t.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG)})),t}}return t.prototype.validate=function(t){var e=this.validateAuthProvider(t.authProvider);return e.validation!==r.ValidationResponseEnum.MISSING_VALUE&&(e=this.validateAuthProviderConfigFields(t.authProvider,e),e=this.generateAuthProviderConfigMessages(e),e=this.checkAuthProviderConfigMessagesForErrors(e)),e},t}();e.default=u},6965:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.CLIENT_ID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.clientId);return{validation:e,message:this.generateMessage(e)}},t}();e.default=a},6391:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(2671),o=function(){function t(){this.validateField=function(t){var e=[a.EnvironmentEnum.DEV,a.EnvironmentEnum.STAGING,a.EnvironmentEnum.PROD];return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.environment);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},9158:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9580),i=n(2141),s=n(9028),a=n(9627);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.errorHandlingMode);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=[r.ErrorHandlingModeEnum.DEFAULT,r.ErrorHandlingModeEnum.STANDARD];return t?e.includes(t)?a.ValidationResponseEnum.VALID_VALUE:a.ValidationResponseEnum.INVALID_VALUE:a.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=i.LogEnum.WARNING;return t===a.ValidationResponseEnum.MISSING_VALUE&&(e=s.ValidationMessageEnum.ERROR_HANDLING_MODE_MISSING),t===a.ValidationResponseEnum.INVALID_VALUE&&(e=s.ValidationMessageEnum.ERROR_HANDLING_MODE_INVALID),t===a.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},4392:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(4946),o=function(){function t(){this.validateField=function(t){var e=[a.IdSchemaEnum.NATIVE,a.IdSchemaEnum.SPORTAL_365,a.IdSchemaEnum.ENETPULSE,a.IdSchemaEnum.SPORTRADAR];return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.idSchema);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},4241:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9377),i=n(9627),s=n(9028),a=n(2141);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.lang);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=[r.LangEnum.BG,r.LangEnum.RO,r.LangEnum.EN,r.LangEnum.EL];return null!=t&&t.length>0?e.includes(t)?i.ValidationResponseEnum.VALID_VALUE:i.ValidationResponseEnum.INVALID_VALUE:i.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.WARNING;return t===i.ValidationResponseEnum.MISSING_VALUE&&(e=s.ValidationMessageEnum.LANG_MISSING),t===i.ValidationResponseEnum.INVALID_VALUE&&(e=s.ValidationMessageEnum.LANG_INVALID),t===i.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},4021:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorCodes=void 0,(n=e.ErrorCodes||(e.ErrorCodes={}))[n.BAD_METHOD_CALL=400]="BAD_METHOD_CALL",n[n.UNAUTHORIZED=401]="UNAUTHORIZED"},4904:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorStatuses=void 0,(n=e.ErrorStatuses||(e.ErrorStatuses={})).INVALID_TEMPLATE="INVALID_TEMPLATE",n.INVALID_PREDICTION="INVALID_PREDICTION",n.INVALID_MARKET="INVALID_MARKET",n.INVALID_FIELD="INVALID_FIELD",n.INVALID_TYPE="INVALID_TYPE",n.EXCEEDED_LENGTH="EXCEEDED_LENGTH",n.INVALID_TOKEN="invalid_token",n.UNAUTHORIZED="unauthorized",n.INVALID_FILTERS="invalid_filters"},8097:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.code=0,i.status=null,i.message=null,i.errorMessage=function(){return i.message},i.code=e,i.status=n,i.message=r,i}return r(e,t),e}(Error);e.default=i},2535:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,n){this.response={error:{code:0,status:"",message:""}},this.response.error.code=t,this.response.error.status=e,this.response.error.message=n}},1260:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validFixtureFields=e.documentationLinks=e.ID_TYPES=void 0,e.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id"},e.documentationLinks={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},e.validFixtureFields=["matchId","matchType","market","prediction"]},712:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.constructStringArrayWithProvidedLength=e.sortArrayInAscOrder=e.initDisableCache=e.isDisabledCache=e.transformIdsToBeUnique=e.setBaseUrl=e.limitIds=e.requestChunkBuild=void 0;var r=n(2671);e.requestChunkBuild=function(t){var e=[],n=0;return e[n]=[],t.forEach((function(t){e[n].length<=199?e[n].push(t):(n++,e[n]=[t])})),e},e.limitIds=function(t,e){for(var n=[];t.length>e;){var r=t.splice(0,e);n.push(r)}return n.push(t),n},e.setBaseUrl=function(t,e){return t===r.EnvironmentEnum.PROD?{profile:"https://profile.fansunitedapi.com/v1",football:"https://football.fansunitedapi.com/v1",idMapping:"https://id-mapping.fansunitedapi.com/v1",predictor:"https://prediction.fansunitedapi.com/v1",client:"https://client.fansunitedapi.com/v1",loyalty:"https://loyalty.fansunitedapi.com/v1"}[e]:t===r.EnvironmentEnum.DEV?{profile:"http://localhost:8010/v1",football:"http://localhost:8080/v1",idMapping:"http://localhost:8030/v1",predictor:"http://localhost:8040/v1",client:"http://localhost:8070/v1",loyalty:"http://localhost:8060/v1"}[e]:{profile:"https://profile.fansunitedstagingapi.com/v1",football:"https://football.fansunitedstagingapi.com/v1",idMapping:"https://id-mapping.fansunitedstagingapi.com/v1",predictor:"https://prediction.fansunitedstagingapi.com/v1",client:"https://client.fansunitedstagingapi.com/v1",loyalty:"https://loyalty.fansunitedstagingapi.com/v1"}[e]},e.transformIdsToBeUnique=function(t){return t.filter((function(t,e,n){return e===n.indexOf(t)}))},e.isDisabledCache=function(t){return t||!1},e.initDisableCache=function(){return"&disable_cache="+Date.now()},e.sortArrayInAscOrder=function(t){return t.sort((function(t,e){return t.localeCompare(e)}))},e.constructStringArrayWithProvidedLength=function(t,e){for(var n=[],r=0;r<e;r++)n[r]=t;return n}},5601:function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var i=n(1260),s="FansUnited",a={football:{ids:[],countries:[],competitions:[],expirations:{ids:0}},profile:{info:{},statistics:{},badges:null,countries:[],expirations:{profile:0,statistics:0,badges:0}},client:{features:{},expirations:{features:0}}};e.default=function(t){var e=this;this.idSchema="",this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,this.clearData=function(){e.setData(a)},this.getEntityById=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),e.getData().football.ids.find((function(r){var s=i.ID_TYPES[e.idSchema];return r&&""+r[s]===n&&r.resource===t}))},this.getEntity=function(t,n,r){return Array.isArray(t)?e.getData().football.ids.filter((function(e){var s=i.ID_TYPES[r];return e&&t.includes(""+e[s])&&e.resource===n})):e.getData().football.ids.find((function(e){var s=i.ID_TYPES[r];return e&&""+e[s]===t&&e.resource===n}))},this.getEntityByNativeId=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),e.getData().football.ids.find((function(e){return e&&""+e.id===n&&e.resource===t}))},this.checkForExistingIdObjs=function(t,n){var r=i.ID_TYPES[n],s={};return Object.keys(t).forEach((function(i){var a=t[i],o=e.getEntity(a,i,n).map((function(t){return t[r]})),u=t[i].filter((function(t){return!o.includes(t)}));s[i]=a.map((function(t){return u.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}}))})),s},this.getIdsByType=function(t,n,r){var s=i.ID_TYPES[r],a=i.ID_TYPES[n],o={};return Object.keys(t).forEach((function(n){var r=t[n],i=[];e.getData().football.ids.forEach((function(t){r.forEach((function(e,r){e===t[a]&&n===t.resource&&(i[r]=t[s])}))})),o[n]=i})),o},this.addIdMapping=function(t){var n=e.getData();n.football.ids.push(t),e.setData(n)},this.addIdMappings=function(t){var n=e.getData(),i=n.football.ids;i=r(r([],i,!0),t,!0),n.football.ids=i,e.setData(n)},this.addTopIdMappings=function(t){var n=e.getData();if(n.football.ids.length){var i=JSON.parse(JSON.stringify(n.football.ids));i=i.filter((function(t){return"match"!==t.resource})),t=t.filter((function(t){return"match"===t.resource})),i=r(r([],i,!0),t,!0),n.football.ids=i}else n.football.ids=t;n.football.expirations.ids=Math.floor(Date.now()/1e3)+e.expirationFootballIdsTimeout,e.setData(n)},this.setOwnProfile=function(t){var n=e.getData();n.profile.info=t,n.profile.expirations.profile=Math.floor(Date.now()/1e3)+e.expirationProfileTimeout,e.setData(n)},this.getOwnProfile=function(){return e.getData().profile.info},this.getProfileCountries=function(){return e.getData().profile.countries},this.setProfileCountries=function(t){var n=e.getData();n.profile.countries=t,e.setData(n)},this.getProfileStats=function(){return e.getData().profile.statistics},this.setProfileStats=function(t){var n=e.getData();n.profile.statistics=t,n.profile.expirations.statistics=Math.floor(Date.now()/1e3)+e.expirationProfileTimeout,e.setData(n)},this.getProfileBadges=function(){return e.getData().profile.badges},this.setProfileBadges=function(t){var n=e.getData();n.profile.badges=t,n.profile.expirations.badges=Math.floor(Date.now()/1e3)+e.expirationBadgesTimeout,e.setData(n)},this.getFootballCountries=function(){return e.getData().football.countries},this.setFootballCountries=function(t){var n=e.getData();n.football.countries=t,e.setData(n)},this.getCompetitions=function(t){var n=e.getData();return t?t.competitionSearchFilter(n.football.competitions):n.football.competitions},this.setCompetitions=function(t){var n=e.getData(),i=r([],n.football.competitions,!0);i.push.apply(i,t),n.football.competitions=e.makeCompetitionsUnique(i),e.setData(n)},this.getCompetitionsLength=function(){return e.getData().football.competitions.length},this.getClientFeatures=function(){return e.getData().client.features},this.setClientFeatures=function(t){var n=e.getData(),r=JSON.parse(JSON.stringify(t));n.client.expirations.features=Math.floor(Date.now()/1e3)+e.expirationClientFeaturesTimeout,n.client.features=r,e.setData(n)},this.getExpiration=function(t,n){e.initialNewSchema(t,"expirations");var r=e.getData();switch(n){case"profile":return r.profile.expirations.profile;case"statistics":return r.profile.expirations.statistics;case"badges":return r.profile.expirations.badges;case"features":return r.client.expirations.features;case"ids":return r.football.expirations.ids}},this.makeCompetitionsUnique=function(t){var e=new Set;return t.filter((function(t){var n=!e.has(t.id);return e.add(t.id),n}))},this.getData=function(){return JSON.parse(localStorage.getItem(s))},this.setData=function(t){localStorage.setItem(s,JSON.stringify(t))},this.initialNewSchema=function(t,n){var r=e.getData();r&&r[t]&&r[t][n]||e.setData(a)},this.idSchema=t.idSchema,void 0!==this.getData()&&null!==this.getData()||this.setData(a)}},5318:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.invalidTypeMessage=e.missingFieldsMessage=e.invalidFieldMessage=e.invalidMarketTopXMessage=e.invalidMarketMessage=e.invalidPredictionMessage=e.WarningMessages=e.ErrorMessages=void 0;var r,i=n(1260);(r=e.ErrorMessages||(e.ErrorMessages={})).LOYALTY_INVALID_TEMPLATE_ID="Provided template ID does NOT exist! Try again with existing template ID.",r.INVALID_MATCH_ID="Match id is invalid!",r.INVALID_PLAYER_ID="Player id is invalid!",r.QUERY_PARAM_MATCH_IDS_EXCEEDED="Maximum matchIds in PredictionFilters should be 10 or less.",r.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED="Maximum limit for filtering games is 50 or less.",r.INVALID_PREDICTION_FIELD="Prediction field is invalid. For more information please visit our documentation",r.INVALID_TOKEN="Invalid JWT token is provided",r.EXPIRED_TOKEN="The provided JWT token is expired",r.ENTITIES_NEEDED="At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.",r.ENTITIES_FOLLOWS_FILTERS_EXCEEDED="Maximum length per entity should be 10 or less.",e.WarningMessages={UNEXPECTED_STATUS_PROP:"Unexpected provided property 'status'. You can NOT use this property for this method. For more information visit our documentation: \n "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION,UNEXPECTED_TYPE_PROP:"Unexpected provided property 'type'. You can NOT use this property for this method. For more information visit our documentation: \n "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION},e.invalidPredictionMessage=function(t,e){return"The prediction '"+t+"' is invalid for market '"+e+"'. Please check again have you passed appropriate prediction model. For more information please visit our documentation: https://docs.fansunitedmedia.com/sdks/js/match.quiz#gamerelatedoperations"},e.invalidMarketMessage=function(t){return"The market '"+t+"' is not supported from Fans United. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},e.invalidMarketTopXMessage=function(t){return"The market '"+t+"' is not valid for Top X game. The only available market is CORRECT_SCORE."},e.invalidFieldMessage=function(t){return"The field/s '"+(t.length>1?t.join(", "):t[0])+"' is/are invalid. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk"},e.missingFieldsMessage=function(t,e){return"The following field/s is/are missing from "+t+": '"+(e.length>1?e.join(", "):e[0])+"'. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},e.invalidTypeMessage=function(t,e){return"The field "+t+" has incorrect type. The correct type is "+e}},4800:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=t.limit?t.limit:null,this.startAfter=t.startAfter?t.startAfter:null}return t.prototype.constructMainFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit="+this.limit),this.startAfter&&(t+="&",t+="start_after="+this.startAfter),t},t}();e.default=n},439:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.main=null,this.cover=null,this.mobile=null}},8872:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8902);e.default=function(){this.pagination=new r.default}},8902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.nextPageStartsAfter=null,this.itemsPerPage=null}},1553:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8872);e.default=function(){this.meta=new r.default,this.data=[]}},3623:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8872);e.default=function(){this.remapMetaData=function(t){var e=new r.default;return e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.itemsPerPage=t.pagination.items_per_page,e}}},3483:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId=null,this.entityType=null}},6208:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.axiosError=void 0,e.axiosError=function(t,e,n){var r={data:t.data,status:e,statusText:n,headers:t.headers,config:t};return{code:String(e),config:t,isAxiosError:!0,toJSON:function(){return{}},name:"Unauthorized",message:n,response:r}}},1022:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(2453),c=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"loyalty"))||this;return n.activityRemapper=null,n.createActivity=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),e="/activities"+this.apiSignInUrl,[4,this.instanceAuth.post(e,JSON.stringify(t))];case 1:return n=s.sent(),[2,this.activityRemapper.remapSingleResponse(n.data)];case 2:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with creating activity for user",i),i.response;case 3:return[2]}}))}))},n.deleteActivity=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e="/activities/"+t+this.apiSignInUrl,[4,this.instanceAuth.delete(e)];case 1:return i.sent(),[2,!0];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem deleting the following activity: "+t,r),r.response;case 3:return[2]}}))}))},n.getOwnActivities=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/activities"+this.apiSignInUrl,r=Date.now(),t&&(n+=""+t.constructFilterUrl()),e&&(n+="disable_cache="+r),[4,this.instanceAuth.get(n)];case 1:return i=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with fetching own activities",o),o.response;case 3:return[2]}}))}))},n.getActivitiesForUser=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/users/"+t+"/activities"+this.apiSignInUrl,i=Date.now(),e&&(n+=""+e.constructFilterUrl()),r&&(n+="disable_cache="+i),[4,this.instance.get(n)];case 1:return s=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(s.data)];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with fetching activities for user "+t,u),u.response;case 3:return[2]}}))}))},n.getStats=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,5,,6]),n="",r=null,t?(n+=(0,o.isDisabledCache)(e)?"/users/"+t+"/statistics"+this.apiSignInUrl+(0,o.initDisableCache)():"/users/"+t+"/statistics"+this.apiSignInUrl,[4,this.instance.get(n)]):[3,2];case 1:return r=a.sent(),[3,4];case 2:return n+="/statistics"+this.apiSignInUrl,[4,this.instanceAuth.get(n)];case 3:r=a.sent(),a.label=4;case 4:return[2,this.activityRemapper.remapStatsReponse(r.data.data)];case 5:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching profile`s statistics:",s),s.response;case 6:return[2]}}))}))},n.activityRemapper=new u.default,n}return i(e,t),e}(n(7724).default);e.default=c},7686:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureConfigType=void 0;var o,u=n(712),c=n(704),l=n(7724),d=n(5601);(o=e.FeatureConfigType||(e.FeatureConfigType={})).PREDICTOR="predictor",o.TOP_X="topX",o.MATCH_QUIZ="matchQuiz",o.LOYALTY="loyalty";var h=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"client"))||this;return n.featureConfigRemapper=null,n.localStorage=null,n.clientId=null,n.getConfig=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),(e=this.getCachedFeatures())?[3,2]:(n="/clients/"+this.clientId+"/features",r=this.apiSignInUrl.split("&")[0],[4,this.instance.get(""+n+r)]);case 1:i=a.sent(),e=i.data.data,this.localStorage.setClientFeatures(e),a.label=2;case 2:switch(t){case"predictor":return[2,this.featureConfigRemapper.remapPredictorConfig(e.predictor)];case"topX":return[2,this.featureConfigRemapper.remapTopXConfig(e.top_x)];case"matchQuiz":return[2,this.featureConfigRemapper.remapMatchQuizConfig(e.match_quiz)];case"loyalty":return[2,this.featureConfigRemapper.remapLoyaltyConfig(e.loyalty)]}return[3,4];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching configuration from Client API",o),o.response;case 4:return[2]}}))}))},n.getCachedFeatures=function(){var t=n.getLocalStorageData();if(t&&Object.keys(t).length)return t},n.getLocalStorageData=function(){var t=Math.floor(Date.now()/1e3);return n.localStorage.getExpiration("client","features")>t?n.localStorage.getClientFeatures():null},n.clientId=e.clientId,n.localStorage=new d.default(e),n.featureConfigRemapper=new c.default,n}return i(e,t),e}(l.default);e.default=h},595:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(3430),c=n(7316),l=n(8758),d=n(5827),h=n(7821),p=n(5284),f=n(9330),m=n(4729),v=n(5157),y=n(7943),g=n(7287),w=n(753),b=n(1925),_=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"football"))||this;return n.limitIds=200,n.countryRemapper=null,n.competitionBasicRemapper=null,n.competitionFullRemapper=null,n.teamBasicRemapper=null,n.teamFullRemapper=null,n.matchBasicRemapper=null,n.matchFullRemapper=null,n.playerBasicRemapper=null,n.playerFullRemapper=null,n.topPlayerRemapper=null,n.searchRemapper=null,n.footballMetaRemapper=null,n.getCountries=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/countries"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return r=a.sent(),[2,this.countryRemapper.countriesFromResponse(r.data.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with the football countries request",s),s.response;case 3:return[2]}}))}))},n.getCompetitions=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),e=e||!1,!(t&&t.competitionIds&&t.competitionIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(t.competitionIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],t.competitionIds=l,d="/competitions"+this.apiSignInUrl+t.constructFilterUrl(),e&&(d+="&disable_cache="+r),[4,this.instance.get(d)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(t){return f.competitionBasicRemapper.fromResponse(t)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d="/competitions"+this.apiSignInUrl,t&&(d+=""+t.constructFilterUrl()),e&&(d+="&disable_cache="+r),[4,this.instance.get(d)];case 6:return[2,(n=a.sent()).data.data.map((function(t){return f.competitionBasicRemapper.fromResponse(t)}))];case 7:return[3,9];case 8:throw h=a.sent(),p=this.transformAxiosErrorToFansUnitedException(h),console.warn("There was a problem with getCompetitions request",p),p.response;case 9:return[2]}}))}))},n.getCompetitionById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/competitions/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.competitionFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getCompetitionById request",o),o.response;case 3:return[2]}}))}))},n.getTopCompetitions=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/competitions/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,a.sent().data.data.map((function(t){return s.competitionBasicRemapper.fromResponse(t)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopCompetitions request",i),i.response;case 3:return[2]}}))}))},n.getTeams=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(t&&t.teamIds&&t.teamIds.length>this.limitIds))return[3,5];i=[],s=(0,o.limitIds)(t.teamIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],t.teamIds=l,h="/teams"+this.apiSignInUrl+t.constructFilterUrl(),e&&(h+="disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/teams"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getTeams request",f),f.response;case 9:return[2]}}))}))},n.getTeamById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.teamFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getTeamById request",o),o.response;case 3:return[2]}}))}))},n.getTopTeams=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s,o=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/teams/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="$disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,(r=a.sent()).data.data?r.data.data.map((function(t){return o.teamBasicRemapper.fromResponse(t)})):[]];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with getTopTeams request",s),s.response;case 3:return[2]}}))}))},n.getNextMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+t+"/next-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+t+"/previous-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPlayers=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(t&&t.playerIds&&t.playerIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(t.playerIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],t.playerIds=l,h="/players"+this.apiSignInUrl+t.constructFilterUrl(),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/players"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getPlayers request",f),f.response;case 9:return[2]}}))}))},n.getPlayerById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.playerFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPlayerById request",o),o.response;case 3:return[2]}}))}))},n.getTopPlayers=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/players/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,a.sent().data.data.map((function(t){return s.topPlayerRemapper.fromResponse(t)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopPlayers request",i),i.response;case 3:return[2]}}))}))},n.getNextMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+t+"/next-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+t+"/previous-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getMatchById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/matches/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getMatchById request",o),o.response;case 3:return[2]}}))}))},n.getMatches=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u,c=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=new w.default,r="/matches"+this.apiSignInUrl,i=Date.now(),t&&(r+=""+t.constructFilterUrl()),e&&(r+="&disable_cache="+i),[4,this.instance.get(r)];case 1:return s=a.sent(),n.meta=this.footballMetaRemapper.remapMetaProp(s.data.meta),n.data=s.data.data.map((function(t){return c.matchBasicRemapper.fromResponse(t)})),[2,n];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with getMatches request",u),u.response;case 3:return[2]}}))}))},n.search=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/search"+this.apiSignInUrl+t.constructFilterUrl(),r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.searchRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with search request",o),o.response;case 3:return[2]}}))}))},n.apiSignInUrl="en"!==e.lang?n.apiSignInUrl+"&lang="+e.lang:n.apiSignInUrl,n.countryRemapper=new u.default,n.competitionBasicRemapper=new c.default,n.competitionFullRemapper=new l.default,n.teamBasicRemapper=new d.default,n.teamFullRemapper=new h.default,n.matchBasicRemapper=new p.default,n.matchFullRemapper=new f.default,n.playerBasicRemapper=new v.default,n.playerFullRemapper=new y.default,n.topPlayerRemapper=new m.default,n.searchRemapper=new g.default,n.footballMetaRemapper=new b.default,n}return i(e,t),e}(n(7724).default);e.default=_},7724:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9669),i=n(6245),s=n(4021),a=n(4904),o=n(2535),u=n(6208),c=n(5318);e.default=function(t,e){var n=this;this.apiSignInUrl=null,this.instanceAuth=null,this.instance=null,this.errorHandlingMode=null,this.transformAxiosErrorToFansUnitedException=function(t){if("standard"===n.errorHandlingMode&&t.response&&t.response.data&&t.response.data.error){var e=t.response.data.error,r=e.code,i=e.status,s=e.message;return new o.default(r,i,s)}return t},this.apiSignInUrl="?key="+t.apiKey+"&client_id="+t.clientId,this.errorHandlingMode=t.errorHandlingMode,this.instanceAuth=r.default.create({baseURL:e,headers:{Authorization:"Bearer "+t.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instanceAuth.interceptors.request.use((function(e){var l=null;try{l=(0,i.default)(t.authProvider.getIdToken())}catch(t){if("default"===n.errorHandlingMode)throw(0,u.axiosError)(e,401,t.message);if("standard"===n.errorHandlingMode)throw new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.INVALID_TOKEN)}return Date.now()>l.exp?(r.default.defaults.headers.common.Authorization="Bearer "+t.authProvider.getIdToken(),e.headers.Authorization="Bearer "+t.authProvider.getIdToken(),e):e}),(function(t){Promise.reject(t)})),this.instanceAuth.interceptors.response.use((function(t){return t}),(function(e){var r,i,u,l=e.config;if((403===(null===(r=e.response)||void 0===r?void 0:r.status)||401===(null===(i=e.response)||void 0===i?void 0:i.status))&&!l._retry){l._retry=!0;var d=t.authProvider.getIdToken();return l.headers.Authorization="Bearer "+d,n.instanceAuth(l)}if("standard"===n.errorHandlingMode&&401===(null===(u=e.response)||void 0===u?void 0:u.status)){var h=new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.EXPIRED_TOKEN);return Promise.reject(h)}return Promise.reject(e)})),this.instance=r.default.create({baseURL:e,headers:{"Content-Type":"application/json"}})}},8539:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(7724),c={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"},l=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"idMapping"))||this;return n.getEntityById=function(t,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+e.idSchema+"&"+c[t]+"="+r)}catch(t){throw console.warn("There was a problem with id mapping request for the following id:"+r,t),t.response}},n.getEntityByIdAndSchema=function(t,e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e)}catch(t){throw console.warn("There was a problem with id mapping request for the following id:"+e,t),t.response}},n.getEntityIdsByIdsAndSchema=function(t,e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e.join(","))}catch(t){throw console.warn("There was a problem with id mapping request for the following ids:"+e.join(","),t),t.response}},n.getEntitiesByIds=function(t,e,r){e.sort((function(t,e){return t.localeCompare(e)}));var i=(0,o.requestChunkBuild)(e).map((function(e){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e.join(","))}catch(t){var i=n.transformAxiosErrorToFansUnitedException(t);throw console.warn("There was a problem with id mapping request for the following ids:"+e.join(","),i),i.response}}));return Promise.all(i).then((function(t){var e=[];return t.forEach((function(t){e.push.apply(e,t.data.data)})),e}))},n.getEntitiesByIdObjs=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,l,d,h,p,f;return a(this,(function(m){switch(m.label){case 0:n=[],r={},i=[],Object.keys(t).forEach((function(e){n.push.apply(n,t[e])})),s=(0,o.transformIdsToBeUnique)(n),u=(0,o.requestChunkBuild)(s),l=function(n){var s,o,u,l;return a(this,(function(a){switch(a.label){case 0:if(s="",Object.keys(t).forEach((function(e){r[e]=[];var i=n.filter((function(n){return t[e].includes(n)}));i&&i.length>0&&(r[e]=i)})),Object.keys(r).forEach((function(t){r[t].length>0&&(r[t].sort((function(t,e){return t.localeCompare(e)})),s+="&",s+=c[t]+"="+r[t].join(","))})),!(s&&s.length>0))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,d.instance.get("/football"+d.apiSignInUrl+"&input_provider="+(e||"native")+s)];case 2:return o=a.sent(),i.push(o.data.data),[3,4];case 3:throw u=a.sent(),l=d.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem with id mapping request",l),l.response;case 4:return[3,6];case 5:i.push([]),a.label=6;case 6:return[2]}}))},d=this,h=0,p=u,m.label=1;case 1:return h<p.length?(f=p[h],[5,l(f)]):[3,4];case 2:m.sent(),m.label=3;case 3:return h++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)]}}))}))},n.getTopEntities=function(){return s(n,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/football/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data];case 2:throw t=n.sent(),e=this.transformAxiosErrorToFansUnitedException(t),console.warn("There was a problem with top id mappings request",e),e.response;case 3:return[2]}}))}))},n.apiSignInUrl=n.apiSignInUrl.split("&")[0],n}return i(e,t),e}(u.default);e.default=l},7059:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(7419),c=n(4533),l=n(8899),d=n(7746),h=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"loyalty"))||this;return n.templateRemapper=null,n.leaderboardRemapper=null,n.rankingsRemapper=null,n.highestSuccessRateRemapper=null,n.getTemplates=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/templates/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),e?((i=JSON.parse(JSON.stringify(r.data))).meta=this.templateRemapper.remapMeta(r.data.meta),i.data=this.templateRemapper.remapResponse(r.data.data),[2,i]):[2,this.templateRemapper.remapResponse(r.data.data)];case 2:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the list of templates",u),u.response;case 3:return[2]}}))}))},n.getTemplateById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/templates/"+t+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+t+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.templateRemapper.remapResponseId(r.data.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem requesting the following template: "+t,s),s.response;case 3:return[2]}}))}))},n.getLeaderboard=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/"+t+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/"+t+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following template: "+t,c),c.response;case 3:return[2]}}))}))},n.getLeaderboardForGame=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/games/"+t+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/games/"+t+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following game: "+t,c),c.response;case 3:return[2]}}))}))},n.getUserRankings=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,u;return a(this,(function(a){switch(a.label){case 0:n="/leaderboard/users/"+t+"/rankings/"+this.apiSignInUrl,e&&(n+=""+e.constructFiltersUrl()),(0,o.isDisabledCache)(r)&&(n+=""+(0,o.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return i=a.sent(),[2,this.rankingsRemapper.remapRankings(i.data)];case 3:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the rankings for the following user: "+t,u),u.response;case 4:return[2]}}))}))},n.getHighestSuccessRate=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,o.isDisabledCache)(e)?"/statistics/top"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/top"+this.apiSignInUrl,t&&(n+="&market="+t),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.highestSuccessRateRemapper.remapHighestSuccessRate(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching highest success rate",s),s.response;case 4:return[2]}}))}))},n.getEntitiesFollows=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return a(this,(function(s){switch(s.label){case 0:n=(0,o.isDisabledCache)(e)?"/statistics/follows"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/follows"+this.apiSignInUrl,t.footballCompetitions&&(n+="&competitions="+t.footballCompetitions.join(",")),t.footballTeams&&(n+="&teams="+t.footballTeams.join(",")),t.footballPlayers&&(n+="&players="+t.footballPlayers.join(",")),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return[2,s.sent().data.data];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching follows for entities",i),i.response;case 4:return[2]}}))}))},n.templateRemapper=new l.default,n.leaderboardRemapper=new u.default,n.rankingsRemapper=new c.default,n.highestSuccessRateRemapper=new d.default,n}return i(e,t),e}(n(7724).default);e.default=h},2793:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(2726),u=n(9679),c=n(712),l=n(4780),d=n(1553),h=n(3623),p=function(t){function e(e,n){var r=t.call(this,e,(0,c.setBaseUrl)(e.environment,"predictor"))||this;return r.predictionRemapper=null,r.matchSummaryRemapper=null,r.gamesRemapper=null,r.metaRemapper=null,r.makeFootballPrediction=function(t){return s(r,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e=this.predictionRemapper.remapRequestBody(t),[4,this.instanceAuth.post("/predictions"+this.apiSignInUrl,JSON.stringify(e))];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseObjBody(n.data)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem making POST request: ",i),i.response;case 4:return[2]}}))}))},r.getMatchSummary=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,c.isDisabledCache)(e)?"/predictions/summary/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/summary/"+t+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.matchSummaryRemapper.remapResponse(r.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching predictions for match: "+t+" ",s),s.response;case 4:return[2]}}))}))},r.deleteFootballPrediction=function(t){return s(r,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.delete("/predictions/"+t+this.apiSignInUrl)];case 1:return r.sent(),[2,!0];case 2:throw e=r.sent(),n=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem deleting your prediction: "+t,n),n.response;case 3:return[2]}}))}))},r.getMyPredictions=function(t){return s(r,void 0,void 0,(function(){var e,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),e=new d.default,n="/predictions"+this.apiSignInUrl,t&&(n+=""+t.constructFiltersUrl()),[4,this.instanceAuth.get(n)];case 1:return r=a.sent(),e.meta=this.metaRemapper.remapMetaData(r.data.meta),i=e,[4,this.predictionRemapper.remapResponseArrayBody(r.data.data)];case 2:return i.data=a.sent(),[2,e];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching own predictions",o),o.response;case 4:return[2]}}))}))},r.getMyPredictionsNoRemap=function(t){return s(r,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+t.constructFiltersUrl())];case 1:return[2,r.sent().data];case 2:throw e=r.sent(),n=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem fetching own predictions",n),n.response;case 3:return[2]}}))}))},r.getUserPredictions=function(t,e,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(e)?"/predictions/users/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/users/"+t+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching predictions for user: "+t,l),l.response;case 4:return[2]}}))}))},r.getUserPredictionsNoRemap=function(t,e){return s(r,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/predictions/users/"+t+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return[2,i.sent().data];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching predictions for user: "+t,r),r.response;case 3:return[2]}}))}))},r.getGames=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(e)?"/games/"+this.apiSignInUrl+t.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+t.constructFiltersUrl(),[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapPaginatedGames(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the games list",s),s.response;case 3:return[2]}}))}))},r.getGameById=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(e)?"/games/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapGameByIdResponse(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the following game: "+t,s),s.response;case 3:return[2]}}))}))},r.getGamePredictions=function(t,e,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(e)?"/games/"+t+"/predictions"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+"/predictions"+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the predictions for game: "+t,l),l.response;case 4:return[2]}}))}))},r.getUserGameEditions=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s,o,u=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=null,r=(0,c.isDisabledCache)(e)?"/games/"+this.apiSignInUrl+t.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+t.constructFiltersUrl(),[4,this.instance.get(r)];case 1:return(i=a.sent()).data.data.forEach((function(t){"TOP_X"===t.type?n=u.gamesRemapper.remapPaginatedUserTopXEditions(i.data):"MATCH_QUIZ"===t.type&&(n=u.gamesRemapper.remapPaginatedUserMathQuizEditions(i.data))})),[2,n];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the games list",o),o.response;case 3:return[2]}}))}))},r.getGameResults=function(t,e,n){return s(r,void 0,void 0,(function(){var r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),r=(0,c.isDisabledCache)(e)?"/games/"+t+"/results/"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+"/results/"+this.apiSignInUrl,n&&(r+=""+n.constructMainFiltersUrl()),[4,this.instance.get(r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapPaginatedGameResults(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the results for the following game: "+t,o),o.response;case 3:return[2]}}))}))},r.getMarketResultsForGame=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n="/games/"+t+"/correct-results/"+this.apiSignInUrl,(0,c.isDisabledCache)(e)&&(n+=""+(0,c.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.gamesRemapper.remapGameMarketsResults(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the markets correct results for the following game: "+t,s),s.response;case 4:return[2]}}))}))},r.getContestWinners=function(t){return s(r,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/winners/"+this.apiSignInUrl+"&contest_id="+t)];case 1:return e=i.sent(),[2,this.gamesRemapper.remapContestWinners(e.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching winners for the following game: "+t,r),r.response;case 3:return[2]}}))}))},r.getPredictionById=function(t){return s(r,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e="/predictions/"+t+this.apiSignInUrl,[4,this.instanceAuth.get(e)];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseArrayBody([n.data.data])];case 2:return[2,s.sent()[0]];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching info for the following prediction: "+t,i),i.response;case 4:return[2]}}))}))},r.predictionRemapper=new o.default(e,n),r.matchSummaryRemapper=new u.default(e,n),r.gamesRemapper=new l.default,r.metaRemapper=new h.default,r}return i(e,t),e}(n(7724).default);e.default=p},4275:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(441),c=n(8673),l=n(6277),d=n(1712),h=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"profile"))||this;return n.profileRemapper=null,n.followingRemapper=null,n.followersRemapper=null,n.lang=null,n.limitIds=100,n.getCountries=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="&lang="+this.lang,n="/countries"+this.apiSignInUrl+e,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return[2,a.sent().data.data];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the countries:",s),s.response;case 3:return[2]}}))}))},n.getProfile=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:if(e="/profile"+this.apiSignInUrl,!t)return[3,5];e="/profiles/"+t+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(e)];case 2:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 3:throw n=a.sent(),s=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching the following profile: "+t,s),s.response;case 4:return[3,8];case 5:return a.trys.push([5,7,,8]),[4,this.instanceAuth.get(e)];case 6:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 7:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching your profile from API:",s),s.response;case 8:return[2]}}))}))},n.getProfiles=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,7,,8]),n=Date.now(),!(t.length>this.limitIds))return[3,5];r=[],i=(0,o.limitIds)(t,this.limitIds),s=0,u=i,a.label=1;case 1:return s<u.length?(c=u[s],l="/profiles"+this.apiSignInUrl+"&profile_ids="+c.join(","),e&&(l+="&disable_cache="+n),[4,this.instance.get(l)]):[3,4];case 2:d=a.sent(),r.push.apply(r,this.profileRemapper.profilesFromResponse(d.data.data)),a.label=3;case 3:return s++,[3,1];case 4:return[2,r];case 5:return h="/profiles"+this.apiSignInUrl+"&profile_ids="+t.join(","),e&&(h+="&disable_cache="+n),[4,this.instance.get(h)];case 6:return p=a.sent(),[2,this.profileRemapper.profilesFromResponse(p.data.data)];case 7:throw f=a.sent(),m=this.transformAxiosErrorToFansUnitedException(f),console.warn("There was a problem fetching the following profiles: "+t.join(","),m),m.response;case 8:return[2]}}))}))},n.getFollowers=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/followers"+this.apiSignInUrl,!t||e)return[3,5];n="/profile/followers"+this.apiSignInUrl+t.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 4:return[3,9];case 5:if(t||e)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 9:t&&e?n="/profile/"+e+"/followers"+this.apiSignInUrl+t.constructFilterUrl():!t&&e&&(n="/profile/"+e+"/followers"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers for profile: "+e,u),u.response;case 13:return[2]}}))}))},n.getFollowing=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/following"+this.apiSignInUrl,!t||e)return[3,5];n="/profile/following"+this.apiSignInUrl+t.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 4:return[3,9];case 5:if(t||e)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 9:t&&e?n="/profile/"+e+"/following"+this.apiSignInUrl+t.constructFilterUrl():!t&&e&&(n="/profile/"+e+"/following"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers of the following profile: "+e,u),u.response;case 13:return[2]}}))}))},n.follow=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:(e=new d.default).profile_ids=t,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instanceAuth.post("/profile/follow"+this.apiSignInUrl,JSON.stringify(e))];case 2:return n=s.sent(),[2,this.followingRemapper.followResponse(n.data.data)];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with POST request for profiles: "+t.join(",")+" ",i),i.response;case 4:return[2]}}))}))},n.unfollow=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:(e=new d.default).profile_ids=t,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.delete("/profile/follow"+this.apiSignInUrl,{data:JSON.stringify(e)})];case 2:return i.sent(),[2,!0];case 3:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with DELETE request for profiles: "+t.join(",")+" ",r),r.response;case 4:return[2]}}))}))},n.getBadges=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:e="/profile/badges"+this.apiSignInUrl,i.label=1;case 1:return i.trys.push([1,5,,6]),t?(e="/profile/"+t+"/badges"+this.apiSignInUrl,[4,this.instance.get(e)]):[3,3];case 2:return[2,i.sent().data.data];case 3:return[4,this.instanceAuth.get(e)];case 4:return[2,i.sent().data.data];case 5:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with fetching the badges",r),r.response;case 6:return[2]}}))}))},n.updateProfile=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instanceAuth.patch("/profile"+this.apiSignInUrl,t)];case 1:return e=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(e.data.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem updating the own profile:",r),r.response;case 3:return[2]}}))}))},n.lang=e.lang,n.profileRemapper=new u.default,n.followingRemapper=new c.default,n.followersRemapper=new l.default,n}return i(e,t),e}(n(7724).default);e.default=h},5792:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(5601),a=n(8539),o=n(1260);e.default=function(t){var e=this;this.isBrowser=!1,this.localStorage=null,this.https=null,this.getEntitiesByIds=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,a,u,c,l;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?[4,this.setTopIdMappings()]:[3,6];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),e=this.localStorage.checkForExistingIdObjs(t,n),r=this.splitForRequestAndExisting(e),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 3:return a=i.sent(),this.localStorage.addIdMappings(a),[2,this.localStorage.getIdsByType(t,n,s)];case 4:return u=i.sent(),console.warn("There was a problem retrieving the entity ids ",u),[2,Promise.resolve([])];case 5:return[3,9];case 6:return i.trys.push([6,8,,9]),[4,this.https.getEntitiesByIdObjs(t,n)];case 7:return c=i.sent(),Object.keys(t).forEach((function(e){t[e]=c.filter((function(t){return t.resource===e})).map((function(t){return t[o.ID_TYPES[s]]}))})),[2,t];case 8:return l=i.sent(),console.warn("There was a problem retrieving the entity ids ",l),[2,Promise.resolve([])];case 9:return[2]}}))}))},this.getEntityById=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=this.localStorage.getEntity(t,n,s))?[2,e]:[3,1]:[3,4];case 1:case 4:return[4,this.requestEntity(t,n,s)];case 2:return r=i.sent(),this.localStorage.addIdMappings(r),[2,r];case 3:return[3,6];case 5:return[2,i.sent()];case 6:return[2]}}))}))},this.splitForRequestAndExisting=function(t){var e={},n={};return Object.keys(t).forEach((function(r){e[r]=t[r].filter((function(t){return!t.exists})).map((function(t){return t.id})),n[r]=t[r].filter((function(t){return t.exists})).map((function(t){return t.id}))})),{existing:n,request:e}},this.requestEntity=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=Array.isArray(t)?t:[t],[4,this.https.getEntitiesByIds(n,t,s)];case 1:return[2,r.sent()];case 2:return e=r.sent(),console.warn("There was a problem retrieving the requested entity: "+e),[2,null];case 3:return[2]}}))}))},this.setTopIdMappings=function(){return r(e,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return t=Math.floor(Date.now()/1e3),this.localStorage.getExpiration("football","ids")>t?[2,Promise.resolve()]:[4,this.https.getTopEntities()];case 1:return e=n.sent(),this.localStorage.addTopIdMappings(e),[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=new s.default(t),this.https=new a.default(t)}},8900:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(5792),o=n(7611),u=n(9052);e.default=function(t){var e=this;this.idSchema="",this.idMappingFacade=null,this.getEntityIdBySchemaId=function(t,n){return e.idMappingFacade.getEntityById(t,n,e.idSchema)},this.remapEntities=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){e=JSON.parse(JSON.stringify(t));try{return this.idSchema!==s.IdSchemaEnum.NATIVE?(r=new o.default,a=r.traverse(e,n),[2,this.idMappingFacade.getEntitiesByIds(a,"native",this.idSchema).then((function(t){return(new u.default).traverse(e,n,t)}))]):[2,t]}catch(t){return console.warn("There was a problem remapping entity: "+n+" with inner entity ",t),[2,[]]}return[2]}))}))},this.getEntityIdsBySchemaId=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return(e={})[n]=t,this.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:[4,this.idMappingFacade.getEntitiesByIds(e,this.idSchema,a)];case 1:return[2,r.sent()];case 2:return[2,e]}}))}))},this.idSchema=t.idSchema,this.idMappingFacade=new a.default(t)}},3845:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConvert=void 0,e.typeConvert=function(t){switch(t){case"competitions":return"competition";case"players":case"relatedPlayer":case"squad":return"player";case"teams":case"participants":case"homeTeam":case"awayTeam":case"timeline":case"teamId":return"team";default:return t}}},7611:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3845);e.default=function(){var t=this;this.extractedObjIds={},this.traverse=function(e,n){return n=(0,r.typeConvert)(n),Array.isArray(e)?t.traverseArrExtract(e,n):e&&"object"==typeof e&&t.traverseObjExtract(e,n),t.extractedObjIds},this.traverseArrExtract=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjExtract(e,n)}))},this.traverseObjExtract=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){var i=e[r];"id"===r||"teamId"===r?(t.extractedObjIds.hasOwnProperty(n)||(t.extractedObjIds[n]=[]),i&&t.extractedObjIds[n].push(i)):e[r]&&t.traverse(e[r],r)}))}}},9052:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3845);e.default=function(){var t=this;this.replaceObjIdsIndex=null,this.remappedIdsObj={},this.traverse=function(e,n,i){return n=(0,r.typeConvert)(n),null===t.replaceObjIdsIndex&&(t.initReplaceObjIdsIndex(i),t.remappedIdsObj=i),Array.isArray(e)?t.traverseArrReplace(e,n):e&&"object"==typeof e&&t.traverseObjReplace(e,n),e},this.initReplaceObjIdsIndex=function(e){t.replaceObjIdsIndex={},Object.keys(e).forEach((function(e){t.replaceObjIdsIndex[e]=0}))},this.traverseArrReplace=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjReplace(e,n)}))},this.traverseObjReplace=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){"id"===r||"teamId"===r?e[r]&&(e[r]=t.remappedIdsObj[n][t.replaceObjIdsIndex[n]],t.replaceObjIdsIndex[n]=t.replaceObjIdsIndex[n]+1):e[r]&&t.traverse(e[r],r,t.remappedIdsObj)}))}}},7302:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(5936);e.default=function(t){var e=this;this.add=function(t,n,s,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.add(t,n,s,a)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.like(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.dislike=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.dislike(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addPageview=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addPageview(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addContentConsumed=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addContentConsumed(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addShare=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addShare(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addComment=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addComment(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addClickAd=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addClickAd(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addConversion=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addConversion(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getOwn(t,n)];case 1:return[2,e.sent()]}}))}))},this.getForUser=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getForUser(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.activityFacade=new s.default(t)}},1491:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ActionsEnum=void 0,(n=e.ActionsEnum||(e.ActionsEnum={})).LIKE="like",n.DISLIKE="dislike",n.PAGE_VIEW="page_view",n.CONTENT_CONSUMED="content_consumed",n.SHARE="share",n.COMMENT="comment",n.CLICK_AD="click_ad",n.CONVERSION="conversion",n.PREDICTION_MADE="prediction_made",n.CONVERT="convert",n.MANAGE_INTERESTS="manage_interests",n.GAME_PARTICIPATION="game_participation",n.ARTICLE_CONSUMED="article_consumed",n.VIDEO_CONSUMED="video_consumed",n.SHORT_VIDEO_CONSUMED="short_video_consumed",n.LONG_VIDEO_CONSUMED="long_video_consumed",n.AUDIO_CONSUMED="audio_consumed",n.GALLERY_CONSUMED="gallery_consumed",n.IMAGE_CONSUMED="image_consumed",n.POLL_PARTICIPATION="poll_participation"},5936:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(1022),o=n(1491),u=n(4630),c=n(8261),l=n(629),d=n(8636);e.default=function(t){var e=this;this.add=function(t,n,a,o){return r(e,void 0,void 0,(function(){var e,r,c,l,d;return i(this,(function(i){switch(i.label){case 0:return this.idSchema==s.IdSchemaEnum.NATIVE?[3,3]:(e=JSON.parse(JSON.stringify(n)),[4,this.activityService.remapTagsIds(n,this.idSchema,s.IdSchemaEnum.NATIVE)]);case 1:return r=i.sent(),c=new u.default(t,r,a,o),[4,this.activityHttps.createActivity(c)];case 2:return(l=i.sent()).context.tags=e,[2,l];case 3:return d=new u.default(t,n,a,o),[2,this.activityHttps.createActivity(d)]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityHttps.deleteActivity(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.LIKE,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.dislike=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.DISLIKE,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addPageview=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.PAGE_VIEW,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addContentConsumed=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CONTENT_CONSUMED,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addShare=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.SHARE,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addComment=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.COMMENT,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addClickAd=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CLICK_AD,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addConversion=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CONVERSION,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,o;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,t&&(t=new l.default(t)),this.idSchema==s.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getOwnActivities(t,n)];case 1:e=i.sent(),r=0,a=e.data,i.label=2;case 2:return r<a.length?(o=a[r],[4,this.activityService.remapTagsIds(o.context.tags,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,e];case 6:return[4,this.activityHttps.getOwnActivities(t,n)];case 7:return[2,i.sent()]}}))}))},this.getForUser=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,o,u;return i(this,(function(i){switch(i.label){case 0:return a=a||!1,n&&(n=new d.default(n)),this.idSchema==s.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getActivitiesForUser(t,n,a)];case 1:e=i.sent(),r=0,o=e.data,i.label=2;case 2:return r<o.length?(u=o[r],[4,this.activityService.remapTagsIds(u.context.tags,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,e];case 6:return[4,this.activityHttps.getActivitiesForUser(t,n,a)];case 7:return[2,i.sent()]}}))}))},this.idSchema=t.idSchema,this.activityHttps=new a.default(t),this.activityService=new c.default(t)}},1517:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2820);e.default=function(){this.id=null,this.profileId=null,this.property=null,this.value=null,this.action=null,this.context=new r.default,this.points=0}},2195:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.page=null,this.limit=null,this.page=t.page?t.page:null,this.limit=t.limit?t.limit:null}},629:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.action=null,n.action=e.action?e.action:null,n}return i(e,t),e.prototype.constructFilterUrl=function(){var t="";return this.action&&(t+="&",t+="action="+this.action),this.page&&(t+="&",t+="page="+this.page),this.limit&&(t+="&",t+="limit="+this.limit),t},e}(n(2195).default);e.default=s},8636:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.action=null,n.action=e.action?e.action:null,n}return i(e,t),e.prototype.constructFilterUrl=function(){var t="";return this.action&&(t+="&",t+="action="+this.action),this.page&&(t+="&",t+="page="+this.page),this.limit&&(t+="&",t+="limit="+this.limit),t},e}(n(2195).default);e.default=s},6021:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569),i=n(1517);e.default=function(){this.meta=new r.default,this.data=[new i.default]}},2820:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content=null,this.tags=[],this.campaign=null}},4630:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2820);e.default=function(t,e,n,i){this.action=null,this.context=new r.default,this.action=t,this.context.tags=e,n&&(this.context.content=n),i&&(this.context.campaign=i)}},2453:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(7974),s=n(1316),a=n(9826),o=n(1517),u=n(6021);e.default=function(){var t=this;this.remapSingleResponse=function(t){var e=new o.default;return e.id=t.id,e.profileId=t.profile_id,e.property=t.property,e.value=t.value,e.action=t.action,e.context.content=t.context.content,e.context.tags=t.context.tags,e.context.campaign=t.context.campaign,e.points=t.points,e},this.remapActivitiesResponse=function(e){var n=new u.default;return n.meta.pagination.currentPage=e.meta.pagination.current_page,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.numberOfPages=e.meta.pagination.number_of_pages,n.meta.pagination.totalItems=e.meta.pagination.total_items,n.data=e.data.map((function(e){return t.remapSingleResponse(e)})),n},this.remapStatsReponse=function(e){var n=new s.default;return n.profileId=e.profile_id,n.tier=e.tier,n.points=e.points,n.successRates.overallPercent=e.success_rates.overall_percent,n.successRates.byFootballCompetition=t.constructNewRecord(e.success_rates.by_competition),n.successRates.byFootballTeam=t.constructNewRecord(e.success_rates.by_team),n.successRates.byFootballMarket=t.constructNewRecord(e.success_rates.by_market),n},this.constructNewRecord=function(e){var n;return Object.entries(e).length?(Object.entries(e).forEach((function(e){var s,a=e[0],o=e[1];n=r(r({},n),((s={})[a]=t.remapSuccessRatePercent(o),s)),i.MarketEnum[a]&&delete n[a].model})),n):e},this.remapSuccessRatePercent=function(t){var e=new a.default;return e.successRatePercent=t.success_rate_percent,e}}},8261:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900);e.default=function(t){var e=this;this.remapTagsIds=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return t&&t.length?(e={},r={},a=[],t.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],r[t.type]=[]),e[t.type].push(t.id),r[t.type].push(t)})),[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,n,s)]):[2,t];case 1:for(o=i.sent(),u=function(t,e){e.forEach((function(e,n){e.id=o[t][n],a.push(e)}))},c=0,l=Object.entries(r);c<l.length;c++)d=l[c],h=d[0],p=d[1],u(h,p);return[2,a]}}))}))},this.idSchema=t.idSchema,this.idMapping=new s.default(t)}},7e3:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(2754);e.default=function(t,e,n){var a=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCompetitionsIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,8,,9]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+t.countryId],"country","native")]:[3,2]:[3,5];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),t.competitionIds=a.competition,i.label=4;case 4:if(n)return[2,[]];i.label=5;case 5:return[4,this.getCompetitions(t,e)];case 6:return o=i.sent(),[4,this.idMapping.remapEntities(o,"competition")];case 7:return[2,i.sent()];case 8:throw u=i.sent(),console.warn("There was a problem browsing all of the competitions",u),u;case 9:return[2]}}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new s.default({competitionIds:t,limit:n}),[4,this.getCompetitions(r)];case 1:return(a=i.sent()).sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(a,"competition")];case 2:return o=i.sent(),t.forEach((function(t,n){return e.set(t,o[n])})),[2,e]}}))}))},this.getCompetitions=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:if(n=null,e=e||!1,!this.isBrowser)return[3,6];if(this.localStorage.getCompetitionsLength())return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.https.getCompetitions()];case 2:return n=i.sent(),[3,4];case 3:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 4:this.localStorage.setCompetitions(n),i.label=5;case 5:return[2,this.localStorage.getCompetitions(t)];case 6:return[2,this.https.getCompetitions(t,e)]}}))}))},this.getCompetitionByIdIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"competition","native")];case 1:return n=i.sent(),r=n.competition[0],[4,this.getCompetitionById(r,e)];case 2:return s=i.sent(),[4,this.idMapping.remapEntities(s,"competition")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following competition:"+t,a),a;case 5:return[2]}}))}))},this.getCompetitionById=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getCompetitionById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the competition with the following id: "+t,n),n;case 3:return[2]}}))}))},this.getTopCompetitionsIdMapping=function(t){return r(a,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopCompetitions(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"competition")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top competitions",n),n;case 4:return[2]}}))}))},this.getTopCompetitions=function(t){return r(a,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopCompetitions(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top competitions",e),e;case 3:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.idMapping=n,this.https=e}},8350:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,i){var s=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCountriesWithIdMapping=function(t){return n(s,void 0,void 0,(function(){var e,n;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getCountries(t)];case 1:return e=r.sent(),[2,this.idMapping.remapEntities(e,"country")];case 2:throw n=r.sent(),console.warn("There was a problem browsing countries as football entities",n),n;case 3:return[2]}}))}))},this.getCountries=function(t){return n(s,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return t=t||!1,this.isBrowser?(e=this.localStorage.getFootballCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return r.trys.push([1,3,,4]),[4,this.https.getCountries(t)];case 2:return n=r.sent(),this.localStorage.setFootballCountries(n),[2,n];case 3:throw i=r.sent(),console.warn("There was a problem retrieving countries as football entities",i),i;case 4:return[3,6];case 5:return[2,this.https.getCountries(t)];case 6:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.idMapping=i,this.https=e}},4289:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8350),a=n(7e3),o=n(9693),u=n(4272),c=n(4545),l=n(2140);e.default=function(t,e,n,d){var h=this;this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=null,this.getCountries=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.countriesFacade.getCountriesWithIdMapping(t)]}))}))},this.getCompetitions=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionsIdMapping(t,e)]}))}))},this.getCompetitionById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(t,e)]}))}))},this.getTopCompetitions=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.competitionsFacade.getTopCompetitionsIdMapping(t)]}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.competitionsFacade.getCompetitionsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamsIdMapping(t,e)]}))}))},this.getTeamById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamByIdIdMapping(t,e)]}))}))},this.getTopTeams=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.teamsFacade.getTopTeamsIdMapping(t)]}))}))},this.getNextMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(t,e)]}))}))},this.getPrevMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(t,e)]}))}))},this.getTeamsMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.teamsFacade.getTeamsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayersIdMapping(t,e)]}))}))},this.getPlayerById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayerIdMapping(t,e)]}))}))},this.getTopPlayers=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getTopPlayersIdMapping(t)]}))}))},this.getNextMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(t,e)]}))}))},this.getPrevMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(t,e)]}))}))},this.getPlayersMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getPlayersMapWithNativeIds(t)]}))}))},this.getMatches=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchesIdMapping(t,e)]}))}))},this.getMatchById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchIdMapping(t,e)]}))}))},this.search=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.searchFacade.searchIdMapping(t,e)]}))}))},this.countriesFacade=new s.default(e,n,d),this.competitionsFacade=new a.default(e,n,d),this.teamsFacade=new o.default(t,n,d),this.playerFacade=new u.default(t,n,d),this.matchFacade=new c.default(t,n,d),this.searchFacade=new l.default(n,d)}},4545:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(712),o=n(6134),u=n(9582);e.default=function(t,e,n){var c=this;this.https=null,this.idMapping=null,this.footballService=null,this.getMatchesIdMapping=function(t,e){return r(c,void 0,void 0,(function(){var n,r,a,u,c,l,d,h;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,12,,13]),t?(t=new o.default(t)).countryIds?[4,this.idMapping.getEntityIdsBySchemaId(t.countryIds,"country","native")]:[3,2]:[3,8];case 1:n=i.sent(),t.countryIds=n.country,i.label=2;case 2:return t.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:r=i.sent(),t.competitionIds=r.competition,i.label=4;case 4:return t.matchIds?[4,this.idMapping.getEntityIdsBySchemaId(t.matchIds,"match","native")]:[3,6];case 5:a=i.sent(),t.matchIds=a.match,i.label=6;case 6:return t.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,8];case 7:u=i.sent(),t.teamIds=u.team,i.label=8;case 8:return[4,this.getMatches(t,e)];case 9:return c=i.sent(),l=c,[4,this.footballService.setAvailableMarketsForMatch(s([],c.data,!0))];case 10:return l.data=i.sent(),d=c,[4,this.idMapping.remapEntities(c.data,"match")];case 11:return d.data=i.sent(),[2,c];case 12:throw h=i.sent(),console.warn("There was a problem browsing the matches",h),h;case 13:return[2]}}))}))},this.getMatchesWithNativeIds=function(t){return r(c,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new o.default({matchIds:t,limit:e}),[4,this.getMatches(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"match")];case 2:return[2,i.sent()]}}))}))},this.getMatchesMapWithNativeIds=function(t){return r(c,void 0,void 0,(function(){var e,n,r,s,u,c;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,a.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getMatchesWithNativeIds(n)];case 1:return r=i.sent(),n.length===r.length?[3,3]:(s=new o.default({matchIds:n,limit:n.length}),[4,this.getMatches(s)]);case 2:u=i.sent(),c=n.filter((function(t){if(u.data.every((function(e){return e.id!==t})))return t})),n=n.filter((function(t){if(!c.includes(t))return t})),i.label=3;case 3:return n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getMatches=function(t,e){return r(c,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getMatches(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the matches",n),n;case 3:return[2]}}))}))},this.getMatchIdMapping=function(t,e){return r(c,void 0,void 0,(function(){var n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,this.idMapping.getEntityIdsBySchemaId([t],"match","native")];case 1:return n=i.sent(),[4,this.getMatchById(n.match[0],e)];case 2:return r=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(r)];case 3:return s=i.sent(),[4,this.idMapping.remapEntities(s,"match")];case 4:return[2,i.sent()];case 5:throw a=i.sent(),console.warn("There was a problem browsing the following match: "+t,a),a;case 6:return[2]}}))}))},this.getMatchById=function(t,e){return r(c,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getMatchById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following match: "+t,n),n;case 3:return[2]}}))}))},this.https=e,this.idMapping=n,this.footballService=new u.default(t)}},4272:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(6477),a=n(712),o=n(9582);e.default=function(t,e,n){var u=this;this.https=null,this.footballService=null,this.idMapping=null,this.getPlayersIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([t.countryId],"country","native")]:[3,2]:[3,7];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.playerIds?[4,this.idMapping.getEntityIdsBySchemaId(t.playerIds,"player","native")]:[3,4];case 3:0===(a=i.sent()).player.length&&(n=!0),t.playerIds=a.player,i.label=4;case 4:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,6];case 5:0===(o=i.sent()).competition.length&&(n=!0),t.scope=o.competition,i.label=6;case 6:if(n)return[2,[]];i.label=7;case 7:return[4,this.getPlayers(t,e)];case 8:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"player")];case 9:return c.data=i.sent(),[2,u];case 10:throw l=i.sent(),console.warn("There was a problem browsing the players",l),l;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(t){return r(u,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new s.default({playerIds:t,limit:e}),[4,this.getPlayers(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"player")];case 2:return[2,i.sent()]}}))}))},this.getPlayersMapWithNativeIds=function(t){return r(u,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,a.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getPlayersWithNativeIds(n)];case 1:return r=i.sent(),n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getPlayers=function(t,e){return r(u,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getPlayers(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the players",n),n;case 3:return[2]}}))}))},this.getPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),[4,this.getPlayerById(n.player[0],e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"player")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following player:"+t,s),s;case 5:return[2]}}))}))},this.getPlayerById=function(t,e){return r(u,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getPlayerById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following player: "+t,n),n;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(t){return r(u,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopPlayers(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"player")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top players",n),n;case 4:return[2]}}))}))},this.getTopPlayers=function(t){return r(u,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopPlayers(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top players",e),e;case 3:return[2]}}))}))},this.getNextMatchForPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getNextMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the next match for player:"+t,s),s;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(t,e){return r(u,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for player: "+t,r),r;case 4:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getPrevMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the previous match for player:"+t,s),s;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(t,e){return r(u,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for player: "+t,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new o.default(t)}},2140:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(604);e.default=function(t,e){var n=this;this.https=null,this.idMapping=null,this.searchIdMapping=function(t,e){return r(n,void 0,void 0,(function(){var n,r,a,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),(t=new s.default(t)).scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,2];case 1:n=i.sent(),t.scope=n.competition,i.label=2;case 2:return[4,this.search(t,e)];case 3:return(r=i.sent()).teams&&r.teams.length>0?[4,this.idMapping.remapEntities(r.teams,"team")]:[3,5];case 4:a=i.sent(),r.teams=a,i.label=5;case 5:return r.players&&r.players.length>0?[4,this.idMapping.remapEntities(r.players,"player")]:[3,7];case 6:o=i.sent(),r.players=o,i.label=7;case 7:return r.competitions&&r.competitions.length>0?[4,this.idMapping.remapEntities(r.competitions,"competition")]:[3,9];case 8:u=i.sent(),r.competitions=u,i.label=9;case 9:return[2,r];case 10:throw c=i.sent(),console.warn("There was a problem with browsing the search result",c),c;case 11:return[2]}}))}))},this.search=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.https.search(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the search response",n),n;case 3:return[2]}}))}))},this.https=t,this.idMapping=e}},9693:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(9920),a=n(9582);e.default=function(t,e,n){var o=this;this.footballService=null,this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+t.countryId],"country","native")]:[3,2]:[3,6];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),t.scope=a.competition,i.label=4;case 4:return t.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,6];case 5:0===(o=i.sent()).team.length&&(n=!0),t.teamIds=o.team,i.label=6;case 6:return n?[2,[]]:[4,this.getTeams(t,e)];case 7:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"team")];case 8:return c.data=i.sent(),[2,u];case 9:throw l=i.sent(),console.warn("There was a problem browsing all teams",l),l;case 10:return[2]}}))}))},this.getTeamsMapWithNativeIds=function(t){return r(o,void 0,void 0,(function(){var e,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new s.default({teamIds:t,limit:n}),[4,this.getTeams(r)];case 1:return(a=i.sent().data).sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(a,"team")];case 2:return o=i.sent(),t.forEach((function(t,n){return e.set(t,o[n])})),[2,e]}}))}))},this.getTeams=function(t,e){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTeams(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving all teams",n),n;case 3:return[2]}}))}))},this.getTeamByIdIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getTeamById(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"team")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following team:"+t,s),s;case 5:return[2]}}))}))},this.getTeamById=function(t,e){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTeamById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following team: "+t,n),n;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(t){return r(o,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopTeams(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"team")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top teams",n),n;case 4:return[2]}}))}))},this.getTopTeams=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopTeams(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top teams",e),e;case 3:return[2]}}))}))},this.getNextMatchForTeamIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getNextMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the next match for the following team:"+t,s),s;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(t,e){return r(o,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for the following team: "+t,r),r;case 4:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getPrevMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the previous match for the following team:"+t,s),s;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(t,e){return r(o,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for the following team: "+t,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new a.default(t)}},8808:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),a=n(5601),o=n(595),u=n(4289);e.default=function(t){var e=this;this.https=null,this.idMapping=null,this.localStorage=null,this.footballFacade=null,this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getCompetitions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getCompetitionById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitionById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopCompetitions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopCompetitions(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeams(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTeamById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeamById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopTeams=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopTeams(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayers(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayerById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayerById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopPlayers=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopPlayers(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatchById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatchById(t,n)];case 1:return[2,e.sent()]}}))}))},this.search=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.search(t,n)];case 1:return[2,e.sent()]}}))}))},this.https=new o.default(t),this.idMapping=new s.default(t),this.localStorage=new a.default(t),this.footballFacade=new u.default(t,this.localStorage,this.https,this.idMapping)}},6975:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name=""}},2754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryId=null,this.name=null,this.gender=null,this.type=null,this.sortField=null,this.sortOrder=null,this.competitionIds=null,this.constructFilterUrl=function(){var t="";return e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.gender&&(t=(t+="&")+"gender="+e.gender),e.type&&(t=(t+="&")+"type="+e.type),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),e.name&&(t=(t+="&")+"name="+e.name),e.competitionIds&&(t=(t+="&")+"competition_ids="+e.competitionIds.join(",")),t},this.competitionSearchFilter=function(t){try{var n=e.filter(t);return e.sortField||e.sortOrder?e.sort(n):n}catch(t){return console.warn("There was a problem filtering the local competitions",t),[]}},this.filter=function(t){var n=e.entitiesToSearchWith();return t.filter((function(t){var r=!0;return n.forEach((function(n){"sortOrder"!==n&&"sortField"!==n&&("countryId"===n?r&&(r=t.country.id===e[n]):"name"===n?r&&(r=t.name.toLocaleLowerCase().includes(e[n].toLocaleLowerCase())):"competitionIds"===n?r&&(r=e[n].some((function(e){return t.id===e}))):r&&(r=t[n].toLocaleLowerCase()===e[n].toLocaleLowerCase()))})),r}))},this.entitiesToSearchWith=function(){var t=[];return e.countryId&&t.push("countryId"),e.name&&t.push("name"),e.gender&&t.push("gender"),e.type&&t.push("type"),e.sortField&&t.push("sortField"),e.sortOrder&&t.push("sortOrder"),e.competitionIds&&t.push("competitionIds"),t},this.sort=function(t){var n=[];return"name"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.name.localeCompare(t.name):t.name.localeCompare(n.name)})):"country"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.country.name.localeCompare(t.country.name):t.country.name.localeCompare(n.country.name)})):"scope"===e.sortField?t.forEach((function(t){return n[e.competitionIds.indexOf(t.id)]=t})):e.sortField||"desc"!==e.sortOrder||(n=t.sort((function(t,e){return e.id.localeCompare(t.id)}))),n},this.countryId=t.countryId?""+t.countryId:null,this.name=t.name?t.name:null,this.gender=t.gender?t.gender:null,this.type=t.type?t.type:null,this.sortField=t.sortField?""+t.sortField:null,this.sortOrder=t.sortOrder?""+t.sortOrder:null,this.competitionIds=t.competitionIds?t.competitionIds:null}},3321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name="",this.participants=[]}},7316:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6975),i=n(3430),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.type=t.type,e.name=t.name,e}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=s},8758:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3321),i=n(3430),s=n(5827),a=function(){function t(){this.countryRemapper=null,this.teamBasicRemapper=null,this.countryRemapper=new i.default,this.teamBasicRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.type=t.type,n.name=t.name,n.participants=t.participants.map((function(t){return e.teamBasicRemapper.fromResponse(t)})),n}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=a},4427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.alias="",this.countryCode="",this.assets=null,this.name=""}},3430:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4427);e.default=function(){var t=this;this.countriesFromResponse=function(e){if(e)return e.map((function(e){return t.countryFromResponse(e)}))},this.countryFromResponse=function(t){try{if(t){var e=new r.default;return e.id=t.id,e.alias=t.alias,e.assets=t.assets,e.countryCode=t.country_code,e.name=t.name,e}}catch(t){throw t}return null}}},8470:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.homeTeam={players:[]},this.awayTeam={players:[]}}},3098:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8470),i=n(3550),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new i.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.default;return n.homeTeam.players=t.home_team&&t.home_team.players?t.home_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.awayTeam.players=t.away_team&&t.away_team.players?t.away_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping the lineups",t),t}},t}();e.default=s},2579:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.homeTeam=null,this.awayTeam=null,this.isDeleted=!1,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.context={competition:null},this.status={type:null,subType:null}}},6134:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryIds=null,this.competitionIds=null,this.matchIds=null,this.status=null,this.teamIds=null,this.fromDate=null,this.toDate=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var t="";return e.countryIds&&(t=(t+="&")+"countries="+e.countryIds.join(",")),e.competitionIds&&(t=(t+="&")+"competitions="+e.competitionIds.join(",")),e.matchIds&&(t=(t+="&")+"matches="+e.matchIds.join(",")),e.status&&(t=(t+="&")+"status="+e.status),e.teamIds&&(t=(t+="&")+"teams="+e.teamIds.join(",")),e.fromDate&&(t=(t+="&")+"from_date="+e.fromDate),e.toDate&&(t=(t+="&")+"to_date="+e.toDate),e.limit&&(t=(t+="&")+"limit="+e.limit),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),t},this.countryIds=t.countryIds?t.countryIds:null,this.competitionIds=t.competitionIds?t.competitionIds:null,this.matchIds=t.matchIds?t.matchIds:null,this.status=t.status?t.status:null,this.teamIds=t.teamIds?t.teamIds:null,this.fromDate=t.fromDate?t.fromDate:null,this.toDate=t.toDate?t.toDate:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},9661:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899);e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.isDeleted=!1,this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.stats=null,this.context={competition:null},this.timeline=[],this.status=new r.default,this.lineups=null}},5284:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2579),i=n(5827),s=n(7316),a=n(3949),o=function(){function t(){this.teamRemapper=null,this.competitionRemapper=null,this.scoresRemapper=null,this.teamRemapper=new i.default,this.competitionRemapper=new s.default,this.scoresRemapper=new a.default}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.id=t.id,e.kickoffAt=t.kickoff_at,e.finishedAt=t.finished_at,e.updatedAt=t.updated_at,e.isDeleted=t.is_deleted,e.homeTeam=this.teamRemapper.fromResponse(t.home_team),e.awayTeam=this.teamRemapper.fromResponse(t.away_team),e.lineupsConfirmed=t.lineups_confirmed,e.startedAt=t.started_at,e.minute=t.minute,e.scores=this.scoresRemapper.fromResponse(t.scores),e.context={competition:t.context.competition?this.competitionRemapper.fromResponse(t.context.competition):null},e.status={type:t.status.type,subType:t.status.sub_type},e}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=o},9330:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9661),i=n(5827),s=n(7316),a=n(7122),o=n(3949),u=n(3098),c=n(8470),l=n(92),d=function(){function t(){this.teamMapper=null,this.competitionsMapper=null,this.lineupsMapper=null,this.scoresMapper=null,this.statsMapper=null,this.timelineMapper=null,this.teamMapper=new i.default,this.competitionsMapper=new s.default,this.lineupsMapper=new u.default,this.scoresMapper=new o.default,this.statsMapper=new a.default,this.timelineMapper=new l.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.default;return n.id=t.id,n.kickoffAt=t.kickoff_at,n.finishedAt=t.finished_at,n.updatedAt=t.updated_at,n.isDeleted=t.is_deleted,n.homeTeam=t.home_team?this.teamMapper.fromResponse(t.home_team):null,n.awayTeam=t.away_team?this.teamMapper.fromResponse(t.away_team):null,n.lineupsConfirmed=t.lineups_confirmed,n.startedAt=t.started_at,n.minute=t.minute,n.scores=this.scoresMapper.fromResponse(t.scores),n.stats=this.statsMapper.fromResponse(t.stats),n.context={competition:this.competitionsMapper.fromResponse(t.context.competition)},n.timeline=t.timeline?t.timeline.map((function(t){return e.timelineMapper.fromResponse(t)})):[],n.status={type:t.status.type,subType:t.status.sub_type},n.lineups=t.lineups?this.lineupsMapper.fromResponse(t.lineups):new c.default,n}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=d},4652:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.ftScore=null,this.htScore=null,this.aetScore=null,this.aggScore=null,this.penScore=null}},3949:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4652),i=function(){function t(){this.statEntityFromResponse=function(t){return{homeGoals:t.home_goals,awayGoals:t.away_goals}}}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.ftScore=this.statEntityFromResponse(t.ft_score),e.htScore=this.statEntityFromResponse(t.ht_score),e.aetScore=this.statEntityFromResponse(t.aet_score),e.aggScore=this.statEntityFromResponse(t.agg_score),e.penScore=this.statEntityFromResponse(t.pen_score),e}catch(t){throw console.warn("There was a problem remapping the scores",t),t}},t}();e.default=i},7950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.corners=null,this.cornersFirstHalf=null,this.cornersSecondHalf=null,this.cornersExtraTime=null,this.crosses=null,this.crossesFirstHalf=null,this.crossesSecondHalf=null,this.crossesExtraTime=null,this.offside=null,this.offsideFirstHalf=null,this.offsideSecondHalf=null,this.offsideExtraTime=null,this.shotsOn=null,this.shotsOnFirstHalf=null,this.shotsOnSecondHalf=null,this.shotsOnExtraTime=null,this.throwIn=null,this.throwInFirstHalf=null,this.throwInSecondHalf=null,this.throwInExtraTime=null,this.redCards=null,this.redCardsFirstHalf=null,this.redCardsSecondHalf=null,this.redCardsExtraTime=null,this.shotsOff=null,this.shotsOffFirstHalf=null,this.shotsOffSecondHalf=null,this.shotsOffExtraTime=null,this.goalKicks=null,this.goalKicksFirstHalf=null,this.goalKicksSecondHalf=null,this.goalKicksExtraTime=null,this.possession=null,this.possessionFirstHalf=null,this.possessionSecondHalf=null,this.possessionExtraTime=null,this.treatments=null,this.treatmentsFirstHalf=null,this.treatmentsSecondHalf=null,this.treatmentsExtraTime=null,this.yellowCards=null,this.yellowCardsFirstHalf=null,this.yellowCardsSecondHalf=null,this.yellowCardsExtraTime=null,this.shotsBlocked=null,this.shotsBlockedFirstHalf=null,this.shotsBlockedSecondHalf=null,this.shotsBlockedExtraTime=null,this.substitutions=null,this.substitutionsFirstHalf=null,this.substitutionsSecondHalf=null,this.substitutionsExtraTime=null,this.counterAttacks=null,this.counterAttacksFirstHalf=null,this.counterAttacksSecondHalf=null,this.counterAttacksExtraTime=null,this.foulsCommitted=null,this.foulsCommittedFirstHalf=null,this.foulsCommittedSecondHalf=null,this.foulsCommittedExtraTime=null}},7122:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7950),i=function(){function t(){this.statEntityFromResponse=function(t){return{homeTeam:t?t.home_team:null,awayTeam:t?t.away_team:null}}}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.corners=this.statEntityFromResponse(t.corners),e.cornersFirstHalf=this.statEntityFromResponse(t.corners_1h),e.cornersSecondHalf=this.statEntityFromResponse(t.corners_2h),e.cornersExtraTime=this.statEntityFromResponse(t.corners_et),e.crosses=this.statEntityFromResponse(t.crosses),e.crossesFirstHalf=this.statEntityFromResponse(t.crosses_1h),e.crossesSecondHalf=this.statEntityFromResponse(t.crosses_2h),e.crossesExtraTime=this.statEntityFromResponse(t.crosses_et),e.offside=this.statEntityFromResponse(t.offside),e.offsideFirstHalf=this.statEntityFromResponse(t.offside_1h),e.offsideSecondHalf=this.statEntityFromResponse(t.offside_2h),e.offsideExtraTime=this.statEntityFromResponse(t.offside_et),e.shotsOn=this.statEntityFromResponse(t.shots_on),e.shotsOnFirstHalf=this.statEntityFromResponse(t.shots_on_1h),e.shotsOnSecondHalf=this.statEntityFromResponse(t.shots_on_2h),e.shotsOnExtraTime=this.statEntityFromResponse(t.shots_on_et),e.throwIn=this.statEntityFromResponse(t.throw_in),e.throwInFirstHalf=this.statEntityFromResponse(t.throw_in_1h),e.throwInSecondHalf=this.statEntityFromResponse(t.throw_in_2h),e.throwInExtraTime=this.statEntityFromResponse(t.throw_in_et),e.redCards=this.statEntityFromResponse(t.red_cards),e.redCardsFirstHalf=this.statEntityFromResponse(t.red_cards_1h),e.redCardsSecondHalf=this.statEntityFromResponse(t.red_cards_2h),e.redCardsExtraTime=this.statEntityFromResponse(t.red_cards_et),e.shotsOff=this.statEntityFromResponse(t.shots_off),e.shotsOffFirstHalf=this.statEntityFromResponse(t.shots_off_1h),e.shotsOffSecondHalf=this.statEntityFromResponse(t.shots_off_2h),e.shotsOffExtraTime=this.statEntityFromResponse(t.shots_off_et),e.goalKicks=this.statEntityFromResponse(t.goal_kicks),e.goalKicksFirstHalf=this.statEntityFromResponse(t.goal_kicks_1h),e.goalKicksSecondHalf=this.statEntityFromResponse(t.goal_kicks_2h),e.goalKicksExtraTime=this.statEntityFromResponse(t.goal_kicks_et),e.possession=this.statEntityFromResponse(t.possession),e.possessionFirstHalf=this.statEntityFromResponse(t.possession_1h),e.possessionSecondHalf=this.statEntityFromResponse(t.possession_2h),e.possessionExtraTime=this.statEntityFromResponse(t.possession_et),e.treatments=this.statEntityFromResponse(t.treatments),e.treatmentsFirstHalf=this.statEntityFromResponse(t.treatments_1h),e.treatmentsSecondHalf=this.statEntityFromResponse(t.treatments_2h),e.treatmentsExtraTime=this.statEntityFromResponse(t.treatments_et),e.yellowCards=this.statEntityFromResponse(t.yellow_cards),e.yellowCardsFirstHalf=this.statEntityFromResponse(t.yellow_cards_1h),e.yellowCardsSecondHalf=this.statEntityFromResponse(t.yellow_cards_2h),e.yellowCardsExtraTime=this.statEntityFromResponse(t.yellow_cards_et),e.shotsBlocked=this.statEntityFromResponse(t.shots_blocked),e.shotsBlockedFirstHalf=this.statEntityFromResponse(t.shots_blocked_1h),e.shotsBlockedSecondHalf=this.statEntityFromResponse(t.shots_blocked_2h),e.shotsBlockedExtraTime=this.statEntityFromResponse(t.shots_blocked_et),e.substitutions=this.statEntityFromResponse(t.substitutions),e.substitutionsFirstHalf=this.statEntityFromResponse(t.substitutions_1h),e.substitutionsSecondHalf=this.statEntityFromResponse(t.substitutions_2h),e.substitutionsExtraTime=this.statEntityFromResponse(t.substitutions_et),e.counterAttacks=this.statEntityFromResponse(t.counter_attacks),e.counterAttacksFirstHalf=this.statEntityFromResponse(t.counter_attacks_1h),e.counterAttacksSecondHalf=this.statEntityFromResponse(t.counter_attacks_2h),e.counterAttacksExtraTime=this.statEntityFromResponse(t.counter_attacks_et),e.foulsCommitted=this.statEntityFromResponse(t.fouls_committed),e.foulsCommittedFirstHalf=this.statEntityFromResponse(t.fouls_committed_1h),e.foulsCommittedSecondHalf=this.statEntityFromResponse(t.fouls_committed_2h),e.foulsCommittedExtraTime=this.statEntityFromResponse(t.fouls_committed_et),e}catch(t){throw console.warn("There was a problem remapping the stats",t),t}},t}();e.default=i},6899:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.subType=null}},9452:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.minute="",this.type="",this.teamId="",this.player=null,this.relatedPlayer=null,this.updatedAt=""}},92:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9452),i=n(3550),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.minute=t.minute,e.type=t.type,e.teamId=t.team_id,e.player=this.playerRemapper.fromResponse(t.player),e.relatedPlayer=t.related_player?this.playerRemapper.fromResponse(t.related_player):null,e.updatedAt=t.updated_at,e}catch(t){throw console.warn("There was a problem remapping timeline",t),t}},t}();e.default=s},753:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569);e.default=function(){this.meta=new r.default,this.data=[]}},3569:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(155);e.default=function(){this.pagination=new r.default}},155:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.currentPage=null,this.itemsPerPage=null,this.totalItems=null,this.numberOfPages=null}},1925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569);e.default=function(){this.remapMetaProp=function(t){var e=new r.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e}}},4426:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.isDeleted=!1,this.teams=[]}},6477:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryId=null,this.scope=null,this.name=null,this.playerIds=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var t="";return e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),e.name&&(t=(t+="&")+"name="+e.name),e.playerIds&&(t=(t+="&")+"player_ids="+e.playerIds.join(",")),e.limit&&(t=(t+="&")+"limit="+e.limit),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),t},this.countryId=t.countryId?t.countryId:null,this.scope=t.scope?t.scope:null,this.name=t.name?t.name:null,this.playerIds=t.playerIds?t.playerIds:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},1837:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.isDeleted=!1,this.competitions=[],this.teams=[]}},4803:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.name="",this.position="",this.assets=null,this.type=""}},9071:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.startDate="",this.endDate="",this.loan=!1,this.position="",this.country=null,this.name="",this.assets=null,this.birthDate=""}},5157:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(4426),s=n(5827),a=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n.isDeleted=t.is_deleted,n}catch(t){throw console.warn("There was a problem remapping players response",t),t}},t}();e.default=a},7943:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(1837),s=n(5827),a=n(7316),o=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.competitionRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default,this.competitionRemapper=new a.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n.isDeleted=t.is_deleted,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping player response",t),t}},t}();e.default=o},3550:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4803),i=function(){function t(){}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.id=t.id,e.name=t.name,e.position=t.position,e.shirtNumber=t.shirt_number,e.assets=t.assets,e.type=t.type,e}catch(t){throw console.warn("There was a problem remapping the player from timeline",t),t}},t}();e.default=i},4085:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(9071),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.startDate=t.start_date,e.endDate=t.end_date,e.shirtNumber=t.shirt_number,e.loan=t.loan,e.position=t.position,e.country=this.countryRemapper.countryFromResponse(t.country),e.name=t.name,e.assets=t.assets,e.birthDate=t.birth_date,e}catch(t){throw console.warn("There was a problem remapping the player from squad",t),t}},t}();e.default=s},4729:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(56),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.firstName=t.first_name?t.first_name:null,e.lastName=t.last_name?t.last_name:null,e.name=t.name?t.name:null,e.birthDate=t.birth_date,e.country=this.countryRemapper.countryFromResponse(t.country),e.assets=t.assets,e.position=t.position,e}catch(t){throw console.warn("There was a problem remapping top player response",t),t}},t}();e.default=s},56:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null}},604:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.entities=null,this.query=null,this.scope=null,this.constructFilterUrl=function(){var t="";return e.entities&&(t=(t+="&")+"entities="+e.entities.join(",")),e.query&&(t=(t+="&")+"q="+e.query),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),t},this.entities=t.entities?t.entities:null,this.query=t.query?t.query:null,this.scope=t.scope?t.scope:null}},6967:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teams=null,this.players=null,this.competitions=null}},7287:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5827),i=n(5157),s=n(7316),a=n(6967),o=function(){function t(){this.teamRemapper=null,this.playerRemapper=null,this.competitionremapper=null,this.teamRemapper=new r.default,this.playerRemapper=new i.default,this.competitionremapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new a.default;return n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.players=t.players?t.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionremapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping search response",t),t}},t}();e.default=o},5827:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(9314),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.code=t.code,e.national=t.national,e.fullName=t.full_name,e.shortName=t.short_name,e.name=t.name,e.isDeleted=t.is_deleted,e}catch(t){throw console.warn("There was a problem remapping teams response",t),t}},t}();e.default=s},7821:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(1986),s=n(4085),a=n(7316),o=function(){function t(){this.countryRemapper=null,this.competitionRemapper=null,this.playerRemapper=null,this.countryRemapper=new r.default,this.competitionRemapper=new a.default,this.playerRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.code=t.code,n.national=t.national,n.fullName=t.full_name,n.shortName=t.short_name,n.name=t.name,n.isDeleted=t.is_deleted,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n.colors=t.colors?t.colors:n.colors,n.squad=t.squad?t.squad.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping team response",t),t}},t}();e.default=o},9314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.code="",this.national=!1,this.fullName="",this.shortName="",this.isDeleted=!1}},3773:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primary=null,this.secondary=null,this.tertiary=null}},9920:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.name=null,this.countryId=null,this.national=!1,this.gender=null,this.limit=null,this.page=null,this.scope=null,this.sortField=null,this.sortOrder=null,this.teamIds=null,this.constructFilterUrl=function(){var t="";return e.name&&(t=(t+="&")+"name="+e.name),e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.national&&(t=(t+="&")+"national="+e.national),e.gender&&(t=(t+="&")+"gender="+e.gender),e.limit&&(t=(t+="&")+"limit="+e.limit),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),e.teamIds&&(t=(t+="&")+"team_ids="+e.teamIds.join(",")),t},this.name=t.name?t.name:null,this.countryId=t.countryId?""+t.countryId:null,this.national=!!t.national&&t.national,this.gender=t.gender?t.gender:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.scope=t.scope?t.scope:null,this.sortField=t.sortField?""+t.sortField:null,this.sortOrder=t.sortOrder?""+t.sortOrder:null,this.teamIds=t.teamIds?t.teamIds:null}},1986:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3773);e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.competitions=[],this.code="",this.national=!1,this.fullName="",this.shortName="",this.isDeleted=!1,this.colors=new r.default,this.squad=[]}},9582:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7686);e.default=function(t){var e=this;this.clientHttps=null,this.setAvailableMarketsForMatch=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.clientHttps.getConfig(s.FeatureConfigType.PREDICTOR)];case 1:return e=i.sent(),n=e.fullCoverageCompetitions,r=e.markets,Array.isArray(t)?[2,t.map((function(t){return a.setAvailableMarkets(t,n,r)}))]:"object"==typeof t&&Object.keys(t).length?[2,this.setAvailableMarkets(t,n,r)]:[2]}}))}))},this.setAvailableMarkets=function(t,n,r){var i,s=null===(i=t.context.competition)||void 0===i?void 0:i.id;return s&&e.isMatchInCoverageCompetition(s,n)?(t.availableMarkets=r.all,t):(t.availableMarkets=r.main,t)},this.isMatchInCoverageCompetition=function(t,e){var n=!1;return e.includes(t)?n=!0:n},this.clientHttps=new s.default(t)}},3822:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),o=n(7686),u=n(3142),c=n(7232),l=n(1139),d=n(9502),h=n(8900),p=n(1859),f=n(2793);e.default=function(t,e,n,m,v){var y=this;this.config=null,this.clientHttps=null,this.loyaltyHttps=null,this.loyaltyService=null,this.profileFacade=null,this.loyaltyValidator=null,this.idMapping=null,this.topXFacade=null,this.matchQuizFacade=null,this.predictorHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(y,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.LOYALTY)];case 1:return[2,t.sent()]}}))}))},this.getClientBadges=function(){return r(y,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getConfig()];case 1:return t=e.sent(),[2,this.loyaltyService.buildClientBadges(t.rewards.badges)]}}))}))},this.getTemplates=function(t){return r(y,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=!0,this.config.idSchema!==a.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyHttps.getTemplates(t,e)];case 1:return[2,i.sent()];case 2:return[4,this.loyaltyHttps.getTemplates(t,e)];case 3:return n=i.sent(),r=n,[4,this.loyaltyService.remapTemplatesIds(s([],n.data,!0))];case 4:return r.data=i.sent(),[2,n]}}))}))},this.getTemplateById=function(t,e){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.loyaltyHttps.getTemplateById(t,e)];case 1:return n=r.sent(),this.config.idSchema===a.IdSchemaEnum.NATIVE?[2,n]:[4,this.loyaltyService.remapTemplatesIds([n])];case 2:return[2,r.sent()[0]]}}))}))},this.getLeaderboard=function(t,e,n){return r(y,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"loyalty"),[4,this.loyaltyHttps.getLeaderboard(t,n,e)];case 1:return r=i.sent(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForGame=function(t,e,n){return r(y,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"loyalty"),[4,this.loyaltyHttps.getLeaderboardForGame(t,n,e)];case 1:return r=i.sent(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getOwnRankings=function(t,e){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.getOwn()];case 1:return n=r.sent().id,[2,this.getUserRankings(n,t,e)]}}))}))},this.getUserRankings=function(t,e,n){return r(y,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"rankings"),[4,this.loyaltyHttps.getUserRankings(t,e,n)];case 1:return r=i.sent(),[4,this.getModelsForUserRankings(r)];case 2:return[2,i.sent()]}}))}))},this.getHighestSuccessRate=function(t,e){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t&&this.loyaltyValidator.validateMarket(this.errorHandlingMode,t),[4,this.loyaltyHttps.getHighestSuccessRate(t,e)];case 1:return n=r.sent(),[2,this.loyaltyService.addProfileModelToHighestSuccessRate(n)]}}))}))},this.getTemplateWinners=function(t){return r(y,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getTemplateById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.loyaltyService.completeContestWinners(e)]}}))}))},this.getEntitiesFollows=function(t,e){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.loyaltyService.validateEntitiesFollowsFilters(t),this.config.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyService.remapEntitiesFollowsFilters(t)];case 1:t=r.sent(),r.label=2;case 2:return[4,this.loyaltyHttps.getEntitiesFollows(t,e)];case 3:return n=r.sent(),[4,this.loyaltyService.addModelsToEntitiesFollows(n)];case 4:return[2,r.sent()]}}))}))},this.getModelsForUserRankings=function(t){return r(y,void 0,void 0,(function(){var e,n,r,s,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return e=null,n=null,r=null,s=this.loyaltyService.extractRankingsIdsMap(t.data),a=s[0],o=s[1],(u=s[2]).length?[4,this.getTemplates()]:[3,2];case 1:c=i.sent(),e=c.data.filter((function(t){return u.includes(t.id)})),i.label=2;case 2:return a.length?(l={gameIds:a},[4,this.topXFacade.getGames(l)]):[3,4];case 3:d=i.sent(),n=d.data,i.label=4;case 4:return o.length?(h={gameIds:o},[4,this.matchQuizFacade.getGames(h)]):[3,6];case 5:p=i.sent(),r=p.data,i.label=6;case 6:return[2,this.loyaltyService.setModelsForUserRankings(n,r,e,t)]}}))}))},this.config=t,this.clientHttps=e,this.loyaltyHttps=n,this.profileFacade=new c.default(v,m),this.loyaltyService=new u.default(this.config),this.loyaltyValidator=new l.default,this.idMapping=new h.default(t),this.topXFacade=new d.default(t,this.idMapping),this.matchQuizFacade=new p.default(t),this.predictorHttps=new f.default(t,this.idMapping),this.errorHandlingMode=t.errorHandlingMode}},2962:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7686),a=n(7059),o=n(3822),u=n(4275),c=n(5601);e.default=function(t){var e=this;this.clientHttps=null,this.profileHttps=null,this.loyaltyHttps=null,this.loyaltyFacade=null,this.localStorage=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getClientBadges=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getClientBadges()];case 1:return[2,t.sent()]}}))}))},this.getTemplates=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplates(t)];case 1:return[2,e.sent()]}}))}))},this.getTemplateById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboard=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboard(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForGame=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboardForGame(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getOwnRankings=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getOwnRankings(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserRankings=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getUserRankings(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getHighestSuccessRate=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getHighestSuccessRate(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTemplateWinners=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateWinners(t)];case 1:return[2,e.sent()]}}))}))},this.getEntitiesFollows=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getEntitiesFollows(t,n)];case 1:return[2,e.sent()]}}))}))},this.clientHttps=new s.default(t),this.profileHttps=new u.default(t),this.loyaltyHttps=new a.default(t),this.localStorage=new c.default(t),this.loyaltyFacade=new o.default(t,this.clientHttps,this.loyaltyHttps,this.profileHttps,this.localStorage)}},8153:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},5111:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8153);e.default=function(){this.value=[new r.default]}},8608:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=[],this.predictor=[],this.topX=[],this.matchQuiz=[]}},246:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1429);e.default=function(){this.requirements=new r.default}},8687:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},1429:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.gameParticipationCount=null,this.entityId=null,this.entityType=null,this.predictionsMade=null,this.correctPredictions=null}},515:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5111),i=n(4226);e.default=function(){this.enabled=!1,this.conditions={list:null},this.actions=new r.default,this.rewards=new i.default}},7910:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=null,this.page=null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit="+this.limit),this.page&&(t+="&",t+="page="+this.page),t},t}();e.default=n},4996:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.sortOrder=null,n.rankType=null,n.leaderboardIds=null,n.gameType=null,n.constructFiltersUrl=function(){var e=t.prototype.constructFiltersUrl.call(n);return n.sortOrder&&(e+="&",e+="sort_order="+n.sortOrder),n.rankType&&(e+="&",e+="rank_type="+n.rankType),n.leaderboardIds&&(e+="&",e+="type_ids="+n.leaderboardIds.join(",")),n.gameType&&(e+="&",e+="game_type="+n.gameType),e},n.sortOrder=e.sortOrder,n.rankType=e.rankType,n.leaderboardIds=e.leaderboardIds,n.gameType=e.type&&"game"===e.type.toLowerCase()?e.gameType:null,n}return i(e,t),e}(n(7910).default);e.default=s},6507:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.points=null,this.predictionsMade=null,this.profileId=null,this.profileModel=null,this.successRatePercent=null}},7746:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6507);e.default=function(){this.remapHighestSuccessRate=function(t){return t.map((function(t){var e=new r.default;return e.position=t.position,e.points=t.points,e.predictionsMade=t.predictions_made,e.profileId=t.profile_id,e.successRatePercent=t.success_rate_percent,e}))}}},9642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.profileId=null,this.profileModel=null,this.points=null,this.predictionsMade=null}},7419:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5828),i=n(9642);e.default=function(){var t=this;this.remapResponse=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapMeta=function(t){var e=new r.default;return e.rankType=t.rank_type,e.fromDate=t.from_date,e.toDate=t.to_date,e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e},this.remapData=function(t){var e=[];return t.forEach((function(t){var n=new i.default;n.position=t.position,n.profileId=t.profile_id,n.points=t.points,n.predictionsMade=t.predictions_made,e.push(n)})),e}}},5828:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(155);e.default=function(){this.rankType=null,this.fromDate=null,this.toDate=null,this.pagination=new r.default}},4187:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=null,this.comments=null,this.predictor=null,this.activity=null,this.topX=null,this.matchQuiz=null}},9013:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.id=null,e.rankType=null,e.model=null,e.gameType=null,e}return i(e,t),e}(n(9642).default);e.default=s},4533:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569),i=n(9013),s=function(){function t(){var t=this;this.remapRankings=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapMeta=function(t){var e=new r.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.numberOfPages=t.pagination.number_of_pages,e.pagination.totalItems=t.pagination.total_items,e}}return t.prototype.remapData=function(t){var e=[];return t.forEach((function(t){var n=new i.default;n.id=t.id,n.rankType=t.rank_type,n.position=t.position,n.points=t.points,n.gameType=t.game_type,delete n.profileId,delete n.profileModel,delete n.predictionsMade,e.push(n)})),e},t}();e.default=s},4226:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.tiers=null,this.badges=null}},4982:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labels=null,e.customFields=null,e}return i(e,t),e}(n(194).default);e.default=s},194:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(439);e.default=function(){this.id=null,this.name=null,this.description=null,this.type=null,this.fromDate=null,this.toDate=null,this.markets=[],this.teamIds=[],this.matchIds=[],this.gameIds=[],this.gameTypes=[],this.competitionIds=[],this.excludedProfileIds=[],this.rules=null,this.flags=null,this.images=new r.default,this.status=null,this.automaticallyChangeStatus=!0,this.createdAt=null,this.updatedAt=null,this.related=null}},8899:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3483),i=n(4982),s=n(194);e.default=function(){var t=this;this.remapResponse=function(e){var n=[];return e.forEach((function(e){var r=new s.default;r.id=e.id,r.name=e.name,r.description=e.description,r.type=e.type,r.fromDate=e.from_date,r.toDate=e.to_date,r.markets=e.markets?e.markets:null,r.teamIds=e.team_ids?e.team_ids:null,r.matchIds=e.match_ids?e.match_ids:null,r.gameIds=e.game_ids?e.game_ids:null,r.gameTypes=e.game_types?e.game_types:null,r.competitionIds=e.competition_ids?e.competition_ids:null,r.excludedProfileIds=e.excluded_profile_ids?e.excluded_profile_ids:null,r.rules=e.rules?e.rules:null,r.flags=e.flags?e.flags:null,r.images=e.images?e.images:null,r.status=e.status?e.status:null,r.automaticallyChangeStatus=e.automatically_change_status,r.createdAt=e.created_at,r.updatedAt=e.updated_at,r.related=e.related?t.remapRelated(e.related):null,n.push(r)})),n},this.remapResponseId=function(e){var n=new i.default;return n.id=e.id,n.name=e.name,n.description=e.description,n.type=e.type,n.fromDate=e.from_date,n.toDate=e.to_date,n.markets=e.markets?e.markets:null,n.teamIds=e.team_ids?e.team_ids:null,n.matchIds=e.match_ids?e.match_ids:null,n.gameIds=e.game_ids?e.game_ids:null,n.gameTypes=e.game_types?e.game_types:null,n.competitionIds=e.competition_ids?e.competition_ids:null,n.excludedProfileIds=e.excluded_profile_ids?e.excluded_profile_ids:null,n.rules=e.rules?e.rules:null,n.flags=e.flags?e.flags:null,n.images=e.images?e.images:null,n.status=e.status?e.status:null,n.automaticallyChangeStatus=e.automatically_change_status,n.related=e.related?t.remapRelated(e.related):null,n.labels=e.labels,n.customFields=e.custom_fields,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapMeta=function(t){var e={};return e.totalItems=t.pagination.total_items,e},this.remapRelated=function(t){return t.map((function(t){var e=new r.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))}}},3142:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),o=n(4021),u=n(4904),c=n(8097),l=n(2535),d=n(5318),h=n(8900),p=n(8808),f=n(6409),m=n(8687),v=n(7910),y=n(4996);e.default=function(t){var e=this;this.idMappingService=null,this.profileNamespace=null,this.footballNamespace=null,this.errorHandlingMode=null,this.remapTemplatesIds=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],n=[],r=[],t.forEach((function(t){t.teamIds&&t.teamIds.length>0?e=s(s([],e,!0),t.teamIds,!0):t.matchIds&&t.matchIds.length>0?n=s(s([],n,!0),t.matchIds,!0):t.competitionIds&&t.competitionIds.length>0&&(r=s(s([],r,!0),t.competitionIds,!0))})),a={team:e,match:n,competition:r},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(a,"native",this.idMappingService.idSchema)]):[3,2];case 1:return o=i.sent(),s([],o.team,!0),s([],o.match,!0),s([],o.competition,!0),t.forEach((function(t){t.teamIds&&t.teamIds.length>0?t.teamIds=t.teamIds.map((function(t){return o.team.shift()})):t.matchIds&&t.matchIds.length>0?t.matchIds=t.matchIds.map((function(t){return o.match.shift()})):t.competitionIds&&t.competitionIds.length>0&&(t.competitionIds=t.competitionIds.map((function(t){return o.competition.shift()})))})),[2,t];case 2:return[2,t]}}))}))},this.addProfileModelToLeaderboad=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],(n=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(n)]:[2,t]):[3,2];case 1:return r=i.sent(),t.forEach((function(t){r.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t.profileModel||(t.profileModel=null),e.push(t)})),[2,e];case 2:return[2,t]}}))}))},this.buildClientBadges=function(t){var n=new m.default;return n.general=e.extractEnabledBadgesId(t.general),n.predictor=e.extractEnabledBadgesId(t.predictor),n.topX=e.extractEnabledBadgesId(t.topX),n.matchQuiz=e.extractEnabledBadgesId(t.matchQuiz),n},this.initFilters=function(t,e){switch(e){case"loyalty":t&&(t=new v.default(t));break;case"rankings":t&&(t=new y.default(t))}return t},this.addProfileModelToHighestSuccessRate=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(e)]:[2,t];case 1:return n=r.sent(),[2,t.map((function(t){return n.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t}))]}}))}))},this.extractRankingsIdsMap=function(t){var e=[],n=[],r=[];return t.forEach((function(t){"GAME"===t.rankType&&"TOP_X"===t.gameType?e.push(t.id):"GAME"===t.rankType&&"MATCH_QUIZ"===t.gameType?n.push(t.id):"TEMPLATE"===t.rankType&&r.push(t.id)})),[e,n,r]},this.setModelsForUserRankings=function(t,e,n,r){return r.data.forEach((function(r){"MATCH_QUIZ"===r.gameType&&e?r.model=e.filter((function(t){return t.id===r.id}))[0]:"TOP_X"===r.gameType&&t?r.model=t.filter((function(t){return t.id===r.id}))[0]:"TEMPLATE"===r.rankType&&n&&(r.model=n.filter((function(t){return t.id===r.id}))[0])})),r},this.completeContestWinners=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)];case 1:return n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),[2,t]}}))}))},this.validateEntitiesFollowsFilters=function(t){if(!t||!(t.footballCompetitions&&t.footballCompetitions.length||t.footballTeams&&t.footballTeams.length||t.footballPlayers&&t.footballPlayers.length)){if("default"===e.errorHandlingMode)throw new c.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED).response}if(t.footballCompetitions&&t.footballCompetitions.length>10||t.footballTeams&&t.footballTeams.length>10||t.footballPlayers&&t.footballPlayers.length>10){if("default"===e.errorHandlingMode)throw new c.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED).response}},this.remapEntitiesFollowsFilters=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s;return i(this,(function(i){switch(i.label){case 0:return e=JSON.parse(JSON.stringify(t)),n={},r={},e.footballCompetitions&&e.footballCompetitions.length&&(r.competition=e.footballCompetitions),e.footballTeams&&e.footballTeams.length&&(r.team=e.footballTeams),e.footballPlayers&&e.footballPlayers.length&&(r.player=e.footballPlayers),[4,this.idMappingService.idMappingFacade.getEntitiesByIds(r,this.idMappingService.idSchema,a.IdSchemaEnum.NATIVE)];case 1:return s=i.sent(),Object.keys(s).forEach((function(t){"competition"===t?n.footballCompetitions=s[t]:"team"===t?n.footballTeams=s[t]:"player"===t&&(n.footballPlayers=s[t])})),[2,n]}}))}))},this.addModelsToEntitiesFollows=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return e=[],n="fb:c:",r=new Map,s=[],a="fb:t:",o=new Map,u=[],c="fb:p:",l=null,t.breakdown.forEach((function(t){t.id.includes(n)?e.push(t.id):t.id.includes(a)?s.push(t.id):t.id.includes(c)&&u.push(t.id)})),e.length?[4,this.footballNamespace.footballFacade.competitionsFacade.getCompetitionsMapWithNativeIds(e)]:[3,2];case 1:r=i.sent(),i.label=2;case 2:return s.length?[4,this.footballNamespace.footballFacade.teamsFacade.getTeamsMapWithNativeIds(s)]:[3,4];case 3:o=i.sent(),i.label=4;case 4:return u.length?[4,this.footballNamespace.footballFacade.playerFacade.getPlayersMapWithNativeIds(u)]:[3,6];case 5:l=i.sent(),i.label=6;case 6:return t.breakdown.forEach((function(t){t.id.includes(n)?(t.model=r.get(t.id),t.id=t.model.id):t.id.includes(a)?(t.model=o.get(t.id),t.id=t.model.id):t.id.includes(c)&&(t.model=l[t.id],t.id=t.model.id)})),[2,t]}}))}))},this.extractEnabledBadgesId=function(t){var e=[];return t.forEach((function(t){t.enabled&&e.push(t.id)})),e},this.idMappingService=new h.default(t),this.profileNamespace=new f.default(t),this.footballNamespace=new p.default(t),this.errorHandlingMode=t.errorHandlingMode}},1139:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(2535),o=n(5318),u=n(7974);e.default=function(){this.validateMarket=function(t,e){if(!Object.keys(u.MarketEnum).includes(e)){var n=(0,o.invalidMarketMessage)(e);if("default"===t)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n);throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n).response}}}},1859:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(1553),o=n(7686),u=n(2793),c=n(8900),l=n(1732),d=n(7782),h=n(5013),p=n(853),f=n(7299),m=n(2310),v=n(4800),y=n(8097),g=n(4021),w=n(4904),b=n(5318),_=n(2535);e.default=function(t){var e=this;this.predictorHttps=null,this.predictorService=null,this.idMapping=null,this.clientHttps=null,this.predictorValidator=null,this.errorHandlingMode=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.MATCH_QUIZ)];case 1:return t=e.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,o,u=this;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorValidator.validateBodyFields("MATCH_QUIZ",t),(e=t.fixtures.map((function(t){return u.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value,t.prediction.playerId)})))&&e.length?this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],e.forEach((function(t){n.push(t.matchId),t instanceof l.default&&t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&r.push(t.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,4];case 1:return a=i.sent(),o={},r&&r.length>0?[4,this.predictorService.remapPlayerIdMapToNative(r)]:[3,3];case 2:o=i.sent(),i.label=3;case 3:e.forEach((function(t,e){t.matchId=a[e],t instanceof l.default&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=o[t.prediction.playerId])})),i.label=4;case 4:return t.fixtures=e,[4,this.predictorHttps.makeFootballPrediction(t)];case 5:return[2,i.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("MATCH_QUIZ",t),[4,this.predictorHttps.getGames(e,n)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return n=n||!1,[4,this.predictorHttps.getGameById(t,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return s=s||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new d.default(n)),[4,this.predictorHttps.getGamePredictions(t,s,n)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return s=s||!1,n&&(n=new v.default(n)),[4,this.predictorHttps.getGameResults(t,s,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,e={status:p.GameStatusEnum.OPEN,type:"MATCH_QUIZ"},e=new f.default(e),[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){var e,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),n=n||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(e)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),o=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(o,n)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(s,u)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,o,u,c;return i(this,(function(i){switch(i.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),s=s||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",n),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,e)];case 1:return(o=i.sent()).data.length>0?(o.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),u=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(u,s)]):[3,4];case 2:return c=i.sent(),[4,this.predictorService.addPredictionProp(o,c)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getUserGamePrediction=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getUserPredictions(t,s,e)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(t){return t.gameInstanceId===n}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,n)];case 1:return e=r.sent(),[4,this.predictorService.completeGameMarketResults(e,"MATCH_QUIZ")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getGameById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===e.errorHandlingMode&&t>50)throw new y.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===e.errorHandlingMode&&t>50)throw new _.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.predictorValidator=new m.default(t.errorHandlingMode),this.idMapping=new c.default(t),this.predictorHttps=new u.default(t,this.idMapping),this.predictorService=new h.default(t,this.idMapping),this.clientHttps=new o.default(t),this.errorHandlingMode=t.errorHandlingMode}},267:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(1859);e.default=function(t){var e=this;this.matchQuizFacade=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGamePredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameResults(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGameEditions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGamePrediction(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameWinners(t)];case 1:return[2,e.sent()]}}))}))},this.matchQuizFacade=new s.default(t)}},5765:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.defaultMarkets=null,this.competitionsWhitelist=null}},8410:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899),i=n(8042);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},670:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameId=null,this.results=null,this.tieBreakers=null}},7243:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.images=null,this.scheduleOpenAt=null}},8042:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.target=null,this.playerId=null,this.playerModel=null,this.result=null}},7974:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.playerMarketNobodyPrediction=e.endMarkMarkets=e.playerMarkets=e.MarketsOverCorners=e.MarketsOverGoals=e.MarketEnum=void 0,function(t){t.FT_1X2="FT_1X2",t.HT_1X2="HT_1X2",t.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.HT_FT="HT_FT",t.PLAYER_SCORE="PLAYER_SCORE",t.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",t.PLAYER_RED_CARD="PLAYER_RED_CARD",t.RED_CARD_MATCH="RED_CARD_MATCH",t.PENALTY_MATCH="PENALTY_MATCH",t.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",t.CORNERS_MATCH="CORNERS_MATCH",t.CORRECT_SCORE="CORRECT_SCORE",t.CORRECT_SCORE_ADVANCED="CORRECT_SCORE_ADVANCED",t.CORRECT_SCORE_HT="CORRECT_SCORE_HT",t.PLAYER_SCORE_HATTRICK="PLAYER_SCORE_HATTRICK",t.PLAYER_SCORE_TWICE="PLAYER_SCORE_TWICE",t.OVER_GOALS_0_5="OVER_GOALS_0_5",t.OVER_GOALS_1_5="OVER_GOALS_1_5",t.OVER_GOALS_2_5="OVER_GOALS_2_5",t.OVER_GOALS_3_5="OVER_GOALS_3_5",t.OVER_GOALS_4_5="OVER_GOALS_4_5",t.OVER_GOALS_5_5="OVER_GOALS_5_5",t.OVER_GOALS_6_5="OVER_GOALS_6_5",t.OVER_CORNERS_6_5="OVER_CORNERS_6_5",t.OVER_CORNERS_7_5="OVER_CORNERS_7_5",t.OVER_CORNERS_8_5="OVER_CORNERS_8_5",t.OVER_CORNERS_9_5="OVER_CORNERS_9_5",t.OVER_CORNERS_10_5="OVER_CORNERS_10_5",t.OVER_CORNERS_11_5="OVER_CORNERS_11_5",t.OVER_CORNERS_12_5="OVER_CORNERS_12_5",t.OVER_CORNERS_13_5="OVER_CORNERS_13_5"}(n=e.MarketEnum||(e.MarketEnum={})),e.MarketsOverGoals=[n.OVER_GOALS_0_5,n.OVER_GOALS_1_5,n.OVER_GOALS_2_5,n.OVER_GOALS_3_5,n.OVER_GOALS_4_5,n.OVER_GOALS_5_5,n.OVER_GOALS_6_5],e.MarketsOverCorners=[n.OVER_CORNERS_6_5,n.OVER_CORNERS_7_5,n.OVER_CORNERS_8_5,n.OVER_CORNERS_9_5,n.OVER_CORNERS_10_5,n.OVER_CORNERS_11_5,n.OVER_CORNERS_12_5,n.OVER_CORNERS_13_5],e.playerMarkets=[n.PLAYER_RED_CARD,n.PLAYER_SCORE,n.PLAYER_SCORE_FIRST_GOAL,n.PLAYER_SCORE_HATTRICK,n.PLAYER_SCORE_TWICE,n.PLAYER_YELLOW_CARD],e.endMarkMarkets=[n.FT_1X2,n.HT_1X2,n.HT_FT,n.DOUBLE_CHANCE,n.CORNERS_MATCH,n.CORRECT_SCORE,n.CORRECT_SCORE_HT,n.CORRECT_SCORE_ADVANCED],e.playerMarketNobodyPrediction=n.PLAYER_SCORE_FIRST_GOAL},6147:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.pastStatuses=e.StatusEnum=void 0,function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(n=e.StatusEnum||(e.StatusEnum={})),e.pastStatuses=[n.WON,n.LOST,n.PARTIALLY_WON,n.CANCELED]},1976:(t,e)=>{"use strict";var n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.HalfTimeFullTimeEnum=e.DoubleChanceEnum=e.OneXTwoEnum=void 0,(i=e.OneXTwoEnum||(e.OneXTwoEnum={})).ONE="1",i.X="x",i.TWO="2",(r=e.DoubleChanceEnum||(e.DoubleChanceEnum={})).ONE_X="1x",r.X_TWO="x2",r.ONE_TWO="12",(n=e.HalfTimeFullTimeEnum||(e.HalfTimeFullTimeEnum={})).ONE_ONE="1/1",n.ONE_X="1/x",n.ONE_TWO="1/2",n.X_ONE="x/1",n.X_X="x/x",n.X_TWO="x/2",n.TWO_ONE="2/1",n.TWO_X="2/x",n.TWO_TWO="2/2"},2929:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),o=n(7974),u=n(7686),c=n(5013),l=n(3950),d=n(1732),h=n(2310),p=n(8097),f=n(4021),m=n(4904),v=n(5318),y=n(2535);e.default=function(t,e,n,g){var w=this;this.predictorHttps=null,this.clientHttps=null,this.idMapping=null,this.predictorService=null,this.predictorValidator=null,this.errorHandlingMode=null,this.makeFootballPrediction=function(t,e,n,s){return r(w,void 0,void 0,(function(){var r,u,c,h,g,w,b;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorValidator.validateFixture(t,e,n,s),u=new l.default,this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,6]:(c=r.matchId,h="",[4,this.predictorService.remapMatchIdToNative([c])]);case 1:if(g=i.sent(),r.matchId=g[0],"default"===this.errorHandlingMode&&!r.matchId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).errorMessage();if("standard"===this.errorHandlingMode&&!r.matchId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).response;return r instanceof d.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(h=r.prediction.playerId,w=r.prediction,[4,this.predictorService.remapPlayerIdToNative([h])]):[3,3]:[3,4];case 2:w.playerId=i.sent(),i.label=3;case 3:if("default"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).errorMessage();if("standard"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).response;i.label=4;case 4:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 5:return(b=i.sent()).fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=h),t.matchId=c})),[2,b];case 6:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 7:return[2,i.sent()]}}))}))},this.getMatchSummary=function(t,e){return r(w,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.getMatchSummaryBase(t,e)];case 1:return n=i.sent(),r=JSON.parse(JSON.stringify(n.predictions)),[4,this.predictorService.remapPlayerIdToIdSchema(r)];case 2:return s=i.sent(),n.predictions=s,[2,n]}}))}))},this.getMarketSummary=function(t,e,n,s){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.getMatchSummaryBase(t,s)];case 1:return r=i.sent(),[4,this.predictorService.getMarketSummary(r,e,n)];case 2:return[2,i.sent()];case 3:throw i.sent();case 4:return[2]}}))}))},this.getMatchSummaryBase=function(t,e){return r(w,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapMatchIdToNative([t])];case 1:return n=i.sent(),r=n[0],[4,this.predictorHttps.getMatchSummary(r,e)];case 2:return(s=i.sent()).matchId=t,[2,s];case 3:return[4,this.predictorHttps.getMatchSummary(t,e)];case 4:return[2,i.sent()]}}))}))},this.getConfig=function(){return r(w,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(u.FeatureConfigType.PREDICTOR)];case 1:return t=e.sent(),this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.deleteFootballPrediction=function(t){return r(w,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(w,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"user"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,e){return r(w,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],t,!0))];case 1:t=r.sent(),r.label=2;case 2:return n=this.predictorService.initPredictionsFilters(e,"matches",t),[4,this.predictorHttps.getMyPredictions(n)];case 3:return[2,r.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(w,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"current"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(w,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"past"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getUserPredictions=function(t,e,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"user"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserCurrentPredictions=function(t,e,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"current"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPastPredictions=function(t,e,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"past"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,e,n,o){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],e,!0))];case 1:e=i.sent(),i.label=2;case 2:return r=this.predictorService.initPredictionsFilters(n,"matches",e),[4,this.predictorHttps.getUserPredictions(t,o,r)];case 3:return[2,i.sent()]}}))}))},this.getPredictionById=function(t){return r(w,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.predictorHttps=e,this.idMapping=g,this.clientHttps=n,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new h.default(t.errorHandlingMode),this.predictorService=new c.default(t,g)}},704:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8608),i=n(246),s=n(1429),a=n(515),o=n(4187),u=n(4226),c=n(5765),l=n(1180),d=n(8452);e.default=function(){var t=this;this.remapPredictorConfig=function(t){var e=new d.default;return e.enabled=t.enabled,e.fullCoverageCompetitions=t.full_coverage_competitions,e.markets=t.markets,e.successRateScopes=t.success_rate_scopes,e},this.remapTopXConfig=function(t){var e=new l.default;return e.enabled=t.enabled,e.minFixtures=t.min_fixtures,e.maxFixtures=t.max_fixtures,e.competitionsWhitelist=t.competitions_whitelist,e},this.remapMatchQuizConfig=function(t){var e=new c.default;return e.enabled=t.enabled,e.defaultMarkets=t.default_markets,e.competitionsWhitelist=t.competitions_whitelist,e},this.remapLoyaltyConfig=function(e){var n=new a.default;return n.enabled=e.enabled,n.conditions.list=e.conditions.list,n.actions.value=e.actions.value,n.rewards=t.remapRewards(e.rewards),n},this.remapRewards=function(e){var n=new u.default;return n.points=t.remapPoints(e.points),n.tiers=e.tiers,n.badges=t.remapBadges(e.badges),n},this.remapPoints=function(t){var e=new o.default;return e.general=t.general,e.comments=t.comments,e.predictor=t.predictor,e.activity=t.activity,e.topX=t.top_x,e.matchQuiz=t.match_quiz,e},this.remapBadges=function(e){var n=new r.default;return n.general=e.general,n.predictor=t.remapBadgeValues(e.predictor),n.topX=t.remapBadgeValues(e.top_x),n.matchQuiz=t.remapBadgeValues(e.match_quiz),n},this.remapBadgeValues=function(e){return e.map((function(e){var n=new i.default;return n.id=e.id,n.enabled=e.enabled,n.requirements=t.remapRequirements(e.requirements),n}))},this.remapRequirements=function(t){var e=new s.default;return e.points=t.points,e.gameParticipationCount=t.game_participation_count,e.entityId=t.entity_id,e.entityType=t.entity_type,e.predictionsMade=t.predictions_made,e.correctPredictions=t.correct_predictions,e}}},8452:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(442);e.default=function(){this.enabled=!1,this.fullCoverageCompetitions=null,this.markets=null,this.successRateScopes=new r.default}},442:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.competitions=[],this.teams=[],this.markets=[]}},6367:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.playerId=null,this.playerModel=null}},1406:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(2524),a=n(1732),o=n(4119),u=n(1465),c=n(5132),l=n(7344);e.default=function(t,e,n){var d=this;this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapFixturesRequest=function(t){var e={};if(e.match_id=t.matchId,e.match_type="FOOTBALL",t instanceof a.default)e.market=t.market,e.prediction=t.prediction.value,e.player_id=t.prediction.playerId;else if(t instanceof c.default||t instanceof l.default)e.market=t.market,e.prediction=t.prediction.value;else if(t instanceof u.default){e.market=t.market;var n=t.prediction.value.split(":");e.goals_home=Number(n[0]),e.goals_away=Number(n[1])}else e.market=t.market,e.prediction=t.prediction.value;return e},this.remapFixturesResponse=function(t){return r(d,void 0,void 0,(function(){var e,n,r,a,o,u,c,l,d,h,p,f;return i(this,(function(i){switch(i.label){case 0:for(e="OWN_GOAL",n=[],r=[],a=null,o=[],t.length>1&&t.sort((function(t,e){return t.match_id.localeCompare(e.match_id)})),u=0,c=t;u<c.length;u++)p=c[u],n.push(p.match_id),p.player_id&&!r.includes(p.player_id)&&r.push(p.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(n)];case 1:return l=i.sent(),r.sort((function(t,e){return t.localeCompare(e)})),r&&r.length>0&&!r.includes(e)?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:for(d=0,h=t;d<h.length;d++)p=h[d],f=new s.default,p.target?f.market=this.predictorService.convertMarketForResponseModel(p.market,p.target):f.market=p.market,f.matchId=l[p.match_id].id,f.matchType=p.match_type,f.matchModel=l?l[p.match_id]:null,delete f.matchModel.availableMarkets,void 0!==p.goals_home&&void 0!==p.goals_away?f.prediction.value=p.goals_home.toString()+":"+p.goals_away.toString():f.prediction.value=p.prediction,f.prediction.playerId=p.player_id?p.player_id:null,f.prediction.playerId&&f.prediction.playerId!==e&&(f.prediction.playerModel=a[p.player_id],f.prediction.playerId=a[p.player_id].id),f.result=this.remapResult(p.result),o.push(f);return[2,o]}}))}))},this.remapResult=function(t){var e=new o.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.matchFacade=t,this.playerFacade=e,this.predictorService=n}},2524:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6367);e.default=function(){this.market=null,this.matchId=null,this.matchType=null,this.matchModel=null,this.prediction=new r.default,this.result=null}},1206:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.BOTH_TEAMS_SCORE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},5274:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(8038);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.CORNERS_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1465:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3125);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},7535:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(6902);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.DOUBLE_CHANCE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},7307:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(6642);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.HT_FT,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1718:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2782);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},5132:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9883);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},7344:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9883);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},1855:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.PENALTY_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1732:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7321);e.default=function(t,e,n,i){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n,this.prediction.playerId=i}},5814:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.RED_CARD_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},4119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.settledAt=null,this.resettledAt=null,this.status=null,this.outcome=null,this.points=0}},5908:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.no=0,this.yes=0}},2726:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(1406),a=n(2532),o=n(3792),u=n(595),c=n(4545),l=n(4272),d=n(2524),h=n(5013),p=n(1399);e.default=function(t,e){var n=this;this.fixturesRemapper=null,this.footballHttps=null,this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapRequestBody=function(t){var e={};return e.game_instance_id=t.gameInstanceId,e.fixtures=t.fixtures.map((function(t){return n.fixturesRemapper.remapFixturesRequest(t)})),t instanceof p.default&&t.tiebreaker&&(e.tiebreaker={},e.tiebreaker.golden_goal=t.tiebreaker.goldenGoal?t.tiebreaker.goldenGoal:null),e},this.remapResponseArrayBody=function(t){return r(n,void 0,void 0,(function(){var e,n,r,s,o,u,c=this;return i(this,(function(i){switch(i.label){case 0:return t.length?(e="OWN_GOAL",n=[],r=[],s={},o=[],t.forEach((function(t){t.fixtures.forEach((function(t){n.push(t.match_id),t.player_id&&t.player_id!==e&&r.push(t.player_id)}))})),[4,this.matchFacade.getMatchesMapWithNativeIds(n)]):[3,4];case 1:return u=i.sent(),r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:s=i.sent(),i.label=3;case 3:return t.forEach((function(t){var n=new a.default,r=[];n.id=t.id,n.gameInstanceId=t.game_instance_id,n.gameType=t.game_type,n.wager=t.wager,n.totalFixtures=t.total_fixtures,n.settledFixtures=t.settled_fixtures,n.userId=t.user_id,t.fixtures.forEach((function(t){var n=new d.default;t.target?n.market=c.predictorService.convertMarketForResponseModel(t.market,t.target):n.market=t.market,n.matchId=u[t.match_id].id,n.matchType=t.match_type,n.matchModel=u[t.match_id],delete n.matchModel.availableMarkets,void 0!==t.goals_home&&void 0!==t.goals_away?n.prediction.value=t.goals_home.toString()+":"+t.goals_away.toString():n.prediction.value=t.prediction,n.prediction.playerId=t.player_id?t.player_id:null,n.prediction.playerId&&n.prediction.playerId!==e&&(n.prediction.playerModel=s[n.prediction.playerId],n.prediction.playerId=s[n.prediction.playerId].id),n.result=c.fixturesRemapper.remapResult(t.result),r.push(n)})),n.fixtures=r,n.status=t.status,t.tiebreaker?n.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:n.tiebreaker=null,n.points=t.points,n.createdAt=t.created_at,n.updatedAt=t.updated_at,o.push(n)})),[2,o];case 4:return[2,t]}}))}))},this.remapResponseObjBody=function(t){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=new a.default).id=t.id,e.gameInstanceId=t.game_instance_id,e.gameType=t.game_type,e.wager=t.wager,e.totalFixtures=t.total_fixtures,e.settledFixtures=t.settled_fixtures,e.userId=t.user_id,n=e,[4,this.fixturesRemapper.remapFixturesResponse(t.fixtures)];case 1:return n.fixtures=r.sent(),e.status=t.status,t.tiebreaker?e.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:e.tiebreaker=null,e.points=t.points,e.createdAt=t.created_at,e.updatedAt=t.updated_at,[2,e]}}))}))},this.remapPredictionModel=function(t){var e=new o.default;return e.fullTimeOneXTwo=t.FT_1X2,e.halfTimeOneXTwo=t.HT_1X2,e.bothTeamsScore=t.BOTH_TEAMS_SCORE,e.overZeroPointFiveGoals=t.OVER_GOALS_0_5,e.overOnePointFiveGoals=t.OVER_GOALS_1_5,e.overTwoPointFiveGoals=t.OVER_GOALS_2_5,e.overThreePointFiveGoals=t.OVER_GOALS_3_5,e.overFourPointFiveGoals=t.OVER_GOALS_4_5,e.overFivePointFiveGoals=t.OVER_GOALS_5_5,e.overSixPointFiveGoals=t.OVER_GOALS_6_5,e.overSixPointFiveCorners=t.OVER_CORNERS_6_5,e.overSevenPointFiveCorners=t.OVER_CORNERS_7_5,e.overEightPointFiveCorners=t.OVER_CORNERS_8_5,e.overNinePointFiveCorners=t.OVER_CORNERS_9_5,e.overTenPointFiveCorners=t.OVER_CORNERS_10_5,e.overElevenPointFiveCorners=t.OVER_CORNERS_11_5,e.overTwelvePointFiveCorners=t.OVER_CORNERS_12_5,e.overThirteenPointFiveCorners=t.OVER_CORNERS_13_5,e.doubleChance=t.DOUBLE_CHANCE,e.halfTimeFullTime=t.HT_FT,e.playerScore=t.PLAYER_SCORE,e.playerYellowCard=t.PLAYER_YELLOW_CARD,e.playerRedCard=t.PLAYER_RED_CARD,e.redCardMatch=t.RED_CARD_MATCH,e.penaltyMatch=t.PENALTY_MATCH,e.playerScoreFirstGoal=t.PLAYER_SCORE_FIRST_GOAL,e.cornersMatch=t.CORNERS_MATCH,e.correctScore=t.CORRECT_SCORE,e.correctScoreHalfTime=t.CORRECT_SCORE_HT,e.correctScoreAdvanced=t.CORRECT_SCORE_ADVANCED,e.playerScoreHattrick=t.PLAYER_SCORE_HATTRICK,e.playerScoreTwice=t.PLAYER_SCORE_TWICE,e},this.footballHttps=new u.default(t),this.matchFacade=new c.default(t,this.footballHttps,e),this.playerFacade=new l.default(t,this.footballHttps,e),this.predictorService=new h.default(t,e),this.fixturesRemapper=new s.default(this.matchFacade,this.playerFacade,this.predictorService)}},3950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameInstanceId=null,this.fixtures=null}},2532:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7640);e.default=function(){this.id=null,this.gameInstanceId=null,this.gameType=null,this.wager=null,this.totalFixtures=null,this.settledFixtures=null,this.userId=null,this.fixtures=[],this.status=null,this.tiebreaker=new r.default,this.points=null,this.createdAt=null,this.updatedAt=null}},7782:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6147);e.default=function(t){var e=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.matchIds=null,this.constructFiltersUrl=function(){var t="",n=!1;return e.status&&(n=Object.values(r.StatusEnum).some((function(t){return e.status.includes(t)}))),e.limit&&(t+="&",t+="limit="+e.limit),e.startAfter&&(t+="&",t+="start_after="+e.startAfter),e.status&&n&&(t+="&",t+="status="+e.status.join(",")),e.type&&(t+="&",t+="game_types="+e.type),e.matchIds&&(t+="&",t+="match_ids="+e.matchIds.join(",")),t},this.limit=t.limit?t.limit:null,this.startAfter=t.startAfter?t.startAfter:null,this.status=t.status?t.status:null,this.type=t.type?t.type:null,this.matchIds=t.matchIds?t.matchIds:null}},3792:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5908);e.default=function(){this.fullTimeOneXTwo={},this.halfTimeOneXTwo={},this.bothTeamsScore=new r.default,this.doubleChance={},this.halfTimeFullTime={},this.playerScore={},this.playerYellowCard={},this.playerRedCard={},this.redCardMatch=new r.default,this.penaltyMatch=new r.default,this.playerScoreFirstGoal={},this.cornersMatch={},this.correctScore={},this.correctScoreHalfTime={},this.correctScoreAdvanced={},this.playerScoreHattrick={},this.playerScoreTwice={},this.overZeroPointFiveGoals=new r.default,this.overOnePointFiveGoals=new r.default,this.overTwoPointFiveGoals=new r.default,this.overThreePointFiveGoals=new r.default,this.overFourPointFiveGoals=new r.default,this.overFivePointFiveGoals=new r.default,this.overSixPointFiveGoals=new r.default,this.overSixPointFiveCorners=new r.default,this.overSevenPointFiveCorners=new r.default,this.overEightPointFiveCorners=new r.default,this.overNinePointFiveCorners=new r.default,this.overTenPointFiveCorners=new r.default,this.overElevenPointFiveCorners=new r.default,this.overTwelvePointFiveCorners=new r.default,this.overThirteenPointFiveCorners=new r.default}},9378:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchType=null,this.predictions=null}},9679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2726),i=n(9378);e.default=function(t,e){var n=this;this.remapPredictions=null,this.remapResponse=function(t){var e=new i.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.predictions=n.remapPredictions.remapPredictionModel(t.predictions),e},this.remapPredictions=new r.default(t,e)}},7321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1,this.playerId=null}},9883:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1}},8038:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},3125:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},6902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},6642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},2782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},1259:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(2793),a=n(8900),o=n(2929),u=n(7686);e.default=function(t){var e=this;this.predictorHttps=null,this.clientHttps=null,this.predictorFacade=null,this.idMapping=null,this.makeFootballPrediction=function(t,n,s,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.makeFootballPrediction(t,n,s,a)];case 1:return[2,e.sent()]}}))}))},this.getMatchSummary=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMatchSummary(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMarketSummary=function(t,n,s,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMarketSummary(t,n,s,a)];case 1:return[2,e.sent()]}}))}))},this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.deleteFootballPrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyCurrentPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPastPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictionsForMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserCurrentPredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserCurrentPredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserPastPredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPastPredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,n,s,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictionsForMatches(t,n,s,a)];case 1:return[2,e.sent()]}}))}))},this.getPredictionById=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new a.default(t),this.predictorHttps=new s.default(t,this.idMapping),this.clientHttps=new u.default(t),this.predictorFacade=new o.default(t,this.predictorHttps,this.clientHttps,this.idMapping)}},5013:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var o=n(7974),u=n(3792),c=n(8452),l=n(5908),d=n(8950),h=n(6890),p=n(595),f=n(4545),m=n(7782),v=n(7299),y=n(712),g=n(4119),w=n(3751),b=n(7243),_=n(4272),E=n(1180),I=n(5765),M=n(6147),O=n(5318),T=n(4946),R=n(6409),S=n(1260),P=n(6247);e.default=function(t,e){var n=this;this.footballHttps=null,this.idMapping=null,this.matchFacade=null,this.playerFacade=null,this.profileNamespace=null,this.remapMatchIdToNative=function(t){return i(n,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"match","native")];case 1:return[2,e.sent().match]}}))}))},this.remapPlayerIdToNative=function(t){return i(n,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"player","native")];case 1:return[2,e.sent().player[0]]}}))}))},this.remapPlayerIdMapToNative=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(s){switch(s.label){case 0:return e={},n=(0,y.transformIdsToBeUnique)(t),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=s.sent(),i=r.player,n.forEach((function(t,n){return e[t]=i[n]})),[2,e]}}))}))},this.remapPlayerIdToIdSchema=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,a,o,u,c,l,d,h,p,f,m,v,y,g,w,b;return s(this,(function(s){switch(s.label){case 0:for(e=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=[],r=0,i=Object.entries(t);r<i.length;r++)if(a=i[r],o=a[0],u=a[1],e.includes(o))for(c=0,l=Object.keys(u);c<l.length;c++)"NOBODY"!==(d=l[c])&&"OWN_GOAL"!==d&&n.push(d);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,t];case 1:for(h=s.sent(),p=0,f=Object.entries(t);p<f.length;p++)if(m=f[p],v=m[0],y=m[1],e.includes(v))for(g=0,w=Object.keys(y);g<w.length;g++)"NOBODY"!==(b=w[g])&&"OWN_GOAL"!==b&&(y[h[b].id]=y[b],y[h[b].id].model=h[b],this.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete y[b]);return[2,t]}}))}))},this.convertMarket=function(t){for(var e=Object.keys(new u.default),n=Object.values(o.MarketEnum),r=0;r<n.length;r++)t===n[r]&&(t=e[r]);return t},this.convertMarketForResponseModel=function(t,e){return t+"_"+e.toString()},this.getMarketSummary=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,a,u,c,d,h,p,f=this;return s(this,(function(s){switch(s.label){case 0:if(n=this.convertMarket(e),(i={}).matchId=t.matchId,i.matchType=t.matchType,!Object.keys(t.predictions).includes(n))throw new Error("You have passed invalid market");return i[n]=t.predictions[n],o.playerMarkets.includes(e)&&r?(a="","OWN_GOAL"===r||"NOBODY"===r?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({player:[r]},this.idMapping.idSchema,"native")]):[3,6];case 1:u=s.sent(),a=u.player[0],s.label=2;case 2:return a&&i[n][a]?[4,this.playerFacade.getPlayersMapWithNativeIds([a])]:[3,4];case 3:return c=s.sent(),i[n][a].model=c[a],[2,i[n][a]];case 4:return a?(i[n][a]=new l.default,[2,i[n][a]]):[2,i[n][r]];case 5:return[3,10];case 6:return!o.playerMarkets.includes(e)||r?[3,10]:(d=Object.keys(i[n]).filter((function(t){return"NOBODY"!==t&&"OWN_GOAL"!==t}))).length?[4,this.playerFacade.getPlayersMapWithNativeIds(d)]:[3,8];case 7:return p=s.sent(),[3,9];case 8:p={},s.label=9;case 9:h=p,Object.keys(h).length&&Object.keys(i[n]).forEach((function(t){"NOBODY"!==t&&"OWN_GOAL"!==t&&(i[n][h[t].id]=i[n][t],i[n][h[t].id].model=h[t],f.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete i[n][t])})),s.label=10;case 10:return[2,i]}}))}))},this.remapCompetitionsFromConfig=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,a,o,u,l;return s(this,(function(s){switch(s.label){case 0:return t instanceof c.default?(e={competition:t.fullCoverageCompetitions},n={competition:t.successRateScopes.competitions},r={team:t.successRateScopes.teams},[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,"native",this.idMapping.idSchema)]):[3,4];case 1:return i=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",this.idMapping.idSchema)];case 2:return a=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(r,"native",this.idMapping.idSchema)];case 3:return o=s.sent(),t.fullCoverageCompetitions=i.competition,t.successRateScopes.competitions=a.competition,t.successRateScopes.teams=o.team,[2,t];case 4:return t instanceof E.default||t instanceof I.default?(u={competition:t.competitionsWhitelist},[4,this.idMapping.idMappingFacade.getEntitiesByIds(u,"native",this.idMapping.idSchema)]):[3,6];case 5:return l=s.sent(),t.competitionsWhitelist=l.competition,[2,t];case 6:return[2]}}))}))},this.remapMatchIdsFixtures=function(t){return i(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return Array.isArray(t.data)?t.data.length>0?(e=[],n=[],t.data.forEach((function(t){t instanceof w.default||t instanceof d.default||t instanceof b.default||t instanceof P.default?(t.fixtures.forEach((function(t){return e.push(t.matchId)})),t instanceof b.default&&t.fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&n.push(t.prediction.playerId)}))):t instanceof h.default&&t.results.forEach((function(t){return e.push(t.matchId)}))})),[4,this.refactorResponseArrModel(t,e,n)]):[3,2]:[3,4];case 1:case 5:return[2,r.sent()];case 2:return[2,t];case 3:return[3,6];case 4:return[4,this.refactorResponseObjModel(t)];case 6:return[2]}}))}))},this.refactorResponseArrModel=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,a,o=this;return s(this,(function(s){switch(s.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return i=s.sent(),a={},r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=s.sent(),s.label=3;case 3:return t.data.forEach((function(t){t instanceof w.default||t instanceof d.default||t instanceof b.default?(t.fixtures.forEach((function(e){o.handleMatchModel(i,e),t instanceof b.default&&e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&(e.prediction.playerModel=a[e.prediction.playerId],e.prediction.playerId=a[e.prediction.playerId].id)})),n.push(t)):t instanceof h.default&&(t.results.forEach((function(t){t.matchModel=i[t.matchId],delete t.matchModel.availableMarkets,t.matchId=t.matchModel.id})),n.push(t))})),t.data=n,[2,t]}}))}))},this.refactorResponseObjModel=function(t){return i(n,void 0,void 0,(function(){var e,n,r=this;return s(this,(function(i){switch(i.label){case 0:return e=[],t.fixtures.forEach((function(t){return e.push(t.matchId)})),[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return n=i.sent(),t.fixtures.forEach((function(t){return r.handleMatchModel(n,t)})),[2,t]}}))}))},this.getCurrentGameId=function(t){var e=new Date;if(t.data.length>1){var n=[];return t.data.forEach((function(t){return n.push(t.predictionsCutoff)})),t.data.sort((function(t,n){var r=[t.predictionsCutoff,n.predictionsCutoff].map((function(t){return Math.abs(new Date(t)-e)}));return r[0]-r[1]}))[0].id}return t.data[0].id},this.initGameTypePredictions=function(t,e){var n={type:t,limit:null,startAfter:null};return e&&(n=r(r({},n),{limit:e.limit,startAfter:e.startAfter})),new m.default(n)},this.initGameFilters=function(t,e,n){if(e&&n)return e.type=t,e.gameIds=n,new v.default(e);if(e&&!n)return e.type=t,new v.default(e);if(!e&&n){var r={type:t,gameIds:n};return new v.default(r)}return r={type:t},new v.default(r)},this.addPredictionProp=function(t,e){return i(n,void 0,void 0,(function(){var n=this;return s(this,(function(r){switch(r.label){case 0:return e.data.forEach((function(e){t.data.forEach((function(t){e.id===t.game_instance_id&&(e.predictionId=t.id,e.outcome=t.status,e.fixtures.forEach((function(e,r){void 0!==t.fixtures[r].goals_home&&void 0!==t.fixtures[r].goals_away?e.prediction.value=t.fixtures[r].goals_home+":"+t.fixtures[r].goals_away:e.prediction.value=t.fixtures[r].prediction,t.fixtures[r].player_id?e.prediction.playerId=t.fixtures[r].player_id:t.fixtures[r].target&&(e.prediction.target=t.fixtures[r].target),e.prediction.result=n.remapResult(t.fixtures[r].result)})),e.predictionsMadeAt=t.created_at,e.points=t.points)}))})),e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,[4,this.remapMatchIdsFixtures(e)];case 1:return[2,r.sent()]}}))}))},this.remapResult=function(t){var e=new g.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.areIdsExceeded=function(t){return t.length>10},this.initPredictionsFilters=function(t,e,r){switch(e){case"user":t&&(t=new m.default(t));break;case"current":if(t)n.deleteUnexpectedProperties(t),t.status=[M.StatusEnum.ACTIVE],t=new m.default(t);else{var i={status:[M.StatusEnum.ACTIVE]};t=new m.default(i)}break;case"past":t?(n.deleteUnexpectedProperties(t),t.status=M.pastStatuses,t=new m.default(t)):(i={status:M.pastStatuses},t=new m.default(i));break;case"matches":t?(n.deleteUnexpectedProperties(t),t.matchIds=r,t=new m.default(t)):(i={matchIds:r},t=new m.default(i))}return t},this.completeGameMarketResults=function(t,e){return i(n,void 0,void 0,(function(){var n,r,i,u,c,l,d,h,p=this;return s(this,(function(s){switch(s.label){case 0:switch(e){case"MATCH_QUIZ":return[3,1];case"TOP_X":return[3,5]}return[3,9];case 1:return n={},r=t.results[0].matchId,i=t.results.map((function(t){return o.playerMarkets.includes(t.market)&&!t.result.includes("OWN_GOAL")?a([],t.result,!0):[]})).flat(),[4,this.matchFacade.getMatchesMapWithNativeIds([r])];case 2:return u=s.sent(),i.length?[4,this.playerFacade.getPlayersMapWithNativeIds(i)]:[3,4];case 3:n=s.sent(),s.label=4;case 4:return t.results=t.results.map((function(t){if(t.matchModel=u[t.matchId]?u[t.matchId]:null,t.playerModels&&Object.keys(n).length&&(e=t.result).forEach((function(e){var r=n[e];t.playerModels.push(r)})),p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(p.remapMatchIdForResultsMarkets(u,t),t.playerModels&&Object.keys(n).length)){var e=t.result;t.result=e.map((function(t){return n[t].id}))}return t})),[2,t];case 5:return c=t.results.map((function(t){return t.matchId})),[4,this.matchFacade.getMatchesMapWithNativeIds(c)];case 6:return l=s.sent(),t.results=t.results.map((function(t){return t.matchModel=l[t.matchId]?l[t.matchId]:null,p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&p.remapMatchIdForResultsMarkets(l,t),t})),t.tieBreakers.goldenGoals.length?(d=t.tieBreakers.goldenGoals.map((function(t){return t.playerId})),[4,this.playerFacade.getPlayersMapWithNativeIds(d)]):[3,8];case 7:h=s.sent(),t.tieBreakers.goldenGoals=t.tieBreakers.goldenGoals.map((function(t){return t.matchModel=l[t.matchId],t.playerModel=h[t.playerId],p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(t.matchId=l[t.matchId].id,t.playerId=h[t.playerId].id),t})),s.label=8;case 8:return[2,t];case 9:return[2]}}))}))},this.completeContestWinners=function(t){return i(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)];case 1:return n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),[2,t]}}))}))},this.handleMatchModel=function(t,e){t[e.matchId]?(e.matchModel=t[e.matchId],delete e.matchModel.availableMarkets,e.matchId=e.matchModel.id):(e.matchModel=null,n.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[S.ID_TYPES[n.idMapping.idSchema]]})))},this.remapMatchIdForResultsMarkets=function(t,e){t[e.matchId]?e.matchId=t[e.matchId].id:n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[S.ID_TYPES[n.idMapping.idSchema]]}))},this.deleteUnexpectedProperties=function(t){return t.status&&(console.warn(O.WarningMessages.UNEXPECTED_STATUS_PROP),delete t.status),t.type&&(console.warn(O.WarningMessages.UNEXPECTED_TYPE_PROP),delete t.type),t},this.footballHttps=new p.default(t),this.idMapping=e,this.matchFacade=new f.default(t,this.footballHttps,e),this.playerFacade=new _.default(t,this.footballHttps,e),this.profileNamespace=new R.default(t)}},2310:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(5318),o=n(7974),u=n(1976),c=n(1206),l=n(5274),d=n(1465),h=n(7535),p=n(1718),f=n(7307),m=n(5132),v=n(7344),y=n(1855),g=n(1732),w=n(5814),b=n(3950),_=n(1260),E=n(7640),I=n(2535);e.default=function(t){var e=this;this.errorHandlingMode=null,this.validateBodyFields=function(t,n){var r=Object.keys(n),i=Object.keys(new b.default);switch(t){case"MATCH_QUIZ":r.forEach((function(t){i.includes(t)||e.throwInvalidParamException([t])}));break;case"TOP_X":var s=n;s.fixtures.forEach((function(t){return e.validateMarketTopX(t.market)})),r.includes("tiebreaker")&&s.tiebreaker&&e.validateTiebreaker(s.tiebreaker),r.forEach((function(t){"tiebreaker"===t||i.includes(t)||e.throwInvalidParamException([t])}))}var a=i.filter((function(t){return!r.includes(t)}));return a.length&&e.throwMissingFieldsException("game prediction body",a),n.fixtures.forEach((function(t){e.validateFixtureFields(t)})),n},this.validateFixture=function(t,n,r,i){e.validateMarket(n);var s=Object.values(u.OneXTwoEnum),a=Object.values(u.HalfTimeFullTimeEnum),b=Object.values(u.DoubleChanceEnum);if(n===o.MarketEnum.FT_1X2||n===o.MarketEnum.HT_1X2){if(s.includes(r))return new p.default(t,n,r)}else if(n===o.MarketEnum.HT_FT){if(a.includes(r))return new f.default(t,r)}else if(n===o.MarketEnum.DOUBLE_CHANCE){if(b.includes(r))return new h.default(t,r)}else if(n===o.MarketEnum.CORRECT_SCORE||n===o.MarketEnum.CORRECT_SCORE_ADVANCED||n===o.MarketEnum.CORRECT_SCORE_HT){if("string"==typeof r&&/\d+:\d+/.test(r))return new d.default(t,n,r)}else if(n===o.MarketEnum.CORNERS_MATCH){if("number"==typeof r)return new l.default(t,r)}else if(n===o.MarketEnum.BOTH_TEAMS_SCORE){if(e.isPredictionBoolean(r))return new c.default(t,r)}else if(n===o.MarketEnum.RED_CARD_MATCH){if(e.isPredictionBoolean(r))return new w.default(t,r)}else if(n===o.MarketEnum.PENALTY_MATCH){if(e.isPredictionBoolean(r))return new y.default(t,r)}else if(o.playerMarkets.includes(n)){var _="OWN_GOAL";if(e.validatePlayerId(n,i),n===o.playerMarketNobodyPrediction&&e.isPredictionBoolean(r)){var E=i&&i===_?_:i;return new g.default(t,n,r,E)}if(i&&e.isPredictionBoolean(r))return new g.default(t,n,r,i)}else if(o.MarketsOverGoals.includes(n)){if(e.isPredictionBoolean(r))return new v.default(t,n,r)}else if(o.MarketsOverCorners.includes(n)&&e.isPredictionBoolean(r))return new m.default(t,n,r);e.throwInvalidPredictionException(r,n)},this.validateFixtureFields=function(t){var n=Object.keys(t);n.forEach((function(t){_.validFixtureFields.includes(t)||e.throwInvalidParamException([t])}));var r=_.validFixtureFields.filter((function(t){if("matchType"!==t&&!n.includes(t))return t}));r.length&&e.throwMissingFieldsException("fixtures",r),e.validatePredictionKey(t.market,t.prediction)},this.validateTiebreaker=function(t){var n=Object.keys(t);n.length&&"object"==typeof t||e.throwInvalidType("tiebreaker","object");var r=Object.keys(new E.default)[0];n.forEach((function(t){r!==t&&e.throwInvalidParamException([t])})),n.includes(r)||e.throwMissingFieldsException("tiebreaker",[r]),"number"!=typeof t.goldenGoal&&e.throwInvalidType("goldenGoal","number")},this.validatePredictionKey=function(t,n){if("object"==typeof n){var r=Object.keys(n),i=["value"];if(r.length||e.throwMissingFieldsException("prediction",i),1!==r.length||r.includes(i[0])||e.throwInvalidParamException(r),r.length>1){o.playerMarkets.includes(t)&&i.push("playerId");var s=r.filter((function(t){return!i.includes(t)}));s.length&&e.throwInvalidParamException(s)}}else e.throwInvalidType("prediction","object")},this.validatePlayerId=function(t,n){var r="playerId";t!==o.playerMarketNobodyPrediction&&(n||e.throwInvalidParamException([r]),"string"!=typeof n&&e.throwInvalidType(r,"string"))},this.validateMarket=function(t){Object.values(o.MarketEnum).includes(t)||e.throwInvalidMarketException(t)},this.validateMarketTopX=function(t){t!==o.MarketEnum.CORRECT_SCORE&&t!==o.MarketEnum.CORRECT_SCORE_ADVANCED&&e.throwInvalidMarketException(t,"TOP_X")},this.isPredictionBoolean=function(t){return"boolean"==typeof t},this.throwInvalidPredictionException=function(t,n){var o=(0,a.invalidPredictionMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_PREDICTION,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidMarketException=function(t,n){var o;if(o=n&&"TOP_X"===n?(0,a.invalidMarketTopXMessage)(t):(0,a.invalidMarketMessage)(t),"default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidParamException=function(t){var n=(0,a.invalidFieldMessage)(t);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,n);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,n).response},this.throwMissingFieldsException=function(t,n){var o=(0,a.missingFieldsMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidType=function(t,n){var o=(0,a.invalidTypeMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.errorHandlingMode=t}},4831:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(9072),o=n(7232),u=n(4268);e.default=function(t,e,n,c,l,d){var h=this;this.idsRemapper=null,this.profileHttps=null,this.profileService=null,this.localStorage=null,this.profileFacade=null,this.ownProfile=null,this.modified=!1,this.expireAt=0,this.promises=[],this.isFetching=!1,this.getOwnProfile=function(){return r(h,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return this.isFetching?(console.log("Another thread is fetching profile..."),[4,this.delay(100)]):[3,2];case 1:return r.sent(),[3,0];case 2:if(this.modified&&this.ownProfile)return console.log("Timestamp is less than 10 minutes OR profile is modifying "),[2,this.ownProfile];if(t=Math.floor(Date.now()/1e3),this.ownProfile&&!(this.expireAt<t))return[3,7];this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600,r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.profileFacade.getOwn()];case 4:return e=r.sent(),this.setOwnProfile(e),[3,6];case 5:throw n=r.sent(),this.isFetching=!1,n;case 6:return this.modified=!1,this.isFetching=!1,[2,this.ownProfile];case 7:return[2,this.ownProfile]}}))}))},this.delay=function(t){return new Promise((function(e){setTimeout(e,t)}))},this.setOwnProfile=function(t){h.ownProfile=t},this.getInfo=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),delete(e=JSON.parse(JSON.stringify(t))).interests,[2,e]}}))}))},this.showInterests=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t)];case 1:return[2,e.sent()]}}))}))},this.follow=function(t){return r(h,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.follow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.unfollow=function(t){return r(h,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.unfollow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.getStats=function(){return r(h,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getStats()];case 1:return t=e.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(t)];case 2:return[2,e.sent()]}}))}))},this.getBadges=function(){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getBadges()];case 1:return[2,t.sent()]}}))}))},this.addInterestPromise=function(t){return r(h,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return r.sent(),e=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(t)];case 2:return e=r.sent(),[3,4];case 3:e=t,r.label=4;case 4:return n=this.ownProfile.interests.filter((function(t){return t.id!==e.id||t.type!==e.type||t.source!==e.source})),this.ownProfile.interests=s([],n,!0),this.ownProfile.interests.push(e),[2,this]}}))}))},this.addInterest=function(t){return h.promises.push(h.addInterestPromise(t)),h},this.removeInterestPromise=function(t){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return n.sent(),e=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(t)];case 2:return e=n.sent(),[3,4];case 3:e=t,n.label=4;case 4:return this.ownProfile.interests=this.ownProfile.interests.filter((function(t){return t.id!==e.id||t.type!==e.type||t.source!==e.source})),[2,this]}}))}))},this.removeInterest=function(t){return h.promises.push(h.removeInterestPromise(t)),h},this.setBirthdatePromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.birthDate=t||null,[2,this]}}))}))},this.setBirthdate=function(t){return h.promises.push(h.setBirthdatePromise(t)),h},this.setGenderPromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.gender="male"===t||"female"===t?t:"unspecified",[2,this]}}))}))},this.setGender=function(t){return h.promises.push(h.setGenderPromise(t)),h},this.setNicknamePromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.nickname=t,[2,this]}}))}))},this.setNickname=function(t){return h.promises.push(h.setNicknamePromise(t)),h},this.setNamePromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.name=t,[2,this]}}))}))},this.setName=function(t){return h.promises.push(h.setNamePromise(t)),h},this.setCountryPromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),t&&!this.ownProfile.country?(this.ownProfile.country=new a.default,this.ownProfile.country.id=t):t&&this.ownProfile.country?this.ownProfile.country.id=t:this.ownProfile.country=null,[2,this]}}))}))},this.setCountry=function(t){return h.promises.push(h.setCountryPromise(t)),h},this.showFullnessProfile=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[2,this.profileFacade.showFullnessProfile(e)]}}))}))},this.update=function(){return r(h,void 0,void 0,(function(){var t,e,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return 0===this.promises.length?[2,this.ownProfile]:[4,Promise.all(this.promises)];case 1:return i.sent(),[4,this.profileFacade.getOwn()];case 2:return t=i.sent(),[4,this.getOwnProfile()];case 3:return e=i.sent(),n=this.profileService.extractUpdatedProps(t,e),this.modified=!1,this.expireAt=0,Object.keys(n).length?[4,this.profileHttps.updateProfile(n)]:[3,5];case 4:return r=i.sent(),s=JSON.parse(JSON.stringify(r)),this.setOwnProfile(s),this.localStorage.setOwnProfile(s),delete r.interests,[2,r];case 5:return delete(a=JSON.parse(JSON.stringify(this.ownProfile))).interests,[2,a]}}))}))},this.idsRemapper=t,this.localStorage=e,this.profileHttps=n,this.profileService=new u.default,this.profileFacade=new o.default(e,n,c)}},642:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7232);e.default=function(t,e,n,a){var o=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.profileFacade=null,this.profileId="",this.setId=function(t){return o.profileId=t,o},this.getProfile=function(){return r(o,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getById(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.getInfo=function(){return r(o,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return delete(t=e.sent()).interests,[2,t]}}))}))},this.showInterests=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.showFullnessProfile=function(){return r(o,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return t=e.sent(),[2,this.profileFacade.showFullnessProfile(t)]}}))}))},this.getStats=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.activityHttps.getStats(this.profileId,t)];case 1:return e=n.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(e)];case 2:return[2,n.sent()]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileHttps.getBadges(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.idsRemapper=t,this.profileHttps=n,this.activityHttps=a,this.profileFacade=new s.default(e,n,a)}},7232:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(9037),a=n(9523);e.default=function(t,e,n){var o=this;this.isBrowser=!1,this.localStorage={},this.profileHttps=null,this.activityHttps=null,this.getOwn=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("profile"))?[2,JSON.parse(JSON.stringify(t))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getProfile()];case 2:return n=i.sent(),this.localStorage.setOwnProfile(n),[2,n];case 3:throw e=i.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getProfile()];case 6:return[2,n=i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving your profile: ",r),r;case 8:return[2]}}))}))},this.updateOwnProfile=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile()];case 1:return t=n.sent(),this.localStorage.setOwnProfile(t),[2,t];case 2:throw e=n.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 3:return[2]}}))}))},this.getByIds=function(t,e){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.profileHttps.getProfiles(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the selected profiles: "+t.join(",")+" ",n),n;case 3:return[2]}}))}))},this.getById=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the selected profile: "+t+" ",e),e;case 3:return[2]}}))}))},this.getCountries=function(t){return r(o,void 0,void 0,(function(){var e,n,r,s;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,this.isBrowser?(e=this.localStorage.getProfileCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getCountries(t)];case 2:return n=i.sent(),this.localStorage.setProfileCountries(n),[2,n];case 3:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getCountries(t)];case 6:return[2,i.sent()];case 7:throw s=i.sent(),console.warn("There was a problem retrieving profile countries: ",s),s;case 8:return[2]}}))}))},this.getFollowers=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new a.default(t)),[4,this.profileHttps.getFollowers(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followerId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return s=i.sent(),o=n.data.map((function(t){return s.forEach((function(e){t.followerId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=o,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your followers: ",u),u;case 5:return[2]}}))}))},this.getFollowing=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new a.default(t)),[4,this.profileHttps.getFollowing(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followingId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return s=i.sent(),o=n.data.map((function(t){return s.forEach((function(e){t.followingId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=o,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your following profiles: ",u),u;case 5:return[2]}}))}))},this.follow=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.follow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem following profiles: "+t.join(",")+" ",e),e;case 3:return[2]}}))}))},this.unfollow=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.unfollow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem unfollowing profiles: "+t.join(",")+" ",e),e;case 3:return[2]}}))}))},this.showFullnessProfile=function(t){var e=new s.default,n=0;return t.avatar&&(e.breakdown.addedAvatar.completed=!0,n+=e.breakdown.addedAvatar.percentage),t.birthDate&&(e.breakdown.addedBirthdate.completed=!0,n+=e.breakdown.addedBirthdate.percentage),t.country&&(e.breakdown.addedCountry.completed=!0,n+=e.breakdown.addedCountry.percentage),t.gender&&(e.breakdown.addedGender.completed=!0,n+=e.breakdown.addedGender.percentage),t.interests&&t.interests.length>0&&(t.interests.find((function(t){return"team"===t.type&&t.favourite}))&&(e.breakdown.teamFavourite.completed=!0,n+=e.breakdown.teamFavourite.percentage),t.interests.find((function(t){return"team"===t.type}))&&(e.breakdown.teamFollowed.completed=!0,n+=e.breakdown.teamFollowed.percentage),t.interests.find((function(t){return"player"===t.type&&t.favourite}))&&(e.breakdown.playerFavourite.completed=!0,n+=e.breakdown.playerFavourite.percentage),t.interests.find((function(t){return"player"===t.type}))&&(e.breakdown.playerFollowed.completed=!0,n+=e.breakdown.playerFollowed.percentage),t.interests.find((function(t){return"competition"===t.type&&t.favourite}))&&(e.breakdown.competitionFavourite.completed=!0,n+=e.breakdown.competitionFavourite.percentage),t.interests.find((function(t){return"competition"===t.type}))&&(e.breakdown.competitionFollowed.completed=!0,n+=e.breakdown.competitionFollowed.percentage)),e.totalPercentage=n,e},this.getStats=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("statistics"))&&Object.keys(t).length?[2,JSON.parse(JSON.stringify(t))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.activityHttps.getStats()];case 2:return e=i.sent(),this.localStorage.setProfileStats(e),[2,e];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.activityHttps.getStats()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",r),r;case 8:return[2]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("badges"))?[2,t]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getBadges()];case 2:return e=i.sent(),this.localStorage.setProfileBadges(e),[2,e];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile badges: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getBadges()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile badges: ",r),r;case 8:return[2]}}))}))},this.getLocalStorageData=function(t){var e=Math.floor(Date.now()/1e3),n=o.localStorage.getExpiration("profile",t);switch(t){case"profile":if(n>e)return o.localStorage.getOwnProfile();case"statistics":if(n>e)return o.localStorage.getProfileStats();case"badges":if(n>e)return o.localStorage.getProfileBadges();default:return null}},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.profileHttps=e,this.activityHttps=n}},9523:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=0,this.startAfter=null,this.constructFilterUrl=function(){var t="";return e.limit&&(t=(t+="&")+"limit="+e.limit),e.startAfter&&(t=(t+="&")+"start_after="+e.startAfter),t},this.limit=t.limit?t.limit:20,this.startAfter=t.startAfter?t.startAfter:null}},4782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followerId=null,this.name=null,this.nickname=null,this.profileId=null}},1712:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profile_ids=[]}},3106:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followingId=null,this.name=null,this.nickname=null,this.profileId=null}},6620:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7312);e.default=function(){this.teamFollowed=new r.default(10),this.teamFavourite=new r.default(15),this.playerFollowed=new r.default(10),this.playerFavourite=new r.default(10),this.competitionFollowed=new r.default(10),this.competitionFavourite=new r.default(5),this.addedBirthdate=new r.default(10),this.addedGender=new r.default(10),this.addedCountry=new r.default(10),this.addedAvatar=new r.default(10)}},7312:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.completed=!1,this.percentage=t}},9037:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6620);e.default=function(){this.breakdown=new r.default}},9072:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.assets=null}},3546:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.nickname=null,this.avatar=null,this.gender=null,this.country=null,this.birthDate=null,this.interests=[],this.followingCount=0,this.followersCount=0}},6277:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1553),i=n(4782);e.default=function(){var t=this;this.followersFromResponse=function(e){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.remapResponse=function(t){var e=new i.default;return e.avatar=t.avatar,e.followerId=t.follower_id,e.name=t.name,e.profileId=t.profile_id,e}}},8673:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1553),i=n(3106);e.default=function(){var t=this;this.followResponse=function(e){return e.map((function(e){return t.remapResponse(e)}))},this.followingFromResponse=function(e){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.remapResponse=function(t){var e=new i.default;return e.avatar=t.avatar,e.followingId=t.following_id,e.name=t.name,e.profileId=t.profile_id,e.nickname=t.nickname,e}}},441:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3546);e.default=function(){var t=this;this.profilesFromResponse=function(e){return e?e.map((function(e){return t.fullProfileFromResponse(e)})):null},this.fullProfileFromResponse=function(t){var e=new r.default;return e.id=t.id,e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar,e.gender=t.gender,e.country=t.country,e.birthDate=t.birth_date,e.interests=t.interests?t.interests:[],e.followingCount=t.following_count,e.followersCount=t.followers_count,e}}},1316:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5123);e.default=function(){this.successRates=new r.default}},9826:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.model=null}},5123:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},6409:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4275),a=n(8900),o=n(7232),u=n(5601),c=n(4831),l=n(642),d=n(4289),h=n(595),p=n(1022),f=n(4912);e.default=function(t){var e=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.footballHttps=null,this.footballFacade=null,this.idMapping=null,this.localStorage=null,this.profileFacade=null,this.ownProfileBuilder=null,this.profileBuilder=null,this.getOwn=function(){return e.ownProfileBuilder},this.getById=function(t){return e.profileBuilder.setId(t)},this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getByIds=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getByIds(t,n)];case 1:return[2,e.sent()]}}))}))},this.profileHttps=new s.default(t),this.activityHttps=new p.default(t),this.footballHttps=new h.default(t),this.idMapping=new a.default(t),this.localStorage=new u.default(t),this.footballFacade=new d.default(t,this.localStorage,this.footballHttps,this.idMapping),this.profileFacade=new o.default(this.localStorage,this.profileHttps,this.activityHttps),this.idsRemapper=new f.default(t,this.footballFacade),this.ownProfileBuilder=new c.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps,this.idMapping,this.footballFacade),this.profileBuilder=new l.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps)}},4268:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.extractUpdatedProps=function(e,n){var r=["name","nickname","gender"],i={};return Object.keys(e).forEach((function(s){if(r.includes(s)&&e[s]!==n[s])i[s]=n[s];else if("birthDate"===s)(null===n[s]||null===e[s]&&n[s]||e[s]!==n[s])&&(i.birth_date=n[s]);else if("country"===s)null===n[s]?i.country_id=n[s]:(null===e[s]&&n[s]||e[s].id!==n[s].id)&&(i.country_id=n[s].id);else if("interests"===s){var a=e[s],o=n[s];o.length&&t.isNewInterest(a,o)?i[s]=t.updateInterests(a,o):!o.length&&a.length?i[s]=o:a.length===o.length||t.isNewInterest(a,o)||(i[s]=o)}})),i},this.updateInterests=function(e,r){if(e.length===r.length){var i=t.extractSameAndNewInterests(e,r),s=i[0],a=i[1];return n(n([],a,!0),s,!0)}return r},this.isNewInterest=function(e,n){var r=!1;return t.extractSameAndNewInterests(e,n)[0].length?r=!0:r},this.extractSameAndNewInterests=function(t,e){var n=e.filter((function(e){return t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))}));return[e.filter((function(e){return!t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))})),n]}}},853:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.GameStatusEnum=void 0,(n=e.GameStatusEnum||(e.GameStatusEnum={})).OPEN="OPEN",n.LIVE="LIVE",n.PENDING="PENDING",n.CANCELED="CANCELED",n.CLOSED="CLOSED",n.SETTLED="SETTLED"},9502:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(2793),o=n(5013),u=n(853),c=n(7299),l=n(1553),d=n(1399),h=n(7782),p=n(7686),f=n(2310),m=n(8097),v=n(4904),y=n(5318),g=n(4021),w=n(2535);e.default=function(t,e){var n=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.predictorValidator=null,this.clientHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(n,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(p.FeatureConfigType.TOP_X)];case 1:return t=e.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.getGames=function(t,e){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return e=e||!1,n=this.predictorService.initGameFilters("TOP_X",t),[4,this.predictorHttps.getGames(n,e)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return e=e||!1,[4,this.predictorHttps.getGameById(t,e)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,e,s){return r(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return s=s||!1,e&&(e.type&&delete e.type,e.status&&delete e.status,e=new h.default(e)),[4,this.predictorHttps.getGamePredictions(t,s,e)];case 1:return[2,n.sent()]}}))}))},this.getGameResults=function(t,e,s){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return s=s||!1,e&&(e=new c.default(e)),[4,this.predictorHttps.getGameResults(t,s,e)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(n,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,e={status:u.GameStatusEnum.OPEN,type:"TOP_X"},e=new c.default(e),[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.play=function(t){return r(n,void 0,void 0,(function(){var e,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return e=new d.default(t),(e=this.predictorValidator.validateBodyFields("TOP_X",e)).fixtures=e.fixtures.map((function(t){return o.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value)})),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:(n=[],e.fixtures.forEach((function(t){return n.push(t.matchId)})),[4,this.predictorService.remapMatchIdToNative(n)]);case 1:r=i.sent(),e.fixtures.forEach((function(t){return t.matchId=r.shift()})),i.label=2;case 2:return[4,this.predictorHttps.makeFootballPrediction(e)];case 3:return(a=i.sent()).fixtures.forEach((function(t){t.matchId=t.matchModel.id})),[2,a]}}))}))},this.delete=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,e){return r(n,void 0,void 0,(function(){var n,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),e=e||!1,n=this.predictorService.initGameTypePredictions("TOP_X",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(n)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),a=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(a,e)]):[3,4];case 2:return o=i.sent(),[4,this.predictorService.addPredictionProp(s,o)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getMyGamePrediction=function(t){return r(n,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,e,s){return r(n,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return e&&e.limit&&this.validateLimitFilterOnGames(e.limit),s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X",e),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,n)];case 1:return(a=i.sent()).data.length>0?(a.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),o=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(o,s)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(a,u)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getUserGamePrediction=function(t,e,s){return r(n,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getUserPredictions(t,s,n)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(t){return t.gameInstanceId===e}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,e)];case 1:return n=r.sent(),[4,this.predictorService.completeGameMarketResults(n,"TOP_X")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getGameById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===n.errorHandlingMode&&t>50)throw new m.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===n.errorHandlingMode&&t>50)throw new w.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.idMapping=e,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new f.default(t.errorHandlingMode),this.predictorHttps=new a.default(t,e),this.predictorService=new o.default(t,e),this.clientHttps=new p.default(t)}},1180:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.minFixtures=null,this.maxFixtures=null,this.competitionsWhitelist=null}},7482:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default}},5967:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899),i=n(3381);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},6247:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.adContent=null,e.labels=null,e.customFields=null,e}return i(e,t),e}(n(3751).default);e.default=s},6890:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId=null,this.points=null,this.results=[],this.tiebreaker=null}},6160:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchModel=null,this.outcome=null}},7299:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=n(4800),a=n(853),o=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.type=null,n.gameIds=null,n.sortOrder=null,n.constructFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(n);return n.status&&Object.values(a.GameStatusEnum).includes(n.status)&&(e+="&",e+="status="+n.status),n.type&&(e+="&",e+="type="+n.type),n.gameIds&&n.gameIds.length>0&&(e+="&",e+="game_ids="+n.gameIds.join(",")),n.sortOrder&&(e+="&",e+="sort_order="+n.sortOrder),e},n.status=e.status?e.status:null,n.type=e.type?e.type:null,n.gameIds=e.gameIds?e.gameIds:null,n.sortOrder=e.sortOrder?e.sortOrder:null,n}return i(e,t),e}(s.default);e.default=o},3751:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(439),i=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.scheduleOpenAt=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.images=new r.default,this.createdAt=null,this.updatedAt=null}},4780:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7482),i=n(8410),s=n(5967),a=n(6890),o=n(6160),u=n(3751),c=n(7243),l=n(8950),d=n(7640),h=n(1553),p=n(670),f=n(7974),m=n(4916),v=n(3483),y=n(1784),g=n(824),w=n(6899),b=n(6247);e.default=function(){var t=this;this.remapPaginatedGames=function(e){var n=new h.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapGamesListResponse(e)})),n},this.remapGamesListResponse=function(e){var n=new u.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.scheduleOpenAt=e.schedule_open_at,n.predictionsCutoff=e.predictions_cutoff,n.fixtures=e.fixtures.map((function(e){return t.remapFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapGameByIdResponse=function(e){var n=new b.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.scheduleOpenAt=e.schedule_open_at,n.predictionsCutoff=e.predictions_cutoff,n.fixtures=e.fixtures.map((function(e){return t.remapFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.adContent=e.ad_content,n.labels=e.labels,n.customFields=e.custom_fields,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapFixturesResponse=function(t){var e=new r.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedUserTopXEditions=function(e){var n=new h.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapUserTopXEditionsResponse(e)})),n},this.remapUserTopXEditionsResponse=function(e){var n=new l.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.predictionsCutoff=e.predictions_cutoff,n.scheduleOpenAt=e.schedule_open_at,n.fixtures=e.fixtures.map((function(e){return t.remapTopXFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapTopXFixturesResponse=function(t){var e=new s.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedUserMathQuizEditions=function(e){var n=new h.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapUserMatchQuizEditionsResponse(e)})),n},this.remapUserMatchQuizEditionsResponse=function(e){var n=new c.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.predictionsCutoff=e.predictions_cutoff,n.scheduleOpenAt=e.schedule_open_at,n.fixtures=e.fixtures.map((function(e){return t.remapMatchQuizFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapMatchQuizFixturesResponse=function(t){var e=new i.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedGameResults=function(e){var n=new h.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapGameResults(e)})),n},this.remapGameResults=function(e){var n=new a.default;return n.userId=e.user_id,n.points=e.points?e.points:0,n.results=e.results.map((function(e){return t.remapResults(e)})),n.tiebreaker=e.tiebreaker?t.remapTiebreaker(e.tiebreaker):null,n},this.remapGameMarketsResults=function(e){var n=new p.default;return n.gameId=e.game_id,n.results=t.remapMarketsResults(e.results),n.tieBreakers=e.tie_breakers?t.remapTieBreakers(e.tie_breakers):null,n},this.remapContestWinners=function(e){var n=new y.default;return n.contestId=e.contest_id,n.contestType=e.contest_type,n.description=e.description,n.userList=e.user_list.map((function(e){return t.remapUserListWinners(e)})),n},this.remapUserListWinners=function(t){var e=new g.default;return e.position=t.position,e.profileId=t.profile_id,e.note=t.note,e.tags=t.tags,e},this.remapTieBreakers=function(t){var e={goldenGoals:[]};return e.goldenGoals=t.golden_goals.map((function(t){return{minute:t.minute,matchId:t.match_id,matchModel:null,playerId:t.player_id,playerModel:null,goalType:t.goal_type}})),e},this.remapMarketsResults=function(e){var n=[];return e.forEach((function(e){var r={matchId:e.match_id,market:e.market,result:t.remapMarketResult(e.market,e.result),matchModel:null,playerModels:[],matchStatus:t.remapMarketsResultsMatchStatus(e.match_status)};n.push(t.deleteUnusefulField(r))})),n},this.remapMarketsResultsMatchStatus=function(t){var e=new w.default;return e.type=t.type,e.subType=t.sub_type,e},this.remapMarketResult=function(t,e){return f.endMarkMarkets.includes(t)?e[0]:f.playerMarkets.includes(t)?e:"true"===e[0]||"false"!==e[0]&&void 0},this.deleteUnusefulField=function(e){return f.playerMarkets.includes(e.market)&&!t.isPlayerMarketWithNoResult(e.market,e.result)||delete e.playerModels,e},this.isPlayerMarketWithNoResult=function(t,e){return f.playerMarkets.includes(t)&&0===e.length},this.remapResults=function(t){var e=new o.default;return e.matchId=t.match_id,e.outcome=t.outcome,e},this.remapTiebreaker=function(t){var e=new d.default;return e.goldenGoal=t.golden_goal,e},this.remapTimeTiebreaker=function(t){var e=new m.default;return e.timeTiebreaker=t,e},this.remapRelated=function(t){return t.map((function(t){var e=new v.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))}}},8950:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.scheduleOpenAt=null,this.images=null}},7640:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.goldenGoal=null}},4916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.timeTiebreaker=!1}},1784:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.contestId="",this.contestType="GAME",this.contestModel=null,this.description="",this.userList=[]}},824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position="",this.profileId="",this.profileModel=null,this.note="",this.tags=[]}},3381:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.result=null}},1399:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1465);e.default=function(t){var e=this;this.gameInstanceId=null,this.fixtures=[],this.tiebreaker=null,this.gameInstanceId=t.gameInstanceId,t.fixtures.forEach((function(t){return e.fixtures.push(new r.default(t.matchId,t.market,t.prediction.value))})),this.tiebreaker=t.tiebreaker?t.tiebreaker:null}},9596:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),a=n(9502);e.default=function(t){var e=this;this.topXFacade=null,this.idMapping=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGamePredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameResults(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGameEditions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGamePrediction(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameWinners(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new s.default(t),this.topXFacade=new a.default(t,this.idMapping)}},4806:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),o=n(712);e.default=function(t,e,n){var u=this;this.idMapping=null,this.idSchema=null,this.native=a.IdSchemaEnum.NATIVE,this.footballFacade=null,this.remapSuccessRatesEntities=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return e=t.successRates,n={competition:this.getIdsKeys(e.byFootballCompetition),team:this.getIdsKeys(e.byFootballTeam)},Object.values(n.competition).length?(r=t.successRates.byFootballCompetition,i=t.successRates,[4,this.setModels(r,n.competition,"competition")]):[3,2];case 1:i.byFootballCompetition=s.sent(),s.label=2;case 2:return Object.values(n.team).length?(a=t.successRates.byFootballTeam,o=t.successRates,[4,this.setModels(a,n.team,"team")]):[3,4];case 3:o.byFootballTeam=s.sent(),s.label=4;case 4:return[2,t]}}))}))},this.setModels=function(t,e,n){return i(u,void 0,void 0,(function(){var i,a;return s(this,(function(s){switch(s.label){case 0:switch(i=null,e=(0,o.sortArrayInAscOrder)(e),n){case"competition":return[3,1];case"team":return[3,3]}return[3,5];case 1:return[4,this.footballFacade.getCompetitionsMapWithNativeIds(e)];case 2:case 4:return i=s.sent(),[3,5];case 3:return[4,this.footballFacade.getTeamsMapWithNativeIds(e)];case 5:return Object.keys(t).forEach((function(e){var n,s=i.get(e);(a=r(r({},a),((n={})[s.id]=t[e],n)))[s.id].model=s})),[2,a]}}))}))},this.getIdsKeys=function(t){var e=JSON.parse(JSON.stringify(t));return Object.keys(e)},this.remapInterestsToIdSchema=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,o,u,c,l,d;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,3]:t&&t.length>0?(e={},n={},t.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],n[t.type]=[]),e[t.type].push(t.id),n[t.type].push(t)})),[4,this.remapIdsObj(e,this.native,this.idSchema)]):[3,2];case 1:for(r=s.sent(),i=[],a=function(t,e){e.forEach((function(e,n){e.id=r[t][n],i.push(e)}))},o=0,u=Object.entries(n);o<u.length;o++)c=u[o],l=c[0],d=c[1],a(l,d);return[2,i];case 2:case 3:return[2,t]}}))}))},this.remapInterestToNative=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,2]:(e={},n=t.id,r=t.type,e[r]=[n],[4,this.remapIdsObj(e,this.idSchema,this.native)]);case 1:return i=s.sent(),t.id=i[r][0],[2,t];case 2:return[2,t]}}))}))},this.inquiryCustomInterests=function(t){var e=[];return t&&t.length>0&&(e=t.filter((function(t){return"CUSTOM"===t.source.toLocaleUpperCase()}))),e},this.remapInterests=function(t){return i(u,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return(e=this.inquiryCustomInterests(t))&&e.length>0?(n=t.filter((function(t){return"CUSTOM"!==t.source.toLocaleUpperCase()})),[4,this.remapInterestsToIdSchema(n)]):[3,2];case 1:return r=i.sent(),e.forEach((function(t){return r.push(t)})),[2,r];case 2:return[4,this.remapInterestsToIdSchema(t)];case 3:return[2,i.sent()]}}))}))},this.showFullInterests=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,o,u,c;return s(this,(function(s){switch(s.label){case 0:return e=[],t&&t.length>0?(n=this.inquiryCustomInterests(t),e.push(n),r=t.filter((function(t){return"CUSTOM"!==t.source.toLocaleUpperCase()})),[4,this.getInterestsEntitiesMap(r)]):[3,2];case 1:return i=s.sent(),a=i.competitionsMap,o=i.teamsMap,u=i.playersMap,c=r.map((function(t){var e=null;return"competition"===t.type?((e=a.get(t.id))&&(t.id=e.id),t.model=e,t):"team"===t.type?((e=o.get(t.id))&&(t.id=e.id),t.model=e,t):"player"===t.type?(u?(t.model=u[t.id],t.id=u[t.id].id):t.model=e,t):void 0})),e.push(c),[2,e.flat()];case 2:return[2,e]}}))}))},this.getInterestsEntitiesMap=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,u,c;return s(this,(function(s){switch(s.label){case 0:return e=[],n=[],r=[],i=new Map,a=new Map,u=null,t.forEach((function(t){"competition"===t.type?e.push(t.id):"team"===t.type?n.push(t.id):"player"===t.type&&r.push(t.id)})),e.length?(c=(0,o.sortArrayInAscOrder)(e),[4,this.footballFacade.getCompetitionsMapWithNativeIds(c)]):[3,2];case 1:i=s.sent(),s.label=2;case 2:return n.length?(c=(0,o.sortArrayInAscOrder)(n),[4,this.footballFacade.getTeamsMapWithNativeIds(c)]):[3,4];case 3:a=s.sent(),s.label=4;case 4:return r.length?(c=(0,o.sortArrayInAscOrder)(r),[4,this.footballFacade.getPlayersMapWithNativeIds(c)]):[3,6];case 5:u=s.sent(),s.label=6;case 6:return[2,{competitionsMap:i,teamsMap:a,playersMap:u}]}}))}))},this.remapIdsObj=function(t,e,n){return i(u,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,e,n)];case 1:return[2,r.sent()]}}))}))},this.idMapping=n,this.idSchema=t.idSchema,this.footballFacade=e}},4912:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),a=n(4806);e.default=function(t,e){var n=this;this.idMapping=null,this.profileOperations=null,this.remapSuccessRatesEntities=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapSuccessRatesEntities(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterestToNative=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterestToNative(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterests(t)];case 1:return[2,e.sent()]}}))}))},this.showFullInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.showFullInterests(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new s.default(t),this.profileOperations=new a.default(t,e,this.idMapping)}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.FansUnitedSDK=void 0;var e=n(6409),i=n(6595),s=n(8808),a=n(4946),o=n(1259),u=n(2962),c=n(9627),l=n(2671),d=n(9377),h=n(9596),p=n(267),f=n(7302),m=n(2141),v=n(7070),y=n(9580);t.FansUnitedSDK=function(t){var n=(new i.default).validate(t);if(n.idSchema.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.idSchema.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.idSchema.message.text),t.idSchema=a.IdSchemaEnum.NATIVE),n.environment.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.environment.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.environment.message.text),t.environment=l.EnvironmentEnum.PROD),n.lang.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.lang.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.lang.message.text),t.lang=d.LangEnum.EN),n.errorHandlingMode.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.errorHandlingMode.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.errorHandlingMode.message.text),t.errorHandlingMode=y.ErrorHandlingModeEnum.DEFAULT),n.authProvider.validation===c.ValidationResponseEnum.INVALID_VALUE&&console.warn(n.authProvider.message.text),n.isValid)return{profile:new e.default(t),football:new s.default(t),predictor:new o.default(t),loyalty:new u.default(t),topX:new h.default(t),matchQuiz:new p.default(t),activity:new f.default(t)};g(n)};var g=function(t){var e="authProvider",n="isValid";Object.keys(t).forEach((function(r){var i=t[r];if(r!==n&&r!==e){if(i.message.type===m.LogEnum.ERROR)throw new Error(i.message.text)}else r!==n&&r===e&&Object.keys(new v.default).forEach((function(t){if(i[t].message.type===m.LogEnum.ERROR)throw new Error(i[t].message.text)}))}))}})(),r})()}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.FansUnitedSDK=e():t.FansUnitedSDK=e()}(self,(function(){return(()=>{var t={9669:(t,e,n)=>{t.exports=n(1609)},5448:(t,e,n)=>{"use strict";var r=n(4867),i=n(6026),s=n(4372),a=n(5327),o=n(4097),u=n(4109),c=n(7985),l=n(5061),d=n(5655),h=n(5263);t.exports=function(t){return new Promise((function(e,n){var p,f=t.data,m=t.headers,v=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}r.isFormData(f)&&delete m["Content-Type"];var g=new XMLHttpRequest;if(t.auth){var w=t.auth.username||"",b=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var _=o(t.baseURL,t.url);function E(){if(g){var r="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,s={data:v&&"text"!==v&&"json"!==v?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g};i((function(t){e(t),y()}),(function(t){n(t),y()}),s),g=null}}if(g.open(t.method.toUpperCase(),a(_,t.params,t.paramsSerializer),!0),g.timeout=t.timeout,"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(E)},g.onabort=function(){g&&(n(l("Request aborted",t,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",t,null,g)),g=null},g.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||d.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var I=(t.withCredentials||c(_))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;I&&(m[t.xsrfHeaderName]=I)}"setRequestHeader"in g&&r.forEach(m,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete m[e]:g.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(g.withCredentials=!!t.withCredentials),v&&"json"!==v&&(g.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&g.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){g&&(n(!t||t&&t.type?new h("canceled"):t),g.abort(),g=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),f||(f=null),g.send(f)}))}},1609:(t,e,n)=>{"use strict";var r=n(4867),i=n(1849),s=n(321),a=n(7185),o=function t(e){var n=new s(e),o=i(s.prototype.request,n);return r.extend(o,s.prototype,n),r.extend(o,n),o.create=function(n){return t(a(e,n))},o}(n(5655));o.Axios=s,o.Cancel=n(5263),o.CancelToken=n(4972),o.isCancel=n(6502),o.VERSION=n(7288).version,o.all=function(t){return Promise.all(t)},o.spread=n(8713),o.isAxiosError=n(6268),t.exports=o,t.exports.default=o},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,n)=>{"use strict";var r=n(5263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},i.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(4867),i=n(5327),s=n(782),a=n(3572),o=n(7185),u=n(4875),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new s,response:new s}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=o(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(s),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var d=t;n.length;){var h=n.shift(),p=n.shift();try{d=h(d)}catch(t){p(t);break}}try{i=a(d)}catch(t){return Promise.reject(t)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},l.prototype.getUri=function(t){return t=o(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(o(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(o(r||{},{method:t,url:e,data:n}))}})),t.exports=l},782:(t,e,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},4097:(t,e,n)=>{"use strict";var r=n(1793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},5061:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,s){var a=new Error(t);return r(a,e,n,i,s)}},3572:(t,e,n)=>{"use strict";var r=n(4867),i=n(8527),s=n(6502),a=n(5655),o=n(5263);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new o("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(u(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},7185:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function a(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function u(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||s,i=e(t);r.isUndefined(i)&&e!==u||(n[t]=i)})),n}},6026:(t,e,n)=>{"use strict";var r=n(5061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},8527:(t,e,n)=>{"use strict";var r=n(4867),i=n(5655);t.exports=function(t,e,n){var s=this||i;return r.forEach(n,(function(n){t=n.call(s,t,e)})),t}},5655:(t,e,n)=>{"use strict";var r=n(4867),i=n(6016),s=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function o(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(5448)),u),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(o(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(o(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||c.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(a){if("SyntaxError"===t.name)throw s(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(a)})),t.exports=c},7288:t=>{t.exports={version:"0.24.0"}},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},5327:(t,e,n)=>{"use strict";var r=n(4867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var s;if(n)s=n(e);else if(r.isURLSearchParams(e))s=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),s=a.join("&")}if(s){var o=t.indexOf("#");-1!==o&&(t=t.slice(0,o)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,s,a){var o=[];o.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),r.isString(i)&&o.push("path="+i),r.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},6268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},7985:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},6016:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},4109:(t,e,n)=>{"use strict";var r=n(4867),i=["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"];t.exports=function(t){var e,n,s,a={};return t?(r.forEach(t.split("\n"),(function(t){if(s=t.indexOf(":"),e=r.trim(t.substr(0,s)).toLowerCase(),n=r.trim(t.substr(s+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var s={};i.transitional=function(t,e,n){function i(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(i(r," has been removed"+(e?" in "+e:"")));return e&&!s[r]&&(s[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var s=r[i],a=e[s];if(a){var o=t[s],u=void 0===o||a(o,s,t);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:i}},4867:(t,e,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function s(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function o(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:o,isPlainObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return o(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):s(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},6245:(t,e,n)=>{"use strict";function r(t){this.message=t}n.r(e),n.d(e,{default:()=>o,InvalidTokenError:()=>a}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,s=0,a=0,o="";i=e.charAt(a++);~i&&(n=s%4?64*n+i:i,s++%4)?o+=String.fromCharCode(255&n>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function s(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(i(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return i(e)}}function a(t){this.message=t}a.prototype=new Error,a.prototype.name="InvalidTokenError";const o=function(t,e){if("string"!=typeof t)throw new a("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(s(t.split(".")[n]))}catch(t){throw new a("Invalid token specified: "+t.message)}}},6595:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(682),i=n(2141),s=n(4241),a=n(6391),o=n(1512),u=n(4392),c=n(320),l=n(7631),d=n(6965),h=n(9158);e.default=function(){var t=this;this.validate=function(e){var n=t.checkFieldsForValues(e);return n.isValid=t.containsErrorMessage(n),n},this.checkFieldsForValues=function(t){for(var e=new l.default,n={apiKey:new o.default,environment:new a.default,idSchema:new u.default,clientId:new d.default,lang:new s.default,errorHandlingMode:new h.default,authProvider:new c.default},r=0,i=Object.entries(e);r<i.length;r++){var p=i[r],f=p[0];p[1],"isValid"!==f&&n[f].validate(t)}return Object.keys(n).forEach((function(r){e[r]=n[r].validate(t)})),e},this.containsErrorMessage=function(t){for(var e=!0,n=0,s=Object.entries(t);n<s.length;n++){var a=s[n],o=a[0],u=a[1];if(o!==r.ConfigFieldEnum.authProvider){if("isValid"!==o&&u.message.type===i.LogEnum.ERROR)return!1;if("isValid"!==o&&u.message.type===i.LogEnum.WARNING)return!0}else if(u.message.type===i.LogEnum.ERROR)return!1}return e}}},682:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigFieldEnum=void 0,(n=e.ConfigFieldEnum||(e.ConfigFieldEnum={})).apiKey="apiKey",n.environment="environment",n.idSchema="idSchema",n.clientId="clientId",n.lang="lang",n.authProvider="authProvider"},2671:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentEnum=void 0,(n=e.EnvironmentEnum||(e.EnvironmentEnum={})).DEV="dev",n.PROD="prod",n.STAGING="staging"},9580:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorHandlingModeEnum=void 0,(n=e.ErrorHandlingModeEnum||(e.ErrorHandlingModeEnum={})).DEFAULT="default",n.STANDARD="standard"},4946:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.IdSchemaEnum=void 0,(n=e.IdSchemaEnum||(e.IdSchemaEnum={})).NATIVE="native",n.ENETPULSE="enetpulse",n.SPORTRADAR="sportradar",n.SPORTAL_365="sportal365"},9377:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LangEnum=void 0,(n=e.LangEnum||(e.LangEnum={})).EN="en",n.BG="bg",n.RO="ro",n.EL="el"},2141:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LogEnum=void 0,(n=e.LogEnum||(e.LogEnum={})).ERROR="error",n.WARNING="warning"},9028:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationMessageEnum=void 0,(n=e.ValidationMessageEnum||(e.ValidationMessageEnum={})).API_KEY="The field apiKey with valid value must be provided to use Fans United JS SDK",n.CLIENT_ID="The field clientId must be provided to use Fans United JS SDK",n.LANG_MISSING="If no lang is passed the default one will be set which is: en",n.LANG_INVALID="This lang value is not supported, the default one will be set which is: en",n.ID_SCHEMA_MISSING="If no idSchema is passed the default one will be set which is: native",n.ID_SCHEMA_INVALID="This idSchema value is not supported, the default one will be set which is: native",n.ENVIRONMENT_MISSING="If no environment is passed the default one will be set which is: prod",n.ENVIRONMENT_INVALID="This environment value is not supported, the default one will be set which is: prod",n.ERROR_HANDLING_MODE_MISSING="If no errorHandlingMode is passed the default one will be set which is: default",n.ERROR_HANDLING_MODE_INVALID="This errorHandlingMode value is not supported, the default one will be set which is: default",n.AUTH_PROVIDER_CONFIG_PROP_MISSING="The following property is missing from the authProvider object:",n.AUTH_PROVIDER_CONFIG_INVALID_PROP="You have passed a property which is not supported for the authentication provider:",n.AUTH_PROVIDER_CONFIG_MISSING="The field authProvider must be provided to use this SDK",n.AUTH_PROVIDER_CONFIG_MISSING_CONFIG="The field authProvider has missing properties"},9627:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationResponseEnum=void 0,(n=e.ValidationResponseEnum||(e.ValidationResponseEnum={})).MISSING_VALUE="missing",n.INVALID_VALUE="invalid",n.VALID_VALUE="valid"},7070:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.getIdToken=null,this.logout=null}},2379:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3220);e.default=function(){this.validation=null,this.message=new r.default,this.getIdToken={validation:null,message:new r.default},this.logout={validation:null,message:new r.default}}},7631:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3074);e.default=function(){this.apiKey=null,this.environment=null,this.idSchema=null,this.clientId=null,this.lang=null,this.errorHandlingMode=null,this.authProvider={getIdToken:new r.default,logout:new r.default},this.isValid=!1}},3220:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.text=null,this.type=null}},3074:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},1512:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.API_KEY),t===r.ValidationResponseEnum.VALID_VALUE&&(n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.apiKey);return{validation:e,message:this.generateMessage(e)}},t}();e.default=a},320:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(7070),o=n(2379),u=function(){function t(){this.validateAuthProvider=function(t){var e=Object.keys(new a.default),n=new o.default;if(t){var u=Object.keys(t).filter((function(t){return!e.includes(t)}));u.length>0?(n.validation=r.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_INVALID_PROP+" "+u.join(",")):n.validation=r.ValidationResponseEnum.VALID_VALUE}else n.validation=r.ValidationResponseEnum.MISSING_VALUE,n.message.type=s.LogEnum.ERROR,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;return n},this.validateAuthProviderConfigFields=function(t,e){return Object.keys(new a.default).forEach((function(n){t[n]?e[n].validation=r.ValidationResponseEnum.VALID_VALUE:e[n].validation=r.ValidationResponseEnum.MISSING_VALUE})),e},this.generateAuthProviderConfigMessages=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){var n=t[e];n.validation===r.ValidationResponseEnum.MISSING_VALUE&&(n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING+" "+e,n.message.type=s.LogEnum.ERROR)})),t},this.checkAuthProviderConfigMessagesForErrors=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){t[e].validation===r.ValidationResponseEnum.MISSING_VALUE&&t.validation===r.ValidationResponseEnum.VALID_VALUE&&(t.validation=r.ValidationResponseEnum.INVALID_VALUE,t.message.type=s.LogEnum.ERROR,t.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG)})),t}}return t.prototype.validate=function(t){var e=this.validateAuthProvider(t.authProvider);return e.validation!==r.ValidationResponseEnum.MISSING_VALUE&&(e=this.validateAuthProviderConfigFields(t.authProvider,e),e=this.generateAuthProviderConfigMessages(e),e=this.checkAuthProviderConfigMessagesForErrors(e)),e},t}();e.default=u},6965:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.CLIENT_ID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.clientId);return{validation:e,message:this.generateMessage(e)}},t}();e.default=a},6391:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(2671),o=function(){function t(){this.validateField=function(t){var e=[a.EnvironmentEnum.DEV,a.EnvironmentEnum.STAGING,a.EnvironmentEnum.PROD];return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.environment);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},9158:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9580),i=n(2141),s=n(9028),a=n(9627);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.errorHandlingMode);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=[r.ErrorHandlingModeEnum.DEFAULT,r.ErrorHandlingModeEnum.STANDARD];return t?e.includes(t)?a.ValidationResponseEnum.VALID_VALUE:a.ValidationResponseEnum.INVALID_VALUE:a.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=i.LogEnum.WARNING;return t===a.ValidationResponseEnum.MISSING_VALUE&&(e=s.ValidationMessageEnum.ERROR_HANDLING_MODE_MISSING),t===a.ValidationResponseEnum.INVALID_VALUE&&(e=s.ValidationMessageEnum.ERROR_HANDLING_MODE_INVALID),t===a.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},4392:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(4946),o=function(){function t(){this.validateField=function(t){var e=[a.IdSchemaEnum.NATIVE,a.IdSchemaEnum.SPORTAL_365,a.IdSchemaEnum.ENETPULSE,a.IdSchemaEnum.SPORTRADAR];return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.idSchema);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},4241:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9377),i=n(9627),s=n(9028),a=n(2141);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.lang);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=[r.LangEnum.BG,r.LangEnum.RO,r.LangEnum.EN,r.LangEnum.EL];return null!=t&&t.length>0?e.includes(t)?i.ValidationResponseEnum.VALID_VALUE:i.ValidationResponseEnum.INVALID_VALUE:i.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.WARNING;return t===i.ValidationResponseEnum.MISSING_VALUE&&(e=s.ValidationMessageEnum.LANG_MISSING),t===i.ValidationResponseEnum.INVALID_VALUE&&(e=s.ValidationMessageEnum.LANG_INVALID),t===i.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},4021:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorCodes=void 0,(n=e.ErrorCodes||(e.ErrorCodes={}))[n.BAD_METHOD_CALL=400]="BAD_METHOD_CALL",n[n.UNAUTHORIZED=401]="UNAUTHORIZED"},4904:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorStatuses=void 0,(n=e.ErrorStatuses||(e.ErrorStatuses={})).INVALID_TEMPLATE="INVALID_TEMPLATE",n.INVALID_PREDICTION="INVALID_PREDICTION",n.INVALID_MARKET="INVALID_MARKET",n.INVALID_FIELD="INVALID_FIELD",n.INVALID_TYPE="INVALID_TYPE",n.EXCEEDED_LENGTH="EXCEEDED_LENGTH",n.INVALID_TOKEN="invalid_token",n.UNAUTHORIZED="unauthorized",n.INVALID_FILTERS="invalid_filters"},8097:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.code=0,i.status=null,i.message=null,i.errorMessage=function(){return i.message},i.code=e,i.status=n,i.message=r,i}return r(e,t),e}(Error);e.default=i},2535:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,n){this.response={error:{code:0,status:"",message:""}},this.response.error.code=t,this.response.error.status=e,this.response.error.message=n}},1260:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validFixtureFields=e.documentationLinks=e.ID_TYPES=void 0,e.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id"},e.documentationLinks={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},e.validFixtureFields=["matchId","matchType","market","prediction"]},712:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.constructStringArrayWithProvidedLength=e.sortArrayInAscOrder=e.initDisableCache=e.isDisabledCache=e.transformIdsToBeUnique=e.setBaseUrl=e.limitIds=e.requestChunkBuild=void 0;var r=n(2671);e.requestChunkBuild=function(t){var e=[],n=0;return e[n]=[],t.forEach((function(t){e[n].length<=199?e[n].push(t):(n++,e[n]=[t])})),e},e.limitIds=function(t,e){for(var n=[];t.length>e;){var r=t.splice(0,e);n.push(r)}return n.push(t),n},e.setBaseUrl=function(t,e){return t===r.EnvironmentEnum.PROD?{profile:"https://profile.fansunitedapi.com/v1",football:"https://football.fansunitedapi.com/v1",idMapping:"https://id-mapping.fansunitedapi.com/v1",predictor:"https://prediction.fansunitedapi.com/v1",client:"https://client.fansunitedapi.com/v1",loyalty:"https://loyalty.fansunitedapi.com/v1"}[e]:t===r.EnvironmentEnum.DEV?{profile:"http://localhost:8010/v1",football:"http://localhost:8080/v1",idMapping:"http://localhost:8030/v1",predictor:"http://localhost:8040/v1",client:"http://localhost:8070/v1",loyalty:"http://localhost:8060/v1"}[e]:{profile:"https://profile.fansunitedstagingapi.com/v1",football:"https://football.fansunitedstagingapi.com/v1",idMapping:"https://id-mapping.fansunitedstagingapi.com/v1",predictor:"https://prediction.fansunitedstagingapi.com/v1",client:"https://client.fansunitedstagingapi.com/v1",loyalty:"https://loyalty.fansunitedstagingapi.com/v1"}[e]},e.transformIdsToBeUnique=function(t){return t.filter((function(t,e,n){return e===n.indexOf(t)}))},e.isDisabledCache=function(t){return t||!1},e.initDisableCache=function(){return"&disable_cache="+Date.now()},e.sortArrayInAscOrder=function(t){return t.sort((function(t,e){return t.localeCompare(e)}))},e.constructStringArrayWithProvidedLength=function(t,e){for(var n=[],r=0;r<e;r++)n[r]=t;return n}},5601:function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var i=n(1260),s="FansUnited",a={football:{ids:[],countries:[],competitions:[],expirations:{ids:0}},profile:{info:{},statistics:{},badges:null,countries:[],expirations:{profile:0,statistics:0,badges:0}},client:{features:{},expirations:{features:0}}};e.default=function(t){var e=this;this.idSchema="",this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,this.clearData=function(){e.setData(a)},this.getEntityById=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),e.getData().football.ids.find((function(r){var s=i.ID_TYPES[e.idSchema];return r&&""+r[s]===n&&r.resource===t}))},this.getEntity=function(t,n,r){return Array.isArray(t)?e.getData().football.ids.filter((function(e){var s=i.ID_TYPES[r];return e&&t.includes(""+e[s])&&e.resource===n})):e.getData().football.ids.find((function(e){var s=i.ID_TYPES[r];return e&&""+e[s]===t&&e.resource===n}))},this.getEntityByNativeId=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),e.getData().football.ids.find((function(e){return e&&""+e.id===n&&e.resource===t}))},this.checkForExistingIdObjs=function(t,n){var r=i.ID_TYPES[n],s={};return Object.keys(t).forEach((function(i){var a=t[i],o=e.getEntity(a,i,n).map((function(t){return t[r]})),u=t[i].filter((function(t){return!o.includes(t)}));s[i]=a.map((function(t){return u.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}}))})),s},this.getIdsByType=function(t,n,r){var s=i.ID_TYPES[r],a=i.ID_TYPES[n],o={};return Object.keys(t).forEach((function(n){var r=t[n],i=[];e.getData().football.ids.forEach((function(t){r.forEach((function(e,r){e===t[a]&&n===t.resource&&(i[r]=t[s])}))})),o[n]=i})),o},this.addIdMapping=function(t){var n=e.getData();n.football.ids.push(t),e.setData(n)},this.addIdMappings=function(t){var n=e.getData(),i=n.football.ids;i=r(r([],i,!0),t,!0),n.football.ids=i,e.setData(n)},this.addTopIdMappings=function(t){var n=e.getData();if(n.football.ids.length){var i=JSON.parse(JSON.stringify(n.football.ids));i=i.filter((function(t){return"match"!==t.resource})),t=t.filter((function(t){return"match"===t.resource})),i=r(r([],i,!0),t,!0),n.football.ids=i}else n.football.ids=t;n.football.expirations.ids=Math.floor(Date.now()/1e3)+e.expirationFootballIdsTimeout,e.setData(n)},this.setOwnProfile=function(t){var n=e.getData();n.profile.info=t,n.profile.expirations.profile=Math.floor(Date.now()/1e3)+e.expirationProfileTimeout,e.setData(n)},this.getOwnProfile=function(){return e.getData().profile.info},this.getProfileCountries=function(){return e.getData().profile.countries},this.setProfileCountries=function(t){var n=e.getData();n.profile.countries=t,e.setData(n)},this.getProfileStats=function(){return e.getData().profile.statistics},this.setProfileStats=function(t){var n=e.getData();n.profile.statistics=t,n.profile.expirations.statistics=Math.floor(Date.now()/1e3)+e.expirationProfileTimeout,e.setData(n)},this.getProfileBadges=function(){return e.getData().profile.badges},this.setProfileBadges=function(t){var n=e.getData();n.profile.badges=t,n.profile.expirations.badges=Math.floor(Date.now()/1e3)+e.expirationBadgesTimeout,e.setData(n)},this.getFootballCountries=function(){return e.getData().football.countries},this.setFootballCountries=function(t){var n=e.getData();n.football.countries=t,e.setData(n)},this.getCompetitions=function(t){var n=e.getData();return t?t.competitionSearchFilter(n.football.competitions):n.football.competitions},this.setCompetitions=function(t){var n=e.getData(),i=r([],n.football.competitions,!0);i.push.apply(i,t),n.football.competitions=e.makeCompetitionsUnique(i),e.setData(n)},this.getCompetitionsLength=function(){return e.getData().football.competitions.length},this.getClientFeatures=function(){return e.getData().client.features},this.setClientFeatures=function(t){var n=e.getData(),r=JSON.parse(JSON.stringify(t));n.client.expirations.features=Math.floor(Date.now()/1e3)+e.expirationClientFeaturesTimeout,n.client.features=r,e.setData(n)},this.getExpiration=function(t,n){e.initialNewSchema(t,"expirations");var r=e.getData();switch(n){case"profile":return r.profile.expirations.profile;case"statistics":return r.profile.expirations.statistics;case"badges":return r.profile.expirations.badges;case"features":return r.client.expirations.features;case"ids":return r.football.expirations.ids}},this.makeCompetitionsUnique=function(t){var e=new Set;return t.filter((function(t){var n=!e.has(t.id);return e.add(t.id),n}))},this.getData=function(){return JSON.parse(localStorage.getItem(s))},this.setData=function(t){localStorage.setItem(s,JSON.stringify(t))},this.initialNewSchema=function(t,n){var r=e.getData();r&&r[t]&&r[t][n]||e.setData(a)},this.idSchema=t.idSchema,void 0!==this.getData()&&null!==this.getData()||this.setData(a)}},5318:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.invalidTypeMessage=e.missingFieldsMessage=e.invalidFieldMessage=e.invalidMarketTopXMessage=e.invalidMarketMessage=e.invalidPredictionMessage=e.WarningMessages=e.ErrorMessages=void 0;var r,i=n(1260);(r=e.ErrorMessages||(e.ErrorMessages={})).LOYALTY_INVALID_TEMPLATE_ID="Provided template ID does NOT exist! Try again with existing template ID.",r.INVALID_MATCH_ID="Match id is invalid!",r.INVALID_PLAYER_ID="Player id is invalid!",r.QUERY_PARAM_MATCH_IDS_EXCEEDED="Maximum matchIds in PredictionFilters should be 10 or less.",r.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED="Maximum limit for filtering games is 50 or less.",r.INVALID_PREDICTION_FIELD="Prediction field is invalid. For more information please visit our documentation",r.INVALID_TOKEN="Invalid JWT token is provided",r.EXPIRED_TOKEN="The provided JWT token is expired",r.ENTITIES_NEEDED="At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.",r.ENTITIES_FOLLOWS_FILTERS_EXCEEDED="Maximum length per entity should be 10 or less.",e.WarningMessages={UNEXPECTED_STATUS_PROP:"Unexpected provided property 'status'. You can NOT use this property for this method. For more information visit our documentation: \n "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION,UNEXPECTED_TYPE_PROP:"Unexpected provided property 'type'. You can NOT use this property for this method. For more information visit our documentation: \n "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION},e.invalidPredictionMessage=function(t,e){return"The prediction '"+t+"' is invalid for market '"+e+"'. Please check again have you passed appropriate prediction model. For more information please visit our documentation: https://docs.fansunitedmedia.com/sdks/js/match.quiz#gamerelatedoperations"},e.invalidMarketMessage=function(t){return"The market '"+t+"' is not supported from Fans United. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},e.invalidMarketTopXMessage=function(t){return"The market '"+t+"' is not valid for Top X game. The only available market is CORRECT_SCORE."},e.invalidFieldMessage=function(t){return"The field/s '"+(t.length>1?t.join(", "):t[0])+"' is/are invalid. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk"},e.missingFieldsMessage=function(t,e){return"The following field/s is/are missing from "+t+": '"+(e.length>1?e.join(", "):e[0])+"'. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},e.invalidTypeMessage=function(t,e){return"The field "+t+" has incorrect type. The correct type is "+e}},4800:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=t.limit?t.limit:null,this.startAfter=t.startAfter?t.startAfter:null}return t.prototype.constructMainFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit="+this.limit),this.startAfter&&(t+="&",t+="start_after="+this.startAfter),t},t}();e.default=n},439:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.main=null,this.cover=null,this.mobile=null}},8872:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8902);e.default=function(){this.pagination=new r.default}},8902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.nextPageStartsAfter=null,this.itemsPerPage=null}},1553:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8872);e.default=function(){this.meta=new r.default,this.data=[]}},3623:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8872);e.default=function(){this.remapMetaData=function(t){var e=new r.default;return e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.itemsPerPage=t.pagination.items_per_page,e}}},3483:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId=null,this.entityType=null}},6208:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.axiosError=void 0,e.axiosError=function(t,e,n){var r={data:t.data,status:e,statusText:n,headers:t.headers,config:t};return{code:String(e),config:t,isAxiosError:!0,toJSON:function(){return{}},name:"Unauthorized",message:n,response:r}}},1022:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(2453),c=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"loyalty"))||this;return n.activityRemapper=null,n.createActivity=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),e="/activities"+this.apiSignInUrl,[4,this.instanceAuth.post(e,JSON.stringify(t))];case 1:return n=s.sent(),[2,this.activityRemapper.remapSingleResponse(n.data)];case 2:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with creating activity for user",i),i.response;case 3:return[2]}}))}))},n.deleteActivity=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e="/activities/"+t+this.apiSignInUrl,[4,this.instanceAuth.delete(e)];case 1:return i.sent(),[2,!0];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem deleting the following activity: "+t,r),r.response;case 3:return[2]}}))}))},n.getOwnActivities=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/activities"+this.apiSignInUrl,r=Date.now(),t&&(n+=""+t.constructFilterUrl()),e&&(n+="disable_cache="+r),[4,this.instanceAuth.get(n)];case 1:return i=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with fetching own activities",o),o.response;case 3:return[2]}}))}))},n.getActivitiesForUser=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/users/"+t+"/activities"+this.apiSignInUrl,i=Date.now(),e&&(n+=""+e.constructFilterUrl()),r&&(n+="disable_cache="+i),[4,this.instance.get(n)];case 1:return s=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(s.data)];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with fetching activities for user "+t,u),u.response;case 3:return[2]}}))}))},n.getStats=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,5,,6]),n="",r=null,t?(n+=(0,o.isDisabledCache)(e)?"/users/"+t+"/statistics"+this.apiSignInUrl+(0,o.initDisableCache)():"/users/"+t+"/statistics"+this.apiSignInUrl,[4,this.instance.get(n)]):[3,2];case 1:return r=a.sent(),[3,4];case 2:return n+="/statistics"+this.apiSignInUrl,[4,this.instanceAuth.get(n)];case 3:r=a.sent(),a.label=4;case 4:return[2,this.activityRemapper.remapStatsReponse(r.data.data)];case 5:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching profile`s statistics:",s),s.response;case 6:return[2]}}))}))},n.activityRemapper=new u.default,n}return i(e,t),e}(n(7724).default);e.default=c},7686:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureConfigType=void 0;var o,u=n(712),c=n(704),l=n(7724),d=n(5601);(o=e.FeatureConfigType||(e.FeatureConfigType={})).PREDICTOR="predictor",o.TOP_X="topX",o.MATCH_QUIZ="matchQuiz",o.LOYALTY="loyalty";var h=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"client"))||this;return n.featureConfigRemapper=null,n.localStorage=null,n.clientId=null,n.getConfig=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),(e=this.getCachedFeatures())?[3,2]:(n="/clients/"+this.clientId+"/features",r=this.apiSignInUrl.split("&")[0],[4,this.instance.get(""+n+r)]);case 1:i=a.sent(),e=i.data.data,this.localStorage.setClientFeatures(e),a.label=2;case 2:switch(t){case"predictor":return[2,this.featureConfigRemapper.remapPredictorConfig(e.predictor)];case"topX":return[2,this.featureConfigRemapper.remapTopXConfig(e.top_x)];case"matchQuiz":return[2,this.featureConfigRemapper.remapMatchQuizConfig(e.match_quiz)];case"loyalty":return[2,this.featureConfigRemapper.remapLoyaltyConfig(e.loyalty)]}return[3,4];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching configuration from Client API",o),o.response;case 4:return[2]}}))}))},n.getCachedFeatures=function(){var t=n.getLocalStorageData();if(t&&Object.keys(t).length)return t},n.getLocalStorageData=function(){var t=Math.floor(Date.now()/1e3);return n.localStorage.getExpiration("client","features")>t?n.localStorage.getClientFeatures():null},n.clientId=e.clientId,n.localStorage=new d.default(e),n.featureConfigRemapper=new c.default,n}return i(e,t),e}(l.default);e.default=h},595:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(3430),c=n(7316),l=n(8758),d=n(5827),h=n(7821),p=n(5284),f=n(9330),m=n(4729),v=n(5157),y=n(7943),g=n(7287),w=n(753),b=n(1925),_=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"football"))||this;return n.limitIds=200,n.countryRemapper=null,n.competitionBasicRemapper=null,n.competitionFullRemapper=null,n.teamBasicRemapper=null,n.teamFullRemapper=null,n.matchBasicRemapper=null,n.matchFullRemapper=null,n.playerBasicRemapper=null,n.playerFullRemapper=null,n.topPlayerRemapper=null,n.searchRemapper=null,n.footballMetaRemapper=null,n.getCountries=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/countries"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return r=a.sent(),[2,this.countryRemapper.countriesFromResponse(r.data.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with the football countries request",s),s.response;case 3:return[2]}}))}))},n.getCompetitions=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),e=e||!1,!(t&&t.competitionIds&&t.competitionIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(t.competitionIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],t.competitionIds=l,d="/competitions"+this.apiSignInUrl+t.constructFilterUrl(),e&&(d+="&disable_cache="+r),[4,this.instance.get(d)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(t){return f.competitionBasicRemapper.fromResponse(t)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d="/competitions"+this.apiSignInUrl,t&&(d+=""+t.constructFilterUrl()),e&&(d+="&disable_cache="+r),[4,this.instance.get(d)];case 6:return[2,(n=a.sent()).data.data.map((function(t){return f.competitionBasicRemapper.fromResponse(t)}))];case 7:return[3,9];case 8:throw h=a.sent(),p=this.transformAxiosErrorToFansUnitedException(h),console.warn("There was a problem with getCompetitions request",p),p.response;case 9:return[2]}}))}))},n.getCompetitionById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/competitions/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.competitionFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getCompetitionById request",o),o.response;case 3:return[2]}}))}))},n.getTopCompetitions=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/competitions/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,a.sent().data.data.map((function(t){return s.competitionBasicRemapper.fromResponse(t)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopCompetitions request",i),i.response;case 3:return[2]}}))}))},n.getTeams=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(t&&t.teamIds&&t.teamIds.length>this.limitIds))return[3,5];i=[],s=(0,o.limitIds)(t.teamIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],t.teamIds=l,h="/teams"+this.apiSignInUrl+t.constructFilterUrl(),e&&(h+="disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/teams"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getTeams request",f),f.response;case 9:return[2]}}))}))},n.getTeamById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.teamFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getTeamById request",o),o.response;case 3:return[2]}}))}))},n.getTopTeams=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s,o=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/teams/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="$disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,(r=a.sent()).data.data?r.data.data.map((function(t){return o.teamBasicRemapper.fromResponse(t)})):[]];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with getTopTeams request",s),s.response;case 3:return[2]}}))}))},n.getNextMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+t+"/next-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+t+"/previous-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPlayers=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(t&&t.playerIds&&t.playerIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(t.playerIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],t.playerIds=l,h="/players"+this.apiSignInUrl+t.constructFilterUrl(),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/players"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getPlayers request",f),f.response;case 9:return[2]}}))}))},n.getPlayerById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.playerFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPlayerById request",o),o.response;case 3:return[2]}}))}))},n.getTopPlayers=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/players/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,a.sent().data.data.map((function(t){return s.topPlayerRemapper.fromResponse(t)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopPlayers request",i),i.response;case 3:return[2]}}))}))},n.getNextMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+t+"/next-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+t+"/previous-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getMatchById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/matches/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getMatchById request",o),o.response;case 3:return[2]}}))}))},n.getMatches=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u,c=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=new w.default,r="/matches"+this.apiSignInUrl,i=Date.now(),t&&(r+=""+t.constructFilterUrl()),e&&(r+="&disable_cache="+i),[4,this.instance.get(r)];case 1:return s=a.sent(),n.meta=this.footballMetaRemapper.remapMetaProp(s.data.meta),n.data=s.data.data.map((function(t){return c.matchBasicRemapper.fromResponse(t)})),[2,n];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with getMatches request",u),u.response;case 3:return[2]}}))}))},n.search=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/search"+this.apiSignInUrl+t.constructFilterUrl(),r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.searchRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with search request",o),o.response;case 3:return[2]}}))}))},n.apiSignInUrl="en"!==e.lang?n.apiSignInUrl+"&lang="+e.lang:n.apiSignInUrl,n.countryRemapper=new u.default,n.competitionBasicRemapper=new c.default,n.competitionFullRemapper=new l.default,n.teamBasicRemapper=new d.default,n.teamFullRemapper=new h.default,n.matchBasicRemapper=new p.default,n.matchFullRemapper=new f.default,n.playerBasicRemapper=new v.default,n.playerFullRemapper=new y.default,n.topPlayerRemapper=new m.default,n.searchRemapper=new g.default,n.footballMetaRemapper=new b.default,n}return i(e,t),e}(n(7724).default);e.default=_},7724:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9669),i=n(6245),s=n(4021),a=n(4904),o=n(2535),u=n(6208),c=n(5318);e.default=function(t,e){var n=this;this.apiSignInUrl=null,this.instanceAuth=null,this.instance=null,this.errorHandlingMode=null,this.transformAxiosErrorToFansUnitedException=function(t){if("standard"===n.errorHandlingMode&&t.response&&t.response.data&&t.response.data.error){var e=t.response.data.error,r=e.code,i=e.status,s=e.message;return new o.default(r,i,s)}return t},this.apiSignInUrl="?key="+t.apiKey+"&client_id="+t.clientId,this.errorHandlingMode=t.errorHandlingMode,this.instanceAuth=r.default.create({baseURL:e,headers:{Authorization:"Bearer "+t.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instanceAuth.interceptors.request.use((function(e){var l=null;try{l=(0,i.default)(t.authProvider.getIdToken())}catch(t){if("default"===n.errorHandlingMode)throw(0,u.axiosError)(e,401,t.message);if("standard"===n.errorHandlingMode)throw new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.INVALID_TOKEN)}return Date.now()>l.exp?(r.default.defaults.headers.common.Authorization="Bearer "+t.authProvider.getIdToken(),e.headers.Authorization="Bearer "+t.authProvider.getIdToken(),e):e}),(function(t){Promise.reject(t)})),this.instanceAuth.interceptors.response.use((function(t){return t}),(function(e){var r,i,u,l=e.config;if((403===(null===(r=e.response)||void 0===r?void 0:r.status)||401===(null===(i=e.response)||void 0===i?void 0:i.status))&&!l._retry){l._retry=!0;var d=t.authProvider.getIdToken();return l.headers.Authorization="Bearer "+d,n.instanceAuth(l)}if("standard"===n.errorHandlingMode&&401===(null===(u=e.response)||void 0===u?void 0:u.status)){var h=new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.EXPIRED_TOKEN);return Promise.reject(h)}return Promise.reject(e)})),this.instance=r.default.create({baseURL:e,headers:{"Content-Type":"application/json"}})}},8539:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(7724),c={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"},l=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"idMapping"))||this;return n.getEntityById=function(t,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+e.idSchema+"&"+c[t]+"="+r)}catch(t){throw console.warn("There was a problem with id mapping request for the following id:"+r,t),t.response}},n.getEntityByIdAndSchema=function(t,e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e)}catch(t){throw console.warn("There was a problem with id mapping request for the following id:"+e,t),t.response}},n.getEntityIdsByIdsAndSchema=function(t,e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e.join(","))}catch(t){throw console.warn("There was a problem with id mapping request for the following ids:"+e.join(","),t),t.response}},n.getEntitiesByIds=function(t,e,r){e.sort((function(t,e){return t.localeCompare(e)}));var i=(0,o.requestChunkBuild)(e).map((function(e){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e.join(","))}catch(t){var i=n.transformAxiosErrorToFansUnitedException(t);throw console.warn("There was a problem with id mapping request for the following ids:"+e.join(","),i),i.response}}));return Promise.all(i).then((function(t){var e=[];return t.forEach((function(t){e.push.apply(e,t.data.data)})),e}))},n.getEntitiesByIdObjs=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,l,d,h,p,f;return a(this,(function(m){switch(m.label){case 0:n=[],r={},i=[],Object.keys(t).forEach((function(e){n.push.apply(n,t[e])})),s=(0,o.transformIdsToBeUnique)(n),u=(0,o.requestChunkBuild)(s),l=function(n){var s,o,u,l;return a(this,(function(a){switch(a.label){case 0:if(s="",Object.keys(t).forEach((function(e){r[e]=[];var i=n.filter((function(n){return t[e].includes(n)}));i&&i.length>0&&(r[e]=i)})),Object.keys(r).forEach((function(t){r[t].length>0&&(r[t].sort((function(t,e){return t.localeCompare(e)})),s+="&",s+=c[t]+"="+r[t].join(","))})),!(s&&s.length>0))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,d.instance.get("/football"+d.apiSignInUrl+"&input_provider="+(e||"native")+s)];case 2:return o=a.sent(),i.push(o.data.data),[3,4];case 3:throw u=a.sent(),l=d.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem with id mapping request",l),l.response;case 4:return[3,6];case 5:i.push([]),a.label=6;case 6:return[2]}}))},d=this,h=0,p=u,m.label=1;case 1:return h<p.length?(f=p[h],[5,l(f)]):[3,4];case 2:m.sent(),m.label=3;case 3:return h++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)]}}))}))},n.getTopEntities=function(){return s(n,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/football/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data];case 2:throw t=n.sent(),e=this.transformAxiosErrorToFansUnitedException(t),console.warn("There was a problem with top id mappings request",e),e.response;case 3:return[2]}}))}))},n.apiSignInUrl=n.apiSignInUrl.split("&")[0],n}return i(e,t),e}(u.default);e.default=l},7059:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(7419),c=n(4533),l=n(8899),d=n(7746),h=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"loyalty"))||this;return n.templateRemapper=null,n.leaderboardRemapper=null,n.rankingsRemapper=null,n.highestSuccessRateRemapper=null,n.getTemplates=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/templates/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),e?((i=JSON.parse(JSON.stringify(r.data))).meta=this.templateRemapper.remapMeta(r.data.meta),i.data=this.templateRemapper.remapResponse(r.data.data),[2,i]):[2,this.templateRemapper.remapResponse(r.data.data)];case 2:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the list of templates",u),u.response;case 3:return[2]}}))}))},n.getTemplateById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/templates/"+t+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+t+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.templateRemapper.remapResponseId(r.data.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem requesting the following template: "+t,s),s.response;case 3:return[2]}}))}))},n.getLeaderboard=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/"+t+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/"+t+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following template: "+t,c),c.response;case 3:return[2]}}))}))},n.getLeaderboardForGame=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/games/"+t+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/games/"+t+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following game: "+t,c),c.response;case 3:return[2]}}))}))},n.getUserRankings=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,u;return a(this,(function(a){switch(a.label){case 0:n="/leaderboard/users/"+t+"/rankings/"+this.apiSignInUrl,e&&(n+=""+e.constructFiltersUrl()),(0,o.isDisabledCache)(r)&&(n+=""+(0,o.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return i=a.sent(),[2,this.rankingsRemapper.remapRankings(i.data)];case 3:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the rankings for the following user: "+t,u),u.response;case 4:return[2]}}))}))},n.getHighestSuccessRate=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,o.isDisabledCache)(e)?"/statistics/top"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/top"+this.apiSignInUrl,t&&(n+="&market="+t),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.highestSuccessRateRemapper.remapHighestSuccessRate(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching highest success rate",s),s.response;case 4:return[2]}}))}))},n.getEntitiesFollows=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return a(this,(function(s){switch(s.label){case 0:n=(0,o.isDisabledCache)(e)?"/statistics/follows"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/follows"+this.apiSignInUrl,t.footballCompetitions&&(n+="&competitions="+t.footballCompetitions.join(",")),t.footballTeams&&(n+="&teams="+t.footballTeams.join(",")),t.footballPlayers&&(n+="&players="+t.footballPlayers.join(",")),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return[2,s.sent().data.data];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching follows for entities",i),i.response;case 4:return[2]}}))}))},n.templateRemapper=new l.default,n.leaderboardRemapper=new u.default,n.rankingsRemapper=new c.default,n.highestSuccessRateRemapper=new d.default,n}return i(e,t),e}(n(7724).default);e.default=h},2793:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(2726),u=n(9679),c=n(712),l=n(4780),d=n(1553),h=n(3623),p=function(t){function e(e,n){var r=t.call(this,e,(0,c.setBaseUrl)(e.environment,"predictor"))||this;return r.predictionRemapper=null,r.matchSummaryRemapper=null,r.gamesRemapper=null,r.metaRemapper=null,r.makeFootballPrediction=function(t){return s(r,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e=this.predictionRemapper.remapRequestBody(t),[4,this.instanceAuth.post("/predictions"+this.apiSignInUrl,JSON.stringify(e))];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseObjBody(n.data)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem making POST request: ",i),i.response;case 4:return[2]}}))}))},r.getMatchSummary=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,c.isDisabledCache)(e)?"/predictions/summary/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/summary/"+t+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.matchSummaryRemapper.remapResponse(r.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching predictions for match: "+t+" ",s),s.response;case 4:return[2]}}))}))},r.deleteFootballPrediction=function(t){return s(r,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.delete("/predictions/"+t+this.apiSignInUrl)];case 1:return r.sent(),[2,!0];case 2:throw e=r.sent(),n=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem deleting your prediction: "+t,n),n.response;case 3:return[2]}}))}))},r.getMyPredictions=function(t){return s(r,void 0,void 0,(function(){var e,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),e=new d.default,n="/predictions"+this.apiSignInUrl,t&&(n+=""+t.constructFiltersUrl()),[4,this.instanceAuth.get(n)];case 1:return r=a.sent(),e.meta=this.metaRemapper.remapMetaData(r.data.meta),i=e,[4,this.predictionRemapper.remapResponseArrayBody(r.data.data)];case 2:return i.data=a.sent(),[2,e];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching own predictions",o),o.response;case 4:return[2]}}))}))},r.getMyPredictionsNoRemap=function(t){return s(r,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+t.constructFiltersUrl())];case 1:return[2,r.sent().data];case 2:throw e=r.sent(),n=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem fetching own predictions",n),n.response;case 3:return[2]}}))}))},r.getUserPredictions=function(t,e,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(e)?"/predictions/users/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/users/"+t+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching predictions for user: "+t,l),l.response;case 4:return[2]}}))}))},r.getUserPredictionsNoRemap=function(t,e){return s(r,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/predictions/users/"+t+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return[2,i.sent().data];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching predictions for user: "+t,r),r.response;case 3:return[2]}}))}))},r.getGames=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(e)?"/games/"+this.apiSignInUrl+t.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+t.constructFiltersUrl(),[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapPaginatedGames(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the games list",s),s.response;case 3:return[2]}}))}))},r.getGameById=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(e)?"/games/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapGameByIdResponse(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the following game: "+t,s),s.response;case 3:return[2]}}))}))},r.getGamePredictions=function(t,e,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(e)?"/games/"+t+"/predictions"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+"/predictions"+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the predictions for game: "+t,l),l.response;case 4:return[2]}}))}))},r.getUserGameEditions=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s,o,u=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=null,r=(0,c.isDisabledCache)(e)?"/games/"+this.apiSignInUrl+t.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+t.constructFiltersUrl(),[4,this.instance.get(r)];case 1:return(i=a.sent()).data.data.forEach((function(t){"TOP_X"===t.type?n=u.gamesRemapper.remapPaginatedUserTopXEditions(i.data):"MATCH_QUIZ"===t.type&&(n=u.gamesRemapper.remapPaginatedUserMathQuizEditions(i.data))})),[2,n];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the games list",o),o.response;case 3:return[2]}}))}))},r.getGameResults=function(t,e,n){return s(r,void 0,void 0,(function(){var r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),r=(0,c.isDisabledCache)(e)?"/games/"+t+"/results/"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+"/results/"+this.apiSignInUrl,n&&(r+=""+n.constructMainFiltersUrl()),[4,this.instance.get(r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapPaginatedGameResults(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the results for the following game: "+t,o),o.response;case 3:return[2]}}))}))},r.getMarketResultsForGame=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n="/games/"+t+"/correct-results/"+this.apiSignInUrl,(0,c.isDisabledCache)(e)&&(n+=""+(0,c.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.gamesRemapper.remapGameMarketsResults(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the markets correct results for the following game: "+t,s),s.response;case 4:return[2]}}))}))},r.getContestWinners=function(t){return s(r,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/winners/"+this.apiSignInUrl+"&contest_id="+t)];case 1:return e=i.sent(),[2,this.gamesRemapper.remapContestWinners(e.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching winners for the following game: "+t,r),r.response;case 3:return[2]}}))}))},r.getPredictionById=function(t){return s(r,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e="/predictions/"+t+this.apiSignInUrl,[4,this.instanceAuth.get(e)];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseArrayBody([n.data.data])];case 2:return[2,s.sent()[0]];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching info for the following prediction: "+t,i),i.response;case 4:return[2]}}))}))},r.predictionRemapper=new o.default(e,n),r.matchSummaryRemapper=new u.default(e,n),r.gamesRemapper=new l.default,r.metaRemapper=new h.default,r}return i(e,t),e}(n(7724).default);e.default=p},4275:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(441),c=n(8673),l=n(6277),d=n(1712),h=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"profile"))||this;return n.profileRemapper=null,n.followingRemapper=null,n.followersRemapper=null,n.lang=null,n.limitIds=100,n.getCountries=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="&lang="+this.lang,n="/countries"+this.apiSignInUrl+e,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return[2,a.sent().data.data];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the countries:",s),s.response;case 3:return[2]}}))}))},n.getProfile=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:if(e="/profile"+this.apiSignInUrl,!t)return[3,5];e="/profiles/"+t+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(e)];case 2:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 3:throw n=a.sent(),s=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching the following profile: "+t,s),s.response;case 4:return[3,8];case 5:return a.trys.push([5,7,,8]),[4,this.instanceAuth.get(e)];case 6:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 7:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching your profile from API:",s),s.response;case 8:return[2]}}))}))},n.getProfiles=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,7,,8]),n=Date.now(),!(t.length>this.limitIds))return[3,5];r=[],i=(0,o.limitIds)(t,this.limitIds),s=0,u=i,a.label=1;case 1:return s<u.length?(c=u[s],l="/profiles"+this.apiSignInUrl+"&profile_ids="+c.join(","),e&&(l+="&disable_cache="+n),[4,this.instance.get(l)]):[3,4];case 2:d=a.sent(),r.push.apply(r,this.profileRemapper.profilesFromResponse(d.data.data)),a.label=3;case 3:return s++,[3,1];case 4:return[2,r];case 5:return h="/profiles"+this.apiSignInUrl+"&profile_ids="+t.join(","),e&&(h+="&disable_cache="+n),[4,this.instance.get(h)];case 6:return p=a.sent(),[2,this.profileRemapper.profilesFromResponse(p.data.data)];case 7:throw f=a.sent(),m=this.transformAxiosErrorToFansUnitedException(f),console.warn("There was a problem fetching the following profiles: "+t.join(","),m),m.response;case 8:return[2]}}))}))},n.getFollowers=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/followers"+this.apiSignInUrl,!t||e)return[3,5];n="/profile/followers"+this.apiSignInUrl+t.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 4:return[3,9];case 5:if(t||e)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 9:t&&e?n="/profile/"+e+"/followers"+this.apiSignInUrl+t.constructFilterUrl():!t&&e&&(n="/profile/"+e+"/followers"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers for profile: "+e,u),u.response;case 13:return[2]}}))}))},n.getFollowing=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/following"+this.apiSignInUrl,!t||e)return[3,5];n="/profile/following"+this.apiSignInUrl+t.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 4:return[3,9];case 5:if(t||e)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 9:t&&e?n="/profile/"+e+"/following"+this.apiSignInUrl+t.constructFilterUrl():!t&&e&&(n="/profile/"+e+"/following"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers of the following profile: "+e,u),u.response;case 13:return[2]}}))}))},n.follow=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:(e=new d.default).profile_ids=t,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instanceAuth.post("/profile/follow"+this.apiSignInUrl,JSON.stringify(e))];case 2:return n=s.sent(),[2,this.followingRemapper.followResponse(n.data.data)];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with POST request for profiles: "+t.join(",")+" ",i),i.response;case 4:return[2]}}))}))},n.unfollow=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:(e=new d.default).profile_ids=t,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.delete("/profile/follow"+this.apiSignInUrl,{data:JSON.stringify(e)})];case 2:return i.sent(),[2,!0];case 3:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with DELETE request for profiles: "+t.join(",")+" ",r),r.response;case 4:return[2]}}))}))},n.getBadges=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:e="/profile/badges"+this.apiSignInUrl,i.label=1;case 1:return i.trys.push([1,5,,6]),t?(e="/profile/"+t+"/badges"+this.apiSignInUrl,[4,this.instance.get(e)]):[3,3];case 2:return[2,i.sent().data.data];case 3:return[4,this.instanceAuth.get(e)];case 4:return[2,i.sent().data.data];case 5:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with fetching the badges",r),r.response;case 6:return[2]}}))}))},n.updateProfile=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instanceAuth.patch("/profile"+this.apiSignInUrl,t)];case 1:return e=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(e.data.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem updating the own profile:",r),r.response;case 3:return[2]}}))}))},n.lang=e.lang,n.profileRemapper=new u.default,n.followingRemapper=new c.default,n.followersRemapper=new l.default,n}return i(e,t),e}(n(7724).default);e.default=h},5792:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(5601),a=n(8539),o=n(1260);e.default=function(t){var e=this;this.isBrowser=!1,this.localStorage=null,this.https=null,this.getEntitiesByIds=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,a,u,c,l;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?[4,this.setTopIdMappings()]:[3,6];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),e=this.localStorage.checkForExistingIdObjs(t,n),r=this.splitForRequestAndExisting(e),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 3:return a=i.sent(),this.localStorage.addIdMappings(a),[2,this.localStorage.getIdsByType(t,n,s)];case 4:return u=i.sent(),console.warn("There was a problem retrieving the entity ids ",u),[2,Promise.resolve([])];case 5:return[3,9];case 6:return i.trys.push([6,8,,9]),[4,this.https.getEntitiesByIdObjs(t,n)];case 7:return c=i.sent(),Object.keys(t).forEach((function(e){t[e]=c.filter((function(t){return t.resource===e})).map((function(t){return t[o.ID_TYPES[s]]}))})),[2,t];case 8:return l=i.sent(),console.warn("There was a problem retrieving the entity ids ",l),[2,Promise.resolve([])];case 9:return[2]}}))}))},this.getEntityById=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=this.localStorage.getEntity(t,n,s))?[2,e]:[3,1]:[3,4];case 1:case 4:return[4,this.requestEntity(t,n,s)];case 2:return r=i.sent(),this.localStorage.addIdMappings(r),[2,r];case 3:return[3,6];case 5:return[2,i.sent()];case 6:return[2]}}))}))},this.splitForRequestAndExisting=function(t){var e={},n={};return Object.keys(t).forEach((function(r){e[r]=t[r].filter((function(t){return!t.exists})).map((function(t){return t.id})),n[r]=t[r].filter((function(t){return t.exists})).map((function(t){return t.id}))})),{existing:n,request:e}},this.requestEntity=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=Array.isArray(t)?t:[t],[4,this.https.getEntitiesByIds(n,t,s)];case 1:return[2,r.sent()];case 2:return e=r.sent(),console.warn("There was a problem retrieving the requested entity: "+e),[2,null];case 3:return[2]}}))}))},this.setTopIdMappings=function(){return r(e,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return t=Math.floor(Date.now()/1e3),this.localStorage.getExpiration("football","ids")>t?[2,Promise.resolve()]:[4,this.https.getTopEntities()];case 1:return e=n.sent(),this.localStorage.addTopIdMappings(e),[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=new s.default(t),this.https=new a.default(t)}},8900:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(5792),o=n(7611),u=n(9052);e.default=function(t){var e=this;this.idSchema="",this.idMappingFacade=null,this.getEntityIdBySchemaId=function(t,n){return e.idMappingFacade.getEntityById(t,n,e.idSchema)},this.remapEntities=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){e=JSON.parse(JSON.stringify(t));try{return this.idSchema!==s.IdSchemaEnum.NATIVE?(r=new o.default,a=r.traverse(e,n),[2,this.idMappingFacade.getEntitiesByIds(a,"native",this.idSchema).then((function(t){return(new u.default).traverse(e,n,t)}))]):[2,t]}catch(t){return console.warn("There was a problem remapping entity: "+n+" with inner entity ",t),[2,[]]}return[2]}))}))},this.getEntityIdsBySchemaId=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return(e={})[n]=t,this.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:[4,this.idMappingFacade.getEntitiesByIds(e,this.idSchema,a)];case 1:return[2,r.sent()];case 2:return[2,e]}}))}))},this.idSchema=t.idSchema,this.idMappingFacade=new a.default(t)}},3845:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConvert=void 0,e.typeConvert=function(t){switch(t){case"competitions":return"competition";case"players":case"relatedPlayer":case"squad":return"player";case"teams":case"participants":case"homeTeam":case"awayTeam":case"timeline":case"teamId":return"team";default:return t}}},7611:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3845);e.default=function(){var t=this;this.extractedObjIds={},this.traverse=function(e,n){return n=(0,r.typeConvert)(n),Array.isArray(e)?t.traverseArrExtract(e,n):e&&"object"==typeof e&&t.traverseObjExtract(e,n),t.extractedObjIds},this.traverseArrExtract=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjExtract(e,n)}))},this.traverseObjExtract=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){var i=e[r];"id"===r||"teamId"===r?(t.extractedObjIds.hasOwnProperty(n)||(t.extractedObjIds[n]=[]),i&&t.extractedObjIds[n].push(i)):e[r]&&t.traverse(e[r],r)}))}}},9052:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3845);e.default=function(){var t=this;this.replaceObjIdsIndex=null,this.remappedIdsObj={},this.traverse=function(e,n,i){return n=(0,r.typeConvert)(n),null===t.replaceObjIdsIndex&&(t.initReplaceObjIdsIndex(i),t.remappedIdsObj=i),Array.isArray(e)?t.traverseArrReplace(e,n):e&&"object"==typeof e&&t.traverseObjReplace(e,n),e},this.initReplaceObjIdsIndex=function(e){t.replaceObjIdsIndex={},Object.keys(e).forEach((function(e){t.replaceObjIdsIndex[e]=0}))},this.traverseArrReplace=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjReplace(e,n)}))},this.traverseObjReplace=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){"id"===r||"teamId"===r?e[r]&&(e[r]=t.remappedIdsObj[n][t.replaceObjIdsIndex[n]],t.replaceObjIdsIndex[n]=t.replaceObjIdsIndex[n]+1):e[r]&&t.traverse(e[r],r,t.remappedIdsObj)}))}}},7302:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(5936);e.default=function(t){var e=this;this.add=function(t,n,s,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.add(t,n,s,a)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.like(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.dislike=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.dislike(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addPageview=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addPageview(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addContentConsumed=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addContentConsumed(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addShare=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addShare(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addComment=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addComment(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addClickAd=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addClickAd(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.addConversion=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addConversion(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getOwn(t,n)];case 1:return[2,e.sent()]}}))}))},this.getForUser=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getForUser(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.activityFacade=new s.default(t)}},1491:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ActionsEnum=void 0,(n=e.ActionsEnum||(e.ActionsEnum={})).LIKE="like",n.DISLIKE="dislike",n.PAGE_VIEW="page_view",n.CONTENT_CONSUMED="content_consumed",n.SHARE="share",n.COMMENT="comment",n.CLICK_AD="click_ad",n.CONVERSION="conversion",n.PREDICTION_MADE="prediction_made",n.CONVERT="convert",n.MANAGE_INTERESTS="manage_interests",n.GAME_PARTICIPATION="game_participation",n.ARTICLE_CONSUMED="article_consumed",n.VIDEO_CONSUMED="video_consumed",n.SHORT_VIDEO_CONSUMED="short_video_consumed",n.LONG_VIDEO_CONSUMED="long_video_consumed",n.AUDIO_CONSUMED="audio_consumed",n.GALLERY_CONSUMED="gallery_consumed",n.IMAGE_CONSUMED="image_consumed",n.POLL_PARTICIPATION="poll_participation"},5936:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(1022),o=n(1491),u=n(4630),c=n(8261),l=n(629),d=n(8636);e.default=function(t){var e=this;this.add=function(t,n,a,o){return r(e,void 0,void 0,(function(){var e,r,c,l,d;return i(this,(function(i){switch(i.label){case 0:return this.idSchema==s.IdSchemaEnum.NATIVE?[3,3]:(e=JSON.parse(JSON.stringify(n)),[4,this.activityService.remapTagsIds(n,this.idSchema,s.IdSchemaEnum.NATIVE)]);case 1:return r=i.sent(),c=new u.default(t,r,a,o),[4,this.activityHttps.createActivity(c)];case 2:return(l=i.sent()).context.tags=e,[2,l];case 3:return d=new u.default(t,n,a,o),[2,this.activityHttps.createActivity(d)]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityHttps.deleteActivity(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.LIKE,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.dislike=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.DISLIKE,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addPageview=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.PAGE_VIEW,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addContentConsumed=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CONTENT_CONSUMED,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addShare=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.SHARE,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addComment=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.COMMENT,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addClickAd=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CLICK_AD,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addConversion=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CONVERSION,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,o;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,t&&(t=new l.default(t)),this.idSchema==s.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getOwnActivities(t,n)];case 1:e=i.sent(),r=0,a=e.data,i.label=2;case 2:return r<a.length?(o=a[r],[4,this.activityService.remapTagsIds(o.context.tags,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,e];case 6:return[4,this.activityHttps.getOwnActivities(t,n)];case 7:return[2,i.sent()]}}))}))},this.getForUser=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,o,u;return i(this,(function(i){switch(i.label){case 0:return a=a||!1,n&&(n=new d.default(n)),this.idSchema==s.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getActivitiesForUser(t,n,a)];case 1:e=i.sent(),r=0,o=e.data,i.label=2;case 2:return r<o.length?(u=o[r],[4,this.activityService.remapTagsIds(u.context.tags,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,e];case 6:return[4,this.activityHttps.getActivitiesForUser(t,n,a)];case 7:return[2,i.sent()]}}))}))},this.idSchema=t.idSchema,this.activityHttps=new a.default(t),this.activityService=new c.default(t)}},1517:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2820);e.default=function(){this.id=null,this.profileId=null,this.property=null,this.value=null,this.action=null,this.context=new r.default,this.points=0}},2195:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.page=null,this.limit=null,this.page=t.page?t.page:null,this.limit=t.limit?t.limit:null}},629:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.action=null,n.action=e.action?e.action:null,n}return i(e,t),e.prototype.constructFilterUrl=function(){var t="";return this.action&&(t+="&",t+="action="+this.action),this.page&&(t+="&",t+="page="+this.page),this.limit&&(t+="&",t+="limit="+this.limit),t},e}(n(2195).default);e.default=s},8636:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.action=null,n.action=e.action?e.action:null,n}return i(e,t),e.prototype.constructFilterUrl=function(){var t="";return this.action&&(t+="&",t+="action="+this.action),this.page&&(t+="&",t+="page="+this.page),this.limit&&(t+="&",t+="limit="+this.limit),t},e}(n(2195).default);e.default=s},6021:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569),i=n(1517);e.default=function(){this.meta=new r.default,this.data=[new i.default]}},2820:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content=null,this.tags=[],this.campaign=null}},4630:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2820);e.default=function(t,e,n,i){this.action=null,this.context=new r.default,this.action=t,this.context.tags=e,n&&(this.context.content=n),i&&(this.context.campaign=i)}},2453:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(7974),s=n(1316),a=n(9826),o=n(1517),u=n(6021);e.default=function(){var t=this;this.remapSingleResponse=function(t){var e=new o.default;return e.id=t.id,e.profileId=t.profile_id,e.property=t.property,e.value=t.value,e.action=t.action,e.context.content=t.context.content,e.context.tags=t.context.tags,e.context.campaign=t.context.campaign,e.points=t.points,e},this.remapActivitiesResponse=function(e){var n=new u.default;return n.meta.pagination.currentPage=e.meta.pagination.current_page,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.numberOfPages=e.meta.pagination.number_of_pages,n.meta.pagination.totalItems=e.meta.pagination.total_items,n.data=e.data.map((function(e){return t.remapSingleResponse(e)})),n},this.remapStatsReponse=function(e){var n=new s.default;return n.profileId=e.profile_id,n.tier=e.tier,n.points=e.points,n.successRates.overallPercent=e.success_rates.overall_percent,n.successRates.byFootballCompetition=t.constructNewRecord(e.success_rates.by_competition),n.successRates.byFootballTeam=t.constructNewRecord(e.success_rates.by_team),n.successRates.byFootballMarket=t.constructNewRecord(e.success_rates.by_market),n},this.constructNewRecord=function(e){var n;return Object.entries(e).length?(Object.entries(e).forEach((function(e){var s,a=e[0],o=e[1];n=r(r({},n),((s={})[a]=t.remapSuccessRatePercent(o),s)),i.MarketEnum[a]&&delete n[a].model})),n):e},this.remapSuccessRatePercent=function(t){var e=new a.default;return e.successRatePercent=t.success_rate_percent,e}}},8261:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900);e.default=function(t){var e=this;this.remapTagsIds=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return t&&t.length?(e={},r={},a=[],t.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],r[t.type]=[]),e[t.type].push(t.id),r[t.type].push(t)})),[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,n,s)]):[2,t];case 1:for(o=i.sent(),u=function(t,e){e.forEach((function(e,n){e.id=o[t][n],a.push(e)}))},c=0,l=Object.entries(r);c<l.length;c++)d=l[c],h=d[0],p=d[1],u(h,p);return[2,a]}}))}))},this.idSchema=t.idSchema,this.idMapping=new s.default(t)}},7e3:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(2754);e.default=function(t,e,n){var a=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCompetitionsIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,8,,9]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+t.countryId],"country","native")]:[3,2]:[3,5];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),t.competitionIds=a.competition,i.label=4;case 4:if(n)return[2,[]];i.label=5;case 5:return[4,this.getCompetitions(t,e)];case 6:return o=i.sent(),[4,this.idMapping.remapEntities(o,"competition")];case 7:return[2,i.sent()];case 8:throw u=i.sent(),console.warn("There was a problem browsing all of the competitions",u),u;case 9:return[2]}}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new s.default({competitionIds:t,limit:n}),[4,this.getCompetitions(r)];case 1:return(a=i.sent()).sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(a,"competition")];case 2:return o=i.sent(),t.forEach((function(t,n){return e.set(t,o[n])})),[2,e]}}))}))},this.getCompetitions=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:if(n=null,e=e||!1,!this.isBrowser)return[3,6];if(this.localStorage.getCompetitionsLength())return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.https.getCompetitions()];case 2:return n=i.sent(),[3,4];case 3:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 4:this.localStorage.setCompetitions(n),i.label=5;case 5:return[2,this.localStorage.getCompetitions(t)];case 6:return[2,this.https.getCompetitions(t,e)]}}))}))},this.getCompetitionByIdIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"competition","native")];case 1:return n=i.sent(),r=n.competition[0],[4,this.getCompetitionById(r,e)];case 2:return s=i.sent(),[4,this.idMapping.remapEntities(s,"competition")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following competition:"+t,a),a;case 5:return[2]}}))}))},this.getCompetitionById=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getCompetitionById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the competition with the following id: "+t,n),n;case 3:return[2]}}))}))},this.getTopCompetitionsIdMapping=function(t){return r(a,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopCompetitions(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"competition")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top competitions",n),n;case 4:return[2]}}))}))},this.getTopCompetitions=function(t){return r(a,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopCompetitions(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top competitions",e),e;case 3:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.idMapping=n,this.https=e}},8350:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,i){var s=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCountriesWithIdMapping=function(t){return n(s,void 0,void 0,(function(){var e,n;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getCountries(t)];case 1:return e=r.sent(),[2,this.idMapping.remapEntities(e,"country")];case 2:throw n=r.sent(),console.warn("There was a problem browsing countries as football entities",n),n;case 3:return[2]}}))}))},this.getCountries=function(t){return n(s,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return t=t||!1,this.isBrowser?(e=this.localStorage.getFootballCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return r.trys.push([1,3,,4]),[4,this.https.getCountries(t)];case 2:return n=r.sent(),this.localStorage.setFootballCountries(n),[2,n];case 3:throw i=r.sent(),console.warn("There was a problem retrieving countries as football entities",i),i;case 4:return[3,6];case 5:return[2,this.https.getCountries(t)];case 6:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.idMapping=i,this.https=e}},4289:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8350),a=n(7e3),o=n(9693),u=n(4272),c=n(4545),l=n(2140);e.default=function(t,e,n,d){var h=this;this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=null,this.getCountries=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.countriesFacade.getCountriesWithIdMapping(t)]}))}))},this.getCompetitions=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionsIdMapping(t,e)]}))}))},this.getCompetitionById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(t,e)]}))}))},this.getTopCompetitions=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.competitionsFacade.getTopCompetitionsIdMapping(t)]}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.competitionsFacade.getCompetitionsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamsIdMapping(t,e)]}))}))},this.getTeamById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamByIdIdMapping(t,e)]}))}))},this.getTopTeams=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.teamsFacade.getTopTeamsIdMapping(t)]}))}))},this.getNextMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(t,e)]}))}))},this.getPrevMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(t,e)]}))}))},this.getTeamsMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.teamsFacade.getTeamsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayersIdMapping(t,e)]}))}))},this.getPlayerById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayerIdMapping(t,e)]}))}))},this.getTopPlayers=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getTopPlayersIdMapping(t)]}))}))},this.getNextMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(t,e)]}))}))},this.getPrevMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(t,e)]}))}))},this.getPlayersMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getPlayersMapWithNativeIds(t)]}))}))},this.getMatches=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchesIdMapping(t,e)]}))}))},this.getMatchById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchIdMapping(t,e)]}))}))},this.search=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.searchFacade.searchIdMapping(t,e)]}))}))},this.countriesFacade=new s.default(e,n,d),this.competitionsFacade=new a.default(e,n,d),this.teamsFacade=new o.default(t,n,d),this.playerFacade=new u.default(t,n,d),this.matchFacade=new c.default(t,n,d),this.searchFacade=new l.default(n,d)}},4545:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(712),o=n(6134),u=n(9582);e.default=function(t,e,n){var c=this;this.https=null,this.idMapping=null,this.footballService=null,this.getMatchesIdMapping=function(t,e){return r(c,void 0,void 0,(function(){var n,r,a,u,c,l,d,h;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,12,,13]),t?(t=new o.default(t)).countryIds?[4,this.idMapping.getEntityIdsBySchemaId(t.countryIds,"country","native")]:[3,2]:[3,8];case 1:n=i.sent(),t.countryIds=n.country,i.label=2;case 2:return t.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:r=i.sent(),t.competitionIds=r.competition,i.label=4;case 4:return t.matchIds?[4,this.idMapping.getEntityIdsBySchemaId(t.matchIds,"match","native")]:[3,6];case 5:a=i.sent(),t.matchIds=a.match,i.label=6;case 6:return t.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,8];case 7:u=i.sent(),t.teamIds=u.team,i.label=8;case 8:return[4,this.getMatches(t,e)];case 9:return c=i.sent(),l=c,[4,this.footballService.setAvailableMarketsForMatch(s([],c.data,!0))];case 10:return l.data=i.sent(),d=c,[4,this.idMapping.remapEntities(c.data,"match")];case 11:return d.data=i.sent(),[2,c];case 12:throw h=i.sent(),console.warn("There was a problem browsing the matches",h),h;case 13:return[2]}}))}))},this.getMatchesWithNativeIds=function(t){return r(c,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new o.default({matchIds:t,limit:e}),[4,this.getMatches(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"match")];case 2:return[2,i.sent()]}}))}))},this.getMatchesMapWithNativeIds=function(t){return r(c,void 0,void 0,(function(){var e,n,r,s,u,c;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,a.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getMatchesWithNativeIds(n)];case 1:return r=i.sent(),n.length===r.length?[3,3]:(s=new o.default({matchIds:n,limit:n.length}),[4,this.getMatches(s)]);case 2:u=i.sent(),c=n.filter((function(t){if(u.data.every((function(e){return e.id!==t})))return t})),n=n.filter((function(t){if(!c.includes(t))return t})),i.label=3;case 3:return n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getMatches=function(t,e){return r(c,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getMatches(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the matches",n),n;case 3:return[2]}}))}))},this.getMatchIdMapping=function(t,e){return r(c,void 0,void 0,(function(){var n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,this.idMapping.getEntityIdsBySchemaId([t],"match","native")];case 1:return n=i.sent(),[4,this.getMatchById(n.match[0],e)];case 2:return r=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(r)];case 3:return s=i.sent(),[4,this.idMapping.remapEntities(s,"match")];case 4:return[2,i.sent()];case 5:throw a=i.sent(),console.warn("There was a problem browsing the following match: "+t,a),a;case 6:return[2]}}))}))},this.getMatchById=function(t,e){return r(c,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getMatchById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following match: "+t,n),n;case 3:return[2]}}))}))},this.https=e,this.idMapping=n,this.footballService=new u.default(t)}},4272:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(6477),a=n(712),o=n(9582);e.default=function(t,e,n){var u=this;this.https=null,this.footballService=null,this.idMapping=null,this.getPlayersIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([t.countryId],"country","native")]:[3,2]:[3,7];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.playerIds?[4,this.idMapping.getEntityIdsBySchemaId(t.playerIds,"player","native")]:[3,4];case 3:0===(a=i.sent()).player.length&&(n=!0),t.playerIds=a.player,i.label=4;case 4:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,6];case 5:0===(o=i.sent()).competition.length&&(n=!0),t.scope=o.competition,i.label=6;case 6:if(n)return[2,[]];i.label=7;case 7:return[4,this.getPlayers(t,e)];case 8:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"player")];case 9:return c.data=i.sent(),[2,u];case 10:throw l=i.sent(),console.warn("There was a problem browsing the players",l),l;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(t){return r(u,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new s.default({playerIds:t,limit:e}),[4,this.getPlayers(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"player")];case 2:return[2,i.sent()]}}))}))},this.getPlayersMapWithNativeIds=function(t){return r(u,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,a.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getPlayersWithNativeIds(n)];case 1:return r=i.sent(),n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getPlayers=function(t,e){return r(u,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getPlayers(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the players",n),n;case 3:return[2]}}))}))},this.getPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),[4,this.getPlayerById(n.player[0],e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"player")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following player:"+t,s),s;case 5:return[2]}}))}))},this.getPlayerById=function(t,e){return r(u,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getPlayerById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following player: "+t,n),n;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(t){return r(u,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopPlayers(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"player")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top players",n),n;case 4:return[2]}}))}))},this.getTopPlayers=function(t){return r(u,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopPlayers(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top players",e),e;case 3:return[2]}}))}))},this.getNextMatchForPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getNextMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the next match for player:"+t,s),s;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(t,e){return r(u,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for player: "+t,r),r;case 4:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getPrevMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the previous match for player:"+t,s),s;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(t,e){return r(u,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for player: "+t,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new o.default(t)}},2140:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(604);e.default=function(t,e){var n=this;this.https=null,this.idMapping=null,this.searchIdMapping=function(t,e){return r(n,void 0,void 0,(function(){var n,r,a,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),(t=new s.default(t)).scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,2];case 1:n=i.sent(),t.scope=n.competition,i.label=2;case 2:return[4,this.search(t,e)];case 3:return(r=i.sent()).teams&&r.teams.length>0?[4,this.idMapping.remapEntities(r.teams,"team")]:[3,5];case 4:a=i.sent(),r.teams=a,i.label=5;case 5:return r.players&&r.players.length>0?[4,this.idMapping.remapEntities(r.players,"player")]:[3,7];case 6:o=i.sent(),r.players=o,i.label=7;case 7:return r.competitions&&r.competitions.length>0?[4,this.idMapping.remapEntities(r.competitions,"competition")]:[3,9];case 8:u=i.sent(),r.competitions=u,i.label=9;case 9:return[2,r];case 10:throw c=i.sent(),console.warn("There was a problem with browsing the search result",c),c;case 11:return[2]}}))}))},this.search=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.https.search(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the search response",n),n;case 3:return[2]}}))}))},this.https=t,this.idMapping=e}},9693:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(9920),a=n(9582);e.default=function(t,e,n){var o=this;this.footballService=null,this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+t.countryId],"country","native")]:[3,2]:[3,6];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),t.scope=a.competition,i.label=4;case 4:return t.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,6];case 5:0===(o=i.sent()).team.length&&(n=!0),t.teamIds=o.team,i.label=6;case 6:return n?[2,[]]:[4,this.getTeams(t,e)];case 7:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"team")];case 8:return c.data=i.sent(),[2,u];case 9:throw l=i.sent(),console.warn("There was a problem browsing all teams",l),l;case 10:return[2]}}))}))},this.getTeamsMapWithNativeIds=function(t){return r(o,void 0,void 0,(function(){var e,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new s.default({teamIds:t,limit:n}),[4,this.getTeams(r)];case 1:return(a=i.sent().data).sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(a,"team")];case 2:return o=i.sent(),t.forEach((function(t,n){return e.set(t,o[n])})),[2,e]}}))}))},this.getTeams=function(t,e){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTeams(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving all teams",n),n;case 3:return[2]}}))}))},this.getTeamByIdIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getTeamById(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"team")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following team:"+t,s),s;case 5:return[2]}}))}))},this.getTeamById=function(t,e){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTeamById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following team: "+t,n),n;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(t){return r(o,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopTeams(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"team")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top teams",n),n;case 4:return[2]}}))}))},this.getTopTeams=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopTeams(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top teams",e),e;case 3:return[2]}}))}))},this.getNextMatchForTeamIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getNextMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the next match for the following team:"+t,s),s;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(t,e){return r(o,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for the following team: "+t,r),r;case 4:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getPrevMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the previous match for the following team:"+t,s),s;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(t,e){return r(o,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for the following team: "+t,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new a.default(t)}},8808:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),a=n(5601),o=n(595),u=n(4289);e.default=function(t){var e=this;this.https=null,this.idMapping=null,this.localStorage=null,this.footballFacade=null,this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getCompetitions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getCompetitionById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitionById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopCompetitions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopCompetitions(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeams(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTeamById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeamById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopTeams=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopTeams(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayers(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayerById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayerById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopPlayers=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopPlayers(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatchById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatchById(t,n)];case 1:return[2,e.sent()]}}))}))},this.search=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.search(t,n)];case 1:return[2,e.sent()]}}))}))},this.https=new o.default(t),this.idMapping=new s.default(t),this.localStorage=new a.default(t),this.footballFacade=new u.default(t,this.localStorage,this.https,this.idMapping)}},6975:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name=""}},2754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryId=null,this.name=null,this.gender=null,this.type=null,this.sortField=null,this.sortOrder=null,this.competitionIds=null,this.constructFilterUrl=function(){var t="";return e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.gender&&(t=(t+="&")+"gender="+e.gender),e.type&&(t=(t+="&")+"type="+e.type),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),e.name&&(t=(t+="&")+"name="+e.name),e.competitionIds&&(t=(t+="&")+"competition_ids="+e.competitionIds.join(",")),t},this.competitionSearchFilter=function(t){try{var n=e.filter(t);return e.sortField||e.sortOrder?e.sort(n):n}catch(t){return console.warn("There was a problem filtering the local competitions",t),[]}},this.filter=function(t){var n=e.entitiesToSearchWith();return t.filter((function(t){var r=!0;return n.forEach((function(n){"sortOrder"!==n&&"sortField"!==n&&("countryId"===n?r&&(r=t.country.id===e[n]):"name"===n?r&&(r=t.name.toLocaleLowerCase().includes(e[n].toLocaleLowerCase())):"competitionIds"===n?r&&(r=e[n].some((function(e){return t.id===e}))):r&&(r=t[n].toLocaleLowerCase()===e[n].toLocaleLowerCase()))})),r}))},this.entitiesToSearchWith=function(){var t=[];return e.countryId&&t.push("countryId"),e.name&&t.push("name"),e.gender&&t.push("gender"),e.type&&t.push("type"),e.sortField&&t.push("sortField"),e.sortOrder&&t.push("sortOrder"),e.competitionIds&&t.push("competitionIds"),t},this.sort=function(t){var n=[];return"name"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.name.localeCompare(t.name):t.name.localeCompare(n.name)})):"country"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.country.name.localeCompare(t.country.name):t.country.name.localeCompare(n.country.name)})):"scope"===e.sortField?t.forEach((function(t){return n[e.competitionIds.indexOf(t.id)]=t})):e.sortField||"desc"!==e.sortOrder||(n=t.sort((function(t,e){return e.id.localeCompare(t.id)}))),n},this.countryId=t.countryId?""+t.countryId:null,this.name=t.name?t.name:null,this.gender=t.gender?t.gender:null,this.type=t.type?t.type:null,this.sortField=t.sortField?""+t.sortField:null,this.sortOrder=t.sortOrder?""+t.sortOrder:null,this.competitionIds=t.competitionIds?t.competitionIds:null}},3321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name="",this.participants=[]}},7316:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6975),i=n(3430),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.type=t.type,e.name=t.name,e}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=s},8758:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3321),i=n(3430),s=n(5827),a=function(){function t(){this.countryRemapper=null,this.teamBasicRemapper=null,this.countryRemapper=new i.default,this.teamBasicRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.type=t.type,n.name=t.name,n.participants=t.participants.map((function(t){return e.teamBasicRemapper.fromResponse(t)})),n}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=a},4427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.alias="",this.countryCode="",this.assets=null,this.name=""}},3430:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4427);e.default=function(){var t=this;this.countriesFromResponse=function(e){if(e)return e.map((function(e){return t.countryFromResponse(e)}))},this.countryFromResponse=function(t){try{if(t){var e=new r.default;return e.id=t.id,e.alias=t.alias,e.assets=t.assets,e.countryCode=t.country_code,e.name=t.name,e}}catch(t){throw t}return null}}},8470:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.homeTeam={players:[]},this.awayTeam={players:[]}}},3098:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8470),i=n(3550),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new i.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.default;return n.homeTeam.players=t.home_team&&t.home_team.players?t.home_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.awayTeam.players=t.away_team&&t.away_team.players?t.away_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping the lineups",t),t}},t}();e.default=s},2579:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.homeTeam=null,this.awayTeam=null,this.isDeleted=!1,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.context={competition:null},this.status={type:null,subType:null}}},6134:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryIds=null,this.competitionIds=null,this.matchIds=null,this.status=null,this.teamIds=null,this.fromDate=null,this.toDate=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var t="";return e.countryIds&&(t=(t+="&")+"countries="+e.countryIds.join(",")),e.competitionIds&&(t=(t+="&")+"competitions="+e.competitionIds.join(",")),e.matchIds&&(t=(t+="&")+"matches="+e.matchIds.join(",")),e.status&&(t=(t+="&")+"status="+e.status),e.teamIds&&(t=(t+="&")+"teams="+e.teamIds.join(",")),e.fromDate&&(t=(t+="&")+"from_date="+e.fromDate),e.toDate&&(t=(t+="&")+"to_date="+e.toDate),e.limit&&(t=(t+="&")+"limit="+e.limit),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),t},this.countryIds=t.countryIds?t.countryIds:null,this.competitionIds=t.competitionIds?t.competitionIds:null,this.matchIds=t.matchIds?t.matchIds:null,this.status=t.status?t.status:null,this.teamIds=t.teamIds?t.teamIds:null,this.fromDate=t.fromDate?t.fromDate:null,this.toDate=t.toDate?t.toDate:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},9661:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899);e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.isDeleted=!1,this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.stats=null,this.context={competition:null},this.timeline=[],this.status=new r.default,this.lineups=null}},5284:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2579),i=n(5827),s=n(7316),a=n(3949),o=function(){function t(){this.teamRemapper=null,this.competitionRemapper=null,this.scoresRemapper=null,this.teamRemapper=new i.default,this.competitionRemapper=new s.default,this.scoresRemapper=new a.default}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.id=t.id,e.kickoffAt=t.kickoff_at,e.finishedAt=t.finished_at,e.updatedAt=t.updated_at,e.isDeleted=t.is_deleted,e.homeTeam=this.teamRemapper.fromResponse(t.home_team),e.awayTeam=this.teamRemapper.fromResponse(t.away_team),e.lineupsConfirmed=t.lineups_confirmed,e.startedAt=t.started_at,e.minute=t.minute,e.scores=this.scoresRemapper.fromResponse(t.scores),e.context={competition:t.context.competition?this.competitionRemapper.fromResponse(t.context.competition):null},e.status={type:t.status.type,subType:t.status.sub_type},e}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=o},9330:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9661),i=n(5827),s=n(7316),a=n(7122),o=n(3949),u=n(3098),c=n(8470),l=n(92),d=function(){function t(){this.teamMapper=null,this.competitionsMapper=null,this.lineupsMapper=null,this.scoresMapper=null,this.statsMapper=null,this.timelineMapper=null,this.teamMapper=new i.default,this.competitionsMapper=new s.default,this.lineupsMapper=new u.default,this.scoresMapper=new o.default,this.statsMapper=new a.default,this.timelineMapper=new l.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.default;return n.id=t.id,n.kickoffAt=t.kickoff_at,n.finishedAt=t.finished_at,n.updatedAt=t.updated_at,n.isDeleted=t.is_deleted,n.homeTeam=t.home_team?this.teamMapper.fromResponse(t.home_team):null,n.awayTeam=t.away_team?this.teamMapper.fromResponse(t.away_team):null,n.lineupsConfirmed=t.lineups_confirmed,n.startedAt=t.started_at,n.minute=t.minute,n.scores=this.scoresMapper.fromResponse(t.scores),n.stats=this.statsMapper.fromResponse(t.stats),n.context={competition:this.competitionsMapper.fromResponse(t.context.competition)},n.timeline=t.timeline?t.timeline.map((function(t){return e.timelineMapper.fromResponse(t)})):[],n.status={type:t.status.type,subType:t.status.sub_type},n.lineups=t.lineups?this.lineupsMapper.fromResponse(t.lineups):new c.default,n}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=d},4652:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.ftScore=null,this.htScore=null,this.aetScore=null,this.aggScore=null,this.penScore=null}},3949:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4652),i=function(){function t(){this.statEntityFromResponse=function(t){return{homeGoals:t.home_goals,awayGoals:t.away_goals}}}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.ftScore=this.statEntityFromResponse(t.ft_score),e.htScore=this.statEntityFromResponse(t.ht_score),e.aetScore=this.statEntityFromResponse(t.aet_score),e.aggScore=this.statEntityFromResponse(t.agg_score),e.penScore=this.statEntityFromResponse(t.pen_score),e}catch(t){throw console.warn("There was a problem remapping the scores",t),t}},t}();e.default=i},7950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.corners=null,this.cornersFirstHalf=null,this.cornersSecondHalf=null,this.cornersExtraTime=null,this.crosses=null,this.crossesFirstHalf=null,this.crossesSecondHalf=null,this.crossesExtraTime=null,this.offside=null,this.offsideFirstHalf=null,this.offsideSecondHalf=null,this.offsideExtraTime=null,this.shotsOn=null,this.shotsOnFirstHalf=null,this.shotsOnSecondHalf=null,this.shotsOnExtraTime=null,this.throwIn=null,this.throwInFirstHalf=null,this.throwInSecondHalf=null,this.throwInExtraTime=null,this.redCards=null,this.redCardsFirstHalf=null,this.redCardsSecondHalf=null,this.redCardsExtraTime=null,this.shotsOff=null,this.shotsOffFirstHalf=null,this.shotsOffSecondHalf=null,this.shotsOffExtraTime=null,this.goalKicks=null,this.goalKicksFirstHalf=null,this.goalKicksSecondHalf=null,this.goalKicksExtraTime=null,this.possession=null,this.possessionFirstHalf=null,this.possessionSecondHalf=null,this.possessionExtraTime=null,this.treatments=null,this.treatmentsFirstHalf=null,this.treatmentsSecondHalf=null,this.treatmentsExtraTime=null,this.yellowCards=null,this.yellowCardsFirstHalf=null,this.yellowCardsSecondHalf=null,this.yellowCardsExtraTime=null,this.shotsBlocked=null,this.shotsBlockedFirstHalf=null,this.shotsBlockedSecondHalf=null,this.shotsBlockedExtraTime=null,this.substitutions=null,this.substitutionsFirstHalf=null,this.substitutionsSecondHalf=null,this.substitutionsExtraTime=null,this.counterAttacks=null,this.counterAttacksFirstHalf=null,this.counterAttacksSecondHalf=null,this.counterAttacksExtraTime=null,this.foulsCommitted=null,this.foulsCommittedFirstHalf=null,this.foulsCommittedSecondHalf=null,this.foulsCommittedExtraTime=null}},7122:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7950),i=function(){function t(){this.statEntityFromResponse=function(t){return{homeTeam:t?t.home_team:null,awayTeam:t?t.away_team:null}}}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.corners=this.statEntityFromResponse(t.corners),e.cornersFirstHalf=this.statEntityFromResponse(t.corners_1h),e.cornersSecondHalf=this.statEntityFromResponse(t.corners_2h),e.cornersExtraTime=this.statEntityFromResponse(t.corners_et),e.crosses=this.statEntityFromResponse(t.crosses),e.crossesFirstHalf=this.statEntityFromResponse(t.crosses_1h),e.crossesSecondHalf=this.statEntityFromResponse(t.crosses_2h),e.crossesExtraTime=this.statEntityFromResponse(t.crosses_et),e.offside=this.statEntityFromResponse(t.offside),e.offsideFirstHalf=this.statEntityFromResponse(t.offside_1h),e.offsideSecondHalf=this.statEntityFromResponse(t.offside_2h),e.offsideExtraTime=this.statEntityFromResponse(t.offside_et),e.shotsOn=this.statEntityFromResponse(t.shots_on),e.shotsOnFirstHalf=this.statEntityFromResponse(t.shots_on_1h),e.shotsOnSecondHalf=this.statEntityFromResponse(t.shots_on_2h),e.shotsOnExtraTime=this.statEntityFromResponse(t.shots_on_et),e.throwIn=this.statEntityFromResponse(t.throw_in),e.throwInFirstHalf=this.statEntityFromResponse(t.throw_in_1h),e.throwInSecondHalf=this.statEntityFromResponse(t.throw_in_2h),e.throwInExtraTime=this.statEntityFromResponse(t.throw_in_et),e.redCards=this.statEntityFromResponse(t.red_cards),e.redCardsFirstHalf=this.statEntityFromResponse(t.red_cards_1h),e.redCardsSecondHalf=this.statEntityFromResponse(t.red_cards_2h),e.redCardsExtraTime=this.statEntityFromResponse(t.red_cards_et),e.shotsOff=this.statEntityFromResponse(t.shots_off),e.shotsOffFirstHalf=this.statEntityFromResponse(t.shots_off_1h),e.shotsOffSecondHalf=this.statEntityFromResponse(t.shots_off_2h),e.shotsOffExtraTime=this.statEntityFromResponse(t.shots_off_et),e.goalKicks=this.statEntityFromResponse(t.goal_kicks),e.goalKicksFirstHalf=this.statEntityFromResponse(t.goal_kicks_1h),e.goalKicksSecondHalf=this.statEntityFromResponse(t.goal_kicks_2h),e.goalKicksExtraTime=this.statEntityFromResponse(t.goal_kicks_et),e.possession=this.statEntityFromResponse(t.possession),e.possessionFirstHalf=this.statEntityFromResponse(t.possession_1h),e.possessionSecondHalf=this.statEntityFromResponse(t.possession_2h),e.possessionExtraTime=this.statEntityFromResponse(t.possession_et),e.treatments=this.statEntityFromResponse(t.treatments),e.treatmentsFirstHalf=this.statEntityFromResponse(t.treatments_1h),e.treatmentsSecondHalf=this.statEntityFromResponse(t.treatments_2h),e.treatmentsExtraTime=this.statEntityFromResponse(t.treatments_et),e.yellowCards=this.statEntityFromResponse(t.yellow_cards),e.yellowCardsFirstHalf=this.statEntityFromResponse(t.yellow_cards_1h),e.yellowCardsSecondHalf=this.statEntityFromResponse(t.yellow_cards_2h),e.yellowCardsExtraTime=this.statEntityFromResponse(t.yellow_cards_et),e.shotsBlocked=this.statEntityFromResponse(t.shots_blocked),e.shotsBlockedFirstHalf=this.statEntityFromResponse(t.shots_blocked_1h),e.shotsBlockedSecondHalf=this.statEntityFromResponse(t.shots_blocked_2h),e.shotsBlockedExtraTime=this.statEntityFromResponse(t.shots_blocked_et),e.substitutions=this.statEntityFromResponse(t.substitutions),e.substitutionsFirstHalf=this.statEntityFromResponse(t.substitutions_1h),e.substitutionsSecondHalf=this.statEntityFromResponse(t.substitutions_2h),e.substitutionsExtraTime=this.statEntityFromResponse(t.substitutions_et),e.counterAttacks=this.statEntityFromResponse(t.counter_attacks),e.counterAttacksFirstHalf=this.statEntityFromResponse(t.counter_attacks_1h),e.counterAttacksSecondHalf=this.statEntityFromResponse(t.counter_attacks_2h),e.counterAttacksExtraTime=this.statEntityFromResponse(t.counter_attacks_et),e.foulsCommitted=this.statEntityFromResponse(t.fouls_committed),e.foulsCommittedFirstHalf=this.statEntityFromResponse(t.fouls_committed_1h),e.foulsCommittedSecondHalf=this.statEntityFromResponse(t.fouls_committed_2h),e.foulsCommittedExtraTime=this.statEntityFromResponse(t.fouls_committed_et),e}catch(t){throw console.warn("There was a problem remapping the stats",t),t}},t}();e.default=i},6899:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.subType=null}},9452:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.minute="",this.type="",this.teamId="",this.player=null,this.relatedPlayer=null,this.updatedAt=""}},92:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9452),i=n(3550),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.minute=t.minute,e.type=t.type,e.teamId=t.team_id,e.player=this.playerRemapper.fromResponse(t.player),e.relatedPlayer=t.related_player?this.playerRemapper.fromResponse(t.related_player):null,e.updatedAt=t.updated_at,e}catch(t){throw console.warn("There was a problem remapping timeline",t),t}},t}();e.default=s},753:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569);e.default=function(){this.meta=new r.default,this.data=[]}},3569:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(155);e.default=function(){this.pagination=new r.default}},155:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.currentPage=null,this.itemsPerPage=null,this.totalItems=null,this.numberOfPages=null}},1925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569);e.default=function(){this.remapMetaProp=function(t){var e=new r.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e}}},4426:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.isDeleted=!1,this.teams=[]}},6477:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryId=null,this.scope=null,this.name=null,this.playerIds=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var t="";return e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),e.name&&(t=(t+="&")+"name="+e.name),e.playerIds&&(t=(t+="&")+"player_ids="+e.playerIds.join(",")),e.limit&&(t=(t+="&")+"limit="+e.limit),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),t},this.countryId=t.countryId?t.countryId:null,this.scope=t.scope?t.scope:null,this.name=t.name?t.name:null,this.playerIds=t.playerIds?t.playerIds:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},1837:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.isDeleted=!1,this.competitions=[],this.teams=[]}},4803:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.name="",this.position="",this.assets=null,this.type=""}},9071:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.startDate="",this.endDate="",this.loan=!1,this.position="",this.country=null,this.name="",this.assets=null,this.birthDate=""}},5157:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(4426),s=n(5827),a=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n.isDeleted=t.is_deleted,n}catch(t){throw console.warn("There was a problem remapping players response",t),t}},t}();e.default=a},7943:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(1837),s=n(5827),a=n(7316),o=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.competitionRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default,this.competitionRemapper=new a.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n.isDeleted=t.is_deleted,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping player response",t),t}},t}();e.default=o},3550:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4803),i=function(){function t(){}return t.prototype.fromResponse=function(t){try{var e=new r.default;return e.id=t.id,e.name=t.name,e.position=t.position,e.shirtNumber=t.shirt_number,e.assets=t.assets,e.type=t.type,e}catch(t){throw console.warn("There was a problem remapping the player from timeline",t),t}},t}();e.default=i},4085:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(9071),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.startDate=t.start_date,e.endDate=t.end_date,e.shirtNumber=t.shirt_number,e.loan=t.loan,e.position=t.position,e.country=this.countryRemapper.countryFromResponse(t.country),e.name=t.name,e.assets=t.assets,e.birthDate=t.birth_date,e}catch(t){throw console.warn("There was a problem remapping the player from squad",t),t}},t}();e.default=s},4729:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(56),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.firstName=t.first_name?t.first_name:null,e.lastName=t.last_name?t.last_name:null,e.name=t.name?t.name:null,e.birthDate=t.birth_date,e.country=this.countryRemapper.countryFromResponse(t.country),e.assets=t.assets,e.position=t.position,e}catch(t){throw console.warn("There was a problem remapping top player response",t),t}},t}();e.default=s},56:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null}},604:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.entities=null,this.query=null,this.scope=null,this.constructFilterUrl=function(){var t="";return e.entities&&(t=(t+="&")+"entities="+e.entities.join(",")),e.query&&(t=(t+="&")+"q="+e.query),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),t},this.entities=t.entities?t.entities:null,this.query=t.query?t.query:null,this.scope=t.scope?t.scope:null}},6967:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teams=null,this.players=null,this.competitions=null}},7287:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5827),i=n(5157),s=n(7316),a=n(6967),o=function(){function t(){this.teamRemapper=null,this.playerRemapper=null,this.competitionremapper=null,this.teamRemapper=new r.default,this.playerRemapper=new i.default,this.competitionremapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new a.default;return n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.players=t.players?t.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionremapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping search response",t),t}},t}();e.default=o},5827:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(9314),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.code=t.code,e.national=t.national,e.fullName=t.full_name,e.shortName=t.short_name,e.name=t.name,e.isDeleted=t.is_deleted,e}catch(t){throw console.warn("There was a problem remapping teams response",t),t}},t}();e.default=s},7821:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(1986),s=n(4085),a=n(7316),o=function(){function t(){this.countryRemapper=null,this.competitionRemapper=null,this.playerRemapper=null,this.countryRemapper=new r.default,this.competitionRemapper=new a.default,this.playerRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.code=t.code,n.national=t.national,n.fullName=t.full_name,n.shortName=t.short_name,n.name=t.name,n.isDeleted=t.is_deleted,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n.colors=t.colors?t.colors:n.colors,n.squad=t.squad?t.squad.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping team response",t),t}},t}();e.default=o},9314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.code="",this.national=!1,this.fullName="",this.shortName="",this.isDeleted=!1}},3773:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primary=null,this.secondary=null,this.tertiary=null}},9920:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.name=null,this.countryId=null,this.national=!1,this.gender=null,this.limit=null,this.page=null,this.scope=null,this.sortField=null,this.sortOrder=null,this.teamIds=null,this.constructFilterUrl=function(){var t="";return e.name&&(t=(t+="&")+"name="+e.name),e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.national&&(t=(t+="&")+"national="+e.national),e.gender&&(t=(t+="&")+"gender="+e.gender),e.limit&&(t=(t+="&")+"limit="+e.limit),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),e.teamIds&&(t=(t+="&")+"team_ids="+e.teamIds.join(",")),t},this.name=t.name?t.name:null,this.countryId=t.countryId?""+t.countryId:null,this.national=!!t.national&&t.national,this.gender=t.gender?t.gender:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.scope=t.scope?t.scope:null,this.sortField=t.sortField?""+t.sortField:null,this.sortOrder=t.sortOrder?""+t.sortOrder:null,this.teamIds=t.teamIds?t.teamIds:null}},1986:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3773);e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.competitions=[],this.code="",this.national=!1,this.fullName="",this.shortName="",this.isDeleted=!1,this.colors=new r.default,this.squad=[]}},9582:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7686);e.default=function(t){var e=this;this.clientHttps=null,this.setAvailableMarketsForMatch=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.clientHttps.getConfig(s.FeatureConfigType.PREDICTOR)];case 1:return e=i.sent(),n=e.fullCoverageCompetitions,r=e.markets,Array.isArray(t)?[2,t.map((function(t){return a.setAvailableMarkets(t,n,r)}))]:"object"==typeof t&&Object.keys(t).length?[2,this.setAvailableMarkets(t,n,r)]:[2]}}))}))},this.setAvailableMarkets=function(t,n,r){var i,s=null===(i=t.context.competition)||void 0===i?void 0:i.id;return s&&e.isMatchInCoverageCompetition(s,n)?(t.availableMarkets=r.all,t):(t.availableMarkets=r.main,t)},this.isMatchInCoverageCompetition=function(t,e){var n=!1;return e.includes(t)?n=!0:n},this.clientHttps=new s.default(t)}},3822:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),o=n(7686),u=n(3142),c=n(7232),l=n(1139),d=n(9502),h=n(8900),p=n(1859),f=n(2793);e.default=function(t,e,n,m,v){var y=this;this.config=null,this.clientHttps=null,this.loyaltyHttps=null,this.loyaltyService=null,this.profileFacade=null,this.loyaltyValidator=null,this.idMapping=null,this.topXFacade=null,this.matchQuizFacade=null,this.predictorHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(y,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.LOYALTY)];case 1:return[2,t.sent()]}}))}))},this.getClientBadges=function(){return r(y,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getConfig()];case 1:return t=e.sent(),[2,this.loyaltyService.buildClientBadges(t.rewards.badges)]}}))}))},this.getTemplates=function(t){return r(y,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=!0,this.config.idSchema!==a.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyHttps.getTemplates(t,e)];case 1:return[2,i.sent()];case 2:return[4,this.loyaltyHttps.getTemplates(t,e)];case 3:return n=i.sent(),r=n,[4,this.loyaltyService.remapTemplatesIds(s([],n.data,!0))];case 4:return r.data=i.sent(),[2,n]}}))}))},this.getTemplateById=function(t,e){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.loyaltyHttps.getTemplateById(t,e)];case 1:return n=r.sent(),this.config.idSchema===a.IdSchemaEnum.NATIVE?[2,n]:[4,this.loyaltyService.remapTemplatesIds([n])];case 2:return[2,r.sent()[0]]}}))}))},this.getLeaderboard=function(t,e,n){return r(y,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"loyalty"),[4,this.loyaltyHttps.getLeaderboard(t,n,e)];case 1:return r=i.sent(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForGame=function(t,e,n){return r(y,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"loyalty"),[4,this.loyaltyHttps.getLeaderboardForGame(t,n,e)];case 1:return r=i.sent(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getOwnRankings=function(t,e){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.getOwn()];case 1:return n=r.sent().id,[2,this.getUserRankings(n,t,e)]}}))}))},this.getUserRankings=function(t,e,n){return r(y,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"rankings"),[4,this.loyaltyHttps.getUserRankings(t,e,n)];case 1:return r=i.sent(),[4,this.getModelsForUserRankings(r)];case 2:return[2,i.sent()]}}))}))},this.getHighestSuccessRate=function(t,e){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t&&this.loyaltyValidator.validateMarket(this.errorHandlingMode,t),[4,this.loyaltyHttps.getHighestSuccessRate(t,e)];case 1:return n=r.sent(),[2,this.loyaltyService.addProfileModelToHighestSuccessRate(n)]}}))}))},this.getTemplateWinners=function(t){return r(y,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getTemplateById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.loyaltyService.completeContestWinners(e)]}}))}))},this.getEntitiesFollows=function(t,e){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.loyaltyService.validateEntitiesFollowsFilters(t),this.config.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyService.remapEntitiesFollowsFilters(t)];case 1:t=r.sent(),r.label=2;case 2:return[4,this.loyaltyHttps.getEntitiesFollows(t,e)];case 3:return n=r.sent(),[4,this.loyaltyService.addModelsToEntitiesFollows(n)];case 4:return[2,r.sent()]}}))}))},this.getModelsForUserRankings=function(t){return r(y,void 0,void 0,(function(){var e,n,r,s,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return e=null,n=null,r=null,s=this.loyaltyService.extractRankingsIdsMap(t.data),a=s[0],o=s[1],(u=s[2]).length?[4,this.getTemplates()]:[3,2];case 1:c=i.sent(),e=c.data.filter((function(t){return u.includes(t.id)})),i.label=2;case 2:return a.length?(l={gameIds:a},[4,this.topXFacade.getGames(l)]):[3,4];case 3:d=i.sent(),n=d.data,i.label=4;case 4:return o.length?(h={gameIds:o},[4,this.matchQuizFacade.getGames(h)]):[3,6];case 5:p=i.sent(),r=p.data,i.label=6;case 6:return[2,this.loyaltyService.setModelsForUserRankings(n,r,e,t)]}}))}))},this.config=t,this.clientHttps=e,this.loyaltyHttps=n,this.profileFacade=new c.default(v,m),this.loyaltyService=new u.default(this.config),this.loyaltyValidator=new l.default,this.idMapping=new h.default(t),this.topXFacade=new d.default(t,this.idMapping),this.matchQuizFacade=new p.default(t),this.predictorHttps=new f.default(t,this.idMapping),this.errorHandlingMode=t.errorHandlingMode}},2962:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7686),a=n(7059),o=n(3822),u=n(4275),c=n(5601);e.default=function(t){var e=this;this.clientHttps=null,this.profileHttps=null,this.loyaltyHttps=null,this.loyaltyFacade=null,this.localStorage=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getClientBadges=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getClientBadges()];case 1:return[2,t.sent()]}}))}))},this.getTemplates=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplates(t)];case 1:return[2,e.sent()]}}))}))},this.getTemplateById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboard=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboard(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForGame=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboardForGame(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getOwnRankings=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getOwnRankings(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserRankings=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getUserRankings(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getHighestSuccessRate=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getHighestSuccessRate(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTemplateWinners=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateWinners(t)];case 1:return[2,e.sent()]}}))}))},this.getEntitiesFollows=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getEntitiesFollows(t,n)];case 1:return[2,e.sent()]}}))}))},this.clientHttps=new s.default(t),this.profileHttps=new u.default(t),this.loyaltyHttps=new a.default(t),this.localStorage=new c.default(t),this.loyaltyFacade=new o.default(t,this.clientHttps,this.loyaltyHttps,this.profileHttps,this.localStorage)}},8153:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},5111:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8153);e.default=function(){this.value=[new r.default]}},8608:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=[],this.predictor=[],this.topX=[],this.matchQuiz=[]}},246:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1429);e.default=function(){this.requirements=new r.default}},8687:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},1429:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.gameParticipationCount=null,this.entityId=null,this.entityType=null,this.predictionsMade=null,this.correctPredictions=null}},515:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5111),i=n(4226);e.default=function(){this.enabled=!1,this.conditions={list:null},this.actions=new r.default,this.rewards=new i.default}},7910:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=null,this.page=null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit="+this.limit),this.page&&(t+="&",t+="page="+this.page),t},t}();e.default=n},4996:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.sortOrder=null,n.rankType=null,n.leaderboardIds=null,n.gameType=null,n.constructFiltersUrl=function(){var e=t.prototype.constructFiltersUrl.call(n);return n.sortOrder&&(e+="&",e+="sort_order="+n.sortOrder),n.rankType&&(e+="&",e+="rank_type="+n.rankType),n.leaderboardIds&&(e+="&",e+="type_ids="+n.leaderboardIds.join(",")),n.gameType&&(e+="&",e+="game_type="+n.gameType),e},n.sortOrder=e.sortOrder,n.rankType=e.rankType,n.leaderboardIds=e.leaderboardIds,n.gameType=e.type&&"game"===e.type.toLowerCase()?e.gameType:null,n}return i(e,t),e}(n(7910).default);e.default=s},6507:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.points=null,this.predictionsMade=null,this.profileId=null,this.profileModel=null,this.successRatePercent=null}},7746:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6507);e.default=function(){this.remapHighestSuccessRate=function(t){return t.map((function(t){var e=new r.default;return e.position=t.position,e.points=t.points,e.predictionsMade=t.predictions_made,e.profileId=t.profile_id,e.successRatePercent=t.success_rate_percent,e}))}}},9642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.profileId=null,this.profileModel=null,this.points=null,this.predictionsMade=null}},7419:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5828),i=n(9642);e.default=function(){var t=this;this.remapResponse=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapMeta=function(t){var e=new r.default;return e.rankType=t.rank_type,e.fromDate=t.from_date,e.toDate=t.to_date,e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e},this.remapData=function(t){var e=[];return t.forEach((function(t){var n=new i.default;n.position=t.position,n.profileId=t.profile_id,n.points=t.points,n.predictionsMade=t.predictions_made,e.push(n)})),e}}},5828:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(155);e.default=function(){this.rankType=null,this.fromDate=null,this.toDate=null,this.pagination=new r.default}},4187:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=null,this.comments=null,this.predictor=null,this.activity=null,this.topX=null,this.matchQuiz=null}},9013:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.id=null,e.rankType=null,e.model=null,e.gameType=null,e}return i(e,t),e}(n(9642).default);e.default=s},4533:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569),i=n(9013),s=function(){function t(){var t=this;this.remapRankings=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapMeta=function(t){var e=new r.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.numberOfPages=t.pagination.number_of_pages,e.pagination.totalItems=t.pagination.total_items,e}}return t.prototype.remapData=function(t){var e=[];return t.forEach((function(t){var n=new i.default;n.id=t.id,n.rankType=t.rank_type,n.position=t.position,n.points=t.points,n.gameType=t.game_type,delete n.profileId,delete n.profileModel,delete n.predictionsMade,e.push(n)})),e},t}();e.default=s},4226:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.tiers=null,this.badges=null}},4982:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labels=null,e.customFields=null,e}return i(e,t),e}(n(194).default);e.default=s},194:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(439);e.default=function(){this.id=null,this.name=null,this.description=null,this.type=null,this.fromDate=null,this.toDate=null,this.markets=[],this.teamIds=[],this.matchIds=[],this.gameIds=[],this.gameTypes=[],this.competitionIds=[],this.excludedProfileIds=[],this.rules=null,this.flags=null,this.images=new r.default,this.status=null,this.automaticallyChangeStatus=!0,this.createdAt=null,this.updatedAt=null,this.related=null}},8899:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3483),i=n(4982),s=n(194);e.default=function(){var t=this;this.remapResponse=function(e){var n=[];return e.forEach((function(e){var r=new s.default;r.id=e.id,r.name=e.name,r.description=e.description,r.type=e.type,r.fromDate=e.from_date,r.toDate=e.to_date,r.markets=e.markets?e.markets:null,r.teamIds=e.team_ids?e.team_ids:null,r.matchIds=e.match_ids?e.match_ids:null,r.gameIds=e.game_ids?e.game_ids:null,r.gameTypes=e.game_types?e.game_types:null,r.competitionIds=e.competition_ids?e.competition_ids:null,r.excludedProfileIds=e.excluded_profile_ids?e.excluded_profile_ids:null,r.rules=e.rules?e.rules:null,r.flags=e.flags?e.flags:null,r.images=e.images?e.images:null,r.status=e.status?e.status:null,r.automaticallyChangeStatus=e.automatically_change_status,r.createdAt=e.created_at,r.updatedAt=e.updated_at,r.related=e.related?t.remapRelated(e.related):null,n.push(r)})),n},this.remapResponseId=function(e){var n=new i.default;return n.id=e.id,n.name=e.name,n.description=e.description,n.type=e.type,n.fromDate=e.from_date,n.toDate=e.to_date,n.markets=e.markets?e.markets:null,n.teamIds=e.team_ids?e.team_ids:null,n.matchIds=e.match_ids?e.match_ids:null,n.gameIds=e.game_ids?e.game_ids:null,n.gameTypes=e.game_types?e.game_types:null,n.competitionIds=e.competition_ids?e.competition_ids:null,n.excludedProfileIds=e.excluded_profile_ids?e.excluded_profile_ids:null,n.rules=e.rules?e.rules:null,n.flags=e.flags?e.flags:null,n.images=e.images?e.images:null,n.status=e.status?e.status:null,n.automaticallyChangeStatus=e.automatically_change_status,n.related=e.related?t.remapRelated(e.related):null,n.labels=e.labels,n.customFields=e.custom_fields,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapMeta=function(t){var e={};return e.totalItems=t.pagination.total_items,e},this.remapRelated=function(t){return t.map((function(t){var e=new r.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))}}},3142:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),o=n(4021),u=n(4904),c=n(8097),l=n(2535),d=n(5318),h=n(8900),p=n(8808),f=n(6409),m=n(8687),v=n(7910),y=n(4996);e.default=function(t){var e=this;this.idMappingService=null,this.profileNamespace=null,this.footballNamespace=null,this.errorHandlingMode=null,this.remapTemplatesIds=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],n=[],r=[],t.forEach((function(t){t.teamIds&&t.teamIds.length>0?e=s(s([],e,!0),t.teamIds,!0):t.matchIds&&t.matchIds.length>0?n=s(s([],n,!0),t.matchIds,!0):t.competitionIds&&t.competitionIds.length>0&&(r=s(s([],r,!0),t.competitionIds,!0))})),a={team:e,match:n,competition:r},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(a,"native",this.idMappingService.idSchema)]):[3,2];case 1:return o=i.sent(),s([],o.team,!0),s([],o.match,!0),s([],o.competition,!0),t.forEach((function(t){t.teamIds&&t.teamIds.length>0?t.teamIds=t.teamIds.map((function(t){return o.team.shift()})):t.matchIds&&t.matchIds.length>0?t.matchIds=t.matchIds.map((function(t){return o.match.shift()})):t.competitionIds&&t.competitionIds.length>0&&(t.competitionIds=t.competitionIds.map((function(t){return o.competition.shift()})))})),[2,t];case 2:return[2,t]}}))}))},this.addProfileModelToLeaderboad=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],(n=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(n)]:[2,t]):[3,2];case 1:return r=i.sent(),t.forEach((function(t){r.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t.profileModel||(t.profileModel=null),e.push(t)})),[2,e];case 2:return[2,t]}}))}))},this.buildClientBadges=function(t){var n=new m.default;return n.general=e.extractEnabledBadgesId(t.general),n.predictor=e.extractEnabledBadgesId(t.predictor),n.topX=e.extractEnabledBadgesId(t.topX),n.matchQuiz=e.extractEnabledBadgesId(t.matchQuiz),n},this.initFilters=function(t,e){switch(e){case"loyalty":t&&(t=new v.default(t));break;case"rankings":t&&(t=new y.default(t))}return t},this.addProfileModelToHighestSuccessRate=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(e)]:[2,t];case 1:return n=r.sent(),[2,t.map((function(t){return n.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t}))]}}))}))},this.extractRankingsIdsMap=function(t){var e=[],n=[],r=[];return t.forEach((function(t){"GAME"===t.rankType&&"TOP_X"===t.gameType?e.push(t.id):"GAME"===t.rankType&&"MATCH_QUIZ"===t.gameType?n.push(t.id):"TEMPLATE"===t.rankType&&r.push(t.id)})),[e,n,r]},this.setModelsForUserRankings=function(t,e,n,r){return r.data.forEach((function(r){"MATCH_QUIZ"===r.gameType&&e?r.model=e.filter((function(t){return t.id===r.id}))[0]:"TOP_X"===r.gameType&&t?r.model=t.filter((function(t){return t.id===r.id}))[0]:"TEMPLATE"===r.rankType&&n&&(r.model=n.filter((function(t){return t.id===r.id}))[0])})),r},this.completeContestWinners=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)];case 1:return n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),[2,t]}}))}))},this.validateEntitiesFollowsFilters=function(t){if(!t||!(t.footballCompetitions&&t.footballCompetitions.length||t.footballTeams&&t.footballTeams.length||t.footballPlayers&&t.footballPlayers.length)){if("default"===e.errorHandlingMode)throw new c.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED).response}if(t.footballCompetitions&&t.footballCompetitions.length>10||t.footballTeams&&t.footballTeams.length>10||t.footballPlayers&&t.footballPlayers.length>10){if("default"===e.errorHandlingMode)throw new c.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED).response}},this.remapEntitiesFollowsFilters=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s;return i(this,(function(i){switch(i.label){case 0:return e=JSON.parse(JSON.stringify(t)),n={},r={},e.footballCompetitions&&e.footballCompetitions.length&&(r.competition=e.footballCompetitions),e.footballTeams&&e.footballTeams.length&&(r.team=e.footballTeams),e.footballPlayers&&e.footballPlayers.length&&(r.player=e.footballPlayers),[4,this.idMappingService.idMappingFacade.getEntitiesByIds(r,this.idMappingService.idSchema,a.IdSchemaEnum.NATIVE)];case 1:return s=i.sent(),Object.keys(s).forEach((function(t){"competition"===t?n.footballCompetitions=s[t]:"team"===t?n.footballTeams=s[t]:"player"===t&&(n.footballPlayers=s[t])})),[2,n]}}))}))},this.addModelsToEntitiesFollows=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return e=[],n="fb:c:",r=new Map,s=[],a="fb:t:",o=new Map,u=[],c="fb:p:",l=null,t.breakdown.forEach((function(t){t.id.includes(n)?e.push(t.id):t.id.includes(a)?s.push(t.id):t.id.includes(c)&&u.push(t.id)})),e.length?[4,this.footballNamespace.footballFacade.competitionsFacade.getCompetitionsMapWithNativeIds(e)]:[3,2];case 1:r=i.sent(),i.label=2;case 2:return s.length?[4,this.footballNamespace.footballFacade.teamsFacade.getTeamsMapWithNativeIds(s)]:[3,4];case 3:o=i.sent(),i.label=4;case 4:return u.length?[4,this.footballNamespace.footballFacade.playerFacade.getPlayersMapWithNativeIds(u)]:[3,6];case 5:l=i.sent(),i.label=6;case 6:return t.breakdown.forEach((function(t){t.id.includes(n)?(t.model=r.get(t.id),t.id=t.model.id):t.id.includes(a)?(t.model=o.get(t.id),t.id=t.model.id):t.id.includes(c)&&(t.model=l[t.id],t.id=t.model.id)})),[2,t]}}))}))},this.extractEnabledBadgesId=function(t){var e=[];return t.forEach((function(t){t.enabled&&e.push(t.id)})),e},this.idMappingService=new h.default(t),this.profileNamespace=new f.default(t),this.footballNamespace=new p.default(t),this.errorHandlingMode=t.errorHandlingMode}},1139:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(2535),o=n(5318),u=n(7974);e.default=function(){this.validateMarket=function(t,e){if(!Object.keys(u.MarketEnum).includes(e)){var n=(0,o.invalidMarketMessage)(e);if("default"===t)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n);throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n).response}}}},1859:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(1553),o=n(7686),u=n(2793),c=n(8900),l=n(1732),d=n(7782),h=n(5013),p=n(853),f=n(7299),m=n(2310),v=n(4800),y=n(8097),g=n(4021),w=n(4904),b=n(5318),_=n(2535);e.default=function(t){var e=this;this.predictorHttps=null,this.predictorService=null,this.idMapping=null,this.clientHttps=null,this.predictorValidator=null,this.errorHandlingMode=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.MATCH_QUIZ)];case 1:return t=e.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,o,u=this;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorValidator.validateBodyFields("MATCH_QUIZ",t),(e=t.fixtures.map((function(t){return u.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value,t.prediction.playerId)})))&&e.length?this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],e.forEach((function(t){n.push(t.matchId),t instanceof l.default&&t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&r.push(t.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,4];case 1:return a=i.sent(),o={},r&&r.length>0?[4,this.predictorService.remapPlayerIdMapToNative(r)]:[3,3];case 2:o=i.sent(),i.label=3;case 3:e.forEach((function(t,e){t.matchId=a[e],t instanceof l.default&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=o[t.prediction.playerId])})),i.label=4;case 4:return t.fixtures=e,[4,this.predictorHttps.makeFootballPrediction(t)];case 5:return[2,i.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("MATCH_QUIZ",t),[4,this.predictorHttps.getGames(e,n)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return n=n||!1,[4,this.predictorHttps.getGameById(t,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return s=s||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new d.default(n)),[4,this.predictorHttps.getGamePredictions(t,s,n)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return s=s||!1,n&&(n=new v.default(n)),[4,this.predictorHttps.getGameResults(t,s,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,e={status:p.GameStatusEnum.OPEN,type:"MATCH_QUIZ"},e=new f.default(e),[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){var e,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),n=n||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(e)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),o=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(o,n)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(s,u)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,o,u,c;return i(this,(function(i){switch(i.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),s=s||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",n),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,e)];case 1:return(o=i.sent()).data.length>0?(o.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),u=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(u,s)]):[3,4];case 2:return c=i.sent(),[4,this.predictorService.addPredictionProp(o,c)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getUserGamePrediction=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getUserPredictions(t,s,e)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(t){return t.gameInstanceId===n}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,n)];case 1:return e=r.sent(),[4,this.predictorService.completeGameMarketResults(e,"MATCH_QUIZ")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getGameById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===e.errorHandlingMode&&t>50)throw new y.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===e.errorHandlingMode&&t>50)throw new _.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.predictorValidator=new m.default(t.errorHandlingMode),this.idMapping=new c.default(t),this.predictorHttps=new u.default(t,this.idMapping),this.predictorService=new h.default(t,this.idMapping),this.clientHttps=new o.default(t),this.errorHandlingMode=t.errorHandlingMode}},267:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(1859);e.default=function(t){var e=this;this.matchQuizFacade=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGamePredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameResults(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGameEditions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGamePrediction(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameWinners(t)];case 1:return[2,e.sent()]}}))}))},this.matchQuizFacade=new s.default(t)}},5765:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.defaultMarkets=null,this.competitionsWhitelist=null}},8410:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899),i=n(8042);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},670:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameId=null,this.results=null,this.tieBreakers=null}},7243:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.images=null,this.scheduleOpenAt=null}},8042:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.target=null,this.playerId=null,this.playerModel=null,this.result=null}},7974:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.playerMarketNobodyPrediction=e.endMarkMarkets=e.playerMarkets=e.MarketsOverCorners=e.MarketsOverGoals=e.MarketEnum=void 0,function(t){t.FT_1X2="FT_1X2",t.HT_1X2="HT_1X2",t.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.HT_FT="HT_FT",t.PLAYER_SCORE="PLAYER_SCORE",t.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",t.PLAYER_RED_CARD="PLAYER_RED_CARD",t.RED_CARD_MATCH="RED_CARD_MATCH",t.PENALTY_MATCH="PENALTY_MATCH",t.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",t.CORNERS_MATCH="CORNERS_MATCH",t.CORRECT_SCORE="CORRECT_SCORE",t.CORRECT_SCORE_ADVANCED="CORRECT_SCORE_ADVANCED",t.CORRECT_SCORE_HT="CORRECT_SCORE_HT",t.PLAYER_SCORE_HATTRICK="PLAYER_SCORE_HATTRICK",t.PLAYER_SCORE_TWICE="PLAYER_SCORE_TWICE",t.OVER_GOALS_0_5="OVER_GOALS_0_5",t.OVER_GOALS_1_5="OVER_GOALS_1_5",t.OVER_GOALS_2_5="OVER_GOALS_2_5",t.OVER_GOALS_3_5="OVER_GOALS_3_5",t.OVER_GOALS_4_5="OVER_GOALS_4_5",t.OVER_GOALS_5_5="OVER_GOALS_5_5",t.OVER_GOALS_6_5="OVER_GOALS_6_5",t.OVER_CORNERS_6_5="OVER_CORNERS_6_5",t.OVER_CORNERS_7_5="OVER_CORNERS_7_5",t.OVER_CORNERS_8_5="OVER_CORNERS_8_5",t.OVER_CORNERS_9_5="OVER_CORNERS_9_5",t.OVER_CORNERS_10_5="OVER_CORNERS_10_5",t.OVER_CORNERS_11_5="OVER_CORNERS_11_5",t.OVER_CORNERS_12_5="OVER_CORNERS_12_5",t.OVER_CORNERS_13_5="OVER_CORNERS_13_5"}(n=e.MarketEnum||(e.MarketEnum={})),e.MarketsOverGoals=[n.OVER_GOALS_0_5,n.OVER_GOALS_1_5,n.OVER_GOALS_2_5,n.OVER_GOALS_3_5,n.OVER_GOALS_4_5,n.OVER_GOALS_5_5,n.OVER_GOALS_6_5],e.MarketsOverCorners=[n.OVER_CORNERS_6_5,n.OVER_CORNERS_7_5,n.OVER_CORNERS_8_5,n.OVER_CORNERS_9_5,n.OVER_CORNERS_10_5,n.OVER_CORNERS_11_5,n.OVER_CORNERS_12_5,n.OVER_CORNERS_13_5],e.playerMarkets=[n.PLAYER_RED_CARD,n.PLAYER_SCORE,n.PLAYER_SCORE_FIRST_GOAL,n.PLAYER_SCORE_HATTRICK,n.PLAYER_SCORE_TWICE,n.PLAYER_YELLOW_CARD],e.endMarkMarkets=[n.FT_1X2,n.HT_1X2,n.HT_FT,n.DOUBLE_CHANCE,n.CORNERS_MATCH,n.CORRECT_SCORE,n.CORRECT_SCORE_HT,n.CORRECT_SCORE_ADVANCED],e.playerMarketNobodyPrediction=n.PLAYER_SCORE_FIRST_GOAL},6147:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.pastStatuses=e.StatusEnum=void 0,function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(n=e.StatusEnum||(e.StatusEnum={})),e.pastStatuses=[n.WON,n.LOST,n.PARTIALLY_WON,n.CANCELED]},1976:(t,e)=>{"use strict";var n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.HalfTimeFullTimeEnum=e.DoubleChanceEnum=e.OneXTwoEnum=void 0,(i=e.OneXTwoEnum||(e.OneXTwoEnum={})).ONE="1",i.X="x",i.TWO="2",(r=e.DoubleChanceEnum||(e.DoubleChanceEnum={})).ONE_X="1x",r.X_TWO="x2",r.ONE_TWO="12",(n=e.HalfTimeFullTimeEnum||(e.HalfTimeFullTimeEnum={})).ONE_ONE="1/1",n.ONE_X="1/x",n.ONE_TWO="1/2",n.X_ONE="x/1",n.X_X="x/x",n.X_TWO="x/2",n.TWO_ONE="2/1",n.TWO_X="2/x",n.TWO_TWO="2/2"},2929:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),o=n(7974),u=n(7686),c=n(5013),l=n(3950),d=n(1732),h=n(2310),p=n(8097),f=n(4021),m=n(4904),v=n(5318),y=n(2535);e.default=function(t,e,n,g){var w=this;this.predictorHttps=null,this.clientHttps=null,this.idMapping=null,this.predictorService=null,this.predictorValidator=null,this.errorHandlingMode=null,this.makeFootballPrediction=function(t,e,n,s){return r(w,void 0,void 0,(function(){var r,u,c,h,g,w,b;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorValidator.validateFixture(t,e,n,s),u=new l.default,this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,6]:(c=r.matchId,h="",[4,this.predictorService.remapMatchIdToNative([c])]);case 1:if(g=i.sent(),r.matchId=g[0],"default"===this.errorHandlingMode&&!r.matchId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).errorMessage();if("standard"===this.errorHandlingMode&&!r.matchId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).response;return r instanceof d.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(h=r.prediction.playerId,w=r.prediction,[4,this.predictorService.remapPlayerIdToNative([h])]):[3,3]:[3,4];case 2:w.playerId=i.sent(),i.label=3;case 3:if("default"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).errorMessage();if("standard"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).response;i.label=4;case 4:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 5:return(b=i.sent()).fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=h),t.matchId=c})),[2,b];case 6:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 7:return[2,i.sent()]}}))}))},this.getMatchSummary=function(t,e){return r(w,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.getMatchSummaryBase(t,e)];case 1:return n=i.sent(),r=JSON.parse(JSON.stringify(n.predictions)),[4,this.predictorService.remapPlayerIdToIdSchema(r)];case 2:return s=i.sent(),n.predictions=s,[2,n]}}))}))},this.getMarketSummary=function(t,e,n,s){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.getMatchSummaryBase(t,s)];case 1:return r=i.sent(),[4,this.predictorService.getMarketSummary(r,e,n)];case 2:return[2,i.sent()];case 3:throw i.sent();case 4:return[2]}}))}))},this.getMatchSummaryBase=function(t,e){return r(w,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapMatchIdToNative([t])];case 1:return n=i.sent(),r=n[0],[4,this.predictorHttps.getMatchSummary(r,e)];case 2:return(s=i.sent()).matchId=t,[2,s];case 3:return[4,this.predictorHttps.getMatchSummary(t,e)];case 4:return[2,i.sent()]}}))}))},this.getConfig=function(){return r(w,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(u.FeatureConfigType.PREDICTOR)];case 1:return t=e.sent(),this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.deleteFootballPrediction=function(t){return r(w,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(w,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"user"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,e){return r(w,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],t,!0))];case 1:t=r.sent(),r.label=2;case 2:return n=this.predictorService.initPredictionsFilters(e,"matches",t),[4,this.predictorHttps.getMyPredictions(n)];case 3:return[2,r.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(w,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"current"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(w,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"past"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getUserPredictions=function(t,e,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"user"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserCurrentPredictions=function(t,e,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"current"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPastPredictions=function(t,e,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"past"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,e,n,o){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],e,!0))];case 1:e=i.sent(),i.label=2;case 2:return r=this.predictorService.initPredictionsFilters(n,"matches",e),[4,this.predictorHttps.getUserPredictions(t,o,r)];case 3:return[2,i.sent()]}}))}))},this.getPredictionById=function(t){return r(w,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.predictorHttps=e,this.idMapping=g,this.clientHttps=n,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new h.default(t.errorHandlingMode),this.predictorService=new c.default(t,g)}},704:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8608),i=n(246),s=n(1429),a=n(515),o=n(4187),u=n(4226),c=n(5765),l=n(1180),d=n(8452);e.default=function(){var t=this;this.remapPredictorConfig=function(t){var e=new d.default;return e.enabled=t.enabled,e.fullCoverageCompetitions=t.full_coverage_competitions,e.markets=t.markets,e.successRateScopes=t.success_rate_scopes,e},this.remapTopXConfig=function(t){var e=new l.default;return e.enabled=t.enabled,e.minFixtures=t.min_fixtures,e.maxFixtures=t.max_fixtures,e.competitionsWhitelist=t.competitions_whitelist,e},this.remapMatchQuizConfig=function(t){var e=new c.default;return e.enabled=t.enabled,e.defaultMarkets=t.default_markets,e.competitionsWhitelist=t.competitions_whitelist,e},this.remapLoyaltyConfig=function(e){var n=new a.default;return n.enabled=e.enabled,n.conditions.list=e.conditions.list,n.actions.value=e.actions.value,n.rewards=t.remapRewards(e.rewards),n},this.remapRewards=function(e){var n=new u.default;return n.points=t.remapPoints(e.points),n.tiers=e.tiers,n.badges=t.remapBadges(e.badges),n},this.remapPoints=function(t){var e=new o.default;return e.general=t.general,e.comments=t.comments,e.predictor=t.predictor,e.activity=t.activity,e.topX=t.top_x,e.matchQuiz=t.match_quiz,e},this.remapBadges=function(e){var n=new r.default;return n.general=e.general,n.predictor=t.remapBadgeValues(e.predictor),n.topX=t.remapBadgeValues(e.top_x),n.matchQuiz=t.remapBadgeValues(e.match_quiz),n},this.remapBadgeValues=function(e){return e.map((function(e){var n=new i.default;return n.id=e.id,n.label=e.label,n.enabled=e.enabled,n.requirements=t.remapRequirements(e.requirements),n}))},this.remapRequirements=function(t){var e=new s.default;return e.points=t.points,e.gameParticipationCount=t.game_participation_count,e.entityId=t.entity_id,e.entityType=t.entity_type,e.predictionsMade=t.predictions_made,e.correctPredictions=t.correct_predictions,e}}},8452:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(442);e.default=function(){this.enabled=!1,this.fullCoverageCompetitions=null,this.markets=null,this.successRateScopes=new r.default}},442:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.competitions=[],this.teams=[],this.markets=[]}},6367:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.playerId=null,this.playerModel=null}},1406:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(2524),a=n(1732),o=n(4119),u=n(1465),c=n(5132),l=n(7344);e.default=function(t,e,n){var d=this;this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapFixturesRequest=function(t){var e={};if(e.match_id=t.matchId,e.match_type="FOOTBALL",t instanceof a.default)e.market=t.market,e.prediction=t.prediction.value,e.player_id=t.prediction.playerId;else if(t instanceof c.default||t instanceof l.default)e.market=t.market,e.prediction=t.prediction.value;else if(t instanceof u.default){e.market=t.market;var n=t.prediction.value.split(":");e.goals_home=Number(n[0]),e.goals_away=Number(n[1])}else e.market=t.market,e.prediction=t.prediction.value;return e},this.remapFixturesResponse=function(t){return r(d,void 0,void 0,(function(){var e,n,r,a,o,u,c,l,d,h,p,f;return i(this,(function(i){switch(i.label){case 0:for(e="OWN_GOAL",n=[],r=[],a=null,o=[],t.length>1&&t.sort((function(t,e){return t.match_id.localeCompare(e.match_id)})),u=0,c=t;u<c.length;u++)p=c[u],n.push(p.match_id),p.player_id&&!r.includes(p.player_id)&&r.push(p.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(n)];case 1:return l=i.sent(),r.sort((function(t,e){return t.localeCompare(e)})),r&&r.length>0&&!r.includes(e)?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:for(d=0,h=t;d<h.length;d++)p=h[d],f=new s.default,p.target?f.market=this.predictorService.convertMarketForResponseModel(p.market,p.target):f.market=p.market,f.matchId=l[p.match_id].id,f.matchType=p.match_type,f.matchModel=l?l[p.match_id]:null,delete f.matchModel.availableMarkets,void 0!==p.goals_home&&void 0!==p.goals_away?f.prediction.value=p.goals_home.toString()+":"+p.goals_away.toString():f.prediction.value=p.prediction,f.prediction.playerId=p.player_id?p.player_id:null,f.prediction.playerId&&f.prediction.playerId!==e&&(f.prediction.playerModel=a[p.player_id],f.prediction.playerId=a[p.player_id].id),f.result=this.remapResult(p.result),o.push(f);return[2,o]}}))}))},this.remapResult=function(t){var e=new o.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.matchFacade=t,this.playerFacade=e,this.predictorService=n}},2524:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6367);e.default=function(){this.market=null,this.matchId=null,this.matchType=null,this.matchModel=null,this.prediction=new r.default,this.result=null}},1206:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.BOTH_TEAMS_SCORE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},5274:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(8038);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.CORNERS_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1465:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3125);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},7535:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(6902);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.DOUBLE_CHANCE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},7307:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(6642);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.HT_FT,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1718:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2782);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},5132:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9883);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},7344:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9883);e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n}},1855:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.PENALTY_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1732:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7321);e.default=function(t,e,n,i){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n,this.prediction.playerId=i}},5814:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.RED_CARD_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},4119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.settledAt=null,this.resettledAt=null,this.status=null,this.outcome=null,this.points=0}},5908:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.no=0,this.yes=0}},2726:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(1406),a=n(2532),o=n(3792),u=n(595),c=n(4545),l=n(4272),d=n(2524),h=n(5013),p=n(1399);e.default=function(t,e){var n=this;this.fixturesRemapper=null,this.footballHttps=null,this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapRequestBody=function(t){var e={};return e.game_instance_id=t.gameInstanceId,e.fixtures=t.fixtures.map((function(t){return n.fixturesRemapper.remapFixturesRequest(t)})),t instanceof p.default&&t.tiebreaker&&(e.tiebreaker={},e.tiebreaker.golden_goal=t.tiebreaker.goldenGoal?t.tiebreaker.goldenGoal:null),e},this.remapResponseArrayBody=function(t){return r(n,void 0,void 0,(function(){var e,n,r,s,o,u,c=this;return i(this,(function(i){switch(i.label){case 0:return t.length?(e="OWN_GOAL",n=[],r=[],s={},o=[],t.forEach((function(t){t.fixtures.forEach((function(t){n.push(t.match_id),t.player_id&&t.player_id!==e&&r.push(t.player_id)}))})),[4,this.matchFacade.getMatchesMapWithNativeIds(n)]):[3,4];case 1:return u=i.sent(),r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:s=i.sent(),i.label=3;case 3:return t.forEach((function(t){var n=new a.default,r=[];n.id=t.id,n.gameInstanceId=t.game_instance_id,n.gameType=t.game_type,n.wager=t.wager,n.totalFixtures=t.total_fixtures,n.settledFixtures=t.settled_fixtures,n.userId=t.user_id,t.fixtures.forEach((function(t){var n=new d.default;t.target?n.market=c.predictorService.convertMarketForResponseModel(t.market,t.target):n.market=t.market,n.matchId=u[t.match_id].id,n.matchType=t.match_type,n.matchModel=u[t.match_id],delete n.matchModel.availableMarkets,void 0!==t.goals_home&&void 0!==t.goals_away?n.prediction.value=t.goals_home.toString()+":"+t.goals_away.toString():n.prediction.value=t.prediction,n.prediction.playerId=t.player_id?t.player_id:null,n.prediction.playerId&&n.prediction.playerId!==e&&(n.prediction.playerModel=s[n.prediction.playerId],n.prediction.playerId=s[n.prediction.playerId].id),n.result=c.fixturesRemapper.remapResult(t.result),r.push(n)})),n.fixtures=r,n.status=t.status,t.tiebreaker?n.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:n.tiebreaker=null,n.points=t.points,n.createdAt=t.created_at,n.updatedAt=t.updated_at,o.push(n)})),[2,o];case 4:return[2,t]}}))}))},this.remapResponseObjBody=function(t){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=new a.default).id=t.id,e.gameInstanceId=t.game_instance_id,e.gameType=t.game_type,e.wager=t.wager,e.totalFixtures=t.total_fixtures,e.settledFixtures=t.settled_fixtures,e.userId=t.user_id,n=e,[4,this.fixturesRemapper.remapFixturesResponse(t.fixtures)];case 1:return n.fixtures=r.sent(),e.status=t.status,t.tiebreaker?e.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:e.tiebreaker=null,e.points=t.points,e.createdAt=t.created_at,e.updatedAt=t.updated_at,[2,e]}}))}))},this.remapPredictionModel=function(t){var e=new o.default;return e.fullTimeOneXTwo=t.FT_1X2,e.halfTimeOneXTwo=t.HT_1X2,e.bothTeamsScore=t.BOTH_TEAMS_SCORE,e.overZeroPointFiveGoals=t.OVER_GOALS_0_5,e.overOnePointFiveGoals=t.OVER_GOALS_1_5,e.overTwoPointFiveGoals=t.OVER_GOALS_2_5,e.overThreePointFiveGoals=t.OVER_GOALS_3_5,e.overFourPointFiveGoals=t.OVER_GOALS_4_5,e.overFivePointFiveGoals=t.OVER_GOALS_5_5,e.overSixPointFiveGoals=t.OVER_GOALS_6_5,e.overSixPointFiveCorners=t.OVER_CORNERS_6_5,e.overSevenPointFiveCorners=t.OVER_CORNERS_7_5,e.overEightPointFiveCorners=t.OVER_CORNERS_8_5,e.overNinePointFiveCorners=t.OVER_CORNERS_9_5,e.overTenPointFiveCorners=t.OVER_CORNERS_10_5,e.overElevenPointFiveCorners=t.OVER_CORNERS_11_5,e.overTwelvePointFiveCorners=t.OVER_CORNERS_12_5,e.overThirteenPointFiveCorners=t.OVER_CORNERS_13_5,e.doubleChance=t.DOUBLE_CHANCE,e.halfTimeFullTime=t.HT_FT,e.playerScore=t.PLAYER_SCORE,e.playerYellowCard=t.PLAYER_YELLOW_CARD,e.playerRedCard=t.PLAYER_RED_CARD,e.redCardMatch=t.RED_CARD_MATCH,e.penaltyMatch=t.PENALTY_MATCH,e.playerScoreFirstGoal=t.PLAYER_SCORE_FIRST_GOAL,e.cornersMatch=t.CORNERS_MATCH,e.correctScore=t.CORRECT_SCORE,e.correctScoreHalfTime=t.CORRECT_SCORE_HT,e.correctScoreAdvanced=t.CORRECT_SCORE_ADVANCED,e.playerScoreHattrick=t.PLAYER_SCORE_HATTRICK,e.playerScoreTwice=t.PLAYER_SCORE_TWICE,e},this.footballHttps=new u.default(t),this.matchFacade=new c.default(t,this.footballHttps,e),this.playerFacade=new l.default(t,this.footballHttps,e),this.predictorService=new h.default(t,e),this.fixturesRemapper=new s.default(this.matchFacade,this.playerFacade,this.predictorService)}},3950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameInstanceId=null,this.fixtures=null}},2532:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7640);e.default=function(){this.id=null,this.gameInstanceId=null,this.gameType=null,this.wager=null,this.totalFixtures=null,this.settledFixtures=null,this.userId=null,this.fixtures=[],this.status=null,this.tiebreaker=new r.default,this.points=null,this.createdAt=null,this.updatedAt=null}},7782:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6147);e.default=function(t){var e=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.matchIds=null,this.constructFiltersUrl=function(){var t="",n=!1;return e.status&&(n=Object.values(r.StatusEnum).some((function(t){return e.status.includes(t)}))),e.limit&&(t+="&",t+="limit="+e.limit),e.startAfter&&(t+="&",t+="start_after="+e.startAfter),e.status&&n&&(t+="&",t+="status="+e.status.join(",")),e.type&&(t+="&",t+="game_types="+e.type),e.matchIds&&(t+="&",t+="match_ids="+e.matchIds.join(",")),t},this.limit=t.limit?t.limit:null,this.startAfter=t.startAfter?t.startAfter:null,this.status=t.status?t.status:null,this.type=t.type?t.type:null,this.matchIds=t.matchIds?t.matchIds:null}},3792:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5908);e.default=function(){this.fullTimeOneXTwo={},this.halfTimeOneXTwo={},this.bothTeamsScore=new r.default,this.doubleChance={},this.halfTimeFullTime={},this.playerScore={},this.playerYellowCard={},this.playerRedCard={},this.redCardMatch=new r.default,this.penaltyMatch=new r.default,this.playerScoreFirstGoal={},this.cornersMatch={},this.correctScore={},this.correctScoreHalfTime={},this.correctScoreAdvanced={},this.playerScoreHattrick={},this.playerScoreTwice={},this.overZeroPointFiveGoals=new r.default,this.overOnePointFiveGoals=new r.default,this.overTwoPointFiveGoals=new r.default,this.overThreePointFiveGoals=new r.default,this.overFourPointFiveGoals=new r.default,this.overFivePointFiveGoals=new r.default,this.overSixPointFiveGoals=new r.default,this.overSixPointFiveCorners=new r.default,this.overSevenPointFiveCorners=new r.default,this.overEightPointFiveCorners=new r.default,this.overNinePointFiveCorners=new r.default,this.overTenPointFiveCorners=new r.default,this.overElevenPointFiveCorners=new r.default,this.overTwelvePointFiveCorners=new r.default,this.overThirteenPointFiveCorners=new r.default}},9378:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchType=null,this.predictions=null}},9679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2726),i=n(9378);e.default=function(t,e){var n=this;this.remapPredictions=null,this.remapResponse=function(t){var e=new i.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.predictions=n.remapPredictions.remapPredictionModel(t.predictions),e},this.remapPredictions=new r.default(t,e)}},7321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1,this.playerId=null}},9883:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1}},8038:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},3125:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},6902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},6642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},2782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},1259:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(2793),a=n(8900),o=n(2929),u=n(7686);e.default=function(t){var e=this;this.predictorHttps=null,this.clientHttps=null,this.predictorFacade=null,this.idMapping=null,this.makeFootballPrediction=function(t,n,s,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.makeFootballPrediction(t,n,s,a)];case 1:return[2,e.sent()]}}))}))},this.getMatchSummary=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMatchSummary(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMarketSummary=function(t,n,s,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMarketSummary(t,n,s,a)];case 1:return[2,e.sent()]}}))}))},this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.deleteFootballPrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyCurrentPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPastPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictionsForMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserCurrentPredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserCurrentPredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserPastPredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPastPredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,n,s,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictionsForMatches(t,n,s,a)];case 1:return[2,e.sent()]}}))}))},this.getPredictionById=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new a.default(t),this.predictorHttps=new s.default(t,this.idMapping),this.clientHttps=new u.default(t),this.predictorFacade=new o.default(t,this.predictorHttps,this.clientHttps,this.idMapping)}},5013:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var o=n(7974),u=n(3792),c=n(8452),l=n(5908),d=n(8950),h=n(6890),p=n(595),f=n(4545),m=n(7782),v=n(7299),y=n(712),g=n(4119),w=n(3751),b=n(7243),_=n(4272),E=n(1180),I=n(5765),M=n(6147),O=n(5318),T=n(4946),R=n(6409),S=n(1260),P=n(6247);e.default=function(t,e){var n=this;this.footballHttps=null,this.idMapping=null,this.matchFacade=null,this.playerFacade=null,this.profileNamespace=null,this.remapMatchIdToNative=function(t){return i(n,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"match","native")];case 1:return[2,e.sent().match]}}))}))},this.remapPlayerIdToNative=function(t){return i(n,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"player","native")];case 1:return[2,e.sent().player[0]]}}))}))},this.remapPlayerIdMapToNative=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(s){switch(s.label){case 0:return e={},n=(0,y.transformIdsToBeUnique)(t),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=s.sent(),i=r.player,n.forEach((function(t,n){return e[t]=i[n]})),[2,e]}}))}))},this.remapPlayerIdToIdSchema=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,a,o,u,c,l,d,h,p,f,m,v,y,g,w,b;return s(this,(function(s){switch(s.label){case 0:for(e=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=[],r=0,i=Object.entries(t);r<i.length;r++)if(a=i[r],o=a[0],u=a[1],e.includes(o))for(c=0,l=Object.keys(u);c<l.length;c++)"NOBODY"!==(d=l[c])&&"OWN_GOAL"!==d&&n.push(d);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,t];case 1:for(h=s.sent(),p=0,f=Object.entries(t);p<f.length;p++)if(m=f[p],v=m[0],y=m[1],e.includes(v))for(g=0,w=Object.keys(y);g<w.length;g++)"NOBODY"!==(b=w[g])&&"OWN_GOAL"!==b&&(y[h[b].id]=y[b],y[h[b].id].model=h[b],this.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete y[b]);return[2,t]}}))}))},this.convertMarket=function(t){for(var e=Object.keys(new u.default),n=Object.values(o.MarketEnum),r=0;r<n.length;r++)t===n[r]&&(t=e[r]);return t},this.convertMarketForResponseModel=function(t,e){return t+"_"+e.toString()},this.getMarketSummary=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,a,u,c,d,h,p,f=this;return s(this,(function(s){switch(s.label){case 0:if(n=this.convertMarket(e),(i={}).matchId=t.matchId,i.matchType=t.matchType,!Object.keys(t.predictions).includes(n))throw new Error("You have passed invalid market");return i[n]=t.predictions[n],o.playerMarkets.includes(e)&&r?(a="","OWN_GOAL"===r||"NOBODY"===r?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({player:[r]},this.idMapping.idSchema,"native")]):[3,6];case 1:u=s.sent(),a=u.player[0],s.label=2;case 2:return a&&i[n][a]?[4,this.playerFacade.getPlayersMapWithNativeIds([a])]:[3,4];case 3:return c=s.sent(),i[n][a].model=c[a],[2,i[n][a]];case 4:return a?(i[n][a]=new l.default,[2,i[n][a]]):[2,i[n][r]];case 5:return[3,10];case 6:return!o.playerMarkets.includes(e)||r?[3,10]:(d=Object.keys(i[n]).filter((function(t){return"NOBODY"!==t&&"OWN_GOAL"!==t}))).length?[4,this.playerFacade.getPlayersMapWithNativeIds(d)]:[3,8];case 7:return p=s.sent(),[3,9];case 8:p={},s.label=9;case 9:h=p,Object.keys(h).length&&Object.keys(i[n]).forEach((function(t){"NOBODY"!==t&&"OWN_GOAL"!==t&&(i[n][h[t].id]=i[n][t],i[n][h[t].id].model=h[t],f.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete i[n][t])})),s.label=10;case 10:return[2,i]}}))}))},this.remapCompetitionsFromConfig=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,a,o,u,l;return s(this,(function(s){switch(s.label){case 0:return t instanceof c.default?(e={competition:t.fullCoverageCompetitions},n={competition:t.successRateScopes.competitions},r={team:t.successRateScopes.teams},[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,"native",this.idMapping.idSchema)]):[3,4];case 1:return i=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",this.idMapping.idSchema)];case 2:return a=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(r,"native",this.idMapping.idSchema)];case 3:return o=s.sent(),t.fullCoverageCompetitions=i.competition,t.successRateScopes.competitions=a.competition,t.successRateScopes.teams=o.team,[2,t];case 4:return t instanceof E.default||t instanceof I.default?(u={competition:t.competitionsWhitelist},[4,this.idMapping.idMappingFacade.getEntitiesByIds(u,"native",this.idMapping.idSchema)]):[3,6];case 5:return l=s.sent(),t.competitionsWhitelist=l.competition,[2,t];case 6:return[2]}}))}))},this.remapMatchIdsFixtures=function(t){return i(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return Array.isArray(t.data)?t.data.length>0?(e=[],n=[],t.data.forEach((function(t){t instanceof w.default||t instanceof d.default||t instanceof b.default||t instanceof P.default?(t.fixtures.forEach((function(t){return e.push(t.matchId)})),t instanceof b.default&&t.fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&n.push(t.prediction.playerId)}))):t instanceof h.default&&t.results.forEach((function(t){return e.push(t.matchId)}))})),[4,this.refactorResponseArrModel(t,e,n)]):[3,2]:[3,4];case 1:case 5:return[2,r.sent()];case 2:return[2,t];case 3:return[3,6];case 4:return[4,this.refactorResponseObjModel(t)];case 6:return[2]}}))}))},this.refactorResponseArrModel=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,a,o=this;return s(this,(function(s){switch(s.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return i=s.sent(),a={},r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=s.sent(),s.label=3;case 3:return t.data.forEach((function(t){t instanceof w.default||t instanceof d.default||t instanceof b.default?(t.fixtures.forEach((function(e){o.handleMatchModel(i,e),t instanceof b.default&&e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&(e.prediction.playerModel=a[e.prediction.playerId],e.prediction.playerId=a[e.prediction.playerId].id)})),n.push(t)):t instanceof h.default&&(t.results.forEach((function(t){t.matchModel=i[t.matchId],delete t.matchModel.availableMarkets,t.matchId=t.matchModel.id})),n.push(t))})),t.data=n,[2,t]}}))}))},this.refactorResponseObjModel=function(t){return i(n,void 0,void 0,(function(){var e,n,r=this;return s(this,(function(i){switch(i.label){case 0:return e=[],t.fixtures.forEach((function(t){return e.push(t.matchId)})),[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return n=i.sent(),t.fixtures.forEach((function(t){return r.handleMatchModel(n,t)})),[2,t]}}))}))},this.getCurrentGameId=function(t){var e=new Date;if(t.data.length>1){var n=[];return t.data.forEach((function(t){return n.push(t.predictionsCutoff)})),t.data.sort((function(t,n){var r=[t.predictionsCutoff,n.predictionsCutoff].map((function(t){return Math.abs(new Date(t)-e)}));return r[0]-r[1]}))[0].id}return t.data[0].id},this.initGameTypePredictions=function(t,e){var n={type:t,limit:null,startAfter:null};return e&&(n=r(r({},n),{limit:e.limit,startAfter:e.startAfter})),new m.default(n)},this.initGameFilters=function(t,e,n){if(e&&n)return e.type=t,e.gameIds=n,new v.default(e);if(e&&!n)return e.type=t,new v.default(e);if(!e&&n){var r={type:t,gameIds:n};return new v.default(r)}return r={type:t},new v.default(r)},this.addPredictionProp=function(t,e){return i(n,void 0,void 0,(function(){var n=this;return s(this,(function(r){switch(r.label){case 0:return e.data.forEach((function(e){t.data.forEach((function(t){e.id===t.game_instance_id&&(e.predictionId=t.id,e.outcome=t.status,e.fixtures.forEach((function(e,r){void 0!==t.fixtures[r].goals_home&&void 0!==t.fixtures[r].goals_away?e.prediction.value=t.fixtures[r].goals_home+":"+t.fixtures[r].goals_away:e.prediction.value=t.fixtures[r].prediction,t.fixtures[r].player_id?e.prediction.playerId=t.fixtures[r].player_id:t.fixtures[r].target&&(e.prediction.target=t.fixtures[r].target),e.prediction.result=n.remapResult(t.fixtures[r].result)})),e.predictionsMadeAt=t.created_at,e.points=t.points)}))})),e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,[4,this.remapMatchIdsFixtures(e)];case 1:return[2,r.sent()]}}))}))},this.remapResult=function(t){var e=new g.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.areIdsExceeded=function(t){return t.length>10},this.initPredictionsFilters=function(t,e,r){switch(e){case"user":t&&(t=new m.default(t));break;case"current":if(t)n.deleteUnexpectedProperties(t),t.status=[M.StatusEnum.ACTIVE],t=new m.default(t);else{var i={status:[M.StatusEnum.ACTIVE]};t=new m.default(i)}break;case"past":t?(n.deleteUnexpectedProperties(t),t.status=M.pastStatuses,t=new m.default(t)):(i={status:M.pastStatuses},t=new m.default(i));break;case"matches":t?(n.deleteUnexpectedProperties(t),t.matchIds=r,t=new m.default(t)):(i={matchIds:r},t=new m.default(i))}return t},this.completeGameMarketResults=function(t,e){return i(n,void 0,void 0,(function(){var n,r,i,u,c,l,d,h,p=this;return s(this,(function(s){switch(s.label){case 0:switch(e){case"MATCH_QUIZ":return[3,1];case"TOP_X":return[3,5]}return[3,9];case 1:return n={},r=t.results[0].matchId,i=t.results.map((function(t){return o.playerMarkets.includes(t.market)&&!t.result.includes("OWN_GOAL")?a([],t.result,!0):[]})).flat(),[4,this.matchFacade.getMatchesMapWithNativeIds([r])];case 2:return u=s.sent(),i.length?[4,this.playerFacade.getPlayersMapWithNativeIds(i)]:[3,4];case 3:n=s.sent(),s.label=4;case 4:return t.results=t.results.map((function(t){if(t.matchModel=u[t.matchId]?u[t.matchId]:null,t.playerModels&&Object.keys(n).length&&(e=t.result).forEach((function(e){var r=n[e];t.playerModels.push(r)})),p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(p.remapMatchIdForResultsMarkets(u,t),t.playerModels&&Object.keys(n).length)){var e=t.result;t.result=e.map((function(t){return n[t].id}))}return t})),[2,t];case 5:return c=t.results.map((function(t){return t.matchId})),[4,this.matchFacade.getMatchesMapWithNativeIds(c)];case 6:return l=s.sent(),t.results=t.results.map((function(t){return t.matchModel=l[t.matchId]?l[t.matchId]:null,p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&p.remapMatchIdForResultsMarkets(l,t),t})),t.tieBreakers.goldenGoals.length?(d=t.tieBreakers.goldenGoals.map((function(t){return t.playerId})),[4,this.playerFacade.getPlayersMapWithNativeIds(d)]):[3,8];case 7:h=s.sent(),t.tieBreakers.goldenGoals=t.tieBreakers.goldenGoals.map((function(t){return t.matchModel=l[t.matchId],t.playerModel=h[t.playerId],p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(t.matchId=l[t.matchId].id,t.playerId=h[t.playerId].id),t})),s.label=8;case 8:return[2,t];case 9:return[2]}}))}))},this.completeContestWinners=function(t){return i(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)];case 1:return n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),[2,t]}}))}))},this.handleMatchModel=function(t,e){t[e.matchId]?(e.matchModel=t[e.matchId],delete e.matchModel.availableMarkets,e.matchId=e.matchModel.id):(e.matchModel=null,n.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[S.ID_TYPES[n.idMapping.idSchema]]})))},this.remapMatchIdForResultsMarkets=function(t,e){t[e.matchId]?e.matchId=t[e.matchId].id:n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[S.ID_TYPES[n.idMapping.idSchema]]}))},this.deleteUnexpectedProperties=function(t){return t.status&&(console.warn(O.WarningMessages.UNEXPECTED_STATUS_PROP),delete t.status),t.type&&(console.warn(O.WarningMessages.UNEXPECTED_TYPE_PROP),delete t.type),t},this.footballHttps=new p.default(t),this.idMapping=e,this.matchFacade=new f.default(t,this.footballHttps,e),this.playerFacade=new _.default(t,this.footballHttps,e),this.profileNamespace=new R.default(t)}},2310:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(5318),o=n(7974),u=n(1976),c=n(1206),l=n(5274),d=n(1465),h=n(7535),p=n(1718),f=n(7307),m=n(5132),v=n(7344),y=n(1855),g=n(1732),w=n(5814),b=n(3950),_=n(1260),E=n(7640),I=n(2535);e.default=function(t){var e=this;this.errorHandlingMode=null,this.validateBodyFields=function(t,n){var r=Object.keys(n),i=Object.keys(new b.default);switch(t){case"MATCH_QUIZ":r.forEach((function(t){i.includes(t)||e.throwInvalidParamException([t])}));break;case"TOP_X":var s=n;s.fixtures.forEach((function(t){return e.validateMarketTopX(t.market)})),r.includes("tiebreaker")&&s.tiebreaker&&e.validateTiebreaker(s.tiebreaker),r.forEach((function(t){"tiebreaker"===t||i.includes(t)||e.throwInvalidParamException([t])}))}var a=i.filter((function(t){return!r.includes(t)}));return a.length&&e.throwMissingFieldsException("game prediction body",a),n.fixtures.forEach((function(t){e.validateFixtureFields(t)})),n},this.validateFixture=function(t,n,r,i){e.validateMarket(n);var s=Object.values(u.OneXTwoEnum),a=Object.values(u.HalfTimeFullTimeEnum),b=Object.values(u.DoubleChanceEnum);if(n===o.MarketEnum.FT_1X2||n===o.MarketEnum.HT_1X2){if(s.includes(r))return new p.default(t,n,r)}else if(n===o.MarketEnum.HT_FT){if(a.includes(r))return new f.default(t,r)}else if(n===o.MarketEnum.DOUBLE_CHANCE){if(b.includes(r))return new h.default(t,r)}else if(n===o.MarketEnum.CORRECT_SCORE||n===o.MarketEnum.CORRECT_SCORE_ADVANCED||n===o.MarketEnum.CORRECT_SCORE_HT){if("string"==typeof r&&/\d+:\d+/.test(r))return new d.default(t,n,r)}else if(n===o.MarketEnum.CORNERS_MATCH){if("number"==typeof r)return new l.default(t,r)}else if(n===o.MarketEnum.BOTH_TEAMS_SCORE){if(e.isPredictionBoolean(r))return new c.default(t,r)}else if(n===o.MarketEnum.RED_CARD_MATCH){if(e.isPredictionBoolean(r))return new w.default(t,r)}else if(n===o.MarketEnum.PENALTY_MATCH){if(e.isPredictionBoolean(r))return new y.default(t,r)}else if(o.playerMarkets.includes(n)){var _="OWN_GOAL";if(e.validatePlayerId(n,i),n===o.playerMarketNobodyPrediction&&e.isPredictionBoolean(r)){var E=i&&i===_?_:i;return new g.default(t,n,r,E)}if(i&&e.isPredictionBoolean(r))return new g.default(t,n,r,i)}else if(o.MarketsOverGoals.includes(n)){if(e.isPredictionBoolean(r))return new v.default(t,n,r)}else if(o.MarketsOverCorners.includes(n)&&e.isPredictionBoolean(r))return new m.default(t,n,r);e.throwInvalidPredictionException(r,n)},this.validateFixtureFields=function(t){var n=Object.keys(t);n.forEach((function(t){_.validFixtureFields.includes(t)||e.throwInvalidParamException([t])}));var r=_.validFixtureFields.filter((function(t){if("matchType"!==t&&!n.includes(t))return t}));r.length&&e.throwMissingFieldsException("fixtures",r),e.validatePredictionKey(t.market,t.prediction)},this.validateTiebreaker=function(t){var n=Object.keys(t);n.length&&"object"==typeof t||e.throwInvalidType("tiebreaker","object");var r=Object.keys(new E.default)[0];n.forEach((function(t){r!==t&&e.throwInvalidParamException([t])})),n.includes(r)||e.throwMissingFieldsException("tiebreaker",[r]),"number"!=typeof t.goldenGoal&&e.throwInvalidType("goldenGoal","number")},this.validatePredictionKey=function(t,n){if("object"==typeof n){var r=Object.keys(n),i=["value"];if(r.length||e.throwMissingFieldsException("prediction",i),1!==r.length||r.includes(i[0])||e.throwInvalidParamException(r),r.length>1){o.playerMarkets.includes(t)&&i.push("playerId");var s=r.filter((function(t){return!i.includes(t)}));s.length&&e.throwInvalidParamException(s)}}else e.throwInvalidType("prediction","object")},this.validatePlayerId=function(t,n){var r="playerId";t!==o.playerMarketNobodyPrediction&&(n||e.throwInvalidParamException([r]),"string"!=typeof n&&e.throwInvalidType(r,"string"))},this.validateMarket=function(t){Object.values(o.MarketEnum).includes(t)||e.throwInvalidMarketException(t)},this.validateMarketTopX=function(t){t!==o.MarketEnum.CORRECT_SCORE&&t!==o.MarketEnum.CORRECT_SCORE_ADVANCED&&e.throwInvalidMarketException(t,"TOP_X")},this.isPredictionBoolean=function(t){return"boolean"==typeof t},this.throwInvalidPredictionException=function(t,n){var o=(0,a.invalidPredictionMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_PREDICTION,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidMarketException=function(t,n){var o;if(o=n&&"TOP_X"===n?(0,a.invalidMarketTopXMessage)(t):(0,a.invalidMarketMessage)(t),"default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidParamException=function(t){var n=(0,a.invalidFieldMessage)(t);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,n);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,n).response},this.throwMissingFieldsException=function(t,n){var o=(0,a.missingFieldsMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidType=function(t,n){var o=(0,a.invalidTypeMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.errorHandlingMode=t}},4831:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var a=n(9072),o=n(7232),u=n(4268);e.default=function(t,e,n,c,l,d){var h=this;this.idsRemapper=null,this.profileHttps=null,this.profileService=null,this.localStorage=null,this.profileFacade=null,this.ownProfile=null,this.modified=!1,this.expireAt=0,this.promises=[],this.isFetching=!1,this.getOwnProfile=function(){return r(h,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return this.isFetching?(console.log("Another thread is fetching profile..."),[4,this.delay(100)]):[3,2];case 1:return r.sent(),[3,0];case 2:if(this.modified&&this.ownProfile)return console.log("Timestamp is less than 10 minutes OR profile is modifying "),[2,this.ownProfile];if(t=Math.floor(Date.now()/1e3),this.ownProfile&&!(this.expireAt<t))return[3,7];this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600,r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.profileFacade.getOwn()];case 4:return e=r.sent(),this.setOwnProfile(e),[3,6];case 5:throw n=r.sent(),this.isFetching=!1,n;case 6:return this.modified=!1,this.isFetching=!1,[2,this.ownProfile];case 7:return[2,this.ownProfile]}}))}))},this.delay=function(t){return new Promise((function(e){setTimeout(e,t)}))},this.setOwnProfile=function(t){h.ownProfile=t},this.getInfo=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),delete(e=JSON.parse(JSON.stringify(t))).interests,[2,e]}}))}))},this.showInterests=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t)];case 1:return[2,e.sent()]}}))}))},this.follow=function(t){return r(h,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.follow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.unfollow=function(t){return r(h,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.unfollow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.getStats=function(){return r(h,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getStats()];case 1:return t=e.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(t)];case 2:return[2,e.sent()]}}))}))},this.getBadges=function(){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getBadges()];case 1:return[2,t.sent()]}}))}))},this.addInterestPromise=function(t){return r(h,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return r.sent(),e=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(t)];case 2:return e=r.sent(),[3,4];case 3:e=t,r.label=4;case 4:return n=this.ownProfile.interests.filter((function(t){return t.id!==e.id||t.type!==e.type||t.source!==e.source})),this.ownProfile.interests=s([],n,!0),this.ownProfile.interests.push(e),[2,this]}}))}))},this.addInterest=function(t){return h.promises.push(h.addInterestPromise(t)),h},this.removeInterestPromise=function(t){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return n.sent(),e=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(t)];case 2:return e=n.sent(),[3,4];case 3:e=t,n.label=4;case 4:return this.ownProfile.interests=this.ownProfile.interests.filter((function(t){return t.id!==e.id||t.type!==e.type||t.source!==e.source})),[2,this]}}))}))},this.removeInterest=function(t){return h.promises.push(h.removeInterestPromise(t)),h},this.setBirthdatePromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.birthDate=t||null,[2,this]}}))}))},this.setBirthdate=function(t){return h.promises.push(h.setBirthdatePromise(t)),h},this.setGenderPromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.gender="male"===t||"female"===t?t:"unspecified",[2,this]}}))}))},this.setGender=function(t){return h.promises.push(h.setGenderPromise(t)),h},this.setNicknamePromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.nickname=t,[2,this]}}))}))},this.setNickname=function(t){return h.promises.push(h.setNicknamePromise(t)),h},this.setNamePromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.name=t,[2,this]}}))}))},this.setName=function(t){return h.promises.push(h.setNamePromise(t)),h},this.setCountryPromise=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),t&&!this.ownProfile.country?(this.ownProfile.country=new a.default,this.ownProfile.country.id=t):t&&this.ownProfile.country?this.ownProfile.country.id=t:this.ownProfile.country=null,[2,this]}}))}))},this.setCountry=function(t){return h.promises.push(h.setCountryPromise(t)),h},this.showFullnessProfile=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[2,this.profileFacade.showFullnessProfile(e)]}}))}))},this.update=function(){return r(h,void 0,void 0,(function(){var t,e,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return 0===this.promises.length?[2,this.ownProfile]:[4,Promise.all(this.promises)];case 1:return i.sent(),[4,this.profileFacade.getOwn()];case 2:return t=i.sent(),[4,this.getOwnProfile()];case 3:return e=i.sent(),n=this.profileService.extractUpdatedProps(t,e),this.modified=!1,this.expireAt=0,Object.keys(n).length?[4,this.profileHttps.updateProfile(n)]:[3,5];case 4:return r=i.sent(),s=JSON.parse(JSON.stringify(r)),this.setOwnProfile(s),this.localStorage.setOwnProfile(s),delete r.interests,[2,r];case 5:return delete(a=JSON.parse(JSON.stringify(this.ownProfile))).interests,[2,a]}}))}))},this.idsRemapper=t,this.localStorage=e,this.profileHttps=n,this.profileService=new u.default,this.profileFacade=new o.default(e,n,c)}},642:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7232);e.default=function(t,e,n,a){var o=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.profileFacade=null,this.profileId="",this.setId=function(t){return o.profileId=t,o},this.getProfile=function(){return r(o,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getById(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.getInfo=function(){return r(o,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return delete(t=e.sent()).interests,[2,t]}}))}))},this.showInterests=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.showFullnessProfile=function(){return r(o,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return t=e.sent(),[2,this.profileFacade.showFullnessProfile(t)]}}))}))},this.getStats=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.activityHttps.getStats(this.profileId,t)];case 1:return e=n.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(e)];case 2:return[2,n.sent()]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileHttps.getBadges(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.idsRemapper=t,this.profileHttps=n,this.activityHttps=a,this.profileFacade=new s.default(e,n,a)}},7232:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(9037),a=n(9523);e.default=function(t,e,n){var o=this;this.isBrowser=!1,this.localStorage={},this.profileHttps=null,this.activityHttps=null,this.getOwn=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("profile"))?[2,JSON.parse(JSON.stringify(t))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getProfile()];case 2:return n=i.sent(),this.localStorage.setOwnProfile(n),[2,n];case 3:throw e=i.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getProfile()];case 6:return[2,n=i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving your profile: ",r),r;case 8:return[2]}}))}))},this.updateOwnProfile=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile()];case 1:return t=n.sent(),this.localStorage.setOwnProfile(t),[2,t];case 2:throw e=n.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 3:return[2]}}))}))},this.getByIds=function(t,e){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.profileHttps.getProfiles(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the selected profiles: "+t.join(",")+" ",n),n;case 3:return[2]}}))}))},this.getById=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the selected profile: "+t+" ",e),e;case 3:return[2]}}))}))},this.getCountries=function(t){return r(o,void 0,void 0,(function(){var e,n,r,s;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,this.isBrowser?(e=this.localStorage.getProfileCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getCountries(t)];case 2:return n=i.sent(),this.localStorage.setProfileCountries(n),[2,n];case 3:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getCountries(t)];case 6:return[2,i.sent()];case 7:throw s=i.sent(),console.warn("There was a problem retrieving profile countries: ",s),s;case 8:return[2]}}))}))},this.getFollowers=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new a.default(t)),[4,this.profileHttps.getFollowers(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followerId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return s=i.sent(),o=n.data.map((function(t){return s.forEach((function(e){t.followerId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=o,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your followers: ",u),u;case 5:return[2]}}))}))},this.getFollowing=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new a.default(t)),[4,this.profileHttps.getFollowing(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followingId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return s=i.sent(),o=n.data.map((function(t){return s.forEach((function(e){t.followingId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=o,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your following profiles: ",u),u;case 5:return[2]}}))}))},this.follow=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.follow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem following profiles: "+t.join(",")+" ",e),e;case 3:return[2]}}))}))},this.unfollow=function(t){return r(o,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.unfollow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem unfollowing profiles: "+t.join(",")+" ",e),e;case 3:return[2]}}))}))},this.showFullnessProfile=function(t){var e=new s.default,n=0;return t.avatar&&(e.breakdown.addedAvatar.completed=!0,n+=e.breakdown.addedAvatar.percentage),t.birthDate&&(e.breakdown.addedBirthdate.completed=!0,n+=e.breakdown.addedBirthdate.percentage),t.country&&(e.breakdown.addedCountry.completed=!0,n+=e.breakdown.addedCountry.percentage),t.gender&&(e.breakdown.addedGender.completed=!0,n+=e.breakdown.addedGender.percentage),t.interests&&t.interests.length>0&&(t.interests.find((function(t){return"team"===t.type&&t.favourite}))&&(e.breakdown.teamFavourite.completed=!0,n+=e.breakdown.teamFavourite.percentage),t.interests.find((function(t){return"team"===t.type}))&&(e.breakdown.teamFollowed.completed=!0,n+=e.breakdown.teamFollowed.percentage),t.interests.find((function(t){return"player"===t.type&&t.favourite}))&&(e.breakdown.playerFavourite.completed=!0,n+=e.breakdown.playerFavourite.percentage),t.interests.find((function(t){return"player"===t.type}))&&(e.breakdown.playerFollowed.completed=!0,n+=e.breakdown.playerFollowed.percentage),t.interests.find((function(t){return"competition"===t.type&&t.favourite}))&&(e.breakdown.competitionFavourite.completed=!0,n+=e.breakdown.competitionFavourite.percentage),t.interests.find((function(t){return"competition"===t.type}))&&(e.breakdown.competitionFollowed.completed=!0,n+=e.breakdown.competitionFollowed.percentage)),e.totalPercentage=n,e},this.getStats=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("statistics"))&&Object.keys(t).length?[2,JSON.parse(JSON.stringify(t))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.activityHttps.getStats()];case 2:return e=i.sent(),this.localStorage.setProfileStats(e),[2,e];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.activityHttps.getStats()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",r),r;case 8:return[2]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("badges"))?[2,t]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getBadges()];case 2:return e=i.sent(),this.localStorage.setProfileBadges(e),[2,e];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile badges: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getBadges()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile badges: ",r),r;case 8:return[2]}}))}))},this.getLocalStorageData=function(t){var e=Math.floor(Date.now()/1e3),n=o.localStorage.getExpiration("profile",t);switch(t){case"profile":if(n>e)return o.localStorage.getOwnProfile();case"statistics":if(n>e)return o.localStorage.getProfileStats();case"badges":if(n>e)return o.localStorage.getProfileBadges();default:return null}},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.profileHttps=e,this.activityHttps=n}},9523:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=0,this.startAfter=null,this.constructFilterUrl=function(){var t="";return e.limit&&(t=(t+="&")+"limit="+e.limit),e.startAfter&&(t=(t+="&")+"start_after="+e.startAfter),t},this.limit=t.limit?t.limit:20,this.startAfter=t.startAfter?t.startAfter:null}},4782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followerId=null,this.name=null,this.nickname=null,this.profileId=null}},1712:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profile_ids=[]}},3106:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followingId=null,this.name=null,this.nickname=null,this.profileId=null}},6620:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7312);e.default=function(){this.teamFollowed=new r.default(10),this.teamFavourite=new r.default(15),this.playerFollowed=new r.default(10),this.playerFavourite=new r.default(10),this.competitionFollowed=new r.default(10),this.competitionFavourite=new r.default(5),this.addedBirthdate=new r.default(10),this.addedGender=new r.default(10),this.addedCountry=new r.default(10),this.addedAvatar=new r.default(10)}},7312:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.completed=!1,this.percentage=t}},9037:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6620);e.default=function(){this.breakdown=new r.default}},9072:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.assets=null}},3546:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.nickname=null,this.avatar=null,this.gender=null,this.country=null,this.birthDate=null,this.interests=[],this.followingCount=0,this.followersCount=0}},6277:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1553),i=n(4782);e.default=function(){var t=this;this.followersFromResponse=function(e){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.remapResponse=function(t){var e=new i.default;return e.avatar=t.avatar,e.followerId=t.follower_id,e.name=t.name,e.profileId=t.profile_id,e}}},8673:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1553),i=n(3106);e.default=function(){var t=this;this.followResponse=function(e){return e.map((function(e){return t.remapResponse(e)}))},this.followingFromResponse=function(e){var n=new r.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.remapResponse=function(t){var e=new i.default;return e.avatar=t.avatar,e.followingId=t.following_id,e.name=t.name,e.profileId=t.profile_id,e.nickname=t.nickname,e}}},441:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3546);e.default=function(){var t=this;this.profilesFromResponse=function(e){return e?e.map((function(e){return t.fullProfileFromResponse(e)})):null},this.fullProfileFromResponse=function(t){var e=new r.default;return e.id=t.id,e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar,e.gender=t.gender,e.country=t.country,e.birthDate=t.birth_date,e.interests=t.interests?t.interests:[],e.followingCount=t.following_count,e.followersCount=t.followers_count,e}}},1316:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5123);e.default=function(){this.successRates=new r.default}},9826:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.model=null}},5123:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},6409:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4275),a=n(8900),o=n(7232),u=n(5601),c=n(4831),l=n(642),d=n(4289),h=n(595),p=n(1022),f=n(4912);e.default=function(t){var e=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.footballHttps=null,this.footballFacade=null,this.idMapping=null,this.localStorage=null,this.profileFacade=null,this.ownProfileBuilder=null,this.profileBuilder=null,this.getOwn=function(){return e.ownProfileBuilder},this.getById=function(t){return e.profileBuilder.setId(t)},this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getByIds=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getByIds(t,n)];case 1:return[2,e.sent()]}}))}))},this.profileHttps=new s.default(t),this.activityHttps=new p.default(t),this.footballHttps=new h.default(t),this.idMapping=new a.default(t),this.localStorage=new u.default(t),this.footballFacade=new d.default(t,this.localStorage,this.footballHttps,this.idMapping),this.profileFacade=new o.default(this.localStorage,this.profileHttps,this.activityHttps),this.idsRemapper=new f.default(t,this.footballFacade),this.ownProfileBuilder=new c.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps,this.idMapping,this.footballFacade),this.profileBuilder=new l.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps)}},4268:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.extractUpdatedProps=function(e,n){var r=["name","nickname","gender"],i={};return Object.keys(e).forEach((function(s){if(r.includes(s)&&e[s]!==n[s])i[s]=n[s];else if("birthDate"===s)(null===n[s]||null===e[s]&&n[s]||e[s]!==n[s])&&(i.birth_date=n[s]);else if("country"===s)null===n[s]?i.country_id=n[s]:(null===e[s]&&n[s]||e[s].id!==n[s].id)&&(i.country_id=n[s].id);else if("interests"===s){var a=e[s],o=n[s];o.length&&t.isNewInterest(a,o)?i[s]=t.updateInterests(a,o):!o.length&&a.length?i[s]=o:a.length===o.length||t.isNewInterest(a,o)||(i[s]=o)}})),i},this.updateInterests=function(e,r){if(e.length===r.length){var i=t.extractSameAndNewInterests(e,r),s=i[0],a=i[1];return n(n([],a,!0),s,!0)}return r},this.isNewInterest=function(e,n){var r=!1;return t.extractSameAndNewInterests(e,n)[0].length?r=!0:r},this.extractSameAndNewInterests=function(t,e){var n=e.filter((function(e){return t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))}));return[e.filter((function(e){return!t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))})),n]}}},853:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.GameStatusEnum=void 0,(n=e.GameStatusEnum||(e.GameStatusEnum={})).OPEN="OPEN",n.LIVE="LIVE",n.PENDING="PENDING",n.CANCELED="CANCELED",n.CLOSED="CLOSED",n.SETTLED="SETTLED"},9502:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(2793),o=n(5013),u=n(853),c=n(7299),l=n(1553),d=n(1399),h=n(7782),p=n(7686),f=n(2310),m=n(8097),v=n(4904),y=n(5318),g=n(4021),w=n(2535);e.default=function(t,e){var n=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.predictorValidator=null,this.clientHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(n,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(p.FeatureConfigType.TOP_X)];case 1:return t=e.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.getGames=function(t,e){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return e=e||!1,n=this.predictorService.initGameFilters("TOP_X",t),[4,this.predictorHttps.getGames(n,e)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return e=e||!1,[4,this.predictorHttps.getGameById(t,e)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,e,s){return r(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return s=s||!1,e&&(e.type&&delete e.type,e.status&&delete e.status,e=new h.default(e)),[4,this.predictorHttps.getGamePredictions(t,s,e)];case 1:return[2,n.sent()]}}))}))},this.getGameResults=function(t,e,s){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return s=s||!1,e&&(e=new c.default(e)),[4,this.predictorHttps.getGameResults(t,s,e)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(n,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,e={status:u.GameStatusEnum.OPEN,type:"TOP_X"},e=new c.default(e),[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.play=function(t){return r(n,void 0,void 0,(function(){var e,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return e=new d.default(t),(e=this.predictorValidator.validateBodyFields("TOP_X",e)).fixtures=e.fixtures.map((function(t){return o.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value)})),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:(n=[],e.fixtures.forEach((function(t){return n.push(t.matchId)})),[4,this.predictorService.remapMatchIdToNative(n)]);case 1:r=i.sent(),e.fixtures.forEach((function(t){return t.matchId=r.shift()})),i.label=2;case 2:return[4,this.predictorHttps.makeFootballPrediction(e)];case 3:return(a=i.sent()).fixtures.forEach((function(t){t.matchId=t.matchModel.id})),[2,a]}}))}))},this.delete=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,e){return r(n,void 0,void 0,(function(){var n,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),e=e||!1,n=this.predictorService.initGameTypePredictions("TOP_X",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(n)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),a=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(a,e)]):[3,4];case 2:return o=i.sent(),[4,this.predictorService.addPredictionProp(s,o)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getMyGamePrediction=function(t){return r(n,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,e,s){return r(n,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return e&&e.limit&&this.validateLimitFilterOnGames(e.limit),s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X",e),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,n)];case 1:return(a=i.sent()).data.length>0?(a.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),o=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(o,s)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(a,u)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getUserGamePrediction=function(t,e,s){return r(n,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getUserPredictions(t,s,n)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(t){return t.gameInstanceId===e}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,e)];case 1:return n=r.sent(),[4,this.predictorService.completeGameMarketResults(n,"TOP_X")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getGameById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===n.errorHandlingMode&&t>50)throw new m.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===n.errorHandlingMode&&t>50)throw new w.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.idMapping=e,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new f.default(t.errorHandlingMode),this.predictorHttps=new a.default(t,e),this.predictorService=new o.default(t,e),this.clientHttps=new p.default(t)}},1180:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.minFixtures=null,this.maxFixtures=null,this.competitionsWhitelist=null}},7482:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default}},5967:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899),i=n(3381);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},6247:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.adContent=null,e.labels=null,e.customFields=null,e}return i(e,t),e}(n(3751).default);e.default=s},6890:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId=null,this.points=null,this.results=[],this.tiebreaker=null}},6160:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchModel=null,this.outcome=null}},7299:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=n(4800),a=n(853),o=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.type=null,n.gameIds=null,n.sortOrder=null,n.constructFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(n);return n.status&&Object.values(a.GameStatusEnum).includes(n.status)&&(e+="&",e+="status="+n.status),n.type&&(e+="&",e+="type="+n.type),n.gameIds&&n.gameIds.length>0&&(e+="&",e+="game_ids="+n.gameIds.join(",")),n.sortOrder&&(e+="&",e+="sort_order="+n.sortOrder),e},n.status=e.status?e.status:null,n.type=e.type?e.type:null,n.gameIds=e.gameIds?e.gameIds:null,n.sortOrder=e.sortOrder?e.sortOrder:null,n}return i(e,t),e}(s.default);e.default=o},3751:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(439),i=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.scheduleOpenAt=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.images=new r.default,this.createdAt=null,this.updatedAt=null}},4780:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7482),i=n(8410),s=n(5967),a=n(6890),o=n(6160),u=n(3751),c=n(7243),l=n(8950),d=n(7640),h=n(1553),p=n(670),f=n(7974),m=n(4916),v=n(3483),y=n(1784),g=n(824),w=n(6899),b=n(6247);e.default=function(){var t=this;this.remapPaginatedGames=function(e){var n=new h.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapGamesListResponse(e)})),n},this.remapGamesListResponse=function(e){var n=new u.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.scheduleOpenAt=e.schedule_open_at,n.predictionsCutoff=e.predictions_cutoff,n.fixtures=e.fixtures.map((function(e){return t.remapFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapGameByIdResponse=function(e){var n=new b.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.scheduleOpenAt=e.schedule_open_at,n.predictionsCutoff=e.predictions_cutoff,n.fixtures=e.fixtures.map((function(e){return t.remapFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.adContent=e.ad_content,n.labels=e.labels,n.customFields=e.custom_fields,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapFixturesResponse=function(t){var e=new r.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedUserTopXEditions=function(e){var n=new h.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapUserTopXEditionsResponse(e)})),n},this.remapUserTopXEditionsResponse=function(e){var n=new l.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.predictionsCutoff=e.predictions_cutoff,n.scheduleOpenAt=e.schedule_open_at,n.fixtures=e.fixtures.map((function(e){return t.remapTopXFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapTopXFixturesResponse=function(t){var e=new s.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedUserMathQuizEditions=function(e){var n=new h.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapUserMatchQuizEditionsResponse(e)})),n},this.remapUserMatchQuizEditionsResponse=function(e){var n=new c.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.predictionsCutoff=e.predictions_cutoff,n.scheduleOpenAt=e.schedule_open_at,n.fixtures=e.fixtures.map((function(e){return t.remapMatchQuizFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapMatchQuizFixturesResponse=function(t){var e=new i.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedGameResults=function(e){var n=new h.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapGameResults(e)})),n},this.remapGameResults=function(e){var n=new a.default;return n.userId=e.user_id,n.points=e.points?e.points:0,n.results=e.results.map((function(e){return t.remapResults(e)})),n.tiebreaker=e.tiebreaker?t.remapTiebreaker(e.tiebreaker):null,n},this.remapGameMarketsResults=function(e){var n=new p.default;return n.gameId=e.game_id,n.results=t.remapMarketsResults(e.results),n.tieBreakers=e.tie_breakers?t.remapTieBreakers(e.tie_breakers):null,n},this.remapContestWinners=function(e){var n=new y.default;return n.contestId=e.contest_id,n.contestType=e.contest_type,n.description=e.description,n.userList=e.user_list.map((function(e){return t.remapUserListWinners(e)})),n},this.remapUserListWinners=function(t){var e=new g.default;return e.position=t.position,e.profileId=t.profile_id,e.note=t.note,e.tags=t.tags,e},this.remapTieBreakers=function(t){var e={goldenGoals:[]};return e.goldenGoals=t.golden_goals.map((function(t){return{minute:t.minute,matchId:t.match_id,matchModel:null,playerId:t.player_id,playerModel:null,goalType:t.goal_type}})),e},this.remapMarketsResults=function(e){var n=[];return e.forEach((function(e){var r={matchId:e.match_id,market:e.market,result:t.remapMarketResult(e.market,e.result),matchModel:null,playerModels:[],matchStatus:t.remapMarketsResultsMatchStatus(e.match_status)};n.push(t.deleteUnusefulField(r))})),n},this.remapMarketsResultsMatchStatus=function(t){var e=new w.default;return e.type=t.type,e.subType=t.sub_type,e},this.remapMarketResult=function(t,e){return f.endMarkMarkets.includes(t)?e[0]:f.playerMarkets.includes(t)?e:"true"===e[0]||"false"!==e[0]&&void 0},this.deleteUnusefulField=function(e){return f.playerMarkets.includes(e.market)&&!t.isPlayerMarketWithNoResult(e.market,e.result)||delete e.playerModels,e},this.isPlayerMarketWithNoResult=function(t,e){return f.playerMarkets.includes(t)&&0===e.length},this.remapResults=function(t){var e=new o.default;return e.matchId=t.match_id,e.outcome=t.outcome,e},this.remapTiebreaker=function(t){var e=new d.default;return e.goldenGoal=t.golden_goal,e},this.remapTimeTiebreaker=function(t){var e=new m.default;return e.timeTiebreaker=t,e},this.remapRelated=function(t){return t.map((function(t){var e=new v.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))}}},8950:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.scheduleOpenAt=null,this.images=null}},7640:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.goldenGoal=null}},4916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.timeTiebreaker=!1}},1784:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.contestId="",this.contestType="GAME",this.contestModel=null,this.description="",this.userList=[]}},824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position="",this.profileId="",this.profileModel=null,this.note="",this.tags=[]}},3381:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.result=null}},1399:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1465);e.default=function(t){var e=this;this.gameInstanceId=null,this.fixtures=[],this.tiebreaker=null,this.gameInstanceId=t.gameInstanceId,t.fixtures.forEach((function(t){return e.fixtures.push(new r.default(t.matchId,t.market,t.prediction.value))})),this.tiebreaker=t.tiebreaker?t.tiebreaker:null}},9596:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),a=n(9502);e.default=function(t){var e=this;this.topXFacade=null,this.idMapping=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGamePredictions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameResults(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGameEditions(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGamePrediction(t,n,s)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameWinners(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new s.default(t),this.topXFacade=new a.default(t,this.idMapping)}},4806:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),o=n(712);e.default=function(t,e,n){var u=this;this.idMapping=null,this.idSchema=null,this.native=a.IdSchemaEnum.NATIVE,this.footballFacade=null,this.remapSuccessRatesEntities=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return e=t.successRates,n={competition:this.getIdsKeys(e.byFootballCompetition),team:this.getIdsKeys(e.byFootballTeam)},Object.values(n.competition).length?(r=t.successRates.byFootballCompetition,i=t.successRates,[4,this.setModels(r,n.competition,"competition")]):[3,2];case 1:i.byFootballCompetition=s.sent(),s.label=2;case 2:return Object.values(n.team).length?(a=t.successRates.byFootballTeam,o=t.successRates,[4,this.setModels(a,n.team,"team")]):[3,4];case 3:o.byFootballTeam=s.sent(),s.label=4;case 4:return[2,t]}}))}))},this.setModels=function(t,e,n){return i(u,void 0,void 0,(function(){var i,a;return s(this,(function(s){switch(s.label){case 0:switch(i=null,e=(0,o.sortArrayInAscOrder)(e),n){case"competition":return[3,1];case"team":return[3,3]}return[3,5];case 1:return[4,this.footballFacade.getCompetitionsMapWithNativeIds(e)];case 2:case 4:return i=s.sent(),[3,5];case 3:return[4,this.footballFacade.getTeamsMapWithNativeIds(e)];case 5:return Object.keys(t).forEach((function(e){var n,s=i.get(e);(a=r(r({},a),((n={})[s.id]=t[e],n)))[s.id].model=s})),[2,a]}}))}))},this.getIdsKeys=function(t){var e=JSON.parse(JSON.stringify(t));return Object.keys(e)},this.remapInterestsToIdSchema=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,o,u,c,l,d;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,3]:t&&t.length>0?(e={},n={},t.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],n[t.type]=[]),e[t.type].push(t.id),n[t.type].push(t)})),[4,this.remapIdsObj(e,this.native,this.idSchema)]):[3,2];case 1:for(r=s.sent(),i=[],a=function(t,e){e.forEach((function(e,n){e.id=r[t][n],i.push(e)}))},o=0,u=Object.entries(n);o<u.length;o++)c=u[o],l=c[0],d=c[1],a(l,d);return[2,i];case 2:case 3:return[2,t]}}))}))},this.remapInterestToNative=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,2]:(e={},n=t.id,r=t.type,e[r]=[n],[4,this.remapIdsObj(e,this.idSchema,this.native)]);case 1:return i=s.sent(),t.id=i[r][0],[2,t];case 2:return[2,t]}}))}))},this.inquiryCustomInterests=function(t){var e=[];return t&&t.length>0&&(e=t.filter((function(t){return"CUSTOM"===t.source.toLocaleUpperCase()}))),e},this.remapInterests=function(t){return i(u,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return(e=this.inquiryCustomInterests(t))&&e.length>0?(n=t.filter((function(t){return"CUSTOM"!==t.source.toLocaleUpperCase()})),[4,this.remapInterestsToIdSchema(n)]):[3,2];case 1:return r=i.sent(),e.forEach((function(t){return r.push(t)})),[2,r];case 2:return[4,this.remapInterestsToIdSchema(t)];case 3:return[2,i.sent()]}}))}))},this.showFullInterests=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,o,u,c;return s(this,(function(s){switch(s.label){case 0:return e=[],t&&t.length>0?(n=this.inquiryCustomInterests(t),e.push(n),r=t.filter((function(t){return"CUSTOM"!==t.source.toLocaleUpperCase()})),[4,this.getInterestsEntitiesMap(r)]):[3,2];case 1:return i=s.sent(),a=i.competitionsMap,o=i.teamsMap,u=i.playersMap,c=r.map((function(t){var e=null;return"competition"===t.type?((e=a.get(t.id))&&(t.id=e.id),t.model=e,t):"team"===t.type?((e=o.get(t.id))&&(t.id=e.id),t.model=e,t):"player"===t.type?(u?(t.model=u[t.id],t.id=u[t.id].id):t.model=e,t):void 0})),e.push(c),[2,e.flat()];case 2:return[2,e]}}))}))},this.getInterestsEntitiesMap=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,u,c;return s(this,(function(s){switch(s.label){case 0:return e=[],n=[],r=[],i=new Map,a=new Map,u=null,t.forEach((function(t){"competition"===t.type?e.push(t.id):"team"===t.type?n.push(t.id):"player"===t.type&&r.push(t.id)})),e.length?(c=(0,o.sortArrayInAscOrder)(e),[4,this.footballFacade.getCompetitionsMapWithNativeIds(c)]):[3,2];case 1:i=s.sent(),s.label=2;case 2:return n.length?(c=(0,o.sortArrayInAscOrder)(n),[4,this.footballFacade.getTeamsMapWithNativeIds(c)]):[3,4];case 3:a=s.sent(),s.label=4;case 4:return r.length?(c=(0,o.sortArrayInAscOrder)(r),[4,this.footballFacade.getPlayersMapWithNativeIds(c)]):[3,6];case 5:u=s.sent(),s.label=6;case 6:return[2,{competitionsMap:i,teamsMap:a,playersMap:u}]}}))}))},this.remapIdsObj=function(t,e,n){return i(u,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,e,n)];case 1:return[2,r.sent()]}}))}))},this.idMapping=n,this.idSchema=t.idSchema,this.footballFacade=e}},4912:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),a=n(4806);e.default=function(t,e){var n=this;this.idMapping=null,this.profileOperations=null,this.remapSuccessRatesEntities=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapSuccessRatesEntities(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterestToNative=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterestToNative(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterests(t)];case 1:return[2,e.sent()]}}))}))},this.showFullInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.showFullInterests(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new s.default(t),this.profileOperations=new a.default(t,e,this.idMapping)}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.FansUnitedSDK=void 0;var e=n(6409),i=n(6595),s=n(8808),a=n(4946),o=n(1259),u=n(2962),c=n(9627),l=n(2671),d=n(9377),h=n(9596),p=n(267),f=n(7302),m=n(2141),v=n(7070),y=n(9580);t.FansUnitedSDK=function(t){var n=(new i.default).validate(t);if(n.idSchema.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.idSchema.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.idSchema.message.text),t.idSchema=a.IdSchemaEnum.NATIVE),n.environment.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.environment.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.environment.message.text),t.environment=l.EnvironmentEnum.PROD),n.lang.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.lang.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.lang.message.text),t.lang=d.LangEnum.EN),n.errorHandlingMode.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.errorHandlingMode.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.errorHandlingMode.message.text),t.errorHandlingMode=y.ErrorHandlingModeEnum.DEFAULT),n.authProvider.validation===c.ValidationResponseEnum.INVALID_VALUE&&console.warn(n.authProvider.message.text),n.isValid)return{profile:new e.default(t),football:new s.default(t),predictor:new o.default(t),loyalty:new u.default(t),topX:new h.default(t),matchQuiz:new p.default(t),activity:new f.default(t)};g(n)};var g=function(t){var e="authProvider",n="isValid";Object.keys(t).forEach((function(r){var i=t[r];if(r!==n&&r!==e){if(i.message.type===m.LogEnum.ERROR)throw new Error(i.message.text)}else r!==n&&r===e&&Object.keys(new v.default).forEach((function(t){if(i[t].message.type===m.LogEnum.ERROR)throw new Error(i[t].message.text)}))}))}})(),r})()}));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|