fansunited-management-components 1.44.0 → 1.45.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.es.js CHANGED
@@ -15411,7 +15411,7 @@ const da = (t) => {
15411
15411
  Ir.initializeApp(n);
15412
15412
  }
15413
15413
  return $f = !0, Ir.auth();
15414
- }, GT = (t) => t === "dev" ? "http://localhost:8070/v1" : t === "staging" ? "https://client.fansunitedstagingapi.com/v1" : t === "watg" ? "https://client.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://client.yolo.fansunitedapi.com/v1" : "https://client.fansunitedapi.com/v1";
15414
+ }, GT = (t) => t === "dev" ? "http://localhost:8070/v1" : t === "staging" ? "https://client.fansunitedstagingapi.com/v1" : t === "watg" ? "https://client.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://client.yolo.fansunitedapi.com/v1" : t === "cska" ? "https://client.cska.fansunitedapi.com/v1" : "https://client.fansunitedapi.com/v1";
15415
15415
  class KT {
15416
15416
  constructor(e, n) {
15417
15417
  ee(this, "apiKey", "");
@@ -15491,7 +15491,7 @@ class KT {
15491
15491
  this.apiKey = e.apiKey, this.clientId = e.clientId, this.environment = e.environment, this.mainQueryParams = { key: e.apiKey, client_id: e.clientId }, this.sportal365Config = n, this.clientApiBaseUrl = GT(this.environment);
15492
15492
  }
15493
15493
  }
15494
- const YT = (t) => t === "dev" ? "http://localhost:8060/v1" : t === "staging" ? "https://loyalty.fansunitedstagingapi.com/v1" : t === "watg" ? "https://loyalty.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://loyalty.yolo.fansunitedapi.com/v1" : "https://loyalty.fansunitedapi.com/v1", qT = (t) => t === "dev" ? "http://localhost:8040/v1" : t === "staging" ? "https://prediction.fansunitedstagingapi.com/v1" : t === "watg" ? "https://prediction.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://prediction.yolo.fansunitedapi.com/v1" : "https://prediction.fansunitedapi.com/v1", JT = (t) => t === "dev" ? "http://localhost:9040/v1" : t === "staging" ? "https://mini-games.fansunitedstagingapi.com/v1" : t === "watg" ? "https://mini-games.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://mini-games.yolo.fansunitedapi.com/v1" : "https://mini-games.fansunitedapi.com/v1", QT = (t) => t === "dev" ? "http://localhost:8020/v1" : t === "staging" ? "https://reporting.fansunitedstagingapi.com/v1" : t === "watg" ? "https://reporting.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://reporting.yolo.fansunitedapi.com/v1" : "https://reporting.fansunitedapi.com/v1", XT = (t) => t === "dev" ? "http://localhost:9030/v1" : t === "staging" ? "https://voting.fansunitedstagingapi.com/v1" : t === "watg" ? "https://voting.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://voting.yolo.fansunitedapi.com/v1" : "https://voting.fansunitedapi.com/v1", ZT = (t) => t === "staging" ? "https://custom-games-resolver-131809830171.europe-west1.run.app/v1" : t === "watg" ? "https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1" : t === "yolo" ? "https://custom-games-resolver-1054597592566.europe-west1.run.app/v1" : "https://custom-games-resolver-150199313674.europe-west1.run.app/v1", eE = (t) => t === "dev" ? "http://localhost:8010/v1" : t === "staging" ? "https://profile.fansunitedstagingapi.com/v1" : t === "watg" ? "https://profile.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://profile.yolo.fansunitedapi.com/v1" : "https://profile.fansunitedapi.com/v1", tE = (t) => t === "dev" ? "http://localhost:8010/v1" : t === "staging" ? "https://discussions.fansunitedstagingapi.com/v1" : t === "watg" ? "https://discussions.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://discussions.yolo.fansunitedapi.com/v1" : "https://discussions.fansunitedapi.com/v1";
15494
+ const YT = (t) => t === "dev" ? "http://localhost:8060/v1" : t === "staging" ? "https://loyalty.fansunitedstagingapi.com/v1" : t === "watg" ? "https://loyalty.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://loyalty.yolo.fansunitedapi.com/v1" : t === "cska" ? "https://loyalty.cska.fansunitedapi.com/v1" : "https://loyalty.fansunitedapi.com/v1", qT = (t) => t === "dev" ? "http://localhost:8040/v1" : t === "staging" ? "https://prediction.fansunitedstagingapi.com/v1" : t === "watg" ? "https://prediction.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://prediction.yolo.fansunitedapi.com/v1" : t === "cska" ? "https://prediction.cska.fansunitedapi.com/v1" : "https://prediction.fansunitedapi.com/v1", JT = (t) => t === "dev" ? "http://localhost:9040/v1" : t === "staging" ? "https://mini-games.fansunitedstagingapi.com/v1" : t === "watg" ? "https://mini-games.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://mini-games.yolo.fansunitedapi.com/v1" : t === "cska" ? "https://mini-games.cska.fansunitedapi.com/v1" : "https://mini-games.fansunitedapi.com/v1", QT = (t) => t === "dev" ? "http://localhost:8020/v1" : t === "staging" ? "https://reporting.fansunitedstagingapi.com/v1" : t === "watg" ? "https://reporting.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://reporting.yolo.fansunitedapi.com/v1" : t === "cska" ? "https://reporting.cska.fansunitedapi.com/v1" : "https://reporting.fansunitedapi.com/v1", XT = (t) => t === "dev" ? "http://localhost:9030/v1" : t === "staging" ? "https://voting.fansunitedstagingapi.com/v1" : t === "watg" ? "https://voting.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://voting.yolo.fansunitedapi.com/v1" : t === "cska" ? "https://voting.cska.fansunitedapi.com/v1" : "https://voting.fansunitedapi.com/v1", ZT = (t) => t === "staging" ? "https://custom-games-resolver-131809830171.europe-west1.run.app/v1" : t === "watg" ? "https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1" : t === "yolo" ? "https://custom-games-resolver-1054597592566.europe-west1.run.app/v1" : t === "cska" ? "https://custom-games-resolver-414330847655.europe-west1.run.app/v1" : "https://custom-games-resolver-150199313674.europe-west1.run.app/v1", eE = (t) => t === "dev" ? "http://localhost:8010/v1" : t === "staging" ? "https://profile.fansunitedstagingapi.com/v1" : t === "watg" ? "https://profile.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://profile.yolo.fansunitedapi.com/v1" : t === "cska" ? "https://profile.cska.fansunitedapi.com/v1" : "https://profile.fansunitedapi.com/v1", tE = (t) => t === "dev" ? "http://localhost:8010/v1" : t === "staging" ? "https://discussions.fansunitedstagingapi.com/v1" : t === "watg" ? "https://discussions.watg.fansunitedapi.com/v1" : t === "yolo" ? "https://discussions.yolo.fansunitedapi.com/v1" : t === "cska" ? "https://discussions.cska.fansunitedapi.com/v1" : "https://discussions.fansunitedapi.com/v1";
15495
15495
  class nE extends KT {
15496
15496
  constructor(n, r) {
15497
15497
  super(n, r);
package/index.umd.js CHANGED
@@ -3327,7 +3327,7 @@
3327
3327
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3328
3328
  * See the License for the specific language governing permissions and
3329
3329
  * limitations under the License.
3330
- */const r_=5*60,i_=Dl("authIdTokenMaxAge")||r_;let Vp=null;const o_=t=>e=>I(this,null,function*(){const n=e&&(yield e.getIdTokenResult()),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>i_)return;const i=n==null?void 0:n.token;Vp!==i&&(Vp=i,yield fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function a_(t=bh()){const e=oa(t,"auth");if(e.isInitialized())return e.getImmediate();const n=jA(t,{popupRedirectResolver:ZT,persistence:[dT,ZA,Ep]}),r=Dl("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(r,location.origin);if(location.origin===o.origin){const a=o_(o.toString());JA(n,a,()=>a(n.currentUser)),qA(n,l=>a(l))}}const i=My("auth");return i&&yp(n,`http://${i}`),n}function s_(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}NA({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const o=Cn("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",s_().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="}),n_("Browser");let Hp=!1;const ho=t=>{if(Hp)return tr.auth();if(t&&t==="dev"){tr.initializeApp({apiKey:"api_key"});const n=a_();yp(n,"http://localhost:39199")}else{const n={apiKey:t&&t==="staging"?"AIzaSyBKhAYwkvkmjm16FxCMvCUQjSRpKC0DbM8":"AIzaSyDPD_SETLswR_U3dKawYkAyRhbzVXziD_4",authDomain:"fans-united-clients.firebaseapp.com",projectId:"fans-united-clients",messagingSenderId:"78627953958",appId:"1:78627953958:web:2ee87d5b274e0e7685f5e7",measurementId:"G-DPV1TYL0JW"};tr.initializeApp(n)}return Hp=!0,tr.auth()},l_=t=>t==="dev"?"http://localhost:8070/v1":t==="staging"?"https://client.fansunitedstagingapi.com/v1":t==="watg"?"https://client.watg.fansunitedapi.com/v1":t==="yolo"?"https://client.yolo.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class c_{constructor(e,n){te(this,"apiKey","");te(this,"clientId","");te(this,"environment","");te(this,"mainQueryParams",{key:"",client_id:""});te(this,"headers",{"Content-Type":"application/json"});te(this,"clientApiBaseUrl","");te(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");te(this,"sportal365Config",null);te(this,"generateSignedInUrl",e=>I(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(e)})}));te(this,"storeInBucket",(e,n,r)=>I(this,null,function*(){const i=yield fetch(e,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));te(this,"fetchImagesFromSportal365",(e,n,r)=>I(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:e,page:r.toString()};return n&&(n.from&&(o=J(B({},o),{from:n.from})),n.to&&(o=J(B({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));te(this,"getSchedulersByEntityId",e=>I(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:e},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"setSchedulers",(e,n,r)=>I(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(e),method:o})}));te(this,"deleteScheduledTask",e=>I(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${e}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLoggedInStaffMember",()=>I(this,null,function*(){const r=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(r).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}));te(this,"constructAssetsUrl",e=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${e}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${e}`:`https://uploads.fansunitedassets.com/${this.clientId}/${e}`);te(this,"throwErrorFromXmlResponse",e=>{const n=new window.DOMParser().parseFromString(e,"text/xml"),r=n.getElementsByTagName("Message")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Message")[0].textContent:"",i=n.getElementsByTagName("Details")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Details")[0].textContent:"";throw new Error(r+" "+i)});te(this,"getToken",()=>I(this,null,function*(){const e=ho(this.environment).currentUser;return e?yield e.getIdToken():""}));this.apiKey=e.apiKey,this.clientId=e.clientId,this.environment=e.environment,this.mainQueryParams={key:e.apiKey,client_id:e.clientId},this.sportal365Config=n,this.clientApiBaseUrl=l_(this.environment)}}const u_=t=>t==="dev"?"http://localhost:8060/v1":t==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":t==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":t==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",d_=t=>t==="dev"?"http://localhost:8040/v1":t==="staging"?"https://prediction.fansunitedstagingapi.com/v1":t==="watg"?"https://prediction.watg.fansunitedapi.com/v1":t==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",h_=t=>t==="dev"?"http://localhost:9040/v1":t==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":t==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":t==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",f_=t=>t==="dev"?"http://localhost:8020/v1":t==="staging"?"https://reporting.fansunitedstagingapi.com/v1":t==="watg"?"https://reporting.watg.fansunitedapi.com/v1":t==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",p_=t=>t==="dev"?"http://localhost:9030/v1":t==="staging"?"https://voting.fansunitedstagingapi.com/v1":t==="watg"?"https://voting.watg.fansunitedapi.com/v1":t==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",g_=t=>t==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":t==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":t==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",m_=t=>t==="dev"?"http://localhost:8010/v1":t==="staging"?"https://profile.fansunitedstagingapi.com/v1":t==="watg"?"https://profile.watg.fansunitedapi.com/v1":t==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",v_=t=>t==="dev"?"http://localhost:8010/v1":t==="staging"?"https://discussions.fansunitedstagingapi.com/v1":t==="watg"?"https://discussions.watg.fansunitedapi.com/v1":t==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class b_ extends c_{constructor(n,r){super(n,r);te(this,"loyaltyBaseUrl","");te(this,"predictionBaseUrl","");te(this,"miniGamesApiBaseUrl","");te(this,"reportingApiBaseUrl","");te(this,"votingApiBaseUrl","");te(this,"profileApiBaseUrl","");te(this,"customResolverUrl","");te(this,"discussionsApiBaseUrl","");te(this,"getClientById",()=>I(this,null,function*(){const n=`/clients/${this.clientId}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createTemplate",n=>I(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editTemplate",(n,r)=>I(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteTemplate",n=>I(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"setWinners",n=>I(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"exportDetailedLeaderboard",(n,r)=>I(this,null,function*(){const i=`/leaderboard/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(J(B({},this.mainQueryParams),{limit:r.toString()})),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"exportDetailedGameLeaderboard",(n,r)=>I(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(J(B({},this.mainQueryParams),{limit:r.toString()})),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"createGame",n=>I(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editGame",(n,r)=>I(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getEntityFeature",(n,r)=>I(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o={key:this.apiKey};return r&&(o.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o))}));te(this,"getClientFeatures",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/features?`,i={key:this.apiKey};return n&&(i.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i))}));te(this,"updateEntityFeatures",(n,r)=>I(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getClassicQuizFeature",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getEitherOrFeature",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getPollFeature",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"createClassicQuiz",n=>I(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateClassicQuiz",(n,r)=>I(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"getClassicQuizById",n=>I(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"deleteClassicQuiz",n=>I(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"calculateQuestionsReport",n=>I(this,null,function*(){const r=`/classic-quizzes/${n}/questions-report?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));te(this,"exportUsers",n=>I(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"getClassicQuizParticipations",(n,r,i,o)=>I(this,null,function*(){const a="/classic-quizzes/participations?",l=J(B({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(l),{headers:J(B({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"getEntityParticipations",(n,r,i)=>I(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=J(B({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"createPoll",n=>I(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updatePoll",(n,r)=>I(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deletePoll",n=>I(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getEitherOrById",(n,r)=>I(this,null,function*(){const i=`/either-or/${n}/staff?`,o=yield this.getToken();let a=null;return r&&(a=J(B({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"createEitherOr",n=>I(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateEitherOr",(n,r)=>I(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteEitherOr",n=>I(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLists",(n,r,i="DESC")=>I(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"getListById",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getListContent",(n,r,i="DESC",o)=>I(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,l={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(l.page=o.toString());const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(l),{headers:J(B({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"createList",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/lists/?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateList",(n,r)=>I(this,null,function*(){const i=`/clients/${this.clientId}/lists/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteList",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getLanguageConfig",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateLanguageConfig",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));te(this,"createBracketGame",n=>I(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateBracketGame",(n,r)=>I(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolvePredictions",n=>I(this,null,function*(){const r="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"exportLeadsPerEntity",n=>I(this,null,function*(){const r="/leads/export?",i=J(B({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getLeadStatistics",n=>I(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"exportLeads",n=>I(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createStandingGame",n=>I(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateStandingGame",(n,r)=>I(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolveStandingPredictions",n=>I(this,null,function*(){const r="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"moderateUserPosts",(n,r)=>I(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=J(B({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));te(this,"getUserBanStatus",n=>I(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"banUser",(n,r,i)=>I(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),l={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(l)})}));te(this,"unbanUser",(n,r)=>I(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken(),a={unban_reason:r};return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));te(this,"updateUser",(n,r,i)=>I(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),l=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(l)})}));te(this,"deleteUserProfile",n=>I(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"createDiscussion",n=>I(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"deleteDiscussion",n=>I(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"moderatePosts",(...o)=>I(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",l=yield this.getToken();let s={};if(r.length>0){const c=r.join(",");s=J(B({},this.mainQueryParams),{post_ids:c,reason:i})}else s=J(B({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(s),{headers:J(B({},this.headers),{Authorization:"Bearer "+l}),method:"POST"})}));te(this,"pinDiscussionPosts",(n,r)=>I(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=J(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));te(this,"unpinDiscussionPosts",(n,r)=>I(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=J(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getPostsByStaffMember",n=>I(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(B(B({},this.mainQueryParams),n)),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"getReportedPosts",n=>I(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(B(B({},this.mainQueryParams),n)),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateDiscussionsFeature",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/features/discussions?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"updateProfilePreferences",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/features/profile_preferences?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"getClientBadges",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/features/loyalty/badges?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateClientBadges",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/features/loyalty/badges?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));te(this,"getEngagementThroughPredictionsReport",(n,r,i)=>I(this,null,function*(){const o="/predictions/football/engagements?",a=J(B({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));this.loyaltyBaseUrl=u_(n.environment),this.predictionBaseUrl=d_(n.environment),this.miniGamesApiBaseUrl=h_(n.environment),this.reportingApiBaseUrl=f_(n.environment),this.votingApiBaseUrl=p_(n.environment),this.profileApiBaseUrl=m_(n.environment),this.customResolverUrl=g_(n.environment),this.discussionsApiBaseUrl=v_(n.environment)}}const y_=(t,e)=>!t&&!e?null:!t&&e?(console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null):{project:t,authorization:`Bearer ${e&&e==="betway"?"24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K":"dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}`},ja=x.createContext(null),C_=({config:t,children:e})=>{const n={apiKey:t.apiKey,clientId:t.clientId,environment:t.environment,lang:t.language,errorHandlingMode:t.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=y_(t.sportal365Project,t.sportal365Infrastructure),i=Fe.FansUnitedSDK(n),o=new b_(n,r);return u.jsx(ja.Provider,{value:{sdk:i,https:o},children:e})},Wp=x.createContext(null),x_=({children:t,environment:e})=>{const[n,r]=x.useState(null),[i,o]=x.useState(!0);return x.useEffect(()=>ho(e).onAuthStateChanged(l=>{Me.unstable_batchedUpdates(()=>{o(!1),r(l)})}),[e]),u.jsx(Wp.Provider,{value:n,children:!i&&t})};function O(){return O=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},O.apply(null,arguments)}function _e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}var Gp={exports:{}},w_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",I_=w_,S_=I_;function Kp(){}function Yp(){}Yp.resetWarningCache=Kp;var A_=function(){function t(r,i,o,a,l,s){if(s!==S_){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Yp,resetWarningCache:Kp};return n.PropTypes=n,n};Gp.exports=A_();var T_=Gp.exports;function __(t){return typeof t=="string"}function E_(t,e,n){return t===void 0||__(t)?e:O({},e,{ownerState:O({},e.ownerState,n)})}function qp(t,e,n=(r,i)=>r===i){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}function zn(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function k_(t,e,n){return typeof t=="function"?t(e,n):t}function P_(t){const{rootElementName:e="",componentName:n}=t,[r,i]=z.useState(e.toUpperCase()),o=z.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function D_(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function dn(...t){return z.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{D_(n,e)})},t)}function Jp(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Jp(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Vn(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Jp(t))&&(r&&(r+=" "),r+=e);return r}function Qp(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function O_(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const p=Vn(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=O({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=O({},n,i,r);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=zn(O({},i,r)),l=Qp(r),s=Qp(i),c=e(a),d=Vn(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=O({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),f=O({},c,n,s,l);return d.length>0&&(f.className=d),Object.keys(h).length>0&&(f.style=h),{props:f,internalRef:c.ref}}function ur(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Xp(t){if(z.isValidElement(t)||!ur(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=Xp(t[n])}),e}function Hn(t,e,n={clone:!0}){const r=n.clone?O({},t):t;return ur(t)&&ur(e)&&Object.keys(e).forEach(i=>{z.isValidElement(e[i])?r[i]=e[i]:ur(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&ur(t[i])?r[i]=Hn(t[i],e[i],n):n.clone?r[i]=ur(e[i])?Xp(e[i]):e[i]:r[i]=e[i]}),r}function za(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<arguments.length;n+=1)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var Zp={exports:{}},Ue={};/**
3330
+ */const r_=5*60,i_=Dl("authIdTokenMaxAge")||r_;let Vp=null;const o_=t=>e=>I(this,null,function*(){const n=e&&(yield e.getIdTokenResult()),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>i_)return;const i=n==null?void 0:n.token;Vp!==i&&(Vp=i,yield fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function a_(t=bh()){const e=oa(t,"auth");if(e.isInitialized())return e.getImmediate();const n=jA(t,{popupRedirectResolver:ZT,persistence:[dT,ZA,Ep]}),r=Dl("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(r,location.origin);if(location.origin===o.origin){const a=o_(o.toString());JA(n,a,()=>a(n.currentUser)),qA(n,l=>a(l))}}const i=My("auth");return i&&yp(n,`http://${i}`),n}function s_(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}NA({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const o=Cn("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",s_().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="}),n_("Browser");let Hp=!1;const ho=t=>{if(Hp)return tr.auth();if(t&&t==="dev"){tr.initializeApp({apiKey:"api_key"});const n=a_();yp(n,"http://localhost:39199")}else{const n={apiKey:t&&t==="staging"?"AIzaSyBKhAYwkvkmjm16FxCMvCUQjSRpKC0DbM8":"AIzaSyDPD_SETLswR_U3dKawYkAyRhbzVXziD_4",authDomain:"fans-united-clients.firebaseapp.com",projectId:"fans-united-clients",messagingSenderId:"78627953958",appId:"1:78627953958:web:2ee87d5b274e0e7685f5e7",measurementId:"G-DPV1TYL0JW"};tr.initializeApp(n)}return Hp=!0,tr.auth()},l_=t=>t==="dev"?"http://localhost:8070/v1":t==="staging"?"https://client.fansunitedstagingapi.com/v1":t==="watg"?"https://client.watg.fansunitedapi.com/v1":t==="yolo"?"https://client.yolo.fansunitedapi.com/v1":t==="cska"?"https://client.cska.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class c_{constructor(e,n){te(this,"apiKey","");te(this,"clientId","");te(this,"environment","");te(this,"mainQueryParams",{key:"",client_id:""});te(this,"headers",{"Content-Type":"application/json"});te(this,"clientApiBaseUrl","");te(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");te(this,"sportal365Config",null);te(this,"generateSignedInUrl",e=>I(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(e)})}));te(this,"storeInBucket",(e,n,r)=>I(this,null,function*(){const i=yield fetch(e,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));te(this,"fetchImagesFromSportal365",(e,n,r)=>I(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:e,page:r.toString()};return n&&(n.from&&(o=J(B({},o),{from:n.from})),n.to&&(o=J(B({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));te(this,"getSchedulersByEntityId",e=>I(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:e},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"setSchedulers",(e,n,r)=>I(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(e),method:o})}));te(this,"deleteScheduledTask",e=>I(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${e}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLoggedInStaffMember",()=>I(this,null,function*(){const r=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(r).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}));te(this,"constructAssetsUrl",e=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${e}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${e}`:`https://uploads.fansunitedassets.com/${this.clientId}/${e}`);te(this,"throwErrorFromXmlResponse",e=>{const n=new window.DOMParser().parseFromString(e,"text/xml"),r=n.getElementsByTagName("Message")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Message")[0].textContent:"",i=n.getElementsByTagName("Details")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Details")[0].textContent:"";throw new Error(r+" "+i)});te(this,"getToken",()=>I(this,null,function*(){const e=ho(this.environment).currentUser;return e?yield e.getIdToken():""}));this.apiKey=e.apiKey,this.clientId=e.clientId,this.environment=e.environment,this.mainQueryParams={key:e.apiKey,client_id:e.clientId},this.sportal365Config=n,this.clientApiBaseUrl=l_(this.environment)}}const u_=t=>t==="dev"?"http://localhost:8060/v1":t==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":t==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":t==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":t==="cska"?"https://loyalty.cska.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",d_=t=>t==="dev"?"http://localhost:8040/v1":t==="staging"?"https://prediction.fansunitedstagingapi.com/v1":t==="watg"?"https://prediction.watg.fansunitedapi.com/v1":t==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":t==="cska"?"https://prediction.cska.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",h_=t=>t==="dev"?"http://localhost:9040/v1":t==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":t==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":t==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":t==="cska"?"https://mini-games.cska.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",f_=t=>t==="dev"?"http://localhost:8020/v1":t==="staging"?"https://reporting.fansunitedstagingapi.com/v1":t==="watg"?"https://reporting.watg.fansunitedapi.com/v1":t==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":t==="cska"?"https://reporting.cska.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",p_=t=>t==="dev"?"http://localhost:9030/v1":t==="staging"?"https://voting.fansunitedstagingapi.com/v1":t==="watg"?"https://voting.watg.fansunitedapi.com/v1":t==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":t==="cska"?"https://voting.cska.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",g_=t=>t==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":t==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":t==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":t==="cska"?"https://custom-games-resolver-414330847655.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",m_=t=>t==="dev"?"http://localhost:8010/v1":t==="staging"?"https://profile.fansunitedstagingapi.com/v1":t==="watg"?"https://profile.watg.fansunitedapi.com/v1":t==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":t==="cska"?"https://profile.cska.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",v_=t=>t==="dev"?"http://localhost:8010/v1":t==="staging"?"https://discussions.fansunitedstagingapi.com/v1":t==="watg"?"https://discussions.watg.fansunitedapi.com/v1":t==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":t==="cska"?"https://discussions.cska.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class b_ extends c_{constructor(n,r){super(n,r);te(this,"loyaltyBaseUrl","");te(this,"predictionBaseUrl","");te(this,"miniGamesApiBaseUrl","");te(this,"reportingApiBaseUrl","");te(this,"votingApiBaseUrl","");te(this,"profileApiBaseUrl","");te(this,"customResolverUrl","");te(this,"discussionsApiBaseUrl","");te(this,"getClientById",()=>I(this,null,function*(){const n=`/clients/${this.clientId}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createTemplate",n=>I(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editTemplate",(n,r)=>I(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteTemplate",n=>I(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"setWinners",n=>I(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"exportDetailedLeaderboard",(n,r)=>I(this,null,function*(){const i=`/leaderboard/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(J(B({},this.mainQueryParams),{limit:r.toString()})),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"exportDetailedGameLeaderboard",(n,r)=>I(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(J(B({},this.mainQueryParams),{limit:r.toString()})),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"createGame",n=>I(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editGame",(n,r)=>I(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getEntityFeature",(n,r)=>I(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o={key:this.apiKey};return r&&(o.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o))}));te(this,"getClientFeatures",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/features?`,i={key:this.apiKey};return n&&(i.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i))}));te(this,"updateEntityFeatures",(n,r)=>I(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getClassicQuizFeature",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getEitherOrFeature",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getPollFeature",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"createClassicQuiz",n=>I(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateClassicQuiz",(n,r)=>I(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"getClassicQuizById",n=>I(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"deleteClassicQuiz",n=>I(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"calculateQuestionsReport",n=>I(this,null,function*(){const r=`/classic-quizzes/${n}/questions-report?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));te(this,"exportUsers",n=>I(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"getClassicQuizParticipations",(n,r,i,o)=>I(this,null,function*(){const a="/classic-quizzes/participations?",l=J(B({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(l),{headers:J(B({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"getEntityParticipations",(n,r,i)=>I(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=J(B({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"createPoll",n=>I(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updatePoll",(n,r)=>I(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deletePoll",n=>I(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getEitherOrById",(n,r)=>I(this,null,function*(){const i=`/either-or/${n}/staff?`,o=yield this.getToken();let a=null;return r&&(a=J(B({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"createEitherOr",n=>I(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateEitherOr",(n,r)=>I(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteEitherOr",n=>I(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLists",(n,r,i="DESC")=>I(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"getListById",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getListContent",(n,r,i="DESC",o)=>I(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,l={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(l.page=o.toString());const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(l),{headers:J(B({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"createList",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/lists/?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateList",(n,r)=>I(this,null,function*(){const i=`/clients/${this.clientId}/lists/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteList",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getLanguageConfig",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateLanguageConfig",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));te(this,"createBracketGame",n=>I(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateBracketGame",(n,r)=>I(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolvePredictions",n=>I(this,null,function*(){const r="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"exportLeadsPerEntity",n=>I(this,null,function*(){const r="/leads/export?",i=J(B({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getLeadStatistics",n=>I(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"exportLeads",n=>I(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createStandingGame",n=>I(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateStandingGame",(n,r)=>I(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolveStandingPredictions",n=>I(this,null,function*(){const r="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"moderateUserPosts",(n,r)=>I(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=J(B({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));te(this,"getUserBanStatus",n=>I(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"banUser",(n,r,i)=>I(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),l={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(l)})}));te(this,"unbanUser",(n,r)=>I(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken(),a={unban_reason:r};return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));te(this,"updateUser",(n,r,i)=>I(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),l=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(l)})}));te(this,"deleteUserProfile",n=>I(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"createDiscussion",n=>I(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"deleteDiscussion",n=>I(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"moderatePosts",(...o)=>I(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",l=yield this.getToken();let s={};if(r.length>0){const c=r.join(",");s=J(B({},this.mainQueryParams),{post_ids:c,reason:i})}else s=J(B({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(s),{headers:J(B({},this.headers),{Authorization:"Bearer "+l}),method:"POST"})}));te(this,"pinDiscussionPosts",(n,r)=>I(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=J(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));te(this,"unpinDiscussionPosts",(n,r)=>I(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=J(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getPostsByStaffMember",n=>I(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(B(B({},this.mainQueryParams),n)),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"getReportedPosts",n=>I(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(B(B({},this.mainQueryParams),n)),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateDiscussionsFeature",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/features/discussions?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"updateProfilePreferences",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/features/profile_preferences?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"getClientBadges",()=>I(this,null,function*(){const n=`/clients/${this.clientId}/features/loyalty/badges?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateClientBadges",n=>I(this,null,function*(){const r=`/clients/${this.clientId}/features/loyalty/badges?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));te(this,"getEngagementThroughPredictionsReport",(n,r,i)=>I(this,null,function*(){const o="/predictions/football/engagements?",a=J(B({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));this.loyaltyBaseUrl=u_(n.environment),this.predictionBaseUrl=d_(n.environment),this.miniGamesApiBaseUrl=h_(n.environment),this.reportingApiBaseUrl=f_(n.environment),this.votingApiBaseUrl=p_(n.environment),this.profileApiBaseUrl=m_(n.environment),this.customResolverUrl=g_(n.environment),this.discussionsApiBaseUrl=v_(n.environment)}}const y_=(t,e)=>!t&&!e?null:!t&&e?(console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null):{project:t,authorization:`Bearer ${e&&e==="betway"?"24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K":"dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}`},ja=x.createContext(null),C_=({config:t,children:e})=>{const n={apiKey:t.apiKey,clientId:t.clientId,environment:t.environment,lang:t.language,errorHandlingMode:t.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=y_(t.sportal365Project,t.sportal365Infrastructure),i=Fe.FansUnitedSDK(n),o=new b_(n,r);return u.jsx(ja.Provider,{value:{sdk:i,https:o},children:e})},Wp=x.createContext(null),x_=({children:t,environment:e})=>{const[n,r]=x.useState(null),[i,o]=x.useState(!0);return x.useEffect(()=>ho(e).onAuthStateChanged(l=>{Me.unstable_batchedUpdates(()=>{o(!1),r(l)})}),[e]),u.jsx(Wp.Provider,{value:n,children:!i&&t})};function O(){return O=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},O.apply(null,arguments)}function _e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}var Gp={exports:{}},w_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",I_=w_,S_=I_;function Kp(){}function Yp(){}Yp.resetWarningCache=Kp;var A_=function(){function t(r,i,o,a,l,s){if(s!==S_){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Yp,resetWarningCache:Kp};return n.PropTypes=n,n};Gp.exports=A_();var T_=Gp.exports;function __(t){return typeof t=="string"}function E_(t,e,n){return t===void 0||__(t)?e:O({},e,{ownerState:O({},e.ownerState,n)})}function qp(t,e,n=(r,i)=>r===i){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}function zn(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function k_(t,e,n){return typeof t=="function"?t(e,n):t}function P_(t){const{rootElementName:e="",componentName:n}=t,[r,i]=z.useState(e.toUpperCase()),o=z.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function D_(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function dn(...t){return z.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{D_(n,e)})},t)}function Jp(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Jp(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Vn(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Jp(t))&&(r&&(r+=" "),r+=e);return r}function Qp(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function O_(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const p=Vn(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=O({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=O({},n,i,r);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=zn(O({},i,r)),l=Qp(r),s=Qp(i),c=e(a),d=Vn(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=O({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),f=O({},c,n,s,l);return d.length>0&&(f.className=d),Object.keys(h).length>0&&(f.style=h),{props:f,internalRef:c.ref}}function ur(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Xp(t){if(z.isValidElement(t)||!ur(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=Xp(t[n])}),e}function Hn(t,e,n={clone:!0}){const r=n.clone?O({},t):t;return ur(t)&&ur(e)&&Object.keys(e).forEach(i=>{z.isValidElement(e[i])?r[i]=e[i]:ur(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&ur(t[i])?r[i]=Hn(t[i],e[i],n):n.clone?r[i]=ur(e[i])?Xp(e[i]):e[i]:r[i]=e[i]}),r}function za(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<arguments.length;n+=1)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var Zp={exports:{}},Ue={};/**
3331
3331
  * @license React
3332
3332
  * react-is.production.js
3333
3333
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-management-components",
3
- "version": "1.44.0",
3
+ "version": "1.45.0",
4
4
  "main": "index.es.js",
5
5
  "author": "Fans United",
6
6
  "description": "",