fansunited-widget-either-or 2.6.0 → 2.6.1
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/either-or-manager.es.js
CHANGED
|
@@ -56049,7 +56049,8 @@ class nme extends Kfe {
|
|
|
56049
56049
|
});
|
|
56050
56050
|
})), Me(this, "getEitherOrById", (n, i) => Y(this, null, function* () {
|
|
56051
56051
|
const a = `/either-or/${n}/staff?`, o = yield this.getToken();
|
|
56052
|
-
|
|
56052
|
+
let s = null;
|
|
56053
|
+
return i && (s = me(oe({}, this.mainQueryParams), { client_id: i })), yield fetch(this.miniGamesApiBaseUrl + a + new URLSearchParams(s || this.mainQueryParams), {
|
|
56053
56054
|
headers: me(oe({}, this.headers), { Authorization: "Bearer " + o })
|
|
56054
56055
|
});
|
|
56055
56056
|
})), Me(this, "createEitherOr", (n) => Y(this, null, function* () {
|
package/either-or-manager.umd.js
CHANGED
|
@@ -3472,7 +3472,7 @@ export default theme;`}function yw(t={},...e){const f=t,{breakpoints:r,mixins:n=
|
|
|
3472
3472
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3473
3473
|
* See the License for the specific language governing permissions and
|
|
3474
3474
|
* limitations under the License.
|
|
3475
|
-
*/const mfe=5*60,gfe=Ew("authIdTokenMaxAge")||mfe;let G$=null;const vfe=t=>e=>J(void 0,null,function*(){const r=e&&(yield e.getIdTokenResult()),n=r&&(new Date().getTime()-Date.parse(r.issuedAtTime))/1e3;if(n&&n>gfe)return;const i=r==null?void 0:r.token;G$!==i&&(G$=i,yield fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function yfe(t=IM()){const e=hm(t,"auth");if(e.isInitialized())return e.getImmediate();const r=Zhe(t,{popupRedirectResolver:dfe,persistence:[Ipe,dpe,R$]}),n=Ew("authTokenSyncURL");if(n&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(n,location.origin);if(location.origin===o.origin){const a=vfe(o.toString());lpe(r,a,()=>a(r.currentUser)),spe(r,s=>a(s))}}const i=Yae("auth");return i&&I$(r,`http://${i}`),r}function bfe(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}Khe({loadJS(t){return new Promise((e,r)=>{const n=document.createElement("script");n.setAttribute("src",t),n.onload=e,n.onerror=i=>{const o=yo("internal-error");o.customData=i,r(o)},n.type="text/javascript",n.charset="UTF-8",bfe().appendChild(n)})},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="}),ffe("Browser");let Y$=!1;const qd=t=>{if(Y$)return Na.auth();if(t&&t==="dev"){Na.initializeApp({apiKey:"api_key"});const e=yfe();I$(e,"http://localhost:39199")}else{const e={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"};Na.initializeApp(e)}return Y$=!0,Na.auth()},xfe=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 wfe{constructor(e,r){Re(this,"apiKey",""),Re(this,"clientId",""),Re(this,"environment",""),Re(this,"mainQueryParams",{key:"",client_id:""}),Re(this,"headers",{"Content-Type":"application/json"}),Re(this,"clientApiBaseUrl",""),Re(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?"),Re(this,"sportal365Config",null),Re(this,"generateSignedInUrl",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/generate-signed-url?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(n)})})),Re(this,"storeInBucket",(n,i,o)=>J(this,null,function*(){const a=yield fetch(n,{headers:o,method:"PUT",body:i});if(a.ok)return this.constructAssetsUrl(i.name);const s=yield a.text();this.throwErrorFromXmlResponse(s)})),Re(this,"fetchImagesFromSportal365",(n,i,o)=>J(this,null,function*(){if(this.sportal365Config){const a={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let s={query:n,page:o.toString()};return i&&(i.from&&(s=me(se({},s),{from:i.from})),i.to&&(s=me(se({},s),{to:i.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(s),{headers:a})}})),Re(this,"getSchedulersByEntityId",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/scheduler/tasks?`,o={key:this.apiKey,limit:"50",entity_id:n},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"setSchedulers",(n,i,o)=>J(this,null,function*(){let a="",s="";i==="CREATE"?(a=`/clients/${this.clientId}/scheduler/tasks?`,s="POST"):(a=`/clients/${this.clientId}/scheduler/tasks/${o}?`,s="PUT");const c={key:this.apiKey},u=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(c),{headers:me(se({},this.headers),{Authorization:"Bearer "+u}),body:JSON.stringify(n),method:s})})),Re(this,"deleteScheduledTask",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/scheduler/tasks/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"DELETE"})})),Re(this,"getLoggedInStaffMember",()=>J(this,null,function*(){const n=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(n).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)})),Re(this,"constructAssetsUrl",n=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${n}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${n}`:`https://uploads.fansunitedassets.com/${this.clientId}/${n}`),Re(this,"throwErrorFromXmlResponse",n=>{const i=new window.DOMParser().parseFromString(n,"text/xml"),o=i.getElementsByTagName("Message")&&i.getElementsByTagName("Code").length>0?i.getElementsByTagName("Message")[0].textContent:"",a=i.getElementsByTagName("Details")&&i.getElementsByTagName("Code").length>0?i.getElementsByTagName("Details")[0].textContent:"";throw new Error(o+" "+a)}),Re(this,"getToken",()=>J(this,null,function*(){const n=qd(this.environment).currentUser;return n?yield n.getIdToken():""})),this.apiKey=e.apiKey,this.clientId=e.clientId,this.environment=e.environment,this.mainQueryParams={key:e.apiKey,client_id:e.clientId},this.sportal365Config=r,this.clientApiBaseUrl=xfe(this.environment)}}const Cfe=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",Ife=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",Sfe=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",_fe=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",Tfe=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",kfe=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",Afe=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",Pfe=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 Efe extends wfe{constructor(e,r){super(e,r),Re(this,"loyaltyBaseUrl",""),Re(this,"predictionBaseUrl",""),Re(this,"miniGamesApiBaseUrl",""),Re(this,"reportingApiBaseUrl",""),Re(this,"votingApiBaseUrl",""),Re(this,"profileApiBaseUrl",""),Re(this,"customResolverUrl",""),Re(this,"discussionsApiBaseUrl",""),Re(this,"getClientById",()=>J(this,null,function*(){const n=`/clients/${this.clientId}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"createTemplate",n=>J(this,null,function*(){const i="/leaderboard/templates?",o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"editTemplate",(n,i)=>J(this,null,function*(){const o=`/leaderboard/templates/${n}?`,a=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"deleteTemplate",n=>J(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"setWinners",n=>J(this,null,function*(){const i="/winners?",o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"exportDetailedLeaderboard",(n,i)=>J(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(me(se({},this.mainQueryParams),{limit:i.toString()})),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"exportDetailedGameLeaderboard",(n,i)=>J(this,null,function*(){const o=`/leaderboard/games/${n}/detailed?`,a=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(me(se({},this.mainQueryParams),{limit:i.toString()})),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"createGame",n=>J(this,null,function*(){const i="/games?",o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"editGame",(n,i)=>J(this,null,function*(){const o=`/games/${n}?`,a=yield this.getToken();return yield fetch(this.predictionBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PATCH",body:JSON.stringify(i)})})),Re(this,"getEntityFeature",(n,i)=>J(this,null,function*(){const o=`/clients/${this.clientId}/features/${n}?`,a={key:this.apiKey};return i&&(a.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a))})),Re(this,"updateEntityFeatures",(n,i)=>J(this,null,function*(){const o=`/clients/${this.clientId}/features/${n}?`,a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams({key:this.apiKey}),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PATCH",body:JSON.stringify(i)})})),Re(this,"getClassicQuizFeature",()=>J(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,i={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i))})),Re(this,"getEitherOrFeature",()=>J(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,i={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i))})),Re(this,"getPollFeature",()=>J(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,i={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i))})),Re(this,"createClassicQuiz",n=>J(this,null,function*(){const i="/classic-quizzes?",o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateClassicQuiz",(n,i)=>J(this,null,function*(){const o=`/classic-quizzes/${n}?`,a=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"getClassicQuizById",n=>J(this,null,function*(){const i=`/classic-quizzes/${n}/staff?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"deleteClassicQuiz",n=>J(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"calculateQuestionsReport",n=>J(this,null,function*(){const i=`/classic-quizzes/${n}/questions-report?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})})),Re(this,"exportUsers",n=>J(this,null,function*(){const i="/exports/users?",o=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"getClassicQuizParticipations",(n,i,o,a)=>J(this,null,function*(){const s="/classic-quizzes/participations?",c=me(se({},this.mainQueryParams),{classic_quiz_ids:n,from_date:i,to_date:o,group_by:a}),u=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+s+new URLSearchParams(c),{headers:me(se({},this.headers),{Authorization:"Bearer "+u})})})),Re(this,"getEntityParticipations",(n,i,o)=>J(this,null,function*(){const a=`/participations/${n}/breakdown?`,s=me(se({},this.mainQueryParams),{from_date:i,to_date:o}),c=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+c})})})),Re(this,"createPoll",n=>J(this,null,function*(){const i="/polls?",o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updatePoll",(n,i)=>J(this,null,function*(){const o=`/polls/${n}?`,a=yield this.getToken();return yield fetch(this.votingApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"deletePoll",n=>J(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"getEitherOrById",(n,i)=>J(this,null,function*(){const o=`/either-or/${n}/staff?`,a=yield this.getToken();return i&&(this.mainQueryParams=me(se({},this.mainQueryParams),{client_id:i})),yield fetch(this.miniGamesApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"createEitherOr",n=>J(this,null,function*(){const i="/either-or?",o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateEitherOr",(n,i)=>J(this,null,function*(){const o=`/either-or/${n}?`,a=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"deleteEitherOr",n=>J(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"getLists",(n,i,o="DESC")=>J(this,null,function*(){const a=`/clients/${this.clientId}/lists?`,s={key:this.apiKey,limit:n.toString(),sort_order:o};i&&(s.start_after=i);const c=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+c})})})),Re(this,"getListById",n=>J(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:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"getListContent",(n,i,o="DESC",a)=>J(this,null,function*(){const s=`/clients/${this.clientId}/lists/${n}/content?`,c={key:this.apiKey,limit:i.toString(),sort_order:o};a&&(c.page=a.toString());const u=yield this.getToken();return yield fetch(this.clientApiBaseUrl+s+new URLSearchParams(c),{headers:me(se({},this.headers),{Authorization:"Bearer "+u})})})),Re(this,"createList",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/lists/?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateList",(n,i)=>J(this,null,function*(){const o=`/clients/${this.clientId}/lists/${n}?`,a={key:this.apiKey},s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:me(se({},this.headers),{Authorization:"Bearer "+s}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"deleteList",n=>J(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:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"DELETE"})})),Re(this,"getLanguageConfig",()=>J(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"updateLanguageConfig",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/config/language?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(n)})})),Re(this,"createBracketGame",n=>J(this,null,function*(){const i="/custom/bracket?",o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateBracketGame",(n,i)=>J(this,null,function*(){const o=`/custom/bracket/${n}?`,a=yield this.getToken();return yield fetch(this.predictionBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"resolvePredictions",n=>J(this,null,function*(){const i="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+i+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})})),Re(this,"exportLeadsPerEntity",n=>J(this,null,function*(){const i="/leads/export?",o=me(se({},this.mainQueryParams),{content_id:n}),a=yield this.getToken();return yield fetch(this.profileApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"getLeadStatistics",n=>J(this,null,function*(){const i="/leads/statistics?",o=yield this.getToken();let a=null;return n?a=new URLSearchParams(se(se({},this.mainQueryParams),n)):a=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+i+a,{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"exportLeads",n=>J(this,null,function*(){const i="/leads/export?",o=yield this.getToken();let a=null;return n?a=new URLSearchParams(se(se({},this.mainQueryParams),n)):a=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+i+a,{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"createStandingGame",n=>J(this,null,function*(){const i="/custom/standing?",o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateStandingGame",(n,i)=>J(this,null,function*(){const o=`/custom/standing/${n}?`,a=yield this.getToken();return yield fetch(this.predictionBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"resolveStandingPredictions",n=>J(this,null,function*(){const i="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+i+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})})),Re(this,"moderateUserPosts",(n,i)=>J(this,null,function*(){const o="/moderation/bulk?",a=yield this.getToken(),s=me(se({},this.mainQueryParams),{user_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"POST"})})),Re(this,"getUserBanStatus",n=>J(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"banUser",(n,i,o)=>J(this,null,function*(){const a=`/discussions/users/${n}/ban?`,s=yield this.getToken(),c={banned_period_in_days:i,banned_reason:o};return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+s}),method:"POST",body:JSON.stringify(c)})})),Re(this,"unbanUser",(n,i)=>J(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),s={unban_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"DELETE",body:JSON.stringify(s)})})),Re(this,"updateUser",(n,i,o)=>J(this,null,function*(){const a=`/profiles/${n}/verify?`,s=yield this.getToken(),c=i==="verify"?{verified:o}:{staff_member:o};return yield fetch(this.profileApiBaseUrl+a+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+s}),method:"POST",body:JSON.stringify(c)})})),Re(this,"deleteUserProfile",n=>J(this,null,function*(){const i=`/profiles/${n}?`,o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"createDiscussion",n=>J(this,null,function*(){const i="/discussions?",o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"deleteDiscussion",n=>J(this,null,function*(){const i=`/discussions/${n}?`,o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"moderatePosts",(...n)=>J(this,[...n],function*(i="",o=[],a){const s="/moderation/bulk?",c=yield this.getToken();let u={};if(o.length>0){const d=o.join(",");u=me(se({},this.mainQueryParams),{post_ids:d,reason:a})}else u=me(se({},this.mainQueryParams),{discussion_id:i,reason:a});return yield fetch(this.discussionsApiBaseUrl+s+new URLSearchParams(u),{headers:me(se({},this.headers),{Authorization:"Bearer "+c}),method:"POST"})})),Re(this,"pinDiscussionPosts",(n,i)=>J(this,null,function*(){const o=`/discussions/${n}/pins?`,a=yield this.getToken(),s=me(se({},this.mainQueryParams),{pin_post_ids:i.join(",")});return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PATCH"})})),Re(this,"unpinDiscussionPosts",(n,i)=>J(this,null,function*(){const o=`/discussions/${n}/pins?`,a=yield this.getToken(),s=me(se({},this.mainQueryParams),{pin_post_ids:i.join(",")});return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"DELETE"})})),Re(this,"getPostsByStaffMember",n=>J(this,null,function*(){const i="/posts/staff?",o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(se(se({},this.mainQueryParams),n)),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"getReportedPosts",n=>J(this,null,function*(){const i="/posts/staff/reported?",o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(se(se({},this.mainQueryParams),n)),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"updateDiscussionsFeature",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/features/discussions?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(n)})})),Re(this,"updateProfilePreferences",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/features/profile_preferences?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(n)})})),this.loyaltyBaseUrl=Cfe(e.environment),this.predictionBaseUrl=Ife(e.environment),this.miniGamesApiBaseUrl=Sfe(e.environment),this.reportingApiBaseUrl=_fe(e.environment),this.votingApiBaseUrl=Tfe(e.environment),this.profileApiBaseUrl=Afe(e.environment),this.customResolverUrl=kfe(e.environment),this.discussionsApiBaseUrl=Pfe(e.environment)}}const Ofe=(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"}`},Ym=W.createContext(null),Rfe=({config:t,children:e})=>{const r={apiKey:t.apiKey,clientId:t.clientId,environment:t.environment,lang:t.language,errorHandlingMode:t.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},n=Ofe(t.sportal365Project,t.sportal365Infrastructure),i=gk(r),o=new Efe(r,n);return A.jsx(Ym.Provider,{value:{sdk:i,https:o},children:e})},K$=W.createContext(null),Mfe=({children:t,environment:e})=>{const[r,n]=W.useState(null),[i,o]=W.useState(!0);return W.useEffect(()=>qd(e).onAuthStateChanged(a=>{jt.unstable_batchedUpdates(()=>{o(!1),n(a)})}),[e]),A.jsx(K$.Provider,{value:r,children:!i&&t})};function re(){return re=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},re.apply(null,arguments)}function At(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}var J$={exports:{}},Dfe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",$fe=Dfe,Lfe=$fe;function Q$(){}function X$(){}X$.resetWarningCache=Q$;var Ffe=function(){function t(n,i,o,a,s,c){if(c!==Lfe){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}}t.isRequired=t;function e(){return t}var r={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:X$,resetWarningCache:Q$};return r.PropTypes=r,r};J$.exports=Ffe();var Nfe=J$.exports;function jfe(t){return typeof t=="string"}function Bfe(t,e,r){return t===void 0||jfe(t)?e:re({},e,{ownerState:re({},e.ownerState,r)})}function Z$(t,e,r=(n,i)=>n===i){return t.length===e.length&&t.every((n,i)=>r(n,e[i]))}function Qo(t,e=[]){if(t===void 0)return{};const r={};return Object.keys(t).filter(n=>n.match(/^on[A-Z]/)&&typeof t[n]=="function"&&!e.includes(n)).forEach(n=>{r[n]=t[n]}),r}function zfe(t,e,r){return typeof t=="function"?t(e,r):t}function Ufe(t){const{rootElementName:e=""}=t,[r,n]=R.useState(e.toUpperCase()),i=R.useCallback(o=>{var a;n((a=o==null?void 0:o.tagName)!=null?a:"")},[]);return[r,i]}function Hfe(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Vi(...t){return R.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(r=>{Hfe(r,e)})},t)}function eL(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=eL(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Xo(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=eL(t))&&(n&&(n+=" "),n+=e);return n}function tL(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(r=>!(r.match(/^on[A-Z]/)&&typeof t[r]=="function")).forEach(r=>{e[r]=t[r]}),e}function Vfe(t){const{getSlotProps:e,additionalProps:r,externalSlotProps:n,externalForwardedProps:i,className:o}=t;if(!e){const f=Xo(r==null?void 0:r.className,o,i==null?void 0:i.className,n==null?void 0:n.className),g=re({},r==null?void 0:r.style,i==null?void 0:i.style,n==null?void 0:n.style),m=re({},r,i,n);return f.length>0&&(m.className=f),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:void 0}}const a=Qo(re({},i,n)),s=tL(n),c=tL(i),u=e(a),d=Xo(u==null?void 0:u.className,r==null?void 0:r.className,o,i==null?void 0:i.className,n==null?void 0:n.className),h=re({},u==null?void 0:u.style,r==null?void 0:r.style,i==null?void 0:i.style,n==null?void 0:n.style),p=re({},u,r,c,s);return d.length>0&&(p.className=d),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:u.ref}}function Ga(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 rL(t){if(R.isValidElement(t)||!Ga(t))return t;const e={};return Object.keys(t).forEach(r=>{e[r]=rL(t[r])}),e}function Zo(t,e,r={clone:!0}){const n=r.clone?re({},t):t;return Ga(t)&&Ga(e)&&Object.keys(e).forEach(i=>{R.isValidElement(e[i])?n[i]=e[i]:Ga(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&Ga(t[i])?n[i]=Zo(t[i],e[i],r):r.clone?n[i]=Ga(e[i])?rL(e[i]):e[i]:n[i]=e[i]}),n}function Km(t){let e="https://mui.com/production-error/?code="+t;for(let r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var nL={exports:{}},nr={};/**
|
|
3475
|
+
*/const mfe=5*60,gfe=Ew("authIdTokenMaxAge")||mfe;let G$=null;const vfe=t=>e=>J(void 0,null,function*(){const r=e&&(yield e.getIdTokenResult()),n=r&&(new Date().getTime()-Date.parse(r.issuedAtTime))/1e3;if(n&&n>gfe)return;const i=r==null?void 0:r.token;G$!==i&&(G$=i,yield fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function yfe(t=IM()){const e=hm(t,"auth");if(e.isInitialized())return e.getImmediate();const r=Zhe(t,{popupRedirectResolver:dfe,persistence:[Ipe,dpe,R$]}),n=Ew("authTokenSyncURL");if(n&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(n,location.origin);if(location.origin===o.origin){const a=vfe(o.toString());lpe(r,a,()=>a(r.currentUser)),spe(r,s=>a(s))}}const i=Yae("auth");return i&&I$(r,`http://${i}`),r}function bfe(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}Khe({loadJS(t){return new Promise((e,r)=>{const n=document.createElement("script");n.setAttribute("src",t),n.onload=e,n.onerror=i=>{const o=yo("internal-error");o.customData=i,r(o)},n.type="text/javascript",n.charset="UTF-8",bfe().appendChild(n)})},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="}),ffe("Browser");let Y$=!1;const qd=t=>{if(Y$)return Na.auth();if(t&&t==="dev"){Na.initializeApp({apiKey:"api_key"});const e=yfe();I$(e,"http://localhost:39199")}else{const e={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"};Na.initializeApp(e)}return Y$=!0,Na.auth()},xfe=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 wfe{constructor(e,r){Re(this,"apiKey",""),Re(this,"clientId",""),Re(this,"environment",""),Re(this,"mainQueryParams",{key:"",client_id:""}),Re(this,"headers",{"Content-Type":"application/json"}),Re(this,"clientApiBaseUrl",""),Re(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?"),Re(this,"sportal365Config",null),Re(this,"generateSignedInUrl",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/generate-signed-url?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(n)})})),Re(this,"storeInBucket",(n,i,o)=>J(this,null,function*(){const a=yield fetch(n,{headers:o,method:"PUT",body:i});if(a.ok)return this.constructAssetsUrl(i.name);const s=yield a.text();this.throwErrorFromXmlResponse(s)})),Re(this,"fetchImagesFromSportal365",(n,i,o)=>J(this,null,function*(){if(this.sportal365Config){const a={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let s={query:n,page:o.toString()};return i&&(i.from&&(s=me(se({},s),{from:i.from})),i.to&&(s=me(se({},s),{to:i.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(s),{headers:a})}})),Re(this,"getSchedulersByEntityId",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/scheduler/tasks?`,o={key:this.apiKey,limit:"50",entity_id:n},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"setSchedulers",(n,i,o)=>J(this,null,function*(){let a="",s="";i==="CREATE"?(a=`/clients/${this.clientId}/scheduler/tasks?`,s="POST"):(a=`/clients/${this.clientId}/scheduler/tasks/${o}?`,s="PUT");const c={key:this.apiKey},u=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(c),{headers:me(se({},this.headers),{Authorization:"Bearer "+u}),body:JSON.stringify(n),method:s})})),Re(this,"deleteScheduledTask",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/scheduler/tasks/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"DELETE"})})),Re(this,"getLoggedInStaffMember",()=>J(this,null,function*(){const n=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(n).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)})),Re(this,"constructAssetsUrl",n=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${n}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${n}`:`https://uploads.fansunitedassets.com/${this.clientId}/${n}`),Re(this,"throwErrorFromXmlResponse",n=>{const i=new window.DOMParser().parseFromString(n,"text/xml"),o=i.getElementsByTagName("Message")&&i.getElementsByTagName("Code").length>0?i.getElementsByTagName("Message")[0].textContent:"",a=i.getElementsByTagName("Details")&&i.getElementsByTagName("Code").length>0?i.getElementsByTagName("Details")[0].textContent:"";throw new Error(o+" "+a)}),Re(this,"getToken",()=>J(this,null,function*(){const n=qd(this.environment).currentUser;return n?yield n.getIdToken():""})),this.apiKey=e.apiKey,this.clientId=e.clientId,this.environment=e.environment,this.mainQueryParams={key:e.apiKey,client_id:e.clientId},this.sportal365Config=r,this.clientApiBaseUrl=xfe(this.environment)}}const Cfe=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",Ife=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",Sfe=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",_fe=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",Tfe=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",kfe=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",Afe=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",Pfe=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 Efe extends wfe{constructor(e,r){super(e,r),Re(this,"loyaltyBaseUrl",""),Re(this,"predictionBaseUrl",""),Re(this,"miniGamesApiBaseUrl",""),Re(this,"reportingApiBaseUrl",""),Re(this,"votingApiBaseUrl",""),Re(this,"profileApiBaseUrl",""),Re(this,"customResolverUrl",""),Re(this,"discussionsApiBaseUrl",""),Re(this,"getClientById",()=>J(this,null,function*(){const n=`/clients/${this.clientId}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"createTemplate",n=>J(this,null,function*(){const i="/leaderboard/templates?",o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"editTemplate",(n,i)=>J(this,null,function*(){const o=`/leaderboard/templates/${n}?`,a=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"deleteTemplate",n=>J(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"setWinners",n=>J(this,null,function*(){const i="/winners?",o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"exportDetailedLeaderboard",(n,i)=>J(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(me(se({},this.mainQueryParams),{limit:i.toString()})),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"exportDetailedGameLeaderboard",(n,i)=>J(this,null,function*(){const o=`/leaderboard/games/${n}/detailed?`,a=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(me(se({},this.mainQueryParams),{limit:i.toString()})),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"createGame",n=>J(this,null,function*(){const i="/games?",o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"editGame",(n,i)=>J(this,null,function*(){const o=`/games/${n}?`,a=yield this.getToken();return yield fetch(this.predictionBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PATCH",body:JSON.stringify(i)})})),Re(this,"getEntityFeature",(n,i)=>J(this,null,function*(){const o=`/clients/${this.clientId}/features/${n}?`,a={key:this.apiKey};return i&&(a.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a))})),Re(this,"updateEntityFeatures",(n,i)=>J(this,null,function*(){const o=`/clients/${this.clientId}/features/${n}?`,a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams({key:this.apiKey}),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PATCH",body:JSON.stringify(i)})})),Re(this,"getClassicQuizFeature",()=>J(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,i={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i))})),Re(this,"getEitherOrFeature",()=>J(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,i={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i))})),Re(this,"getPollFeature",()=>J(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,i={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i))})),Re(this,"createClassicQuiz",n=>J(this,null,function*(){const i="/classic-quizzes?",o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateClassicQuiz",(n,i)=>J(this,null,function*(){const o=`/classic-quizzes/${n}?`,a=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"getClassicQuizById",n=>J(this,null,function*(){const i=`/classic-quizzes/${n}/staff?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"deleteClassicQuiz",n=>J(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"calculateQuestionsReport",n=>J(this,null,function*(){const i=`/classic-quizzes/${n}/questions-report?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})})),Re(this,"exportUsers",n=>J(this,null,function*(){const i="/exports/users?",o=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"getClassicQuizParticipations",(n,i,o,a)=>J(this,null,function*(){const s="/classic-quizzes/participations?",c=me(se({},this.mainQueryParams),{classic_quiz_ids:n,from_date:i,to_date:o,group_by:a}),u=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+s+new URLSearchParams(c),{headers:me(se({},this.headers),{Authorization:"Bearer "+u})})})),Re(this,"getEntityParticipations",(n,i,o)=>J(this,null,function*(){const a=`/participations/${n}/breakdown?`,s=me(se({},this.mainQueryParams),{from_date:i,to_date:o}),c=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+c})})})),Re(this,"createPoll",n=>J(this,null,function*(){const i="/polls?",o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updatePoll",(n,i)=>J(this,null,function*(){const o=`/polls/${n}?`,a=yield this.getToken();return yield fetch(this.votingApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"deletePoll",n=>J(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"getEitherOrById",(n,i)=>J(this,null,function*(){const o=`/either-or/${n}/staff?`,a=yield this.getToken();let s=null;return i&&(s=me(se({},this.mainQueryParams),{client_id:i})),yield fetch(this.miniGamesApiBaseUrl+o+new URLSearchParams(s||this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"createEitherOr",n=>J(this,null,function*(){const i="/either-or?",o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateEitherOr",(n,i)=>J(this,null,function*(){const o=`/either-or/${n}?`,a=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"deleteEitherOr",n=>J(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"getLists",(n,i,o="DESC")=>J(this,null,function*(){const a=`/clients/${this.clientId}/lists?`,s={key:this.apiKey,limit:n.toString(),sort_order:o};i&&(s.start_after=i);const c=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+c})})})),Re(this,"getListById",n=>J(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:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"getListContent",(n,i,o="DESC",a)=>J(this,null,function*(){const s=`/clients/${this.clientId}/lists/${n}/content?`,c={key:this.apiKey,limit:i.toString(),sort_order:o};a&&(c.page=a.toString());const u=yield this.getToken();return yield fetch(this.clientApiBaseUrl+s+new URLSearchParams(c),{headers:me(se({},this.headers),{Authorization:"Bearer "+u})})})),Re(this,"createList",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/lists/?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateList",(n,i)=>J(this,null,function*(){const o=`/clients/${this.clientId}/lists/${n}?`,a={key:this.apiKey},s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:me(se({},this.headers),{Authorization:"Bearer "+s}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"deleteList",n=>J(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:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"DELETE"})})),Re(this,"getLanguageConfig",()=>J(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(i),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"updateLanguageConfig",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/config/language?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(n)})})),Re(this,"createBracketGame",n=>J(this,null,function*(){const i="/custom/bracket?",o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateBracketGame",(n,i)=>J(this,null,function*(){const o=`/custom/bracket/${n}?`,a=yield this.getToken();return yield fetch(this.predictionBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"resolvePredictions",n=>J(this,null,function*(){const i="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+i+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})})),Re(this,"exportLeadsPerEntity",n=>J(this,null,function*(){const i="/leads/export?",o=me(se({},this.mainQueryParams),{content_id:n}),a=yield this.getToken();return yield fetch(this.profileApiBaseUrl+i+new URLSearchParams(o),{headers:me(se({},this.headers),{Authorization:"Bearer "+a})})})),Re(this,"getLeadStatistics",n=>J(this,null,function*(){const i="/leads/statistics?",o=yield this.getToken();let a=null;return n?a=new URLSearchParams(se(se({},this.mainQueryParams),n)):a=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+i+a,{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"exportLeads",n=>J(this,null,function*(){const i="/leads/export?",o=yield this.getToken();let a=null;return n?a=new URLSearchParams(se(se({},this.mainQueryParams),n)):a=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+i+a,{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"createStandingGame",n=>J(this,null,function*(){const i="/custom/standing?",o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"updateStandingGame",(n,i)=>J(this,null,function*(){const o=`/custom/standing/${n}?`,a=yield this.getToken();return yield fetch(this.predictionBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(i)})})),Re(this,"resolveStandingPredictions",n=>J(this,null,function*(){const i="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+i+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})})),Re(this,"moderateUserPosts",(n,i)=>J(this,null,function*(){const o="/moderation/bulk?",a=yield this.getToken(),s=me(se({},this.mainQueryParams),{user_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"POST"})})),Re(this,"getUserBanStatus",n=>J(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"banUser",(n,i,o)=>J(this,null,function*(){const a=`/discussions/users/${n}/ban?`,s=yield this.getToken(),c={banned_period_in_days:i,banned_reason:o};return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+s}),method:"POST",body:JSON.stringify(c)})})),Re(this,"unbanUser",(n,i)=>J(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),s={unban_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"DELETE",body:JSON.stringify(s)})})),Re(this,"updateUser",(n,i,o)=>J(this,null,function*(){const a=`/profiles/${n}/verify?`,s=yield this.getToken(),c=i==="verify"?{verified:o}:{staff_member:o};return yield fetch(this.profileApiBaseUrl+a+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+s}),method:"POST",body:JSON.stringify(c)})})),Re(this,"deleteUserProfile",n=>J(this,null,function*(){const i=`/profiles/${n}?`,o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"createDiscussion",n=>J(this,null,function*(){const i="/discussions?",o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})})),Re(this,"deleteDiscussion",n=>J(this,null,function*(){const i=`/discussions/${n}?`,o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})})),Re(this,"moderatePosts",(...n)=>J(this,[...n],function*(i="",o=[],a){const s="/moderation/bulk?",c=yield this.getToken();let u={};if(o.length>0){const d=o.join(",");u=me(se({},this.mainQueryParams),{post_ids:d,reason:a})}else u=me(se({},this.mainQueryParams),{discussion_id:i,reason:a});return yield fetch(this.discussionsApiBaseUrl+s+new URLSearchParams(u),{headers:me(se({},this.headers),{Authorization:"Bearer "+c}),method:"POST"})})),Re(this,"pinDiscussionPosts",(n,i)=>J(this,null,function*(){const o=`/discussions/${n}/pins?`,a=yield this.getToken(),s=me(se({},this.mainQueryParams),{pin_post_ids:i.join(",")});return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"PATCH"})})),Re(this,"unpinDiscussionPosts",(n,i)=>J(this,null,function*(){const o=`/discussions/${n}/pins?`,a=yield this.getToken(),s=me(se({},this.mainQueryParams),{pin_post_ids:i.join(",")});return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(s),{headers:me(se({},this.headers),{Authorization:"Bearer "+a}),method:"DELETE"})})),Re(this,"getPostsByStaffMember",n=>J(this,null,function*(){const i="/posts/staff?",o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(se(se({},this.mainQueryParams),n)),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"getReportedPosts",n=>J(this,null,function*(){const i="/posts/staff/reported?",o=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(se(se({},this.mainQueryParams),n)),{headers:me(se({},this.headers),{Authorization:"Bearer "+o})})})),Re(this,"updateDiscussionsFeature",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/features/discussions?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(n)})})),Re(this,"updateProfilePreferences",n=>J(this,null,function*(){const i=`/clients/${this.clientId}/features/profile_preferences?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:me(se({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(n)})})),this.loyaltyBaseUrl=Cfe(e.environment),this.predictionBaseUrl=Ife(e.environment),this.miniGamesApiBaseUrl=Sfe(e.environment),this.reportingApiBaseUrl=_fe(e.environment),this.votingApiBaseUrl=Tfe(e.environment),this.profileApiBaseUrl=Afe(e.environment),this.customResolverUrl=kfe(e.environment),this.discussionsApiBaseUrl=Pfe(e.environment)}}const Ofe=(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"}`},Ym=W.createContext(null),Rfe=({config:t,children:e})=>{const r={apiKey:t.apiKey,clientId:t.clientId,environment:t.environment,lang:t.language,errorHandlingMode:t.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},n=Ofe(t.sportal365Project,t.sportal365Infrastructure),i=gk(r),o=new Efe(r,n);return A.jsx(Ym.Provider,{value:{sdk:i,https:o},children:e})},K$=W.createContext(null),Mfe=({children:t,environment:e})=>{const[r,n]=W.useState(null),[i,o]=W.useState(!0);return W.useEffect(()=>qd(e).onAuthStateChanged(a=>{jt.unstable_batchedUpdates(()=>{o(!1),n(a)})}),[e]),A.jsx(K$.Provider,{value:r,children:!i&&t})};function re(){return re=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},re.apply(null,arguments)}function At(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}var J$={exports:{}},Dfe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",$fe=Dfe,Lfe=$fe;function Q$(){}function X$(){}X$.resetWarningCache=Q$;var Ffe=function(){function t(n,i,o,a,s,c){if(c!==Lfe){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}}t.isRequired=t;function e(){return t}var r={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:X$,resetWarningCache:Q$};return r.PropTypes=r,r};J$.exports=Ffe();var Nfe=J$.exports;function jfe(t){return typeof t=="string"}function Bfe(t,e,r){return t===void 0||jfe(t)?e:re({},e,{ownerState:re({},e.ownerState,r)})}function Z$(t,e,r=(n,i)=>n===i){return t.length===e.length&&t.every((n,i)=>r(n,e[i]))}function Qo(t,e=[]){if(t===void 0)return{};const r={};return Object.keys(t).filter(n=>n.match(/^on[A-Z]/)&&typeof t[n]=="function"&&!e.includes(n)).forEach(n=>{r[n]=t[n]}),r}function zfe(t,e,r){return typeof t=="function"?t(e,r):t}function Ufe(t){const{rootElementName:e=""}=t,[r,n]=R.useState(e.toUpperCase()),i=R.useCallback(o=>{var a;n((a=o==null?void 0:o.tagName)!=null?a:"")},[]);return[r,i]}function Hfe(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Vi(...t){return R.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(r=>{Hfe(r,e)})},t)}function eL(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=eL(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Xo(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=eL(t))&&(n&&(n+=" "),n+=e);return n}function tL(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(r=>!(r.match(/^on[A-Z]/)&&typeof t[r]=="function")).forEach(r=>{e[r]=t[r]}),e}function Vfe(t){const{getSlotProps:e,additionalProps:r,externalSlotProps:n,externalForwardedProps:i,className:o}=t;if(!e){const f=Xo(r==null?void 0:r.className,o,i==null?void 0:i.className,n==null?void 0:n.className),g=re({},r==null?void 0:r.style,i==null?void 0:i.style,n==null?void 0:n.style),m=re({},r,i,n);return f.length>0&&(m.className=f),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:void 0}}const a=Qo(re({},i,n)),s=tL(n),c=tL(i),u=e(a),d=Xo(u==null?void 0:u.className,r==null?void 0:r.className,o,i==null?void 0:i.className,n==null?void 0:n.className),h=re({},u==null?void 0:u.style,r==null?void 0:r.style,i==null?void 0:i.style,n==null?void 0:n.style),p=re({},u,r,c,s);return d.length>0&&(p.className=d),Object.keys(h).length>0&&(p.style=h),{props:p,internalRef:u.ref}}function Ga(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 rL(t){if(R.isValidElement(t)||!Ga(t))return t;const e={};return Object.keys(t).forEach(r=>{e[r]=rL(t[r])}),e}function Zo(t,e,r={clone:!0}){const n=r.clone?re({},t):t;return Ga(t)&&Ga(e)&&Object.keys(e).forEach(i=>{R.isValidElement(e[i])?n[i]=e[i]:Ga(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&Ga(t[i])?n[i]=Zo(t[i],e[i],r):r.clone?n[i]=Ga(e[i])?rL(e[i]):e[i]:n[i]=e[i]}),n}function Km(t){let e="https://mui.com/production-error/?code="+t;for(let r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var nL={exports:{}},nr={};/**
|
|
3476
3476
|
* @license React
|
|
3477
3477
|
* react-is.production.js
|
|
3478
3478
|
*
|