fansunited-management-components 1.57.0-RC1 → 1.57.0-RC2

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
@@ -11007,15 +11007,15 @@ const ea = (e) => {
11007
11007
  if (e && e === "dev") {
11008
11008
  vr.initializeApp({ apiKey: "api_key" });
11009
11009
  const n = PS();
11010
- Eu(n, void 0);
11010
+ Eu(n, "http://localhost:39199");
11011
11011
  } else {
11012
11012
  const n = {
11013
- apiKey: void 0,
11014
- authDomain: void 0,
11015
- projectId: void 0,
11016
- messagingSenderId: void 0,
11017
- appId: void 0,
11018
- measurementId: void 0
11013
+ apiKey: e && e === "staging" ? "AIzaSyBKhAYwkvkmjm16FxCMvCUQjSRpKC0DbM8" : "AIzaSyDPD_SETLswR_U3dKawYkAyRhbzVXziD_4",
11014
+ authDomain: "fans-united-clients.firebaseapp.com",
11015
+ projectId: "fans-united-clients",
11016
+ messagingSenderId: "78627953958",
11017
+ appId: "1:78627953958:web:2ee87d5b274e0e7685f5e7",
11018
+ measurementId: "G-RH90B03KJG"
11019
11019
  };
11020
11020
  vr.initializeApp(n);
11021
11021
  }
@@ -11718,7 +11718,7 @@ class RA extends CA {
11718
11718
  }
11719
11719
  const OA = (e, t) => !e && !t ? null : !e && t ? (console.warn(
11720
11720
  "'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"
11721
- ), null) : { project: e, authorization: "Bearer undefined" }, Ns = zn(null), jA = ({ config: e, children: t }) => {
11721
+ ), null) : { project: e, authorization: `Bearer ${t && t === "betway" ? "24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K" : "dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}` }, Ns = zn(null), jA = ({ config: e, children: t }) => {
11722
11722
  const n = {
11723
11723
  apiKey: e.apiKey,
11724
11724
  clientId: e.clientId,
package/index.umd.js CHANGED
@@ -2322,7 +2322,7 @@
2322
2322
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2323
2323
  * See the License for the specific language governing permissions and
2324
2324
  * limitations under the License.
2325
- */const AS="auth-compat";function TS(e){e.INTERNAL.registerComponent(new Yn(AS,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Nl(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:Lr.EMAIL_SIGNIN,PASSWORD_RESET:Lr.PASSWORD_RESET,RECOVER_EMAIL:Lr.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:Lr.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:Lr.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:Lr.VERIFY_EMAIL}},EmailAuthProvider:Zn,FacebookAuthProvider:vn,GithubAuthProvider:yn,GoogleAuthProvider:bn,OAuthProvider:Ur,SAMLAuthProvider:Wo,PhoneAuthProvider:zl,PhoneMultiFactorGenerator:Of,RecaptchaVerifier:IS,TwitterAuthProvider:xn,Auth:Nl,AuthCredential:zr,Error:Ft}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(oS,aS)}TS(Jn);let Gf=!1;const qi=e=>{if(Gf)return Jn.auth();if(e&&e==="dev"){Jn.initializeApp({apiKey:"api_key"});const n=$w();gl(n,void 0)}else{const n={apiKey:void 0,authDomain:void 0,projectId:void 0,messagingSenderId:void 0,appId:void 0,measurementId:void 0};Jn.initializeApp(n)}return Gf=!0,Jn.auth()},ES=e=>e==="dev"?"http://localhost:8070/v1":e==="staging"?"https://client.fansunitedstagingapi.com/v1":e==="watg"?"https://client.watg.fansunitedapi.com/v1":e==="yolo"?"https://client.yolo.fansunitedapi.com/v1":e==="cska"?"https://client.cska.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class kS{constructor(t,n){X(this,"apiKey","");X(this,"clientId","");X(this,"environment","");X(this,"mainQueryParams",{key:"",client_id:""});X(this,"headers",{"Content-Type":"application/json"});X(this,"clientApiBaseUrl","");X(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");X(this,"sportal365Config",null);X(this,"generateSignedInUrl",t=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));X(this,"storeInBucket",(t,n,r)=>_(this,null,function*(){const i=yield fetch(t,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));X(this,"fetchImagesFromSportal365",(t,n,r)=>_(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:t,page:r.toString()};return n&&(n.from&&(o=Q($({},o),{from:n.from})),n.to&&(o=Q($({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));X(this,"getSchedulersByEntityId",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:t},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"setSchedulers",(t,n,r)=>_(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},s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+s}),body:JSON.stringify(t),method:o})}));X(this,"deleteScheduledTask",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${t}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"getLoggedInStaffMember",()=>_(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)}));X(this,"constructAssetsUrl",t=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${t}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${t}`:`https://uploads.fansunitedassets.com/${this.clientId}/${t}`);X(this,"throwErrorFromXmlResponse",t=>{const n=new window.DOMParser().parseFromString(t,"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)});X(this,"getToken",()=>_(this,null,function*(){const t=qi(this.environment).currentUser;return t?yield t.getIdToken():""}));this.apiKey=t.apiKey,this.clientId=t.clientId,this.environment=t.environment,this.mainQueryParams={key:t.apiKey,client_id:t.clientId},this.sportal365Config=n,this.clientApiBaseUrl=ES(this.environment)}}class _S{constructor(t){X(this,"baseUrl","https://v1.formula-1.api-sports.io");X(this,"apiKey");X(this,"headers");this.apiKey=t,this.headers={"X-RapidAPI-Key":this.apiKey,"Content-Type":"application/json"}}getRaces(t,n){return _(this,null,function*(){const r={season:t.toString(),type:(n==null?void 0:n.type)||"Race"};n&&Object.entries(n).forEach(([o,a])=>{a!=null&&(r[o]=a.toString())});const i=`${this.baseUrl}/races?${new URLSearchParams(r)}`;return yield fetch(i,{method:"GET",headers:this.headers})})}makeRequest(t,n){return _(this,null,function*(){let r=`${this.baseUrl}${t}`;return n&&Object.keys(n).length>0&&(r+=`?${new URLSearchParams(n)}`),yield fetch(r,{method:"GET",headers:this.headers})})}}const PS=e=>e==="dev"?"http://localhost:8060/v1":e==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":e==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":e==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":e==="cska"?"https://loyalty.cska.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",DS=e=>e==="dev"?"http://localhost:8040/v1":e==="staging"?"https://prediction.fansunitedstagingapi.com/v1":e==="watg"?"https://prediction.watg.fansunitedapi.com/v1":e==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":e==="cska"?"https://prediction.cska.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",OS=e=>e==="dev"?"http://localhost:9040/v1":e==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":e==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":e==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":e==="cska"?"https://mini-games.cska.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",RS=e=>e==="dev"?"http://localhost:8020/v1":e==="staging"?"https://reporting.fansunitedstagingapi.com/v1":e==="watg"?"https://reporting.watg.fansunitedapi.com/v1":e==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":e==="cska"?"https://reporting.cska.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",MS=e=>e==="dev"?"http://localhost:9030/v1":e==="staging"?"https://voting.fansunitedstagingapi.com/v1":e==="watg"?"https://voting.watg.fansunitedapi.com/v1":e==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":e==="cska"?"https://voting.cska.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",LS=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":e==="cska"?"https://custom-games-resolver-414330847655.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",BS=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://profile.fansunitedstagingapi.com/v1":e==="watg"?"https://profile.watg.fansunitedapi.com/v1":e==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":e==="cska"?"https://profile.cska.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",$S=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://discussions.fansunitedstagingapi.com/v1":e==="watg"?"https://discussions.watg.fansunitedapi.com/v1":e==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":e==="cska"?"https://discussions.cska.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1",FS=e=>e==="dev"?"http://localhost:9050/v1":e==="staging"?"https://ai-content-builder-131809830171.europe-west1.run.app/v1":e==="yolo"||e==="cska"?"":"https://ai-content-builder-150199313674.europe-west1.run.app/v1";class NS extends kS{constructor(n,r){super(n,r);X(this,"loyaltyBaseUrl","");X(this,"predictionBaseUrl","");X(this,"miniGamesApiBaseUrl","");X(this,"reportingApiBaseUrl","");X(this,"votingApiBaseUrl","");X(this,"profileApiBaseUrl","");X(this,"customResolverUrl","");X(this,"discussionsApiBaseUrl","");X(this,"aiServiceBaseUrl","");X(this,"apiSports");X(this,"getClientById",()=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"createTemplate",n=>_(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"editTemplate",(n,r)=>_(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deleteTemplate",n=>_(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"setWinners",n=>_(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"exportDetailedLeaderboard",(n,r,i)=>_(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken(),s=$({},this.mainQueryParams);return r&&(s.group_id=r),yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(Q($({},s),{limit:i.toString()})),{headers:Q($({},this.headers),{Authorization:"Bearer "+a})})}));X(this,"exportDetailedGameLeaderboard",(n,r)=>_(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(Q($({},this.mainQueryParams),{limit:r.toString()})),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"createGame",n=>_(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"editGame",(n,r)=>_(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));X(this,"getEntityFeature",(n,r)=>_(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))}));X(this,"getClientFeatures",(n,r=1)=>_(this,null,function*(){const i=`/clients/${this.clientId}/features?`,o={key:this.apiKey};n&&(o.disable_cache=Date.now().toString());const a=Q($({},this.headers),{"x-api-version":r.toString()});return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:a})}));X(this,"updateEntityFeatures",(n,r)=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));X(this,"getClassicQuizFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));X(this,"getEitherOrFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));X(this,"getPollFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));X(this,"createClassicQuiz",n=>_(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateClassicQuiz",(n,r)=>_(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"getClassicQuizById",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"deleteClassicQuiz",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"calculateQuestionsReport",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));X(this,"exportUsers",n=>_(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"getClassicQuizParticipations",(n,r,i,o)=>_(this,null,function*(){const a="/classic-quizzes/participations?",s=Q($({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),c=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(s),{headers:Q($({},this.headers),{Authorization:"Bearer "+c})})}));X(this,"getEntityParticipations",(n,r,i)=>_(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=Q($({},this.mainQueryParams),{from_date:r,to_date:i}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+s})})}));X(this,"createPoll",n=>_(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updatePoll",(n,r)=>_(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deletePoll",n=>_(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"getEitherOrById",(n,r)=>_(this,null,function*(){const i=`/either-or/${n}/staff?`,o=yield this.getToken();let a=null;return r&&(a=Q($({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"getEitherOrByIdReadOnlyClient",(n,r,i)=>_(this,null,function*(){const o="https://mini-games.fansunitedapi.com/v1",a=`/either-or/${n}/staff?`,s=yield this.getToken(),c={key:r,client_id:i};return yield fetch(o+a+new URLSearchParams(c),{headers:Q($({},this.headers),{Authorization:"Bearer "+s})})}));X(this,"createEitherOr",n=>_(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateEitherOr",(n,r)=>_(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deleteEitherOr",n=>_(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"getLists",(n,r,i="DESC")=>_(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 s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+s})})}));X(this,"getListById",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"getListContent",(n,r,i="DESC",o)=>_(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,s={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(s.page=o.toString());const c=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(s),{headers:Q($({},this.headers),{Authorization:"Bearer "+c})})}));X(this,"createList",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateList",(n,r)=>_(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:Q($({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deleteList",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));X(this,"getLanguageConfig",()=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"updateLanguageConfig",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));X(this,"createBracketGame",n=>_(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateBracketGame",(n,r)=>_(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"resolvePredictions",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));X(this,"exportLeadsPerEntity",n=>_(this,null,function*(){const r="/leads/export?",i=Q($({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"getLeadStatistics",n=>_(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams($($({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"exportLeads",n=>_(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams($($({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"createStandingGame",n=>_(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateStandingGame",(n,r)=>_(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"resolveStandingPredictions",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));X(this,"moderateUserPosts",(n,r)=>_(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=Q($({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));X(this,"getUserBanStatus",n=>_(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"banUser",(n,r,i)=>_(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),s={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));X(this,"unbanUser",(n,r)=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));X(this,"updateUser",(n,r,i)=>_(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),s=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));X(this,"deleteUserProfile",n=>_(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"createDiscussion",n=>_(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"deleteDiscussion",n=>_(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"moderatePosts",(...o)=>_(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",s=yield this.getToken();let c={};if(r.length>0){const u=r.join(",");c=Q($({},this.mainQueryParams),{post_ids:u,reason:i})}else c=Q($({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(c),{headers:Q($({},this.headers),{Authorization:"Bearer "+s}),method:"POST"})}));X(this,"pinDiscussionPosts",(n,r)=>_(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q($({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));X(this,"unpinDiscussionPosts",(n,r)=>_(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q($({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));X(this,"getPostsByStaffMember",n=>_(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams($($({},this.mainQueryParams),n)),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"getReportedPosts",n=>_(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams($($({},this.mainQueryParams),n)),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"updateDiscussionsFeature",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));X(this,"updateProfilePreferences",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));X(this,"getClientBadges",()=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"updateClientBadges",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));X(this,"getEngagementThroughPredictionsReport",(n,r,i)=>_(this,null,function*(){const o="/predictions/football/engagements?",a=Q($({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+s})})}));X(this,"createPersonalityQuiz",n=>_(this,null,function*(){const r="/personality-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updatePersonalityQuiz",(n,r)=>_(this,null,function*(){const i=`/personality-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deletePersonalityQuiz",n=>_(this,null,function*(){const r=`/personality-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"generatePostMatchQuiz",n=>_(this,null,function*(){const r="/classic-quizzes/post-match?",i={client_id:this.clientId,sport_type:n.sportType,lang:n.lang,event_id:n.eventId},o=yield this.getToken();return yield fetch(this.aiServiceBaseUrl+r+new URLSearchParams(i),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"generatePostMatchPoll",n=>_(this,null,function*(){const r="/polls/post-match?",i={client_id:this.clientId,lang:n.lang,event_id:n.eventId};n.targetParticipant&&(i.target_participant=n.targetParticipant);const o=yield this.getToken();return yield fetch(this.aiServiceBaseUrl+r+new URLSearchParams(i),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));this.loyaltyBaseUrl=PS(n.environment),this.predictionBaseUrl=DS(n.environment),this.miniGamesApiBaseUrl=OS(n.environment),this.reportingApiBaseUrl=RS(n.environment),this.votingApiBaseUrl=MS(n.environment),this.profileApiBaseUrl=BS(n.environment),this.customResolverUrl=LS(n.environment),this.discussionsApiBaseUrl=$S(n.environment),this.aiServiceBaseUrl=FS(n.environment);const i="";this.apiSports=new _S(i)}}const zS=(e,t)=>!e&&!t?null:!e&&t?(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:e,authorization:"Bearer undefined"},aa=y.createContext(null),jS=({config:e,children:t})=>{const n={apiKey:e.apiKey,clientId:e.clientId,environment:e.environment,lang:e.language,errorHandlingMode:e.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=zS(e.sportal365Project,e.sportal365Infrastructure),i=Fe.FansUnitedSDK(n),o=new NS(n,r);return l.jsx(aa.Provider,{value:{sdk:i,https:o},children:t})},Yf=y.createContext(null),US=({children:e,environment:t})=>{const[n,r]=y.useState(null),[i,o]=y.useState(!0);return y.useEffect(()=>qi(t).onAuthStateChanged(s=>{Le.unstable_batchedUpdates(()=>{o(!1),r(s)})}),[t]),l.jsx(Yf.Provider,{value:n,children:!i&&e})};function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(null,arguments)}function Te(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var Kf={exports:{}},VS="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",HS=VS,WS=HS;function qf(){}function Qf(){}Qf.resetWarningCache=qf;var GS=function(){function e(r,i,o,a,s,c){if(c!==WS){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Qf,resetWarningCache:qf};return n.PropTypes=n,n};Kf.exports=GS();var YS=Kf.exports;function KS(e){return typeof e=="string"}function qS(e,t,n){return e===void 0||KS(e)?t:R({},t,{ownerState:R({},t.ownerState,n)})}function Jf(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Bn(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function QS(e,t,n){return typeof e=="function"?e(t,n):e}function JS(e){const{rootElementName:t="",componentName:n}=e,[r,i]=K.useState(t.toUpperCase()),o=K.useCallback(a=>{var s;i((s=a==null?void 0:a.tagName)!=null?s:"")},[]);return[r,o]}function XS(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function cn(...e){return K.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{XS(n,t)})},e)}function Xf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Xf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $n(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Xf(e))&&(r&&(r+=" "),r+=t);return r}function Zf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function ZS(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=$n(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),v=R({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),m=R({},n,i,r);return g.length>0&&(m.className=g),Object.keys(v).length>0&&(m.style=v),{props:m,internalRef:void 0}}const a=Bn(R({},i,r)),s=Zf(r),c=Zf(i),u=t(a),f=$n(u==null?void 0:u.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),d=R({},u==null?void 0:u.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=R({},u,n,c,s);return f.length>0&&(h.className=f),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:u.ref}}function nr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function eh(e){if(K.isValidElement(e)||!nr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=eh(e[n])}),t}function Fn(e,t,n={clone:!0}){const r=n.clone?R({},e):e;return nr(e)&&nr(t)&&Object.keys(t).forEach(i=>{K.isValidElement(t[i])?r[i]=t[i]:nr(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&nr(e[i])?r[i]=Fn(e[i],t[i],n):n.clone?r[i]=nr(t[i])?eh(t[i]):t[i]:r[i]=t[i]}),r}function sa(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var th={exports:{}},je={};/**
2325
+ */const AS="auth-compat";function TS(e){e.INTERNAL.registerComponent(new Yn(AS,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Nl(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:Lr.EMAIL_SIGNIN,PASSWORD_RESET:Lr.PASSWORD_RESET,RECOVER_EMAIL:Lr.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:Lr.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:Lr.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:Lr.VERIFY_EMAIL}},EmailAuthProvider:Zn,FacebookAuthProvider:vn,GithubAuthProvider:yn,GoogleAuthProvider:bn,OAuthProvider:Ur,SAMLAuthProvider:Wo,PhoneAuthProvider:zl,PhoneMultiFactorGenerator:Of,RecaptchaVerifier:IS,TwitterAuthProvider:xn,Auth:Nl,AuthCredential:zr,Error:Ft}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(oS,aS)}TS(Jn);let Gf=!1;const qi=e=>{if(Gf)return Jn.auth();if(e&&e==="dev"){Jn.initializeApp({apiKey:"api_key"});const n=$w();gl(n,"http://localhost:39199")}else{const n={apiKey:e&&e==="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-RH90B03KJG"};Jn.initializeApp(n)}return Gf=!0,Jn.auth()},ES=e=>e==="dev"?"http://localhost:8070/v1":e==="staging"?"https://client.fansunitedstagingapi.com/v1":e==="watg"?"https://client.watg.fansunitedapi.com/v1":e==="yolo"?"https://client.yolo.fansunitedapi.com/v1":e==="cska"?"https://client.cska.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class kS{constructor(t,n){X(this,"apiKey","");X(this,"clientId","");X(this,"environment","");X(this,"mainQueryParams",{key:"",client_id:""});X(this,"headers",{"Content-Type":"application/json"});X(this,"clientApiBaseUrl","");X(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");X(this,"sportal365Config",null);X(this,"generateSignedInUrl",t=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));X(this,"storeInBucket",(t,n,r)=>_(this,null,function*(){const i=yield fetch(t,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));X(this,"fetchImagesFromSportal365",(t,n,r)=>_(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:t,page:r.toString()};return n&&(n.from&&(o=Q($({},o),{from:n.from})),n.to&&(o=Q($({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));X(this,"getSchedulersByEntityId",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:t},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"setSchedulers",(t,n,r)=>_(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},s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+s}),body:JSON.stringify(t),method:o})}));X(this,"deleteScheduledTask",t=>_(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${t}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"getLoggedInStaffMember",()=>_(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)}));X(this,"constructAssetsUrl",t=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${t}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${t}`:`https://uploads.fansunitedassets.com/${this.clientId}/${t}`);X(this,"throwErrorFromXmlResponse",t=>{const n=new window.DOMParser().parseFromString(t,"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)});X(this,"getToken",()=>_(this,null,function*(){const t=qi(this.environment).currentUser;return t?yield t.getIdToken():""}));this.apiKey=t.apiKey,this.clientId=t.clientId,this.environment=t.environment,this.mainQueryParams={key:t.apiKey,client_id:t.clientId},this.sportal365Config=n,this.clientApiBaseUrl=ES(this.environment)}}class _S{constructor(t){X(this,"baseUrl","https://v1.formula-1.api-sports.io");X(this,"apiKey");X(this,"headers");this.apiKey=t,this.headers={"X-RapidAPI-Key":this.apiKey,"Content-Type":"application/json"}}getRaces(t,n){return _(this,null,function*(){const r={season:t.toString(),type:(n==null?void 0:n.type)||"Race"};n&&Object.entries(n).forEach(([o,a])=>{a!=null&&(r[o]=a.toString())});const i=`${this.baseUrl}/races?${new URLSearchParams(r)}`;return yield fetch(i,{method:"GET",headers:this.headers})})}makeRequest(t,n){return _(this,null,function*(){let r=`${this.baseUrl}${t}`;return n&&Object.keys(n).length>0&&(r+=`?${new URLSearchParams(n)}`),yield fetch(r,{method:"GET",headers:this.headers})})}}const PS=e=>e==="dev"?"http://localhost:8060/v1":e==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":e==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":e==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":e==="cska"?"https://loyalty.cska.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",DS=e=>e==="dev"?"http://localhost:8040/v1":e==="staging"?"https://prediction.fansunitedstagingapi.com/v1":e==="watg"?"https://prediction.watg.fansunitedapi.com/v1":e==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":e==="cska"?"https://prediction.cska.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",OS=e=>e==="dev"?"http://localhost:9040/v1":e==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":e==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":e==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":e==="cska"?"https://mini-games.cska.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",RS=e=>e==="dev"?"http://localhost:8020/v1":e==="staging"?"https://reporting.fansunitedstagingapi.com/v1":e==="watg"?"https://reporting.watg.fansunitedapi.com/v1":e==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":e==="cska"?"https://reporting.cska.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",MS=e=>e==="dev"?"http://localhost:9030/v1":e==="staging"?"https://voting.fansunitedstagingapi.com/v1":e==="watg"?"https://voting.watg.fansunitedapi.com/v1":e==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":e==="cska"?"https://voting.cska.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",LS=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":e==="cska"?"https://custom-games-resolver-414330847655.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",BS=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://profile.fansunitedstagingapi.com/v1":e==="watg"?"https://profile.watg.fansunitedapi.com/v1":e==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":e==="cska"?"https://profile.cska.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",$S=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://discussions.fansunitedstagingapi.com/v1":e==="watg"?"https://discussions.watg.fansunitedapi.com/v1":e==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":e==="cska"?"https://discussions.cska.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1",FS=e=>e==="dev"?"http://localhost:9050/v1":e==="staging"?"https://ai-content-builder-131809830171.europe-west1.run.app/v1":e==="yolo"||e==="cska"?"":"https://ai-content-builder-150199313674.europe-west1.run.app/v1";class NS extends kS{constructor(n,r){super(n,r);X(this,"loyaltyBaseUrl","");X(this,"predictionBaseUrl","");X(this,"miniGamesApiBaseUrl","");X(this,"reportingApiBaseUrl","");X(this,"votingApiBaseUrl","");X(this,"profileApiBaseUrl","");X(this,"customResolverUrl","");X(this,"discussionsApiBaseUrl","");X(this,"aiServiceBaseUrl","");X(this,"apiSports");X(this,"getClientById",()=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"createTemplate",n=>_(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"editTemplate",(n,r)=>_(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deleteTemplate",n=>_(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"setWinners",n=>_(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"exportDetailedLeaderboard",(n,r,i)=>_(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken(),s=$({},this.mainQueryParams);return r&&(s.group_id=r),yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(Q($({},s),{limit:i.toString()})),{headers:Q($({},this.headers),{Authorization:"Bearer "+a})})}));X(this,"exportDetailedGameLeaderboard",(n,r)=>_(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(Q($({},this.mainQueryParams),{limit:r.toString()})),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"createGame",n=>_(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"editGame",(n,r)=>_(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));X(this,"getEntityFeature",(n,r)=>_(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))}));X(this,"getClientFeatures",(n,r=1)=>_(this,null,function*(){const i=`/clients/${this.clientId}/features?`,o={key:this.apiKey};n&&(o.disable_cache=Date.now().toString());const a=Q($({},this.headers),{"x-api-version":r.toString()});return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:a})}));X(this,"updateEntityFeatures",(n,r)=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));X(this,"getClassicQuizFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));X(this,"getEitherOrFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));X(this,"getPollFeature",()=>_(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));X(this,"createClassicQuiz",n=>_(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateClassicQuiz",(n,r)=>_(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"getClassicQuizById",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"deleteClassicQuiz",n=>_(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"calculateQuestionsReport",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));X(this,"exportUsers",n=>_(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"getClassicQuizParticipations",(n,r,i,o)=>_(this,null,function*(){const a="/classic-quizzes/participations?",s=Q($({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),c=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(s),{headers:Q($({},this.headers),{Authorization:"Bearer "+c})})}));X(this,"getEntityParticipations",(n,r,i)=>_(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=Q($({},this.mainQueryParams),{from_date:r,to_date:i}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+s})})}));X(this,"createPoll",n=>_(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updatePoll",(n,r)=>_(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deletePoll",n=>_(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"getEitherOrById",(n,r)=>_(this,null,function*(){const i=`/either-or/${n}/staff?`,o=yield this.getToken();let a=null;return r&&(a=Q($({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"getEitherOrByIdReadOnlyClient",(n,r,i)=>_(this,null,function*(){const o="https://mini-games.fansunitedapi.com/v1",a=`/either-or/${n}/staff?`,s=yield this.getToken(),c={key:r,client_id:i};return yield fetch(o+a+new URLSearchParams(c),{headers:Q($({},this.headers),{Authorization:"Bearer "+s})})}));X(this,"createEitherOr",n=>_(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateEitherOr",(n,r)=>_(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deleteEitherOr",n=>_(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"getLists",(n,r,i="DESC")=>_(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 s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+s})})}));X(this,"getListById",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"getListContent",(n,r,i="DESC",o)=>_(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,s={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(s.page=o.toString());const c=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(s),{headers:Q($({},this.headers),{Authorization:"Bearer "+c})})}));X(this,"createList",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateList",(n,r)=>_(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:Q($({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deleteList",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));X(this,"getLanguageConfig",()=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"updateLanguageConfig",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));X(this,"createBracketGame",n=>_(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateBracketGame",(n,r)=>_(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"resolvePredictions",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));X(this,"exportLeadsPerEntity",n=>_(this,null,function*(){const r="/leads/export?",i=Q($({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"getLeadStatistics",n=>_(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams($($({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"exportLeads",n=>_(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams($($({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"createStandingGame",n=>_(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateStandingGame",(n,r)=>_(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"resolveStandingPredictions",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));X(this,"moderateUserPosts",(n,r)=>_(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=Q($({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));X(this,"getUserBanStatus",n=>_(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"banUser",(n,r,i)=>_(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),s={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));X(this,"unbanUser",(n,r)=>_(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:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));X(this,"updateUser",(n,r,i)=>_(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),s=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));X(this,"deleteUserProfile",n=>_(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"createDiscussion",n=>_(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"deleteDiscussion",n=>_(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"moderatePosts",(...o)=>_(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",s=yield this.getToken();let c={};if(r.length>0){const u=r.join(",");c=Q($({},this.mainQueryParams),{post_ids:u,reason:i})}else c=Q($({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(c),{headers:Q($({},this.headers),{Authorization:"Bearer "+s}),method:"POST"})}));X(this,"pinDiscussionPosts",(n,r)=>_(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q($({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));X(this,"unpinDiscussionPosts",(n,r)=>_(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q($({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));X(this,"getPostsByStaffMember",n=>_(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams($($({},this.mainQueryParams),n)),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"getReportedPosts",n=>_(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams($($({},this.mainQueryParams),n)),{headers:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"updateDiscussionsFeature",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));X(this,"updateProfilePreferences",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));X(this,"getClientBadges",()=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i})})}));X(this,"updateClientBadges",n=>_(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:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));X(this,"getEngagementThroughPredictionsReport",(n,r,i)=>_(this,null,function*(){const o="/predictions/football/engagements?",a=Q($({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q($({},this.headers),{Authorization:"Bearer "+s})})}));X(this,"createPersonalityQuiz",n=>_(this,null,function*(){const r="/personality-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updatePersonalityQuiz",(n,r)=>_(this,null,function*(){const i=`/personality-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"deletePersonalityQuiz",n=>_(this,null,function*(){const r=`/personality-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q($({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));X(this,"generatePostMatchQuiz",n=>_(this,null,function*(){const r="/classic-quizzes/post-match?",i={client_id:this.clientId,sport_type:n.sportType,lang:n.lang,event_id:n.eventId},o=yield this.getToken();return yield fetch(this.aiServiceBaseUrl+r+new URLSearchParams(i),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"generatePostMatchPoll",n=>_(this,null,function*(){const r="/polls/post-match?",i={client_id:this.clientId,lang:n.lang,event_id:n.eventId};n.targetParticipant&&(i.target_participant=n.targetParticipant);const o=yield this.getToken();return yield fetch(this.aiServiceBaseUrl+r+new URLSearchParams(i),{headers:Q($({},this.headers),{Authorization:"Bearer "+o})})}));this.loyaltyBaseUrl=PS(n.environment),this.predictionBaseUrl=DS(n.environment),this.miniGamesApiBaseUrl=OS(n.environment),this.reportingApiBaseUrl=RS(n.environment),this.votingApiBaseUrl=MS(n.environment),this.profileApiBaseUrl=BS(n.environment),this.customResolverUrl=LS(n.environment),this.discussionsApiBaseUrl=$S(n.environment),this.aiServiceBaseUrl=FS(n.environment);const i="";this.apiSports=new _S(i)}}const zS=(e,t)=>!e&&!t?null:!e&&t?(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:e,authorization:`Bearer ${t&&t==="betway"?"24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K":"dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}`},aa=y.createContext(null),jS=({config:e,children:t})=>{const n={apiKey:e.apiKey,clientId:e.clientId,environment:e.environment,lang:e.language,errorHandlingMode:e.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=zS(e.sportal365Project,e.sportal365Infrastructure),i=Fe.FansUnitedSDK(n),o=new NS(n,r);return l.jsx(aa.Provider,{value:{sdk:i,https:o},children:t})},Yf=y.createContext(null),US=({children:e,environment:t})=>{const[n,r]=y.useState(null),[i,o]=y.useState(!0);return y.useEffect(()=>qi(t).onAuthStateChanged(s=>{Le.unstable_batchedUpdates(()=>{o(!1),r(s)})}),[t]),l.jsx(Yf.Provider,{value:n,children:!i&&e})};function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(null,arguments)}function Te(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var Kf={exports:{}},VS="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",HS=VS,WS=HS;function qf(){}function Qf(){}Qf.resetWarningCache=qf;var GS=function(){function e(r,i,o,a,s,c){if(c!==WS){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Qf,resetWarningCache:qf};return n.PropTypes=n,n};Kf.exports=GS();var YS=Kf.exports;function KS(e){return typeof e=="string"}function qS(e,t,n){return e===void 0||KS(e)?t:R({},t,{ownerState:R({},t.ownerState,n)})}function Jf(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Bn(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function QS(e,t,n){return typeof e=="function"?e(t,n):e}function JS(e){const{rootElementName:t="",componentName:n}=e,[r,i]=K.useState(t.toUpperCase()),o=K.useCallback(a=>{var s;i((s=a==null?void 0:a.tagName)!=null?s:"")},[]);return[r,o]}function XS(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function cn(...e){return K.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{XS(n,t)})},e)}function Xf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Xf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $n(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Xf(e))&&(r&&(r+=" "),r+=t);return r}function Zf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function ZS(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const g=$n(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),v=R({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),m=R({},n,i,r);return g.length>0&&(m.className=g),Object.keys(v).length>0&&(m.style=v),{props:m,internalRef:void 0}}const a=Bn(R({},i,r)),s=Zf(r),c=Zf(i),u=t(a),f=$n(u==null?void 0:u.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),d=R({},u==null?void 0:u.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=R({},u,n,c,s);return f.length>0&&(h.className=f),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:u.ref}}function nr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function eh(e){if(K.isValidElement(e)||!nr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=eh(e[n])}),t}function Fn(e,t,n={clone:!0}){const r=n.clone?R({},e):e;return nr(e)&&nr(t)&&Object.keys(t).forEach(i=>{K.isValidElement(t[i])?r[i]=t[i]:nr(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&nr(e[i])?r[i]=Fn(e[i],t[i],n):n.clone?r[i]=nr(t[i])?eh(t[i]):t[i]:r[i]=t[i]}),r}function sa(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var th={exports:{}},je={};/**
2326
2326
  * @license React
2327
2327
  * react-is.production.js
2328
2328
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-management-components",
3
- "version": "1.57.0-RC1",
3
+ "version": "1.57.0-RC2",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.es.d.ts",