fansunited-management-components 1.57.1-RC1 → 1.58.0-RC1

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.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(y,Fe){typeof exports=="object"&&typeof module!="undefined"?module.exports=Fe(require("react"),require("fansunited-sdk-esm"),require("react-dom"),require("@emotion/styled"),require("@emotion/react"),require("react-quill"),require("@mui/joy"),require("@mui/icons-material")):typeof define=="function"&&define.amd?define(["react","fansunited-sdk-esm","react-dom","@emotion/styled","@emotion/react","react-quill","@mui/joy","@mui/icons-material"],Fe):(y=typeof globalThis!="undefined"?globalThis:y||self,y.FansUnitedComponents=Fe(y.React,y.FansUnitedSDK,y.ReactDOM,y.EmotionStyled,y.EmotionReact,y.ReactQuill,y.MaterialUIJoy,y.MaterialUIIcons))})(this,function(y,Fe,Le,Bt,ge,Ai,p,Oe){"use strict";var sz=Object.defineProperty,lz=Object.defineProperties;var cz=Object.getOwnPropertyDescriptors;var Vs=Object.getOwnPropertySymbols,uz=Object.getPrototypeOf,_b=Object.prototype.hasOwnProperty,Pb=Object.prototype.propertyIsEnumerable,dz=Reflect.get;var Ii=Math.pow,Uu=(y,Fe,Le)=>Fe in y?sz(y,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Le}):y[Fe]=Le,$=(y,Fe)=>{for(var Le in Fe||(Fe={}))_b.call(Fe,Le)&&Uu(y,Le,Fe[Le]);if(Vs)for(var Le of Vs(Fe))Pb.call(Fe,Le)&&Uu(y,Le,Fe[Le]);return y},Q=(y,Fe)=>lz(y,cz(Fe));var Hs=y=>typeof y=="symbol"?y:y+"",qe=(y,Fe)=>{var Le={};for(var Bt in y)_b.call(y,Bt)&&Fe.indexOf(Bt)<0&&(Le[Bt]=y[Bt]);if(y!=null&&Vs)for(var Bt of Vs(y))Fe.indexOf(Bt)<0&&Pb.call(y,Bt)&&(Le[Bt]=y[Bt]);return Le};var X=(y,Fe,Le)=>Uu(y,typeof Fe!="symbol"?Fe+"":Fe,Le);var Pr=(y,Fe,Le)=>dz(uz(y),Le,Fe);var _=(y,Fe,Le)=>new Promise((Bt,ge)=>{var Ai=Tn=>{try{Oe(Le.next(Tn))}catch(K){ge(K)}},p=Tn=>{try{Oe(Le.throw(Tn))}catch(K){ge(K)}},Oe=Tn=>Tn.done?Bt(Tn.value):Promise.resolve(Tn.value).then(Ai,p);Oe((Le=Le.apply(y,Fe)).next())});function Tn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const K=Tn(y),Ie={ar:{key:"ar",name:"Arabic"},bg:{key:"bg",name:"Bulgarian"},da:{key:"da",name:"Danish"},de:{key:"de",name:"German"},en:{key:"en",name:"English"},el:{key:"el",name:"Greek"},es:{key:"es",name:"Spanish"},fr:{key:"fr",name:"French"},hi:{key:"hi",name:"Hindi"},hu:{key:"hu",name:"Hungarian"},it:{key:"it",name:"Italian"},nl:{key:"nl",name:"Dutch"},pt:{key:"pt",name:"Portuguese"},"pt-br":{key:"pt-br",name:"Brazilian(Portuguese)"},ro:{key:"ro",name:"Romanian"},sk:{key:"sk",name:"Slovak"},sr:{key:"sr",name:"Serbian"},sv:{key:"sv",name:"Swedish"},sw:{key:"sw",name:"Swahili"}},Ti={ar:Ie.ar,"ar-dz":Ie.ar,"ar-bh":Ie.ar,"ar-eg":Ie.ar,"ar-iq":Ie.ar,"ar-jo":Ie.ar,"ar-kw":Ie.ar,"ar-lb":Ie.ar,"ar-ly":Ie.ar,"ar-ma":Ie.ar,"ar-om":Ie.ar,"ar-qa":Ie.ar,"ar-sa":Ie.ar,"ar-sy":Ie.ar,"ar-tn":Ie.ar,"ar-ae":Ie.ar,"ar-ye":Ie.ar,bg:Ie.bg,da:Ie.da,de:Ie.de,en:Ie.en,"en-gb":Ie.en,"en-us":Ie.en,el:Ie.el,es:Ie.es,fr:Ie.fr,hi:Ie.hi,hu:Ie.hu,it:Ie.it,nl:Ie.nl,pt:Ie.pt,"pt-br":Ie["pt-br"],ro:Ie.ro,sk:Ie.sk,sr:Ie.sr,sv:Ie.sv,sw:Ie.sw},Gn={ar:"sa",bg:"bg",da:"dk",de:"de",en:"gb",el:"gr",es:"es",fr:"fr",hi:"in",hu:"hu",it:"it",nl:"nl",pt:"pt","pt-br":"br",ro:"ro",sk:"sk",sr:"rs",sv:"se",sw:"ke"};var $t=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vu(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Hu={exports:{}},Ro={};/**
1
+ (function(y,Fe){typeof exports=="object"&&typeof module!="undefined"?module.exports=Fe(require("react"),require("fansunited-sdk-esm"),require("react-dom"),require("@emotion/styled"),require("@emotion/react"),require("react-quill"),require("@mui/joy"),require("@mui/icons-material")):typeof define=="function"&&define.amd?define(["react","fansunited-sdk-esm","react-dom","@emotion/styled","@emotion/react","react-quill","@mui/joy","@mui/icons-material"],Fe):(y=typeof globalThis!="undefined"?globalThis:y||self,y.FansUnitedComponents=Fe(y.React,y.FansUnitedSDK,y.ReactDOM,y.EmotionStyled,y.EmotionReact,y.ReactQuill,y.MaterialUIJoy,y.MaterialUIIcons))})(this,function(y,Fe,Le,Bt,ge,Ai,p,Oe){"use strict";var sz=Object.defineProperty,lz=Object.defineProperties;var cz=Object.getOwnPropertyDescriptors;var Vs=Object.getOwnPropertySymbols,uz=Object.getPrototypeOf,_b=Object.prototype.hasOwnProperty,Pb=Object.prototype.propertyIsEnumerable,dz=Reflect.get;var Ii=Math.pow,Uu=(y,Fe,Le)=>Fe in y?sz(y,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Le}):y[Fe]=Le,B=(y,Fe)=>{for(var Le in Fe||(Fe={}))_b.call(Fe,Le)&&Uu(y,Le,Fe[Le]);if(Vs)for(var Le of Vs(Fe))Pb.call(Fe,Le)&&Uu(y,Le,Fe[Le]);return y},q=(y,Fe)=>lz(y,cz(Fe));var Hs=y=>typeof y=="symbol"?y:y+"",Qe=(y,Fe)=>{var Le={};for(var Bt in y)_b.call(y,Bt)&&Fe.indexOf(Bt)<0&&(Le[Bt]=y[Bt]);if(y!=null&&Vs)for(var Bt of Vs(y))Fe.indexOf(Bt)<0&&Pb.call(y,Bt)&&(Le[Bt]=y[Bt]);return Le};var X=(y,Fe,Le)=>Uu(y,typeof Fe!="symbol"?Fe+"":Fe,Le);var Pr=(y,Fe,Le)=>dz(uz(y),Le,Fe);var _=(y,Fe,Le)=>new Promise((Bt,ge)=>{var Ai=Tn=>{try{Oe(Le.next(Tn))}catch(K){ge(K)}},p=Tn=>{try{Oe(Le.throw(Tn))}catch(K){ge(K)}},Oe=Tn=>Tn.done?Bt(Tn.value):Promise.resolve(Tn.value).then(Ai,p);Oe((Le=Le.apply(y,Fe)).next())});function Tn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const K=Tn(y),Ie={ar:{key:"ar",name:"Arabic"},bg:{key:"bg",name:"Bulgarian"},da:{key:"da",name:"Danish"},de:{key:"de",name:"German"},en:{key:"en",name:"English"},el:{key:"el",name:"Greek"},es:{key:"es",name:"Spanish"},fr:{key:"fr",name:"French"},hi:{key:"hi",name:"Hindi"},hu:{key:"hu",name:"Hungarian"},it:{key:"it",name:"Italian"},nl:{key:"nl",name:"Dutch"},pt:{key:"pt",name:"Portuguese"},"pt-br":{key:"pt-br",name:"Brazilian(Portuguese)"},ro:{key:"ro",name:"Romanian"},sk:{key:"sk",name:"Slovak"},sr:{key:"sr",name:"Serbian"},sv:{key:"sv",name:"Swedish"},sw:{key:"sw",name:"Swahili"}},Ti={ar:Ie.ar,"ar-dz":Ie.ar,"ar-bh":Ie.ar,"ar-eg":Ie.ar,"ar-iq":Ie.ar,"ar-jo":Ie.ar,"ar-kw":Ie.ar,"ar-lb":Ie.ar,"ar-ly":Ie.ar,"ar-ma":Ie.ar,"ar-om":Ie.ar,"ar-qa":Ie.ar,"ar-sa":Ie.ar,"ar-sy":Ie.ar,"ar-tn":Ie.ar,"ar-ae":Ie.ar,"ar-ye":Ie.ar,bg:Ie.bg,da:Ie.da,de:Ie.de,en:Ie.en,"en-gb":Ie.en,"en-us":Ie.en,el:Ie.el,es:Ie.es,fr:Ie.fr,hi:Ie.hi,hu:Ie.hu,it:Ie.it,nl:Ie.nl,pt:Ie.pt,"pt-br":Ie["pt-br"],ro:Ie.ro,sk:Ie.sk,sr:Ie.sr,sv:Ie.sv,sw:Ie.sw},Gn={ar:"sa",bg:"bg",da:"dk",de:"de",en:"gb",el:"gr",es:"es",fr:"fr",hi:"in",hu:"hu",it:"it",nl:"nl",pt:"pt","pt-br":"br",ro:"ro",sk:"sk",sr:"rs",sv:"se",sw:"ke"};var $t=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vu(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Hu={exports:{}},Ro={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -36,7 +36,7 @@
36
36
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37
37
  * See the License for the specific language governing permissions and
38
38
  * limitations under the License.
39
- */const Gu=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},$b=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){const o=e[n++],a=e[n++],s=e[n++],c=((i&7)<<18|(o&63)<<12|(a&63)<<6|s&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{const o=e[n++],a=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}}return t.join("")},Yu={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<e.length;i+=3){const o=e[i],a=i+1<e.length,s=a?e[i+1]:0,c=i+2<e.length,u=c?e[i+2]:0,f=o>>2,d=(o&3)<<4|s>>4;let h=(s&15)<<2|u>>6,g=u&63;c||(g=64,a||(h=64)),r.push(n[f],n[d],n[h],n[g])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Gu(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):$b(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){const o=n[e.charAt(i++)],s=i<e.length?n[e.charAt(i)]:0;++i;const u=i<e.length?n[e.charAt(i)]:64;++i;const d=i<e.length?n[e.charAt(i)]:64;if(++i,o==null||s==null||u==null||d==null)throw new Fb;const h=o<<2|s>>4;if(r.push(h),u!==64){const g=s<<4&240|u>>2;if(r.push(g),d!==64){const v=u<<6&192|d;r.push(v)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class Fb extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Nb=function(e){const t=Gu(e);return Yu.encodeByteArray(t,!0)},Ku=function(e){return Nb(e).replace(/\./g,"")},qu=function(e){try{return Yu.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function Mo(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:const n=t;return new Date(n.getTime());case Object:e===void 0&&(e={});break;case Array:e=[];break;default:return t}for(const n in t)!t.hasOwnProperty(n)||!zb(n)||(e[n]=Mo(e[n],t[n]));return e}function zb(e){return e!=="__proto__"}/**
39
+ */const Gu=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},$b=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){const o=e[n++],a=e[n++],s=e[n++],c=((i&7)<<18|(o&63)<<12|(a&63)<<6|s&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{const o=e[n++],a=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}}return t.join("")},Yu={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<e.length;i+=3){const o=e[i],a=i+1<e.length,s=a?e[i+1]:0,c=i+2<e.length,u=c?e[i+2]:0,f=o>>2,d=(o&3)<<4|s>>4;let h=(s&15)<<2|u>>6,g=u&63;c||(g=64,a||(h=64)),r.push(n[f],n[d],n[h],n[g])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Gu(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):$b(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){const o=n[e.charAt(i++)],s=i<e.length?n[e.charAt(i)]:0;++i;const u=i<e.length?n[e.charAt(i)]:64;++i;const d=i<e.length?n[e.charAt(i)]:64;if(++i,o==null||s==null||u==null||d==null)throw new Fb;const h=o<<2|s>>4;if(r.push(h),u!==64){const g=s<<4&240|u>>2;if(r.push(g),d!==64){const v=u<<6&192|d;r.push(v)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class Fb extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Nb=function(e){const t=Gu(e);return Yu.encodeByteArray(t,!0)},Ku=function(e){return Nb(e).replace(/\./g,"")},Qu=function(e){try{return Yu.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function Mo(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:const n=t;return new Date(n.getTime());case Object:e===void 0&&(e={});break;case Array:e=[];break;default:return t}for(const n in t)!t.hasOwnProperty(n)||!zb(n)||(e[n]=Mo(e[n],t[n]));return e}function zb(e){return e!=="__proto__"}/**
40
40
  * @license
41
41
  * Copyright 2022 Google LLC
42
42
  *
@@ -51,7 +51,7 @@
51
51
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52
52
  * See the License for the specific language governing permissions and
53
53
  * limitations under the License.
54
- */function Qu(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("Unable to locate global object.")}/**
54
+ */function qu(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;throw new Error("Unable to locate global object.")}/**
55
55
  * @license
56
56
  * Copyright 2022 Google LLC
57
57
  *
@@ -66,7 +66,7 @@
66
66
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
67
67
  * See the License for the specific language governing permissions and
68
68
  * limitations under the License.
69
- */const jb=()=>Qu().__FIREBASE_DEFAULTS__,Ub=()=>{if(typeof process=="undefined"||typeof process.env=="undefined")return;const e=process.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},Vb=()=>{if(typeof document=="undefined")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(n){return}const t=e&&qu(e[1]);return t&&JSON.parse(t)},Lo=()=>{try{return jb()||Ub()||Vb()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},Hb=e=>{var t,n;return(n=(t=Lo())===null||t===void 0?void 0:t.emulatorHosts)===null||n===void 0?void 0:n[e]},Ju=()=>{var e;return(e=Lo())===null||e===void 0?void 0:e.config},Xu=e=>{var t;return(t=Lo())===null||t===void 0?void 0:t[`_${e}`]};/**
69
+ */const jb=()=>qu().__FIREBASE_DEFAULTS__,Ub=()=>{if(typeof process=="undefined"||typeof process.env=="undefined")return;const e=process.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},Vb=()=>{if(typeof document=="undefined")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(n){return}const t=e&&Qu(e[1]);return t&&JSON.parse(t)},Lo=()=>{try{return jb()||Ub()||Vb()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},Hb=e=>{var t,n;return(n=(t=Lo())===null||t===void 0?void 0:t.emulatorHosts)===null||n===void 0?void 0:n[e]},Ju=()=>{var e;return(e=Lo())===null||e===void 0?void 0:e.config},Xu=e=>{var t;return(t=Lo())===null||t===void 0?void 0:t[`_${e}`]};/**
70
70
  * @license
71
71
  * Copyright 2017 Google LLC
72
72
  *
@@ -111,7 +111,7 @@
111
111
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112
112
  * See the License for the specific language governing permissions and
113
113
  * limitations under the License.
114
- */const qb="FirebaseError";class Ft extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=qb,Object.setPrototypeOf(this,Ft.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,fr.prototype.create)}}class fr{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},i=`${this.service}/${t}`,o=this.errors[t],a=o?Qb(o,r):"Error",s=`${this.serviceName}: ${a} (${i}).`;return new Ft(i,s,r)}}function Qb(e,t){return e.replace(Jb,(n,r)=>{const i=t[r];return i!=null?String(i):`<${r}?>`})}const Jb=/\{\$([^}]+)}/g;/**
114
+ */const Qb="FirebaseError";class Ft extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=Qb,Object.setPrototypeOf(this,Ft.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,fr.prototype.create)}}class fr{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},i=`${this.service}/${t}`,o=this.errors[t],a=o?qb(o,r):"Error",s=`${this.serviceName}: ${a} (${i}).`;return new Ft(i,s,r)}}function qb(e,t){return e.replace(Jb,(n,r)=>{const i=t[r];return i!=null?String(i):`<${r}?>`})}const Jb=/\{\$([^}]+)}/g;/**
115
115
  * @license
116
116
  * Copyright 2017 Google LLC
117
117
  *
@@ -216,7 +216,7 @@
216
216
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
217
217
  * See the License for the specific language governing permissions and
218
218
  * limitations under the License.
219
- */const Ks=[];var Ne;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Ne||(Ne={}));const sd={debug:Ne.DEBUG,verbose:Ne.VERBOSE,info:Ne.INFO,warn:Ne.WARN,error:Ne.ERROR,silent:Ne.SILENT},i0=Ne.INFO,o0={[Ne.DEBUG]:"log",[Ne.VERBOSE]:"log",[Ne.INFO]:"info",[Ne.WARN]:"warn",[Ne.ERROR]:"error"},a0=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=o0[t];if(i)console[i](`[${r}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class qs{constructor(t){this.name=t,this._logLevel=i0,this._logHandler=a0,this._userLogHandler=null,Ks.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Ne))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?sd[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Ne.DEBUG,...t),this._logHandler(this,Ne.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Ne.VERBOSE,...t),this._logHandler(this,Ne.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Ne.INFO,...t),this._logHandler(this,Ne.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Ne.WARN,...t),this._logHandler(this,Ne.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Ne.ERROR,...t),this._logHandler(this,Ne.ERROR,...t)}}function s0(e){Ks.forEach(t=>{t.setLogLevel(e)})}function l0(e,t){for(const n of Ks){let r=null;t&&t.level&&(r=sd[t.level]),e===null?n.userLogHandler=null:n.userLogHandler=(i,o,...a)=>{const s=a.map(c=>{if(c==null)return null;if(typeof c=="string")return c;if(typeof c=="number"||typeof c=="boolean")return c.toString();if(c instanceof Error)return c.message;try{return JSON.stringify(c)}catch(u){return null}}).filter(c=>c).join(" ");o>=(r!=null?r:i.logLevel)&&e({level:Ne[o].toLowerCase(),message:s,args:a,type:i.name})}}}const c0=(e,t)=>t.some(n=>e instanceof n);let ld,cd;function u0(){return ld||(ld=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function d0(){return cd||(cd=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ud=new WeakMap,Qs=new WeakMap,dd=new WeakMap,Js=new WeakMap,Xs=new WeakMap;function f0(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{n(Kn(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&ud.set(n,e)}).catch(()=>{}),Xs.set(t,e),t}function h0(e){if(Qs.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{n(),i()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});Qs.set(e,t)}let Zs={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Qs.get(e);if(t==="objectStoreNames")return e.objectStoreNames||dd.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Kn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function p0(e){Zs=e(Zs)}function g0(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(el(this),t,...n);return dd.set(r,t.sort?t.sort():[t]),Kn(r)}:d0().includes(e)?function(...t){return e.apply(el(this),t),Kn(ud.get(this))}:function(...t){return Kn(e.apply(el(this),t))}}function m0(e){return typeof e=="function"?g0(e):(e instanceof IDBTransaction&&h0(e),c0(e,u0())?new Proxy(e,Zs):e)}function Kn(e){if(e instanceof IDBRequest)return f0(e);if(Js.has(e))return Js.get(e);const t=m0(e);return t!==e&&(Js.set(e,t),Xs.set(t,e)),t}const el=e=>Xs.get(e);function v0(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),s=Kn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(Kn(a.result),c.oldVersion,c.newVersion,Kn(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),s.then(c=>{o&&c.addEventListener("close",()=>o()),i&&c.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const b0=["get","getKey","getAll","getAllKeys","count"],y0=["put","add","delete","clear"],tl=new Map;function fd(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(tl.get(t))return tl.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=y0.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||b0.includes(n)))return;const o=function(a,...s){return _(this,null,function*(){const c=this.transaction(a,i?"readwrite":"readonly");let u=c.store;return r&&(u=u.index(s.shift())),(yield Promise.all([u[n](...s),i&&c.done]))[0]})};return tl.set(t,o),o}p0(e=>Q($({},e),{get:(t,n,r)=>fd(t,n)||e.get(t,n,r),has:(t,n)=>!!fd(t,n)||e.has(t,n)}));/**
219
+ */const Ks=[];var Ne;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Ne||(Ne={}));const sd={debug:Ne.DEBUG,verbose:Ne.VERBOSE,info:Ne.INFO,warn:Ne.WARN,error:Ne.ERROR,silent:Ne.SILENT},i0=Ne.INFO,o0={[Ne.DEBUG]:"log",[Ne.VERBOSE]:"log",[Ne.INFO]:"info",[Ne.WARN]:"warn",[Ne.ERROR]:"error"},a0=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=o0[t];if(i)console[i](`[${r}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Qs{constructor(t){this.name=t,this._logLevel=i0,this._logHandler=a0,this._userLogHandler=null,Ks.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Ne))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?sd[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Ne.DEBUG,...t),this._logHandler(this,Ne.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Ne.VERBOSE,...t),this._logHandler(this,Ne.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Ne.INFO,...t),this._logHandler(this,Ne.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Ne.WARN,...t),this._logHandler(this,Ne.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Ne.ERROR,...t),this._logHandler(this,Ne.ERROR,...t)}}function s0(e){Ks.forEach(t=>{t.setLogLevel(e)})}function l0(e,t){for(const n of Ks){let r=null;t&&t.level&&(r=sd[t.level]),e===null?n.userLogHandler=null:n.userLogHandler=(i,o,...a)=>{const s=a.map(c=>{if(c==null)return null;if(typeof c=="string")return c;if(typeof c=="number"||typeof c=="boolean")return c.toString();if(c instanceof Error)return c.message;try{return JSON.stringify(c)}catch(u){return null}}).filter(c=>c).join(" ");o>=(r!=null?r:i.logLevel)&&e({level:Ne[o].toLowerCase(),message:s,args:a,type:i.name})}}}const c0=(e,t)=>t.some(n=>e instanceof n);let ld,cd;function u0(){return ld||(ld=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function d0(){return cd||(cd=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ud=new WeakMap,qs=new WeakMap,dd=new WeakMap,Js=new WeakMap,Xs=new WeakMap;function f0(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{n(Kn(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&ud.set(n,e)}).catch(()=>{}),Xs.set(t,e),t}function h0(e){if(qs.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{n(),i()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});qs.set(e,t)}let Zs={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return qs.get(e);if(t==="objectStoreNames")return e.objectStoreNames||dd.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Kn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function p0(e){Zs=e(Zs)}function g0(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(el(this),t,...n);return dd.set(r,t.sort?t.sort():[t]),Kn(r)}:d0().includes(e)?function(...t){return e.apply(el(this),t),Kn(ud.get(this))}:function(...t){return Kn(e.apply(el(this),t))}}function m0(e){return typeof e=="function"?g0(e):(e instanceof IDBTransaction&&h0(e),c0(e,u0())?new Proxy(e,Zs):e)}function Kn(e){if(e instanceof IDBRequest)return f0(e);if(Js.has(e))return Js.get(e);const t=m0(e);return t!==e&&(Js.set(e,t),Xs.set(t,e)),t}const el=e=>Xs.get(e);function v0(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),s=Kn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(Kn(a.result),c.oldVersion,c.newVersion,Kn(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),s.then(c=>{o&&c.addEventListener("close",()=>o()),i&&c.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const b0=["get","getKey","getAll","getAllKeys","count"],y0=["put","add","delete","clear"],tl=new Map;function fd(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(tl.get(t))return tl.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=y0.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||b0.includes(n)))return;const o=function(a,...s){return _(this,null,function*(){const c=this.transaction(a,i?"readwrite":"readonly");let u=c.store;return r&&(u=u.index(s.shift())),(yield Promise.all([u[n](...s),i&&c.done]))[0]})};return tl.set(t,o),o}p0(e=>q(B({},e),{get:(t,n,r)=>fd(t,n)||e.get(t,n,r),has:(t,n)=>!!fd(t,n)||e.has(t,n)}));/**
220
220
  * @license
221
221
  * Copyright 2019 Google LLC
222
222
  *
@@ -246,7 +246,7 @@
246
246
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
247
247
  * See the License for the specific language governing permissions and
248
248
  * limitations under the License.
249
- */const En=new qs("@firebase/app"),w0="@firebase/app-compat",S0="@firebase/analytics-compat",I0="@firebase/analytics",A0="@firebase/app-check-compat",T0="@firebase/app-check",E0="@firebase/auth",k0="@firebase/auth-compat",_0="@firebase/database",P0="@firebase/database-compat",D0="@firebase/functions",O0="@firebase/functions-compat",R0="@firebase/installations",M0="@firebase/installations-compat",L0="@firebase/messaging",B0="@firebase/messaging-compat",$0="@firebase/performance",F0="@firebase/performance-compat",N0="@firebase/remote-config",z0="@firebase/remote-config-compat",j0="@firebase/storage",U0="@firebase/storage-compat",V0="@firebase/firestore",H0="@firebase/vertexai-preview",W0="@firebase/firestore-compat",G0="firebase",Y0="10.13.0";/**
249
+ */const En=new Qs("@firebase/app"),w0="@firebase/app-compat",S0="@firebase/analytics-compat",I0="@firebase/analytics",A0="@firebase/app-check-compat",T0="@firebase/app-check",E0="@firebase/auth",k0="@firebase/auth-compat",_0="@firebase/database",P0="@firebase/database-compat",D0="@firebase/functions",O0="@firebase/functions-compat",R0="@firebase/installations",M0="@firebase/installations-compat",L0="@firebase/messaging",B0="@firebase/messaging-compat",$0="@firebase/performance",F0="@firebase/performance-compat",N0="@firebase/remote-config",z0="@firebase/remote-config-compat",j0="@firebase/storage",U0="@firebase/storage-compat",V0="@firebase/firestore",H0="@firebase/vertexai-preview",W0="@firebase/firestore-compat",G0="firebase",Y0="10.13.0";/**
250
250
  * @license
251
251
  * Copyright 2019 Google LLC
252
252
  *
@@ -261,7 +261,7 @@
261
261
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
262
262
  * See the License for the specific language governing permissions and
263
263
  * limitations under the License.
264
- */const qn="[DEFAULT]",K0={[Fo]:"fire-core",[w0]:"fire-core-compat",[I0]:"fire-analytics",[S0]:"fire-analytics-compat",[T0]:"fire-app-check",[A0]:"fire-app-check-compat",[E0]:"fire-auth",[k0]:"fire-auth-compat",[_0]:"fire-rtdb",[P0]:"fire-rtdb-compat",[D0]:"fire-fn",[O0]:"fire-fn-compat",[R0]:"fire-iid",[M0]:"fire-iid-compat",[L0]:"fire-fcm",[B0]:"fire-fcm-compat",[$0]:"fire-perf",[F0]:"fire-perf-compat",[N0]:"fire-rc",[z0]:"fire-rc-compat",[j0]:"fire-gcs",[U0]:"fire-gcs-compat",[V0]:"fire-fst",[W0]:"fire-fst-compat",[H0]:"fire-vertex","fire-js":"fire-js",[G0]:"fire-js-all"};/**
264
+ */const Qn="[DEFAULT]",K0={[Fo]:"fire-core",[w0]:"fire-core-compat",[I0]:"fire-analytics",[S0]:"fire-analytics-compat",[T0]:"fire-app-check",[A0]:"fire-app-check-compat",[E0]:"fire-auth",[k0]:"fire-auth-compat",[_0]:"fire-rtdb",[P0]:"fire-rtdb-compat",[D0]:"fire-fn",[O0]:"fire-fn-compat",[R0]:"fire-iid",[M0]:"fire-iid-compat",[L0]:"fire-fcm",[B0]:"fire-fcm-compat",[$0]:"fire-perf",[F0]:"fire-perf-compat",[N0]:"fire-rc",[z0]:"fire-rc-compat",[j0]:"fire-gcs",[U0]:"fire-gcs-compat",[V0]:"fire-fst",[W0]:"fire-fst-compat",[H0]:"fire-vertex","fire-js":"fire-js",[G0]:"fire-js-all"};/**
265
265
  * @license
266
266
  * Copyright 2019 Google LLC
267
267
  *
@@ -276,7 +276,7 @@
276
276
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
277
277
  * See the License for the specific language governing permissions and
278
278
  * limitations under the License.
279
- */const Qn=new Map,Rr=new Map,Mr=new Map;function ki(e,t){try{e.container.addComponent(t)}catch(n){En.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function hd(e,t){e.container.addOrOverwriteComponent(t)}function pr(e){const t=e.name;if(Mr.has(t))return En.debug(`There were multiple attempts to register component ${t}.`),!1;Mr.set(t,e);for(const n of Qn.values())ki(n,e);for(const n of Rr.values())ki(n,e);return!0}function No(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function q0(e,t,n=qn){No(e,t).clearInstance(n)}function pd(e){return e.options!==void 0}function Je(e){return e.settings!==void 0}function Q0(){Mr.clear()}/**
279
+ */const qn=new Map,Rr=new Map,Mr=new Map;function ki(e,t){try{e.container.addComponent(t)}catch(n){En.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function hd(e,t){e.container.addOrOverwriteComponent(t)}function pr(e){const t=e.name;if(Mr.has(t))return En.debug(`There were multiple attempts to register component ${t}.`),!1;Mr.set(t,e);for(const n of qn.values())ki(n,e);for(const n of Rr.values())ki(n,e);return!0}function No(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function Q0(e,t,n=Qn){No(e,t).clearInstance(n)}function pd(e){return e.options!==void 0}function Je(e){return e.settings!==void 0}function q0(){Mr.clear()}/**
280
280
  * @license
281
281
  * Copyright 2019 Google LLC
282
282
  *
@@ -336,7 +336,7 @@
336
336
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
337
337
  * See the License for the specific language governing permissions and
338
338
  * limitations under the License.
339
- */const gr=Y0;function rl(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:qn,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw Jt.create("bad-app-name",{appName:String(i)});if(n||(n=Ju()),!n)throw Jt.create("no-options");const o=Qn.get(i);if(o){if($o(n,o.options)&&$o(r,o.config))return o;throw Jt.create("duplicate-app",{appName:i})}const a=new ad(i);for(const c of Mr.values())a.addComponent(c);const s=new gd(n,r,a);return Qn.set(i,s),s}function Z0(e,t){if(Yb()&&!ed())throw Jt.create("invalid-server-app-environment");t.automaticDataCollectionEnabled===void 0&&(t.automaticDataCollectionEnabled=!1);let n;pd(e)?n=e.options:n=e;const r=Object.assign(Object.assign({},t),n);r.releaseOnDeref!==void 0&&delete r.releaseOnDeref;const i=u=>[...u].reduce((f,d)=>Math.imul(31,f)+d.charCodeAt(0)|0,0);if(t.releaseOnDeref!==void 0&&typeof FinalizationRegistry=="undefined")throw Jt.create("finalization-registry-not-supported",{});const o=""+i(JSON.stringify(r)),a=Rr.get(o);if(a)return a.incRefCount(t.releaseOnDeref),a;const s=new ad(o);for(const u of Mr.values())s.addComponent(u);const c=new X0(n,t,o,s);return Rr.set(o,c),c}function md(e=qn){const t=Qn.get(e);if(!t&&e===qn&&Ju())return rl();if(!t)throw Jt.create("no-app",{appName:e});return t}function ey(){return Array.from(Qn.values())}function il(e){return _(this,null,function*(){let t=!1;const n=e.name;Qn.has(n)?(t=!0,Qn.delete(n)):Rr.has(n)&&e.decRefCount()<=0&&(Rr.delete(n),t=!0),t&&(yield Promise.all(e.container.getProviders().map(r=>r.delete())),e.isDeleted=!0)})}function kn(e,t,n){var r;let i=(r=K0[e])!==null&&r!==void 0?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const s=[`Unable to register library "${i}" with version "${t}":`];o&&s.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&a&&s.push("and"),a&&s.push(`version name "${t}" contains illegal characters (whitespace or "/")`),En.warn(s.join(" "));return}pr(new Yn(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}function vd(e,t){if(e!==null&&typeof e!="function")throw Jt.create("invalid-log-argument");l0(e,t)}function bd(e){s0(e)}/**
339
+ */const gr=Y0;function rl(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:Qn,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw Jt.create("bad-app-name",{appName:String(i)});if(n||(n=Ju()),!n)throw Jt.create("no-options");const o=qn.get(i);if(o){if($o(n,o.options)&&$o(r,o.config))return o;throw Jt.create("duplicate-app",{appName:i})}const a=new ad(i);for(const c of Mr.values())a.addComponent(c);const s=new gd(n,r,a);return qn.set(i,s),s}function Z0(e,t){if(Yb()&&!ed())throw Jt.create("invalid-server-app-environment");t.automaticDataCollectionEnabled===void 0&&(t.automaticDataCollectionEnabled=!1);let n;pd(e)?n=e.options:n=e;const r=Object.assign(Object.assign({},t),n);r.releaseOnDeref!==void 0&&delete r.releaseOnDeref;const i=u=>[...u].reduce((f,d)=>Math.imul(31,f)+d.charCodeAt(0)|0,0);if(t.releaseOnDeref!==void 0&&typeof FinalizationRegistry=="undefined")throw Jt.create("finalization-registry-not-supported",{});const o=""+i(JSON.stringify(r)),a=Rr.get(o);if(a)return a.incRefCount(t.releaseOnDeref),a;const s=new ad(o);for(const u of Mr.values())s.addComponent(u);const c=new X0(n,t,o,s);return Rr.set(o,c),c}function md(e=Qn){const t=qn.get(e);if(!t&&e===Qn&&Ju())return rl();if(!t)throw Jt.create("no-app",{appName:e});return t}function ey(){return Array.from(qn.values())}function il(e){return _(this,null,function*(){let t=!1;const n=e.name;qn.has(n)?(t=!0,qn.delete(n)):Rr.has(n)&&e.decRefCount()<=0&&(Rr.delete(n),t=!0),t&&(yield Promise.all(e.container.getProviders().map(r=>r.delete())),e.isDeleted=!0)})}function kn(e,t,n){var r;let i=(r=K0[e])!==null&&r!==void 0?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const s=[`Unable to register library "${i}" with version "${t}":`];o&&s.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&a&&s.push("and"),a&&s.push(`version name "${t}" contains illegal characters (whitespace or "/")`),En.warn(s.join(" "));return}pr(new Yn(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}function vd(e,t){if(e!==null&&typeof e!="function")throw Jt.create("invalid-log-argument");l0(e,t)}function bd(e){s0(e)}/**
340
340
  * @license
341
341
  * Copyright 2021 Google LLC
342
342
  *
@@ -381,7 +381,7 @@
381
381
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
382
382
  * See the License for the specific language governing permissions and
383
383
  * limitations under the License.
384
- */function cy(e){pr(new Yn("platform-logger",t=>new x0(t),"PRIVATE")),pr(new Yn("heartbeat",t=>new ay(t),"PRIVATE")),kn(Fo,nl,e),kn(Fo,nl,"esm2017"),kn("fire-js","")}cy("");const uy=Object.freeze(Object.defineProperty({__proto__:null,FirebaseError:Ft,SDK_VERSION:gr,_DEFAULT_ENTRY_NAME:qn,_addComponent:ki,_addOrOverwriteComponent:hd,_apps:Qn,_clearComponents:Q0,_components:Mr,_getProvider:No,_isFirebaseApp:pd,_isFirebaseServerApp:Je,_registerComponent:pr,_removeServiceInstance:q0,_serverApps:Rr,deleteApp:il,getApp:md,getApps:ey,initializeApp:rl,initializeServerApp:Z0,onLog:vd,registerVersion:kn,setLogLevel:bd},Symbol.toStringTag,{value:"Module"}));/**
384
+ */function cy(e){pr(new Yn("platform-logger",t=>new x0(t),"PRIVATE")),pr(new Yn("heartbeat",t=>new ay(t),"PRIVATE")),kn(Fo,nl,e),kn(Fo,nl,"esm2017"),kn("fire-js","")}cy("");const uy=Object.freeze(Object.defineProperty({__proto__:null,FirebaseError:Ft,SDK_VERSION:gr,_DEFAULT_ENTRY_NAME:Qn,_addComponent:ki,_addOrOverwriteComponent:hd,_apps:qn,_clearComponents:q0,_components:Mr,_getProvider:No,_isFirebaseApp:pd,_isFirebaseServerApp:Je,_registerComponent:pr,_removeServiceInstance:Q0,_serverApps:Rr,deleteApp:il,getApp:md,getApps:ey,initializeApp:rl,initializeServerApp:Z0,onLog:vd,registerVersion:kn,setLogLevel:bd},Symbol.toStringTag,{value:"Module"}));/**
385
385
  * @license
386
386
  * Copyright 2020 Google LLC
387
387
  *
@@ -396,7 +396,7 @@
396
396
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
397
397
  * See the License for the specific language governing permissions and
398
398
  * limitations under the License.
399
- */class dy{constructor(t,n){this._delegate=t,this.firebase=n,ki(t,new Yn("app-compat",()=>this,"PUBLIC")),this.container=t.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this._delegate.automaticDataCollectionEnabled=t}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(t=>{this._delegate.checkDestroyed(),t()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),il(this._delegate)))}_getService(t,n=qn){var r;this._delegate.checkDestroyed();const i=this._delegate.container.getProvider(t);return!i.isInitialized()&&((r=i.getComponent())===null||r===void 0?void 0:r.instantiationMode)==="EXPLICIT"&&i.initialize(),i.getImmediate({identifier:n})}_removeServiceInstance(t,n=qn){this._delegate.container.getProvider(t).clearInstance(n)}_addComponent(t){ki(this._delegate,t)}_addOrOverwriteComponent(t){hd(this._delegate,t)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}/**
399
+ */class dy{constructor(t,n){this._delegate=t,this.firebase=n,ki(t,new Yn("app-compat",()=>this,"PUBLIC")),this.container=t.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this._delegate.automaticDataCollectionEnabled=t}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(t=>{this._delegate.checkDestroyed(),t()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),il(this._delegate)))}_getService(t,n=Qn){var r;this._delegate.checkDestroyed();const i=this._delegate.container.getProvider(t);return!i.isInitialized()&&((r=i.getComponent())===null||r===void 0?void 0:r.instantiationMode)==="EXPLICIT"&&i.initialize(),i.getImmediate({identifier:n})}_removeServiceInstance(t,n=Qn){this._delegate.container.getProvider(t).clearInstance(n)}_addComponent(t){ki(this._delegate,t)}_addOrOverwriteComponent(t){hd(this._delegate,t)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}/**
400
400
  * @license
401
401
  * Copyright 2019 Google LLC
402
402
  *
@@ -426,7 +426,7 @@
426
426
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
427
427
  * See the License for the specific language governing permissions and
428
428
  * limitations under the License.
429
- */function hy(e){const t={},n={__esModule:!0,initializeApp:o,app:i,registerVersion:kn,setLogLevel:bd,onLog:vd,apps:null,SDK_VERSION:gr,INTERNAL:{registerComponent:s,removeApp:r,useAsService:c,modularAPIs:uy}};n.default=n,Object.defineProperty(n,"apps",{get:a});function r(u){delete t[u]}function i(u){if(u=u||qn,!rd(t,u))throw Id.create("no-app",{appName:u});return t[u]}i.App=e;function o(u,f={}){const d=rl(u,f);if(rd(t,d.name))return t[d.name];const h=new e(d,n);return t[d.name]=h,h}function a(){return Object.keys(t).map(u=>t[u])}function s(u){const f=u.name,d=f.replace("-compat","");if(pr(u)&&u.type==="PUBLIC"){const h=(g=i())=>{if(typeof g[d]!="function")throw Id.create("invalid-app-argument",{appName:f});return g[d]()};u.serviceProps!==void 0&&Mo(h,u.serviceProps),n[d]=h,e.prototype[d]=function(...g){return this._getService.bind(this,f).apply(this,u.multipleInstances?g:[])}}return u.type==="PUBLIC"?n[d]:null}function c(u,f){return f==="serverAuth"?null:f}return n}/**
429
+ */function hy(e){const t={},n={__esModule:!0,initializeApp:o,app:i,registerVersion:kn,setLogLevel:bd,onLog:vd,apps:null,SDK_VERSION:gr,INTERNAL:{registerComponent:s,removeApp:r,useAsService:c,modularAPIs:uy}};n.default=n,Object.defineProperty(n,"apps",{get:a});function r(u){delete t[u]}function i(u){if(u=u||Qn,!rd(t,u))throw Id.create("no-app",{appName:u});return t[u]}i.App=e;function o(u,f={}){const d=rl(u,f);if(rd(t,d.name))return t[d.name];const h=new e(d,n);return t[d.name]=h,h}function a(){return Object.keys(t).map(u=>t[u])}function s(u){const f=u.name,d=f.replace("-compat","");if(pr(u)&&u.type==="PUBLIC"){const h=(g=i())=>{if(typeof g[d]!="function")throw Id.create("invalid-app-argument",{appName:f});return g[d]()};u.serviceProps!==void 0&&Mo(h,u.serviceProps),n[d]=h,e.prototype[d]=function(...g){return this._getService.bind(this,f).apply(this,u.multipleInstances?g:[])}}return u.type==="PUBLIC"?n[d]:null}function c(u,f){return f==="serverAuth"?null:f}return n}/**
430
430
  * @license
431
431
  * Copyright 2019 Google LLC
432
432
  *
@@ -456,7 +456,7 @@
456
456
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
457
457
  * See the License for the specific language governing permissions and
458
458
  * limitations under the License.
459
- */const Td=new qs("@firebase/app-compat"),gy="@firebase/app-compat",my="0.2.39";/**
459
+ */const Td=new Qs("@firebase/app-compat"),gy="@firebase/app-compat",my="0.2.39";/**
460
460
  * @license
461
461
  * Copyright 2019 Google LLC
462
462
  *
@@ -486,7 +486,7 @@
486
486
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
487
487
  * See the License for the specific language governing permissions and
488
488
  * limitations under the License.
489
- */try{const e=Qu();if(e.firebase!==void 0){Td.warn(`
489
+ */try{const e=qu();if(e.firebase!==void 0){Td.warn(`
490
490
  Warning: Firebase is already defined in the global scope. Please make sure
491
491
  Firebase library is only loaded once.
492
492
  `);const t=e.firebase.SDK_VERSION;t&&t.indexOf("LITE")>=0&&Td.warn(`
@@ -537,7 +537,7 @@
537
537
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
538
538
  * See the License for the specific language governing permissions and
539
539
  * limitations under the License.
540
- */const zo=new qs("@firebase/auth");function Iy(e,...t){zo.logLevel<=Ne.WARN&&zo.warn(`Auth (${gr}): ${e}`,...t)}function jo(e,...t){zo.logLevel<=Ne.ERROR&&zo.error(`Auth (${gr}): ${e}`,...t)}/**
540
+ */const zo=new Qs("@firebase/auth");function Iy(e,...t){zo.logLevel<=Ne.WARN&&zo.warn(`Auth (${gr}): ${e}`,...t)}function jo(e,...t){zo.logLevel<=Ne.ERROR&&zo.error(`Auth (${gr}): ${e}`,...t)}/**
541
541
  * @license
542
542
  * Copyright 2020 Google LLC
543
543
  *
@@ -717,7 +717,7 @@
717
717
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
718
718
  * See the License for the specific language governing permissions and
719
719
  * limitations under the License.
720
- */function Mi(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function By(e,t=!1){return _(this,null,function*(){const n=Pe(e),r=yield n.getIdToken(t),i=Uo(r);se(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o=typeof i.firebase=="object"?i.firebase:void 0,a=o==null?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:Mi(fl(i.auth_time)),issuedAtTime:Mi(fl(i.iat)),expirationTime:Mi(fl(i.exp)),signInProvider:a||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}})}function fl(e){return Number(e)*1e3}function Uo(e){const[t,n,r]=e.split(".");if(t===void 0||n===void 0||r===void 0)return jo("JWT malformed, contained fewer than 3 sections"),null;try{const i=qu(n);return i?JSON.parse(i):(jo("Failed to decode base64 JWT payload"),null)}catch(i){return jo("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function Bd(e){const t=Uo(e);return se(t,"internal-error"),se(typeof t.exp!="undefined","internal-error"),se(typeof t.iat!="undefined","internal-error"),Number(t.exp)-Number(t.iat)}/**
720
+ */function Mi(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function By(e,t=!1){return _(this,null,function*(){const n=Pe(e),r=yield n.getIdToken(t),i=Uo(r);se(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o=typeof i.firebase=="object"?i.firebase:void 0,a=o==null?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:Mi(fl(i.auth_time)),issuedAtTime:Mi(fl(i.iat)),expirationTime:Mi(fl(i.exp)),signInProvider:a||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}})}function fl(e){return Number(e)*1e3}function Uo(e){const[t,n,r]=e.split(".");if(t===void 0||n===void 0||r===void 0)return jo("JWT malformed, contained fewer than 3 sections"),null;try{const i=Qu(n);return i?JSON.parse(i):(jo("Failed to decode base64 JWT payload"),null)}catch(i){return jo("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function Bd(e){const t=Uo(e);return se(t,"internal-error"),se(typeof t.exp!="undefined","internal-error"),se(typeof t.iat!="undefined","internal-error"),Number(t.exp)-Number(t.iat)}/**
721
721
  * @license
722
722
  * Copyright 2020 Google LLC
723
723
  *
@@ -822,7 +822,7 @@
822
822
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
823
823
  * See the License for the specific language governing permissions and
824
824
  * limitations under the License.
825
- */function Xn(e,t){se(typeof e=="string"||typeof e=="undefined","internal-error",{appName:t})}class Dn{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=sl(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Fy(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new hl(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(t){return _(this,null,function*(){const n=yield Pn(this,this.stsTokenManager.getToken(this.auth,t));return se(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n})}getIdTokenResult(t){return By(this,t)}reload(){return Ny(this)}_assign(t){this!==t&&(se(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>Object.assign({},n)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new Dn(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(t){se(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(t,n=!1){return _(this,null,function*(){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&(yield Li(this)),yield this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)})}delete(){return _(this,null,function*(){if(Je(this.auth.app))return Promise.reject(Ct(this.auth));const t=yield this.getIdToken();return yield Pn(this,My(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,n){var r,i,o,a,s,c,u,f;const d=(r=n.displayName)!==null&&r!==void 0?r:void 0,h=(i=n.email)!==null&&i!==void 0?i:void 0,g=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,v=(a=n.photoURL)!==null&&a!==void 0?a:void 0,m=(s=n.tenantId)!==null&&s!==void 0?s:void 0,b=(c=n._redirectEventId)!==null&&c!==void 0?c:void 0,x=(u=n.createdAt)!==null&&u!==void 0?u:void 0,S=(f=n.lastLoginAt)!==null&&f!==void 0?f:void 0,{uid:C,emailVerified:I,isAnonymous:w,providerData:A,stsTokenManager:E}=n;se(C&&E,t,"internal-error");const k=$r.fromJSON(this.name,E);se(typeof C=="string",t,"internal-error"),Xn(d,t.name),Xn(h,t.name),se(typeof I=="boolean",t,"internal-error"),se(typeof w=="boolean",t,"internal-error"),Xn(g,t.name),Xn(v,t.name),Xn(m,t.name),Xn(b,t.name),Xn(x,t.name),Xn(S,t.name);const B=new Dn({uid:C,auth:t,email:h,emailVerified:I,displayName:d,isAnonymous:w,photoURL:v,phoneNumber:g,tenantId:m,stsTokenManager:k,createdAt:x,lastLoginAt:S});return A&&Array.isArray(A)&&(B.providerData=A.map(G=>Object.assign({},G))),b&&(B._redirectEventId=b),B}static _fromIdTokenResponse(t,n,r=!1){return _(this,null,function*(){const i=new $r;i.updateFromServerResponse(n);const o=new Dn({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r});return yield Li(o),o})}static _fromGetAccountInfoResponse(t,n,r){return _(this,null,function*(){const i=n.users[0];se(i.localId!==void 0,"internal-error");const o=i.providerUserInfo!==void 0?$d(i.providerUserInfo):[],a=!(i.email&&i.passwordHash)&&!(o!=null&&o.length),s=new $r;s.updateFromIdToken(r);const c=new Dn({uid:i.localId,auth:t,stsTokenManager:s,isAnonymous:a}),u={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:o,metadata:new hl(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(o!=null&&o.length)};return Object.assign(c,u),c})}}/**
825
+ */function Xn(e,t){se(typeof e=="string"||typeof e=="undefined","internal-error",{appName:t})}class Dn{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=sl(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Fy(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new hl(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(t){return _(this,null,function*(){const n=yield Pn(this,this.stsTokenManager.getToken(this.auth,t));return se(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n})}getIdTokenResult(t){return By(this,t)}reload(){return Ny(this)}_assign(t){this!==t&&(se(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>Object.assign({},n)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new Dn(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(t){se(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(t,n=!1){return _(this,null,function*(){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&(yield Li(this)),yield this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)})}delete(){return _(this,null,function*(){if(Je(this.auth.app))return Promise.reject(Ct(this.auth));const t=yield this.getIdToken();return yield Pn(this,My(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,n){var r,i,o,a,s,c,u,f;const d=(r=n.displayName)!==null&&r!==void 0?r:void 0,h=(i=n.email)!==null&&i!==void 0?i:void 0,g=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,v=(a=n.photoURL)!==null&&a!==void 0?a:void 0,m=(s=n.tenantId)!==null&&s!==void 0?s:void 0,b=(c=n._redirectEventId)!==null&&c!==void 0?c:void 0,x=(u=n.createdAt)!==null&&u!==void 0?u:void 0,S=(f=n.lastLoginAt)!==null&&f!==void 0?f:void 0,{uid:C,emailVerified:I,isAnonymous:w,providerData:A,stsTokenManager:E}=n;se(C&&E,t,"internal-error");const k=$r.fromJSON(this.name,E);se(typeof C=="string",t,"internal-error"),Xn(d,t.name),Xn(h,t.name),se(typeof I=="boolean",t,"internal-error"),se(typeof w=="boolean",t,"internal-error"),Xn(g,t.name),Xn(v,t.name),Xn(m,t.name),Xn(b,t.name),Xn(x,t.name),Xn(S,t.name);const $=new Dn({uid:C,auth:t,email:h,emailVerified:I,displayName:d,isAnonymous:w,photoURL:v,phoneNumber:g,tenantId:m,stsTokenManager:k,createdAt:x,lastLoginAt:S});return A&&Array.isArray(A)&&($.providerData=A.map(G=>Object.assign({},G))),b&&($._redirectEventId=b),$}static _fromIdTokenResponse(t,n,r=!1){return _(this,null,function*(){const i=new $r;i.updateFromServerResponse(n);const o=new Dn({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r});return yield Li(o),o})}static _fromGetAccountInfoResponse(t,n,r){return _(this,null,function*(){const i=n.users[0];se(i.localId!==void 0,"internal-error");const o=i.providerUserInfo!==void 0?$d(i.providerUserInfo):[],a=!(i.email&&i.passwordHash)&&!(o!=null&&o.length),s=new $r;s.updateFromIdToken(r);const c=new Dn({uid:i.localId,auth:t,stsTokenManager:s,isAnonymous:a}),u={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:o,metadata:new hl(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(o!=null&&o.length)};return Object.assign(c,u),c})}}/**
826
826
  * @license
827
827
  * Copyright 2020 Google LLC
828
828
  *
@@ -942,7 +942,7 @@
942
942
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
943
943
  * See the License for the specific language governing permissions and
944
944
  * limitations under the License.
945
- */const Ky=6;class qy{constructor(t){var n,r,i,o;const a=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=a.minPasswordLength)!==null&&n!==void 0?n:Ky,a.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=a.maxPasswordLength),a.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=a.containsLowercaseCharacter),a.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=a.containsUppercaseCharacter),a.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=a.containsNumericCharacter),a.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=a.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=t.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(o=t.forceUpgradeOnSignin)!==null&&o!==void 0?o:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var n,r,i,o,a,s;const c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,c),this.validatePasswordCharacterOptions(t,c),c.isValid&&(c.isValid=(n=c.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),c.isValid&&(c.isValid=(r=c.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),c.isValid&&(c.isValid=(i=c.containsLowercaseLetter)!==null&&i!==void 0?i:!0),c.isValid&&(c.isValid=(o=c.containsUppercaseLetter)!==null&&o!==void 0?o:!0),c.isValid&&(c.isValid=(a=c.containsNumericCharacter)!==null&&a!==void 0?a:!0),c.isValid&&(c.isValid=(s=c.containsNonAlphanumericCharacter)!==null&&s!==void 0?s:!0),c}validatePasswordLengthOptions(t,n){const r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=t.length>=r),i&&(n.meetsMaxPasswordLength=t.length<=i)}validatePasswordCharacterOptions(t,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i<t.length;i++)r=t.charAt(i),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(t,n,r,i,o){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=o))}}/**
945
+ */const Ky=6;class Qy{constructor(t){var n,r,i,o;const a=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(n=a.minPasswordLength)!==null&&n!==void 0?n:Ky,a.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=a.maxPasswordLength),a.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=a.containsLowercaseCharacter),a.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=a.containsUppercaseCharacter),a.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=a.containsNumericCharacter),a.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=a.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=t.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(o=t.forceUpgradeOnSignin)!==null&&o!==void 0?o:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var n,r,i,o,a,s;const c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,c),this.validatePasswordCharacterOptions(t,c),c.isValid&&(c.isValid=(n=c.meetsMinPasswordLength)!==null&&n!==void 0?n:!0),c.isValid&&(c.isValid=(r=c.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),c.isValid&&(c.isValid=(i=c.containsLowercaseLetter)!==null&&i!==void 0?i:!0),c.isValid&&(c.isValid=(o=c.containsUppercaseLetter)!==null&&o!==void 0?o:!0),c.isValid&&(c.isValid=(a=c.containsNumericCharacter)!==null&&a!==void 0?a:!0),c.isValid&&(c.isValid=(s=c.containsNonAlphanumericCharacter)!==null&&s!==void 0?s:!0),c}validatePasswordLengthOptions(t,n){const r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=t.length>=r),i&&(n.meetsMaxPasswordLength=t.length<=i)}validatePasswordCharacterOptions(t,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i<t.length;i++)r=t.charAt(i),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(t,n,r,i,o){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=o))}}/**
946
946
  * @license
947
947
  * Copyright 2020 Google LLC
948
948
  *
@@ -957,7 +957,7 @@
957
957
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
958
958
  * See the License for the specific language governing permissions and
959
959
  * limitations under the License.
960
- */class Qy{constructor(t,n,r,i){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new qd(this),this.idTokenSubscription=new qd(this),this.beforeStateQueue=new Gy(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=kd,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Vt(n)),this._initializationPromise=this.queue(()=>_(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Nr.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(o){}yield this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return _(this,null,function*(){if(this._deleted)return;const t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return _(this,null,function*(){try{const n=yield Ld(this,{idToken:t}),r=yield Dn._fromGetAccountInfoResponse(this,n,t);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return _(this,null,function*(){var n;if(Je(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(s=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(s,s))}):this.directlySetCurrentUser(null)}const r=yield this.assertedPersistence.getCurrentUser();let i=r,o=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();const a=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,s=i==null?void 0:i._redirectEventId,c=yield this.tryRedirectSignIn(t);(!a||a===s)&&(c!=null&&c.user)&&(i=c.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(i)}catch(a){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return se(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return _(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch(r){yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(t){return _(this,null,function*(){try{yield Li(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=Ty()}_delete(){return _(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return _(this,null,function*(){if(Je(this.app))return Promise.reject(Ct(this));const n=t?Pe(t):null;return n&&se(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return _(this,null,function*(){if(!this._deleted)return t&&se(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>_(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return _(this,null,function*(){return Je(this.app)?Promise.reject(Ct(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Je(this.app)?Promise.reject(Ct(this)):this.queue(()=>_(this,null,function*(){yield this.assertedPersistence.setPersistence(Vt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return _(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return _(this,null,function*(){const t=yield Yy(this),n=new qy(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new fr("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}revokeAccessToken(t){return _(this,null,function*(){if(this.currentUser){const n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield Uy(this,r)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,n){return _(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return _(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Vt(t)||this._popupRedirectResolver;se(n,this,"argument-error"),this.redirectPersistenceManager=yield Nr.create(this,[Vt(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return _(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>_(this,null,function*(){}))),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return _(this,null,function*(){if(t===this.currentUser)return this.queue(()=>_(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let a=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(se(s,this,"internal-error"),s.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const c=t.addObserver(n,r,i);return()=>{a=!0,c()}}else{const c=t.addObserver(n);return()=>{a=!0,c()}}}directlySetCurrentUser(t){return _(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return se(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Kd(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return _(this,null,function*(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();r&&(n["X-Firebase-Client"]=r);const i=yield this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n})}_getAppCheckToken(){return _(this,null,function*(){var t;const n=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return n!=null&&n.error&&Iy(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function et(e){return Pe(e)}class qd{constructor(t){this.auth=t,this.observer=null,this.addObserver=od(n=>this.observer=n)}get next(){return se(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
960
+ */class qy{constructor(t,n,r,i){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Qd(this),this.idTokenSubscription=new Qd(this),this.beforeStateQueue=new Gy(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=kd,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Vt(n)),this._initializationPromise=this.queue(()=>_(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Nr.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(o){}yield this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return _(this,null,function*(){if(this._deleted)return;const t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return _(this,null,function*(){try{const n=yield Ld(this,{idToken:t}),r=yield Dn._fromGetAccountInfoResponse(this,n,t);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return _(this,null,function*(){var n;if(Je(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(s=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(s,s))}):this.directlySetCurrentUser(null)}const r=yield this.assertedPersistence.getCurrentUser();let i=r,o=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();const a=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,s=i==null?void 0:i._redirectEventId,c=yield this.tryRedirectSignIn(t);(!a||a===s)&&(c!=null&&c.user)&&(i=c.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(i)}catch(a){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return se(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return _(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch(r){yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(t){return _(this,null,function*(){try{yield Li(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=Ty()}_delete(){return _(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return _(this,null,function*(){if(Je(this.app))return Promise.reject(Ct(this));const n=t?Pe(t):null;return n&&se(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return _(this,null,function*(){if(!this._deleted)return t&&se(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>_(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return _(this,null,function*(){return Je(this.app)?Promise.reject(Ct(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Je(this.app)?Promise.reject(Ct(this)):this.queue(()=>_(this,null,function*(){yield this.assertedPersistence.setPersistence(Vt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return _(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return _(this,null,function*(){const t=yield Yy(this),n=new Qy(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new fr("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}revokeAccessToken(t){return _(this,null,function*(){if(this.currentUser){const n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield Uy(this,r)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,n){return _(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return _(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Vt(t)||this._popupRedirectResolver;se(n,this,"argument-error"),this.redirectPersistenceManager=yield Nr.create(this,[Vt(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return _(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>_(this,null,function*(){}))),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return _(this,null,function*(){if(t===this.currentUser)return this.queue(()=>_(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let a=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(se(s,this,"internal-error"),s.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const c=t.addObserver(n,r,i);return()=>{a=!0,c()}}else{const c=t.addObserver(n);return()=>{a=!0,c()}}}directlySetCurrentUser(t){return _(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return se(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Kd(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return _(this,null,function*(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();r&&(n["X-Firebase-Client"]=r);const i=yield this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n})}_getAppCheckToken(){return _(this,null,function*(){var t;const n=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return n!=null&&n.error&&Iy(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function et(e){return Pe(e)}class Qd{constructor(t){this.auth=t,this.observer=null,this.addObserver=od(n=>this.observer=n)}get next(){return se(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
961
961
  * @license
962
962
  * Copyright 2020 Google LLC
963
963
  *
@@ -972,7 +972,7 @@
972
972
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
973
973
  * See the License for the specific language governing permissions and
974
974
  * limitations under the License.
975
- */let Fi={loadJS(){return _(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Jy(e){Fi=e}function pl(e){return Fi.loadJS(e)}function Xy(){return Fi.recaptchaV2Script}function Zy(){return Fi.recaptchaEnterpriseScript}function ex(){return Fi.gapiScript}function Qd(e){return`__${e}${Math.floor(Math.random()*1e6)}`}const tx="recaptcha-enterprise",nx="NO_RECAPTCHA";class rx{constructor(t){this.type=tx,this.auth=et(t)}verify(t="verify",n=!1){return _(this,null,function*(){function r(o){return _(this,null,function*(){if(!n){if(o.tenantId==null&&o._agentRecaptchaConfig!=null)return o._agentRecaptchaConfig.siteKey;if(o.tenantId!=null&&o._tenantRecaptchaConfigs[o.tenantId]!==void 0)return o._tenantRecaptchaConfigs[o.tenantId].siteKey}return new Promise((a,s)=>_(this,null,function*(){Ry(o,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(c=>{if(c.recaptchaKey===void 0)s(new Error("recaptcha Enterprise site key undefined"));else{const u=new Dy(c);return o.tenantId==null?o._agentRecaptchaConfig=u:o._tenantRecaptchaConfigs[o.tenantId]=u,a(u.siteKey)}}).catch(c=>{s(c)})}))})}function i(o,a,s){const c=window.grecaptcha;Md(c)?c.enterprise.ready(()=>{c.enterprise.execute(o,{action:t}).then(u=>{a(u)}).catch(()=>{a(nx)})}):s(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((o,a)=>{r(this.auth).then(s=>{if(!n&&Md(window.grecaptcha))i(s,o,a);else{if(typeof window=="undefined"){a(new Error("RecaptchaVerifier is only supported in browser"));return}let c=Zy();c.length!==0&&(c+=s),pl(c).then(()=>{i(s,o,a)}).catch(u=>{a(u)})}}).catch(s=>{a(s)})})})}}function Jd(e,t,n,r=!1){return _(this,null,function*(){const i=new rx(e);let o;try{o=yield i.verify(n)}catch(s){o=yield i.verify(n,!0)}const a=Object.assign({},t);return r?Object.assign(a,{captchaResp:o}):Object.assign(a,{captchaResponse:o}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a})}function Ni(e,t,n,r){return _(this,null,function*(){var i;if(!((i=e._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const o=yield Jd(e,t,n,n==="getOobCode");return r(e,o)}else return r(e,t).catch(o=>_(this,null,function*(){if(o.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const a=yield Jd(e,t,n,n==="getOobCode");return r(e,a)}else return Promise.reject(o)}))})}/**
975
+ */let Fi={loadJS(){return _(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Jy(e){Fi=e}function pl(e){return Fi.loadJS(e)}function Xy(){return Fi.recaptchaV2Script}function Zy(){return Fi.recaptchaEnterpriseScript}function ex(){return Fi.gapiScript}function qd(e){return`__${e}${Math.floor(Math.random()*1e6)}`}const tx="recaptcha-enterprise",nx="NO_RECAPTCHA";class rx{constructor(t){this.type=tx,this.auth=et(t)}verify(t="verify",n=!1){return _(this,null,function*(){function r(o){return _(this,null,function*(){if(!n){if(o.tenantId==null&&o._agentRecaptchaConfig!=null)return o._agentRecaptchaConfig.siteKey;if(o.tenantId!=null&&o._tenantRecaptchaConfigs[o.tenantId]!==void 0)return o._tenantRecaptchaConfigs[o.tenantId].siteKey}return new Promise((a,s)=>_(this,null,function*(){Ry(o,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(c=>{if(c.recaptchaKey===void 0)s(new Error("recaptcha Enterprise site key undefined"));else{const u=new Dy(c);return o.tenantId==null?o._agentRecaptchaConfig=u:o._tenantRecaptchaConfigs[o.tenantId]=u,a(u.siteKey)}}).catch(c=>{s(c)})}))})}function i(o,a,s){const c=window.grecaptcha;Md(c)?c.enterprise.ready(()=>{c.enterprise.execute(o,{action:t}).then(u=>{a(u)}).catch(()=>{a(nx)})}):s(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((o,a)=>{r(this.auth).then(s=>{if(!n&&Md(window.grecaptcha))i(s,o,a);else{if(typeof window=="undefined"){a(new Error("RecaptchaVerifier is only supported in browser"));return}let c=Zy();c.length!==0&&(c+=s),pl(c).then(()=>{i(s,o,a)}).catch(u=>{a(u)})}}).catch(s=>{a(s)})})})}}function Jd(e,t,n,r=!1){return _(this,null,function*(){const i=new rx(e);let o;try{o=yield i.verify(n)}catch(s){o=yield i.verify(n,!0)}const a=Object.assign({},t);return r?Object.assign(a,{captchaResp:o}):Object.assign(a,{captchaResponse:o}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a})}function Ni(e,t,n,r){return _(this,null,function*(){var i;if(!((i=e._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const o=yield Jd(e,t,n,n==="getOobCode");return r(e,o)}else return r(e,t).catch(o=>_(this,null,function*(){if(o.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const a=yield Jd(e,t,n,n==="getOobCode");return r(e,a)}else return Promise.reject(o)}))})}/**
976
976
  * @license
977
977
  * Copyright 2020 Google LLC
978
978
  *
@@ -1452,7 +1452,7 @@
1452
1452
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1453
1453
  * See the License for the specific language governing permissions and
1454
1454
  * limitations under the License.
1455
- */function qo(e,t,n){var r;se(((r=n.url)===null||r===void 0?void 0:r.length)>0,e,"invalid-continue-uri"),se(typeof n.dynamicLinkDomain=="undefined"||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(se(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(se(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}/**
1455
+ */function Qo(e,t,n){var r;se(((r=n.url)===null||r===void 0?void 0:r.length)>0,e,"invalid-continue-uri"),se(typeof n.dynamicLinkDomain=="undefined"||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(se(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(se(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}/**
1456
1456
  * @license
1457
1457
  * Copyright 2020 Google LLC
1458
1458
  *
@@ -1467,7 +1467,7 @@
1467
1467
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1468
1468
  * See the License for the specific language governing permissions and
1469
1469
  * limitations under the License.
1470
- */function yl(e){return _(this,null,function*(){const t=et(e);t._getPasswordPolicyInternal()&&(yield t._updatePasswordPolicy())})}function Ox(e,t,n){return _(this,null,function*(){const r=et(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};n&&qo(r,i,n),yield Ni(r,i,"getOobCode",hx)})}function Rx(e,t,n){return _(this,null,function*(){yield ef(Pe(e),{oobCode:t,newPassword:n}).catch(r=>_(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&yl(e),r}))})}function Mx(e,t){return _(this,null,function*(){yield ux(Pe(e),{oobCode:t})})}function uf(e,t){return _(this,null,function*(){const n=Pe(e),r=yield ef(n,{oobCode:t}),i=r.requestType;switch(se(i,n,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":se(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":se(r.mfaInfo,n,"internal-error");default:se(r.email,n,"internal-error")}let o=null;return r.mfaInfo&&(o=ji._fromServerResponse(et(n),r.mfaInfo)),{data:{email:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.newEmail:r.email)||null,previousEmail:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.email:r.newEmail)||null,multiFactorInfo:o},operation:i}})}function Lx(e,t){return _(this,null,function*(){const{data:n}=yield uf(Pe(e),t);return n.email})}function Bx(e,t,n){return _(this,null,function*(){if(Je(e.app))return Promise.reject(Ct(e));const r=et(e),a=yield Ni(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",tf).catch(c=>{throw c.code==="auth/password-does-not-meet-requirements"&&yl(e),c}),s=yield Xt._fromIdTokenResponse(r,"signIn",a);return yield r._updateCurrentUser(s.user),s})}function $x(e,t,n){return Je(e.app)?Promise.reject(Ct(e)):Ko(Pe(e),Zn.credential(t,n)).catch(r=>_(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&yl(e),r}))}/**
1470
+ */function yl(e){return _(this,null,function*(){const t=et(e);t._getPasswordPolicyInternal()&&(yield t._updatePasswordPolicy())})}function Ox(e,t,n){return _(this,null,function*(){const r=et(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};n&&Qo(r,i,n),yield Ni(r,i,"getOobCode",hx)})}function Rx(e,t,n){return _(this,null,function*(){yield ef(Pe(e),{oobCode:t,newPassword:n}).catch(r=>_(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&yl(e),r}))})}function Mx(e,t){return _(this,null,function*(){yield ux(Pe(e),{oobCode:t})})}function uf(e,t){return _(this,null,function*(){const n=Pe(e),r=yield ef(n,{oobCode:t}),i=r.requestType;switch(se(i,n,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":se(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":se(r.mfaInfo,n,"internal-error");default:se(r.email,n,"internal-error")}let o=null;return r.mfaInfo&&(o=ji._fromServerResponse(et(n),r.mfaInfo)),{data:{email:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.newEmail:r.email)||null,previousEmail:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.email:r.newEmail)||null,multiFactorInfo:o},operation:i}})}function Lx(e,t){return _(this,null,function*(){const{data:n}=yield uf(Pe(e),t);return n.email})}function Bx(e,t,n){return _(this,null,function*(){if(Je(e.app))return Promise.reject(Ct(e));const r=et(e),a=yield Ni(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",tf).catch(c=>{throw c.code==="auth/password-does-not-meet-requirements"&&yl(e),c}),s=yield Xt._fromIdTokenResponse(r,"signIn",a);return yield r._updateCurrentUser(s.user),s})}function $x(e,t,n){return Je(e.app)?Promise.reject(Ct(e)):Ko(Pe(e),Zn.credential(t,n)).catch(r=>_(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&yl(e),r}))}/**
1471
1471
  * @license
1472
1472
  * Copyright 2020 Google LLC
1473
1473
  *
@@ -1482,7 +1482,7 @@
1482
1482
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1483
1483
  * See the License for the specific language governing permissions and
1484
1484
  * limitations under the License.
1485
- */function Fx(e,t,n){return _(this,null,function*(){const r=et(e),i={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};function o(a,s){se(s.handleCodeInApp,r,"argument-error"),s&&qo(r,a,s)}o(i,n),yield Ni(r,i,"getOobCode",px)})}function Nx(e,t){const n=Ho.parseLink(t);return(n==null?void 0:n.operation)==="EMAIL_SIGNIN"}function zx(e,t,n){return _(this,null,function*(){if(Je(e.app))return Promise.reject(Ct(e));const r=Pe(e),i=Zn.credentialWithLink(t,n||Di());return se(i._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),Ko(r,i)})}/**
1485
+ */function Fx(e,t,n){return _(this,null,function*(){const r=et(e),i={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};function o(a,s){se(s.handleCodeInApp,r,"argument-error"),s&&Qo(r,a,s)}o(i,n),yield Ni(r,i,"getOobCode",px)})}function Nx(e,t){const n=Ho.parseLink(t);return(n==null?void 0:n.operation)==="EMAIL_SIGNIN"}function zx(e,t,n){return _(this,null,function*(){if(Je(e.app))return Promise.reject(Ct(e));const r=Pe(e),i=Zn.credentialWithLink(t,n||Di());return se(i._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),Ko(r,i)})}/**
1486
1486
  * @license
1487
1487
  * Copyright 2020 Google LLC
1488
1488
  *
@@ -1512,7 +1512,7 @@
1512
1512
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1513
1513
  * See the License for the specific language governing permissions and
1514
1514
  * limitations under the License.
1515
- */function Ux(e,t){return _(this,null,function*(){const n=ul()?Di():"http://localhost",r={identifier:t,continueUri:n},{signinMethods:i}=yield jx(Pe(e),r);return i||[]})}function Vx(e,t){return _(this,null,function*(){const n=Pe(e),i={requestType:"VERIFY_EMAIL",idToken:yield e.getIdToken()};t&&qo(n.auth,i,t);const{email:o}=yield fx(n.auth,i);o!==e.email&&(yield e.reload())})}function Hx(e,t,n){return _(this,null,function*(){const r=Pe(e),o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:yield e.getIdToken(),newEmail:t};n&&qo(r.auth,o,n);const{email:a}=yield gx(r.auth,o);a!==e.email&&(yield e.reload())})}/**
1515
+ */function Ux(e,t){return _(this,null,function*(){const n=ul()?Di():"http://localhost",r={identifier:t,continueUri:n},{signinMethods:i}=yield jx(Pe(e),r);return i||[]})}function Vx(e,t){return _(this,null,function*(){const n=Pe(e),i={requestType:"VERIFY_EMAIL",idToken:yield e.getIdToken()};t&&Qo(n.auth,i,t);const{email:o}=yield fx(n.auth,i);o!==e.email&&(yield e.reload())})}function Hx(e,t,n){return _(this,null,function*(){const r=Pe(e),o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:yield e.getIdToken(),newEmail:t};n&&Qo(r.auth,o,n);const{email:a}=yield gx(r.auth,o);a!==e.email&&(yield e.reload())})}/**
1516
1516
  * @license
1517
1517
  * Copyright 2020 Google LLC
1518
1518
  *
@@ -1557,7 +1557,7 @@
1557
1557
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1558
1558
  * See the License for the specific language governing permissions and
1559
1559
  * limitations under the License.
1560
- */function qx(e){var t,n;if(!e)return null;const{providerId:r}=e,i=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},o=e.isNewUser||e.kind==="identitytoolkit#SignupNewUserResponse";if(!r&&(e!=null&&e.idToken)){const a=(n=(t=Uo(e.idToken))===null||t===void 0?void 0:t.firebase)===null||n===void 0?void 0:n.sign_in_provider;if(a){const s=a!=="anonymous"&&a!=="custom"?a:null;return new Hr(o,s)}}if(!r)return null;switch(r){case"facebook.com":return new Qx(o,i);case"github.com":return new Jx(o,i);case"google.com":return new Xx(o,i);case"twitter.com":return new Zx(o,i,e.screenName||null);case"custom":case"anonymous":return new Hr(o,null);default:return new Hr(o,r,i)}}class Hr{constructor(t,n,r={}){this.isNewUser=t,this.providerId=n,this.profile=r}}class ff extends Hr{constructor(t,n,r,i){super(t,n,r),this.username=i}}class Qx extends Hr{constructor(t,n){super(t,"facebook.com",n)}}class Jx extends ff{constructor(t,n){super(t,"github.com",n,typeof(n==null?void 0:n.login)=="string"?n==null?void 0:n.login:null)}}class Xx extends Hr{constructor(t,n){super(t,"google.com",n)}}class Zx extends ff{constructor(t,n,r){super(t,"twitter.com",n,r)}}function eC(e){const{user:t,_tokenResponse:n}=e;return t.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:qx(n)}function tC(e,t,n,r){return Pe(e).onIdTokenChanged(t,n,r)}function nC(e,t,n){return Pe(e).beforeAuthStateChanged(t,n)}/**
1560
+ */function Qx(e){var t,n;if(!e)return null;const{providerId:r}=e,i=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},o=e.isNewUser||e.kind==="identitytoolkit#SignupNewUserResponse";if(!r&&(e!=null&&e.idToken)){const a=(n=(t=Uo(e.idToken))===null||t===void 0?void 0:t.firebase)===null||n===void 0?void 0:n.sign_in_provider;if(a){const s=a!=="anonymous"&&a!=="custom"?a:null;return new Hr(o,s)}}if(!r)return null;switch(r){case"facebook.com":return new qx(o,i);case"github.com":return new Jx(o,i);case"google.com":return new Xx(o,i);case"twitter.com":return new Zx(o,i,e.screenName||null);case"custom":case"anonymous":return new Hr(o,null);default:return new Hr(o,r,i)}}class Hr{constructor(t,n,r={}){this.isNewUser=t,this.providerId=n,this.profile=r}}class ff extends Hr{constructor(t,n,r,i){super(t,n,r),this.username=i}}class qx extends Hr{constructor(t,n){super(t,"facebook.com",n)}}class Jx extends ff{constructor(t,n){super(t,"github.com",n,typeof(n==null?void 0:n.login)=="string"?n==null?void 0:n.login:null)}}class Xx extends Hr{constructor(t,n){super(t,"google.com",n)}}class Zx extends ff{constructor(t,n,r){super(t,"twitter.com",n,r)}}function eC(e){const{user:t,_tokenResponse:n}=e;return t.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:Qx(n)}function tC(e,t,n,r){return Pe(e).onIdTokenChanged(t,n,r)}function nC(e,t,n){return Pe(e).beforeAuthStateChanged(t,n)}/**
1561
1561
  * @license
1562
1562
  * Copyright 2020 Google LLC
1563
1563
  *
@@ -1602,7 +1602,7 @@
1602
1602
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1603
1603
  * See the License for the specific language governing permissions and
1604
1604
  * limitations under the License.
1605
- */function iC(e,t){return Ze(e,"POST","/v2/accounts/mfaEnrollment:start",Xe(e,t))}function oC(e,t){return Ze(e,"POST","/v2/accounts/mfaEnrollment:finalize",Xe(e,t))}function aC(e,t){return Ze(e,"POST","/v2/accounts/mfaEnrollment:withdraw",Xe(e,t))}class Cl{constructor(t){this.user=t,this.enrolledFactors=[],t._onReload(n=>{n.mfaInfo&&(this.enrolledFactors=n.mfaInfo.map(r=>ji._fromServerResponse(t.auth,r)))})}static _fromUser(t){return new Cl(t)}getSession(){return _(this,null,function*(){return br._fromIdtoken(yield this.user.getIdToken(),this.user)})}enroll(t,n){return _(this,null,function*(){const r=t,i=yield this.getSession(),o=yield Pn(this.user,r._process(this.user.auth,i,n));return yield this.user._updateTokensIfNecessary(o),this.user.reload()})}unenroll(t){return _(this,null,function*(){const n=typeof t=="string"?t:t.uid,r=yield this.user.getIdToken();try{const i=yield Pn(this.user,aC(this.user.auth,{idToken:r,mfaEnrollmentId:n}));this.enrolledFactors=this.enrolledFactors.filter(({uid:o})=>o!==n),yield this.user._updateTokensIfNecessary(i),yield this.user.reload()}catch(i){throw i}})}}const wl=new WeakMap;function sC(e){const t=Pe(e);return wl.has(t)||wl.set(t,Cl._fromUser(t)),wl.get(t)}const Qo="__sak";/**
1605
+ */function iC(e,t){return Ze(e,"POST","/v2/accounts/mfaEnrollment:start",Xe(e,t))}function oC(e,t){return Ze(e,"POST","/v2/accounts/mfaEnrollment:finalize",Xe(e,t))}function aC(e,t){return Ze(e,"POST","/v2/accounts/mfaEnrollment:withdraw",Xe(e,t))}class Cl{constructor(t){this.user=t,this.enrolledFactors=[],t._onReload(n=>{n.mfaInfo&&(this.enrolledFactors=n.mfaInfo.map(r=>ji._fromServerResponse(t.auth,r)))})}static _fromUser(t){return new Cl(t)}getSession(){return _(this,null,function*(){return br._fromIdtoken(yield this.user.getIdToken(),this.user)})}enroll(t,n){return _(this,null,function*(){const r=t,i=yield this.getSession(),o=yield Pn(this.user,r._process(this.user.auth,i,n));return yield this.user._updateTokensIfNecessary(o),this.user.reload()})}unenroll(t){return _(this,null,function*(){const n=typeof t=="string"?t:t.uid,r=yield this.user.getIdToken();try{const i=yield Pn(this.user,aC(this.user.auth,{idToken:r,mfaEnrollmentId:n}));this.enrolledFactors=this.enrolledFactors.filter(({uid:o})=>o!==n),yield this.user._updateTokensIfNecessary(i),yield this.user.reload()}catch(i){throw i}})}}const wl=new WeakMap;function sC(e){const t=Pe(e);return wl.has(t)||wl.set(t,Cl._fromUser(t)),wl.get(t)}const qo="__sak";/**
1606
1606
  * @license
1607
1607
  * Copyright 2019 Google LLC
1608
1608
  *
@@ -1617,7 +1617,7 @@
1617
1617
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1618
1618
  * See the License for the specific language governing permissions and
1619
1619
  * limitations under the License.
1620
- */class hf{constructor(t,n){this.storageRetriever=t,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(Qo,"1"),this.storage.removeItem(Qo),Promise.resolve(!0)):Promise.resolve(!1)}catch(t){return Promise.resolve(!1)}}_set(t,n){return this.storage.setItem(t,JSON.stringify(n)),Promise.resolve()}_get(t){const n=this.storage.getItem(t);return Promise.resolve(n?JSON.parse(n):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
1620
+ */class hf{constructor(t,n){this.storageRetriever=t,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(qo,"1"),this.storage.removeItem(qo),Promise.resolve(!0)):Promise.resolve(!1)}catch(t){return Promise.resolve(!1)}}_set(t,n){return this.storage.setItem(t,JSON.stringify(n)),Promise.resolve()}_get(t){const n=this.storage.getItem(t);return Promise.resolve(n?JSON.parse(n):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
1621
1621
  * @license
1622
1622
  * Copyright 2020 Google LLC
1623
1623
  *
@@ -1752,7 +1752,7 @@
1752
1752
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1753
1753
  * See the License for the specific language governing permissions and
1754
1754
  * limitations under the License.
1755
- */const gf="firebaseLocalStorageDb",mC=1,Zo="firebaseLocalStorage",mf="fbase_key";class Vi{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function ea(e,t){return e.transaction([Zo],t?"readwrite":"readonly").objectStore(Zo)}function vC(){const e=indexedDB.deleteDatabase(gf);return new Vi(e).toPromise()}function Il(){const e=indexedDB.open(gf,mC);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(Zo,{keyPath:mf})}catch(i){n(i)}}),e.addEventListener("success",()=>_(this,null,function*(){const r=e.result;r.objectStoreNames.contains(Zo)?t(r):(r.close(),yield vC(),t(yield Il()))}))})}function vf(e,t,n){return _(this,null,function*(){const r=ea(e,!0).put({[mf]:t,value:n});return new Vi(r).toPromise()})}function bC(e,t){return _(this,null,function*(){const n=ea(e,!1).get(t),r=yield new Vi(n).toPromise();return r===void 0?null:r.value})}function bf(e,t){const n=ea(e,!0).delete(t);return new Vi(n).toPromise()}const yC=800,xC=3;class yf{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}_openDb(){return _(this,null,function*(){return this.db?this.db:(this.db=yield Il(),this.db)})}_withRetries(t){return _(this,null,function*(){let n=0;for(;;)try{const r=yield this._openDb();return yield t(r)}catch(r){if(n++>xC)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return _(this,null,function*(){return Sl()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return _(this,null,function*(){this.receiver=Xo._getInstance(gC()),this.receiver._subscribe("keyChanged",(t,n)=>_(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(n.key)}})),this.receiver._subscribe("ping",(t,n)=>_(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return _(this,null,function*(){var t,n;if(this.activeServiceWorker=yield hC(),!this.activeServiceWorker)return;this.sender=new dC(this.activeServiceWorker);const r=yield this.sender._send("ping",{},800);r&&!((t=r[0])===null||t===void 0)&&t.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(t){return _(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||pC()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch(n){}})}_isAvailable(){return _(this,null,function*(){try{if(!indexedDB)return!1;const t=yield Il();return yield vf(t,Qo,"1"),yield bf(t,Qo),!0}catch(t){}return!1})}_withPendingWrite(t){return _(this,null,function*(){this.pendingWrites++;try{yield t()}finally{this.pendingWrites--}})}_set(t,n){return _(this,null,function*(){return this._withPendingWrite(()=>_(this,null,function*(){return yield this._withRetries(r=>vf(r,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)}))})}_get(t){return _(this,null,function*(){const n=yield this._withRetries(r=>bC(r,t));return this.localCache[t]=n,n})}_remove(t){return _(this,null,function*(){return this._withPendingWrite(()=>_(this,null,function*(){return yield this._withRetries(n=>bf(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)}))})}_poll(){return _(this,null,function*(){const t=yield this._withRetries(i=>{const o=ea(i,!1).getAll();return new Vi(o).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(t.length!==0)for(const{fbase_key:i,value:o}of t)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(o)&&(this.notifyListeners(i,o),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n})}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>_(this,null,function*(){return this._poll()}),yC)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}yf.type="LOCAL";const Gr=yf;/**
1755
+ */const gf="firebaseLocalStorageDb",mC=1,Zo="firebaseLocalStorage",mf="fbase_key";class Vi{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function ea(e,t){return e.transaction([Zo],t?"readwrite":"readonly").objectStore(Zo)}function vC(){const e=indexedDB.deleteDatabase(gf);return new Vi(e).toPromise()}function Il(){const e=indexedDB.open(gf,mC);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(Zo,{keyPath:mf})}catch(i){n(i)}}),e.addEventListener("success",()=>_(this,null,function*(){const r=e.result;r.objectStoreNames.contains(Zo)?t(r):(r.close(),yield vC(),t(yield Il()))}))})}function vf(e,t,n){return _(this,null,function*(){const r=ea(e,!0).put({[mf]:t,value:n});return new Vi(r).toPromise()})}function bC(e,t){return _(this,null,function*(){const n=ea(e,!1).get(t),r=yield new Vi(n).toPromise();return r===void 0?null:r.value})}function bf(e,t){const n=ea(e,!0).delete(t);return new Vi(n).toPromise()}const yC=800,xC=3;class yf{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}_openDb(){return _(this,null,function*(){return this.db?this.db:(this.db=yield Il(),this.db)})}_withRetries(t){return _(this,null,function*(){let n=0;for(;;)try{const r=yield this._openDb();return yield t(r)}catch(r){if(n++>xC)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return _(this,null,function*(){return Sl()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return _(this,null,function*(){this.receiver=Xo._getInstance(gC()),this.receiver._subscribe("keyChanged",(t,n)=>_(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(n.key)}})),this.receiver._subscribe("ping",(t,n)=>_(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return _(this,null,function*(){var t,n;if(this.activeServiceWorker=yield hC(),!this.activeServiceWorker)return;this.sender=new dC(this.activeServiceWorker);const r=yield this.sender._send("ping",{},800);r&&!((t=r[0])===null||t===void 0)&&t.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(t){return _(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||pC()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch(n){}})}_isAvailable(){return _(this,null,function*(){try{if(!indexedDB)return!1;const t=yield Il();return yield vf(t,qo,"1"),yield bf(t,qo),!0}catch(t){}return!1})}_withPendingWrite(t){return _(this,null,function*(){this.pendingWrites++;try{yield t()}finally{this.pendingWrites--}})}_set(t,n){return _(this,null,function*(){return this._withPendingWrite(()=>_(this,null,function*(){return yield this._withRetries(r=>vf(r,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)}))})}_get(t){return _(this,null,function*(){const n=yield this._withRetries(r=>bC(r,t));return this.localCache[t]=n,n})}_remove(t){return _(this,null,function*(){return this._withPendingWrite(()=>_(this,null,function*(){return yield this._withRetries(n=>bf(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)}))})}_poll(){return _(this,null,function*(){const t=yield this._withRetries(i=>{const o=ea(i,!1).getAll();return new Vi(o).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(t.length!==0)for(const{fbase_key:i,value:o}of t)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(o)&&(this.notifyListeners(i,o),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n})}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>_(this,null,function*(){return this._poll()}),yC)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}yf.type="LOCAL";const Gr=yf;/**
1756
1756
  * @license
1757
1757
  * Copyright 2020 Google LLC
1758
1758
  *
@@ -1797,7 +1797,7 @@
1797
1797
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1798
1798
  * See the License for the specific language governing permissions and
1799
1799
  * limitations under the License.
1800
- */const Al=Qd("rcb"),kC=new Oi(3e4,6e4);class _C{constructor(){var t;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((t=ft().grecaptcha)===null||t===void 0)&&t.render)}load(t,n=""){return se(PC(n),t,"argument-error"),this.shouldResolveImmediately(n)&&Rd(ft().grecaptcha)?Promise.resolve(ft().grecaptcha):new Promise((r,i)=>{const o=ft().setTimeout(()=>{i(vt(t,"network-request-failed"))},kC.get());ft()[Al]=()=>{ft().clearTimeout(o),delete ft()[Al];const s=ft().grecaptcha;if(!s||!Rd(s)){i(vt(t,"internal-error"));return}const c=s.render;s.render=(u,f)=>{const d=c(u,f);return this.counter++,d},this.hostLanguage=n,r(s)};const a=`${Xy()}?${Dr({onload:Al,render:"explicit",hl:n})}`;pl(a).catch(()=>{clearTimeout(o),i(vt(t,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(t){var n;return!!(!((n=ft().grecaptcha)===null||n===void 0)&&n.render)&&(t===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}function PC(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}class DC{load(t){return _(this,null,function*(){return new AC(t)})}clearedOneInstance(){}}/**
1800
+ */const Al=qd("rcb"),kC=new Oi(3e4,6e4);class _C{constructor(){var t;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((t=ft().grecaptcha)===null||t===void 0)&&t.render)}load(t,n=""){return se(PC(n),t,"argument-error"),this.shouldResolveImmediately(n)&&Rd(ft().grecaptcha)?Promise.resolve(ft().grecaptcha):new Promise((r,i)=>{const o=ft().setTimeout(()=>{i(vt(t,"network-request-failed"))},kC.get());ft()[Al]=()=>{ft().clearTimeout(o),delete ft()[Al];const s=ft().grecaptcha;if(!s||!Rd(s)){i(vt(t,"internal-error"));return}const c=s.render;s.render=(u,f)=>{const d=c(u,f);return this.counter++,d},this.hostLanguage=n,r(s)};const a=`${Xy()}?${Dr({onload:Al,render:"explicit",hl:n})}`;pl(a).catch(()=>{clearTimeout(o),i(vt(t,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(t){var n;return!!(!((n=ft().grecaptcha)===null||n===void 0)&&n.render)&&(t===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}function PC(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}class DC{load(t){return _(this,null,function*(){return new AC(t)})}clearedOneInstance(){}}/**
1801
1801
  * @license
1802
1802
  * Copyright 2020 Google LLC
1803
1803
  *
@@ -1932,7 +1932,7 @@
1932
1932
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1933
1933
  * See the License for the specific language governing permissions and
1934
1934
  * limitations under the License.
1935
- */function qC(e,t,n){return QC(e,t,n)}function QC(e,t,n){return _(this,null,function*(){if(Je(e.app))return Promise.reject(Ct(e));const r=et(e);Br(e,t,Rn),yield r._initializationPromise;const i=xr(r,n);return yield kl(i,r),i._openRedirect(r,t,"signInViaRedirect")})}function JC(e,t,n){return XC(e,t,n)}function XC(e,t,n){return _(this,null,function*(){const r=Pe(e);if(Br(r.auth,t,Rn),Je(r.auth.app))return Promise.reject(Ct(r.auth));yield r.auth._initializationPromise;const i=xr(r.auth,n);yield kl(i,r.auth);const o=yield If(r);return i._openRedirect(r.auth,t,"reauthViaRedirect",o)})}function ZC(e,t,n){return ew(e,t,n)}function ew(e,t,n){return _(this,null,function*(){const r=Pe(e);Br(r.auth,t,Rn),yield r.auth._initializationPromise;const i=xr(r.auth,n);yield Yo(!1,r,t.providerId),yield kl(i,r.auth);const o=yield If(r);return i._openRedirect(r.auth,t,"linkViaRedirect",o)})}function tw(e,t){return _(this,null,function*(){return yield et(e)._initializationPromise,ra(e,t,!1)})}function ra(e,t,n=!1){return _(this,null,function*(){if(Je(e.app))return Promise.reject(Ct(e));const r=et(e),i=xr(r,t),a=yield new Wi(r,i,n).execute();return a&&!n&&(delete a.user._redirectEventId,yield r._persistUserIfCurrent(a.user),yield r._setRedirectUser(null,t)),a})}function If(e){return _(this,null,function*(){const t=Ui(`${e.uid}:::`);return e._redirectEventId=t,yield e.auth._setRedirectUser(e),yield e.auth._persistUserIfCurrent(e),t})}/**
1935
+ */function QC(e,t,n){return qC(e,t,n)}function qC(e,t,n){return _(this,null,function*(){if(Je(e.app))return Promise.reject(Ct(e));const r=et(e);Br(e,t,Rn),yield r._initializationPromise;const i=xr(r,n);return yield kl(i,r),i._openRedirect(r,t,"signInViaRedirect")})}function JC(e,t,n){return XC(e,t,n)}function XC(e,t,n){return _(this,null,function*(){const r=Pe(e);if(Br(r.auth,t,Rn),Je(r.auth.app))return Promise.reject(Ct(r.auth));yield r.auth._initializationPromise;const i=xr(r.auth,n);yield kl(i,r.auth);const o=yield If(r);return i._openRedirect(r.auth,t,"reauthViaRedirect",o)})}function ZC(e,t,n){return ew(e,t,n)}function ew(e,t,n){return _(this,null,function*(){const r=Pe(e);Br(r.auth,t,Rn),yield r.auth._initializationPromise;const i=xr(r.auth,n);yield Yo(!1,r,t.providerId),yield kl(i,r.auth);const o=yield If(r);return i._openRedirect(r.auth,t,"linkViaRedirect",o)})}function tw(e,t){return _(this,null,function*(){return yield et(e)._initializationPromise,ra(e,t,!1)})}function ra(e,t,n=!1){return _(this,null,function*(){if(Je(e.app))return Promise.reject(Ct(e));const r=et(e),i=xr(r,t),a=yield new Wi(r,i,n).execute();return a&&!n&&(delete a.user._redirectEventId,yield r._persistUserIfCurrent(a.user),yield r._setRedirectUser(null,t)),a})}function If(e){return _(this,null,function*(){const t=Ui(`${e.uid}:::`);return e._redirectEventId=t,yield e.auth._setRedirectUser(e),yield e.auth._persistUserIfCurrent(e),t})}/**
1936
1936
  * @license
1937
1937
  * Copyright 2020 Google LLC
1938
1938
  *
@@ -1992,7 +1992,7 @@
1992
1992
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1993
1993
  * See the License for the specific language governing permissions and
1994
1994
  * limitations under the License.
1995
- */const lw=new Oi(3e4,6e4);function _f(){const e=ft().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}}function cw(e){return new Promise((t,n)=>{var r,i,o;function a(){_f(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{_f(),n(vt(e,"network-request-failed"))},timeout:lw.get()})}if(!((i=(r=ft().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)t(gapi.iframes.getContext());else if(!((o=ft().gapi)===null||o===void 0)&&o.load)a();else{const s=Qd("iframefcb");return ft()[s]=()=>{gapi.load?a():n(vt(e,"network-request-failed"))},pl(`${ex()}?onload=${s}`).catch(c=>n(c))}}).catch(t=>{throw ia=null,t})}let ia=null;function uw(e){return ia=ia||cw(e),ia}/**
1995
+ */const lw=new Oi(3e4,6e4);function _f(){const e=ft().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}}function cw(e){return new Promise((t,n)=>{var r,i,o;function a(){_f(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{_f(),n(vt(e,"network-request-failed"))},timeout:lw.get()})}if(!((i=(r=ft().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)t(gapi.iframes.getContext());else if(!((o=ft().gapi)===null||o===void 0)&&o.load)a();else{const s=qd("iframefcb");return ft()[s]=()=>{gapi.load?a():n(vt(e,"network-request-failed"))},pl(`${ex()}?onload=${s}`).catch(c=>n(c))}}).catch(t=>{throw ia=null,t})}let ia=null;function uw(e){return ia=ia||cw(e),ia}/**
1996
1996
  * @license
1997
1997
  * Copyright 2020 Google LLC.
1998
1998
  *
@@ -2082,7 +2082,7 @@
2082
2082
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2083
2083
  * See the License for the specific language governing permissions and
2084
2084
  * limitations under the License.
2085
- */function Ow(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function Rw(e){pr(new Yn("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:a,authDomain:s}=r.options;se(a&&!a.includes(":"),"invalid-api-key",{appName:r.name});const c={apiKey:a,authDomain:s,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Kd(e)},u=new Qy(r,i,o,c);return ox(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),pr(new Yn("auth-internal",t=>{const n=et(t.getProvider("auth").getImmediate());return(r=>new Dw(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),kn(Rf,Mf,Ow(e)),kn(Rf,Mf,"esm2017")}/**
2085
+ */function Ow(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function Rw(e){pr(new Yn("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:a,authDomain:s}=r.options;se(a&&!a.includes(":"),"invalid-api-key",{appName:r.name});const c={apiKey:a,authDomain:s,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Kd(e)},u=new qy(r,i,o,c);return ox(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),pr(new Yn("auth-internal",t=>{const n=et(t.getProvider("auth").getImmediate());return(r=>new Dw(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),kn(Rf,Mf,Ow(e)),kn(Rf,Mf,"esm2017")}/**
2086
2086
  * @license
2087
2087
  * Copyright 2021 Google LLC
2088
2088
  *
@@ -2142,7 +2142,7 @@
2142
2142
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2143
2143
  * See the License for the specific language governing permissions and
2144
2144
  * limitations under the License.
2145
- */const Yw=20;class Kw extends Af{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(t=>{this.resolveInitialized=t})}addPassiveListener(t){this.passiveListeners.add(t)}removePassiveListener(t){this.passiveListeners.delete(t)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(t){return this.resolveInitialized(),this.passiveListeners.forEach(n=>n(t)),super.onEvent(t)}initialized(){return _(this,null,function*(){yield this.initPromise})}}function qw(e,t,n=null){return{type:t,eventId:n,urlResponse:null,sessionId:Xw(),postBody:null,tenantId:e.tenantId,error:vt(e,"no-auth-event")}}function Qw(e,t){return Rl()._set(Ml(e),t)}function Bf(e){return _(this,null,function*(){const t=yield Rl()._get(Ml(e));return t&&(yield Rl()._remove(Ml(e))),t})}function Jw(e,t){var n,r;const i=eS(t);if(i.includes("/__/auth/callback")){const o=oa(i),a=o.firebaseError?Zw(decodeURIComponent(o.firebaseError)):null,s=(r=(n=a==null?void 0:a.code)===null||n===void 0?void 0:n.split("auth/"))===null||r===void 0?void 0:r[1],c=s?vt(s):null;return c?{type:e.type,eventId:e.eventId,tenantId:e.tenantId,error:c,urlResponse:null,sessionId:null,postBody:null}:{type:e.type,eventId:e.eventId,tenantId:e.tenantId,sessionId:e.sessionId,urlResponse:i,postBody:null}}return null}function Xw(){const e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<Yw;n++){const r=Math.floor(Math.random()*t.length);e.push(t.charAt(r))}return e.join("")}function Rl(){return Vt(Jo)}function Ml(e){return mr("authEvent",e.config.apiKey,e.name)}function Zw(e){try{return JSON.parse(e)}catch(t){return null}}function eS(e){const t=oa(e),n=t.link?decodeURIComponent(t.link):void 0,r=oa(n).link,i=t.deep_link_id?decodeURIComponent(t.deep_link_id):void 0;return oa(i).link||i||r||n||e}function oa(e){if(!(e!=null&&e.includes("?")))return{};const[t,...n]=e.split("?");return Or(n.join("?"))}/**
2145
+ */const Yw=20;class Kw extends Af{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(t=>{this.resolveInitialized=t})}addPassiveListener(t){this.passiveListeners.add(t)}removePassiveListener(t){this.passiveListeners.delete(t)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(t){return this.resolveInitialized(),this.passiveListeners.forEach(n=>n(t)),super.onEvent(t)}initialized(){return _(this,null,function*(){yield this.initPromise})}}function Qw(e,t,n=null){return{type:t,eventId:n,urlResponse:null,sessionId:Xw(),postBody:null,tenantId:e.tenantId,error:vt(e,"no-auth-event")}}function qw(e,t){return Rl()._set(Ml(e),t)}function Bf(e){return _(this,null,function*(){const t=yield Rl()._get(Ml(e));return t&&(yield Rl()._remove(Ml(e))),t})}function Jw(e,t){var n,r;const i=eS(t);if(i.includes("/__/auth/callback")){const o=oa(i),a=o.firebaseError?Zw(decodeURIComponent(o.firebaseError)):null,s=(r=(n=a==null?void 0:a.code)===null||n===void 0?void 0:n.split("auth/"))===null||r===void 0?void 0:r[1],c=s?vt(s):null;return c?{type:e.type,eventId:e.eventId,tenantId:e.tenantId,error:c,urlResponse:null,sessionId:null,postBody:null}:{type:e.type,eventId:e.eventId,tenantId:e.tenantId,sessionId:e.sessionId,urlResponse:i,postBody:null}}return null}function Xw(){const e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<Yw;n++){const r=Math.floor(Math.random()*t.length);e.push(t.charAt(r))}return e.join("")}function Rl(){return Vt(Jo)}function Ml(e){return mr("authEvent",e.config.apiKey,e.name)}function Zw(e){try{return JSON.parse(e)}catch(t){return null}}function eS(e){const t=oa(e),n=t.link?decodeURIComponent(t.link):void 0,r=oa(n).link,i=t.deep_link_id?decodeURIComponent(t.deep_link_id):void 0;return oa(i).link||i||r||n||e}function oa(e){if(!(e!=null&&e.includes("?")))return{};const[t,...n]=e.split("?");return Or(n.join("?"))}/**
2146
2146
  * @license
2147
2147
  * Copyright 2021 Google LLC
2148
2148
  *
@@ -2157,7 +2157,7 @@
2157
2157
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2158
2158
  * See the License for the specific language governing permissions and
2159
2159
  * limitations under the License.
2160
- */const tS=500;class nS{constructor(){this._redirectPersistence=er,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=ra,this._overrideRedirectResult=_l}_initialize(t){return _(this,null,function*(){const n=t._key();let r=this.eventManagers.get(n);return r||(r=new Kw(t),this.eventManagers.set(n,r),this.attachCallbackListeners(t,r)),r})}_openPopup(t){xt(t,"operation-not-supported-in-this-environment")}_openRedirect(t,n,r,i){return _(this,null,function*(){Hw(t);const o=yield this._initialize(t);yield o.initialized(),o.resetRedirect(),KC(),yield this._originValidation(t);const a=qw(t,r,i);yield Qw(t,a);const s=yield zw(t,a,n),c=yield Uw(s);return Vw(t,o,c)})}_isIframeWebStorageSupported(t,n){throw new Error("Method not implemented.")}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=jw(t)),this.originValidationPromises[n]}attachCallbackListeners(t,n){const{universalLinks:r,handleOpenURL:i,BuildInfo:o}=Cr(),a=setTimeout(()=>_(this,null,function*(){yield Bf(t),n.onEvent($f())}),tS),s=f=>_(this,null,function*(){clearTimeout(a);const d=yield Bf(t);let h=null;d&&(f!=null&&f.url)&&(h=Jw(d,f.url)),n.onEvent(h||$f())});typeof r!="undefined"&&typeof r.subscribe=="function"&&r.subscribe(null,s);const c=i,u=`${o.packageName.toLowerCase()}://`;Cr().handleOpenURL=f=>_(this,null,function*(){if(f.toLowerCase().startsWith(u)&&s({url:f}),typeof c=="function")try{c(f)}catch(d){console.error(d)}})}}const rS=nS;function $f(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:vt("no-auth-event")}}/**
2160
+ */const tS=500;class nS{constructor(){this._redirectPersistence=er,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=ra,this._overrideRedirectResult=_l}_initialize(t){return _(this,null,function*(){const n=t._key();let r=this.eventManagers.get(n);return r||(r=new Kw(t),this.eventManagers.set(n,r),this.attachCallbackListeners(t,r)),r})}_openPopup(t){xt(t,"operation-not-supported-in-this-environment")}_openRedirect(t,n,r,i){return _(this,null,function*(){Hw(t);const o=yield this._initialize(t);yield o.initialized(),o.resetRedirect(),KC(),yield this._originValidation(t);const a=Qw(t,r,i);yield qw(t,a);const s=yield zw(t,a,n),c=yield Uw(s);return Vw(t,o,c)})}_isIframeWebStorageSupported(t,n){throw new Error("Method not implemented.")}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=jw(t)),this.originValidationPromises[n]}attachCallbackListeners(t,n){const{universalLinks:r,handleOpenURL:i,BuildInfo:o}=Cr(),a=setTimeout(()=>_(this,null,function*(){yield Bf(t),n.onEvent($f())}),tS),s=f=>_(this,null,function*(){clearTimeout(a);const d=yield Bf(t);let h=null;d&&(f!=null&&f.url)&&(h=Jw(d,f.url)),n.onEvent(h||$f())});typeof r!="undefined"&&typeof r.subscribe=="function"&&r.subscribe(null,s);const c=i,u=`${o.packageName.toLowerCase()}://`;Cr().handleOpenURL=f=>_(this,null,function*(){if(f.toLowerCase().startsWith(u)&&s({url:f}),typeof c=="function")try{c(f)}catch(d){console.error(d)}})}}const rS=nS;function $f(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:vt("no-auth-event")}}/**
2161
2161
  * @license
2162
2162
  * Copyright 2017 Google LLC
2163
2163
  *
@@ -2277,7 +2277,7 @@
2277
2277
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2278
2278
  * See the License for the specific language governing permissions and
2279
2279
  * limitations under the License.
2280
- */const Ki=se;class Nl{constructor(t,n){if(this.app=t,n.isInitialized()){this._delegate=n.getImmediate(),this.linkUnderlyingAuth();return}const{apiKey:r}=t.options;Ki(r,"invalid-api-key",{appName:t.name}),Ki(r,"invalid-api-key",{appName:t.name});const i=typeof window!="undefined"?tr:void 0;this._delegate=n.initialize({options:{persistence:wS(r,t.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(wy),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Ln.getOrCreate(this._delegate.currentUser):null}get languageCode(){return this._delegate.languageCode}set languageCode(t){this._delegate.languageCode=t}get settings(){return this._delegate.settings}get tenantId(){return this._delegate.tenantId}set tenantId(t){this._delegate.tenantId=t}useDeviceLanguage(){this._delegate.useDeviceLanguage()}signOut(){return this._delegate.signOut()}useEmulator(t,n){gl(this._delegate,t,n)}applyActionCode(t){return Mx(this._delegate,t)}checkActionCode(t){return uf(this._delegate,t)}confirmPasswordReset(t,n){return Rx(this._delegate,t,n)}createUserWithEmailAndPassword(t,n){return _(this,null,function*(){return Nt(this._delegate,Bx(this._delegate,t,n))})}fetchProvidersForEmail(t){return this.fetchSignInMethodsForEmail(t)}fetchSignInMethodsForEmail(t){return Ux(this._delegate,t)}isSignInWithEmailLink(t){return Nx(this._delegate,t)}getRedirectResult(){return _(this,null,function*(){Ki(Bl(),this._delegate,"operation-not-supported-in-this-environment");const t=yield tw(this._delegate,tr);return t?Nt(this._delegate,Promise.resolve(t)):{credential:null,user:null}})}addFrameworkForLogging(t){iS(this._delegate,t)}onAuthStateChanged(t,n,r){const{next:i,error:o,complete:a}=Wf(t,n,r);return this._delegate.onAuthStateChanged(i,o,a)}onIdTokenChanged(t,n,r){const{next:i,error:o,complete:a}=Wf(t,n,r);return this._delegate.onIdTokenChanged(i,o,a)}sendSignInLinkToEmail(t,n){return Fx(this._delegate,t,n)}sendPasswordResetEmail(t,n){return Ox(this._delegate,t,n||void 0)}setPersistence(t){return _(this,null,function*(){gS(this._delegate,t);let n;switch(t){case Ht.SESSION:n=er;break;case Ht.LOCAL:n=(yield Vt(Gr)._isAvailable())?Gr:Jo;break;case Ht.NONE:n=Fr;break;default:return xt("argument-error",{appName:this._delegate.name})}return this._delegate.setPersistence(n)})}signInAndRetrieveDataWithCredential(t){return this.signInWithCredential(t)}signInAnonymously(){return Nt(this._delegate,kx(this._delegate))}signInWithCredential(t){return Nt(this._delegate,Ko(this._delegate,t))}signInWithCustomToken(t){return Nt(this._delegate,Dx(this._delegate,t))}signInWithEmailAndPassword(t,n){return Nt(this._delegate,$x(this._delegate,t,n))}signInWithEmailLink(t,n){return Nt(this._delegate,zx(this._delegate,t,n))}signInWithPhoneNumber(t,n){return Fl(this._delegate,LC(this._delegate,t,n))}signInWithPopup(t){return _(this,null,function*(){return Ki(Bl(),this._delegate,"operation-not-supported-in-this-environment"),Nt(this._delegate,VC(this._delegate,t,tr))})}signInWithRedirect(t){return _(this,null,function*(){return Ki(Bl(),this._delegate,"operation-not-supported-in-this-environment"),yield $l(this._delegate),qC(this._delegate,t,tr)})}updateCurrentUser(t){return this._delegate.updateCurrentUser(t)}verifyPasswordResetCode(t){return Lx(this._delegate,t)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}Nl.Persistence=Ht;function Wf(e,t,n){let r=e;typeof e!="function"&&({next:r,error:t,complete:n}=e);const i=r;return{next:a=>i(a&&Ln.getOrCreate(a)),error:t,complete:n}}function wS(e,t){const n=mS(e,t);if(typeof self!="undefined"&&!n.includes(Gr)&&n.push(Gr),typeof window!="undefined")for(const r of[Jo,er])n.includes(r)||n.push(r);return n.includes(Fr)||n.push(Fr),n}/**
2280
+ */const Ki=se;class Nl{constructor(t,n){if(this.app=t,n.isInitialized()){this._delegate=n.getImmediate(),this.linkUnderlyingAuth();return}const{apiKey:r}=t.options;Ki(r,"invalid-api-key",{appName:t.name}),Ki(r,"invalid-api-key",{appName:t.name});const i=typeof window!="undefined"?tr:void 0;this._delegate=n.initialize({options:{persistence:wS(r,t.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(wy),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Ln.getOrCreate(this._delegate.currentUser):null}get languageCode(){return this._delegate.languageCode}set languageCode(t){this._delegate.languageCode=t}get settings(){return this._delegate.settings}get tenantId(){return this._delegate.tenantId}set tenantId(t){this._delegate.tenantId=t}useDeviceLanguage(){this._delegate.useDeviceLanguage()}signOut(){return this._delegate.signOut()}useEmulator(t,n){gl(this._delegate,t,n)}applyActionCode(t){return Mx(this._delegate,t)}checkActionCode(t){return uf(this._delegate,t)}confirmPasswordReset(t,n){return Rx(this._delegate,t,n)}createUserWithEmailAndPassword(t,n){return _(this,null,function*(){return Nt(this._delegate,Bx(this._delegate,t,n))})}fetchProvidersForEmail(t){return this.fetchSignInMethodsForEmail(t)}fetchSignInMethodsForEmail(t){return Ux(this._delegate,t)}isSignInWithEmailLink(t){return Nx(this._delegate,t)}getRedirectResult(){return _(this,null,function*(){Ki(Bl(),this._delegate,"operation-not-supported-in-this-environment");const t=yield tw(this._delegate,tr);return t?Nt(this._delegate,Promise.resolve(t)):{credential:null,user:null}})}addFrameworkForLogging(t){iS(this._delegate,t)}onAuthStateChanged(t,n,r){const{next:i,error:o,complete:a}=Wf(t,n,r);return this._delegate.onAuthStateChanged(i,o,a)}onIdTokenChanged(t,n,r){const{next:i,error:o,complete:a}=Wf(t,n,r);return this._delegate.onIdTokenChanged(i,o,a)}sendSignInLinkToEmail(t,n){return Fx(this._delegate,t,n)}sendPasswordResetEmail(t,n){return Ox(this._delegate,t,n||void 0)}setPersistence(t){return _(this,null,function*(){gS(this._delegate,t);let n;switch(t){case Ht.SESSION:n=er;break;case Ht.LOCAL:n=(yield Vt(Gr)._isAvailable())?Gr:Jo;break;case Ht.NONE:n=Fr;break;default:return xt("argument-error",{appName:this._delegate.name})}return this._delegate.setPersistence(n)})}signInAndRetrieveDataWithCredential(t){return this.signInWithCredential(t)}signInAnonymously(){return Nt(this._delegate,kx(this._delegate))}signInWithCredential(t){return Nt(this._delegate,Ko(this._delegate,t))}signInWithCustomToken(t){return Nt(this._delegate,Dx(this._delegate,t))}signInWithEmailAndPassword(t,n){return Nt(this._delegate,$x(this._delegate,t,n))}signInWithEmailLink(t,n){return Nt(this._delegate,zx(this._delegate,t,n))}signInWithPhoneNumber(t,n){return Fl(this._delegate,LC(this._delegate,t,n))}signInWithPopup(t){return _(this,null,function*(){return Ki(Bl(),this._delegate,"operation-not-supported-in-this-environment"),Nt(this._delegate,VC(this._delegate,t,tr))})}signInWithRedirect(t){return _(this,null,function*(){return Ki(Bl(),this._delegate,"operation-not-supported-in-this-environment"),yield $l(this._delegate),QC(this._delegate,t,tr)})}updateCurrentUser(t){return this._delegate.updateCurrentUser(t)}verifyPasswordResetCode(t){return Lx(this._delegate,t)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}Nl.Persistence=Ht;function Wf(e,t,n){let r=e;typeof e!="function"&&({next:r,error:t,complete:n}=e);const i=r;return{next:a=>i(a&&Ln.getOrCreate(a)),error:t,complete:n}}function wS(e,t){const n=mS(e,t);if(typeof self!="undefined"&&!n.includes(Gr)&&n.push(Gr),typeof window!="undefined")for(const r of[Jo,er])n.includes(r)||n.push(r);return n.includes(Fr)||n.push(Fr),n}/**
2281
2281
  * @license
2282
2282
  * Copyright 2020 Google LLC
2283
2283
  *
@@ -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,"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={};/**
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(B({},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(B({},o),{from:n.from})),n.to&&(o=q(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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=B({},this.mainQueryParams);return r&&(s.group_id=r),yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(q(B({},s),{limit:i.toString()})),{headers:q(B({},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(B({},this.mainQueryParams),{limit:r.toString()})),{headers:q(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},this.headers),{Authorization:"Bearer "+c})})}));X(this,"getEntityParticipations",(n,r,i)=>_(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=q(B({},this.mainQueryParams),{from_date:r,to_date:i}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:q(B({},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(B({},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(B({},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(B({},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(B({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:q(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));X(this,"exportLeadsPerEntity",n=>_(this,null,function*(){const r="/leads/export?",i=q(B({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:q(B({},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(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:q(B({},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(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:q(B({},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(B({},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(B({},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(B({},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(B({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:q(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},this.mainQueryParams),{post_ids:u,reason:i})}else c=q(B({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(c),{headers:q(B({},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(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:q(B({},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(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:q(B({},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(B(B({},this.mainQueryParams),n)),{headers:q(B({},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(B(B({},this.mainQueryParams),n)),{headers:q(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},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(B({},this.headers),{Authorization:"Bearer "+o})})}));X(this,"createEventGame",n=>_(this,null,function*(){const r="/custom/event?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:q(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));X(this,"updateEventGame",(n,r)=>_(this,null,function*(){const i=`/custom/event/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:q(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));X(this,"resolveEventGamePredictions",n=>_(this,null,function*(){const r="/custom/event/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:q(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));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
  *
@@ -2330,24 +2330,24 @@
2330
2330
  *
2331
2331
  * This source code is licensed under the MIT license found in the
2332
2332
  * LICENSE file in the root directory of this source tree.
2333
- */var jl=Symbol.for("react.transitional.element"),Ul=Symbol.for("react.portal"),la=Symbol.for("react.fragment"),ca=Symbol.for("react.strict_mode"),ua=Symbol.for("react.profiler"),da=Symbol.for("react.consumer"),fa=Symbol.for("react.context"),ha=Symbol.for("react.forward_ref"),pa=Symbol.for("react.suspense"),ga=Symbol.for("react.suspense_list"),ma=Symbol.for("react.memo"),va=Symbol.for("react.lazy"),eI=Symbol.for("react.offscreen"),tI=Symbol.for("react.client.reference");function Zt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jl:switch(e=e.type,e){case la:case ua:case ca:case pa:case ga:return e;default:switch(e=e&&e.$$typeof,e){case fa:case ha:case va:case ma:return e;case da:return e;default:return t}}case Ul:return t}}}je.ContextConsumer=da,je.ContextProvider=fa,je.Element=jl,je.ForwardRef=ha,je.Fragment=la,je.Lazy=va,je.Memo=ma,je.Portal=Ul,je.Profiler=ua,je.StrictMode=ca,je.Suspense=pa,je.SuspenseList=ga,je.isContextConsumer=function(e){return Zt(e)===da},je.isContextProvider=function(e){return Zt(e)===fa},je.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jl},je.isForwardRef=function(e){return Zt(e)===ha},je.isFragment=function(e){return Zt(e)===la},je.isLazy=function(e){return Zt(e)===va},je.isMemo=function(e){return Zt(e)===ma},je.isPortal=function(e){return Zt(e)===Ul},je.isProfiler=function(e){return Zt(e)===ua},je.isStrictMode=function(e){return Zt(e)===ca},je.isSuspense=function(e){return Zt(e)===pa},je.isSuspenseList=function(e){return Zt(e)===ga},je.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===la||e===ua||e===ca||e===pa||e===ga||e===eI||typeof e=="object"&&e!==null&&(e.$$typeof===va||e.$$typeof===ma||e.$$typeof===fa||e.$$typeof===da||e.$$typeof===ha||e.$$typeof===tI||e.getModuleId!==void 0)},je.typeOf=Zt,th.exports=je;var nh=th.exports;function xe(e){if(typeof e!="string")throw new Error(sa(7));return e.charAt(0).toUpperCase()+e.slice(1)}function rh(e,t){var n,r;return K.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const nI=typeof window!="undefined"?K.useLayoutEffect:K.useEffect;let ih=0;function rI(e){const[t,n]=K.useState(e),r=e||t;return K.useEffect(()=>{t==null&&(ih+=1,n(`mui-${ih}`))},[t]),r}const oh=K.useId;function Qi(e){if(oh!==void 0){const t=oh();return e!=null?e:t}return rI(e)}function Vl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=K.useRef(e!==void 0),[o,a]=K.useState(t),s=i?e:o,c=K.useCallback(u=>{i||a(u)},[]);return[s,c]}class Hl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Hl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let ba=!0,Wl=!1;const iI=new Hl,oI={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function aI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&oI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function sI(e){e.metaKey||e.altKey||e.ctrlKey||(ba=!0)}function Gl(){ba=!1}function lI(){this.visibilityState==="hidden"&&Wl&&(ba=!0)}function cI(e){e.addEventListener("keydown",sI,!0),e.addEventListener("mousedown",Gl,!0),e.addEventListener("pointerdown",Gl,!0),e.addEventListener("touchstart",Gl,!0),e.addEventListener("visibilitychange",lI,!0)}function uI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return ba||aI(t)}function ah(){const e=K.useCallback(i=>{i!=null&&cI(i.ownerDocument)},[]),t=K.useRef(!1);function n(){return t.current?(Wl=!0,iI.start(100,()=>{Wl=!1}),t.current=!1,!0):!1}function r(i){return uI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function sh(e,t){const n=R({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=R({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=R({},o),Object.keys(i).forEach(a=>{n[r][a]=sh(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function ht(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const s=t(a);s!==""&&o.push(s),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const lh=e=>e,dI=(()=>{let e=lh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=lh}}})(),fI={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ch(e,t,n="Mui"){const r=fI[t];return r?`${n}-${r}`:`${dI.generate(e)}-${t}`}function hI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=ch(e,i,n)}),r}function Yl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:s,rootElementName:c}=e,u=K.useRef(null),[f,d]=K.useState(!1),{isFocusVisibleRef:h,onFocus:g,onBlur:v,ref:m}=ah(),[b,x]=K.useState(!1);t&&!n&&b&&x(!1),K.useEffect(()=>{h.current=b},[b,h]);const[S,C]=JS({rootElementName:c!=null?c:r||a?"a":void 0,componentName:"Button"}),I=j=>F=>{var M;b&&F.preventDefault(),(M=j.onMouseLeave)==null||M.call(j,F)},w=j=>F=>{var M;v(F),h.current===!1&&x(!1),(M=j.onBlur)==null||M.call(j,F)},A=j=>F=>{var M;if(u.current||(u.current=F.currentTarget),g(F),h.current===!0){var V;x(!0),(V=j.onFocusVisible)==null||V.call(j,F)}(M=j.onFocus)==null||M.call(j,F)},E=()=>{const j=u.current;return S==="BUTTON"||S==="INPUT"&&["button","submit","reset"].includes(j==null?void 0:j.type)||S==="A"&&(j==null?void 0:j.href)},k=j=>F=>{if(!t){var M;(M=j.onClick)==null||M.call(j,F)}},B=j=>F=>{var M;t||(d(!0),document.addEventListener("mouseup",()=>{d(!1)},{once:!0})),(M=j.onMouseDown)==null||M.call(j,F)},G=j=>F=>{var M;if((M=j.onKeyDown)==null||M.call(j,F),!F.defaultMuiPrevented&&(F.target===F.currentTarget&&!E()&&F.key===" "&&F.preventDefault(),F.target===F.currentTarget&&F.key===" "&&!t&&d(!0),F.target===F.currentTarget&&!E()&&F.key==="Enter"&&!t)){var V;(V=j.onClick)==null||V.call(j,F),F.preventDefault()}},O=j=>F=>{var M;if(F.target===F.currentTarget&&d(!1),(M=j.onKeyUp)==null||M.call(j,F),F.target===F.currentTarget&&!E()&&!t&&F.key===" "&&!F.defaultMuiPrevented){var V;(V=j.onClick)==null||V.call(j,F)}},T=cn(C,i,m,u),N={};return o!==void 0&&(N.tabIndex=o),S==="BUTTON"?(N.type=s!=null?s:"button",n?N["aria-disabled"]=t:N.disabled=t):S==="INPUT"?s&&["button","submit","reset"].includes(s)&&(n?N["aria-disabled"]=t:N.disabled=t):S!==""&&(!r&&!a&&(N.role="button",N.tabIndex=o!=null?o:0),t&&(N["aria-disabled"]=t,N.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(j={})=>{const F=R({},Bn(e),Bn(j)),M=R({type:s},F,N,j,{onBlur:w(F),onClick:k(F),onFocus:A(F),onKeyDown:G(F),onKeyUp:O(F),onMouseDown:B(F),onMouseLeave:I(F),ref:T});return delete M.onFocusVisible,M},focusVisible:b,setFocusVisible:x,active:f,rootRef:T}}function pI(e,t){return e===t}const Kl={},uh=()=>{};function ql(e,t){const n=R({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function gI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,s=K.useRef(n);K.useEffect(()=>{if(a.current===null)return;const c=ql(s.current,o);Object.keys(t).forEach(u=>{var f;const d=(f=r[u])!=null?f:pI,h=t[u],g=c[u];if(g==null&&h!=null||g!=null&&h==null||g!=null&&h!=null&&!d(h,g)){var v,m;i==null||i((v=a.current.event)!=null?v:null,u,h,(m=a.current.type)!=null?m:"",t)}}),s.current=t,a.current=null},[s,t,a,i,r,o])}function mI(e){const t=K.useRef(null),{reducer:n,initialState:r,controlledProps:i=Kl,stateComparers:o=Kl,onStateChange:a=uh,actionContext:s,componentName:c=""}=e;K.useRef(i);const u=K.useCallback((g,v)=>{t.current=v;const m=ql(g,i);return n(m,v)},[i,n]),[f,d]=K.useReducer(u,r),h=K.useCallback(g=>{d(R({},g,{context:s}))},[s]);return gI({nextState:f,initialState:r,stateComparers:o!=null?o:Kl,onStateChange:a!=null?a:uh,controlledProps:i,lastActionRef:t}),[ql(f,i),h]}const vI=K.createContext(void 0);function bI(){return K.useContext(vI)}function yI(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:s=!1,value:c,inputRef:u}=e,f=bI();let d,h,g,v,m;if(f){var b,x,S;d=void 0,h=(b=f.disabled)!=null?b:!1,g=(x=f.error)!=null?x:!1,v=(S=f.required)!=null?S:!1,m=f.value}else d=t,h=n,g=r,v=s,m=c;const{current:C}=K.useRef(m!=null),I=K.useCallback(j=>{},[]),w=K.useRef(null),A=cn(w,u,I),[E,k]=K.useState(!1);K.useEffect(()=>{!f&&h&&E&&(k(!1),i==null||i())},[f,h,E,i]);const B=j=>F=>{var M;if(f!=null&&f.disabled){F.stopPropagation();return}if((M=j.onFocus)==null||M.call(j,F),f&&f.onFocus){var V;f==null||(V=f.onFocus)==null||V.call(f)}else k(!0)},G=j=>F=>{var M;(M=j.onBlur)==null||M.call(j,F),f&&f.onBlur?f.onBlur():k(!1)},O=j=>(F,...M)=>{var V,Y;if(!C&&(F.target||w.current)==null)throw new Error(sa(17));f==null||(V=f.onChange)==null||V.call(f,F),(Y=j.onChange)==null||Y.call(j,F,...M)},T=j=>F=>{var M;w.current&&F.currentTarget===F.target&&w.current.focus(),(M=j.onClick)==null||M.call(j,F)};return{disabled:h,error:g,focused:E,formControlContext:f,getInputProps:(j={})=>{const M=R({},{onBlur:i,onChange:o,onFocus:a},Bn(j)),V=R({},M,{onBlur:G(M),onChange:O(M),onFocus:B(M)});return R({},V,{"aria-invalid":g||void 0,defaultValue:d,value:m,required:v,disabled:h},j,{ref:A},V)},getRootProps:(j={})=>{const F=Bn(e,["onBlur","onChange","onFocus"]),M=R({},F,Bn(j));return R({},j,M,{onClick:T(M)})},inputRef:A,required:v,value:m}}const wt={blur:"list:blur",focus:"list:focus",itemClick:"list:itemClick",itemHover:"list:itemHover",itemsChange:"list:itemsChange",keyDown:"list:keyDown",resetHighlight:"list:resetHighlight",highlightLast:"list:highlightLast",textNavigation:"list:textNavigation",clearSelection:"list:clearSelection"};function xI(e,t,n,r,i,o){if(n.length===0||!r&&n.every((s,c)=>i(s,c)))return-1;let a=e;for(;;){if(!o&&t==="next"&&a===n.length||!o&&t==="previous"&&a===-1)return-1;if(r?!1:i(n[a],a))a+=t==="next"?1:-1,o&&(a=(a+n.length)%n.length);else return a}}function Ot(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:s,itemComparer:c,focusManagement:u}=n,f=u==="DOM"?0:-1,d=i.length-1,h=e==null?-1:i.findIndex(x=>c(x,e));let g,v,m=!a;switch(t){case"reset":if(f===-1)return null;g=0,v="next",m=!1;break;case"start":g=0,v="next",m=!1;break;case"end":g=d,v="previous",m=!1;break;default:{const x=h+t;x<0?!m&&h!==-1||Math.abs(t)>1?(g=0,v="next"):(g=d,v="previous"):x>d?!m||Math.abs(t)>1?(g=d,v="previous"):(g=0,v="next"):(g=x,v=t>=0?"next":"previous")}}const b=xI(g,v,i,s,o,m);return b===-1&&e!==null&&!o(e,h)?e:(r=i[b])!=null?r:null}function CI(e,t,n,r){return n==="none"?[]:n==="single"?r(t[0],e)?t:[e]:t.some(i=>r(i,e))?t.filter(i=>!r(i,e)):[...t,e]}function dh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:s}=t,c=a.findIndex(f=>r(e,f));if(i(e,c))return t;const u=CI(e,s,o,r);return R({},t,{selectedValues:u,highlightedValue:e})}function wI(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return R({},t,{highlightedValue:Ot(r,"start",n)});case"End":return R({},t,{highlightedValue:Ot(r,"end",n)});case"PageUp":return R({},t,{highlightedValue:Ot(r,-o,n)});case"PageDown":return R({},t,{highlightedValue:Ot(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return R({},t,{highlightedValue:Ot(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return R({},t,{highlightedValue:Ot(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return R({},t,{highlightedValue:Ot(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return R({},t,{highlightedValue:Ot(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:dh(t.highlightedValue,t,n)}return t}function SI(e,t){return t.focusManagement==="DOM"?e:R({},e,{highlightedValue:null})}function II(e,t,n){var r;const i=(r=n(e))==null?void 0:r.trim().toLowerCase();return!i||i.length===0?!1:i.indexOf(t)===0}function AI(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,s=t.length>1;let c=s?e.highlightedValue:Ot(e.highlightedValue,1,n);for(let u=0;u<r.length;u+=1){if(!c||!s&&e.highlightedValue===c)return e;if(II(c,t,a)&&(!i(c,r.indexOf(c))||o))return R({},e,{highlightedValue:c});c=Ot(c,1,n)}return e}function TI(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let s=null;if(n.highlightedValue!=null){var c;s=(c=e.find(d=>o(d,n.highlightedValue)))!=null?c:null}else a==="DOM"&&t.length===0&&(s=Ot(null,"reset",r));const f=((i=n.selectedValues)!=null?i:[]).filter(d=>e.some(h=>o(h,d)));return R({},n,{highlightedValue:s,selectedValues:f})}function EI(e,t){return R({},e,{highlightedValue:Ot(null,"reset",t)})}function kI(e,t){return R({},e,{highlightedValue:Ot(null,"end",t)})}function _I(e,t){return R({},e,{selectedValues:[],highlightedValue:Ot(null,"reset",t)})}function fh(e,t){const{type:n,context:r}=t;switch(n){case wt.keyDown:return wI(t.key,e,r);case wt.itemClick:return dh(t.item,e,r);case wt.blur:return SI(e,r);case wt.textNavigation:return AI(e,t.searchString,r);case wt.itemsChange:return TI(t.items,t.previousItems,e,r);case wt.resetHighlight:return EI(e,r);case wt.highlightLast:return kI(e,r);case wt.clearSelection:return _I(e,r);default:return e}}const PI=500;function DI(e){const t=K.useRef({searchString:"",lastTime:null});return K.useCallback(n=>{if(n.key.length===1&&n.key!==" "){const r=t.current,i=n.key.toLowerCase(),o=performance.now();r.searchString.length>0&&r.lastTime&&o-r.lastTime>PI?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const hh={},OI=()=>{},RI=(e,t)=>e===t,MI=()=>!1,LI=e=>typeof e=="string"?e:String(e),BI=()=>({highlightedValue:null,selectedValues:[]});function $I(e){const{controlledProps:t=hh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=BI,getItemDomElement:a,getItemId:s,isItemDisabled:c=MI,rootRef:u,onStateChange:f=OI,items:d,itemComparer:h=RI,getItemAsString:g=LI,onChange:v,onHighlightChange:m,onItemsChange:b,orientation:x="vertical",pageSize:S=5,reducerActionContext:C=hh,selectionMode:I="single",stateReducer:w,componentName:A="useList"}=e,E=K.useRef(null),k=cn(u,E),B=K.useCallback((ae,ee,ne)=>{if(m==null||m(ae,ee,ne),i==="DOM"&&ee!=null&&(ne===wt.itemClick||ne===wt.keyDown||ne===wt.textNavigation)){var J;a==null||(J=a(ee))==null||J.focus()}},[a,m,i]),G=K.useMemo(()=>({highlightedValue:h,selectedValues:(ae,ee)=>Jf(ae,ee,h)}),[h]),O=K.useCallback((ae,ee,ne,J,ce)=>{switch(f==null||f(ae,ee,ne,J,ce),ee){case"highlightedValue":B(ae,ne,J);break;case"selectedValues":v==null||v(ae,ne,J);break}},[B,v,f]),T=K.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:c,itemComparer:h,items:d,getItemAsString:g,onHighlightChange:B,orientation:x,pageSize:S,selectionMode:I,stateComparers:G}),[n,r,i,c,h,d,g,B,x,S,I,G]),N=o(),H=w!=null?w:fh,j=K.useMemo(()=>R({},C,T),[C,T]),[F,M]=mI({reducer:H,actionContext:j,initialState:N,controlledProps:t,stateComparers:G,onStateChange:O,componentName:A}),{highlightedValue:V,selectedValues:Y}=F,Z=DI((ae,ee)=>M({type:wt.textNavigation,event:ee,searchString:ae})),D=K.useRef([]);K.useEffect(()=>{Jf(D.current,d,h)||(M({type:wt.itemsChange,event:null,items:d,previousItems:D.current}),D.current=d,b==null||b(d))},[d,h,M,b]);const L=ae=>ee=>{var ne;if((ne=ae.onKeyDown)==null||ne.call(ae,ee),ee.defaultMuiPrevented)return;const J=["Home","End","PageUp","PageDown"];x==="vertical"?J.push("ArrowUp","ArrowDown"):J.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&J.push(" ","Enter"),J.includes(ee.key)&&ee.preventDefault(),M({type:wt.keyDown,key:ee.key,event:ee}),Z(ee)},U=ae=>ee=>{var ne,J;(ne=ae.onBlur)==null||ne.call(ae,ee),!ee.defaultMuiPrevented&&((J=E.current)!=null&&J.contains(ee.relatedTarget)||M({type:wt.blur,event:ee}))},W=(ae={})=>{const ee=Bn(ae);return R({},ae,{"aria-activedescendant":i==="activeDescendant"&&V!=null?s(V):void 0,tabIndex:i==="DOM"?-1:0,ref:k},ee,{onBlur:U(ee),onKeyDown:L(ee)})},ie=K.useCallback(ae=>{const ee=(Y!=null?Y:[]).some(ce=>ce!=null&&h(ae,ce)),ne=V!=null&&h(ae,V);return{focusable:i==="DOM",highlighted:ne,selected:ee}},[h,Y,V,i]),le=K.useMemo(()=>({dispatch:M,getItemState:ie}),[M,ie]);return K.useDebugValue({state:F}),{contextValue:le,dispatch:M,getRootProps:W,rootRef:k,state:F}}const ph=K.createContext(null);function FI(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=K.useContext(ph);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:s,focusable:c}=o(n),u=K.useCallback(g=>v=>{var m;(m=g.onClick)==null||m.call(g,v),!v.defaultPrevented&&i({type:wt.itemClick,item:n,event:v})},[i,n]),f=K.useCallback(g=>v=>{var m;(m=g.onMouseOver)==null||m.call(g,v),!v.defaultPrevented&&i({type:wt.itemHover,item:n,event:v})},[i,n]);let d;return c&&(d=a?0:-1),{getRootProps:(g={})=>{const v=Bn(g);return R({},g,{onClick:u(v),onPointerOver:t?f(v):void 0,tabIndex:d})},highlighted:a,selected:s}}const Ql=K.createContext(null);function NI(e){const t=Array.from(e.keys()).map(n=>{const r=e.get(n);return{key:n,subitem:r}});return t.sort((n,r)=>{const i=n.subitem.ref.current,o=r.subitem.ref.current;return i===null||o===null||i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}),new Map(t.map(n=>[n.key,n.subitem]))}function gh(){const[e,t]=K.useState(new Map),n=K.useRef(new Set),r=K.useCallback(function(u){n.current.delete(u),t(f=>{const d=new Map(f);return d.delete(u),d})},[]),i=K.useCallback(function(u,f){let d;return typeof u=="function"?d=u(n.current):d=u,n.current.add(d),t(h=>{const g=new Map(h);return g.set(d,f),g}),{id:d,deregister:()=>r(d)}},[r]),o=K.useMemo(()=>NI(e),[e]),a=K.useCallback(function(u){return Array.from(o.keys()).indexOf(u)},[o]);return{contextValue:K.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function mh(e,t){const n=K.useContext(Ql);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=K.useState(typeof e=="function"?void 0:e);return nI(()=>{const{id:a,deregister:s}=r(e,t);return o(a),s},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function zI(e,t){return function(r={}){const i=R({},r,e(r));return R({},i,t(i))}}const jI=Math.min,UI=Math.max,ya=Math.round,xa=Math.floor,Ca=e=>({x:e,y:e});function VI(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function vh(e){return yh(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bh(e){var t;return(t=(yh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yh(e){return e instanceof Node||e instanceof Nn(e).Node}function HI(e){return e instanceof Element||e instanceof Nn(e).Element}function Jl(e){return e instanceof HTMLElement||e instanceof Nn(e).HTMLElement}function xh(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function Ch(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Xl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function WI(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function GI(e){return["html","body","#document"].includes(vh(e))}function Xl(e){return Nn(e).getComputedStyle(e)}function YI(e){if(vh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xh(e)&&e.host||bh(e);return xh(t)?t.host:t}function wh(e){const t=YI(e);return GI(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jl(t)&&Ch(t)?t:wh(t)}function wa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=wh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const s=Zl(a);return t.concat(a,a.visualViewport||[],Ch(i)?i:[],s&&n?wa(s):[])}return t.concat(i,wa(i,[],n))}function Zl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KI(e){const t=Xl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jl(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ya(n)!==o||ya(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function ec(e){return HI(e)?e:e.contextElement}function Sh(e){const t=ec(e);if(!Jl(t))return Ca(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=KI(t);let a=(o?ya(n.width):n.width)/r,s=(o?ya(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const qI=Ca(0);function QI(e){const t=Nn(e);return!WI()||!t.visualViewport?qI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JI(e,t,n){return!1}function Ih(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=ec(e);let a=Ca(1);t&&(a=Sh(e));const s=JI()?QI(o):Ca(0);let c=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(o){const h=Nn(o),g=r;let v=h,m=Zl(v);for(;m&&r&&g!==v;){const b=Sh(m),x=m.getBoundingClientRect(),S=Xl(m),C=x.left+(m.clientLeft+parseFloat(S.paddingLeft))*b.x,I=x.top+(m.clientTop+parseFloat(S.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,d*=b.y,c+=C,u+=I,v=Nn(m),m=Zl(v)}}return VI({width:f,height:d,x:c,y:u})}function XI(e,t){let n=null,r;const i=bh(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),o();const{left:u,top:f,width:d,height:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;const g=xa(f),v=xa(i.clientWidth-(u+d)),m=xa(i.clientHeight-(f+h)),b=xa(u),S={rootMargin:-g+"px "+-v+"px "+-m+"px "+-b+"px",threshold:UI(0,jI(1,c))||1};let C=!0;function I(w){const A=w[0].intersectionRatio;if(A!==c){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(I,Q($({},S),{root:i.ownerDocument}))}catch(w){n=new IntersectionObserver(I,S)}n.observe(e)}return a(!0),o}function ZI(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=ec(e),f=i||o?[...u?wa(u):[],...wa(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const d=u&&s?XI(u,n):null;let h=-1,g=null;a&&(g=new ResizeObserver(x=>{let[S]=x;S&&S.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let v,m=c?Ih(e):null;c&&b();function b(){const x=Ih(e);m&&(x.x!==m.x||x.y!==m.y||x.width!==m.width||x.height!==m.height)&&n(),m=x,v=requestAnimationFrame(b)}return n(),()=>{var x;f.forEach(S=>{i&&S.removeEventListener("scroll",n),o&&S.removeEventListener("resize",n)}),d==null||d(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(v)}}function eA(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:s,readOnly:c,required:u}=e,[f,d]=Vl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=k=>B=>{var G;B.nativeEvent.defaultPrevented||(d(B.target.checked),o==null||o(B),(G=k.onChange)==null||G.call(k,B))},{isFocusVisibleRef:g,onBlur:v,onFocus:m,ref:b}=ah(),[x,S]=K.useState(!1);r&&x&&S(!1),K.useEffect(()=>{g.current=x},[x,g]);const C=K.useRef(null),I=k=>B=>{var G;C.current||(C.current=B.currentTarget),m(B),g.current===!0&&(S(!0),s==null||s(B)),a==null||a(B),(G=k.onFocus)==null||G.call(k,B)},w=k=>B=>{var G;v(B),g.current===!1&&S(!1),i==null||i(B),(G=k.onBlur)==null||G.call(k,B)},A=cn(b,C);return{checked:f,disabled:!!r,focusVisible:x,getInputProps:(k={})=>R({checked:t,defaultChecked:n,disabled:r,readOnly:c,ref:A,required:u,type:"checkbox",role:"switch","aria-checked":t},k,{onChange:h(k),onFocus:I(k),onBlur:w(k)}),inputRef:A,readOnly:!!c}}function tA(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[s,c]=Vl({controlled:t,default:n,name:"Tabs",state:"value"}),u=K.useCallback((b,x)=>{c(x),r==null||r(b,x)},[r,c]),{subitems:f,contextValue:d}=gh(),h=K.useRef(()=>{}),g=K.useCallback(b=>{var x;return(x=f.get(b))==null?void 0:x.id},[f]),v=K.useCallback(b=>h.current(b),[]),m=K.useCallback(b=>{h.current=b},[]);return{contextValue:R({direction:o,getTabId:v,getTabPanelId:g,onSelected:u,orientation:i,registerTabIdLookup:m,selectionFollowsFocus:a,value:s},d)}}const Ah=K.createContext(null);function Sa(){const e=K.useContext(Ah);if(e==null)throw new Error("No TabsContext provided");return e}function nA(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:s,registerTabIdLookup:c,selectionFollowsFocus:u,totalSubitemCount:f,value:d,getTabId:h,getTabPanelId:g}=t,v=K.useMemo(()=>({getItemIndex:i,registerItem:s,totalSubitemCount:f}),[s,i,f]),m=K.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:g,onSelected:o,orientation:a,registerTabIdLookup:c,selectionFollowsFocus:u,value:d}),[r,h,g,o,a,c,u,d]);return l.jsx(Ql.Provider,{value:v,children:l.jsx(Ah.Provider,{value:m,children:n})})}function rA(e){return e.size}function iA(e){const{value:t,id:n,rootRef:r}=e,i=Sa();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,s=Qi(n),c=K.useRef(null),u=cn(c,r),f=K.useMemo(()=>({id:s,ref:c}),[s]),{id:d}=mh(t!=null?t:rA,f),h=d!==o,g=d!==void 0?a(d):void 0;return{hidden:h,getRootProps:(m={})=>R({"aria-labelledby":g!=null?g:void 0,hidden:h,id:s!=null?s:void 0},m,{ref:u}),rootRef:u}}const Th={valueChange:"valueChange"};function oA(e,t){if(t.type===Th.valueChange)return R({},e,{highlightedValue:t.value});const n=fh(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===wt.itemsChange){if(n.selectedValues.length>0)return R({},n,{highlightedValue:n.selectedValues[0]});Ot(null,"reset",t.context)}return r&&n.highlightedValue!=null?R({},n,{selectedValues:[n.highlightedValue]}):n}function aA(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:s,selectionFollowsFocus:c}=Sa(),{subitems:u,contextValue:f}=gh(),d=K.useCallback(O=>{var T;return(T=u.get(O))==null?void 0:T.id},[u]);s(d);const h=K.useMemo(()=>Array.from(u.keys()),[u]),g=K.useCallback(O=>{var T,N;return O==null?null:(T=(N=u.get(O))==null?void 0:N.ref.current)!=null?T:null},[u]),v=r==="rtl";let m;o==="vertical"?m="vertical":m=v?"horizontal-rtl":"horizontal-ltr";const b=K.useCallback((O,T)=>{var N;i(O,(N=T[0])!=null?N:null)},[i]),x=K.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),S=K.useCallback(O=>{var T,N;return(T=(N=u.get(O))==null?void 0:N.disabled)!=null?T:!1},[u]),{contextValue:C,dispatch:I,getRootProps:w,state:{highlightedValue:A,selectedValues:E},rootRef:k}=$I({controlledProps:x,disabledItemsFocusable:!c,focusManagement:"DOM",getItemDomElement:g,isItemDisabled:S,items:h,rootRef:n,onChange:b,orientation:m,reducerActionContext:K.useMemo(()=>({selectionFollowsFocus:c||!1}),[c]),selectionMode:"single",stateReducer:oA});K.useEffect(()=>{a!==void 0&&a!=null&&I({type:Th.valueChange,value:a})},[I,a]);const B=(O={})=>R({},O,w(O),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:K.useMemo(()=>R({},f,C),[f,C]),dispatch:I,getRootProps:B,highlightedValue:A,isRtl:v,orientation:o,rootRef:k,selectedValue:(t=E[0])!=null?t:null}}function sA(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:s}=t,c=K.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),u=K.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:s}),[a,i,s]);return l.jsx(Ql.Provider,{value:u,children:l.jsx(ph.Provider,{value:c,children:n})})}function lA(e){return e.size}function cA(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=K.useRef(null),a=Qi(i),{value:s,selectionFollowsFocus:c,getTabPanelId:u}=Sa(),f=K.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:d,index:h,totalItemCount:g}=mh(t!=null?t:lA,f),{getRootProps:v,highlighted:m,selected:b}=FI({item:d}),{getRootProps:x,rootRef:S,active:C,focusVisible:I,setFocusVisible:w}=Yl({disabled:r,focusableWhenDisabled:!c,type:"button"}),A=cn(o,n,S),E=d!==void 0?u(d):void 0;return{getRootProps:(B={})=>{const G=Bn(B),O=zI(v,x);return R({},B,O(G),{role:"tab","aria-controls":E,"aria-selected":b,id:a,ref:A})},active:C,focusVisible:I,highlighted:m,index:h,rootRef:A,selected:b||d===s,setFocusVisible:w,totalTabsCount:g}}const Eh="$$joy";function uA(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function dA(e,t){return Bt(e,t)}const fA=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},hA=["values","unit","step"],pA=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>R({},n,{[r.key]:r.val}),{})};function kh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Te(e,hA),o=pA(t),a=Object.keys(o);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,g){const v=a.indexOf(g);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(v!==-1&&typeof t[a[v]]=="number"?t[a[v]]:g)-r/100}${n})`}function f(h){return a.indexOf(h)+1<a.length?u(h,a[a.indexOf(h)+1]):s(h)}function d(h){const g=a.indexOf(h);return g===0?s(a[1]):g===a.length-1?c(a[g]):u(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return R({keys:a,values:o,up:s,down:c,between:u,only:f,not:d,unit:n},i)}const gA={borderRadius:4};function Ji(e,t){return t?Fn(e,t,{clone:!1}):e}const tc={xs:0,sm:600,md:900,lg:1200,xl:1536},_h={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${tc[e]}px)`};function zn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||_h;return t.reduce((a,s,c)=>(a[o.up(o.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const o=r.breakpoints||_h;return Object.keys(t).reduce((a,s)=>{if(Object.keys(o.values||tc).indexOf(s)!==-1){const c=o.up(s);a[c]=n(t[s],s)}else{const c=s;a[c]=t[c]}return a},{})}return n(t)}function mA(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function vA(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function rr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Ia(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=rr(e,n)||r,t&&(i=t(i,r,e)),i}function st(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],c=a.theme,u=rr(c,r)||{};return zn(a,s,d=>{let h=Ia(u,i,d);return d===h&&typeof d=="string"&&(h=Ia(u,i,`${t}${d==="default"?"":xe(d)}`,d)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function bA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const yA={m:"margin",p:"padding"},xA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ph={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},CA=bA(e=>{if(e.length>2)if(Ph[e])e=Ph[e];else return[e];const[t,n]=e.split(""),r=yA[t],i=xA[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),nc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],rc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...nc,...rc];function Xi(e,t,n,r){var i;const o=(i=rr(e,t,!1))!=null?i:n;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function Dh(e){return Xi(e,"spacing",8)}function Zi(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function wA(e,t){return n=>e.reduce((r,i)=>(r[i]=Zi(t,n),r),{})}function SA(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=CA(n),o=wA(i,r),a=e[n];return zn(e,a,o)}function Oh(e,t){const n=Dh(e.theme);return Object.keys(e).map(r=>SA(e,t,r,n)).reduce(Ji,{})}function tt(e){return Oh(e,nc)}tt.propTypes={},tt.filterProps=nc;function nt(e){return Oh(e,rc)}nt.propTypes={},nt.filterProps=rc;function Rh(e=8){if(e.mui)return e;const t=Dh({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function Aa(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Ji(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function en(e){return typeof e!="number"?e:`${e}px solid`}function tn(e,t){return st({prop:e,themeKey:"borders",transform:t})}const IA=tn("border",en),AA=tn("borderTop",en),TA=tn("borderRight",en),EA=tn("borderBottom",en),kA=tn("borderLeft",en),_A=tn("borderColor"),PA=tn("borderTopColor"),DA=tn("borderRightColor"),OA=tn("borderBottomColor"),RA=tn("borderLeftColor"),MA=tn("outline",en),LA=tn("outlineColor"),Ta=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Xi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Zi(t,r)});return zn(e,e.borderRadius,n)}return null};Ta.propTypes={},Ta.filterProps=["borderRadius"],Aa(IA,AA,TA,EA,kA,_A,PA,DA,OA,RA,Ta,MA,LA);const Ea=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Xi(e.theme,"spacing",8),n=r=>({gap:Zi(t,r)});return zn(e,e.gap,n)}return null};Ea.propTypes={},Ea.filterProps=["gap"];const ka=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Xi(e.theme,"spacing",8),n=r=>({columnGap:Zi(t,r)});return zn(e,e.columnGap,n)}return null};ka.propTypes={},ka.filterProps=["columnGap"];const _a=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Xi(e.theme,"spacing",8),n=r=>({rowGap:Zi(t,r)});return zn(e,e.rowGap,n)}return null};_a.propTypes={},_a.filterProps=["rowGap"];const BA=st({prop:"gridColumn"}),$A=st({prop:"gridRow"}),FA=st({prop:"gridAutoFlow"}),NA=st({prop:"gridAutoColumns"}),zA=st({prop:"gridAutoRows"}),jA=st({prop:"gridTemplateColumns"}),UA=st({prop:"gridTemplateRows"}),VA=st({prop:"gridTemplateAreas"}),HA=st({prop:"gridArea"});Aa(Ea,ka,_a,BA,$A,FA,NA,zA,jA,UA,VA,HA);function Yr(e,t){return t==="grey"?t:e}const WA=st({prop:"color",themeKey:"palette",transform:Yr}),GA=st({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),YA=st({prop:"backgroundColor",themeKey:"palette",transform:Yr});Aa(WA,GA,YA);function Wt(e){return e<=1&&e!==0?`${e*100}%`:e}const KA=st({prop:"width",transform:Wt}),ic=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||tc[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Wt(n)}};return zn(e,e.maxWidth,t)}return null};ic.filterProps=["maxWidth"];const qA=st({prop:"minWidth",transform:Wt}),QA=st({prop:"height",transform:Wt}),JA=st({prop:"maxHeight",transform:Wt}),XA=st({prop:"minHeight",transform:Wt});st({prop:"size",cssProperty:"width",transform:Wt}),st({prop:"size",cssProperty:"height",transform:Wt});const ZA=st({prop:"boxSizing"});Aa(KA,ic,qA,QA,JA,XA,ZA);const Pa={border:{themeKey:"borders",transform:en},borderTop:{themeKey:"borders",transform:en},borderRight:{themeKey:"borders",transform:en},borderBottom:{themeKey:"borders",transform:en},borderLeft:{themeKey:"borders",transform:en},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:en},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ta},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:nt},pt:{style:nt},pr:{style:nt},pb:{style:nt},pl:{style:nt},px:{style:nt},py:{style:nt},padding:{style:nt},paddingTop:{style:nt},paddingRight:{style:nt},paddingBottom:{style:nt},paddingLeft:{style:nt},paddingX:{style:nt},paddingY:{style:nt},paddingInline:{style:nt},paddingInlineStart:{style:nt},paddingInlineEnd:{style:nt},paddingBlock:{style:nt},paddingBlockStart:{style:nt},paddingBlockEnd:{style:nt},m:{style:tt},mt:{style:tt},mr:{style:tt},mb:{style:tt},ml:{style:tt},mx:{style:tt},my:{style:tt},margin:{style:tt},marginTop:{style:tt},marginRight:{style:tt},marginBottom:{style:tt},marginLeft:{style:tt},marginX:{style:tt},marginY:{style:tt},marginInline:{style:tt},marginInlineStart:{style:tt},marginInlineEnd:{style:tt},marginBlock:{style:tt},marginBlockStart:{style:tt},marginBlockEnd:{style:tt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ea},rowGap:{style:_a},columnGap:{style:ka},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wt},maxWidth:{style:ic},minWidth:{transform:Wt},height:{transform:Wt},maxHeight:{transform:Wt},minHeight:{transform:Wt},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function e1(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function t1(e,t){return typeof e=="function"?e(t):e}function n1(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:d}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=rr(i,u)||{};return d?d(a):zn(a,r,v=>{let m=Ia(h,f,v);return v===m&&typeof v=="string"&&(m=Ia(h,f,`${n}${v==="default"?"":xe(v)}`,v)),c===!1?m:{[c]:m}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:Pa;function s(c){let u=c;if(typeof c=="function")u=c(o);else if(typeof c!="object")return c;if(!u)return null;const f=mA(o.breakpoints),d=Object.keys(f);let h=f;return Object.keys(u).forEach(g=>{const v=t1(u[g],o);if(v!=null)if(typeof v=="object")if(a[g])h=Ji(h,e(g,v,o,a));else{const m=zn({theme:o},v,b=>({[g]:b}));e1(m,v)?h[g]=t({sx:v,theme:o}):h=Ji(h,m)}else h=Ji(h,e(g,v,o,a))}),vA(d,h)}return Array.isArray(i)?i.map(s):s(i)}return t}const Da=n1();Da.filterProps=["sx"];function Mh(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const r1=["breakpoints","palette","spacing","shape"];function Lh(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Te(e,r1),s=kh(n),c=Rh(i);let u=Fn({breakpoints:s,direction:"ltr",components:{},palette:R({mode:"light"},r),spacing:c,shape:R({},gA,o)},a);return u.applyStyles=Mh,u=t.reduce((f,d)=>Fn(f,d),u),u.unstable_sxConfig=R({},Pa,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(d){return Da({sx:d,theme:this})},u}function i1(e){return Object.keys(e).length===0}function o1(e=null){const t=K.useContext(ge.ThemeContext);return!t||i1(t)?e:t}const a1=Lh();function s1(e=a1){return o1(e)}const l1=["sx"],c1=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Pa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function u1(e){const{sx:t}=e,n=Te(e,l1),{systemProps:r,otherProps:i}=c1(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const s=t(...a);return nr(s)?R({},r,s):r}:o=R({},r,t),R({},i,{sx:o})}const d1=["ownerState"],f1=["variants"],h1=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p1(e){return Object.keys(e).length===0}function g1(e){return typeof e=="string"&&e.charCodeAt(0)>96}function oc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const m1=Lh(),v1=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Oa({defaultTheme:e,theme:t,themeId:n}){return p1(t)?e:t[n]||t}function b1(e){return e?(t,n)=>n[e]:null}function Ra(e,t){let{ownerState:n}=t,r=Te(t,d1);const i=typeof e=="function"?e(R({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Ra(o,R({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let s=Te(i,f1);return o.forEach(c=>{let u=!0;typeof c.props=="function"?u=c.props(R({ownerState:n},r,n)):Object.keys(c.props).forEach(f=>{(n==null?void 0:n[f])!==c.props[f]&&r[f]!==c.props[f]&&(u=!1)}),u&&(Array.isArray(s)||(s=[s]),s.push(typeof c.style=="function"?c.style(R({ownerState:n},r,n)):c.style))}),s}return i}function y1(e={}){const{themeId:t,defaultTheme:n=m1,rootShouldForwardProp:r=oc,slotShouldForwardProp:i=oc}=e,o=a=>Da(R({},a,{theme:Oa(R({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,s={})=>{fA(a,w=>w.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:c,slot:u,skipVariantsResolver:f,skipSx:d,overridesResolver:h=b1(v1(u))}=s,g=Te(s,h1),v=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,m=d||!1;let b,x=oc;u==="Root"||u==="root"?x=r:u?x=i:g1(a)&&(x=void 0);const S=dA(a,R({shouldForwardProp:x,label:b},g)),C=w=>typeof w=="function"&&w.__emotion_real!==w||nr(w)?A=>Ra(w,R({},A,{theme:Oa({theme:A.theme,defaultTheme:n,themeId:t})})):w,I=(w,...A)=>{let E=C(w);const k=A?A.map(C):[];c&&h&&k.push(O=>{const T=Oa(R({},O,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[c]||!T.components[c].styleOverrides)return null;const N=T.components[c].styleOverrides,H={};return Object.entries(N).forEach(([j,F])=>{H[j]=Ra(F,R({},O,{theme:T}))}),h(O,H)}),c&&!v&&k.push(O=>{var T;const N=Oa(R({},O,{defaultTheme:n,themeId:t})),H=N==null||(T=N.components)==null||(T=T[c])==null?void 0:T.variants;return Ra({variants:H},R({},O,{theme:N}))}),m||k.push(o);const B=k.length-A.length;if(Array.isArray(w)&&B>0){const O=new Array(B).fill("");E=[...w,...O],E.raw=[...w.raw,...O]}const G=S(E,...k);return a.muiName&&(G.muiName=a.muiName),G};return S.withConfig&&(I.withConfig=S.withConfig),I}}function x1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:sh(t.components[n].defaultProps,r)}function C1({props:e,name:t,defaultTheme:n,themeId:r}){let i=s1(n);return r&&(i=i[r]||i),x1({theme:i,name:t,props:e})}function w1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Bh(e){if(e.type)return e;if(e.charAt(0)==="#")return Bh(w1(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(sa(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(sa(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const wr=e=>{const t=Bh(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function ac(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const $h=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},S1=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,c])=>{(!n||n&&!n([...o,s]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,s],Array.isArray(c)?[...a,s]:a):t([...o,s],c,a))})}r(e)},I1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function sc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return S1(e,(s,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(s,c))){const f=`--${n?`${n}-`:""}${s.join("-")}`;Object.assign(i,{[f]:I1(s,c)}),$h(o,s,`var(${f})`,u),$h(a,s,`var(${f}, ${c})`,u)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function Sr(e){"@babel/helpers - typeof";return Sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sr(e)}function A1(e,t){if(Sr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function lc(e){var t=A1(e,"string");return Sr(t)=="symbol"?t:t+""}const T1=["colorSchemes","components","defaultColorScheme"];function E1(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Te(e,T1),{vars:o,css:a,varsWithDefaults:s}=sc(i,t);let c=s;const u={},{[r]:f}=n,d=Te(n,[r].map(lc));if(Object.entries(d||{}).forEach(([g,v])=>{const{vars:m,css:b,varsWithDefaults:x}=sc(v,t);c=Fn(c,x),u[g]={css:b,vars:m}}),f){const{css:g,vars:v,varsWithDefaults:m}=sc(f,t);c=Fn(c,m),u[r]={css:g,vars:v}}return{vars:c,generateCssVars:g=>{var v;if(!g){var m;const x=R({},a);return{css:x,vars:o,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,g,x))||":root"}}const b=R({},u[g].css);return{css:b,vars:u[g].vars,selector:(t==null||(v=t.getSelector)==null?void 0:v.call(t,g,b))||":root"}}}}const k1=R({},Pa,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),eo={grey:{50:"#FBFCFE",100:"#F0F4F8",200:"#DDE7EE",300:"#CDD7E1",400:"#9FA6AD",500:"#636B74",600:"#555E68",700:"#32383E",800:"#171A1C",900:"#0B0D0E"},blue:{50:"#EDF5FD",100:"#E3EFFB",200:"#C7DFF7",300:"#97C3F0",400:"#4393E4",500:"#0B6BCB",600:"#185EA5",700:"#12467B",800:"#0A2744",900:"#051423"},yellow:{50:"#FEFAF6",100:"#FDF0E1",200:"#FCE1C2",300:"#F3C896",400:"#EA9A3E",500:"#9A5B13",600:"#72430D",700:"#492B08",800:"#2E1B05",900:"#1D1002"},red:{50:"#FEF6F6",100:"#FCE4E4",200:"#F7C5C5",300:"#F09898",400:"#E47474",500:"#C41C1C",600:"#A51818",700:"#7D1212",800:"#430A0A",900:"#240505"},green:{50:"#F6FEF6",100:"#E3FBE3",200:"#C7F7C7",300:"#A1E8A1",400:"#51BC51",500:"#1F7A1F",600:"#136C13",700:"#0A470A",800:"#042F04",900:"#021D02"}};function _1(e){var t;return!!e[0].match(/^(typography|variants|breakpoints)$/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/^(mode)$/))||e[0]==="focus"&&e[1]!=="thickness"}const lt=(e,t)=>ch(e,t,"Mui"),We=(e,t)=>hI(e,t,"Mui"),P1=e=>e&&typeof e=="object"&&Object.keys(e).some(t=>{var n;return(n=t.match)==null?void 0:n.call(t,/^(plain(Hover|Active|Disabled)?(Color|Bg)|outlined(Hover|Active|Disabled)?(Color|Border|Bg)|soft(Hover|Active|Disabled)?(Color|Bg)|solid(Hover|Active|Disabled)?(Color|Bg))$/)}),Fh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},Nh=(e,t,n)=>{const r={};return Object.entries(t||{}).forEach(([i,o])=>{if(i.match(new RegExp(`${e}(color|bg|border)`,"i"))&&o){const a=n?n(i):o;i.includes("Disabled")&&(r.pointerEvents="none",r.cursor="default",r["--Icon-color"]="currentColor"),i.match(/(Hover|Active|Disabled)/)||(r["--variant-borderWidth"]||(r["--variant-borderWidth"]="0px"),i.includes("Border")&&(r["--variant-borderWidth"]="1px",r.border="var(--variant-borderWidth) solid")),Fh(r,i,a)}}),r},kt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,s]=o;P1(s)&&typeof s=="object"&&(n=R({},n,{[a]:Nh(e,s,c=>`var(--variant-${c}, ${r(`palette-${a}-${c}`,i[a][c])})`)}))})}return n.context=Nh(e,{plainColor:"var(--variant-plainColor)",plainHoverColor:"var(--variant-plainHoverColor)",plainHoverBg:"var(--variant-plainHoverBg)",plainActiveBg:"var(--variant-plainActiveBg)",plainDisabledColor:"var(--variant-plainDisabledColor)",outlinedColor:"var(--variant-outlinedColor)",outlinedBorder:"var(--variant-outlinedBorder)",outlinedHoverColor:"var(--variant-outlinedHoverColor)",outlinedHoverBorder:"var(--variant-outlinedHoverBorder)",outlinedHoverBg:"var(--variant-outlinedHoverBg)",outlinedActiveBg:"var(--variant-outlinedActiveBg)",outlinedDisabledColor:"var(--variant-outlinedDisabledColor)",outlinedDisabledBorder:"var(--variant-outlinedDisabledBorder)",softColor:"var(--variant-softColor)",softBg:"var(--variant-softBg)",softHoverColor:"var(--variant-softHoverColor)",softHoverBg:"var(--variant-softHoverBg)",softActiveBg:"var(--variant-softActiveBg)",softDisabledColor:"var(--variant-softDisabledColor)",softDisabledBg:"var(--variant-softDisabledBg)",solidColor:"var(--variant-solidColor)",solidBg:"var(--variant-solidBg)",solidHoverBg:"var(--variant-solidHoverBg)",solidActiveBg:"var(--variant-solidActiveBg)",solidDisabledColor:"var(--variant-solidDisabledColor)",solidDisabledBg:"var(--variant-solidDisabledBg)"}),n},D1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],O1=["colorSchemes"],R1=(e="joy")=>ac(e);function M1(e){var t,n,r,i,o,a,s,c,u,f;const d={},{cssVarPrefix:h="joy",breakpoints:g,spacing:v,components:m,variants:b,shouldSkipGeneratingVar:x=_1}=d,S=Te(d,D1),C=R1(h),I={primary:eo.blue,neutral:eo.grey,danger:eo.red,success:eo.green,warning:eo.yellow,common:{white:"#FFF",black:"#000"}},w=ee=>{var ne;const J=ee.split("-"),ce=J[1],ve=J[2];return C(ee,(ne=I[ce])==null?void 0:ne[ve])},A=ee=>({plainColor:w(`palette-${ee}-500`),plainHoverBg:w(`palette-${ee}-100`),plainActiveBg:w(`palette-${ee}-200`),plainDisabledColor:w("palette-neutral-400"),outlinedColor:w(`palette-${ee}-500`),outlinedBorder:w(`palette-${ee}-300`),outlinedHoverBg:w(`palette-${ee}-100`),outlinedActiveBg:w(`palette-${ee}-200`),outlinedDisabledColor:w("palette-neutral-400"),outlinedDisabledBorder:w("palette-neutral-200"),softColor:w(`palette-${ee}-700`),softBg:w(`palette-${ee}-100`),softHoverBg:w(`palette-${ee}-200`),softActiveColor:w(`palette-${ee}-800`),softActiveBg:w(`palette-${ee}-300`),softDisabledColor:w("palette-neutral-400"),softDisabledBg:w("palette-neutral-50"),solidColor:w("palette-common-white"),solidBg:w(`palette-${ee}-500`),solidHoverBg:w(`palette-${ee}-600`),solidActiveBg:w(`palette-${ee}-700`),solidDisabledColor:w("palette-neutral-400"),solidDisabledBg:w("palette-neutral-100")}),E=ee=>({plainColor:w(`palette-${ee}-300`),plainHoverBg:w(`palette-${ee}-800`),plainActiveBg:w(`palette-${ee}-700`),plainDisabledColor:w("palette-neutral-500"),outlinedColor:w(`palette-${ee}-200`),outlinedBorder:w(`palette-${ee}-700`),outlinedHoverBg:w(`palette-${ee}-800`),outlinedActiveBg:w(`palette-${ee}-700`),outlinedDisabledColor:w("palette-neutral-500"),outlinedDisabledBorder:w("palette-neutral-800"),softColor:w(`palette-${ee}-200`),softBg:w(`palette-${ee}-800`),softHoverBg:w(`palette-${ee}-700`),softActiveColor:w(`palette-${ee}-100`),softActiveBg:w(`palette-${ee}-600`),softDisabledColor:w("palette-neutral-500"),softDisabledBg:w("palette-neutral-800"),solidColor:w("palette-common-white"),solidBg:w(`palette-${ee}-500`),solidHoverBg:w(`palette-${ee}-600`),solidActiveBg:w(`palette-${ee}-700`),solidDisabledColor:w("palette-neutral-500"),solidDisabledBg:w("palette-neutral-800")}),k={palette:{mode:"light",primary:R({},I.primary,A("primary")),neutral:R({},I.neutral,A("neutral"),{plainColor:w("palette-neutral-700"),plainHoverColor:w("palette-neutral-900"),outlinedColor:w("palette-neutral-700")}),danger:R({},I.danger,A("danger")),success:R({},I.success,A("success")),warning:R({},I.warning,A("warning")),common:{white:"#FFF",black:"#000"},text:{primary:w("palette-neutral-800"),secondary:w("palette-neutral-700"),tertiary:w("palette-neutral-600"),icon:w("palette-neutral-500")},background:{body:w("palette-common-white"),surface:w("palette-neutral-50"),popup:w("palette-common-white"),level1:w("palette-neutral-100"),level2:w("palette-neutral-200"),level3:w("palette-neutral-300"),tooltip:w("palette-neutral-500"),backdrop:`rgba(${C("palette-neutral-darkChannel",wr(I.neutral[900]))} / 0.25)`},divider:`rgba(${C("palette-neutral-mainChannel",wr(I.neutral[500]))} / 0.2)`,focusVisible:w("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},B={palette:{mode:"dark",primary:R({},I.primary,E("primary")),neutral:R({},I.neutral,E("neutral"),{plainColor:w("palette-neutral-300"),plainHoverColor:w("palette-neutral-300")}),danger:R({},I.danger,E("danger")),success:R({},I.success,E("success")),warning:R({},I.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:w("palette-neutral-100"),secondary:w("palette-neutral-300"),tertiary:w("palette-neutral-400"),icon:w("palette-neutral-400")},background:{body:w("palette-common-black"),surface:w("palette-neutral-900"),popup:w("palette-common-black"),level1:w("palette-neutral-800"),level2:w("palette-neutral-700"),level3:w("palette-neutral-600"),tooltip:w("palette-neutral-600"),backdrop:`rgba(${C("palette-neutral-darkChannel",wr(I.neutral[50]))} / 0.25)`},divider:`rgba(${C("palette-neutral-mainChannel",wr(I.neutral[500]))} / 0.16)`,focusVisible:w("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},G='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',O=R({body:`"Inter", ${C(`fontFamily-fallback, ${G}`)}`,display:`"Inter", ${C(`fontFamily-fallback, ${G}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:G},S.fontFamily),T=R({sm:300,md:500,lg:600,xl:700},S.fontWeight),N=R({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},S.fontSize),H=R({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},S.lineHeight),j=(t=(n=S.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:k.shadowRing,F=(r=(i=S.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:k.shadowChannel,M=(o=(a=S.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:k.shadowOpacity,V={colorSchemes:{light:k,dark:B},fontSize:N,fontFamily:O,fontWeight:T,focus:{thickness:"2px",selector:`&.${lt("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${C("focus-thickness",(s=(c=S.focus)==null?void 0:c.thickness)!=null?s:"2px")})`,outline:`${C("focus-thickness",(u=(f=S.focus)==null?void 0:f.thickness)!=null?u:"2px")} solid ${C("palette-focusVisible",I.primary[500])}`}},lineHeight:H,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${C("shadowRing",j)}, 0px 1px 2px 0px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`,sm:`${C("shadowRing",j)}, 0px 1px 2px 0px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)}), 0px 2px 4px 0px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`,md:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)}), 0px 6px 12px -2px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`,lg:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)}), 0px 12px 16px -4px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`,xl:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)}), 0px 20px 24px -4px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-xl, ${T.xl}`),fontSize:C(`fontSize-xl4, ${N.xl4}`),lineHeight:C(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h2:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-xl, ${T.xl}`),fontSize:C(`fontSize-xl3, ${N.xl3}`),lineHeight:C(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h3:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-xl2, ${N.xl2}`),lineHeight:C(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h4:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-xl, ${N.xl}`),lineHeight:C(`lineHeight-md, ${H.md}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-lg":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-lg, ${N.lg}`),lineHeight:C(`lineHeight-xs, ${H.xs}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-md":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-md, ${N.md}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-sm":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-sm, ${N.sm}`),lineHeight:C(`lineHeight-sm, ${H.sm}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"body-lg":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-lg, ${N.lg}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-md":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-md, ${N.md}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-sm":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-sm, ${N.sm}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-tertiary, ${k.palette.text.tertiary}`)},"body-xs":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-xs, ${N.xs}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-tertiary, ${k.palette.text.tertiary}`)}}},Y=S?Fn(V,S):V,{colorSchemes:Z}=Y,D=Te(Y,O1),L=R({colorSchemes:Z},D,{breakpoints:kh(g!=null?g:{}),components:Fn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:ee,theme:ne})=>{var J;const ce=ee.instanceFontSize;return R({margin:"var(--Icon-margin)"},ee.fontSize&&ee.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${ne.vars.fontSize[ee.fontSize]})`},!ee.htmlColor&&R({color:`var(--Icon-color, ${L.vars.palette.text.icon})`},ee.color&&ee.color!=="inherit"&&ne.vars.palette[ee.color]&&{color:`rgba(${(J=ne.vars.palette[ee.color])==null?void 0:J.mainChannel} / 1)`}),ce&&ce!=="inherit"&&{"--Icon-fontSize":ne.vars.fontSize[ce]})}}}},m),cssVarPrefix:h,getCssVar:C,spacing:Rh(v)});function U(ee,ne){Object.keys(ne).forEach(J=>{const ce={main:"500",light:"200",dark:"700"};ee==="dark"&&(ce.main=400),!ne[J].mainChannel&&ne[J][ce.main]&&(ne[J].mainChannel=wr(ne[J][ce.main])),!ne[J].lightChannel&&ne[J][ce.light]&&(ne[J].lightChannel=wr(ne[J][ce.light])),!ne[J].darkChannel&&ne[J][ce.dark]&&(ne[J].darkChannel=wr(ne[J][ce.dark]))})}Object.entries(L.colorSchemes).forEach(([ee,ne])=>{U(ee,ne.palette)});const W={prefix:h,shouldSkipGeneratingVar:x},{vars:ie,generateCssVars:le}=E1(R({colorSchemes:Z},D),W);L.vars=ie,L.generateCssVars=le,L.unstable_sxConfig=R({},k1,void 0),L.unstable_sx=function(ne){return Da({sx:ne,theme:this})},L.getColorSchemeSelector=ee=>ee==="light"?"&":`&[data-joy-color-scheme="${ee}"], [data-joy-color-scheme="${ee}"] &`;const ae={getCssVar:C,palette:L.colorSchemes.light.palette};return L.variants=Fn({plain:kt("plain",ae),plainHover:kt("plainHover",ae),plainActive:kt("plainActive",ae),plainDisabled:kt("plainDisabled",ae),outlined:kt("outlined",ae),outlinedHover:kt("outlinedHover",ae),outlinedActive:kt("outlinedActive",ae),outlinedDisabled:kt("outlinedDisabled",ae),soft:kt("soft",ae),softHover:kt("softHover",ae),softActive:kt("softActive",ae),softDisabled:kt("softDisabled",ae),solid:kt("solid",ae),solidHover:kt("solidHover",ae),solidActive:kt("solidActive",ae),solidDisabled:kt("solidDisabled",ae)},b),L.palette=R({},L.colorSchemes.light.palette,{colorScheme:"light"}),L.shouldSkipGeneratingVar=x,L.applyStyles=Mh,L}const zh=M1(),ye=y1({defaultTheme:zh,themeId:Eh});function pt({props:e,name:t}){return C1({props:e,name:t,defaultTheme:R({},zh,{components:{}}),themeId:Eh})}function L1(e){return lt("MuiAccordion",e)}const B1=We("MuiAccordion",["root","expanded","disabled"]),$1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],F1=["component","slots","slotProps"],N1=["component"];function Ae(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,c=Te(t,$1),{component:u,slots:f={[e]:void 0},slotProps:d={[e]:void 0}}=o,h=Te(o,F1),g=f[e]||r,v=QS(d[e],i),m=ZS(R({className:n},c,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:v})),{props:{component:b},internalRef:x}=m,S=Te(m.props,N1),C=cn(x,v==null?void 0:v.ref,t.ref),I=a?a(S):{},w=R({},i,I),A=e==="root"?b||u:b,E=qS(g,R({},e==="root"&&!u&&!f[e]&&s,e!=="root"&&!f[e]&&s,S,A&&{as:A},{ref:C}),w);return Object.keys(I).forEach(k=>{delete E[k]}),[g,E]}const cc=K.createContext({});function z1(e){return lt("MuiListItem",e)}const jh=We("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Ma=K.createContext(!1),uc=K.createContext(!1),Uh=K.createContext(!1),Vh=K.createContext(void 0),j1=K.createContext(void 0),Hh=K.createContext(void 0),U1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],V1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${xe(o)}`,i&&`variant${xe(i)}`],startAction:["startAction"],endAction:["endAction"]};return ht(a,z1,{})},dc=ye("li")(({theme:e,ownerState:t})=>{var n;return[!t.nested&&{"--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItemButton-marginBlock":"calc(-1 * var(--ListItem-paddingY))",alignItems:"center",gap:"var(--ListItem-gap)",marginInline:"var(--ListItem-marginInline)"},t.nested&&{"--NestedList-marginRight":"calc(-1 * var(--ListItem-paddingRight))","--NestedList-marginLeft":"calc(-1 * var(--ListItem-paddingLeft))","--NestedListItem-paddingLeft":"calc(var(--ListItem-paddingLeft) + var(--List-nestedInsetStart))","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItem-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",flexDirection:"column"},R({"--unstable_actionRadius":"calc(var(--ListItem-radius) - var(--variant-borderWidth, 0px))"},t.startAction&&{"--unstable_startActionWidth":"2rem"},t.endAction&&{"--unstable_endActionWidth":"2.5rem"},{boxSizing:"border-box",borderRadius:"var(--ListItem-radius)",display:"var(--_ListItem-display)","&:not([hidden])":{"--_ListItem-display":"var(--_List-markerDisplay, flex)"},flex:"none",listStyleType:"var(--_List-markerType, disc)",position:"relative",paddingBlockStart:t.nested?0:"var(--ListItem-paddingY)",paddingBlockEnd:t.nested?0:"var(--ListItem-paddingY)",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)"},t["data-first-child"]===void 0&&R({},t.row?{marginInlineStart:"var(--List-gap)"}:{marginBlockStart:"var(--List-gap)"}),t.row&&t.wrap&&{marginInlineStart:"var(--List-gap)",marginBlockStart:"var(--List-gap)"},{minBlockSize:"var(--ListItem-minHeight)"},t.sticky&&{position:"sticky",top:"var(--ListItem-stickyTop, 0px)",zIndex:1,background:`var(--ListItem-stickyBackground, ${e.vars.palette.background.body})`},{[`.${jh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),H1=ye(dc,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),W1=ye("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",left:0,transform:"translate(var(--ListItem-startActionTranslateX), -50%)",zIndex:1})),G1=ye("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",right:0,transform:"translate(var(--ListItem-endActionTranslateX), -50%)"})),Wh=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyListItem"}),i=K.useContext(Hh),o=K.useContext(Vh),a=K.useContext(uc),s=K.useContext(Uh),c=K.useContext(Ma),{component:u,className:f,children:d,nested:h=!1,sticky:g=!1,variant:v="plain",color:m="neutral",startAction:b,endAction:x,role:S,slots:C={},slotProps:I={}}=r,w=Te(r,U1),[A,E]=K.useState(""),[k,B]=(o==null?void 0:o.split(":"))||["",""],G=u||(k&&!k.match(/^(ul|ol|menu)$/)?"div":void 0);let O=i==="menu"?"none":void 0;o&&(O={menu:"none",menubar:"none",group:"presentation"}[B]),S&&(O=S);const T=R({},r,{sticky:g,startAction:b,endAction:x,row:a,wrap:s,variant:v,color:m,nesting:c,nested:h,component:G,role:O}),N=V1(T),H=R({},w,{component:G,slots:C,slotProps:I}),[j,F]=Ae("root",{additionalProps:{role:O},ref:n,className:$n(N.root,f),elementType:H1,externalForwardedProps:H,ownerState:T}),[M,V]=Ae("startAction",{className:N.startAction,elementType:W1,externalForwardedProps:H,ownerState:T}),[Y,Z]=Ae("endAction",{className:N.endAction,elementType:G1,externalForwardedProps:H,ownerState:T});return l.jsx(j1.Provider,{value:E,children:l.jsx(Ma.Provider,{value:h?A||!0:!1,children:l.jsxs(j,R({},F,{children:[b&&l.jsx(M,R({},V,{children:b})),K.Children.map(d,(D,L)=>{var U;return K.isValidElement(D)?K.cloneElement(D,R({},L===0&&{"data-first-child":""},rh(D,["ListItem"])&&{component:((U=D.props)==null?void 0:U.component)||"div"})):D}),x&&l.jsx(Y,R({},Z,{children:x}))]}))})})});Wh.muiName="ListItem";const Gh=Wh;function Y1(e){return lt("MuiAccordionDetails",e)}const Ir=We("MuiAccordionDetails",["root","content","expanded"]),K1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],q1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${xe(n)}`,t&&`variant${xe(t)}`]};return ht(o,L1,{})},Q1=ye(dc,{name:"JoyAccordion",slot:"Root",overridesResolver:(e,t)=>t.root})({borderBottom:"var(--Accordion-borderBottom)","&[data-first-child]":{"--ListItem-radius":"var(--unstable_List-childRadius) var(--unstable_List-childRadius) 0 0"},"&[data-last-child]":{"--ListItem-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)",'& [aria-expanded="true"]':{"--ListItem-radius":"0"},[`& .${Ir.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),J1=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:s,defaultExpanded:c=!1,disabled:u=!1,expanded:f,onChange:d,variant:h="plain",slots:g={},slotProps:v={}}=r,m=Te(r,K1),b=Qi(i),[x,S]=Vl({controlled:f,default:c,name:"Accordion",state:"expanded"}),C=K.useCallback(G=>{S(!x),d&&d(G,!x)},[x,d,S]),I=K.useMemo(()=>({accordionId:b,expanded:x,disabled:u,toggle:C}),[b,x,u,C]),w=R({},m,{component:o,slots:g,slotProps:v}),A=R({},r,{component:o,color:a,variant:h,expanded:x,disabled:u,nested:!0}),E=q1(A),[k,B]=Ae("root",{ref:n,className:E.root,elementType:Q1,externalForwardedProps:w,ownerState:A});return l.jsx(cc.Provider,{value:I,children:l.jsx(k,R({},B,{children:K.Children.map(s,(G,O)=>K.isValidElement(G)&&O===0?K.cloneElement(G,{"data-first-child":""}):G)}))})});function X1(e){return lt("MuiAccordionGroup",e)}We("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const Z1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function fc(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=l.jsx(uc.Provider,{value:r,children:l.jsx(Uh.Provider,{value:i,children:K.Children.map(t,(a,s)=>K.isValidElement(a)?K.cloneElement(a,R({},s===0&&{"data-first-child":""},s===K.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:l.jsx(Ma.Provider,{value:n,children:o})}const hc=({theme:e,ownerState:t},n)=>{let r={};function i(o){if(typeof o=="function"){const a=o(e);i(a)}else Array.isArray(o)?o.forEach(a=>{typeof a!="boolean"&&i(a)}):typeof o=="object"&&(r=R({},r,o))}return t.sx&&(i(t.sx),n.forEach(o=>{const a=r[o];if(typeof a=="string"||typeof a=="number")if(o==="borderRadius")if(typeof a=="number")r[o]=`${a}px`;else{var s;r[o]=((s=e.vars)==null?void 0:s.radius[a])||a}else["p","padding","m","margin"].indexOf(o)!==-1&&typeof a=="number"?r[o]=e.spacing(a):r[o]=a;else typeof a=="function"?r[o]=a(e):r[o]=void 0})),r};function eT(e){return lt("MuiList",e)}We("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const tT=K.createContext(void 0),nT=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],rT=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,s={root:["root",o,t&&`variant${xe(t)}`,n&&`color${xe(n)}`,!a&&!i&&r&&`size${xe(r)}`,a&&`size${xe(a)}`,i&&"nesting"]};return ht(s,eT,{})},pc=ye("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=hc({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(s){return s==="sm"?{"--ListDivider-gap":"0.25rem","--ListItem-minHeight":"2rem","--ListItem-paddingY":"3px","--ListItem-paddingX":t.marker?"3px":"0.5rem","--ListItem-gap":"0.5rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.5rem":"2rem","--Icon-fontSize":e.vars.fontSize.lg}:s==="md"?{"--ListDivider-gap":"0.375rem","--ListItem-minHeight":"2.25rem","--ListItem-paddingY":"0.25rem","--ListItem-paddingX":t.marker?"0.25rem":"0.75rem","--ListItem-gap":"0.625rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.75rem":"2.5rem","--Icon-fontSize":e.vars.fontSize.xl}:s==="lg"?{"--ListDivider-gap":"0.5rem","--ListItem-minHeight":"2.75rem","--ListItem-paddingY":"0.375rem","--ListItem-paddingX":t.marker?"0.5rem":"1rem","--ListItem-gap":"0.75rem","--ListItemDecorator-size":t.orientation==="horizontal"?"2.25rem":"3rem","--Icon-fontSize":e.vars.fontSize.xl2}:{}}return[t.nesting&&R({},a(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0},t.marker&&{paddingInlineStart:"calc(3ch - var(--_List-markerDeduct, 0px))"},{marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&R({},a(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)"},t.marker&&{"--_List-markerDeduct":"1ch"},{"--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],t.orientation==="horizontal"?R({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"},t.marker&&{paddingInlineStart:"3ch"}),R({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:t.orientation==="horizontal"?"row":"column"},t.wrap&&{flexWrap:"wrap"},t.marker&&{"--_List-markerDisplay":"list-item","--_List-markerType":t.marker,lineHeight:"calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"},{flexGrow:1,position:"relative"},(n=e.variants[t.variant])==null?void 0:n[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},o!==void 0&&{"--List-radius":o},r!==void 0&&{"--List-padding":r},i!==void 0&&{"--List-padding":i})]}),iT=ye(pc,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),oT=K.forwardRef(function(t,n){var r;const i=K.useContext(Ma),o=K.useContext(Hh),a=K.useContext(tT),s=pt({props:t,name:"JoyList"}),{component:c,className:u,children:f,size:d,orientation:h="vertical",wrap:g=!1,variant:v="plain",color:m="neutral",role:b,slots:x={},slotProps:S={}}=s,C=Te(s,nT),I=d||((r=t.size)!=null?r:"md");let w;o&&(w="group"),a&&(w="presentation"),b&&(w=b);const A=R({},s,{instanceSize:t.size,size:I,nesting:i,orientation:h,wrap:g,variant:v,color:m,role:w}),E=rT(A),k=R({},C,{component:c,slots:x,slotProps:S}),[B,G]=Ae("root",{ref:n,className:$n(E.root,u),elementType:iT,externalForwardedProps:k,ownerState:A,additionalProps:{as:c,role:w,"aria-labelledby":typeof i=="string"?i:void 0}});return l.jsx(B,R({},G,{children:l.jsx(Vh.Provider,{value:`${typeof c=="string"?c:""}:${w||""}`,children:l.jsx(fc,{row:h==="horizontal",wrap:g,children:f})})}))}),aT=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],sT=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${xe(t)}`,n&&`color${xe(n)}`,r&&`size${xe(r)}`]};return ht(i,X1,{})},lT=ye(pc,{name:"JoyAccordionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{let n={};return t.transition&&(typeof t.transition=="string"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition}, padding-block ${t.transition}`}),typeof t.transition=="object"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition.initial}, padding-block ${t.transition.initial}`,[`& .${Ir.root}.${Ir.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),R({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${B1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),cT=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:s=!1,variant:c="plain",transition:u="0.2s ease",size:f="md",slots:d={},slotProps:h={}}=r,g=Te(r,aT),v=R({},g,{component:i,slots:d,slotProps:h}),m=R({},r,{component:i,color:o,disableDivider:s,variant:c,transition:u,size:f}),b=sT(m),[x,S]=Ae("root",{ref:n,className:b.root,elementType:lT,externalForwardedProps:v,ownerState:m});return l.jsx(x,R({},S,{children:l.jsx(fc,{children:a})}))}),uT=["component","children","color","variant","slots","slotProps"],dT=e=>{const{expanded:t}=e;return ht({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},Y1,{})},fT=ye("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return R({overflow:"hidden",borderRadius:"var(--AccordionDetails-radius)",display:"grid",gridTemplateRows:"1fr",marginInline:"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",transition:"var(--AccordionDetails-transition)"},(n=t.variants[e.variant])==null?void 0:n[e.color],{[`&:not(.${Ir.expanded})`]:{gridTemplateRows:"0fr"}})}),hT=ye("div",{name:"JoyAccordionDetails",slot:"Content",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",overflow:"hidden",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)",paddingBlockStart:"calc(var(--ListItem-paddingY) / 2)",paddingBlockEnd:"calc(2.5 * var(--ListItem-paddingY))",transition:"var(--AccordionDetails-transition)",[`&:not(.${Ir.expanded})`]:{paddingBlock:0}}),pT=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:s="plain",slots:c={},slotProps:u={}}=r,f=Te(r,uT),{accordionId:d,expanded:h=!1}=K.useContext(cc),g=K.useRef(null),v=cn(g,n);K.useEffect(()=>{g.current&&g.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const k=E.getAttribute("data-prev-tabindex"),B=E.getAttribute("tabindex");B&&k&&(E.setAttribute("tabindex",k),E.removeAttribute("data-prev-tabindex")),!k&&!B&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const m=R({},f,{component:i,slots:c,slotProps:u}),b=R({},r,{component:i,color:a,variant:s,expanded:h,nesting:!0}),x=dT(b),[S,C]=Ae("root",{ref:v,className:x.root,elementType:fT,externalForwardedProps:m,additionalProps:{id:`${d}-details`,"aria-labelledby":`${d}-summary`,role:"region",hidden:h?void 0:!0},ownerState:b}),[I,w]=Ae("content",{className:x.content,elementType:hT,externalForwardedProps:m,ownerState:b});return l.jsx(S,R({},C,{children:l.jsx(I,R({},w,{children:o}))}))});function gT(e){return lt("MuiAccordionSummary",e)}const La=We("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),Ba=We("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),mT=K.createContext("horizontal"),gc=ye("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;return R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch",gap:"var(--ListItem-gap)"},t.orientation==="vertical"&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},t["data-first-child"]===void 0&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:R({},e.focus.default,{zIndex:1})},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:active":(r=e.variants[`${t.variant}Active`])==null?void 0:r[t.color],[`.${jh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${Ba.selected}`]:R({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${Ba.selected}, [aria-selected="true"])`]:{"&:hover":(o=e.variants[`${t.variant}Hover`])==null?void 0:o[t.color],"&:active":(a=e.variants[`${t.variant}Active`])==null?void 0:a[t.color]},[`&.${Ba.disabled}`]:R({},(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color])})});ye(gc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>R({},!e.row&&{[`&.${Ba.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function vT(e){return lt("MuiSvgIcon",e)}We("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const bT=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],yT=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${xe(t)}`,n&&`size${xe(n)}`,r&&`fontSize${xe(r)}`]};return ht(i,vT,{})},Yh={sm:"xl",md:"xl2",lg:"xl3"},xT=ye("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return R({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[Yh[t.instanceSize]]},t.instanceFontSize&&t.instanceFontSize!=="inherit"&&{"--Icon-fontSize":e.vars.fontSize[t.instanceFontSize]},{userSelect:"none",margin:"var(--Icon-margin)",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[Yh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&R({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&e.vars.palette[t.color]&&{color:`rgba(${(n=e.vars.palette[t.color])==null?void 0:n.mainChannel} / 1)`}))}),Kh=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:s="svg",fontSize:c,htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:h="0 0 24 24",size:g="md",slots:v={},slotProps:m={}}=r,b=Te(r,bT),x=K.isValidElement(i)&&i.type==="svg",S=R({},r,{color:a,component:s,size:g,instanceSize:t.size,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:h,hasSvgAsChild:x}),C=yT(S),I=R({},b,{component:s,slots:v,slotProps:m}),[w,A]=Ae("root",{ref:n,className:$n(C.root,o),elementType:xT,externalForwardedProps:I,ownerState:S,additionalProps:R({color:u,focusable:!1},d&&{role:"img"},!d&&{"aria-hidden":!0},!f&&{viewBox:h},x&&i.props)});return l.jsxs(w,R({},A,{children:[x?i.props.children:i,d?l.jsx("title",{children:d}):null]}))});function mc(e,t){function n(r,i){return l.jsx(Kh,R({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Kh.muiName,K.memo(K.forwardRef(n))}const CT=mc(l.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var qh;const wT=["component","color","children","indicator","variant","slots","slotProps"],ST=e=>{const{disabled:t,expanded:n}=e;return ht({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},gT,{})},IT=ye(dc,{name:"JoyAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({fontWeight:e.vars.fontWeight.md,gap:"calc(var(--ListItem-paddingX, 0.75rem) + 0.25rem)",[`&.${La.expanded}`]:{"--Icon-color":"currentColor"}})),AT=ye(gc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${La.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),TT=ye("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${La.expanded}`]:{transform:"rotate(180deg)"}}),ET=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:s=qh||(qh=l.jsx(CT,{})),variant:c="plain",slots:u={},slotProps:f={}}=r,d=Te(r,wT),{accordionId:h,disabled:g=!1,expanded:v=!1,toggle:m}=K.useContext(cc),b=R({},d,{component:i,slots:u,slotProps:f}),x=R({},r,{component:i,color:o,disabled:g,expanded:v,variant:c}),S=G=>{if(m&&m(G),typeof f.button=="function"){var O,T;(O=f.button(x))==null||(T=O.onClick)==null||T.call(O,G)}else{var N,H;(N=f.button)==null||(H=N.onClick)==null||H.call(N,G)}},C=ST(x),[I,w]=Ae("root",{ref:n,className:C.root,elementType:IT,externalForwardedProps:b,ownerState:x}),[A,E]=Ae("button",{ref:n,className:C.button,elementType:AT,externalForwardedProps:b,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":v?"true":"false","aria-controls":`${h}-details`,disabled:g,type:"button",onClick:S},ownerState:x}),[k,B]=Ae("indicator",{ref:n,className:C.indicator,elementType:TT,externalForwardedProps:b,ownerState:x});return l.jsx(I,R({},w,{children:l.jsxs(A,R({},E,{children:[a,s&&l.jsx(k,R({},B,{children:s}))]}))}))}),kT=({label:e,disabled:t,children:n})=>(t=t||!1,l.jsx(cT,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${La.button}:hover`]:{backgroundColor:"#fff"},[`& .${Ir.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${Ir.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:l.jsxs(J1,{disabled:t,children:[l.jsx(ET,{children:e}),l.jsx(pT,{variant:"soft",children:n})]})})),vc={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["blockquote","code-block"],[{direction:"rtl"}],[{script:"sub"},{script:"super"}],[{color:[]},{background:[]}],[{font:[]}],["link","image","video"],["clean"]]},bc=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const s=(c,u,f,d)=>{f!=="api"&&(d.getText().trim()===""?a(""):a(c))};return t==="description"?l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e}),l.jsx(Ai,{value:n||r,defaultValue:r,onChange:s,modules:vc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?l.jsxs(p.FormControl,{children:[l.jsx(p.FormLabel,{color:"primary",children:e}),l.jsx(Ai,{value:n||r,defaultValue:r,onChange:s,modules:vc,placeholder:i,className:"ql-container ql-toolbar"}),l.jsx(p.FormHelperText,{children:o})]}):l.jsx(p.Box,{sx:()=>({marginBottom:"16px"}),children:l.jsx(Ai,{value:n||r,defaultValue:r,onChange:s,modules:vc,placeholder:i})})},_T=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return l.jsxs(p.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[l.jsxs(p.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[l.jsx(p.Tab,{children:e.labels.richText}),l.jsx(p.Tab,{children:e.labels.plainText})]}),l.jsx(p.TabPanel,{value:0,sx:{px:0},children:l.jsx(bc,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),l.jsx(p.TabPanel,{value:1,sx:{px:0},children:l.jsx(p.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},PT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,s)=>{i(s||"")};return l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e}),l.jsx(p.Select,{defaultValue:t,onChange:o,children:n.map((a,s)=>l.jsx(p.Option,{value:a,children:a},`basic-select-${a}-${s}`))}),r?l.jsx(p.FormHelperText,{children:r}):l.jsx(l.Fragment,{})]})},yc=K.createContext("md");function DT(e){return lt("MuiTabs",e)}We("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const OT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],RT=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${xe(n)}`,r&&`color${xe(r)}`,i&&`size${xe(i)}`]};return ht(o,DT,{})},MT=ye("div",{name:"JoyTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r;const i=(n=t.variants[e.variant])==null?void 0:n[e.color],{bgcolor:o,backgroundColor:a,background:s,p:c,padding:u}=hc({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),f=rr(t,`palette.${o}`)||o||rr(t,`palette.${a}`)||a||s||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return R({},e.size==="sm"&&{"--Tabs-spacing":"0.75rem"},e.size==="md"&&{"--Tabs-spacing":"1rem"},e.size==="lg"&&{"--Tabs-spacing":"1.25rem"},{"--Tab-indicatorThickness":"2px","--Icon-color":e.color!=="neutral"||e.variant==="solid"?"currentColor":t.vars.palette.text.icon,"--TabList-stickyBackground":f==="transparent"?"initial":f,display:"flex",flexDirection:"column"},e.orientation==="vertical"&&{flexDirection:"row"},{backgroundColor:t.vars.palette.background.surface,position:"relative"},t.typography[`body-${e.size}`],(r=t.variants[e.variant])==null?void 0:r[e.color],c!==void 0&&{"--Tabs-padding":c},u!==void 0&&{"--Tabs-padding":u})}),Qh=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:s="horizontal",direction:c="ltr",component:u,variant:f="plain",color:d="neutral",size:h="md",slots:g={},slotProps:v={}}=r,m=Te(r,OT),b=a||(o===void 0?0:void 0),{contextValue:x}=tA(R({},r,{orientation:s,defaultValue:b})),S=R({},r,{orientation:s,direction:c,variant:f,color:d,size:h}),C=RT(S),I=R({},m,{component:u,slots:g,slotProps:v}),[w,A]=Ae("root",{ref:n,elementType:MT,externalForwardedProps:I,additionalProps:{ref:n,as:u},ownerState:S,className:C.root});return l.jsx(w,R({},A,{children:l.jsx(nA,{value:x,children:l.jsx(yc.Provider,{value:h,children:i})})}))});function LT(e){return lt("MuiTabList",e)}We("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function BT(e){return lt("MuiTab",e)}const xc=We("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),$T=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],FT=e=>{const{orientation:t,size:n,variant:r,color:i}=e,o={root:["root",t,r&&`variant${xe(r)}`,i&&`color${xe(i)}`,n&&`size${xe(n)}`]};return ht(o,LT,{})},NT=ye(pc,{name:"JoyTabList",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;const r=(n=e.variants[t.variant])==null?void 0:n[t.color];return R({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},Z1,{flexGrow:"initial",flexDirection:t.orientation==="vertical"?"column":"row",borderRadius:"var(--List-radius, 0px)",padding:"var(--List-padding, 0px)",zIndex:1},t.sticky&&{position:"sticky",top:t.sticky==="top"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",bottom:t.sticky==="bottom"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",backgroundColor:(r==null?void 0:r.backgroundColor)||`var(--TabList-stickyBackground, ${e.vars.palette.background.body})`},!t.disableUnderline&&R({},t.underlinePlacement==="bottom"&&{"--unstable_TabList-underlineBottom":"1px",paddingBottom:1,boxShadow:`inset 0 -1px ${e.vars.palette.divider}`},t.underlinePlacement==="top"&&{"--unstable_TabList-underlineTop":"1px",paddingTop:1,boxShadow:`inset 0 1px ${e.vars.palette.divider}`},t.underlinePlacement==="right"&&{"--unstable_TabList-underlineRight":"1px",paddingRight:1,boxShadow:`inset -1px 0 ${e.vars.palette.divider}`},t.underlinePlacement==="left"&&{"--unstable_TabList-underlineLeft":"1px",paddingLeft:1,boxShadow:`inset 1px 0 ${e.vars.palette.divider}`}),t.tabFlex&&{[`& .${xc.root}`]:{flex:t.tabFlex}})}),Jh=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyTabList"}),i=K.useContext(yc),{isRtl:o,orientation:a,getRootProps:s,contextValue:c}=aA({rootRef:n}),{component:u="div",children:f,variant:d="plain",color:h="neutral",size:g,disableUnderline:v=!1,underlinePlacement:m=a==="horizontal"?"bottom":"right",tabFlex:b,sticky:x,slots:S={},slotProps:C={}}=r,I=Te(r,$T),w=g!=null?g:i,A=R({},r,{isRtl:o,orientation:a,variant:d,color:h,size:w,sticky:x,tabFlex:b,nesting:!1,disableUnderline:v,underlinePlacement:m}),E=FT(A),k=R({},I,{component:u,slots:S,slotProps:C}),[B,G]=Ae("root",{ref:n,elementType:NT,getSlotProps:s,externalForwardedProps:k,ownerState:A,className:E.root});return l.jsx(B,R({},G,{children:l.jsx(sA,{value:c,children:l.jsx(fc,{row:a==="horizontal",nested:!0,children:f})})}))}),zT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],jT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,s={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${xe(i)}`,o&&`color${xe(o)}`]};return ht(s,BT,{})},UT=ye(gc,{name:"JoyTab",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>[{flex:"initial",justifyContent:e.row?"center":"initial","--unstable_ListItemDecorator-alignItems":"center","--unstable_offset":"min(calc(-1 * var(--variant-borderWidth, 0px)), -1px)"},!e.disableIndicator&&{'&[aria-selected="true"]':{"--Tab-indicatorColor":"currentColor",zIndex:1},"&::after":{content:'""',display:"block",position:"absolute",margin:"auto",background:"var(--Tab-indicatorColor)",borderRadius:"var(--Tab-indicatorRadius)"}},!e.disableIndicator&&e.indicatorPlacement==="bottom"&&{paddingBottom:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",bottom:"calc(-1px - var(--unstable_TabList-underlineBottom, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="top"&&{paddingTop:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",top:"calc(-1px - var(--unstable_TabList-underlineTop, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="right"&&{paddingRight:"calc(var(--ListItem-paddingRight) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",right:"calc(-1px - var(--unstable_TabList-underlineRight, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="left"&&{paddingLeft:"calc(var(--ListItem-paddingLeft) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",left:"calc(-1px - var(--unstable_TabList-underlineLeft, 0px))"}}]),Kr=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyTab"}),i=K.useContext(uc),{action:o,children:a,disabled:s=!1,component:c="button",orientation:u="horizontal",variant:f="plain",color:d="neutral",disableIndicator:h=!1,indicatorPlacement:g=i?"bottom":"right",indicatorInset:v=!1,slots:m={},slotProps:b={}}=r,x=Te(r,zT),S=K.useRef(null),C=cn(S,n),{active:I,focusVisible:w,setFocusVisible:A,selected:E,getRootProps:k}=cA(R({},r,{rootRef:C}));K.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),S.current.focus()}}),[A]);const B=R({},r,{disableIndicator:h,indicatorPlacement:g,indicatorInset:v,orientation:u,row:i,active:I,focusVisible:w,disabled:s,selected:E,variant:f,color:d}),G=jT(B),O=R({},x,{component:c,slots:m,slotProps:b}),[T,N]=Ae("root",{ref:n,elementType:UT,getSlotProps:k,externalForwardedProps:O,ownerState:B,className:G.root});return l.jsx(mT.Provider,{value:u,children:l.jsx(T,R({},N,{children:a}))})});function jn(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 Xh(e){if(K.isValidElement(e)||nh.isValidElementType(e)||!jn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Xh(e[n])}),t}function Gt(e,t,n={clone:!0}){const r=n.clone?$({},e):e;return jn(e)&&jn(t)&&Object.keys(t).forEach(i=>{K.isValidElement(t[i])||nh.isValidElementType(t[i])?r[i]=t[i]:jn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&jn(e[i])?r[i]=Gt(e[i],t[i],n):n.clone?r[i]=jn(t[i])?Xh(t[i]):t[i]:r[i]=t[i]}),r}function Ar(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function qr(e){if(typeof e!="string")throw new Error(Ar(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Cc(e,t){const n=$({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=$($({},e[i]),n[i]);else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)n[i]=o||{};else if(!o)n[i]=a;else{n[i]=$({},a);for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const c=s;n[i][c]=Cc(o[c],a[c])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function VT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let c=0;c<o.length;c+=1){const u=o[c];u&&(a+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(a+=" "+n[u]))}r[i]=a}return r}const Zh=e=>e,HT=(()=>{let e=Zh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Zh}}})(),WT={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ep(e,t,n="Mui"){const r=WT[t];return r?`${n}-${r}`:`${HT.generate(e)}-${t}`}function GT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=ep(e,i,n)}),r}function YT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function to(e,t){return t?Gt(e,t,{clone:!1}):e}function KT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,s;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((s=i.match(o))==null?void 0:s[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},$({},t)):t}function qT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function QT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function JT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...s)=>t(e.breakpoints.up(...s),a),o.down=(...s)=>t(e.breakpoints.down(...s),a),o.between=(...s)=>t(e.breakpoints.between(...s),a),o.only=(...s)=>t(e.breakpoints.only(...s),a),o.not=(...s)=>{const c=t(e.breakpoints.not(...s),a);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},i=o=>(n(r,o),r);return n(i),Q($({},e),{containerQueries:i})}const $a={xs:0,sm:600,md:900,lg:1200,xl:1536},tp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${$a[e]}px)`},XT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:$a[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Un(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||tp;return t.reduce((a,s,c)=>(a[o.up(o.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const o=r.breakpoints||tp;return Object.keys(t).reduce((a,s)=>{if(qT(o.keys,s)){const c=QT(r.containerQueries?r:XT,s);c&&(a[c]=n(t[s],s))}else if(Object.keys(o.values||$a).includes(s)){const c=o.up(s);a[c]=n(t[s],s)}else{const c=s;a[c]=t[c]}return a},{})}return n(t)}function ZT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function eE(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Fa(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Na(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Fa(e,n)||r,t&&(i=t(i,r,e)),i}function ct(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],c=a.theme,u=Fa(c,r)||{};return Un(a,s,d=>{let h=Na(u,i,d);return d===h&&typeof d=="string"&&(h=Na(u,i,`${t}${d==="default"?"":qr(d)}`,d)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function tE(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const nE={m:"margin",p:"padding"},rE={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},np={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},iE=tE(e=>{if(e.length>2)if(np[e])e=np[e];else return[e];const[t,n]=e.split(""),r=nE[t],i=rE[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),wc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Sc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...wc,...Sc];function no(e,t,n,r){var o;const i=(o=Fa(e,t,!0))!=null?o:n;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:typeof i=="string"?`calc(${a} * ${i})`:i*a:Array.isArray(i)?a=>{if(typeof a=="string")return a;const s=Math.abs(a),c=i[s];return a>=0?c:typeof c=="number"?-c:`-${c}`}:typeof i=="function"?i:()=>{}}function Ic(e){return no(e,"spacing",8)}function ro(e,t){return typeof t=="string"||t==null?t:e(t)}function oE(e,t){return n=>e.reduce((r,i)=>(r[i]=ro(t,n),r),{})}function aE(e,t,n,r){if(!t.includes(n))return null;const i=iE(n),o=oE(i,r),a=e[n];return Un(e,a,o)}function rp(e,t){const n=Ic(e.theme);return Object.keys(e).map(r=>aE(e,t,r,n)).reduce(to,{})}function rt(e){return rp(e,wc)}rt.propTypes={},rt.filterProps=wc;function it(e){return rp(e,Sc)}it.propTypes={},it.filterProps=Sc;function za(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?to(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function nn(e){return typeof e!="number"?e:`${e}px solid`}function rn(e,t){return ct({prop:e,themeKey:"borders",transform:t})}const sE=rn("border",nn),lE=rn("borderTop",nn),cE=rn("borderRight",nn),uE=rn("borderBottom",nn),dE=rn("borderLeft",nn),fE=rn("borderColor"),hE=rn("borderTopColor"),pE=rn("borderRightColor"),gE=rn("borderBottomColor"),mE=rn("borderLeftColor"),vE=rn("outline",nn),bE=rn("outlineColor"),ja=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=no(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:ro(t,r)});return Un(e,e.borderRadius,n)}return null};ja.propTypes={},ja.filterProps=["borderRadius"],za(sE,lE,cE,uE,dE,fE,hE,pE,gE,mE,ja,vE,bE);const Ua=e=>{if(e.gap!==void 0&&e.gap!==null){const t=no(e.theme,"spacing",8),n=r=>({gap:ro(t,r)});return Un(e,e.gap,n)}return null};Ua.propTypes={},Ua.filterProps=["gap"];const Va=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=no(e.theme,"spacing",8),n=r=>({columnGap:ro(t,r)});return Un(e,e.columnGap,n)}return null};Va.propTypes={},Va.filterProps=["columnGap"];const Ha=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=no(e.theme,"spacing",8),n=r=>({rowGap:ro(t,r)});return Un(e,e.rowGap,n)}return null};Ha.propTypes={},Ha.filterProps=["rowGap"];const yE=ct({prop:"gridColumn"}),xE=ct({prop:"gridRow"}),CE=ct({prop:"gridAutoFlow"}),wE=ct({prop:"gridAutoColumns"}),SE=ct({prop:"gridAutoRows"}),IE=ct({prop:"gridTemplateColumns"}),AE=ct({prop:"gridTemplateRows"}),TE=ct({prop:"gridTemplateAreas"}),EE=ct({prop:"gridArea"});za(Ua,Va,Ha,yE,xE,CE,wE,SE,IE,AE,TE,EE);function Qr(e,t){return t==="grey"?t:e}const kE=ct({prop:"color",themeKey:"palette",transform:Qr}),_E=ct({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Qr}),PE=ct({prop:"backgroundColor",themeKey:"palette",transform:Qr});za(kE,_E,PE);function Yt(e){return e<=1&&e!==0?`${e*100}%`:e}const DE=ct({prop:"width",transform:Yt}),Ac=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,s,c;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||$a[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Yt(n)}};return Un(e,e.maxWidth,t)}return null};Ac.filterProps=["maxWidth"];const OE=ct({prop:"minWidth",transform:Yt}),RE=ct({prop:"height",transform:Yt}),ME=ct({prop:"maxHeight",transform:Yt}),LE=ct({prop:"minHeight",transform:Yt});ct({prop:"size",cssProperty:"width",transform:Yt}),ct({prop:"size",cssProperty:"height",transform:Yt});const BE=ct({prop:"boxSizing"});za(DE,Ac,OE,RE,ME,LE,BE);const Wa={border:{themeKey:"borders",transform:nn},borderTop:{themeKey:"borders",transform:nn},borderRight:{themeKey:"borders",transform:nn},borderBottom:{themeKey:"borders",transform:nn},borderLeft:{themeKey:"borders",transform:nn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:nn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ja},color:{themeKey:"palette",transform:Qr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Qr},backgroundColor:{themeKey:"palette",transform:Qr},p:{style:it},pt:{style:it},pr:{style:it},pb:{style:it},pl:{style:it},px:{style:it},py:{style:it},padding:{style:it},paddingTop:{style:it},paddingRight:{style:it},paddingBottom:{style:it},paddingLeft:{style:it},paddingX:{style:it},paddingY:{style:it},paddingInline:{style:it},paddingInlineStart:{style:it},paddingInlineEnd:{style:it},paddingBlock:{style:it},paddingBlockStart:{style:it},paddingBlockEnd:{style:it},m:{style:rt},mt:{style:rt},mr:{style:rt},mb:{style:rt},ml:{style:rt},mx:{style:rt},my:{style:rt},margin:{style:rt},marginTop:{style:rt},marginRight:{style:rt},marginBottom:{style:rt},marginLeft:{style:rt},marginX:{style:rt},marginY:{style:rt},marginInline:{style:rt},marginInlineStart:{style:rt},marginInlineEnd:{style:rt},marginBlock:{style:rt},marginBlockStart:{style:rt},marginBlockEnd:{style:rt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ua},rowGap:{style:Ha},columnGap:{style:Va},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Yt},maxWidth:{style:Ac},minWidth:{transform:Yt},height:{transform:Yt},maxHeight:{transform:Yt},minHeight:{transform:Yt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function $E(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function FE(e,t){return typeof e=="function"?e(t):e}function NE(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:d}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=Fa(i,u)||{};return d?d(a):Un(a,r,v=>{let m=Na(h,f,v);return v===m&&typeof v=="string"&&(m=Na(h,f,`${n}${v==="default"?"":qr(v)}`,v)),c===!1?m:{[c]:m}})}function t(n){var s;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(s=i.unstable_sxConfig)!=null?s:Wa;function a(c){let u=c;if(typeof c=="function")u=c(i);else if(typeof c!="object")return c;if(!u)return null;const f=ZT(i.breakpoints),d=Object.keys(f);let h=f;return Object.keys(u).forEach(g=>{const v=FE(u[g],i);if(v!=null)if(typeof v=="object")if(o[g])h=to(h,e(g,v,i,o));else{const m=Un({theme:i},v,b=>({[g]:b}));$E(m,v)?h[g]=t({sx:v,theme:i}):h=to(h,m)}else h=to(h,e(g,v,i,o))}),KT(i,eE(d,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Jr=NE();Jr.filterProps=["sx"];function zE(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var jE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},UE=!1,VE=/[A-Z]|^ms/g,HE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ip=function(t){return t.charCodeAt(1)===45},op=function(t){return t!=null&&typeof t!="boolean"},Tc=uA(function(e){return ip(e)?e:e.replace(VE,"-$&").toLowerCase()}),ap=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(HE,function(r,i,o){return ir={name:i,styles:o,next:ir},i})}return jE[t]!==1&&!ip(t)&&typeof n=="number"&&n!==0?n+"px":n},WE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ga(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return ir={name:i.name,styles:i.styles,next:ir},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)ir={name:a.name,styles:a.styles,next:ir},a=a.next;var s=o.styles+";";return s}return GE(e,t,n)}}var c=n;return c}function GE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ga(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;op(s)&&(r+=Tc(o)+":"+ap(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&UE)throw new Error(WE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)op(a[c])&&(r+=Tc(o)+":"+ap(o,a[c])+";");else{var u=Ga(e,t,a);switch(o){case"animation":case"animationName":{r+=Tc(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var sp=/label:\s*([^\s;{]+)\s*(;|$)/g,ir;function YE(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";ir=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Ga(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Ga(n,t,e[s]),r){var c=o;i+=c[s]}sp.lastIndex=0;for(var u="",f;(f=sp.exec(i))!==null;)u+="-"+f[1];var d=zE(i)+u;return{name:d,styles:i,next:ir}}/**
2333
+ */var jl=Symbol.for("react.transitional.element"),Ul=Symbol.for("react.portal"),la=Symbol.for("react.fragment"),ca=Symbol.for("react.strict_mode"),ua=Symbol.for("react.profiler"),da=Symbol.for("react.consumer"),fa=Symbol.for("react.context"),ha=Symbol.for("react.forward_ref"),pa=Symbol.for("react.suspense"),ga=Symbol.for("react.suspense_list"),ma=Symbol.for("react.memo"),va=Symbol.for("react.lazy"),eI=Symbol.for("react.offscreen"),tI=Symbol.for("react.client.reference");function Zt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jl:switch(e=e.type,e){case la:case ua:case ca:case pa:case ga:return e;default:switch(e=e&&e.$$typeof,e){case fa:case ha:case va:case ma:return e;case da:return e;default:return t}}case Ul:return t}}}je.ContextConsumer=da,je.ContextProvider=fa,je.Element=jl,je.ForwardRef=ha,je.Fragment=la,je.Lazy=va,je.Memo=ma,je.Portal=Ul,je.Profiler=ua,je.StrictMode=ca,je.Suspense=pa,je.SuspenseList=ga,je.isContextConsumer=function(e){return Zt(e)===da},je.isContextProvider=function(e){return Zt(e)===fa},je.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jl},je.isForwardRef=function(e){return Zt(e)===ha},je.isFragment=function(e){return Zt(e)===la},je.isLazy=function(e){return Zt(e)===va},je.isMemo=function(e){return Zt(e)===ma},je.isPortal=function(e){return Zt(e)===Ul},je.isProfiler=function(e){return Zt(e)===ua},je.isStrictMode=function(e){return Zt(e)===ca},je.isSuspense=function(e){return Zt(e)===pa},je.isSuspenseList=function(e){return Zt(e)===ga},je.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===la||e===ua||e===ca||e===pa||e===ga||e===eI||typeof e=="object"&&e!==null&&(e.$$typeof===va||e.$$typeof===ma||e.$$typeof===fa||e.$$typeof===da||e.$$typeof===ha||e.$$typeof===tI||e.getModuleId!==void 0)},je.typeOf=Zt,th.exports=je;var nh=th.exports;function xe(e){if(typeof e!="string")throw new Error(sa(7));return e.charAt(0).toUpperCase()+e.slice(1)}function rh(e,t){var n,r;return K.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const nI=typeof window!="undefined"?K.useLayoutEffect:K.useEffect;let ih=0;function rI(e){const[t,n]=K.useState(e),r=e||t;return K.useEffect(()=>{t==null&&(ih+=1,n(`mui-${ih}`))},[t]),r}const oh=K.useId;function qi(e){if(oh!==void 0){const t=oh();return e!=null?e:t}return rI(e)}function Vl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=K.useRef(e!==void 0),[o,a]=K.useState(t),s=i?e:o,c=K.useCallback(u=>{i||a(u)},[]);return[s,c]}class Hl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Hl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let ba=!0,Wl=!1;const iI=new Hl,oI={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function aI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&oI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function sI(e){e.metaKey||e.altKey||e.ctrlKey||(ba=!0)}function Gl(){ba=!1}function lI(){this.visibilityState==="hidden"&&Wl&&(ba=!0)}function cI(e){e.addEventListener("keydown",sI,!0),e.addEventListener("mousedown",Gl,!0),e.addEventListener("pointerdown",Gl,!0),e.addEventListener("touchstart",Gl,!0),e.addEventListener("visibilitychange",lI,!0)}function uI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return ba||aI(t)}function ah(){const e=K.useCallback(i=>{i!=null&&cI(i.ownerDocument)},[]),t=K.useRef(!1);function n(){return t.current?(Wl=!0,iI.start(100,()=>{Wl=!1}),t.current=!1,!0):!1}function r(i){return uI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function sh(e,t){const n=R({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=R({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=R({},o),Object.keys(i).forEach(a=>{n[r][a]=sh(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function ht(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const s=t(a);s!==""&&o.push(s),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const lh=e=>e,dI=(()=>{let e=lh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=lh}}})(),fI={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ch(e,t,n="Mui"){const r=fI[t];return r?`${n}-${r}`:`${dI.generate(e)}-${t}`}function hI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=ch(e,i,n)}),r}function Yl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:s,rootElementName:c}=e,u=K.useRef(null),[f,d]=K.useState(!1),{isFocusVisibleRef:h,onFocus:g,onBlur:v,ref:m}=ah(),[b,x]=K.useState(!1);t&&!n&&b&&x(!1),K.useEffect(()=>{h.current=b},[b,h]);const[S,C]=JS({rootElementName:c!=null?c:r||a?"a":void 0,componentName:"Button"}),I=j=>F=>{var M;b&&F.preventDefault(),(M=j.onMouseLeave)==null||M.call(j,F)},w=j=>F=>{var M;v(F),h.current===!1&&x(!1),(M=j.onBlur)==null||M.call(j,F)},A=j=>F=>{var M;if(u.current||(u.current=F.currentTarget),g(F),h.current===!0){var V;x(!0),(V=j.onFocusVisible)==null||V.call(j,F)}(M=j.onFocus)==null||M.call(j,F)},E=()=>{const j=u.current;return S==="BUTTON"||S==="INPUT"&&["button","submit","reset"].includes(j==null?void 0:j.type)||S==="A"&&(j==null?void 0:j.href)},k=j=>F=>{if(!t){var M;(M=j.onClick)==null||M.call(j,F)}},$=j=>F=>{var M;t||(d(!0),document.addEventListener("mouseup",()=>{d(!1)},{once:!0})),(M=j.onMouseDown)==null||M.call(j,F)},G=j=>F=>{var M;if((M=j.onKeyDown)==null||M.call(j,F),!F.defaultMuiPrevented&&(F.target===F.currentTarget&&!E()&&F.key===" "&&F.preventDefault(),F.target===F.currentTarget&&F.key===" "&&!t&&d(!0),F.target===F.currentTarget&&!E()&&F.key==="Enter"&&!t)){var V;(V=j.onClick)==null||V.call(j,F),F.preventDefault()}},O=j=>F=>{var M;if(F.target===F.currentTarget&&d(!1),(M=j.onKeyUp)==null||M.call(j,F),F.target===F.currentTarget&&!E()&&!t&&F.key===" "&&!F.defaultMuiPrevented){var V;(V=j.onClick)==null||V.call(j,F)}},T=cn(C,i,m,u),N={};return o!==void 0&&(N.tabIndex=o),S==="BUTTON"?(N.type=s!=null?s:"button",n?N["aria-disabled"]=t:N.disabled=t):S==="INPUT"?s&&["button","submit","reset"].includes(s)&&(n?N["aria-disabled"]=t:N.disabled=t):S!==""&&(!r&&!a&&(N.role="button",N.tabIndex=o!=null?o:0),t&&(N["aria-disabled"]=t,N.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(j={})=>{const F=R({},Bn(e),Bn(j)),M=R({type:s},F,N,j,{onBlur:w(F),onClick:k(F),onFocus:A(F),onKeyDown:G(F),onKeyUp:O(F),onMouseDown:$(F),onMouseLeave:I(F),ref:T});return delete M.onFocusVisible,M},focusVisible:b,setFocusVisible:x,active:f,rootRef:T}}function pI(e,t){return e===t}const Kl={},uh=()=>{};function Ql(e,t){const n=R({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function gI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,s=K.useRef(n);K.useEffect(()=>{if(a.current===null)return;const c=Ql(s.current,o);Object.keys(t).forEach(u=>{var f;const d=(f=r[u])!=null?f:pI,h=t[u],g=c[u];if(g==null&&h!=null||g!=null&&h==null||g!=null&&h!=null&&!d(h,g)){var v,m;i==null||i((v=a.current.event)!=null?v:null,u,h,(m=a.current.type)!=null?m:"",t)}}),s.current=t,a.current=null},[s,t,a,i,r,o])}function mI(e){const t=K.useRef(null),{reducer:n,initialState:r,controlledProps:i=Kl,stateComparers:o=Kl,onStateChange:a=uh,actionContext:s,componentName:c=""}=e;K.useRef(i);const u=K.useCallback((g,v)=>{t.current=v;const m=Ql(g,i);return n(m,v)},[i,n]),[f,d]=K.useReducer(u,r),h=K.useCallback(g=>{d(R({},g,{context:s}))},[s]);return gI({nextState:f,initialState:r,stateComparers:o!=null?o:Kl,onStateChange:a!=null?a:uh,controlledProps:i,lastActionRef:t}),[Ql(f,i),h]}const vI=K.createContext(void 0);function bI(){return K.useContext(vI)}function yI(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:s=!1,value:c,inputRef:u}=e,f=bI();let d,h,g,v,m;if(f){var b,x,S;d=void 0,h=(b=f.disabled)!=null?b:!1,g=(x=f.error)!=null?x:!1,v=(S=f.required)!=null?S:!1,m=f.value}else d=t,h=n,g=r,v=s,m=c;const{current:C}=K.useRef(m!=null),I=K.useCallback(j=>{},[]),w=K.useRef(null),A=cn(w,u,I),[E,k]=K.useState(!1);K.useEffect(()=>{!f&&h&&E&&(k(!1),i==null||i())},[f,h,E,i]);const $=j=>F=>{var M;if(f!=null&&f.disabled){F.stopPropagation();return}if((M=j.onFocus)==null||M.call(j,F),f&&f.onFocus){var V;f==null||(V=f.onFocus)==null||V.call(f)}else k(!0)},G=j=>F=>{var M;(M=j.onBlur)==null||M.call(j,F),f&&f.onBlur?f.onBlur():k(!1)},O=j=>(F,...M)=>{var V,Y;if(!C&&(F.target||w.current)==null)throw new Error(sa(17));f==null||(V=f.onChange)==null||V.call(f,F),(Y=j.onChange)==null||Y.call(j,F,...M)},T=j=>F=>{var M;w.current&&F.currentTarget===F.target&&w.current.focus(),(M=j.onClick)==null||M.call(j,F)};return{disabled:h,error:g,focused:E,formControlContext:f,getInputProps:(j={})=>{const M=R({},{onBlur:i,onChange:o,onFocus:a},Bn(j)),V=R({},M,{onBlur:G(M),onChange:O(M),onFocus:$(M)});return R({},V,{"aria-invalid":g||void 0,defaultValue:d,value:m,required:v,disabled:h},j,{ref:A},V)},getRootProps:(j={})=>{const F=Bn(e,["onBlur","onChange","onFocus"]),M=R({},F,Bn(j));return R({},j,M,{onClick:T(M)})},inputRef:A,required:v,value:m}}const wt={blur:"list:blur",focus:"list:focus",itemClick:"list:itemClick",itemHover:"list:itemHover",itemsChange:"list:itemsChange",keyDown:"list:keyDown",resetHighlight:"list:resetHighlight",highlightLast:"list:highlightLast",textNavigation:"list:textNavigation",clearSelection:"list:clearSelection"};function xI(e,t,n,r,i,o){if(n.length===0||!r&&n.every((s,c)=>i(s,c)))return-1;let a=e;for(;;){if(!o&&t==="next"&&a===n.length||!o&&t==="previous"&&a===-1)return-1;if(r?!1:i(n[a],a))a+=t==="next"?1:-1,o&&(a=(a+n.length)%n.length);else return a}}function Ot(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:s,itemComparer:c,focusManagement:u}=n,f=u==="DOM"?0:-1,d=i.length-1,h=e==null?-1:i.findIndex(x=>c(x,e));let g,v,m=!a;switch(t){case"reset":if(f===-1)return null;g=0,v="next",m=!1;break;case"start":g=0,v="next",m=!1;break;case"end":g=d,v="previous",m=!1;break;default:{const x=h+t;x<0?!m&&h!==-1||Math.abs(t)>1?(g=0,v="next"):(g=d,v="previous"):x>d?!m||Math.abs(t)>1?(g=d,v="previous"):(g=0,v="next"):(g=x,v=t>=0?"next":"previous")}}const b=xI(g,v,i,s,o,m);return b===-1&&e!==null&&!o(e,h)?e:(r=i[b])!=null?r:null}function CI(e,t,n,r){return n==="none"?[]:n==="single"?r(t[0],e)?t:[e]:t.some(i=>r(i,e))?t.filter(i=>!r(i,e)):[...t,e]}function dh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:s}=t,c=a.findIndex(f=>r(e,f));if(i(e,c))return t;const u=CI(e,s,o,r);return R({},t,{selectedValues:u,highlightedValue:e})}function wI(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return R({},t,{highlightedValue:Ot(r,"start",n)});case"End":return R({},t,{highlightedValue:Ot(r,"end",n)});case"PageUp":return R({},t,{highlightedValue:Ot(r,-o,n)});case"PageDown":return R({},t,{highlightedValue:Ot(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return R({},t,{highlightedValue:Ot(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return R({},t,{highlightedValue:Ot(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return R({},t,{highlightedValue:Ot(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return R({},t,{highlightedValue:Ot(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:dh(t.highlightedValue,t,n)}return t}function SI(e,t){return t.focusManagement==="DOM"?e:R({},e,{highlightedValue:null})}function II(e,t,n){var r;const i=(r=n(e))==null?void 0:r.trim().toLowerCase();return!i||i.length===0?!1:i.indexOf(t)===0}function AI(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,s=t.length>1;let c=s?e.highlightedValue:Ot(e.highlightedValue,1,n);for(let u=0;u<r.length;u+=1){if(!c||!s&&e.highlightedValue===c)return e;if(II(c,t,a)&&(!i(c,r.indexOf(c))||o))return R({},e,{highlightedValue:c});c=Ot(c,1,n)}return e}function TI(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let s=null;if(n.highlightedValue!=null){var c;s=(c=e.find(d=>o(d,n.highlightedValue)))!=null?c:null}else a==="DOM"&&t.length===0&&(s=Ot(null,"reset",r));const f=((i=n.selectedValues)!=null?i:[]).filter(d=>e.some(h=>o(h,d)));return R({},n,{highlightedValue:s,selectedValues:f})}function EI(e,t){return R({},e,{highlightedValue:Ot(null,"reset",t)})}function kI(e,t){return R({},e,{highlightedValue:Ot(null,"end",t)})}function _I(e,t){return R({},e,{selectedValues:[],highlightedValue:Ot(null,"reset",t)})}function fh(e,t){const{type:n,context:r}=t;switch(n){case wt.keyDown:return wI(t.key,e,r);case wt.itemClick:return dh(t.item,e,r);case wt.blur:return SI(e,r);case wt.textNavigation:return AI(e,t.searchString,r);case wt.itemsChange:return TI(t.items,t.previousItems,e,r);case wt.resetHighlight:return EI(e,r);case wt.highlightLast:return kI(e,r);case wt.clearSelection:return _I(e,r);default:return e}}const PI=500;function DI(e){const t=K.useRef({searchString:"",lastTime:null});return K.useCallback(n=>{if(n.key.length===1&&n.key!==" "){const r=t.current,i=n.key.toLowerCase(),o=performance.now();r.searchString.length>0&&r.lastTime&&o-r.lastTime>PI?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const hh={},OI=()=>{},RI=(e,t)=>e===t,MI=()=>!1,LI=e=>typeof e=="string"?e:String(e),BI=()=>({highlightedValue:null,selectedValues:[]});function $I(e){const{controlledProps:t=hh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=BI,getItemDomElement:a,getItemId:s,isItemDisabled:c=MI,rootRef:u,onStateChange:f=OI,items:d,itemComparer:h=RI,getItemAsString:g=LI,onChange:v,onHighlightChange:m,onItemsChange:b,orientation:x="vertical",pageSize:S=5,reducerActionContext:C=hh,selectionMode:I="single",stateReducer:w,componentName:A="useList"}=e,E=K.useRef(null),k=cn(u,E),$=K.useCallback((ae,ee,ne)=>{if(m==null||m(ae,ee,ne),i==="DOM"&&ee!=null&&(ne===wt.itemClick||ne===wt.keyDown||ne===wt.textNavigation)){var J;a==null||(J=a(ee))==null||J.focus()}},[a,m,i]),G=K.useMemo(()=>({highlightedValue:h,selectedValues:(ae,ee)=>Jf(ae,ee,h)}),[h]),O=K.useCallback((ae,ee,ne,J,ce)=>{switch(f==null||f(ae,ee,ne,J,ce),ee){case"highlightedValue":$(ae,ne,J);break;case"selectedValues":v==null||v(ae,ne,J);break}},[$,v,f]),T=K.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:c,itemComparer:h,items:d,getItemAsString:g,onHighlightChange:$,orientation:x,pageSize:S,selectionMode:I,stateComparers:G}),[n,r,i,c,h,d,g,$,x,S,I,G]),N=o(),H=w!=null?w:fh,j=K.useMemo(()=>R({},C,T),[C,T]),[F,M]=mI({reducer:H,actionContext:j,initialState:N,controlledProps:t,stateComparers:G,onStateChange:O,componentName:A}),{highlightedValue:V,selectedValues:Y}=F,Z=DI((ae,ee)=>M({type:wt.textNavigation,event:ee,searchString:ae})),D=K.useRef([]);K.useEffect(()=>{Jf(D.current,d,h)||(M({type:wt.itemsChange,event:null,items:d,previousItems:D.current}),D.current=d,b==null||b(d))},[d,h,M,b]);const L=ae=>ee=>{var ne;if((ne=ae.onKeyDown)==null||ne.call(ae,ee),ee.defaultMuiPrevented)return;const J=["Home","End","PageUp","PageDown"];x==="vertical"?J.push("ArrowUp","ArrowDown"):J.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&J.push(" ","Enter"),J.includes(ee.key)&&ee.preventDefault(),M({type:wt.keyDown,key:ee.key,event:ee}),Z(ee)},U=ae=>ee=>{var ne,J;(ne=ae.onBlur)==null||ne.call(ae,ee),!ee.defaultMuiPrevented&&((J=E.current)!=null&&J.contains(ee.relatedTarget)||M({type:wt.blur,event:ee}))},W=(ae={})=>{const ee=Bn(ae);return R({},ae,{"aria-activedescendant":i==="activeDescendant"&&V!=null?s(V):void 0,tabIndex:i==="DOM"?-1:0,ref:k},ee,{onBlur:U(ee),onKeyDown:L(ee)})},ie=K.useCallback(ae=>{const ee=(Y!=null?Y:[]).some(ce=>ce!=null&&h(ae,ce)),ne=V!=null&&h(ae,V);return{focusable:i==="DOM",highlighted:ne,selected:ee}},[h,Y,V,i]),le=K.useMemo(()=>({dispatch:M,getItemState:ie}),[M,ie]);return K.useDebugValue({state:F}),{contextValue:le,dispatch:M,getRootProps:W,rootRef:k,state:F}}const ph=K.createContext(null);function FI(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=K.useContext(ph);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:s,focusable:c}=o(n),u=K.useCallback(g=>v=>{var m;(m=g.onClick)==null||m.call(g,v),!v.defaultPrevented&&i({type:wt.itemClick,item:n,event:v})},[i,n]),f=K.useCallback(g=>v=>{var m;(m=g.onMouseOver)==null||m.call(g,v),!v.defaultPrevented&&i({type:wt.itemHover,item:n,event:v})},[i,n]);let d;return c&&(d=a?0:-1),{getRootProps:(g={})=>{const v=Bn(g);return R({},g,{onClick:u(v),onPointerOver:t?f(v):void 0,tabIndex:d})},highlighted:a,selected:s}}const ql=K.createContext(null);function NI(e){const t=Array.from(e.keys()).map(n=>{const r=e.get(n);return{key:n,subitem:r}});return t.sort((n,r)=>{const i=n.subitem.ref.current,o=r.subitem.ref.current;return i===null||o===null||i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}),new Map(t.map(n=>[n.key,n.subitem]))}function gh(){const[e,t]=K.useState(new Map),n=K.useRef(new Set),r=K.useCallback(function(u){n.current.delete(u),t(f=>{const d=new Map(f);return d.delete(u),d})},[]),i=K.useCallback(function(u,f){let d;return typeof u=="function"?d=u(n.current):d=u,n.current.add(d),t(h=>{const g=new Map(h);return g.set(d,f),g}),{id:d,deregister:()=>r(d)}},[r]),o=K.useMemo(()=>NI(e),[e]),a=K.useCallback(function(u){return Array.from(o.keys()).indexOf(u)},[o]);return{contextValue:K.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function mh(e,t){const n=K.useContext(ql);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=K.useState(typeof e=="function"?void 0:e);return nI(()=>{const{id:a,deregister:s}=r(e,t);return o(a),s},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function zI(e,t){return function(r={}){const i=R({},r,e(r));return R({},i,t(i))}}const jI=Math.min,UI=Math.max,ya=Math.round,xa=Math.floor,Ca=e=>({x:e,y:e});function VI(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function vh(e){return yh(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bh(e){var t;return(t=(yh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yh(e){return e instanceof Node||e instanceof Nn(e).Node}function HI(e){return e instanceof Element||e instanceof Nn(e).Element}function Jl(e){return e instanceof HTMLElement||e instanceof Nn(e).HTMLElement}function xh(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function Ch(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Xl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function WI(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function GI(e){return["html","body","#document"].includes(vh(e))}function Xl(e){return Nn(e).getComputedStyle(e)}function YI(e){if(vh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xh(e)&&e.host||bh(e);return xh(t)?t.host:t}function wh(e){const t=YI(e);return GI(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jl(t)&&Ch(t)?t:wh(t)}function wa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=wh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const s=Zl(a);return t.concat(a,a.visualViewport||[],Ch(i)?i:[],s&&n?wa(s):[])}return t.concat(i,wa(i,[],n))}function Zl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KI(e){const t=Xl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jl(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ya(n)!==o||ya(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function ec(e){return HI(e)?e:e.contextElement}function Sh(e){const t=ec(e);if(!Jl(t))return Ca(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=KI(t);let a=(o?ya(n.width):n.width)/r,s=(o?ya(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const QI=Ca(0);function qI(e){const t=Nn(e);return!WI()||!t.visualViewport?QI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JI(e,t,n){return!1}function Ih(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=ec(e);let a=Ca(1);t&&(a=Sh(e));const s=JI()?qI(o):Ca(0);let c=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(o){const h=Nn(o),g=r;let v=h,m=Zl(v);for(;m&&r&&g!==v;){const b=Sh(m),x=m.getBoundingClientRect(),S=Xl(m),C=x.left+(m.clientLeft+parseFloat(S.paddingLeft))*b.x,I=x.top+(m.clientTop+parseFloat(S.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,d*=b.y,c+=C,u+=I,v=Nn(m),m=Zl(v)}}return VI({width:f,height:d,x:c,y:u})}function XI(e,t){let n=null,r;const i=bh(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),o();const{left:u,top:f,width:d,height:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;const g=xa(f),v=xa(i.clientWidth-(u+d)),m=xa(i.clientHeight-(f+h)),b=xa(u),S={rootMargin:-g+"px "+-v+"px "+-m+"px "+-b+"px",threshold:UI(0,jI(1,c))||1};let C=!0;function I(w){const A=w[0].intersectionRatio;if(A!==c){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(I,q(B({},S),{root:i.ownerDocument}))}catch(w){n=new IntersectionObserver(I,S)}n.observe(e)}return a(!0),o}function ZI(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=ec(e),f=i||o?[...u?wa(u):[],...wa(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const d=u&&s?XI(u,n):null;let h=-1,g=null;a&&(g=new ResizeObserver(x=>{let[S]=x;S&&S.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let v,m=c?Ih(e):null;c&&b();function b(){const x=Ih(e);m&&(x.x!==m.x||x.y!==m.y||x.width!==m.width||x.height!==m.height)&&n(),m=x,v=requestAnimationFrame(b)}return n(),()=>{var x;f.forEach(S=>{i&&S.removeEventListener("scroll",n),o&&S.removeEventListener("resize",n)}),d==null||d(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(v)}}function eA(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:s,readOnly:c,required:u}=e,[f,d]=Vl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=k=>$=>{var G;$.nativeEvent.defaultPrevented||(d($.target.checked),o==null||o($),(G=k.onChange)==null||G.call(k,$))},{isFocusVisibleRef:g,onBlur:v,onFocus:m,ref:b}=ah(),[x,S]=K.useState(!1);r&&x&&S(!1),K.useEffect(()=>{g.current=x},[x,g]);const C=K.useRef(null),I=k=>$=>{var G;C.current||(C.current=$.currentTarget),m($),g.current===!0&&(S(!0),s==null||s($)),a==null||a($),(G=k.onFocus)==null||G.call(k,$)},w=k=>$=>{var G;v($),g.current===!1&&S(!1),i==null||i($),(G=k.onBlur)==null||G.call(k,$)},A=cn(b,C);return{checked:f,disabled:!!r,focusVisible:x,getInputProps:(k={})=>R({checked:t,defaultChecked:n,disabled:r,readOnly:c,ref:A,required:u,type:"checkbox",role:"switch","aria-checked":t},k,{onChange:h(k),onFocus:I(k),onBlur:w(k)}),inputRef:A,readOnly:!!c}}function tA(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[s,c]=Vl({controlled:t,default:n,name:"Tabs",state:"value"}),u=K.useCallback((b,x)=>{c(x),r==null||r(b,x)},[r,c]),{subitems:f,contextValue:d}=gh(),h=K.useRef(()=>{}),g=K.useCallback(b=>{var x;return(x=f.get(b))==null?void 0:x.id},[f]),v=K.useCallback(b=>h.current(b),[]),m=K.useCallback(b=>{h.current=b},[]);return{contextValue:R({direction:o,getTabId:v,getTabPanelId:g,onSelected:u,orientation:i,registerTabIdLookup:m,selectionFollowsFocus:a,value:s},d)}}const Ah=K.createContext(null);function Sa(){const e=K.useContext(Ah);if(e==null)throw new Error("No TabsContext provided");return e}function nA(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:s,registerTabIdLookup:c,selectionFollowsFocus:u,totalSubitemCount:f,value:d,getTabId:h,getTabPanelId:g}=t,v=K.useMemo(()=>({getItemIndex:i,registerItem:s,totalSubitemCount:f}),[s,i,f]),m=K.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:g,onSelected:o,orientation:a,registerTabIdLookup:c,selectionFollowsFocus:u,value:d}),[r,h,g,o,a,c,u,d]);return l.jsx(ql.Provider,{value:v,children:l.jsx(Ah.Provider,{value:m,children:n})})}function rA(e){return e.size}function iA(e){const{value:t,id:n,rootRef:r}=e,i=Sa();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,s=qi(n),c=K.useRef(null),u=cn(c,r),f=K.useMemo(()=>({id:s,ref:c}),[s]),{id:d}=mh(t!=null?t:rA,f),h=d!==o,g=d!==void 0?a(d):void 0;return{hidden:h,getRootProps:(m={})=>R({"aria-labelledby":g!=null?g:void 0,hidden:h,id:s!=null?s:void 0},m,{ref:u}),rootRef:u}}const Th={valueChange:"valueChange"};function oA(e,t){if(t.type===Th.valueChange)return R({},e,{highlightedValue:t.value});const n=fh(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===wt.itemsChange){if(n.selectedValues.length>0)return R({},n,{highlightedValue:n.selectedValues[0]});Ot(null,"reset",t.context)}return r&&n.highlightedValue!=null?R({},n,{selectedValues:[n.highlightedValue]}):n}function aA(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:s,selectionFollowsFocus:c}=Sa(),{subitems:u,contextValue:f}=gh(),d=K.useCallback(O=>{var T;return(T=u.get(O))==null?void 0:T.id},[u]);s(d);const h=K.useMemo(()=>Array.from(u.keys()),[u]),g=K.useCallback(O=>{var T,N;return O==null?null:(T=(N=u.get(O))==null?void 0:N.ref.current)!=null?T:null},[u]),v=r==="rtl";let m;o==="vertical"?m="vertical":m=v?"horizontal-rtl":"horizontal-ltr";const b=K.useCallback((O,T)=>{var N;i(O,(N=T[0])!=null?N:null)},[i]),x=K.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),S=K.useCallback(O=>{var T,N;return(T=(N=u.get(O))==null?void 0:N.disabled)!=null?T:!1},[u]),{contextValue:C,dispatch:I,getRootProps:w,state:{highlightedValue:A,selectedValues:E},rootRef:k}=$I({controlledProps:x,disabledItemsFocusable:!c,focusManagement:"DOM",getItemDomElement:g,isItemDisabled:S,items:h,rootRef:n,onChange:b,orientation:m,reducerActionContext:K.useMemo(()=>({selectionFollowsFocus:c||!1}),[c]),selectionMode:"single",stateReducer:oA});K.useEffect(()=>{a!==void 0&&a!=null&&I({type:Th.valueChange,value:a})},[I,a]);const $=(O={})=>R({},O,w(O),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:K.useMemo(()=>R({},f,C),[f,C]),dispatch:I,getRootProps:$,highlightedValue:A,isRtl:v,orientation:o,rootRef:k,selectedValue:(t=E[0])!=null?t:null}}function sA(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:s}=t,c=K.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),u=K.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:s}),[a,i,s]);return l.jsx(ql.Provider,{value:u,children:l.jsx(ph.Provider,{value:c,children:n})})}function lA(e){return e.size}function cA(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=K.useRef(null),a=qi(i),{value:s,selectionFollowsFocus:c,getTabPanelId:u}=Sa(),f=K.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:d,index:h,totalItemCount:g}=mh(t!=null?t:lA,f),{getRootProps:v,highlighted:m,selected:b}=FI({item:d}),{getRootProps:x,rootRef:S,active:C,focusVisible:I,setFocusVisible:w}=Yl({disabled:r,focusableWhenDisabled:!c,type:"button"}),A=cn(o,n,S),E=d!==void 0?u(d):void 0;return{getRootProps:($={})=>{const G=Bn($),O=zI(v,x);return R({},$,O(G),{role:"tab","aria-controls":E,"aria-selected":b,id:a,ref:A})},active:C,focusVisible:I,highlighted:m,index:h,rootRef:A,selected:b||d===s,setFocusVisible:w,totalTabsCount:g}}const Eh="$$joy";function uA(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function dA(e,t){return Bt(e,t)}const fA=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},hA=["values","unit","step"],pA=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>R({},n,{[r.key]:r.val}),{})};function kh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Te(e,hA),o=pA(t),a=Object.keys(o);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,g){const v=a.indexOf(g);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(v!==-1&&typeof t[a[v]]=="number"?t[a[v]]:g)-r/100}${n})`}function f(h){return a.indexOf(h)+1<a.length?u(h,a[a.indexOf(h)+1]):s(h)}function d(h){const g=a.indexOf(h);return g===0?s(a[1]):g===a.length-1?c(a[g]):u(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return R({keys:a,values:o,up:s,down:c,between:u,only:f,not:d,unit:n},i)}const gA={borderRadius:4};function Ji(e,t){return t?Fn(e,t,{clone:!1}):e}const tc={xs:0,sm:600,md:900,lg:1200,xl:1536},_h={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${tc[e]}px)`};function zn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||_h;return t.reduce((a,s,c)=>(a[o.up(o.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const o=r.breakpoints||_h;return Object.keys(t).reduce((a,s)=>{if(Object.keys(o.values||tc).indexOf(s)!==-1){const c=o.up(s);a[c]=n(t[s],s)}else{const c=s;a[c]=t[c]}return a},{})}return n(t)}function mA(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function vA(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function rr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Ia(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=rr(e,n)||r,t&&(i=t(i,r,e)),i}function st(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],c=a.theme,u=rr(c,r)||{};return zn(a,s,d=>{let h=Ia(u,i,d);return d===h&&typeof d=="string"&&(h=Ia(u,i,`${t}${d==="default"?"":xe(d)}`,d)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function bA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const yA={m:"margin",p:"padding"},xA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ph={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},CA=bA(e=>{if(e.length>2)if(Ph[e])e=Ph[e];else return[e];const[t,n]=e.split(""),r=yA[t],i=xA[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),nc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],rc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...nc,...rc];function Xi(e,t,n,r){var i;const o=(i=rr(e,t,!1))!=null?i:n;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function Dh(e){return Xi(e,"spacing",8)}function Zi(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function wA(e,t){return n=>e.reduce((r,i)=>(r[i]=Zi(t,n),r),{})}function SA(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=CA(n),o=wA(i,r),a=e[n];return zn(e,a,o)}function Oh(e,t){const n=Dh(e.theme);return Object.keys(e).map(r=>SA(e,t,r,n)).reduce(Ji,{})}function tt(e){return Oh(e,nc)}tt.propTypes={},tt.filterProps=nc;function nt(e){return Oh(e,rc)}nt.propTypes={},nt.filterProps=rc;function Rh(e=8){if(e.mui)return e;const t=Dh({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function Aa(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Ji(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function en(e){return typeof e!="number"?e:`${e}px solid`}function tn(e,t){return st({prop:e,themeKey:"borders",transform:t})}const IA=tn("border",en),AA=tn("borderTop",en),TA=tn("borderRight",en),EA=tn("borderBottom",en),kA=tn("borderLeft",en),_A=tn("borderColor"),PA=tn("borderTopColor"),DA=tn("borderRightColor"),OA=tn("borderBottomColor"),RA=tn("borderLeftColor"),MA=tn("outline",en),LA=tn("outlineColor"),Ta=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Xi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Zi(t,r)});return zn(e,e.borderRadius,n)}return null};Ta.propTypes={},Ta.filterProps=["borderRadius"],Aa(IA,AA,TA,EA,kA,_A,PA,DA,OA,RA,Ta,MA,LA);const Ea=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Xi(e.theme,"spacing",8),n=r=>({gap:Zi(t,r)});return zn(e,e.gap,n)}return null};Ea.propTypes={},Ea.filterProps=["gap"];const ka=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Xi(e.theme,"spacing",8),n=r=>({columnGap:Zi(t,r)});return zn(e,e.columnGap,n)}return null};ka.propTypes={},ka.filterProps=["columnGap"];const _a=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Xi(e.theme,"spacing",8),n=r=>({rowGap:Zi(t,r)});return zn(e,e.rowGap,n)}return null};_a.propTypes={},_a.filterProps=["rowGap"];const BA=st({prop:"gridColumn"}),$A=st({prop:"gridRow"}),FA=st({prop:"gridAutoFlow"}),NA=st({prop:"gridAutoColumns"}),zA=st({prop:"gridAutoRows"}),jA=st({prop:"gridTemplateColumns"}),UA=st({prop:"gridTemplateRows"}),VA=st({prop:"gridTemplateAreas"}),HA=st({prop:"gridArea"});Aa(Ea,ka,_a,BA,$A,FA,NA,zA,jA,UA,VA,HA);function Yr(e,t){return t==="grey"?t:e}const WA=st({prop:"color",themeKey:"palette",transform:Yr}),GA=st({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),YA=st({prop:"backgroundColor",themeKey:"palette",transform:Yr});Aa(WA,GA,YA);function Wt(e){return e<=1&&e!==0?`${e*100}%`:e}const KA=st({prop:"width",transform:Wt}),ic=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||tc[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Wt(n)}};return zn(e,e.maxWidth,t)}return null};ic.filterProps=["maxWidth"];const QA=st({prop:"minWidth",transform:Wt}),qA=st({prop:"height",transform:Wt}),JA=st({prop:"maxHeight",transform:Wt}),XA=st({prop:"minHeight",transform:Wt});st({prop:"size",cssProperty:"width",transform:Wt}),st({prop:"size",cssProperty:"height",transform:Wt});const ZA=st({prop:"boxSizing"});Aa(KA,ic,QA,qA,JA,XA,ZA);const Pa={border:{themeKey:"borders",transform:en},borderTop:{themeKey:"borders",transform:en},borderRight:{themeKey:"borders",transform:en},borderBottom:{themeKey:"borders",transform:en},borderLeft:{themeKey:"borders",transform:en},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:en},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ta},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:nt},pt:{style:nt},pr:{style:nt},pb:{style:nt},pl:{style:nt},px:{style:nt},py:{style:nt},padding:{style:nt},paddingTop:{style:nt},paddingRight:{style:nt},paddingBottom:{style:nt},paddingLeft:{style:nt},paddingX:{style:nt},paddingY:{style:nt},paddingInline:{style:nt},paddingInlineStart:{style:nt},paddingInlineEnd:{style:nt},paddingBlock:{style:nt},paddingBlockStart:{style:nt},paddingBlockEnd:{style:nt},m:{style:tt},mt:{style:tt},mr:{style:tt},mb:{style:tt},ml:{style:tt},mx:{style:tt},my:{style:tt},margin:{style:tt},marginTop:{style:tt},marginRight:{style:tt},marginBottom:{style:tt},marginLeft:{style:tt},marginX:{style:tt},marginY:{style:tt},marginInline:{style:tt},marginInlineStart:{style:tt},marginInlineEnd:{style:tt},marginBlock:{style:tt},marginBlockStart:{style:tt},marginBlockEnd:{style:tt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ea},rowGap:{style:_a},columnGap:{style:ka},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wt},maxWidth:{style:ic},minWidth:{transform:Wt},height:{transform:Wt},maxHeight:{transform:Wt},minHeight:{transform:Wt},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function e1(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function t1(e,t){return typeof e=="function"?e(t):e}function n1(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:d}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=rr(i,u)||{};return d?d(a):zn(a,r,v=>{let m=Ia(h,f,v);return v===m&&typeof v=="string"&&(m=Ia(h,f,`${n}${v==="default"?"":xe(v)}`,v)),c===!1?m:{[c]:m}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:Pa;function s(c){let u=c;if(typeof c=="function")u=c(o);else if(typeof c!="object")return c;if(!u)return null;const f=mA(o.breakpoints),d=Object.keys(f);let h=f;return Object.keys(u).forEach(g=>{const v=t1(u[g],o);if(v!=null)if(typeof v=="object")if(a[g])h=Ji(h,e(g,v,o,a));else{const m=zn({theme:o},v,b=>({[g]:b}));e1(m,v)?h[g]=t({sx:v,theme:o}):h=Ji(h,m)}else h=Ji(h,e(g,v,o,a))}),vA(d,h)}return Array.isArray(i)?i.map(s):s(i)}return t}const Da=n1();Da.filterProps=["sx"];function Mh(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const r1=["breakpoints","palette","spacing","shape"];function Lh(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Te(e,r1),s=kh(n),c=Rh(i);let u=Fn({breakpoints:s,direction:"ltr",components:{},palette:R({mode:"light"},r),spacing:c,shape:R({},gA,o)},a);return u.applyStyles=Mh,u=t.reduce((f,d)=>Fn(f,d),u),u.unstable_sxConfig=R({},Pa,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(d){return Da({sx:d,theme:this})},u}function i1(e){return Object.keys(e).length===0}function o1(e=null){const t=K.useContext(ge.ThemeContext);return!t||i1(t)?e:t}const a1=Lh();function s1(e=a1){return o1(e)}const l1=["sx"],c1=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Pa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function u1(e){const{sx:t}=e,n=Te(e,l1),{systemProps:r,otherProps:i}=c1(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const s=t(...a);return nr(s)?R({},r,s):r}:o=R({},r,t),R({},i,{sx:o})}const d1=["ownerState"],f1=["variants"],h1=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p1(e){return Object.keys(e).length===0}function g1(e){return typeof e=="string"&&e.charCodeAt(0)>96}function oc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const m1=Lh(),v1=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Oa({defaultTheme:e,theme:t,themeId:n}){return p1(t)?e:t[n]||t}function b1(e){return e?(t,n)=>n[e]:null}function Ra(e,t){let{ownerState:n}=t,r=Te(t,d1);const i=typeof e=="function"?e(R({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Ra(o,R({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let s=Te(i,f1);return o.forEach(c=>{let u=!0;typeof c.props=="function"?u=c.props(R({ownerState:n},r,n)):Object.keys(c.props).forEach(f=>{(n==null?void 0:n[f])!==c.props[f]&&r[f]!==c.props[f]&&(u=!1)}),u&&(Array.isArray(s)||(s=[s]),s.push(typeof c.style=="function"?c.style(R({ownerState:n},r,n)):c.style))}),s}return i}function y1(e={}){const{themeId:t,defaultTheme:n=m1,rootShouldForwardProp:r=oc,slotShouldForwardProp:i=oc}=e,o=a=>Da(R({},a,{theme:Oa(R({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,s={})=>{fA(a,w=>w.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:c,slot:u,skipVariantsResolver:f,skipSx:d,overridesResolver:h=b1(v1(u))}=s,g=Te(s,h1),v=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,m=d||!1;let b,x=oc;u==="Root"||u==="root"?x=r:u?x=i:g1(a)&&(x=void 0);const S=dA(a,R({shouldForwardProp:x,label:b},g)),C=w=>typeof w=="function"&&w.__emotion_real!==w||nr(w)?A=>Ra(w,R({},A,{theme:Oa({theme:A.theme,defaultTheme:n,themeId:t})})):w,I=(w,...A)=>{let E=C(w);const k=A?A.map(C):[];c&&h&&k.push(O=>{const T=Oa(R({},O,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[c]||!T.components[c].styleOverrides)return null;const N=T.components[c].styleOverrides,H={};return Object.entries(N).forEach(([j,F])=>{H[j]=Ra(F,R({},O,{theme:T}))}),h(O,H)}),c&&!v&&k.push(O=>{var T;const N=Oa(R({},O,{defaultTheme:n,themeId:t})),H=N==null||(T=N.components)==null||(T=T[c])==null?void 0:T.variants;return Ra({variants:H},R({},O,{theme:N}))}),m||k.push(o);const $=k.length-A.length;if(Array.isArray(w)&&$>0){const O=new Array($).fill("");E=[...w,...O],E.raw=[...w.raw,...O]}const G=S(E,...k);return a.muiName&&(G.muiName=a.muiName),G};return S.withConfig&&(I.withConfig=S.withConfig),I}}function x1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:sh(t.components[n].defaultProps,r)}function C1({props:e,name:t,defaultTheme:n,themeId:r}){let i=s1(n);return r&&(i=i[r]||i),x1({theme:i,name:t,props:e})}function w1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Bh(e){if(e.type)return e;if(e.charAt(0)==="#")return Bh(w1(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(sa(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(sa(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const wr=e=>{const t=Bh(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function ac(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const $h=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},S1=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,c])=>{(!n||n&&!n([...o,s]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,s],Array.isArray(c)?[...a,s]:a):t([...o,s],c,a))})}r(e)},I1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function sc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return S1(e,(s,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(s,c))){const f=`--${n?`${n}-`:""}${s.join("-")}`;Object.assign(i,{[f]:I1(s,c)}),$h(o,s,`var(${f})`,u),$h(a,s,`var(${f}, ${c})`,u)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function Sr(e){"@babel/helpers - typeof";return Sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sr(e)}function A1(e,t){if(Sr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function lc(e){var t=A1(e,"string");return Sr(t)=="symbol"?t:t+""}const T1=["colorSchemes","components","defaultColorScheme"];function E1(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Te(e,T1),{vars:o,css:a,varsWithDefaults:s}=sc(i,t);let c=s;const u={},{[r]:f}=n,d=Te(n,[r].map(lc));if(Object.entries(d||{}).forEach(([g,v])=>{const{vars:m,css:b,varsWithDefaults:x}=sc(v,t);c=Fn(c,x),u[g]={css:b,vars:m}}),f){const{css:g,vars:v,varsWithDefaults:m}=sc(f,t);c=Fn(c,m),u[r]={css:g,vars:v}}return{vars:c,generateCssVars:g=>{var v;if(!g){var m;const x=R({},a);return{css:x,vars:o,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,g,x))||":root"}}const b=R({},u[g].css);return{css:b,vars:u[g].vars,selector:(t==null||(v=t.getSelector)==null?void 0:v.call(t,g,b))||":root"}}}}const k1=R({},Pa,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),eo={grey:{50:"#FBFCFE",100:"#F0F4F8",200:"#DDE7EE",300:"#CDD7E1",400:"#9FA6AD",500:"#636B74",600:"#555E68",700:"#32383E",800:"#171A1C",900:"#0B0D0E"},blue:{50:"#EDF5FD",100:"#E3EFFB",200:"#C7DFF7",300:"#97C3F0",400:"#4393E4",500:"#0B6BCB",600:"#185EA5",700:"#12467B",800:"#0A2744",900:"#051423"},yellow:{50:"#FEFAF6",100:"#FDF0E1",200:"#FCE1C2",300:"#F3C896",400:"#EA9A3E",500:"#9A5B13",600:"#72430D",700:"#492B08",800:"#2E1B05",900:"#1D1002"},red:{50:"#FEF6F6",100:"#FCE4E4",200:"#F7C5C5",300:"#F09898",400:"#E47474",500:"#C41C1C",600:"#A51818",700:"#7D1212",800:"#430A0A",900:"#240505"},green:{50:"#F6FEF6",100:"#E3FBE3",200:"#C7F7C7",300:"#A1E8A1",400:"#51BC51",500:"#1F7A1F",600:"#136C13",700:"#0A470A",800:"#042F04",900:"#021D02"}};function _1(e){var t;return!!e[0].match(/^(typography|variants|breakpoints)$/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/^(mode)$/))||e[0]==="focus"&&e[1]!=="thickness"}const lt=(e,t)=>ch(e,t,"Mui"),We=(e,t)=>hI(e,t,"Mui"),P1=e=>e&&typeof e=="object"&&Object.keys(e).some(t=>{var n;return(n=t.match)==null?void 0:n.call(t,/^(plain(Hover|Active|Disabled)?(Color|Bg)|outlined(Hover|Active|Disabled)?(Color|Border|Bg)|soft(Hover|Active|Disabled)?(Color|Bg)|solid(Hover|Active|Disabled)?(Color|Bg))$/)}),Fh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},Nh=(e,t,n)=>{const r={};return Object.entries(t||{}).forEach(([i,o])=>{if(i.match(new RegExp(`${e}(color|bg|border)`,"i"))&&o){const a=n?n(i):o;i.includes("Disabled")&&(r.pointerEvents="none",r.cursor="default",r["--Icon-color"]="currentColor"),i.match(/(Hover|Active|Disabled)/)||(r["--variant-borderWidth"]||(r["--variant-borderWidth"]="0px"),i.includes("Border")&&(r["--variant-borderWidth"]="1px",r.border="var(--variant-borderWidth) solid")),Fh(r,i,a)}}),r},kt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,s]=o;P1(s)&&typeof s=="object"&&(n=R({},n,{[a]:Nh(e,s,c=>`var(--variant-${c}, ${r(`palette-${a}-${c}`,i[a][c])})`)}))})}return n.context=Nh(e,{plainColor:"var(--variant-plainColor)",plainHoverColor:"var(--variant-plainHoverColor)",plainHoverBg:"var(--variant-plainHoverBg)",plainActiveBg:"var(--variant-plainActiveBg)",plainDisabledColor:"var(--variant-plainDisabledColor)",outlinedColor:"var(--variant-outlinedColor)",outlinedBorder:"var(--variant-outlinedBorder)",outlinedHoverColor:"var(--variant-outlinedHoverColor)",outlinedHoverBorder:"var(--variant-outlinedHoverBorder)",outlinedHoverBg:"var(--variant-outlinedHoverBg)",outlinedActiveBg:"var(--variant-outlinedActiveBg)",outlinedDisabledColor:"var(--variant-outlinedDisabledColor)",outlinedDisabledBorder:"var(--variant-outlinedDisabledBorder)",softColor:"var(--variant-softColor)",softBg:"var(--variant-softBg)",softHoverColor:"var(--variant-softHoverColor)",softHoverBg:"var(--variant-softHoverBg)",softActiveBg:"var(--variant-softActiveBg)",softDisabledColor:"var(--variant-softDisabledColor)",softDisabledBg:"var(--variant-softDisabledBg)",solidColor:"var(--variant-solidColor)",solidBg:"var(--variant-solidBg)",solidHoverBg:"var(--variant-solidHoverBg)",solidActiveBg:"var(--variant-solidActiveBg)",solidDisabledColor:"var(--variant-solidDisabledColor)",solidDisabledBg:"var(--variant-solidDisabledBg)"}),n},D1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],O1=["colorSchemes"],R1=(e="joy")=>ac(e);function M1(e){var t,n,r,i,o,a,s,c,u,f;const d={},{cssVarPrefix:h="joy",breakpoints:g,spacing:v,components:m,variants:b,shouldSkipGeneratingVar:x=_1}=d,S=Te(d,D1),C=R1(h),I={primary:eo.blue,neutral:eo.grey,danger:eo.red,success:eo.green,warning:eo.yellow,common:{white:"#FFF",black:"#000"}},w=ee=>{var ne;const J=ee.split("-"),ce=J[1],ve=J[2];return C(ee,(ne=I[ce])==null?void 0:ne[ve])},A=ee=>({plainColor:w(`palette-${ee}-500`),plainHoverBg:w(`palette-${ee}-100`),plainActiveBg:w(`palette-${ee}-200`),plainDisabledColor:w("palette-neutral-400"),outlinedColor:w(`palette-${ee}-500`),outlinedBorder:w(`palette-${ee}-300`),outlinedHoverBg:w(`palette-${ee}-100`),outlinedActiveBg:w(`palette-${ee}-200`),outlinedDisabledColor:w("palette-neutral-400"),outlinedDisabledBorder:w("palette-neutral-200"),softColor:w(`palette-${ee}-700`),softBg:w(`palette-${ee}-100`),softHoverBg:w(`palette-${ee}-200`),softActiveColor:w(`palette-${ee}-800`),softActiveBg:w(`palette-${ee}-300`),softDisabledColor:w("palette-neutral-400"),softDisabledBg:w("palette-neutral-50"),solidColor:w("palette-common-white"),solidBg:w(`palette-${ee}-500`),solidHoverBg:w(`palette-${ee}-600`),solidActiveBg:w(`palette-${ee}-700`),solidDisabledColor:w("palette-neutral-400"),solidDisabledBg:w("palette-neutral-100")}),E=ee=>({plainColor:w(`palette-${ee}-300`),plainHoverBg:w(`palette-${ee}-800`),plainActiveBg:w(`palette-${ee}-700`),plainDisabledColor:w("palette-neutral-500"),outlinedColor:w(`palette-${ee}-200`),outlinedBorder:w(`palette-${ee}-700`),outlinedHoverBg:w(`palette-${ee}-800`),outlinedActiveBg:w(`palette-${ee}-700`),outlinedDisabledColor:w("palette-neutral-500"),outlinedDisabledBorder:w("palette-neutral-800"),softColor:w(`palette-${ee}-200`),softBg:w(`palette-${ee}-800`),softHoverBg:w(`palette-${ee}-700`),softActiveColor:w(`palette-${ee}-100`),softActiveBg:w(`palette-${ee}-600`),softDisabledColor:w("palette-neutral-500"),softDisabledBg:w("palette-neutral-800"),solidColor:w("palette-common-white"),solidBg:w(`palette-${ee}-500`),solidHoverBg:w(`palette-${ee}-600`),solidActiveBg:w(`palette-${ee}-700`),solidDisabledColor:w("palette-neutral-500"),solidDisabledBg:w("palette-neutral-800")}),k={palette:{mode:"light",primary:R({},I.primary,A("primary")),neutral:R({},I.neutral,A("neutral"),{plainColor:w("palette-neutral-700"),plainHoverColor:w("palette-neutral-900"),outlinedColor:w("palette-neutral-700")}),danger:R({},I.danger,A("danger")),success:R({},I.success,A("success")),warning:R({},I.warning,A("warning")),common:{white:"#FFF",black:"#000"},text:{primary:w("palette-neutral-800"),secondary:w("palette-neutral-700"),tertiary:w("palette-neutral-600"),icon:w("palette-neutral-500")},background:{body:w("palette-common-white"),surface:w("palette-neutral-50"),popup:w("palette-common-white"),level1:w("palette-neutral-100"),level2:w("palette-neutral-200"),level3:w("palette-neutral-300"),tooltip:w("palette-neutral-500"),backdrop:`rgba(${C("palette-neutral-darkChannel",wr(I.neutral[900]))} / 0.25)`},divider:`rgba(${C("palette-neutral-mainChannel",wr(I.neutral[500]))} / 0.2)`,focusVisible:w("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},$={palette:{mode:"dark",primary:R({},I.primary,E("primary")),neutral:R({},I.neutral,E("neutral"),{plainColor:w("palette-neutral-300"),plainHoverColor:w("palette-neutral-300")}),danger:R({},I.danger,E("danger")),success:R({},I.success,E("success")),warning:R({},I.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:w("palette-neutral-100"),secondary:w("palette-neutral-300"),tertiary:w("palette-neutral-400"),icon:w("palette-neutral-400")},background:{body:w("palette-common-black"),surface:w("palette-neutral-900"),popup:w("palette-common-black"),level1:w("palette-neutral-800"),level2:w("palette-neutral-700"),level3:w("palette-neutral-600"),tooltip:w("palette-neutral-600"),backdrop:`rgba(${C("palette-neutral-darkChannel",wr(I.neutral[50]))} / 0.25)`},divider:`rgba(${C("palette-neutral-mainChannel",wr(I.neutral[500]))} / 0.16)`,focusVisible:w("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},G='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',O=R({body:`"Inter", ${C(`fontFamily-fallback, ${G}`)}`,display:`"Inter", ${C(`fontFamily-fallback, ${G}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:G},S.fontFamily),T=R({sm:300,md:500,lg:600,xl:700},S.fontWeight),N=R({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},S.fontSize),H=R({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},S.lineHeight),j=(t=(n=S.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:k.shadowRing,F=(r=(i=S.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:k.shadowChannel,M=(o=(a=S.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:k.shadowOpacity,V={colorSchemes:{light:k,dark:$},fontSize:N,fontFamily:O,fontWeight:T,focus:{thickness:"2px",selector:`&.${lt("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${C("focus-thickness",(s=(c=S.focus)==null?void 0:c.thickness)!=null?s:"2px")})`,outline:`${C("focus-thickness",(u=(f=S.focus)==null?void 0:f.thickness)!=null?u:"2px")} solid ${C("palette-focusVisible",I.primary[500])}`}},lineHeight:H,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${C("shadowRing",j)}, 0px 1px 2px 0px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`,sm:`${C("shadowRing",j)}, 0px 1px 2px 0px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)}), 0px 2px 4px 0px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`,md:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)}), 0px 6px 12px -2px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`,lg:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)}), 0px 12px 16px -4px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`,xl:`${C("shadowRing",j)}, 0px 2px 8px -2px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)}), 0px 20px 24px -4px rgba(${C("shadowChannel",F)} / ${C("shadowOpacity",M)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-xl, ${T.xl}`),fontSize:C(`fontSize-xl4, ${N.xl4}`),lineHeight:C(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h2:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-xl, ${T.xl}`),fontSize:C(`fontSize-xl3, ${N.xl3}`),lineHeight:C(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h3:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-xl2, ${N.xl2}`),lineHeight:C(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},h4:{fontFamily:C(`fontFamily-display, ${O.display}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-xl, ${N.xl}`),lineHeight:C(`lineHeight-md, ${H.md}`),letterSpacing:"-0.025em",color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-lg":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-lg, ${T.lg}`),fontSize:C(`fontSize-lg, ${N.lg}`),lineHeight:C(`lineHeight-xs, ${H.xs}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-md":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-md, ${N.md}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"title-sm":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-sm, ${N.sm}`),lineHeight:C(`lineHeight-sm, ${H.sm}`),color:C(`palette-text-primary, ${k.palette.text.primary}`)},"body-lg":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-lg, ${N.lg}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-md":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-md, ${N.md}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-sm":{fontFamily:C(`fontFamily-body, ${O.body}`),fontSize:C(`fontSize-sm, ${N.sm}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-tertiary, ${k.palette.text.tertiary}`)},"body-xs":{fontFamily:C(`fontFamily-body, ${O.body}`),fontWeight:C(`fontWeight-md, ${T.md}`),fontSize:C(`fontSize-xs, ${N.xs}`),lineHeight:C(`lineHeight-md, ${H.md}`),color:C(`palette-text-tertiary, ${k.palette.text.tertiary}`)}}},Y=S?Fn(V,S):V,{colorSchemes:Z}=Y,D=Te(Y,O1),L=R({colorSchemes:Z},D,{breakpoints:kh(g!=null?g:{}),components:Fn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:ee,theme:ne})=>{var J;const ce=ee.instanceFontSize;return R({margin:"var(--Icon-margin)"},ee.fontSize&&ee.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${ne.vars.fontSize[ee.fontSize]})`},!ee.htmlColor&&R({color:`var(--Icon-color, ${L.vars.palette.text.icon})`},ee.color&&ee.color!=="inherit"&&ne.vars.palette[ee.color]&&{color:`rgba(${(J=ne.vars.palette[ee.color])==null?void 0:J.mainChannel} / 1)`}),ce&&ce!=="inherit"&&{"--Icon-fontSize":ne.vars.fontSize[ce]})}}}},m),cssVarPrefix:h,getCssVar:C,spacing:Rh(v)});function U(ee,ne){Object.keys(ne).forEach(J=>{const ce={main:"500",light:"200",dark:"700"};ee==="dark"&&(ce.main=400),!ne[J].mainChannel&&ne[J][ce.main]&&(ne[J].mainChannel=wr(ne[J][ce.main])),!ne[J].lightChannel&&ne[J][ce.light]&&(ne[J].lightChannel=wr(ne[J][ce.light])),!ne[J].darkChannel&&ne[J][ce.dark]&&(ne[J].darkChannel=wr(ne[J][ce.dark]))})}Object.entries(L.colorSchemes).forEach(([ee,ne])=>{U(ee,ne.palette)});const W={prefix:h,shouldSkipGeneratingVar:x},{vars:ie,generateCssVars:le}=E1(R({colorSchemes:Z},D),W);L.vars=ie,L.generateCssVars=le,L.unstable_sxConfig=R({},k1,void 0),L.unstable_sx=function(ne){return Da({sx:ne,theme:this})},L.getColorSchemeSelector=ee=>ee==="light"?"&":`&[data-joy-color-scheme="${ee}"], [data-joy-color-scheme="${ee}"] &`;const ae={getCssVar:C,palette:L.colorSchemes.light.palette};return L.variants=Fn({plain:kt("plain",ae),plainHover:kt("plainHover",ae),plainActive:kt("plainActive",ae),plainDisabled:kt("plainDisabled",ae),outlined:kt("outlined",ae),outlinedHover:kt("outlinedHover",ae),outlinedActive:kt("outlinedActive",ae),outlinedDisabled:kt("outlinedDisabled",ae),soft:kt("soft",ae),softHover:kt("softHover",ae),softActive:kt("softActive",ae),softDisabled:kt("softDisabled",ae),solid:kt("solid",ae),solidHover:kt("solidHover",ae),solidActive:kt("solidActive",ae),solidDisabled:kt("solidDisabled",ae)},b),L.palette=R({},L.colorSchemes.light.palette,{colorScheme:"light"}),L.shouldSkipGeneratingVar=x,L.applyStyles=Mh,L}const zh=M1(),ye=y1({defaultTheme:zh,themeId:Eh});function pt({props:e,name:t}){return C1({props:e,name:t,defaultTheme:R({},zh,{components:{}}),themeId:Eh})}function L1(e){return lt("MuiAccordion",e)}const B1=We("MuiAccordion",["root","expanded","disabled"]),$1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],F1=["component","slots","slotProps"],N1=["component"];function Ae(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,c=Te(t,$1),{component:u,slots:f={[e]:void 0},slotProps:d={[e]:void 0}}=o,h=Te(o,F1),g=f[e]||r,v=qS(d[e],i),m=ZS(R({className:n},c,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:v})),{props:{component:b},internalRef:x}=m,S=Te(m.props,N1),C=cn(x,v==null?void 0:v.ref,t.ref),I=a?a(S):{},w=R({},i,I),A=e==="root"?b||u:b,E=QS(g,R({},e==="root"&&!u&&!f[e]&&s,e!=="root"&&!f[e]&&s,S,A&&{as:A},{ref:C}),w);return Object.keys(I).forEach(k=>{delete E[k]}),[g,E]}const cc=K.createContext({});function z1(e){return lt("MuiListItem",e)}const jh=We("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Ma=K.createContext(!1),uc=K.createContext(!1),Uh=K.createContext(!1),Vh=K.createContext(void 0),j1=K.createContext(void 0),Hh=K.createContext(void 0),U1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],V1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${xe(o)}`,i&&`variant${xe(i)}`],startAction:["startAction"],endAction:["endAction"]};return ht(a,z1,{})},dc=ye("li")(({theme:e,ownerState:t})=>{var n;return[!t.nested&&{"--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItemButton-marginBlock":"calc(-1 * var(--ListItem-paddingY))",alignItems:"center",gap:"var(--ListItem-gap)",marginInline:"var(--ListItem-marginInline)"},t.nested&&{"--NestedList-marginRight":"calc(-1 * var(--ListItem-paddingRight))","--NestedList-marginLeft":"calc(-1 * var(--ListItem-paddingLeft))","--NestedListItem-paddingLeft":"calc(var(--ListItem-paddingLeft) + var(--List-nestedInsetStart))","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItem-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",flexDirection:"column"},R({"--unstable_actionRadius":"calc(var(--ListItem-radius) - var(--variant-borderWidth, 0px))"},t.startAction&&{"--unstable_startActionWidth":"2rem"},t.endAction&&{"--unstable_endActionWidth":"2.5rem"},{boxSizing:"border-box",borderRadius:"var(--ListItem-radius)",display:"var(--_ListItem-display)","&:not([hidden])":{"--_ListItem-display":"var(--_List-markerDisplay, flex)"},flex:"none",listStyleType:"var(--_List-markerType, disc)",position:"relative",paddingBlockStart:t.nested?0:"var(--ListItem-paddingY)",paddingBlockEnd:t.nested?0:"var(--ListItem-paddingY)",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)"},t["data-first-child"]===void 0&&R({},t.row?{marginInlineStart:"var(--List-gap)"}:{marginBlockStart:"var(--List-gap)"}),t.row&&t.wrap&&{marginInlineStart:"var(--List-gap)",marginBlockStart:"var(--List-gap)"},{minBlockSize:"var(--ListItem-minHeight)"},t.sticky&&{position:"sticky",top:"var(--ListItem-stickyTop, 0px)",zIndex:1,background:`var(--ListItem-stickyBackground, ${e.vars.palette.background.body})`},{[`.${jh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),H1=ye(dc,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),W1=ye("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",left:0,transform:"translate(var(--ListItem-startActionTranslateX), -50%)",zIndex:1})),G1=ye("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",right:0,transform:"translate(var(--ListItem-endActionTranslateX), -50%)"})),Wh=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyListItem"}),i=K.useContext(Hh),o=K.useContext(Vh),a=K.useContext(uc),s=K.useContext(Uh),c=K.useContext(Ma),{component:u,className:f,children:d,nested:h=!1,sticky:g=!1,variant:v="plain",color:m="neutral",startAction:b,endAction:x,role:S,slots:C={},slotProps:I={}}=r,w=Te(r,U1),[A,E]=K.useState(""),[k,$]=(o==null?void 0:o.split(":"))||["",""],G=u||(k&&!k.match(/^(ul|ol|menu)$/)?"div":void 0);let O=i==="menu"?"none":void 0;o&&(O={menu:"none",menubar:"none",group:"presentation"}[$]),S&&(O=S);const T=R({},r,{sticky:g,startAction:b,endAction:x,row:a,wrap:s,variant:v,color:m,nesting:c,nested:h,component:G,role:O}),N=V1(T),H=R({},w,{component:G,slots:C,slotProps:I}),[j,F]=Ae("root",{additionalProps:{role:O},ref:n,className:$n(N.root,f),elementType:H1,externalForwardedProps:H,ownerState:T}),[M,V]=Ae("startAction",{className:N.startAction,elementType:W1,externalForwardedProps:H,ownerState:T}),[Y,Z]=Ae("endAction",{className:N.endAction,elementType:G1,externalForwardedProps:H,ownerState:T});return l.jsx(j1.Provider,{value:E,children:l.jsx(Ma.Provider,{value:h?A||!0:!1,children:l.jsxs(j,R({},F,{children:[b&&l.jsx(M,R({},V,{children:b})),K.Children.map(d,(D,L)=>{var U;return K.isValidElement(D)?K.cloneElement(D,R({},L===0&&{"data-first-child":""},rh(D,["ListItem"])&&{component:((U=D.props)==null?void 0:U.component)||"div"})):D}),x&&l.jsx(Y,R({},Z,{children:x}))]}))})})});Wh.muiName="ListItem";const Gh=Wh;function Y1(e){return lt("MuiAccordionDetails",e)}const Ir=We("MuiAccordionDetails",["root","content","expanded"]),K1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],Q1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${xe(n)}`,t&&`variant${xe(t)}`]};return ht(o,L1,{})},q1=ye(dc,{name:"JoyAccordion",slot:"Root",overridesResolver:(e,t)=>t.root})({borderBottom:"var(--Accordion-borderBottom)","&[data-first-child]":{"--ListItem-radius":"var(--unstable_List-childRadius) var(--unstable_List-childRadius) 0 0"},"&[data-last-child]":{"--ListItem-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)",'& [aria-expanded="true"]':{"--ListItem-radius":"0"},[`& .${Ir.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),J1=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:s,defaultExpanded:c=!1,disabled:u=!1,expanded:f,onChange:d,variant:h="plain",slots:g={},slotProps:v={}}=r,m=Te(r,K1),b=qi(i),[x,S]=Vl({controlled:f,default:c,name:"Accordion",state:"expanded"}),C=K.useCallback(G=>{S(!x),d&&d(G,!x)},[x,d,S]),I=K.useMemo(()=>({accordionId:b,expanded:x,disabled:u,toggle:C}),[b,x,u,C]),w=R({},m,{component:o,slots:g,slotProps:v}),A=R({},r,{component:o,color:a,variant:h,expanded:x,disabled:u,nested:!0}),E=Q1(A),[k,$]=Ae("root",{ref:n,className:E.root,elementType:q1,externalForwardedProps:w,ownerState:A});return l.jsx(cc.Provider,{value:I,children:l.jsx(k,R({},$,{children:K.Children.map(s,(G,O)=>K.isValidElement(G)&&O===0?K.cloneElement(G,{"data-first-child":""}):G)}))})});function X1(e){return lt("MuiAccordionGroup",e)}We("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const Z1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function fc(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=l.jsx(uc.Provider,{value:r,children:l.jsx(Uh.Provider,{value:i,children:K.Children.map(t,(a,s)=>K.isValidElement(a)?K.cloneElement(a,R({},s===0&&{"data-first-child":""},s===K.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:l.jsx(Ma.Provider,{value:n,children:o})}const hc=({theme:e,ownerState:t},n)=>{let r={};function i(o){if(typeof o=="function"){const a=o(e);i(a)}else Array.isArray(o)?o.forEach(a=>{typeof a!="boolean"&&i(a)}):typeof o=="object"&&(r=R({},r,o))}return t.sx&&(i(t.sx),n.forEach(o=>{const a=r[o];if(typeof a=="string"||typeof a=="number")if(o==="borderRadius")if(typeof a=="number")r[o]=`${a}px`;else{var s;r[o]=((s=e.vars)==null?void 0:s.radius[a])||a}else["p","padding","m","margin"].indexOf(o)!==-1&&typeof a=="number"?r[o]=e.spacing(a):r[o]=a;else typeof a=="function"?r[o]=a(e):r[o]=void 0})),r};function eT(e){return lt("MuiList",e)}We("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const tT=K.createContext(void 0),nT=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],rT=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,s={root:["root",o,t&&`variant${xe(t)}`,n&&`color${xe(n)}`,!a&&!i&&r&&`size${xe(r)}`,a&&`size${xe(a)}`,i&&"nesting"]};return ht(s,eT,{})},pc=ye("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=hc({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(s){return s==="sm"?{"--ListDivider-gap":"0.25rem","--ListItem-minHeight":"2rem","--ListItem-paddingY":"3px","--ListItem-paddingX":t.marker?"3px":"0.5rem","--ListItem-gap":"0.5rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.5rem":"2rem","--Icon-fontSize":e.vars.fontSize.lg}:s==="md"?{"--ListDivider-gap":"0.375rem","--ListItem-minHeight":"2.25rem","--ListItem-paddingY":"0.25rem","--ListItem-paddingX":t.marker?"0.25rem":"0.75rem","--ListItem-gap":"0.625rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.75rem":"2.5rem","--Icon-fontSize":e.vars.fontSize.xl}:s==="lg"?{"--ListDivider-gap":"0.5rem","--ListItem-minHeight":"2.75rem","--ListItem-paddingY":"0.375rem","--ListItem-paddingX":t.marker?"0.5rem":"1rem","--ListItem-gap":"0.75rem","--ListItemDecorator-size":t.orientation==="horizontal"?"2.25rem":"3rem","--Icon-fontSize":e.vars.fontSize.xl2}:{}}return[t.nesting&&R({},a(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0},t.marker&&{paddingInlineStart:"calc(3ch - var(--_List-markerDeduct, 0px))"},{marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&R({},a(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)"},t.marker&&{"--_List-markerDeduct":"1ch"},{"--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],t.orientation==="horizontal"?R({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"},t.marker&&{paddingInlineStart:"3ch"}),R({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:t.orientation==="horizontal"?"row":"column"},t.wrap&&{flexWrap:"wrap"},t.marker&&{"--_List-markerDisplay":"list-item","--_List-markerType":t.marker,lineHeight:"calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"},{flexGrow:1,position:"relative"},(n=e.variants[t.variant])==null?void 0:n[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},o!==void 0&&{"--List-radius":o},r!==void 0&&{"--List-padding":r},i!==void 0&&{"--List-padding":i})]}),iT=ye(pc,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),oT=K.forwardRef(function(t,n){var r;const i=K.useContext(Ma),o=K.useContext(Hh),a=K.useContext(tT),s=pt({props:t,name:"JoyList"}),{component:c,className:u,children:f,size:d,orientation:h="vertical",wrap:g=!1,variant:v="plain",color:m="neutral",role:b,slots:x={},slotProps:S={}}=s,C=Te(s,nT),I=d||((r=t.size)!=null?r:"md");let w;o&&(w="group"),a&&(w="presentation"),b&&(w=b);const A=R({},s,{instanceSize:t.size,size:I,nesting:i,orientation:h,wrap:g,variant:v,color:m,role:w}),E=rT(A),k=R({},C,{component:c,slots:x,slotProps:S}),[$,G]=Ae("root",{ref:n,className:$n(E.root,u),elementType:iT,externalForwardedProps:k,ownerState:A,additionalProps:{as:c,role:w,"aria-labelledby":typeof i=="string"?i:void 0}});return l.jsx($,R({},G,{children:l.jsx(Vh.Provider,{value:`${typeof c=="string"?c:""}:${w||""}`,children:l.jsx(fc,{row:h==="horizontal",wrap:g,children:f})})}))}),aT=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],sT=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${xe(t)}`,n&&`color${xe(n)}`,r&&`size${xe(r)}`]};return ht(i,X1,{})},lT=ye(pc,{name:"JoyAccordionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{let n={};return t.transition&&(typeof t.transition=="string"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition}, padding-block ${t.transition}`}),typeof t.transition=="object"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition.initial}, padding-block ${t.transition.initial}`,[`& .${Ir.root}.${Ir.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),R({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${B1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),cT=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:s=!1,variant:c="plain",transition:u="0.2s ease",size:f="md",slots:d={},slotProps:h={}}=r,g=Te(r,aT),v=R({},g,{component:i,slots:d,slotProps:h}),m=R({},r,{component:i,color:o,disableDivider:s,variant:c,transition:u,size:f}),b=sT(m),[x,S]=Ae("root",{ref:n,className:b.root,elementType:lT,externalForwardedProps:v,ownerState:m});return l.jsx(x,R({},S,{children:l.jsx(fc,{children:a})}))}),uT=["component","children","color","variant","slots","slotProps"],dT=e=>{const{expanded:t}=e;return ht({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},Y1,{})},fT=ye("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return R({overflow:"hidden",borderRadius:"var(--AccordionDetails-radius)",display:"grid",gridTemplateRows:"1fr",marginInline:"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",transition:"var(--AccordionDetails-transition)"},(n=t.variants[e.variant])==null?void 0:n[e.color],{[`&:not(.${Ir.expanded})`]:{gridTemplateRows:"0fr"}})}),hT=ye("div",{name:"JoyAccordionDetails",slot:"Content",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",overflow:"hidden",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)",paddingBlockStart:"calc(var(--ListItem-paddingY) / 2)",paddingBlockEnd:"calc(2.5 * var(--ListItem-paddingY))",transition:"var(--AccordionDetails-transition)",[`&:not(.${Ir.expanded})`]:{paddingBlock:0}}),pT=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:s="plain",slots:c={},slotProps:u={}}=r,f=Te(r,uT),{accordionId:d,expanded:h=!1}=K.useContext(cc),g=K.useRef(null),v=cn(g,n);K.useEffect(()=>{g.current&&g.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const k=E.getAttribute("data-prev-tabindex"),$=E.getAttribute("tabindex");$&&k&&(E.setAttribute("tabindex",k),E.removeAttribute("data-prev-tabindex")),!k&&!$&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const m=R({},f,{component:i,slots:c,slotProps:u}),b=R({},r,{component:i,color:a,variant:s,expanded:h,nesting:!0}),x=dT(b),[S,C]=Ae("root",{ref:v,className:x.root,elementType:fT,externalForwardedProps:m,additionalProps:{id:`${d}-details`,"aria-labelledby":`${d}-summary`,role:"region",hidden:h?void 0:!0},ownerState:b}),[I,w]=Ae("content",{className:x.content,elementType:hT,externalForwardedProps:m,ownerState:b});return l.jsx(S,R({},C,{children:l.jsx(I,R({},w,{children:o}))}))});function gT(e){return lt("MuiAccordionSummary",e)}const La=We("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),Ba=We("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),mT=K.createContext("horizontal"),gc=ye("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;return R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch",gap:"var(--ListItem-gap)"},t.orientation==="vertical"&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},t["data-first-child"]===void 0&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:R({},e.focus.default,{zIndex:1})},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:active":(r=e.variants[`${t.variant}Active`])==null?void 0:r[t.color],[`.${jh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${Ba.selected}`]:R({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${Ba.selected}, [aria-selected="true"])`]:{"&:hover":(o=e.variants[`${t.variant}Hover`])==null?void 0:o[t.color],"&:active":(a=e.variants[`${t.variant}Active`])==null?void 0:a[t.color]},[`&.${Ba.disabled}`]:R({},(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color])})});ye(gc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>R({},!e.row&&{[`&.${Ba.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function vT(e){return lt("MuiSvgIcon",e)}We("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const bT=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],yT=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${xe(t)}`,n&&`size${xe(n)}`,r&&`fontSize${xe(r)}`]};return ht(i,vT,{})},Yh={sm:"xl",md:"xl2",lg:"xl3"},xT=ye("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return R({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[Yh[t.instanceSize]]},t.instanceFontSize&&t.instanceFontSize!=="inherit"&&{"--Icon-fontSize":e.vars.fontSize[t.instanceFontSize]},{userSelect:"none",margin:"var(--Icon-margin)",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[Yh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&R({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&e.vars.palette[t.color]&&{color:`rgba(${(n=e.vars.palette[t.color])==null?void 0:n.mainChannel} / 1)`}))}),Kh=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:s="svg",fontSize:c,htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:h="0 0 24 24",size:g="md",slots:v={},slotProps:m={}}=r,b=Te(r,bT),x=K.isValidElement(i)&&i.type==="svg",S=R({},r,{color:a,component:s,size:g,instanceSize:t.size,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:h,hasSvgAsChild:x}),C=yT(S),I=R({},b,{component:s,slots:v,slotProps:m}),[w,A]=Ae("root",{ref:n,className:$n(C.root,o),elementType:xT,externalForwardedProps:I,ownerState:S,additionalProps:R({color:u,focusable:!1},d&&{role:"img"},!d&&{"aria-hidden":!0},!f&&{viewBox:h},x&&i.props)});return l.jsxs(w,R({},A,{children:[x?i.props.children:i,d?l.jsx("title",{children:d}):null]}))});function mc(e,t){function n(r,i){return l.jsx(Kh,R({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Kh.muiName,K.memo(K.forwardRef(n))}const CT=mc(l.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Qh;const wT=["component","color","children","indicator","variant","slots","slotProps"],ST=e=>{const{disabled:t,expanded:n}=e;return ht({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},gT,{})},IT=ye(dc,{name:"JoyAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({fontWeight:e.vars.fontWeight.md,gap:"calc(var(--ListItem-paddingX, 0.75rem) + 0.25rem)",[`&.${La.expanded}`]:{"--Icon-color":"currentColor"}})),AT=ye(gc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${La.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),TT=ye("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${La.expanded}`]:{transform:"rotate(180deg)"}}),ET=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:s=Qh||(Qh=l.jsx(CT,{})),variant:c="plain",slots:u={},slotProps:f={}}=r,d=Te(r,wT),{accordionId:h,disabled:g=!1,expanded:v=!1,toggle:m}=K.useContext(cc),b=R({},d,{component:i,slots:u,slotProps:f}),x=R({},r,{component:i,color:o,disabled:g,expanded:v,variant:c}),S=G=>{if(m&&m(G),typeof f.button=="function"){var O,T;(O=f.button(x))==null||(T=O.onClick)==null||T.call(O,G)}else{var N,H;(N=f.button)==null||(H=N.onClick)==null||H.call(N,G)}},C=ST(x),[I,w]=Ae("root",{ref:n,className:C.root,elementType:IT,externalForwardedProps:b,ownerState:x}),[A,E]=Ae("button",{ref:n,className:C.button,elementType:AT,externalForwardedProps:b,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":v?"true":"false","aria-controls":`${h}-details`,disabled:g,type:"button",onClick:S},ownerState:x}),[k,$]=Ae("indicator",{ref:n,className:C.indicator,elementType:TT,externalForwardedProps:b,ownerState:x});return l.jsx(I,R({},w,{children:l.jsxs(A,R({},E,{children:[a,s&&l.jsx(k,R({},$,{children:s}))]}))}))}),kT=({label:e,disabled:t,children:n})=>(t=t||!1,l.jsx(cT,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${La.button}:hover`]:{backgroundColor:"#fff"},[`& .${Ir.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${Ir.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:l.jsxs(J1,{disabled:t,children:[l.jsx(ET,{children:e}),l.jsx(pT,{variant:"soft",children:n})]})})),vc={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["blockquote","code-block"],[{direction:"rtl"}],[{script:"sub"},{script:"super"}],[{color:[]},{background:[]}],[{font:[]}],["link","image","video"],["clean"]]},bc=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const s=(c,u,f,d)=>{f!=="api"&&(d.getText().trim()===""?a(""):a(c))};return t==="description"?l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e}),l.jsx(Ai,{value:n||r,defaultValue:r,onChange:s,modules:vc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?l.jsxs(p.FormControl,{children:[l.jsx(p.FormLabel,{color:"primary",children:e}),l.jsx(Ai,{value:n||r,defaultValue:r,onChange:s,modules:vc,placeholder:i,className:"ql-container ql-toolbar"}),l.jsx(p.FormHelperText,{children:o})]}):l.jsx(p.Box,{sx:()=>({marginBottom:"16px"}),children:l.jsx(Ai,{value:n||r,defaultValue:r,onChange:s,modules:vc,placeholder:i})})},_T=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return l.jsxs(p.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[l.jsxs(p.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[l.jsx(p.Tab,{children:e.labels.richText}),l.jsx(p.Tab,{children:e.labels.plainText})]}),l.jsx(p.TabPanel,{value:0,sx:{px:0},children:l.jsx(bc,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),l.jsx(p.TabPanel,{value:1,sx:{px:0},children:l.jsx(p.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},PT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,s)=>{i(s||"")};return l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e}),l.jsx(p.Select,{defaultValue:t,onChange:o,children:n.map((a,s)=>l.jsx(p.Option,{value:a,children:a},`basic-select-${a}-${s}`))}),r?l.jsx(p.FormHelperText,{children:r}):l.jsx(l.Fragment,{})]})},yc=K.createContext("md");function DT(e){return lt("MuiTabs",e)}We("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const OT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],RT=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${xe(n)}`,r&&`color${xe(r)}`,i&&`size${xe(i)}`]};return ht(o,DT,{})},MT=ye("div",{name:"JoyTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r;const i=(n=t.variants[e.variant])==null?void 0:n[e.color],{bgcolor:o,backgroundColor:a,background:s,p:c,padding:u}=hc({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),f=rr(t,`palette.${o}`)||o||rr(t,`palette.${a}`)||a||s||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return R({},e.size==="sm"&&{"--Tabs-spacing":"0.75rem"},e.size==="md"&&{"--Tabs-spacing":"1rem"},e.size==="lg"&&{"--Tabs-spacing":"1.25rem"},{"--Tab-indicatorThickness":"2px","--Icon-color":e.color!=="neutral"||e.variant==="solid"?"currentColor":t.vars.palette.text.icon,"--TabList-stickyBackground":f==="transparent"?"initial":f,display:"flex",flexDirection:"column"},e.orientation==="vertical"&&{flexDirection:"row"},{backgroundColor:t.vars.palette.background.surface,position:"relative"},t.typography[`body-${e.size}`],(r=t.variants[e.variant])==null?void 0:r[e.color],c!==void 0&&{"--Tabs-padding":c},u!==void 0&&{"--Tabs-padding":u})}),qh=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:s="horizontal",direction:c="ltr",component:u,variant:f="plain",color:d="neutral",size:h="md",slots:g={},slotProps:v={}}=r,m=Te(r,OT),b=a||(o===void 0?0:void 0),{contextValue:x}=tA(R({},r,{orientation:s,defaultValue:b})),S=R({},r,{orientation:s,direction:c,variant:f,color:d,size:h}),C=RT(S),I=R({},m,{component:u,slots:g,slotProps:v}),[w,A]=Ae("root",{ref:n,elementType:MT,externalForwardedProps:I,additionalProps:{ref:n,as:u},ownerState:S,className:C.root});return l.jsx(w,R({},A,{children:l.jsx(nA,{value:x,children:l.jsx(yc.Provider,{value:h,children:i})})}))});function LT(e){return lt("MuiTabList",e)}We("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function BT(e){return lt("MuiTab",e)}const xc=We("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),$T=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],FT=e=>{const{orientation:t,size:n,variant:r,color:i}=e,o={root:["root",t,r&&`variant${xe(r)}`,i&&`color${xe(i)}`,n&&`size${xe(n)}`]};return ht(o,LT,{})},NT=ye(pc,{name:"JoyTabList",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;const r=(n=e.variants[t.variant])==null?void 0:n[t.color];return R({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},Z1,{flexGrow:"initial",flexDirection:t.orientation==="vertical"?"column":"row",borderRadius:"var(--List-radius, 0px)",padding:"var(--List-padding, 0px)",zIndex:1},t.sticky&&{position:"sticky",top:t.sticky==="top"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",bottom:t.sticky==="bottom"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",backgroundColor:(r==null?void 0:r.backgroundColor)||`var(--TabList-stickyBackground, ${e.vars.palette.background.body})`},!t.disableUnderline&&R({},t.underlinePlacement==="bottom"&&{"--unstable_TabList-underlineBottom":"1px",paddingBottom:1,boxShadow:`inset 0 -1px ${e.vars.palette.divider}`},t.underlinePlacement==="top"&&{"--unstable_TabList-underlineTop":"1px",paddingTop:1,boxShadow:`inset 0 1px ${e.vars.palette.divider}`},t.underlinePlacement==="right"&&{"--unstable_TabList-underlineRight":"1px",paddingRight:1,boxShadow:`inset -1px 0 ${e.vars.palette.divider}`},t.underlinePlacement==="left"&&{"--unstable_TabList-underlineLeft":"1px",paddingLeft:1,boxShadow:`inset 1px 0 ${e.vars.palette.divider}`}),t.tabFlex&&{[`& .${xc.root}`]:{flex:t.tabFlex}})}),Jh=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyTabList"}),i=K.useContext(yc),{isRtl:o,orientation:a,getRootProps:s,contextValue:c}=aA({rootRef:n}),{component:u="div",children:f,variant:d="plain",color:h="neutral",size:g,disableUnderline:v=!1,underlinePlacement:m=a==="horizontal"?"bottom":"right",tabFlex:b,sticky:x,slots:S={},slotProps:C={}}=r,I=Te(r,$T),w=g!=null?g:i,A=R({},r,{isRtl:o,orientation:a,variant:d,color:h,size:w,sticky:x,tabFlex:b,nesting:!1,disableUnderline:v,underlinePlacement:m}),E=FT(A),k=R({},I,{component:u,slots:S,slotProps:C}),[$,G]=Ae("root",{ref:n,elementType:NT,getSlotProps:s,externalForwardedProps:k,ownerState:A,className:E.root});return l.jsx($,R({},G,{children:l.jsx(sA,{value:c,children:l.jsx(fc,{row:a==="horizontal",nested:!0,children:f})})}))}),zT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],jT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,s={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${xe(i)}`,o&&`color${xe(o)}`]};return ht(s,BT,{})},UT=ye(gc,{name:"JoyTab",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>[{flex:"initial",justifyContent:e.row?"center":"initial","--unstable_ListItemDecorator-alignItems":"center","--unstable_offset":"min(calc(-1 * var(--variant-borderWidth, 0px)), -1px)"},!e.disableIndicator&&{'&[aria-selected="true"]':{"--Tab-indicatorColor":"currentColor",zIndex:1},"&::after":{content:'""',display:"block",position:"absolute",margin:"auto",background:"var(--Tab-indicatorColor)",borderRadius:"var(--Tab-indicatorRadius)"}},!e.disableIndicator&&e.indicatorPlacement==="bottom"&&{paddingBottom:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",bottom:"calc(-1px - var(--unstable_TabList-underlineBottom, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="top"&&{paddingTop:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",top:"calc(-1px - var(--unstable_TabList-underlineTop, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="right"&&{paddingRight:"calc(var(--ListItem-paddingRight) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",right:"calc(-1px - var(--unstable_TabList-underlineRight, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="left"&&{paddingLeft:"calc(var(--ListItem-paddingLeft) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",left:"calc(-1px - var(--unstable_TabList-underlineLeft, 0px))"}}]),Kr=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyTab"}),i=K.useContext(uc),{action:o,children:a,disabled:s=!1,component:c="button",orientation:u="horizontal",variant:f="plain",color:d="neutral",disableIndicator:h=!1,indicatorPlacement:g=i?"bottom":"right",indicatorInset:v=!1,slots:m={},slotProps:b={}}=r,x=Te(r,zT),S=K.useRef(null),C=cn(S,n),{active:I,focusVisible:w,setFocusVisible:A,selected:E,getRootProps:k}=cA(R({},r,{rootRef:C}));K.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),S.current.focus()}}),[A]);const $=R({},r,{disableIndicator:h,indicatorPlacement:g,indicatorInset:v,orientation:u,row:i,active:I,focusVisible:w,disabled:s,selected:E,variant:f,color:d}),G=jT($),O=R({},x,{component:c,slots:m,slotProps:b}),[T,N]=Ae("root",{ref:n,elementType:UT,getSlotProps:k,externalForwardedProps:O,ownerState:$,className:G.root});return l.jsx(mT.Provider,{value:u,children:l.jsx(T,R({},N,{children:a}))})});function jn(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 Xh(e){if(K.isValidElement(e)||nh.isValidElementType(e)||!jn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Xh(e[n])}),t}function Gt(e,t,n={clone:!0}){const r=n.clone?B({},e):e;return jn(e)&&jn(t)&&Object.keys(t).forEach(i=>{K.isValidElement(t[i])||nh.isValidElementType(t[i])?r[i]=t[i]:jn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&jn(e[i])?r[i]=Gt(e[i],t[i],n):n.clone?r[i]=jn(t[i])?Xh(t[i]):t[i]:r[i]=t[i]}),r}function Ar(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Qr(e){if(typeof e!="string")throw new Error(Ar(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Cc(e,t){const n=B({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=B(B({},e[i]),n[i]);else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)n[i]=o||{};else if(!o)n[i]=a;else{n[i]=B({},a);for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const c=s;n[i][c]=Cc(o[c],a[c])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function VT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let c=0;c<o.length;c+=1){const u=o[c];u&&(a+=(s===!0?"":" ")+t(u),s=!1,n&&n[u]&&(a+=" "+n[u]))}r[i]=a}return r}const Zh=e=>e,HT=(()=>{let e=Zh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Zh}}})(),WT={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ep(e,t,n="Mui"){const r=WT[t];return r?`${n}-${r}`:`${HT.generate(e)}-${t}`}function GT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=ep(e,i,n)}),r}function YT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function to(e,t){return t?Gt(e,t,{clone:!1}):e}function KT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,s;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((s=i.match(o))==null?void 0:s[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},B({},t)):t}function QT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function qT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function JT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...s)=>t(e.breakpoints.up(...s),a),o.down=(...s)=>t(e.breakpoints.down(...s),a),o.between=(...s)=>t(e.breakpoints.between(...s),a),o.only=(...s)=>t(e.breakpoints.only(...s),a),o.not=(...s)=>{const c=t(e.breakpoints.not(...s),a);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},i=o=>(n(r,o),r);return n(i),q(B({},e),{containerQueries:i})}const $a={xs:0,sm:600,md:900,lg:1200,xl:1536},tp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${$a[e]}px)`},XT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:$a[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Un(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||tp;return t.reduce((a,s,c)=>(a[o.up(o.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const o=r.breakpoints||tp;return Object.keys(t).reduce((a,s)=>{if(QT(o.keys,s)){const c=qT(r.containerQueries?r:XT,s);c&&(a[c]=n(t[s],s))}else if(Object.keys(o.values||$a).includes(s)){const c=o.up(s);a[c]=n(t[s],s)}else{const c=s;a[c]=t[c]}return a},{})}return n(t)}function ZT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function eE(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Fa(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Na(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Fa(e,n)||r,t&&(i=t(i,r,e)),i}function ct(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],c=a.theme,u=Fa(c,r)||{};return Un(a,s,d=>{let h=Na(u,i,d);return d===h&&typeof d=="string"&&(h=Na(u,i,`${t}${d==="default"?"":Qr(d)}`,d)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function tE(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const nE={m:"margin",p:"padding"},rE={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},np={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},iE=tE(e=>{if(e.length>2)if(np[e])e=np[e];else return[e];const[t,n]=e.split(""),r=nE[t],i=rE[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),wc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Sc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...wc,...Sc];function no(e,t,n,r){var o;const i=(o=Fa(e,t,!0))!=null?o:n;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:typeof i=="string"?`calc(${a} * ${i})`:i*a:Array.isArray(i)?a=>{if(typeof a=="string")return a;const s=Math.abs(a),c=i[s];return a>=0?c:typeof c=="number"?-c:`-${c}`}:typeof i=="function"?i:()=>{}}function Ic(e){return no(e,"spacing",8)}function ro(e,t){return typeof t=="string"||t==null?t:e(t)}function oE(e,t){return n=>e.reduce((r,i)=>(r[i]=ro(t,n),r),{})}function aE(e,t,n,r){if(!t.includes(n))return null;const i=iE(n),o=oE(i,r),a=e[n];return Un(e,a,o)}function rp(e,t){const n=Ic(e.theme);return Object.keys(e).map(r=>aE(e,t,r,n)).reduce(to,{})}function rt(e){return rp(e,wc)}rt.propTypes={},rt.filterProps=wc;function it(e){return rp(e,Sc)}it.propTypes={},it.filterProps=Sc;function za(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?to(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function nn(e){return typeof e!="number"?e:`${e}px solid`}function rn(e,t){return ct({prop:e,themeKey:"borders",transform:t})}const sE=rn("border",nn),lE=rn("borderTop",nn),cE=rn("borderRight",nn),uE=rn("borderBottom",nn),dE=rn("borderLeft",nn),fE=rn("borderColor"),hE=rn("borderTopColor"),pE=rn("borderRightColor"),gE=rn("borderBottomColor"),mE=rn("borderLeftColor"),vE=rn("outline",nn),bE=rn("outlineColor"),ja=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=no(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:ro(t,r)});return Un(e,e.borderRadius,n)}return null};ja.propTypes={},ja.filterProps=["borderRadius"],za(sE,lE,cE,uE,dE,fE,hE,pE,gE,mE,ja,vE,bE);const Ua=e=>{if(e.gap!==void 0&&e.gap!==null){const t=no(e.theme,"spacing",8),n=r=>({gap:ro(t,r)});return Un(e,e.gap,n)}return null};Ua.propTypes={},Ua.filterProps=["gap"];const Va=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=no(e.theme,"spacing",8),n=r=>({columnGap:ro(t,r)});return Un(e,e.columnGap,n)}return null};Va.propTypes={},Va.filterProps=["columnGap"];const Ha=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=no(e.theme,"spacing",8),n=r=>({rowGap:ro(t,r)});return Un(e,e.rowGap,n)}return null};Ha.propTypes={},Ha.filterProps=["rowGap"];const yE=ct({prop:"gridColumn"}),xE=ct({prop:"gridRow"}),CE=ct({prop:"gridAutoFlow"}),wE=ct({prop:"gridAutoColumns"}),SE=ct({prop:"gridAutoRows"}),IE=ct({prop:"gridTemplateColumns"}),AE=ct({prop:"gridTemplateRows"}),TE=ct({prop:"gridTemplateAreas"}),EE=ct({prop:"gridArea"});za(Ua,Va,Ha,yE,xE,CE,wE,SE,IE,AE,TE,EE);function qr(e,t){return t==="grey"?t:e}const kE=ct({prop:"color",themeKey:"palette",transform:qr}),_E=ct({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:qr}),PE=ct({prop:"backgroundColor",themeKey:"palette",transform:qr});za(kE,_E,PE);function Yt(e){return e<=1&&e!==0?`${e*100}%`:e}const DE=ct({prop:"width",transform:Yt}),Ac=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,s,c;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||$a[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Yt(n)}};return Un(e,e.maxWidth,t)}return null};Ac.filterProps=["maxWidth"];const OE=ct({prop:"minWidth",transform:Yt}),RE=ct({prop:"height",transform:Yt}),ME=ct({prop:"maxHeight",transform:Yt}),LE=ct({prop:"minHeight",transform:Yt});ct({prop:"size",cssProperty:"width",transform:Yt}),ct({prop:"size",cssProperty:"height",transform:Yt});const BE=ct({prop:"boxSizing"});za(DE,Ac,OE,RE,ME,LE,BE);const Wa={border:{themeKey:"borders",transform:nn},borderTop:{themeKey:"borders",transform:nn},borderRight:{themeKey:"borders",transform:nn},borderBottom:{themeKey:"borders",transform:nn},borderLeft:{themeKey:"borders",transform:nn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:nn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ja},color:{themeKey:"palette",transform:qr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:qr},backgroundColor:{themeKey:"palette",transform:qr},p:{style:it},pt:{style:it},pr:{style:it},pb:{style:it},pl:{style:it},px:{style:it},py:{style:it},padding:{style:it},paddingTop:{style:it},paddingRight:{style:it},paddingBottom:{style:it},paddingLeft:{style:it},paddingX:{style:it},paddingY:{style:it},paddingInline:{style:it},paddingInlineStart:{style:it},paddingInlineEnd:{style:it},paddingBlock:{style:it},paddingBlockStart:{style:it},paddingBlockEnd:{style:it},m:{style:rt},mt:{style:rt},mr:{style:rt},mb:{style:rt},ml:{style:rt},mx:{style:rt},my:{style:rt},margin:{style:rt},marginTop:{style:rt},marginRight:{style:rt},marginBottom:{style:rt},marginLeft:{style:rt},marginX:{style:rt},marginY:{style:rt},marginInline:{style:rt},marginInlineStart:{style:rt},marginInlineEnd:{style:rt},marginBlock:{style:rt},marginBlockStart:{style:rt},marginBlockEnd:{style:rt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ua},rowGap:{style:Ha},columnGap:{style:Va},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Yt},maxWidth:{style:Ac},minWidth:{transform:Yt},height:{transform:Yt},maxHeight:{transform:Yt},minHeight:{transform:Yt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function $E(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function FE(e,t){return typeof e=="function"?e(t):e}function NE(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:d}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const h=Fa(i,u)||{};return d?d(a):Un(a,r,v=>{let m=Na(h,f,v);return v===m&&typeof v=="string"&&(m=Na(h,f,`${n}${v==="default"?"":Qr(v)}`,v)),c===!1?m:{[c]:m}})}function t(n){var s;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(s=i.unstable_sxConfig)!=null?s:Wa;function a(c){let u=c;if(typeof c=="function")u=c(i);else if(typeof c!="object")return c;if(!u)return null;const f=ZT(i.breakpoints),d=Object.keys(f);let h=f;return Object.keys(u).forEach(g=>{const v=FE(u[g],i);if(v!=null)if(typeof v=="object")if(o[g])h=to(h,e(g,v,i,o));else{const m=Un({theme:i},v,b=>({[g]:b}));$E(m,v)?h[g]=t({sx:v,theme:i}):h=to(h,m)}else h=to(h,e(g,v,i,o))}),KT(i,eE(d,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Jr=NE();Jr.filterProps=["sx"];function zE(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var jE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},UE=!1,VE=/[A-Z]|^ms/g,HE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ip=function(t){return t.charCodeAt(1)===45},op=function(t){return t!=null&&typeof t!="boolean"},Tc=uA(function(e){return ip(e)?e:e.replace(VE,"-$&").toLowerCase()}),ap=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(HE,function(r,i,o){return ir={name:i,styles:o,next:ir},i})}return jE[t]!==1&&!ip(t)&&typeof n=="number"&&n!==0?n+"px":n},WE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ga(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return ir={name:i.name,styles:i.styles,next:ir},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)ir={name:a.name,styles:a.styles,next:ir},a=a.next;var s=o.styles+";";return s}return GE(e,t,n)}}var c=n;return c}function GE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ga(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;op(s)&&(r+=Tc(o)+":"+ap(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&UE)throw new Error(WE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)op(a[c])&&(r+=Tc(o)+":"+ap(o,a[c])+";");else{var u=Ga(e,t,a);switch(o){case"animation":case"animationName":{r+=Tc(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var sp=/label:\s*([^\s;{]+)\s*(;|$)/g,ir;function YE(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";ir=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Ga(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Ga(n,t,e[s]),r){var c=o;i+=c[s]}sp.lastIndex=0;for(var u="",f;(f=sp.exec(i))!==null;)u+="-"+f[1];var d=zE(i)+u;return{name:d,styles:i,next:ir}}/**
2334
2334
  * @mui/styled-engine v6.4.0
2335
2335
  *
2336
2336
  * @license MIT
2337
2337
  * This source code is licensed under the MIT license found in the
2338
2338
  * LICENSE file in the root directory of this source tree.
2339
- */function KE(e,t){return Bt(e,t)}function qE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const lp=[];function cp(e){return lp[0]=e,YE(lp)}const QE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>Q($({},n),{[r.key]:r.val}),{})};function JE(e){const h=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=h,i=qe(h,["values","unit","step"]),o=QE(t),a=Object.keys(o);function s(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n})`}function c(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-r/100}${n})`}function u(g,v){const m=a.indexOf(v);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:v)-r/100}${n})`}function f(g){return a.indexOf(g)+1<a.length?u(g,a[a.indexOf(g)+1]):s(g)}function d(g){const v=a.indexOf(g);return v===0?s(a[1]):v===a.length-1?c(a[v]):u(g,a[a.indexOf(g)+1]).replace("@media","@media not all and")}return $({keys:a,values:o,up:s,down:c,between:u,only:f,not:d,unit:n},i)}const XE={borderRadius:4};function up(e=8,t=Ic({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function ZE(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function dp(e={},...t){const f=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=f,a=qe(f,["breakpoints","palette","spacing","shape"]),s=JE(n),c=up(i);let u=Gt({breakpoints:s,direction:"ltr",components:{},palette:$({mode:"light"},r),spacing:c,shape:$($({},XE),o)},a);return u=JT(u),u.applyStyles=ZE,u=t.reduce((d,h)=>Gt(d,h),u),u.unstable_sxConfig=$($({},Wa),a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(h){return Jr({sx:h,theme:this})},u}function fp(e){const i=e,{variants:t}=i,n=qe(i,["variants"]),r={variants:t,style:cp(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=cp(o.style))}),r}const ek=dp();function Ec(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function tk(e){return e?(t,n)=>n[e]:null}function nk(e,t,n){e.theme=ok(e.theme)?n:e.theme[t]||e.theme}function Ya(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Ya(e,i));if(Array.isArray(n==null?void 0:n.variants)){let i;if(n.isProcessed)i=n.style;else{const r=n,{variants:o}=r;i=qe(r,["variants"])}return hp(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function hp(e,t,n=[]){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r!=null||(r=Q($($({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&((i=e.ownerState)==null?void 0:i[s])!==a.props[s])continue e;typeof a.style=="function"?(r!=null||(r=Q($($({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function rk(e={}){const{themeId:t,defaultTheme:n=ek,rootShouldForwardProp:r=Ec,slotShouldForwardProp:i=Ec}=e;function o(s){nk(s,t,n)}return(s,c={})=>{qE(s,A=>A.filter(E=>E!==Jr));const w=c,{name:u,slot:f,skipVariantsResolver:d,skipSx:h,overridesResolver:g=tk(sk(f))}=w,v=qe(w,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),m=d!==void 0?d:f&&f!=="Root"&&f!=="root"||!1,b=h||!1;let x=Ec;f==="Root"||f==="root"?x=r:f?x=i:ak(s)&&(x=void 0);const S=KE(s,$({shouldForwardProp:x,label:ik()},v)),C=A=>{if(typeof A=="function"&&A.__emotion_real!==A)return function(k){return Ya(k,A)};if(jn(A)){const E=fp(A);return E.variants?function(B){return Ya(B,E)}:E.style}return A},I=(...A)=>{const E=[],k=A.map(C),B=[];if(E.push(o),u&&g&&B.push(function(N){var M,V;const j=(V=(M=N.theme.components)==null?void 0:M[u])==null?void 0:V.styleOverrides;if(!j)return null;const F={};for(const Y in j)F[Y]=Ya(N,j[Y]);return g(N,F)}),u&&!m&&B.push(function(N){var F,M;const H=N.theme,j=(M=(F=H==null?void 0:H.components)==null?void 0:F[u])==null?void 0:M.variants;return j?hp(N,j):null}),b||B.push(Jr),Array.isArray(k[0])){const T=k.shift(),N=new Array(E.length).fill(""),H=new Array(B.length).fill("");let j;j=[...N,...T,...H],j.raw=[...N,...T.raw,...H],E.unshift(j)}const G=[...E,...k,...B],O=S(...G);return s.muiName&&(O.muiName=s.muiName),O};return S.withConfig&&(I.withConfig=S.withConfig),I}}function ik(e,t){return void 0}function ok(e){for(const t in e)return!1;return!0}function ak(e){return typeof e=="string"&&e.charCodeAt(0)>96}function sk(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function kc(e,t=0,n=1){return YT(e,t,n)}function lk(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function or(e){if(e.type)return e;if(e.charAt(0)==="#")return or(lk(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Ar(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(Ar(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const ck=e=>{const t=or(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},io=(e,t)=>{try{return ck(e)}catch(n){return e}};function Ka(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function pp(e){e=or(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(u,f=(u+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let s="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",c.push(t[3])),Ka({type:s,values:c})}function _c(e){e=or(e);let t=e.type==="hsl"||e.type==="hsla"?or(pp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:Ii((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function uk(e,t){const n=_c(e),r=_c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function dk(e,t){return e=or(e),t=kc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Ka(e)}function qa(e,t,n){try{return dk(e,t)}catch(r){return e}}function Pc(e,t){if(e=or(e),t=kc(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Ka(e)}function Ue(e,t,n){try{return Pc(e,t)}catch(r){return e}}function Dc(e,t){if(e=or(e),t=kc(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Ka(e)}function Ve(e,t,n){try{return Dc(e,t)}catch(r){return e}}function fk(e,t=.15){return _c(e)>.5?Pc(e,t):Dc(e,t)}function Qa(e,t,n){try{return fk(e,t)}catch(r){return e}}const hk=K.createContext(void 0);function pk(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Cc(i.defaultProps,r):!i.styleOverrides&&!i.variants?Cc(i,r):r}function gk({props:e,name:t}){const n=K.useContext(hk);return pk({props:e,name:t,theme:{components:n}})}const gp={theme:void 0};function mk(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(gp.theme=i.theme,o=fp(e(gp)),t=o,n=i.theme),o}}function vk(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const mp=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},bk=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,c])=>{(!n||n&&!n([...o,s]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,s],Array.isArray(c)?[...a,s]:a):t([...o,s],c,a))})}r(e)},yk=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Oc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return bk(e,(s,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(s,c))){const f=`--${n?`${n}-`:""}${s.join("-")}`,d=yk(s,c);Object.assign(i,{[f]:d}),mp(o,s,`var(${f})`,u),mp(a,s,`var(${f}, ${d})`,u)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function xk(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:i}=t,C=e,{colorSchemes:o={},components:a,defaultColorScheme:s="light"}=C,c=qe(C,["colorSchemes","components","defaultColorScheme"]),{vars:u,css:f,varsWithDefaults:d}=Oc(c,t);let h=d;const g={},I=o,{[s]:v}=I,m=qe(I,[Hs(s)]);if(Object.entries(m||{}).forEach(([w,A])=>{const{vars:E,css:k,varsWithDefaults:B}=Oc(A,t);h=Gt(h,B),g[w]={css:k,vars:E}}),v){const{css:w,vars:A,varsWithDefaults:E}=Oc(v,t);h=Gt(h,E),g[s]={css:w,vars:A}}function b(w,A){var k,B;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),w){if(E==="media")return e.defaultColorScheme===w?":root":{[`@media (prefers-color-scheme: ${((B=(k=o[w])==null?void 0:k.palette)==null?void 0:B.mode)||w})`]:{":root":A}};if(E)return e.defaultColorScheme===w?`:root, ${E.replace("%s",String(w))}`:E.replace("%s",String(w))}return":root"}return{vars:h,generateThemeVars:()=>{let w=$({},u);return Object.entries(g).forEach(([,{vars:A}])=>{w=Gt(w,A)}),w},generateStyleSheets:()=>{var O,T;const w=[],A=e.defaultColorScheme||"light";function E(N,H){Object.keys(H).length&&w.push(typeof N=="string"?{[N]:$({},H)}:N)}E(n(void 0,$({},f)),f);const G=g,{[A]:k}=G,B=qe(G,[Hs(A)]);if(k){const{css:N}=k,H=(T=(O=o[A])==null?void 0:O.palette)==null?void 0:T.mode,j=$(!r&&H?{colorScheme:H}:{},N);E(n(A,$({},j)),j)}return Object.entries(B).forEach(([N,{css:H}])=>{var M,V;const j=(V=(M=o[N])==null?void 0:M.palette)==null?void 0:V.mode,F=$(!r&&j?{colorScheme:j}:{},H);E(n(N,$({},F)),F)}),w}}}function Ck(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const oo={black:"#000",white:"#fff"},wk={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Xr={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Zr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},ao={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ei={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},ti={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},ni={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function vp(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:oo.white,default:oo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Sk=vp();function bp(){return{text:{primary:oo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:oo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const yp=bp();function xp(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Dc(e.main,i):t==="dark"&&(e.dark=Pc(e.main,o)))}function Ik(e="light"){return e==="dark"?{main:ei[200],light:ei[50],dark:ei[400]}:{main:ei[700],light:ei[400],dark:ei[800]}}function Ak(e="light"){return e==="dark"?{main:Xr[200],light:Xr[50],dark:Xr[400]}:{main:Xr[500],light:Xr[300],dark:Xr[700]}}function Tk(e="light"){return e==="dark"?{main:Zr[500],light:Zr[300],dark:Zr[700]}:{main:Zr[700],light:Zr[400],dark:Zr[800]}}function Ek(e="light"){return e==="dark"?{main:ti[400],light:ti[300],dark:ti[700]}:{main:ti[700],light:ti[500],dark:ti[900]}}function kk(e="light"){return e==="dark"?{main:ni[400],light:ni[300],dark:ni[700]}:{main:ni[800],light:ni[500],dark:ni[900]}}function _k(e="light"){return e==="dark"?{main:ao[400],light:ao[300],dark:ao[700]}:{main:"#ed6c02",light:ao[500],dark:ao[900]}}function Rc(e){const m=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=m,i=qe(m,["mode","contrastThreshold","tonalOffset"]),o=e.primary||Ik(t),a=e.secondary||Ak(t),s=e.error||Tk(t),c=e.info||Ek(t),u=e.success||kk(t),f=e.warning||_k(t);function d(b){return uk(b,yp.text.primary)>=n?yp.text.primary:Sk.text.primary}const h=({color:b,name:x,mainShade:S=500,lightShade:C=300,darkShade:I=700})=>{if(b=$({},b),!b.main&&b[S]&&(b.main=b[S]),!b.hasOwnProperty("main"))throw new Error(Ar(11,x?` (${x})`:"",S));if(typeof b.main!="string")throw new Error(Ar(12,x?` (${x})`:"",JSON.stringify(b.main)));return xp(b,"light",C,r),xp(b,"dark",I,r),b.contrastText||(b.contrastText=d(b.main)),b};let g;return t==="light"?g=vp():t==="dark"&&(g=bp()),Gt($({common:$({},oo),mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:f,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:u,name:"success"}),grey:wk,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},g),i)}function Pk(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function Dk(e,t){return $({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function Ok(e){return Math.round(e*1e5)/1e5}const Cp={textTransform:"uppercase"},wp='"Roboto", "Helvetica", "Arial", sans-serif';function Rk(e,t){const b=typeof t=="function"?t(e):t,{fontFamily:n=wp,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=b,d=qe(b,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),h=r/14,g=f||(x=>`${x/c*h}rem`),v=(x,S,C,I,w)=>$($($({fontFamily:n,fontWeight:x,fontSize:g(S),lineHeight:C},n===wp?{letterSpacing:`${Ok(I/S)}em`}:{}),w),u),m={h1:v(i,96,1.167,-1.5),h2:v(i,60,1.2,-.5),h3:v(o,48,1.167,0),h4:v(o,34,1.235,.25),h5:v(o,24,1.334,0),h6:v(a,20,1.6,.15),subtitle1:v(o,16,1.75,.15),subtitle2:v(a,14,1.57,.1),body1:v(o,16,1.5,.15),body2:v(o,14,1.43,.15),button:v(a,14,1.75,.4,Cp),caption:v(o,12,1.66,.4),overline:v(o,12,2.66,1,Cp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Gt($({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:s},m),d,{clone:!1})}const Mk=.2,Lk=.14,Bk=.12;function Ge(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Mk})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Lk})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Bk})`].join(",")}const $k=["none",Ge(0,2,1,-1,0,1,1,0,0,1,3,0),Ge(0,3,1,-2,0,2,2,0,0,1,5,0),Ge(0,3,3,-2,0,3,4,0,0,1,8,0),Ge(0,2,4,-1,0,4,5,0,0,1,10,0),Ge(0,3,5,-1,0,5,8,0,0,1,14,0),Ge(0,3,5,-1,0,6,10,0,0,1,18,0),Ge(0,4,5,-2,0,7,10,1,0,2,16,1),Ge(0,5,5,-3,0,8,10,1,0,3,14,2),Ge(0,5,6,-3,0,9,12,1,0,3,16,2),Ge(0,6,6,-3,0,10,14,1,0,4,18,3),Ge(0,6,7,-4,0,11,15,1,0,4,20,3),Ge(0,7,8,-4,0,12,17,2,0,5,22,4),Ge(0,7,8,-4,0,13,19,2,0,5,24,4),Ge(0,7,9,-4,0,14,21,2,0,5,26,4),Ge(0,8,9,-5,0,15,22,2,0,6,28,5),Ge(0,8,10,-5,0,16,24,2,0,6,30,5),Ge(0,8,11,-5,0,17,26,2,0,6,32,5),Ge(0,9,11,-5,0,18,28,2,0,7,34,6),Ge(0,9,12,-6,0,19,29,2,0,7,36,6),Ge(0,10,13,-6,0,20,31,3,0,8,38,7),Ge(0,10,13,-6,0,21,33,3,0,8,40,7),Ge(0,10,14,-6,0,22,35,3,0,8,42,7),Ge(0,11,14,-7,0,23,36,3,0,9,44,8),Ge(0,11,15,-7,0,24,38,3,0,9,46,8)],Fk={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Nk={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Sp(e){return`${Math.round(e)}ms`}function zk(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*Ii(t,.25)+t/5)*10),3e3)}function jk(e){const t=$($({},Fk),e.easing),n=$($({},Nk),e.duration);return Q($({getAutoHeightDuration:zk,create:(i=["all"],o={})=>{const f=o,{duration:a=n.standard,easing:s=t.easeInOut,delay:c=0}=f,u=qe(f,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof a=="string"?a:Sp(a)} ${s} ${typeof c=="string"?c:Sp(c)}`).join(",")}},e),{easing:t,duration:n})}const Uk={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Vk(e){return jn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ip(e={}){const t=$({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,s]=i[o];!Vk(s)||a.startsWith("unstable_")?delete r[a]:jn(s)&&(r[a]=$({},s),n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
2339
+ */function KE(e,t){return Bt(e,t)}function QE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const lp=[];function cp(e){return lp[0]=e,YE(lp)}const qE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>q(B({},n),{[r.key]:r.val}),{})};function JE(e){const h=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=h,i=Qe(h,["values","unit","step"]),o=qE(t),a=Object.keys(o);function s(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n})`}function c(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-r/100}${n})`}function u(g,v){const m=a.indexOf(v);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:v)-r/100}${n})`}function f(g){return a.indexOf(g)+1<a.length?u(g,a[a.indexOf(g)+1]):s(g)}function d(g){const v=a.indexOf(g);return v===0?s(a[1]):v===a.length-1?c(a[v]):u(g,a[a.indexOf(g)+1]).replace("@media","@media not all and")}return B({keys:a,values:o,up:s,down:c,between:u,only:f,not:d,unit:n},i)}const XE={borderRadius:4};function up(e=8,t=Ic({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function ZE(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function dp(e={},...t){const f=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=f,a=Qe(f,["breakpoints","palette","spacing","shape"]),s=JE(n),c=up(i);let u=Gt({breakpoints:s,direction:"ltr",components:{},palette:B({mode:"light"},r),spacing:c,shape:B(B({},XE),o)},a);return u=JT(u),u.applyStyles=ZE,u=t.reduce((d,h)=>Gt(d,h),u),u.unstable_sxConfig=B(B({},Wa),a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(h){return Jr({sx:h,theme:this})},u}function fp(e){const i=e,{variants:t}=i,n=Qe(i,["variants"]),r={variants:t,style:cp(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=cp(o.style))}),r}const ek=dp();function Ec(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function tk(e){return e?(t,n)=>n[e]:null}function nk(e,t,n){e.theme=ok(e.theme)?n:e.theme[t]||e.theme}function Ya(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Ya(e,i));if(Array.isArray(n==null?void 0:n.variants)){let i;if(n.isProcessed)i=n.style;else{const r=n,{variants:o}=r;i=Qe(r,["variants"])}return hp(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function hp(e,t,n=[]){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r!=null||(r=q(B(B({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&((i=e.ownerState)==null?void 0:i[s])!==a.props[s])continue e;typeof a.style=="function"?(r!=null||(r=q(B(B({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function rk(e={}){const{themeId:t,defaultTheme:n=ek,rootShouldForwardProp:r=Ec,slotShouldForwardProp:i=Ec}=e;function o(s){nk(s,t,n)}return(s,c={})=>{QE(s,A=>A.filter(E=>E!==Jr));const w=c,{name:u,slot:f,skipVariantsResolver:d,skipSx:h,overridesResolver:g=tk(sk(f))}=w,v=Qe(w,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),m=d!==void 0?d:f&&f!=="Root"&&f!=="root"||!1,b=h||!1;let x=Ec;f==="Root"||f==="root"?x=r:f?x=i:ak(s)&&(x=void 0);const S=KE(s,B({shouldForwardProp:x,label:ik()},v)),C=A=>{if(typeof A=="function"&&A.__emotion_real!==A)return function(k){return Ya(k,A)};if(jn(A)){const E=fp(A);return E.variants?function($){return Ya($,E)}:E.style}return A},I=(...A)=>{const E=[],k=A.map(C),$=[];if(E.push(o),u&&g&&$.push(function(N){var M,V;const j=(V=(M=N.theme.components)==null?void 0:M[u])==null?void 0:V.styleOverrides;if(!j)return null;const F={};for(const Y in j)F[Y]=Ya(N,j[Y]);return g(N,F)}),u&&!m&&$.push(function(N){var F,M;const H=N.theme,j=(M=(F=H==null?void 0:H.components)==null?void 0:F[u])==null?void 0:M.variants;return j?hp(N,j):null}),b||$.push(Jr),Array.isArray(k[0])){const T=k.shift(),N=new Array(E.length).fill(""),H=new Array($.length).fill("");let j;j=[...N,...T,...H],j.raw=[...N,...T.raw,...H],E.unshift(j)}const G=[...E,...k,...$],O=S(...G);return s.muiName&&(O.muiName=s.muiName),O};return S.withConfig&&(I.withConfig=S.withConfig),I}}function ik(e,t){return void 0}function ok(e){for(const t in e)return!1;return!0}function ak(e){return typeof e=="string"&&e.charCodeAt(0)>96}function sk(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function kc(e,t=0,n=1){return YT(e,t,n)}function lk(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function or(e){if(e.type)return e;if(e.charAt(0)==="#")return or(lk(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Ar(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(Ar(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const ck=e=>{const t=or(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},io=(e,t)=>{try{return ck(e)}catch(n){return e}};function Ka(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function pp(e){e=or(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(u,f=(u+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let s="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",c.push(t[3])),Ka({type:s,values:c})}function _c(e){e=or(e);let t=e.type==="hsl"||e.type==="hsla"?or(pp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:Ii((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function uk(e,t){const n=_c(e),r=_c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function dk(e,t){return e=or(e),t=kc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Ka(e)}function Qa(e,t,n){try{return dk(e,t)}catch(r){return e}}function Pc(e,t){if(e=or(e),t=kc(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Ka(e)}function Ue(e,t,n){try{return Pc(e,t)}catch(r){return e}}function Dc(e,t){if(e=or(e),t=kc(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Ka(e)}function Ve(e,t,n){try{return Dc(e,t)}catch(r){return e}}function fk(e,t=.15){return _c(e)>.5?Pc(e,t):Dc(e,t)}function qa(e,t,n){try{return fk(e,t)}catch(r){return e}}const hk=K.createContext(void 0);function pk(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Cc(i.defaultProps,r):!i.styleOverrides&&!i.variants?Cc(i,r):r}function gk({props:e,name:t}){const n=K.useContext(hk);return pk({props:e,name:t,theme:{components:n}})}const gp={theme:void 0};function mk(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(gp.theme=i.theme,o=fp(e(gp)),t=o,n=i.theme),o}}function vk(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const mp=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},bk=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,c])=>{(!n||n&&!n([...o,s]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,s],Array.isArray(c)?[...a,s]:a):t([...o,s],c,a))})}r(e)},yk=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Oc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return bk(e,(s,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(s,c))){const f=`--${n?`${n}-`:""}${s.join("-")}`,d=yk(s,c);Object.assign(i,{[f]:d}),mp(o,s,`var(${f})`,u),mp(a,s,`var(${f}, ${d})`,u)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function xk(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:i}=t,C=e,{colorSchemes:o={},components:a,defaultColorScheme:s="light"}=C,c=Qe(C,["colorSchemes","components","defaultColorScheme"]),{vars:u,css:f,varsWithDefaults:d}=Oc(c,t);let h=d;const g={},I=o,{[s]:v}=I,m=Qe(I,[Hs(s)]);if(Object.entries(m||{}).forEach(([w,A])=>{const{vars:E,css:k,varsWithDefaults:$}=Oc(A,t);h=Gt(h,$),g[w]={css:k,vars:E}}),v){const{css:w,vars:A,varsWithDefaults:E}=Oc(v,t);h=Gt(h,E),g[s]={css:w,vars:A}}function b(w,A){var k,$;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),w){if(E==="media")return e.defaultColorScheme===w?":root":{[`@media (prefers-color-scheme: ${(($=(k=o[w])==null?void 0:k.palette)==null?void 0:$.mode)||w})`]:{":root":A}};if(E)return e.defaultColorScheme===w?`:root, ${E.replace("%s",String(w))}`:E.replace("%s",String(w))}return":root"}return{vars:h,generateThemeVars:()=>{let w=B({},u);return Object.entries(g).forEach(([,{vars:A}])=>{w=Gt(w,A)}),w},generateStyleSheets:()=>{var O,T;const w=[],A=e.defaultColorScheme||"light";function E(N,H){Object.keys(H).length&&w.push(typeof N=="string"?{[N]:B({},H)}:N)}E(n(void 0,B({},f)),f);const G=g,{[A]:k}=G,$=Qe(G,[Hs(A)]);if(k){const{css:N}=k,H=(T=(O=o[A])==null?void 0:O.palette)==null?void 0:T.mode,j=B(!r&&H?{colorScheme:H}:{},N);E(n(A,B({},j)),j)}return Object.entries($).forEach(([N,{css:H}])=>{var M,V;const j=(V=(M=o[N])==null?void 0:M.palette)==null?void 0:V.mode,F=B(!r&&j?{colorScheme:j}:{},H);E(n(N,B({},F)),F)}),w}}}function Ck(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const oo={black:"#000",white:"#fff"},wk={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Xr={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Zr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},ao={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ei={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},ti={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},ni={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function vp(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:oo.white,default:oo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Sk=vp();function bp(){return{text:{primary:oo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:oo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const yp=bp();function xp(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Dc(e.main,i):t==="dark"&&(e.dark=Pc(e.main,o)))}function Ik(e="light"){return e==="dark"?{main:ei[200],light:ei[50],dark:ei[400]}:{main:ei[700],light:ei[400],dark:ei[800]}}function Ak(e="light"){return e==="dark"?{main:Xr[200],light:Xr[50],dark:Xr[400]}:{main:Xr[500],light:Xr[300],dark:Xr[700]}}function Tk(e="light"){return e==="dark"?{main:Zr[500],light:Zr[300],dark:Zr[700]}:{main:Zr[700],light:Zr[400],dark:Zr[800]}}function Ek(e="light"){return e==="dark"?{main:ti[400],light:ti[300],dark:ti[700]}:{main:ti[700],light:ti[500],dark:ti[900]}}function kk(e="light"){return e==="dark"?{main:ni[400],light:ni[300],dark:ni[700]}:{main:ni[800],light:ni[500],dark:ni[900]}}function _k(e="light"){return e==="dark"?{main:ao[400],light:ao[300],dark:ao[700]}:{main:"#ed6c02",light:ao[500],dark:ao[900]}}function Rc(e){const m=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=m,i=Qe(m,["mode","contrastThreshold","tonalOffset"]),o=e.primary||Ik(t),a=e.secondary||Ak(t),s=e.error||Tk(t),c=e.info||Ek(t),u=e.success||kk(t),f=e.warning||_k(t);function d(b){return uk(b,yp.text.primary)>=n?yp.text.primary:Sk.text.primary}const h=({color:b,name:x,mainShade:S=500,lightShade:C=300,darkShade:I=700})=>{if(b=B({},b),!b.main&&b[S]&&(b.main=b[S]),!b.hasOwnProperty("main"))throw new Error(Ar(11,x?` (${x})`:"",S));if(typeof b.main!="string")throw new Error(Ar(12,x?` (${x})`:"",JSON.stringify(b.main)));return xp(b,"light",C,r),xp(b,"dark",I,r),b.contrastText||(b.contrastText=d(b.main)),b};let g;return t==="light"?g=vp():t==="dark"&&(g=bp()),Gt(B({common:B({},oo),mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:f,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:u,name:"success"}),grey:wk,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r},g),i)}function Pk(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function Dk(e,t){return B({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function Ok(e){return Math.round(e*1e5)/1e5}const Cp={textTransform:"uppercase"},wp='"Roboto", "Helvetica", "Arial", sans-serif';function Rk(e,t){const b=typeof t=="function"?t(e):t,{fontFamily:n=wp,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=b,d=Qe(b,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),h=r/14,g=f||(x=>`${x/c*h}rem`),v=(x,S,C,I,w)=>B(B(B({fontFamily:n,fontWeight:x,fontSize:g(S),lineHeight:C},n===wp?{letterSpacing:`${Ok(I/S)}em`}:{}),w),u),m={h1:v(i,96,1.167,-1.5),h2:v(i,60,1.2,-.5),h3:v(o,48,1.167,0),h4:v(o,34,1.235,.25),h5:v(o,24,1.334,0),h6:v(a,20,1.6,.15),subtitle1:v(o,16,1.75,.15),subtitle2:v(a,14,1.57,.1),body1:v(o,16,1.5,.15),body2:v(o,14,1.43,.15),button:v(a,14,1.75,.4,Cp),caption:v(o,12,1.66,.4),overline:v(o,12,2.66,1,Cp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Gt(B({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:s},m),d,{clone:!1})}const Mk=.2,Lk=.14,Bk=.12;function Ge(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Mk})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Lk})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Bk})`].join(",")}const $k=["none",Ge(0,2,1,-1,0,1,1,0,0,1,3,0),Ge(0,3,1,-2,0,2,2,0,0,1,5,0),Ge(0,3,3,-2,0,3,4,0,0,1,8,0),Ge(0,2,4,-1,0,4,5,0,0,1,10,0),Ge(0,3,5,-1,0,5,8,0,0,1,14,0),Ge(0,3,5,-1,0,6,10,0,0,1,18,0),Ge(0,4,5,-2,0,7,10,1,0,2,16,1),Ge(0,5,5,-3,0,8,10,1,0,3,14,2),Ge(0,5,6,-3,0,9,12,1,0,3,16,2),Ge(0,6,6,-3,0,10,14,1,0,4,18,3),Ge(0,6,7,-4,0,11,15,1,0,4,20,3),Ge(0,7,8,-4,0,12,17,2,0,5,22,4),Ge(0,7,8,-4,0,13,19,2,0,5,24,4),Ge(0,7,9,-4,0,14,21,2,0,5,26,4),Ge(0,8,9,-5,0,15,22,2,0,6,28,5),Ge(0,8,10,-5,0,16,24,2,0,6,30,5),Ge(0,8,11,-5,0,17,26,2,0,6,32,5),Ge(0,9,11,-5,0,18,28,2,0,7,34,6),Ge(0,9,12,-6,0,19,29,2,0,7,36,6),Ge(0,10,13,-6,0,20,31,3,0,8,38,7),Ge(0,10,13,-6,0,21,33,3,0,8,40,7),Ge(0,10,14,-6,0,22,35,3,0,8,42,7),Ge(0,11,14,-7,0,23,36,3,0,9,44,8),Ge(0,11,15,-7,0,24,38,3,0,9,46,8)],Fk={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Nk={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Sp(e){return`${Math.round(e)}ms`}function zk(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*Ii(t,.25)+t/5)*10),3e3)}function jk(e){const t=B(B({},Fk),e.easing),n=B(B({},Nk),e.duration);return q(B({getAutoHeightDuration:zk,create:(i=["all"],o={})=>{const f=o,{duration:a=n.standard,easing:s=t.easeInOut,delay:c=0}=f,u=Qe(f,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof a=="string"?a:Sp(a)} ${s} ${typeof c=="string"?c:Sp(c)}`).join(",")}},e),{easing:t,duration:n})}const Uk={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Vk(e){return jn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ip(e={}){const t=B({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,s]=i[o];!Vk(s)||a.startsWith("unstable_")?delete r[a]:jn(s)&&(r[a]=B({},s),n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
2340
2340
 
2341
2341
  const theme = ${JSON.stringify(t,null,2)};
2342
2342
 
2343
2343
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
2344
2344
  theme.transitions = createTransitions(theme.transitions || {});
2345
2345
 
2346
- export default theme;`}function Mc(e={},...t){const g=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:s={},shape:c}=g,u=qe(g,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(Ar(20));const f=Rc(o),d=dp(e);let h=Gt(d,{mixins:Dk(d.breakpoints,r),palette:f,shadows:$k.slice(),typography:Rk(f,s),transitions:jk(a),zIndex:$({},Uk)});return h=Gt(h,u),h=t.reduce((v,m)=>Gt(v,m),h),h.unstable_sxConfig=$($({},Wa),u==null?void 0:u.unstable_sxConfig),h.unstable_sx=function(m){return Jr({sx:m,theme:this})},h.toRuntimeSource=Ip,h}function Hk(e){let t;return e<1?t=5.11916*Ii(e,2):t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Wk=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Hk(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ap(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Tp(e){return e==="dark"?Wk:[]}function Gk(e){const a=e,{palette:t={mode:"light"},opacity:n,overlays:r}=a,i=qe(a,["palette","opacity","overlays"]),o=Rc(t);return $({palette:o,opacity:$($({},Ap(o.mode)),n),overlays:r||Tp(o.mode)},i)}function Yk(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Kk=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],qk=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if(i==="class"&&(o=".%s"),i==="data"&&(o="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return Kk(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:o?{[o.replace("%s",t)]:a,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:$($({},n),a)}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function Qk(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function re(e,t,n){!e[t]&&n&&(e[t]=n)}function so(e){return typeof e!="string"||!e.startsWith("hsl")?e:pp(e)}function Vn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=io(so(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
2347
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Jk(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Cn=e=>{try{return e()}catch(t){}},Xk=(e="mui")=>vk(e);function Lc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Gk(Q($({},t),{palette:$({mode:i},t==null?void 0:t.palette)}));return}const s=Mc(Q($({},n),{palette:$({mode:i},t==null?void 0:t.palette)})),{palette:o}=s,a=qe(s,["palette"]);return e[r]=Q($({},t),{palette:o,opacity:$($({},Ap(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||Tp(i)}),a}function Zk(e={},...t){const B=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Yk,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:c=":root"}=B,u=qe(B,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),f=Object.keys(n)[0],d=r||(n.light&&f!=="light"?"light":f),h=Xk(o),G=n,{[d]:g,light:v,dark:m}=G,b=qe(G,[Hs(d),"light","dark"]),x=$({},b);let S=g;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(S=!0),!S)throw new Error(Ar(21,d));const C=Lc(x,S,u,d);v&&!x.light&&Lc(x,v,void 0,"light"),m&&!x.dark&&Lc(x,m,void 0,"dark");let I=Q($({defaultColorScheme:d},C),{cssVarPrefix:o,colorSchemeSelector:s,rootSelector:c,getCssVar:h,colorSchemes:x,font:$($({},Pk(C.typography)),C.font),spacing:Jk(u.spacing)});Object.keys(I.colorSchemes).forEach(O=>{const T=I.colorSchemes[O].palette,N=H=>{const j=H.split("-"),F=j[1],M=j[2];return h(H,T[F][M])};if(T.mode==="light"&&(re(T.common,"background","#fff"),re(T.common,"onBackground","#000")),T.mode==="dark"&&(re(T.common,"background","#000"),re(T.common,"onBackground","#fff")),Qk(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){re(T.Alert,"errorColor",Ue(T.error.light,.6)),re(T.Alert,"infoColor",Ue(T.info.light,.6)),re(T.Alert,"successColor",Ue(T.success.light,.6)),re(T.Alert,"warningColor",Ue(T.warning.light,.6)),re(T.Alert,"errorFilledBg",N("palette-error-main")),re(T.Alert,"infoFilledBg",N("palette-info-main")),re(T.Alert,"successFilledBg",N("palette-success-main")),re(T.Alert,"warningFilledBg",N("palette-warning-main")),re(T.Alert,"errorFilledColor",Cn(()=>T.getContrastText(T.error.main))),re(T.Alert,"infoFilledColor",Cn(()=>T.getContrastText(T.info.main))),re(T.Alert,"successFilledColor",Cn(()=>T.getContrastText(T.success.main))),re(T.Alert,"warningFilledColor",Cn(()=>T.getContrastText(T.warning.main))),re(T.Alert,"errorStandardBg",Ve(T.error.light,.9)),re(T.Alert,"infoStandardBg",Ve(T.info.light,.9)),re(T.Alert,"successStandardBg",Ve(T.success.light,.9)),re(T.Alert,"warningStandardBg",Ve(T.warning.light,.9)),re(T.Alert,"errorIconColor",N("palette-error-main")),re(T.Alert,"infoIconColor",N("palette-info-main")),re(T.Alert,"successIconColor",N("palette-success-main")),re(T.Alert,"warningIconColor",N("palette-warning-main")),re(T.AppBar,"defaultBg",N("palette-grey-100")),re(T.Avatar,"defaultBg",N("palette-grey-400")),re(T.Button,"inheritContainedBg",N("palette-grey-300")),re(T.Button,"inheritContainedHoverBg",N("palette-grey-A100")),re(T.Chip,"defaultBorder",N("palette-grey-400")),re(T.Chip,"defaultAvatarColor",N("palette-grey-700")),re(T.Chip,"defaultIconColor",N("palette-grey-700")),re(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),re(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),re(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),re(T.LinearProgress,"primaryBg",Ve(T.primary.main,.62)),re(T.LinearProgress,"secondaryBg",Ve(T.secondary.main,.62)),re(T.LinearProgress,"errorBg",Ve(T.error.main,.62)),re(T.LinearProgress,"infoBg",Ve(T.info.main,.62)),re(T.LinearProgress,"successBg",Ve(T.success.main,.62)),re(T.LinearProgress,"warningBg",Ve(T.warning.main,.62)),re(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.11)`),re(T.Slider,"primaryTrack",Ve(T.primary.main,.62)),re(T.Slider,"secondaryTrack",Ve(T.secondary.main,.62)),re(T.Slider,"errorTrack",Ve(T.error.main,.62)),re(T.Slider,"infoTrack",Ve(T.info.main,.62)),re(T.Slider,"successTrack",Ve(T.success.main,.62)),re(T.Slider,"warningTrack",Ve(T.warning.main,.62));const H=Qa(T.background.default,.8);re(T.SnackbarContent,"bg",H),re(T.SnackbarContent,"color",Cn(()=>T.getContrastText(H))),re(T.SpeedDialAction,"fabHoverBg",Qa(T.background.paper,.15)),re(T.StepConnector,"border",N("palette-grey-400")),re(T.StepContent,"border",N("palette-grey-400")),re(T.Switch,"defaultColor",N("palette-common-white")),re(T.Switch,"defaultDisabledColor",N("palette-grey-100")),re(T.Switch,"primaryDisabledColor",Ve(T.primary.main,.62)),re(T.Switch,"secondaryDisabledColor",Ve(T.secondary.main,.62)),re(T.Switch,"errorDisabledColor",Ve(T.error.main,.62)),re(T.Switch,"infoDisabledColor",Ve(T.info.main,.62)),re(T.Switch,"successDisabledColor",Ve(T.success.main,.62)),re(T.Switch,"warningDisabledColor",Ve(T.warning.main,.62)),re(T.TableCell,"border",Ve(qa(T.divider,1),.88)),re(T.Tooltip,"bg",qa(T.grey[700],.92))}if(T.mode==="dark"){re(T.Alert,"errorColor",Ve(T.error.light,.6)),re(T.Alert,"infoColor",Ve(T.info.light,.6)),re(T.Alert,"successColor",Ve(T.success.light,.6)),re(T.Alert,"warningColor",Ve(T.warning.light,.6)),re(T.Alert,"errorFilledBg",N("palette-error-dark")),re(T.Alert,"infoFilledBg",N("palette-info-dark")),re(T.Alert,"successFilledBg",N("palette-success-dark")),re(T.Alert,"warningFilledBg",N("palette-warning-dark")),re(T.Alert,"errorFilledColor",Cn(()=>T.getContrastText(T.error.dark))),re(T.Alert,"infoFilledColor",Cn(()=>T.getContrastText(T.info.dark))),re(T.Alert,"successFilledColor",Cn(()=>T.getContrastText(T.success.dark))),re(T.Alert,"warningFilledColor",Cn(()=>T.getContrastText(T.warning.dark))),re(T.Alert,"errorStandardBg",Ue(T.error.light,.9)),re(T.Alert,"infoStandardBg",Ue(T.info.light,.9)),re(T.Alert,"successStandardBg",Ue(T.success.light,.9)),re(T.Alert,"warningStandardBg",Ue(T.warning.light,.9)),re(T.Alert,"errorIconColor",N("palette-error-main")),re(T.Alert,"infoIconColor",N("palette-info-main")),re(T.Alert,"successIconColor",N("palette-success-main")),re(T.Alert,"warningIconColor",N("palette-warning-main")),re(T.AppBar,"defaultBg",N("palette-grey-900")),re(T.AppBar,"darkBg",N("palette-background-paper")),re(T.AppBar,"darkColor",N("palette-text-primary")),re(T.Avatar,"defaultBg",N("palette-grey-600")),re(T.Button,"inheritContainedBg",N("palette-grey-800")),re(T.Button,"inheritContainedHoverBg",N("palette-grey-700")),re(T.Chip,"defaultBorder",N("palette-grey-700")),re(T.Chip,"defaultAvatarColor",N("palette-grey-300")),re(T.Chip,"defaultIconColor",N("palette-grey-300")),re(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),re(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),re(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),re(T.LinearProgress,"primaryBg",Ue(T.primary.main,.5)),re(T.LinearProgress,"secondaryBg",Ue(T.secondary.main,.5)),re(T.LinearProgress,"errorBg",Ue(T.error.main,.5)),re(T.LinearProgress,"infoBg",Ue(T.info.main,.5)),re(T.LinearProgress,"successBg",Ue(T.success.main,.5)),re(T.LinearProgress,"warningBg",Ue(T.warning.main,.5)),re(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.13)`),re(T.Slider,"primaryTrack",Ue(T.primary.main,.5)),re(T.Slider,"secondaryTrack",Ue(T.secondary.main,.5)),re(T.Slider,"errorTrack",Ue(T.error.main,.5)),re(T.Slider,"infoTrack",Ue(T.info.main,.5)),re(T.Slider,"successTrack",Ue(T.success.main,.5)),re(T.Slider,"warningTrack",Ue(T.warning.main,.5));const H=Qa(T.background.default,.98);re(T.SnackbarContent,"bg",H),re(T.SnackbarContent,"color",Cn(()=>T.getContrastText(H))),re(T.SpeedDialAction,"fabHoverBg",Qa(T.background.paper,.15)),re(T.StepConnector,"border",N("palette-grey-600")),re(T.StepContent,"border",N("palette-grey-600")),re(T.Switch,"defaultColor",N("palette-grey-300")),re(T.Switch,"defaultDisabledColor",N("palette-grey-600")),re(T.Switch,"primaryDisabledColor",Ue(T.primary.main,.55)),re(T.Switch,"secondaryDisabledColor",Ue(T.secondary.main,.55)),re(T.Switch,"errorDisabledColor",Ue(T.error.main,.55)),re(T.Switch,"infoDisabledColor",Ue(T.info.main,.55)),re(T.Switch,"successDisabledColor",Ue(T.success.main,.55)),re(T.Switch,"warningDisabledColor",Ue(T.warning.main,.55)),re(T.TableCell,"border",Ue(qa(T.divider,1),.68)),re(T.Tooltip,"bg",qa(T.grey[700],.92))}Vn(T.background,"default"),Vn(T.background,"paper"),Vn(T.common,"background"),Vn(T.common,"onBackground"),Vn(T,"divider"),Object.keys(T).forEach(H=>{const j=T[H];H!=="tonalOffset"&&j&&typeof j=="object"&&(j.main&&re(T[H],"mainChannel",io(so(j.main))),j.light&&re(T[H],"lightChannel",io(so(j.light))),j.dark&&re(T[H],"darkChannel",io(so(j.dark))),j.contrastText&&re(T[H],"contrastTextChannel",io(so(j.contrastText))),H==="text"&&(Vn(T[H],"primary"),Vn(T[H],"secondary")),H==="action"&&(j.active&&Vn(T[H],"active"),j.selected&&Vn(T[H],"selected")))})}),I=t.reduce((O,T)=>Gt(O,T),I);const w={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:qk(I)},{vars:A,generateThemeVars:E,generateStyleSheets:k}=xk(I,w);return I.vars=A,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([O,T])=>{I[O]=T}),I.generateThemeVars=E,I.generateStyleSheets=k,I.generateSpacing=function(){return up(u.spacing,Ic(this))},I.getColorSchemeSelector=Ck(s),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=a,I.unstable_sxConfig=$($({},Wa),u==null?void 0:u.unstable_sxConfig),I.unstable_sx=function(T){return Jr({sx:T,theme:this})},I.toRuntimeSource=Ip,I}function Ep(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=Q($({},n!==!0&&n),{palette:Rc(Q($({},n===!0?{}:n.palette),{mode:t}))}))}function e_(e={},...t){const f=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=f,a=qe(f,["palette","cssVariables","colorSchemes","defaultColorScheme"]),s=o||"light",c=i==null?void 0:i[s],u=$($({},i),n?{[s]:Q($({},typeof c!="boolean"&&c),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Mc(e,...t);let d=n;"palette"in e||u[s]&&(u[s]!==!0?d=u[s].palette:s==="dark"&&(d={mode:"dark"}));const h=Mc(Q($({},e),{palette:d}),...t);return h.defaultColorScheme=s,h.colorSchemes=u,h.palette.mode==="light"&&(h.colorSchemes.light=Q($({},u.light!==!0&&u.light),{palette:h.palette}),Ep(h,"dark",u.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=Q($({},u.dark!==!0&&u.dark),{palette:h.palette}),Ep(h,"light",u.light)),h}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),Zk($(Q($({},a),{colorSchemes:u,defaultColorScheme:s}),typeof r!="boolean"&&r),...t)}const t_=e_(),n_="$$material";function r_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const i_=rk({themeId:n_,defaultTheme:t_,rootShouldForwardProp:e=>r_(e)&&e!=="classes"}),o_=mk;function a_(e){return gk(e)}function s_(e){return ep("MuiSvgIcon",e)}GT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const l_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${qr(t)}`,`fontSize${qr(n)}`]};return VT(i,s_,r)},c_=i_("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${qr(n.color)}`],t[`fontSize${qr(n.fontSize)}`]]}})(o_(({theme:e})=>{var t,n,r,i,o,a,s,c,u,f,d,h,g,v,m,b,x,S;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(i=(r=((n=e.vars)!=null?n:e).transitions)==null?void 0:r.duration)==null?void 0:i.shorter}),variants:[{props:C=>!C.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:d.call(f,35))||"2.1875rem"}},...Object.entries(((h=e.vars)!=null?h:e).palette).filter(([,C])=>C&&C.main).map(([C])=>{var I,w,A;return{props:{color:C},style:{color:(A=(w=((I=e.vars)!=null?I:e).palette)==null?void 0:w[C])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(m=(v=((g=e.vars)!=null?g:e).palette)==null?void 0:v.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(S=(x=((b=e.vars)!=null?b:e).palette)==null?void 0:x.action)==null?void 0:S.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Bc=K.forwardRef(function(t,n){const r=a_({props:t,name:"MuiSvgIcon"}),S=r,{children:i,className:o,color:a="inherit",component:s="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:h="0 0 24 24"}=S,g=qe(S,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),v=K.isValidElement(i)&&i.type==="svg",m=Q($({},r),{color:a,component:s,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:h,hasSvgAsChild:v}),b={};f||(b.viewBox=h);const x=l_(m);return l.jsxs(c_,Q($($($({as:s,className:$n(x.root,o),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},b),g),v&&i.props),{ownerState:m,children:[v?i.props.children:i,d?l.jsx("title",{children:d}):null]}))});Bc.muiName="SvgIcon";function Be(e,t){function n(r,i){return l.jsx(Bc,Q($({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=Bc.muiName,K.memo(K.forwardRef(n))}const $c=Be(l.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),u_=Be(l.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8m-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12m3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8m5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8m3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"ColorLens"),d_=Be(l.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function f_(e){return lt("MuiTabPanel",e)}We("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const h_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],p_=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${xe(n)}`,o,r&&`variant${xe(r)}`,i&&`color${xe(i)}`,n&&`size${xe(n)}`]};return ht(a,f_,{})},g_=ye("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return R({display:t.hidden?"none":"block",padding:"var(--Tabs-spacing)",flexGrow:1,fontFamily:e.vars.fontFamily.body},e.typography[`body-${t.size}`],(n=e.variants[t.variant])==null?void 0:n[t.color])}),ri=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyTabPanel"}),{orientation:i}=Sa()||{orientation:"horizontal"},o=K.useContext(yc),{children:a,value:s=0,component:c,color:u="neutral",variant:f="plain",size:d,slots:h={},slotProps:g={},keepMounted:v=!1}=r,m=Te(r,h_),{hidden:b,getRootProps:x}=iA(R({},r,{value:s})),S=d!=null?d:o,C=R({},r,{orientation:i,hidden:b,size:S,color:u,variant:f}),I=p_(C),w=R({},m,{component:c,slots:h,slotProps:g}),[A,E]=Ae("root",{ref:n,elementType:g_,getSlotProps:x,externalForwardedProps:w,additionalProps:{role:"tabpanel",ref:n,as:c},ownerState:C,className:I.root});return v?l.jsx(A,R({},E,{children:a})):l.jsx(A,R({},E,{children:!b&&a}))});function m_(e){return lt("MuiInput",e)}const kp=We("MuiInput",["root","input","formControl","focused","disabled","error","adornedStart","adornedEnd","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid","fullWidth","startDecorator","endDecorator"]),Ja=K.createContext(void 0),v_=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","disabledInProp","error","id","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","type","value"];function b_(e,t){var n;const r=K.useContext(Ja),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:c,className:u,defaultValue:f,disabled:d,disabledInProp:h,error:g,id:v,name:m,onClick:b,onChange:x,onKeyDown:S,onKeyUp:C,onFocus:I,onBlur:w,placeholder:A,readOnly:E,required:k,type:B,value:G}=e,O=Te(e,v_),{getRootProps:T,getInputProps:N,focused:H,error:j,disabled:F}=yI({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:d,defaultValue:f,error:g,onBlur:w,onClick:b,onChange:x,onFocus:I,required:k!=null?k:r==null?void 0:r.required,value:G}),M={[t.disabled]:F,[t.error]:j,[t.focused]:H,[t.formControl]:!!r,[u]:u},V={[t.disabled]:F};return R({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:c,disabled:F,id:v,onKeyDown:S,onKeyUp:C,name:m,placeholder:A,readOnly:E,type:B},rootStateClasses:M,inputStateClasses:V,getRootProps:T,getInputProps:N,focused:H,error:j,disabled:F},O)}const Fc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,lo="data-skip-inverted-colors",_p=`& :not([${lo}], [${lo}] *)`,Pp=e=>{var t,n,r,i,o,a,s,c,u,f,d,h,g,v,m,b,x,S,C,I,w,A;const E=Fc(e.cssVarPrefix);return{"--variant-plainColor":"var(--variant-plainColor) !important","--variant-plainHoverColor":"var(--variant-plainHoverColor) !important","--variant-plainHoverBg":"var(--variant-plainHoverBg) !important","--variant-plainActiveBg":"var(--variant-plainActiveBg) !important","--variant-plainDisabledColor":"var(--variant-plainDisabledColor) !important","--variant-outlinedColor":"var(--variant-outlinedColor) !important","--variant-outlinedBorder":"var(--variant-outlinedBorder) !important","--variant-outlinedHoverColor":"var(--variant-outlinedHoverColor) !important","--variant-outlinedHoverBorder":"var(--variant-outlinedHoverBorder) !important","--variant-outlinedHoverBg":"var(--variant-outlinedHoverBg) !important","--variant-outlinedActiveBg":"var(--variant-outlinedActiveBg) !important","--variant-outlinedDisabledColor":"var(--variant-outlinedDisabledColor) !important","--variant-outlinedDisabledBorder":"var(--variant-outlinedDisabledBorder) !important","--variant-softColor":"var(--variant-softColor) !important","--variant-softHoverColor":"var(--variant-softHoverColor) !important","--variant-softBg":"var(--variant-softBg) !important","--variant-softHoverBg":"var(--variant-softHoverBg) !important","--variant-softActiveBg":"var(--variant-softActiveBg) !important","--variant-softActiveColor":"var(--variant-softActiveColor) !important","--variant-softDisabledColor":"var(--variant-softDisabledColor) !important","--variant-softDisabledBg":"var(--variant-softDisabledBg) !important","--variant-solidColor":"var(--variant-solidColor) !important","--variant-solidBg":"var(--variant-solidBg) !important","--variant-solidHoverBg":"var(--variant-solidHoverBg) !important","--variant-solidActiveBg":"var(--variant-solidActiveBg) !important","--variant-solidDisabledColor":"var(--variant-solidDisabledColor) !important","--variant-solidDisabledBg":"var(--variant-solidDisabledBg) !important","--Badge-ringColor":"var(--Badge-ringColor) !important",colorScheme:"unset",[e.getColorSchemeSelector("light")]:{[E("--palette-focusVisible")]:`${(t=e.colorSchemes.light)==null?void 0:t.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(n=e.colorSchemes.light)==null?void 0:n.palette.background.body} !important`,[E("--palette-background-surface")]:`${(r=e.colorSchemes.light)==null?void 0:r.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(i=e.colorSchemes.light)==null?void 0:i.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(o=e.colorSchemes.light)==null?void 0:o.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(a=e.colorSchemes.light)==null?void 0:a.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(c=e.colorSchemes.light)==null?void 0:c.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(u=e.colorSchemes.light)==null?void 0:u.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(h=e.colorSchemes.dark)==null?void 0:h.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.body} !important`,[E("--palette-background-surface")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(x=e.colorSchemes.dark)==null?void 0:x.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(C=e.colorSchemes.dark)==null?void 0:C.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(I=e.colorSchemes.dark)==null?void 0:I.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function y_(e){return e.theme!==void 0}const x_=e=>t=>{const n=y_(t)?t.theme:t,r=ac(n.cssVarPrefix),i=Fc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[_p]:{"--Badge-ringColor":o(`palette-${e}-solidBg`),"--Icon-color":"currentColor",[`${n.getColorSchemeSelector("light")}, ${n.getColorSchemeSelector("dark")}`]:{colorScheme:"dark",[i("--palette-focusVisible")]:o(`palette-${e}-200`),[i("--palette-background-body")]:"rgba(0 0 0 / 0.1)",[i("--palette-background-surface")]:"rgba(0 0 0 / 0.06)",[i("--palette-background-popup")]:o(`palette-${e}-700`),[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.36)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.6)`,[i("--palette-text-primary")]:o("palette-common-white"),[i("--palette-text-secondary")]:o(`palette-${e}-200`),[i("--palette-text-tertiary")]:o(`palette-${e}-300`),[i("--palette-text-icon")]:o(`palette-${e}-200`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainColor":o(`palette-${e}-50`),"--variant-plainHoverColor":"#fff","--variant-plainHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedColor":o(`palette-${e}-50`),"--variant-outlinedBorder":`rgba(${o(`palette-${e}-lightChannel`)} / 0.5)`,"--variant-outlinedHoverColor":"#fff","--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":"rgba(255 255 255 / 0.2)","--variant-softColor":o("palette-common-white"),"--variant-softHoverColor":o("palette-common-white"),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.24)`,"--variant-softHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.36)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.16)`,"--variant-softActiveColor":"#fff","--variant-softDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`,"--variant-solidColor":o(`palette-${e}-${e==="neutral"?"600":"500"}`),"--variant-solidBg":o("palette-common-white"),"--variant-solidHoverBg":o("palette-common-white"),"--variant-solidActiveBg":o(`palette-${e}-100`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`}},[`&, & [${lo}]`]:Pp(n)}},C_=e=>t=>{const{theme:n=t}=t,r=ac(n.cssVarPrefix),i=Fc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[_p]:{"--Badge-ringColor":o(`palette-${e}-softBg`),"--Icon-color":"currentColor",[n.getColorSchemeSelector("dark")]:{[i("--palette-focusVisible")]:o(`palette-${e}-300`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,[i("--palette-text-primary")]:o(`palette-${e}-100`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-text-icon")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.2)`,"--variant-plainColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-plainHoverColor":o(`palette-${e}-50`),"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-outlinedHoverColor":o(`palette-${e}-50`),"--variant-outlinedBg":"initial","--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverBorder":o(`palette-${e}-600`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,"--variant-softColor":o(`palette-${e}-200`),"--variant-softBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-softHoverColor":"#fff","--variant-softHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-solidColor":"#fff","--variant-solidBg":o(`palette-${e}-500`),"--variant-solidHoverColor":"#fff","--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`},[n.getColorSchemeSelector("light")]:{[i("--palette-focusVisible")]:o(`palette-${e}-500`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,[i("--palette-text-primary")]:o(`palette-${e}-700`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.68)`,[i("--palette-text-icon")]:o(`palette-${e}-500`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainColor":`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,"--variant-plainHoverColor":`rgba(${o(`palette-${e}-darkChannel`)} / 1)`,"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-mainChannel`)} / 1)`,"--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverColor":o(`palette-${e}-600`),"--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-softColor":o(`palette-${e}-600`),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.8)`,"--variant-softHoverColor":o(`palette-${e}-700`),"--variant-softHoverBg":o(`palette-${e}-200`),"--variant-softActiveBg":o(`palette-${e}-300`),"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,"--variant-solidColor":o("palette-common-white"),"--variant-solidBg":o(`palette-${e}-${e==="neutral"?"700":"500"}`),"--variant-solidHoverColor":o("palette-common-white"),"--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`}},[`&, & [${lo}]`]:Pp(n)}},w_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],S_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${xe(r)}`,i&&`color${xe(i)}`,o&&`size${xe(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return ht(a,m_,{})},I_=ye("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;const c=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[R({"--Input-radius":e.vars.radius.sm,"--Input-gap":"0.5rem","--Input-placeholderColor":"inherit","--Input-placeholderOpacity":.64,"--Input-decoratorColor":e.vars.palette.text.icon,"--Input-focused":"0","--Input-focusedThickness":e.vars.focus.thickness,"--Input-focusedHighlight":(r=e.vars.palette[t.color==="neutral"?"primary":t.color])==null?void 0:r[500],[`&:not([${lo}])`]:R({},t.instanceColor&&{"--_Input-focusedHighlight":(i=e.vars.palette[t.instanceColor==="neutral"?"primary":t.instanceColor])==null?void 0:i[500]},{"--Input-focusedHighlight":`var(--_Input-focusedHighlight, ${e.vars.palette.focusVisible})`})},t.size==="sm"&&{"--Input-minHeight":"2rem","--Input-paddingInline":"0.5rem","--Input-decoratorChildHeight":"min(1.5rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},t.size==="md"&&{"--Input-minHeight":"2.25rem","--Input-paddingInline":"0.75rem","--Input-decoratorChildHeight":"min(1.75rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},t.size==="lg"&&{"--Input-minHeight":"2.75rem","--Input-paddingInline":"1rem","--Input-gap":"0.75rem","--Input-decoratorChildHeight":"min(2.25rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Input-decoratorChildOffset":"min(calc(var(--Input-paddingInline) - (var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2), var(--Input-paddingInline))","--_Input-paddingBlock":"max((var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2, 0px)","--Input-decoratorChildRadius":"max(var(--Input-radius) - var(--variant-borderWidth, 0px) - var(--_Input-paddingBlock), min(var(--_Input-paddingBlock) + var(--variant-borderWidth, 0px), var(--Input-radius) / 2))","--Button-minHeight":"var(--Input-decoratorChildHeight)","--Button-paddingBlock":"0px","--IconButton-size":"var(--Input-decoratorChildHeight)","--Button-radius":"var(--Input-decoratorChildRadius)","--IconButton-radius":"var(--Input-decoratorChildRadius)",boxSizing:"border-box"},t.variant!=="plain"&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Input-minHeight)"},t.fullWidth&&{width:"100%"},{cursor:"text",position:"relative",display:"flex",paddingInline:"var(--Input-paddingInline)",borderRadius:"var(--Input-radius)"},e.typography[`body-${t.size}`],c,{backgroundColor:(o=c==null?void 0:c.backgroundColor)!=null?o:e.vars.palette.background.surface,"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Input-focusedInset, inset) 0 0 0 calc(var(--Input-focused) * var(--Input-focusedThickness)) var(--Input-focusedHighlight)"}}),{"&:hover":R({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${kp.disabled}`]:(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),A_=ye("input")(({ownerState:e})=>({border:"none",minWidth:0,outline:0,padding:0,flex:1,color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit",textOverflow:"ellipsis","&:-webkit-autofill":R({paddingInline:"var(--Input-paddingInline)"},!e.startDecorator&&{marginInlineStart:"calc(-1 * var(--Input-paddingInline))",paddingInlineStart:"var(--Input-paddingInline)",borderTopLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"},!e.endDecorator&&{marginInlineEnd:"calc(-1 * var(--Input-paddingInline))",paddingInlineEnd:"var(--Input-paddingInline)",borderTopRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"}),"&::-webkit-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"}})),T_=ye("div")({"--Button-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Input-paddingInline) / -4)",display:"inherit",alignItems:"center",paddingBlock:"var(--unstable_InputPaddingBlock)",flexWrap:"wrap",marginInlineEnd:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),E_=ye("div")({"--Button-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Input-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",marginInlineStart:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),k_=ye(I_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),__=ye(A_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),P_=ye(T_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),D_=ye(E_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Xa=K.forwardRef(function(t,n){var r,i,o,a,s,c;const u=pt({props:t,name:"JoyInput"}),f=b_(R({},u,{disabledInProp:t.disabled}),kp),{propsToForward:d,rootStateClasses:h,inputStateClasses:g,getRootProps:v,getInputProps:m,formControl:b,focused:x,error:S=!1,disabled:C,fullWidth:I=!1,size:w="md",color:A="neutral",variant:E="outlined",startDecorator:k,endDecorator:B,component:G,slots:O={},slotProps:T={}}=f,N=Te(f,w_),H=(r=(i=t.error)!=null?i:b==null?void 0:b.error)!=null?r:S,j=(o=(a=t.size)!=null?a:b==null?void 0:b.size)!=null?o:w,F=(s=t.color)!=null?s:H?"danger":(c=b==null?void 0:b.color)!=null?c:A,M=R({instanceColor:H?"danger":t.color},u,{fullWidth:I,color:F,disabled:C,error:H,focused:x,size:j,variant:E}),V=S_(M),Y=R({},N,{component:G,slots:O,slotProps:T}),[Z,D]=Ae("root",{ref:n,className:[V.root,h],elementType:k_,getSlotProps:v,externalForwardedProps:Y,ownerState:M}),[L,U]=Ae("input",R({},b&&{additionalProps:{id:b.htmlFor,"aria-describedby":b["aria-describedby"]}},{className:[V.input,g],elementType:__,getSlotProps:m,internalForwardedProps:d,externalForwardedProps:Y,ownerState:M})),[W,ie]=Ae("startDecorator",{className:V.startDecorator,elementType:P_,externalForwardedProps:Y,ownerState:M}),[le,ae]=Ae("endDecorator",{className:V.endDecorator,elementType:D_,externalForwardedProps:Y,ownerState:M});return l.jsxs(Z,R({},D,{children:[k&&l.jsx(W,R({},ie,{children:k})),l.jsx(L,R({},U)),B&&l.jsx(le,R({},ae,{children:B}))]}))}),on=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,endDecorator:s=void 0,onChange:c})=>l.jsxs(p.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{required:i,color:"primary",children:e}),l.jsx(Xa,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,endDecorator:s,onChange:c,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Dp=Be(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function O_(e){return lt("MuiCircularProgress",e)}We("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let R_=e=>e,Op;const M_=["color","backgroundColor"],L_=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],B_=ge.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),$_=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${xe(n)}`,r&&`variant${xe(r)}`,i&&`size${xe(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return ht(o,O_,{})};function ii(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const F_=ye("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i,o;const a=((n=t.variants[e.variant])==null?void 0:n[e.color])||{},{color:s,backgroundColor:c}=a,u=Te(a,M_);return R({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":c,"--CircularProgress-progressColor":s,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":ii("track","3px"),"--_progress-thickness":ii("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":ii("track","6px"),"--_progress-thickness":ii("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":ii("track","8px"),"--_progress-thickness":ii("progress","8px"),"--_root-size":"var(--CircularProgress-size, 64px)"},e.instanceSize==="lg"&&{"--CircularProgress-size":"64px"},e.thickness&&{"--_track-thickness":`${e.thickness}px`,"--_progress-thickness":`${e.thickness}px`},{"--_thickness-diff":"calc(var(--_track-thickness) - var(--_progress-thickness))","--_inner-size":"calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))","--_outlined-inset":"max(var(--_track-thickness), var(--_progress-thickness))",width:"var(--_root-size)",height:"var(--_root-size)",borderRadius:"var(--_root-size)",margin:"var(--CircularProgress-margin)",boxSizing:"border-box",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,position:"relative",color:s},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},u,e.variant==="outlined"&&{"&::before":R({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},u)},e.variant==="soft"&&{"--CircularProgress-trackColor":t.variants.soft.neutral.backgroundColor,"--CircularProgress-progressColor":(r=t.variants.solid)==null?void 0:r[e.color].backgroundColor},e.variant==="solid"&&{"--CircularProgress-trackColor":(i=t.variants.softHover)==null?void 0:i[e.color].backgroundColor,"--CircularProgress-progressColor":(o=t.variants.solid)==null?void 0:o[e.color].backgroundColor})}),N_=ye("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),z_=ye("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),j_=ye("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&ge.css(Op||(Op=R_`
2346
+ export default theme;`}function Mc(e={},...t){const g=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:s={},shape:c}=g,u=Qe(g,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(Ar(20));const f=Rc(o),d=dp(e);let h=Gt(d,{mixins:Dk(d.breakpoints,r),palette:f,shadows:$k.slice(),typography:Rk(f,s),transitions:jk(a),zIndex:B({},Uk)});return h=Gt(h,u),h=t.reduce((v,m)=>Gt(v,m),h),h.unstable_sxConfig=B(B({},Wa),u==null?void 0:u.unstable_sxConfig),h.unstable_sx=function(m){return Jr({sx:m,theme:this})},h.toRuntimeSource=Ip,h}function Hk(e){let t;return e<1?t=5.11916*Ii(e,2):t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Wk=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Hk(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ap(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Tp(e){return e==="dark"?Wk:[]}function Gk(e){const a=e,{palette:t={mode:"light"},opacity:n,overlays:r}=a,i=Qe(a,["palette","opacity","overlays"]),o=Rc(t);return B({palette:o,opacity:B(B({},Ap(o.mode)),n),overlays:r||Tp(o.mode)},i)}function Yk(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Kk=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Qk=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if(i==="class"&&(o=".%s"),i==="data"&&(o="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return Kk(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:o?{[o.replace("%s",t)]:a,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:B(B({},n),a)}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function qk(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function re(e,t,n){!e[t]&&n&&(e[t]=n)}function so(e){return typeof e!="string"||!e.startsWith("hsl")?e:pp(e)}function Vn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=io(so(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
2347
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Jk(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Cn=e=>{try{return e()}catch(t){}},Xk=(e="mui")=>vk(e);function Lc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Gk(q(B({},t),{palette:B({mode:i},t==null?void 0:t.palette)}));return}const s=Mc(q(B({},n),{palette:B({mode:i},t==null?void 0:t.palette)})),{palette:o}=s,a=Qe(s,["palette"]);return e[r]=q(B({},t),{palette:o,opacity:B(B({},Ap(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||Tp(i)}),a}function Zk(e={},...t){const $=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Yk,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:c=":root"}=$,u=Qe($,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),f=Object.keys(n)[0],d=r||(n.light&&f!=="light"?"light":f),h=Xk(o),G=n,{[d]:g,light:v,dark:m}=G,b=Qe(G,[Hs(d),"light","dark"]),x=B({},b);let S=g;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(S=!0),!S)throw new Error(Ar(21,d));const C=Lc(x,S,u,d);v&&!x.light&&Lc(x,v,void 0,"light"),m&&!x.dark&&Lc(x,m,void 0,"dark");let I=q(B({defaultColorScheme:d},C),{cssVarPrefix:o,colorSchemeSelector:s,rootSelector:c,getCssVar:h,colorSchemes:x,font:B(B({},Pk(C.typography)),C.font),spacing:Jk(u.spacing)});Object.keys(I.colorSchemes).forEach(O=>{const T=I.colorSchemes[O].palette,N=H=>{const j=H.split("-"),F=j[1],M=j[2];return h(H,T[F][M])};if(T.mode==="light"&&(re(T.common,"background","#fff"),re(T.common,"onBackground","#000")),T.mode==="dark"&&(re(T.common,"background","#000"),re(T.common,"onBackground","#fff")),qk(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){re(T.Alert,"errorColor",Ue(T.error.light,.6)),re(T.Alert,"infoColor",Ue(T.info.light,.6)),re(T.Alert,"successColor",Ue(T.success.light,.6)),re(T.Alert,"warningColor",Ue(T.warning.light,.6)),re(T.Alert,"errorFilledBg",N("palette-error-main")),re(T.Alert,"infoFilledBg",N("palette-info-main")),re(T.Alert,"successFilledBg",N("palette-success-main")),re(T.Alert,"warningFilledBg",N("palette-warning-main")),re(T.Alert,"errorFilledColor",Cn(()=>T.getContrastText(T.error.main))),re(T.Alert,"infoFilledColor",Cn(()=>T.getContrastText(T.info.main))),re(T.Alert,"successFilledColor",Cn(()=>T.getContrastText(T.success.main))),re(T.Alert,"warningFilledColor",Cn(()=>T.getContrastText(T.warning.main))),re(T.Alert,"errorStandardBg",Ve(T.error.light,.9)),re(T.Alert,"infoStandardBg",Ve(T.info.light,.9)),re(T.Alert,"successStandardBg",Ve(T.success.light,.9)),re(T.Alert,"warningStandardBg",Ve(T.warning.light,.9)),re(T.Alert,"errorIconColor",N("palette-error-main")),re(T.Alert,"infoIconColor",N("palette-info-main")),re(T.Alert,"successIconColor",N("palette-success-main")),re(T.Alert,"warningIconColor",N("palette-warning-main")),re(T.AppBar,"defaultBg",N("palette-grey-100")),re(T.Avatar,"defaultBg",N("palette-grey-400")),re(T.Button,"inheritContainedBg",N("palette-grey-300")),re(T.Button,"inheritContainedHoverBg",N("palette-grey-A100")),re(T.Chip,"defaultBorder",N("palette-grey-400")),re(T.Chip,"defaultAvatarColor",N("palette-grey-700")),re(T.Chip,"defaultIconColor",N("palette-grey-700")),re(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),re(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),re(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),re(T.LinearProgress,"primaryBg",Ve(T.primary.main,.62)),re(T.LinearProgress,"secondaryBg",Ve(T.secondary.main,.62)),re(T.LinearProgress,"errorBg",Ve(T.error.main,.62)),re(T.LinearProgress,"infoBg",Ve(T.info.main,.62)),re(T.LinearProgress,"successBg",Ve(T.success.main,.62)),re(T.LinearProgress,"warningBg",Ve(T.warning.main,.62)),re(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.11)`),re(T.Slider,"primaryTrack",Ve(T.primary.main,.62)),re(T.Slider,"secondaryTrack",Ve(T.secondary.main,.62)),re(T.Slider,"errorTrack",Ve(T.error.main,.62)),re(T.Slider,"infoTrack",Ve(T.info.main,.62)),re(T.Slider,"successTrack",Ve(T.success.main,.62)),re(T.Slider,"warningTrack",Ve(T.warning.main,.62));const H=qa(T.background.default,.8);re(T.SnackbarContent,"bg",H),re(T.SnackbarContent,"color",Cn(()=>T.getContrastText(H))),re(T.SpeedDialAction,"fabHoverBg",qa(T.background.paper,.15)),re(T.StepConnector,"border",N("palette-grey-400")),re(T.StepContent,"border",N("palette-grey-400")),re(T.Switch,"defaultColor",N("palette-common-white")),re(T.Switch,"defaultDisabledColor",N("palette-grey-100")),re(T.Switch,"primaryDisabledColor",Ve(T.primary.main,.62)),re(T.Switch,"secondaryDisabledColor",Ve(T.secondary.main,.62)),re(T.Switch,"errorDisabledColor",Ve(T.error.main,.62)),re(T.Switch,"infoDisabledColor",Ve(T.info.main,.62)),re(T.Switch,"successDisabledColor",Ve(T.success.main,.62)),re(T.Switch,"warningDisabledColor",Ve(T.warning.main,.62)),re(T.TableCell,"border",Ve(Qa(T.divider,1),.88)),re(T.Tooltip,"bg",Qa(T.grey[700],.92))}if(T.mode==="dark"){re(T.Alert,"errorColor",Ve(T.error.light,.6)),re(T.Alert,"infoColor",Ve(T.info.light,.6)),re(T.Alert,"successColor",Ve(T.success.light,.6)),re(T.Alert,"warningColor",Ve(T.warning.light,.6)),re(T.Alert,"errorFilledBg",N("palette-error-dark")),re(T.Alert,"infoFilledBg",N("palette-info-dark")),re(T.Alert,"successFilledBg",N("palette-success-dark")),re(T.Alert,"warningFilledBg",N("palette-warning-dark")),re(T.Alert,"errorFilledColor",Cn(()=>T.getContrastText(T.error.dark))),re(T.Alert,"infoFilledColor",Cn(()=>T.getContrastText(T.info.dark))),re(T.Alert,"successFilledColor",Cn(()=>T.getContrastText(T.success.dark))),re(T.Alert,"warningFilledColor",Cn(()=>T.getContrastText(T.warning.dark))),re(T.Alert,"errorStandardBg",Ue(T.error.light,.9)),re(T.Alert,"infoStandardBg",Ue(T.info.light,.9)),re(T.Alert,"successStandardBg",Ue(T.success.light,.9)),re(T.Alert,"warningStandardBg",Ue(T.warning.light,.9)),re(T.Alert,"errorIconColor",N("palette-error-main")),re(T.Alert,"infoIconColor",N("palette-info-main")),re(T.Alert,"successIconColor",N("palette-success-main")),re(T.Alert,"warningIconColor",N("palette-warning-main")),re(T.AppBar,"defaultBg",N("palette-grey-900")),re(T.AppBar,"darkBg",N("palette-background-paper")),re(T.AppBar,"darkColor",N("palette-text-primary")),re(T.Avatar,"defaultBg",N("palette-grey-600")),re(T.Button,"inheritContainedBg",N("palette-grey-800")),re(T.Button,"inheritContainedHoverBg",N("palette-grey-700")),re(T.Chip,"defaultBorder",N("palette-grey-700")),re(T.Chip,"defaultAvatarColor",N("palette-grey-300")),re(T.Chip,"defaultIconColor",N("palette-grey-300")),re(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),re(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),re(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),re(T.LinearProgress,"primaryBg",Ue(T.primary.main,.5)),re(T.LinearProgress,"secondaryBg",Ue(T.secondary.main,.5)),re(T.LinearProgress,"errorBg",Ue(T.error.main,.5)),re(T.LinearProgress,"infoBg",Ue(T.info.main,.5)),re(T.LinearProgress,"successBg",Ue(T.success.main,.5)),re(T.LinearProgress,"warningBg",Ue(T.warning.main,.5)),re(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.13)`),re(T.Slider,"primaryTrack",Ue(T.primary.main,.5)),re(T.Slider,"secondaryTrack",Ue(T.secondary.main,.5)),re(T.Slider,"errorTrack",Ue(T.error.main,.5)),re(T.Slider,"infoTrack",Ue(T.info.main,.5)),re(T.Slider,"successTrack",Ue(T.success.main,.5)),re(T.Slider,"warningTrack",Ue(T.warning.main,.5));const H=qa(T.background.default,.98);re(T.SnackbarContent,"bg",H),re(T.SnackbarContent,"color",Cn(()=>T.getContrastText(H))),re(T.SpeedDialAction,"fabHoverBg",qa(T.background.paper,.15)),re(T.StepConnector,"border",N("palette-grey-600")),re(T.StepContent,"border",N("palette-grey-600")),re(T.Switch,"defaultColor",N("palette-grey-300")),re(T.Switch,"defaultDisabledColor",N("palette-grey-600")),re(T.Switch,"primaryDisabledColor",Ue(T.primary.main,.55)),re(T.Switch,"secondaryDisabledColor",Ue(T.secondary.main,.55)),re(T.Switch,"errorDisabledColor",Ue(T.error.main,.55)),re(T.Switch,"infoDisabledColor",Ue(T.info.main,.55)),re(T.Switch,"successDisabledColor",Ue(T.success.main,.55)),re(T.Switch,"warningDisabledColor",Ue(T.warning.main,.55)),re(T.TableCell,"border",Ue(Qa(T.divider,1),.68)),re(T.Tooltip,"bg",Qa(T.grey[700],.92))}Vn(T.background,"default"),Vn(T.background,"paper"),Vn(T.common,"background"),Vn(T.common,"onBackground"),Vn(T,"divider"),Object.keys(T).forEach(H=>{const j=T[H];H!=="tonalOffset"&&j&&typeof j=="object"&&(j.main&&re(T[H],"mainChannel",io(so(j.main))),j.light&&re(T[H],"lightChannel",io(so(j.light))),j.dark&&re(T[H],"darkChannel",io(so(j.dark))),j.contrastText&&re(T[H],"contrastTextChannel",io(so(j.contrastText))),H==="text"&&(Vn(T[H],"primary"),Vn(T[H],"secondary")),H==="action"&&(j.active&&Vn(T[H],"active"),j.selected&&Vn(T[H],"selected")))})}),I=t.reduce((O,T)=>Gt(O,T),I);const w={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:Qk(I)},{vars:A,generateThemeVars:E,generateStyleSheets:k}=xk(I,w);return I.vars=A,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([O,T])=>{I[O]=T}),I.generateThemeVars=E,I.generateStyleSheets=k,I.generateSpacing=function(){return up(u.spacing,Ic(this))},I.getColorSchemeSelector=Ck(s),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=a,I.unstable_sxConfig=B(B({},Wa),u==null?void 0:u.unstable_sxConfig),I.unstable_sx=function(T){return Jr({sx:T,theme:this})},I.toRuntimeSource=Ip,I}function Ep(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=q(B({},n!==!0&&n),{palette:Rc(q(B({},n===!0?{}:n.palette),{mode:t}))}))}function e_(e={},...t){const f=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=f,a=Qe(f,["palette","cssVariables","colorSchemes","defaultColorScheme"]),s=o||"light",c=i==null?void 0:i[s],u=B(B({},i),n?{[s]:q(B({},typeof c!="boolean"&&c),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Mc(e,...t);let d=n;"palette"in e||u[s]&&(u[s]!==!0?d=u[s].palette:s==="dark"&&(d={mode:"dark"}));const h=Mc(q(B({},e),{palette:d}),...t);return h.defaultColorScheme=s,h.colorSchemes=u,h.palette.mode==="light"&&(h.colorSchemes.light=q(B({},u.light!==!0&&u.light),{palette:h.palette}),Ep(h,"dark",u.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=q(B({},u.dark!==!0&&u.dark),{palette:h.palette}),Ep(h,"light",u.light)),h}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),Zk(B(q(B({},a),{colorSchemes:u,defaultColorScheme:s}),typeof r!="boolean"&&r),...t)}const t_=e_(),n_="$$material";function r_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const i_=rk({themeId:n_,defaultTheme:t_,rootShouldForwardProp:e=>r_(e)&&e!=="classes"}),o_=mk;function a_(e){return gk(e)}function s_(e){return ep("MuiSvgIcon",e)}GT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const l_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Qr(t)}`,`fontSize${Qr(n)}`]};return VT(i,s_,r)},c_=i_("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Qr(n.color)}`],t[`fontSize${Qr(n.fontSize)}`]]}})(o_(({theme:e})=>{var t,n,r,i,o,a,s,c,u,f,d,h,g,v,m,b,x,S;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(i=(r=((n=e.vars)!=null?n:e).transitions)==null?void 0:r.duration)==null?void 0:i.shorter}),variants:[{props:C=>!C.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:d.call(f,35))||"2.1875rem"}},...Object.entries(((h=e.vars)!=null?h:e).palette).filter(([,C])=>C&&C.main).map(([C])=>{var I,w,A;return{props:{color:C},style:{color:(A=(w=((I=e.vars)!=null?I:e).palette)==null?void 0:w[C])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(m=(v=((g=e.vars)!=null?g:e).palette)==null?void 0:v.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(S=(x=((b=e.vars)!=null?b:e).palette)==null?void 0:x.action)==null?void 0:S.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Bc=K.forwardRef(function(t,n){const r=a_({props:t,name:"MuiSvgIcon"}),S=r,{children:i,className:o,color:a="inherit",component:s="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:h="0 0 24 24"}=S,g=Qe(S,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),v=K.isValidElement(i)&&i.type==="svg",m=q(B({},r),{color:a,component:s,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:h,hasSvgAsChild:v}),b={};f||(b.viewBox=h);const x=l_(m);return l.jsxs(c_,q(B(B(B({as:s,className:$n(x.root,o),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},b),g),v&&i.props),{ownerState:m,children:[v?i.props.children:i,d?l.jsx("title",{children:d}):null]}))});Bc.muiName="SvgIcon";function Be(e,t){function n(r,i){return l.jsx(Bc,q(B({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=Bc.muiName,K.memo(K.forwardRef(n))}const $c=Be(l.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),u_=Be(l.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8m-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12m3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8m5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8m3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"ColorLens"),d_=Be(l.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function f_(e){return lt("MuiTabPanel",e)}We("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const h_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],p_=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${xe(n)}`,o,r&&`variant${xe(r)}`,i&&`color${xe(i)}`,n&&`size${xe(n)}`]};return ht(a,f_,{})},g_=ye("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return R({display:t.hidden?"none":"block",padding:"var(--Tabs-spacing)",flexGrow:1,fontFamily:e.vars.fontFamily.body},e.typography[`body-${t.size}`],(n=e.variants[t.variant])==null?void 0:n[t.color])}),ri=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyTabPanel"}),{orientation:i}=Sa()||{orientation:"horizontal"},o=K.useContext(yc),{children:a,value:s=0,component:c,color:u="neutral",variant:f="plain",size:d,slots:h={},slotProps:g={},keepMounted:v=!1}=r,m=Te(r,h_),{hidden:b,getRootProps:x}=iA(R({},r,{value:s})),S=d!=null?d:o,C=R({},r,{orientation:i,hidden:b,size:S,color:u,variant:f}),I=p_(C),w=R({},m,{component:c,slots:h,slotProps:g}),[A,E]=Ae("root",{ref:n,elementType:g_,getSlotProps:x,externalForwardedProps:w,additionalProps:{role:"tabpanel",ref:n,as:c},ownerState:C,className:I.root});return v?l.jsx(A,R({},E,{children:a})):l.jsx(A,R({},E,{children:!b&&a}))});function m_(e){return lt("MuiInput",e)}const kp=We("MuiInput",["root","input","formControl","focused","disabled","error","adornedStart","adornedEnd","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid","fullWidth","startDecorator","endDecorator"]),Ja=K.createContext(void 0),v_=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","disabledInProp","error","id","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","type","value"];function b_(e,t){var n;const r=K.useContext(Ja),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:c,className:u,defaultValue:f,disabled:d,disabledInProp:h,error:g,id:v,name:m,onClick:b,onChange:x,onKeyDown:S,onKeyUp:C,onFocus:I,onBlur:w,placeholder:A,readOnly:E,required:k,type:$,value:G}=e,O=Te(e,v_),{getRootProps:T,getInputProps:N,focused:H,error:j,disabled:F}=yI({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:d,defaultValue:f,error:g,onBlur:w,onClick:b,onChange:x,onFocus:I,required:k!=null?k:r==null?void 0:r.required,value:G}),M={[t.disabled]:F,[t.error]:j,[t.focused]:H,[t.formControl]:!!r,[u]:u},V={[t.disabled]:F};return R({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:c,disabled:F,id:v,onKeyDown:S,onKeyUp:C,name:m,placeholder:A,readOnly:E,type:$},rootStateClasses:M,inputStateClasses:V,getRootProps:T,getInputProps:N,focused:H,error:j,disabled:F},O)}const Fc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,lo="data-skip-inverted-colors",_p=`& :not([${lo}], [${lo}] *)`,Pp=e=>{var t,n,r,i,o,a,s,c,u,f,d,h,g,v,m,b,x,S,C,I,w,A;const E=Fc(e.cssVarPrefix);return{"--variant-plainColor":"var(--variant-plainColor) !important","--variant-plainHoverColor":"var(--variant-plainHoverColor) !important","--variant-plainHoverBg":"var(--variant-plainHoverBg) !important","--variant-plainActiveBg":"var(--variant-plainActiveBg) !important","--variant-plainDisabledColor":"var(--variant-plainDisabledColor) !important","--variant-outlinedColor":"var(--variant-outlinedColor) !important","--variant-outlinedBorder":"var(--variant-outlinedBorder) !important","--variant-outlinedHoverColor":"var(--variant-outlinedHoverColor) !important","--variant-outlinedHoverBorder":"var(--variant-outlinedHoverBorder) !important","--variant-outlinedHoverBg":"var(--variant-outlinedHoverBg) !important","--variant-outlinedActiveBg":"var(--variant-outlinedActiveBg) !important","--variant-outlinedDisabledColor":"var(--variant-outlinedDisabledColor) !important","--variant-outlinedDisabledBorder":"var(--variant-outlinedDisabledBorder) !important","--variant-softColor":"var(--variant-softColor) !important","--variant-softHoverColor":"var(--variant-softHoverColor) !important","--variant-softBg":"var(--variant-softBg) !important","--variant-softHoverBg":"var(--variant-softHoverBg) !important","--variant-softActiveBg":"var(--variant-softActiveBg) !important","--variant-softActiveColor":"var(--variant-softActiveColor) !important","--variant-softDisabledColor":"var(--variant-softDisabledColor) !important","--variant-softDisabledBg":"var(--variant-softDisabledBg) !important","--variant-solidColor":"var(--variant-solidColor) !important","--variant-solidBg":"var(--variant-solidBg) !important","--variant-solidHoverBg":"var(--variant-solidHoverBg) !important","--variant-solidActiveBg":"var(--variant-solidActiveBg) !important","--variant-solidDisabledColor":"var(--variant-solidDisabledColor) !important","--variant-solidDisabledBg":"var(--variant-solidDisabledBg) !important","--Badge-ringColor":"var(--Badge-ringColor) !important",colorScheme:"unset",[e.getColorSchemeSelector("light")]:{[E("--palette-focusVisible")]:`${(t=e.colorSchemes.light)==null?void 0:t.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(n=e.colorSchemes.light)==null?void 0:n.palette.background.body} !important`,[E("--palette-background-surface")]:`${(r=e.colorSchemes.light)==null?void 0:r.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(i=e.colorSchemes.light)==null?void 0:i.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(o=e.colorSchemes.light)==null?void 0:o.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(a=e.colorSchemes.light)==null?void 0:a.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(c=e.colorSchemes.light)==null?void 0:c.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(u=e.colorSchemes.light)==null?void 0:u.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(h=e.colorSchemes.dark)==null?void 0:h.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.body} !important`,[E("--palette-background-surface")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(x=e.colorSchemes.dark)==null?void 0:x.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(C=e.colorSchemes.dark)==null?void 0:C.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(I=e.colorSchemes.dark)==null?void 0:I.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function y_(e){return e.theme!==void 0}const x_=e=>t=>{const n=y_(t)?t.theme:t,r=ac(n.cssVarPrefix),i=Fc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[_p]:{"--Badge-ringColor":o(`palette-${e}-solidBg`),"--Icon-color":"currentColor",[`${n.getColorSchemeSelector("light")}, ${n.getColorSchemeSelector("dark")}`]:{colorScheme:"dark",[i("--palette-focusVisible")]:o(`palette-${e}-200`),[i("--palette-background-body")]:"rgba(0 0 0 / 0.1)",[i("--palette-background-surface")]:"rgba(0 0 0 / 0.06)",[i("--palette-background-popup")]:o(`palette-${e}-700`),[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.36)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.6)`,[i("--palette-text-primary")]:o("palette-common-white"),[i("--palette-text-secondary")]:o(`palette-${e}-200`),[i("--palette-text-tertiary")]:o(`palette-${e}-300`),[i("--palette-text-icon")]:o(`palette-${e}-200`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainColor":o(`palette-${e}-50`),"--variant-plainHoverColor":"#fff","--variant-plainHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedColor":o(`palette-${e}-50`),"--variant-outlinedBorder":`rgba(${o(`palette-${e}-lightChannel`)} / 0.5)`,"--variant-outlinedHoverColor":"#fff","--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":"rgba(255 255 255 / 0.2)","--variant-softColor":o("palette-common-white"),"--variant-softHoverColor":o("palette-common-white"),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.24)`,"--variant-softHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.36)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.16)`,"--variant-softActiveColor":"#fff","--variant-softDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`,"--variant-solidColor":o(`palette-${e}-${e==="neutral"?"600":"500"}`),"--variant-solidBg":o("palette-common-white"),"--variant-solidHoverBg":o("palette-common-white"),"--variant-solidActiveBg":o(`palette-${e}-100`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`}},[`&, & [${lo}]`]:Pp(n)}},C_=e=>t=>{const{theme:n=t}=t,r=ac(n.cssVarPrefix),i=Fc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[_p]:{"--Badge-ringColor":o(`palette-${e}-softBg`),"--Icon-color":"currentColor",[n.getColorSchemeSelector("dark")]:{[i("--palette-focusVisible")]:o(`palette-${e}-300`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,[i("--palette-text-primary")]:o(`palette-${e}-100`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-text-icon")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.2)`,"--variant-plainColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-plainHoverColor":o(`palette-${e}-50`),"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-outlinedHoverColor":o(`palette-${e}-50`),"--variant-outlinedBg":"initial","--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverBorder":o(`palette-${e}-600`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,"--variant-softColor":o(`palette-${e}-200`),"--variant-softBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-softHoverColor":"#fff","--variant-softHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-solidColor":"#fff","--variant-solidBg":o(`palette-${e}-500`),"--variant-solidHoverColor":"#fff","--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`},[n.getColorSchemeSelector("light")]:{[i("--palette-focusVisible")]:o(`palette-${e}-500`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,[i("--palette-text-primary")]:o(`palette-${e}-700`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.68)`,[i("--palette-text-icon")]:o(`palette-${e}-500`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainColor":`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,"--variant-plainHoverColor":`rgba(${o(`palette-${e}-darkChannel`)} / 1)`,"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-mainChannel`)} / 1)`,"--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverColor":o(`palette-${e}-600`),"--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-softColor":o(`palette-${e}-600`),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.8)`,"--variant-softHoverColor":o(`palette-${e}-700`),"--variant-softHoverBg":o(`palette-${e}-200`),"--variant-softActiveBg":o(`palette-${e}-300`),"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,"--variant-solidColor":o("palette-common-white"),"--variant-solidBg":o(`palette-${e}-${e==="neutral"?"700":"500"}`),"--variant-solidHoverColor":o("palette-common-white"),"--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`}},[`&, & [${lo}]`]:Pp(n)}},w_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],S_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${xe(r)}`,i&&`color${xe(i)}`,o&&`size${xe(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return ht(a,m_,{})},I_=ye("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;const c=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[R({"--Input-radius":e.vars.radius.sm,"--Input-gap":"0.5rem","--Input-placeholderColor":"inherit","--Input-placeholderOpacity":.64,"--Input-decoratorColor":e.vars.palette.text.icon,"--Input-focused":"0","--Input-focusedThickness":e.vars.focus.thickness,"--Input-focusedHighlight":(r=e.vars.palette[t.color==="neutral"?"primary":t.color])==null?void 0:r[500],[`&:not([${lo}])`]:R({},t.instanceColor&&{"--_Input-focusedHighlight":(i=e.vars.palette[t.instanceColor==="neutral"?"primary":t.instanceColor])==null?void 0:i[500]},{"--Input-focusedHighlight":`var(--_Input-focusedHighlight, ${e.vars.palette.focusVisible})`})},t.size==="sm"&&{"--Input-minHeight":"2rem","--Input-paddingInline":"0.5rem","--Input-decoratorChildHeight":"min(1.5rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},t.size==="md"&&{"--Input-minHeight":"2.25rem","--Input-paddingInline":"0.75rem","--Input-decoratorChildHeight":"min(1.75rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},t.size==="lg"&&{"--Input-minHeight":"2.75rem","--Input-paddingInline":"1rem","--Input-gap":"0.75rem","--Input-decoratorChildHeight":"min(2.25rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Input-decoratorChildOffset":"min(calc(var(--Input-paddingInline) - (var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2), var(--Input-paddingInline))","--_Input-paddingBlock":"max((var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2, 0px)","--Input-decoratorChildRadius":"max(var(--Input-radius) - var(--variant-borderWidth, 0px) - var(--_Input-paddingBlock), min(var(--_Input-paddingBlock) + var(--variant-borderWidth, 0px), var(--Input-radius) / 2))","--Button-minHeight":"var(--Input-decoratorChildHeight)","--Button-paddingBlock":"0px","--IconButton-size":"var(--Input-decoratorChildHeight)","--Button-radius":"var(--Input-decoratorChildRadius)","--IconButton-radius":"var(--Input-decoratorChildRadius)",boxSizing:"border-box"},t.variant!=="plain"&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Input-minHeight)"},t.fullWidth&&{width:"100%"},{cursor:"text",position:"relative",display:"flex",paddingInline:"var(--Input-paddingInline)",borderRadius:"var(--Input-radius)"},e.typography[`body-${t.size}`],c,{backgroundColor:(o=c==null?void 0:c.backgroundColor)!=null?o:e.vars.palette.background.surface,"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Input-focusedInset, inset) 0 0 0 calc(var(--Input-focused) * var(--Input-focusedThickness)) var(--Input-focusedHighlight)"}}),{"&:hover":R({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${kp.disabled}`]:(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),A_=ye("input")(({ownerState:e})=>({border:"none",minWidth:0,outline:0,padding:0,flex:1,color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit",textOverflow:"ellipsis","&:-webkit-autofill":R({paddingInline:"var(--Input-paddingInline)"},!e.startDecorator&&{marginInlineStart:"calc(-1 * var(--Input-paddingInline))",paddingInlineStart:"var(--Input-paddingInline)",borderTopLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"},!e.endDecorator&&{marginInlineEnd:"calc(-1 * var(--Input-paddingInline))",paddingInlineEnd:"var(--Input-paddingInline)",borderTopRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"}),"&::-webkit-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"}})),T_=ye("div")({"--Button-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Input-paddingInline) / -4)",display:"inherit",alignItems:"center",paddingBlock:"var(--unstable_InputPaddingBlock)",flexWrap:"wrap",marginInlineEnd:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),E_=ye("div")({"--Button-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Input-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",marginInlineStart:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),k_=ye(I_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),__=ye(A_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),P_=ye(T_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),D_=ye(E_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Xa=K.forwardRef(function(t,n){var r,i,o,a,s,c;const u=pt({props:t,name:"JoyInput"}),f=b_(R({},u,{disabledInProp:t.disabled}),kp),{propsToForward:d,rootStateClasses:h,inputStateClasses:g,getRootProps:v,getInputProps:m,formControl:b,focused:x,error:S=!1,disabled:C,fullWidth:I=!1,size:w="md",color:A="neutral",variant:E="outlined",startDecorator:k,endDecorator:$,component:G,slots:O={},slotProps:T={}}=f,N=Te(f,w_),H=(r=(i=t.error)!=null?i:b==null?void 0:b.error)!=null?r:S,j=(o=(a=t.size)!=null?a:b==null?void 0:b.size)!=null?o:w,F=(s=t.color)!=null?s:H?"danger":(c=b==null?void 0:b.color)!=null?c:A,M=R({instanceColor:H?"danger":t.color},u,{fullWidth:I,color:F,disabled:C,error:H,focused:x,size:j,variant:E}),V=S_(M),Y=R({},N,{component:G,slots:O,slotProps:T}),[Z,D]=Ae("root",{ref:n,className:[V.root,h],elementType:k_,getSlotProps:v,externalForwardedProps:Y,ownerState:M}),[L,U]=Ae("input",R({},b&&{additionalProps:{id:b.htmlFor,"aria-describedby":b["aria-describedby"]}},{className:[V.input,g],elementType:__,getSlotProps:m,internalForwardedProps:d,externalForwardedProps:Y,ownerState:M})),[W,ie]=Ae("startDecorator",{className:V.startDecorator,elementType:P_,externalForwardedProps:Y,ownerState:M}),[le,ae]=Ae("endDecorator",{className:V.endDecorator,elementType:D_,externalForwardedProps:Y,ownerState:M});return l.jsxs(Z,R({},D,{children:[k&&l.jsx(W,R({},ie,{children:k})),l.jsx(L,R({},U)),$&&l.jsx(le,R({},ae,{children:$}))]}))}),on=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,endDecorator:s=void 0,onChange:c})=>l.jsxs(p.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{required:i,color:"primary",children:e}),l.jsx(Xa,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,endDecorator:s,onChange:c,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Dp=Be(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function O_(e){return lt("MuiCircularProgress",e)}We("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let R_=e=>e,Op;const M_=["color","backgroundColor"],L_=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],B_=ge.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),$_=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${xe(n)}`,r&&`variant${xe(r)}`,i&&`size${xe(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return ht(o,O_,{})};function ii(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const F_=ye("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i,o;const a=((n=t.variants[e.variant])==null?void 0:n[e.color])||{},{color:s,backgroundColor:c}=a,u=Te(a,M_);return R({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":c,"--CircularProgress-progressColor":s,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":ii("track","3px"),"--_progress-thickness":ii("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":ii("track","6px"),"--_progress-thickness":ii("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":ii("track","8px"),"--_progress-thickness":ii("progress","8px"),"--_root-size":"var(--CircularProgress-size, 64px)"},e.instanceSize==="lg"&&{"--CircularProgress-size":"64px"},e.thickness&&{"--_track-thickness":`${e.thickness}px`,"--_progress-thickness":`${e.thickness}px`},{"--_thickness-diff":"calc(var(--_track-thickness) - var(--_progress-thickness))","--_inner-size":"calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))","--_outlined-inset":"max(var(--_track-thickness), var(--_progress-thickness))",width:"var(--_root-size)",height:"var(--_root-size)",borderRadius:"var(--_root-size)",margin:"var(--CircularProgress-margin)",boxSizing:"border-box",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,position:"relative",color:s},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},u,e.variant==="outlined"&&{"&::before":R({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},u)},e.variant==="soft"&&{"--CircularProgress-trackColor":t.variants.soft.neutral.backgroundColor,"--CircularProgress-progressColor":(r=t.variants.solid)==null?void 0:r[e.color].backgroundColor},e.variant==="solid"&&{"--CircularProgress-trackColor":(i=t.variants.softHover)==null?void 0:i[e.color].backgroundColor,"--CircularProgress-progressColor":(o=t.variants.solid)==null?void 0:o[e.color].backgroundColor})}),N_=ye("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),z_=ye("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),j_=ye("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&ge.css(Op||(Op=R_`
2348
2348
  animation: var(--CircularProgress-circulation, 0.8s linear 0s infinite normal none running)
2349
2349
  ${0};
2350
- `),B_)),Rp=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:s="md",variant:c="soft",thickness:u,determinate:f=!1,value:d=f?0:25,component:h,slots:g={},slotProps:v={}}=r,m=Te(r,L_),b=R({},r,{color:a,size:s,variant:c,thickness:u,value:d,determinate:f,instanceSize:t.size}),x=$_(b),S=R({},m,{component:h,slots:g,slotProps:v}),[C,I]=Ae("root",{ref:n,className:$n(x.root,o),elementType:F_,externalForwardedProps:S,ownerState:b,additionalProps:R({role:"progressbar",style:{"--CircularProgress-percent":d}},d&&f&&{"aria-valuenow":Math.round(typeof d=="number"?d:Number(d||0))})}),[w,A]=Ae("svg",{className:x.svg,elementType:N_,externalForwardedProps:S,ownerState:b}),[E,k]=Ae("track",{className:x.track,elementType:z_,externalForwardedProps:S,ownerState:b}),[B,G]=Ae("progress",{className:x.progress,elementType:j_,externalForwardedProps:S,ownerState:b});return l.jsxs(C,R({},I,{children:[l.jsxs(w,R({},A,{children:[l.jsx(E,R({},k)),l.jsx(B,R({},G))]})),i]}))});function U_(e){return lt("MuiButton",e)}const Mp=We("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),Lp=K.createContext({}),Bp=K.createContext(void 0),V_=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],H_=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:s,loading:c}=e,u={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",s&&`variant${xe(s)}`,t&&`color${xe(t)}`,a&&`size${xe(a)}`,c&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},f=ht(u,U_,{});return r&&i&&(f.root+=` ${i}`),f},W_=ye("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),G_=ye("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),Y_=ye("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return R({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),K_=({theme:e,ownerState:t})=>{var n,r,i,o;return[R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.size==="sm"&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.25rem)",paddingInline:"0.75rem"},t.size==="md"&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.25rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.375rem)",paddingInline:"1rem"},t.size==="lg"&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 2.75rem)",fontSize:e.vars.fontSize.md,paddingBlock:"var(--Button-paddingBlock, 0.5rem)",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",userSelect:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:e.vars.lineHeight.md},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),R({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},'&:active, &[aria-pressed="true"]':(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],[`&.${Mp.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${Mp.loading}`]:{color:"transparent"}})]},q_=ye("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(K_),oi=K.forwardRef(function(t,n){var r;const i=pt({props:t,name:"JoyButton"}),{children:o,action:a,color:s="primary",variant:c="solid",size:u="md",fullWidth:f=!1,startDecorator:d,endDecorator:h,loading:g=!1,loadingPosition:v="center",loadingIndicator:m,disabled:b,component:x,slots:S={},slotProps:C={}}=i,I=Te(i,V_),w=K.useContext(Lp),A=K.useContext(Bp),E=t.variant||w.variant||c,k=t.size||w.size||u,B=t.color||w.color||s,G=(r=t.loading||t.disabled)!=null?r:w.disabled||g||b,O=K.useRef(null),T=cn(O,n),{focusVisible:N,setFocusVisible:H,getRootProps:j}=Yl(R({},i,{disabled:G,rootRef:T})),F=m!=null?m:l.jsx(Rp,{color:B,thickness:{sm:2,md:3,lg:4}[k]||3});K.useImperativeHandle(a,()=>({focusVisible:()=>{var J;H(!0),(J=O.current)==null||J.focus()}}),[H]);const M=R({},i,{color:B,fullWidth:f,variant:E,size:k,focusVisible:N,loading:g,loadingPosition:v,disabled:G}),V=H_(M),Y=J=>{var ce;let ve=i.onClick;if(typeof C.root=="function"?ve=C.root(M).onClick:C.root&&(ve=C.root.onClick),(ce=ve)==null||ce(J),A){var ze;(ze=A.onClick)==null||ze.call(A,J,i.value)}};let Z=i["aria-pressed"];typeof C.root=="function"?Z=C.root(M)["aria-pressed"]:C.root&&(Z=C.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?Z=A.value.indexOf(i.value)!==-1:Z=A.value===i.value);const D=R({},I,{component:x,slots:S,slotProps:C}),[L,U]=Ae("root",{ref:n,className:V.root,elementType:q_,externalForwardedProps:D,getSlotProps:j,ownerState:M,additionalProps:{onClick:Y,"aria-pressed":Z}}),[W,ie]=Ae("startDecorator",{className:V.startDecorator,elementType:W_,externalForwardedProps:D,ownerState:M}),[le,ae]=Ae("endDecorator",{className:V.endDecorator,elementType:G_,externalForwardedProps:D,ownerState:M}),[ee,ne]=Ae("loadingIndicatorCenter",{className:V.loadingIndicatorCenter,elementType:Y_,externalForwardedProps:D,ownerState:M});return l.jsxs(L,R({},U,{children:[(d||g&&v==="start")&&l.jsx(W,R({},ie,{children:g&&v==="start"?F:d})),o,g&&v==="center"&&l.jsx(ee,R({},ne,{children:F})),(h||g&&v==="end")&&l.jsx(le,R({},ae,{children:g&&v==="end"?F:h}))]}))});oi.muiName="Button";var $p={exports:{}};function Q_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Nc={exports:{}};const J_=Vu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Fp;function zc(){return Fp||(Fp=1,function(e,t){(function(n,r){e.exports=r()})($t,function(){var n=n||function(r,i){var o;if(typeof window!="undefined"&&window.crypto&&(o=window.crypto),typeof self!="undefined"&&self.crypto&&(o=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window!="undefined"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof $t!="undefined"&&$t.crypto&&(o=$t.crypto),!o&&typeof Q_=="function")try{o=J_}catch(S){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(S){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(S){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function S(){}return function(C){var I;return S.prototype=C,I=new S,S.prototype=null,I}}(),c={},u=c.lib={},f=u.Base=function(){return{extend:function(S){var C=s(this);return S&&C.mixIn(S),(!C.hasOwnProperty("init")||this.init===C.init)&&(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var C in S)S.hasOwnProperty(C)&&(this[C]=S[C]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=u.WordArray=f.extend({init:function(S,C){S=this.words=S||[],C!=i?this.sigBytes=C:this.sigBytes=S.length*4},toString:function(S){return(S||g).stringify(this)},concat:function(S){var C=this.words,I=S.words,w=this.sigBytes,A=S.sigBytes;if(this.clamp(),w%4)for(var E=0;E<A;E++){var k=I[E>>>2]>>>24-E%4*8&255;C[w+E>>>2]|=k<<24-(w+E)%4*8}else for(var B=0;B<A;B+=4)C[w+B>>>2]=I[B>>>2];return this.sigBytes+=A,this},clamp:function(){var S=this.words,C=this.sigBytes;S[C>>>2]&=4294967295<<32-C%4*8,S.length=r.ceil(C/4)},clone:function(){var S=f.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var C=[],I=0;I<S;I+=4)C.push(a());return new d.init(C,S)}}),h=c.enc={},g=h.Hex={stringify:function(S){for(var C=S.words,I=S.sigBytes,w=[],A=0;A<I;A++){var E=C[A>>>2]>>>24-A%4*8&255;w.push((E>>>4).toString(16)),w.push((E&15).toString(16))}return w.join("")},parse:function(S){for(var C=S.length,I=[],w=0;w<C;w+=2)I[w>>>3]|=parseInt(S.substr(w,2),16)<<24-w%8*4;return new d.init(I,C/2)}},v=h.Latin1={stringify:function(S){for(var C=S.words,I=S.sigBytes,w=[],A=0;A<I;A++){var E=C[A>>>2]>>>24-A%4*8&255;w.push(String.fromCharCode(E))}return w.join("")},parse:function(S){for(var C=S.length,I=[],w=0;w<C;w++)I[w>>>2]|=(S.charCodeAt(w)&255)<<24-w%4*8;return new d.init(I,C)}},m=h.Utf8={stringify:function(S){try{return decodeURIComponent(escape(v.stringify(S)))}catch(C){throw new Error("Malformed UTF-8 data")}},parse:function(S){return v.parse(unescape(encodeURIComponent(S)))}},b=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=m.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var C,I=this._data,w=I.words,A=I.sigBytes,E=this.blockSize,k=E*4,B=A/k;S?B=r.ceil(B):B=r.max((B|0)-this._minBufferSize,0);var G=B*E,O=r.min(G*4,A);if(G){for(var T=0;T<G;T+=E)this._doProcessBlock(w,T);C=w.splice(0,G),I.sigBytes-=O}return new d.init(C,O)},clone:function(){var S=f.clone.call(this);return S._data=this._data.clone(),S},_minBufferSize:0});u.Hasher=b.extend({cfg:f.extend(),init:function(S){this.cfg=this.cfg.extend(S),this.reset()},reset:function(){b.reset.call(this),this._doReset()},update:function(S){return this._append(S),this._process(),this},finalize:function(S){S&&this._append(S);var C=this._doFinalize();return C},blockSize:16,_createHelper:function(S){return function(C,I){return new S.init(I).finalize(C)}},_createHmacHelper:function(S){return function(C,I){return new x.HMAC.init(S,I).finalize(C)}}});var x=c.algo={};return c}(Math);return n})}(Nc)),Nc.exports}(function(e,t){(function(n,r){e.exports=r(zc())})($t,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,s=o.Hasher,c=i.algo,u=[];(function(){for(var m=0;m<64;m++)u[m]=r.abs(r.sin(m+1))*4294967296|0})();var f=c.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,b){for(var x=0;x<16;x++){var S=b+x,C=m[S];m[S]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var I=this._hash.words,w=m[b+0],A=m[b+1],E=m[b+2],k=m[b+3],B=m[b+4],G=m[b+5],O=m[b+6],T=m[b+7],N=m[b+8],H=m[b+9],j=m[b+10],F=m[b+11],M=m[b+12],V=m[b+13],Y=m[b+14],Z=m[b+15],D=I[0],L=I[1],U=I[2],W=I[3];D=d(D,L,U,W,w,7,u[0]),W=d(W,D,L,U,A,12,u[1]),U=d(U,W,D,L,E,17,u[2]),L=d(L,U,W,D,k,22,u[3]),D=d(D,L,U,W,B,7,u[4]),W=d(W,D,L,U,G,12,u[5]),U=d(U,W,D,L,O,17,u[6]),L=d(L,U,W,D,T,22,u[7]),D=d(D,L,U,W,N,7,u[8]),W=d(W,D,L,U,H,12,u[9]),U=d(U,W,D,L,j,17,u[10]),L=d(L,U,W,D,F,22,u[11]),D=d(D,L,U,W,M,7,u[12]),W=d(W,D,L,U,V,12,u[13]),U=d(U,W,D,L,Y,17,u[14]),L=d(L,U,W,D,Z,22,u[15]),D=h(D,L,U,W,A,5,u[16]),W=h(W,D,L,U,O,9,u[17]),U=h(U,W,D,L,F,14,u[18]),L=h(L,U,W,D,w,20,u[19]),D=h(D,L,U,W,G,5,u[20]),W=h(W,D,L,U,j,9,u[21]),U=h(U,W,D,L,Z,14,u[22]),L=h(L,U,W,D,B,20,u[23]),D=h(D,L,U,W,H,5,u[24]),W=h(W,D,L,U,Y,9,u[25]),U=h(U,W,D,L,k,14,u[26]),L=h(L,U,W,D,N,20,u[27]),D=h(D,L,U,W,V,5,u[28]),W=h(W,D,L,U,E,9,u[29]),U=h(U,W,D,L,T,14,u[30]),L=h(L,U,W,D,M,20,u[31]),D=g(D,L,U,W,G,4,u[32]),W=g(W,D,L,U,N,11,u[33]),U=g(U,W,D,L,F,16,u[34]),L=g(L,U,W,D,Y,23,u[35]),D=g(D,L,U,W,A,4,u[36]),W=g(W,D,L,U,B,11,u[37]),U=g(U,W,D,L,T,16,u[38]),L=g(L,U,W,D,j,23,u[39]),D=g(D,L,U,W,V,4,u[40]),W=g(W,D,L,U,w,11,u[41]),U=g(U,W,D,L,k,16,u[42]),L=g(L,U,W,D,O,23,u[43]),D=g(D,L,U,W,H,4,u[44]),W=g(W,D,L,U,M,11,u[45]),U=g(U,W,D,L,Z,16,u[46]),L=g(L,U,W,D,E,23,u[47]),D=v(D,L,U,W,w,6,u[48]),W=v(W,D,L,U,T,10,u[49]),U=v(U,W,D,L,Y,15,u[50]),L=v(L,U,W,D,G,21,u[51]),D=v(D,L,U,W,M,6,u[52]),W=v(W,D,L,U,k,10,u[53]),U=v(U,W,D,L,j,15,u[54]),L=v(L,U,W,D,A,21,u[55]),D=v(D,L,U,W,N,6,u[56]),W=v(W,D,L,U,Z,10,u[57]),U=v(U,W,D,L,O,15,u[58]),L=v(L,U,W,D,V,21,u[59]),D=v(D,L,U,W,B,6,u[60]),W=v(W,D,L,U,F,10,u[61]),U=v(U,W,D,L,E,15,u[62]),L=v(L,U,W,D,H,21,u[63]),I[0]=I[0]+D|0,I[1]=I[1]+L|0,I[2]=I[2]+U|0,I[3]=I[3]+W|0},_doFinalize:function(){var m=this._data,b=m.words,x=this._nDataBytes*8,S=m.sigBytes*8;b[S>>>5]|=128<<24-S%32;var C=r.floor(x/4294967296),I=x;b[(S+64>>>9<<4)+15]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,b[(S+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,m.sigBytes=(b.length+1)*4,this._process();for(var w=this._hash,A=w.words,E=0;E<4;E++){var k=A[E];A[E]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return w},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});function d(m,b,x,S,C,I,w){var A=m+(b&x|~b&S)+C+w;return(A<<I|A>>>32-I)+b}function h(m,b,x,S,C,I,w){var A=m+(b&S|x&~S)+C+w;return(A<<I|A>>>32-I)+b}function g(m,b,x,S,C,I,w){var A=m+(b^x^S)+C+w;return(A<<I|A>>>32-I)+b}function v(m,b,x,S,C,I,w){var A=m+(x^(b|~S))+C+w;return(A<<I|A>>>32-I)+b}i.MD5=s._createHelper(f),i.HmacMD5=s._createHmacHelper(f)}(Math),n.MD5})})($p);var X_=$p.exports;const Np=pn(X_);var zp={exports:{}};(function(e,t){(function(n,r){e.exports=r(zc())})($t,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var u=c.byteLength,f=[],d=0;d<u;d++)f[d>>>2]|=c[d]<<24-d%4*8;a.call(this,f,u)}else a.apply(this,arguments)};s.prototype=o}}(),n.lib.WordArray})})(zp);var Z_=zp.exports;const jp=pn(Z_);var Up={exports:{}};(function(e,t){(function(n,r){e.exports=r(zc())})($t,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(c){var u=c.words,f=c.sigBytes,d=this._map;c.clamp();for(var h=[],g=0;g<f;g+=3)for(var v=u[g>>>2]>>>24-g%4*8&255,m=u[g+1>>>2]>>>24-(g+1)%4*8&255,b=u[g+2>>>2]>>>24-(g+2)%4*8&255,x=v<<16|m<<8|b,S=0;S<4&&g+S*.75<f;S++)h.push(d.charAt(x>>>6*(3-S)&63));var C=d.charAt(64);if(C)for(;h.length%4;)h.push(C);return h.join("")},parse:function(c){var u=c.length,f=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h<f.length;h++)d[f.charCodeAt(h)]=h}var g=f.charAt(64);if(g){var v=c.indexOf(g);v!==-1&&(u=v)}return s(c,u,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(c,u,f){for(var d=[],h=0,g=0;g<u;g++)if(g%4){var v=f[c.charCodeAt(g-1)]<<g%4*2,m=f[c.charCodeAt(g)]>>>6-g%4*2,b=v|m;d[h>>>2]|=b<<24-h%4*8,h++}return o.create(d,h)}}(),n.enc.Base64})})(Up);var eP=Up.exports;const tP=pn(eP);class Vp{constructor(){X(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=jp.create(new Uint8Array(a)),u=Np(s).toString(tP);n(u)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));X(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=jp.create(new Uint8Array(a)),c=Np(s).toString();n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Hp=({title:e,open:t,imageSrc:n,toggleModal:r})=>l.jsx(p.Modal,{open:t,onClose:r,children:l.jsxs(p.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l.jsx(p.ModalClose,{}),l.jsx(p.DialogTitle,{sx:{marginBottom:"10px"},children:e}),l.jsx(p.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:l.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Wp=Be(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Ye=()=>{const e=y.useContext(aa);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},nP=Be(l.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),rP=({isLoading:e,images:t,onClick:n})=>l.jsxs(l.Fragment,{children:[l.jsx(p.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return l.jsx(p.Grid,{xs:5,sm:4,md:3,children:l.jsxs(p.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,s;return n(((s=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:s.embed)||"")},children:[l.jsx(p.Box,{component:"img",src:(o=(i=r.urls)==null?void 0:i.uploaded)==null?void 0:o.thumbnail,alt:`image-${r.id}`,sx:{width:"100%",height:"auto",borderRadius:"8px"}}),l.jsx(p.Box,{className:"overlay",sx:{position:"absolute",top:0,left:0,right:0,bottom:5,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0)",opacity:0,transition:"background-color 0.3s ease, opacity 0.3s ease",borderRadius:"8px",cursor:"pointer"},children:l.jsx(p.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?l.jsx(p.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:l.jsx(p.CircularProgress,{variant:"solid",color:"neutral"})}):l.jsx(l.Fragment,{})]}),iP=Be(l.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),oP=Be(l.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),aP=e=>l.jsx(p.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:l.jsxs(p.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&l.jsx(p.Button,{variant:"outlined",color:"neutral",startDecorator:l.jsx(iP,{}),onClick:e.getPreviousPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:"4px 0 0 4px",borderRight:0,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.previous}),e.images&&e.images.length===20&&l.jsx(p.Button,{variant:"outlined",color:"neutral",endDecorator:l.jsx(oP,{}),onClick:e.getNextPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:e.pageCount!==1?"0 4px 4px 0":"4px",borderLeft:e.pageCount!==1?0:1,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.next})]})}),ar=Be(l.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),sP=Be(l.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),lP=({color:e})=>e==="warning"?l.jsx(sP,{}):l.jsx(ar,{}),Ke=e=>l.jsx(p.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:l.jsx(lP,{color:e.color}),children:e.message},e.message),co=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return l.jsxs(p.FormControl,{sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{required:n,color:"primary",children:e}),l.jsx(p.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},cP=({labels:e,showFilters:t,onClick:n})=>l.jsx(p.Tooltip,{title:t?e.hideFilters:e.showFilters,children:l.jsx(p.IconButton,{"aria-label":"Filters",onClick:n,children:l.jsx(nP,{})})}),Gp=({labels:e,onChangeImages:t})=>{const[n,r]=y.useState(!1),[i,o]=y.useState(!1),[a,s]=y.useState(!1),[c,u]=y.useState(!1),[f,d]=y.useState(1),[h,g]=y.useState(""),[v,m]=y.useState(null),[b,x]=y.useState([]),{https:S}=Ye();y.useEffect(()=>{E()},[f]);const C=()=>u(!c),I=()=>d(B=>B-1),w=()=>d(B=>B+1),A=()=>_(this,null,function*(){if(h){o(!0);const B=v?$({},v):null,G=yield S.fetchImagesFromSportal365(h,B,f);if(G){const O=yield G.json();G.ok?(x(O.data),d(O.meta.pagination.current_page)):(console.error(O),C())}o(!1)}else x([])}),E=()=>_(this,null,function*(){if(h){s(!0),x([]);const B=v&&v.from&&v.to?$({},v):null,G=yield S.fetchImagesFromSportal365(h,B,f);if(G){const O=yield G.json();G.ok?(x(O.data),d(O.meta.pagination.current_page)):(console.error(O),C())}s(!1)}}),k=(B,G)=>{m(O=>O?Q($({},O),{[G]:B}):{[G]:B})};return l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{sx:{marginBottom:"10px"},children:[l.jsx(p.Input,{value:h,onChange:B=>g(B.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:l.jsx(cP,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?l.jsxs(p.Grid,{container:!0,spacing:2,children:[l.jsx(p.Grid,{xs:6,children:l.jsx(co,{label:e.fromDate,defaultValue:v==null?void 0:v.from,required:!1,onChange:B=>k(B,"from")})}),l.jsx(p.Grid,{xs:6,children:l.jsx(co,{label:e.toDate,defaultValue:v==null?void 0:v.to,required:!1,onChange:B=>k(B,"to")})})]}):l.jsx(l.Fragment,{}),l.jsx(p.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),l.jsx(rP,{images:b,isLoading:a,onClick:t}),l.jsx(aP,{labels:e,pageCount:f,images:b,getPreviousPage:I,getNextPage:w})]}),l.jsx(Ke,{showToast:c,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:C})]})},Yp=Be(l.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"Loupe"),Kp=p.styled("input")`
2350
+ `),B_)),Rp=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:s="md",variant:c="soft",thickness:u,determinate:f=!1,value:d=f?0:25,component:h,slots:g={},slotProps:v={}}=r,m=Te(r,L_),b=R({},r,{color:a,size:s,variant:c,thickness:u,value:d,determinate:f,instanceSize:t.size}),x=$_(b),S=R({},m,{component:h,slots:g,slotProps:v}),[C,I]=Ae("root",{ref:n,className:$n(x.root,o),elementType:F_,externalForwardedProps:S,ownerState:b,additionalProps:R({role:"progressbar",style:{"--CircularProgress-percent":d}},d&&f&&{"aria-valuenow":Math.round(typeof d=="number"?d:Number(d||0))})}),[w,A]=Ae("svg",{className:x.svg,elementType:N_,externalForwardedProps:S,ownerState:b}),[E,k]=Ae("track",{className:x.track,elementType:z_,externalForwardedProps:S,ownerState:b}),[$,G]=Ae("progress",{className:x.progress,elementType:j_,externalForwardedProps:S,ownerState:b});return l.jsxs(C,R({},I,{children:[l.jsxs(w,R({},A,{children:[l.jsx(E,R({},k)),l.jsx($,R({},G))]})),i]}))});function U_(e){return lt("MuiButton",e)}const Mp=We("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),Lp=K.createContext({}),Bp=K.createContext(void 0),V_=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],H_=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:s,loading:c}=e,u={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",s&&`variant${xe(s)}`,t&&`color${xe(t)}`,a&&`size${xe(a)}`,c&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},f=ht(u,U_,{});return r&&i&&(f.root+=` ${i}`),f},W_=ye("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),G_=ye("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),Y_=ye("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return R({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),K_=({theme:e,ownerState:t})=>{var n,r,i,o;return[R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.size==="sm"&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.25rem)",paddingInline:"0.75rem"},t.size==="md"&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.25rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.375rem)",paddingInline:"1rem"},t.size==="lg"&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 2.75rem)",fontSize:e.vars.fontSize.md,paddingBlock:"var(--Button-paddingBlock, 0.5rem)",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",userSelect:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:e.vars.lineHeight.md},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),R({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},'&:active, &[aria-pressed="true"]':(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],[`&.${Mp.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${Mp.loading}`]:{color:"transparent"}})]},Q_=ye("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(K_),oi=K.forwardRef(function(t,n){var r;const i=pt({props:t,name:"JoyButton"}),{children:o,action:a,color:s="primary",variant:c="solid",size:u="md",fullWidth:f=!1,startDecorator:d,endDecorator:h,loading:g=!1,loadingPosition:v="center",loadingIndicator:m,disabled:b,component:x,slots:S={},slotProps:C={}}=i,I=Te(i,V_),w=K.useContext(Lp),A=K.useContext(Bp),E=t.variant||w.variant||c,k=t.size||w.size||u,$=t.color||w.color||s,G=(r=t.loading||t.disabled)!=null?r:w.disabled||g||b,O=K.useRef(null),T=cn(O,n),{focusVisible:N,setFocusVisible:H,getRootProps:j}=Yl(R({},i,{disabled:G,rootRef:T})),F=m!=null?m:l.jsx(Rp,{color:$,thickness:{sm:2,md:3,lg:4}[k]||3});K.useImperativeHandle(a,()=>({focusVisible:()=>{var J;H(!0),(J=O.current)==null||J.focus()}}),[H]);const M=R({},i,{color:$,fullWidth:f,variant:E,size:k,focusVisible:N,loading:g,loadingPosition:v,disabled:G}),V=H_(M),Y=J=>{var ce;let ve=i.onClick;if(typeof C.root=="function"?ve=C.root(M).onClick:C.root&&(ve=C.root.onClick),(ce=ve)==null||ce(J),A){var ze;(ze=A.onClick)==null||ze.call(A,J,i.value)}};let Z=i["aria-pressed"];typeof C.root=="function"?Z=C.root(M)["aria-pressed"]:C.root&&(Z=C.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?Z=A.value.indexOf(i.value)!==-1:Z=A.value===i.value);const D=R({},I,{component:x,slots:S,slotProps:C}),[L,U]=Ae("root",{ref:n,className:V.root,elementType:Q_,externalForwardedProps:D,getSlotProps:j,ownerState:M,additionalProps:{onClick:Y,"aria-pressed":Z}}),[W,ie]=Ae("startDecorator",{className:V.startDecorator,elementType:W_,externalForwardedProps:D,ownerState:M}),[le,ae]=Ae("endDecorator",{className:V.endDecorator,elementType:G_,externalForwardedProps:D,ownerState:M}),[ee,ne]=Ae("loadingIndicatorCenter",{className:V.loadingIndicatorCenter,elementType:Y_,externalForwardedProps:D,ownerState:M});return l.jsxs(L,R({},U,{children:[(d||g&&v==="start")&&l.jsx(W,R({},ie,{children:g&&v==="start"?F:d})),o,g&&v==="center"&&l.jsx(ee,R({},ne,{children:F})),(h||g&&v==="end")&&l.jsx(le,R({},ae,{children:g&&v==="end"?F:h}))]}))});oi.muiName="Button";var $p={exports:{}};function q_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Nc={exports:{}};const J_=Vu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Fp;function zc(){return Fp||(Fp=1,function(e,t){(function(n,r){e.exports=r()})($t,function(){var n=n||function(r,i){var o;if(typeof window!="undefined"&&window.crypto&&(o=window.crypto),typeof self!="undefined"&&self.crypto&&(o=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window!="undefined"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof $t!="undefined"&&$t.crypto&&(o=$t.crypto),!o&&typeof q_=="function")try{o=J_}catch(S){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(S){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(S){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function S(){}return function(C){var I;return S.prototype=C,I=new S,S.prototype=null,I}}(),c={},u=c.lib={},f=u.Base=function(){return{extend:function(S){var C=s(this);return S&&C.mixIn(S),(!C.hasOwnProperty("init")||this.init===C.init)&&(C.init=function(){C.$super.init.apply(this,arguments)}),C.init.prototype=C,C.$super=this,C},create:function(){var S=this.extend();return S.init.apply(S,arguments),S},init:function(){},mixIn:function(S){for(var C in S)S.hasOwnProperty(C)&&(this[C]=S[C]);S.hasOwnProperty("toString")&&(this.toString=S.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=u.WordArray=f.extend({init:function(S,C){S=this.words=S||[],C!=i?this.sigBytes=C:this.sigBytes=S.length*4},toString:function(S){return(S||g).stringify(this)},concat:function(S){var C=this.words,I=S.words,w=this.sigBytes,A=S.sigBytes;if(this.clamp(),w%4)for(var E=0;E<A;E++){var k=I[E>>>2]>>>24-E%4*8&255;C[w+E>>>2]|=k<<24-(w+E)%4*8}else for(var $=0;$<A;$+=4)C[w+$>>>2]=I[$>>>2];return this.sigBytes+=A,this},clamp:function(){var S=this.words,C=this.sigBytes;S[C>>>2]&=4294967295<<32-C%4*8,S.length=r.ceil(C/4)},clone:function(){var S=f.clone.call(this);return S.words=this.words.slice(0),S},random:function(S){for(var C=[],I=0;I<S;I+=4)C.push(a());return new d.init(C,S)}}),h=c.enc={},g=h.Hex={stringify:function(S){for(var C=S.words,I=S.sigBytes,w=[],A=0;A<I;A++){var E=C[A>>>2]>>>24-A%4*8&255;w.push((E>>>4).toString(16)),w.push((E&15).toString(16))}return w.join("")},parse:function(S){for(var C=S.length,I=[],w=0;w<C;w+=2)I[w>>>3]|=parseInt(S.substr(w,2),16)<<24-w%8*4;return new d.init(I,C/2)}},v=h.Latin1={stringify:function(S){for(var C=S.words,I=S.sigBytes,w=[],A=0;A<I;A++){var E=C[A>>>2]>>>24-A%4*8&255;w.push(String.fromCharCode(E))}return w.join("")},parse:function(S){for(var C=S.length,I=[],w=0;w<C;w++)I[w>>>2]|=(S.charCodeAt(w)&255)<<24-w%4*8;return new d.init(I,C)}},m=h.Utf8={stringify:function(S){try{return decodeURIComponent(escape(v.stringify(S)))}catch(C){throw new Error("Malformed UTF-8 data")}},parse:function(S){return v.parse(unescape(encodeURIComponent(S)))}},b=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(S){typeof S=="string"&&(S=m.parse(S)),this._data.concat(S),this._nDataBytes+=S.sigBytes},_process:function(S){var C,I=this._data,w=I.words,A=I.sigBytes,E=this.blockSize,k=E*4,$=A/k;S?$=r.ceil($):$=r.max(($|0)-this._minBufferSize,0);var G=$*E,O=r.min(G*4,A);if(G){for(var T=0;T<G;T+=E)this._doProcessBlock(w,T);C=w.splice(0,G),I.sigBytes-=O}return new d.init(C,O)},clone:function(){var S=f.clone.call(this);return S._data=this._data.clone(),S},_minBufferSize:0});u.Hasher=b.extend({cfg:f.extend(),init:function(S){this.cfg=this.cfg.extend(S),this.reset()},reset:function(){b.reset.call(this),this._doReset()},update:function(S){return this._append(S),this._process(),this},finalize:function(S){S&&this._append(S);var C=this._doFinalize();return C},blockSize:16,_createHelper:function(S){return function(C,I){return new S.init(I).finalize(C)}},_createHmacHelper:function(S){return function(C,I){return new x.HMAC.init(S,I).finalize(C)}}});var x=c.algo={};return c}(Math);return n})}(Nc)),Nc.exports}(function(e,t){(function(n,r){e.exports=r(zc())})($t,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,s=o.Hasher,c=i.algo,u=[];(function(){for(var m=0;m<64;m++)u[m]=r.abs(r.sin(m+1))*4294967296|0})();var f=c.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,b){for(var x=0;x<16;x++){var S=b+x,C=m[S];m[S]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var I=this._hash.words,w=m[b+0],A=m[b+1],E=m[b+2],k=m[b+3],$=m[b+4],G=m[b+5],O=m[b+6],T=m[b+7],N=m[b+8],H=m[b+9],j=m[b+10],F=m[b+11],M=m[b+12],V=m[b+13],Y=m[b+14],Z=m[b+15],D=I[0],L=I[1],U=I[2],W=I[3];D=d(D,L,U,W,w,7,u[0]),W=d(W,D,L,U,A,12,u[1]),U=d(U,W,D,L,E,17,u[2]),L=d(L,U,W,D,k,22,u[3]),D=d(D,L,U,W,$,7,u[4]),W=d(W,D,L,U,G,12,u[5]),U=d(U,W,D,L,O,17,u[6]),L=d(L,U,W,D,T,22,u[7]),D=d(D,L,U,W,N,7,u[8]),W=d(W,D,L,U,H,12,u[9]),U=d(U,W,D,L,j,17,u[10]),L=d(L,U,W,D,F,22,u[11]),D=d(D,L,U,W,M,7,u[12]),W=d(W,D,L,U,V,12,u[13]),U=d(U,W,D,L,Y,17,u[14]),L=d(L,U,W,D,Z,22,u[15]),D=h(D,L,U,W,A,5,u[16]),W=h(W,D,L,U,O,9,u[17]),U=h(U,W,D,L,F,14,u[18]),L=h(L,U,W,D,w,20,u[19]),D=h(D,L,U,W,G,5,u[20]),W=h(W,D,L,U,j,9,u[21]),U=h(U,W,D,L,Z,14,u[22]),L=h(L,U,W,D,$,20,u[23]),D=h(D,L,U,W,H,5,u[24]),W=h(W,D,L,U,Y,9,u[25]),U=h(U,W,D,L,k,14,u[26]),L=h(L,U,W,D,N,20,u[27]),D=h(D,L,U,W,V,5,u[28]),W=h(W,D,L,U,E,9,u[29]),U=h(U,W,D,L,T,14,u[30]),L=h(L,U,W,D,M,20,u[31]),D=g(D,L,U,W,G,4,u[32]),W=g(W,D,L,U,N,11,u[33]),U=g(U,W,D,L,F,16,u[34]),L=g(L,U,W,D,Y,23,u[35]),D=g(D,L,U,W,A,4,u[36]),W=g(W,D,L,U,$,11,u[37]),U=g(U,W,D,L,T,16,u[38]),L=g(L,U,W,D,j,23,u[39]),D=g(D,L,U,W,V,4,u[40]),W=g(W,D,L,U,w,11,u[41]),U=g(U,W,D,L,k,16,u[42]),L=g(L,U,W,D,O,23,u[43]),D=g(D,L,U,W,H,4,u[44]),W=g(W,D,L,U,M,11,u[45]),U=g(U,W,D,L,Z,16,u[46]),L=g(L,U,W,D,E,23,u[47]),D=v(D,L,U,W,w,6,u[48]),W=v(W,D,L,U,T,10,u[49]),U=v(U,W,D,L,Y,15,u[50]),L=v(L,U,W,D,G,21,u[51]),D=v(D,L,U,W,M,6,u[52]),W=v(W,D,L,U,k,10,u[53]),U=v(U,W,D,L,j,15,u[54]),L=v(L,U,W,D,A,21,u[55]),D=v(D,L,U,W,N,6,u[56]),W=v(W,D,L,U,Z,10,u[57]),U=v(U,W,D,L,O,15,u[58]),L=v(L,U,W,D,V,21,u[59]),D=v(D,L,U,W,$,6,u[60]),W=v(W,D,L,U,F,10,u[61]),U=v(U,W,D,L,E,15,u[62]),L=v(L,U,W,D,H,21,u[63]),I[0]=I[0]+D|0,I[1]=I[1]+L|0,I[2]=I[2]+U|0,I[3]=I[3]+W|0},_doFinalize:function(){var m=this._data,b=m.words,x=this._nDataBytes*8,S=m.sigBytes*8;b[S>>>5]|=128<<24-S%32;var C=r.floor(x/4294967296),I=x;b[(S+64>>>9<<4)+15]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,b[(S+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,m.sigBytes=(b.length+1)*4,this._process();for(var w=this._hash,A=w.words,E=0;E<4;E++){var k=A[E];A[E]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return w},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});function d(m,b,x,S,C,I,w){var A=m+(b&x|~b&S)+C+w;return(A<<I|A>>>32-I)+b}function h(m,b,x,S,C,I,w){var A=m+(b&S|x&~S)+C+w;return(A<<I|A>>>32-I)+b}function g(m,b,x,S,C,I,w){var A=m+(b^x^S)+C+w;return(A<<I|A>>>32-I)+b}function v(m,b,x,S,C,I,w){var A=m+(x^(b|~S))+C+w;return(A<<I|A>>>32-I)+b}i.MD5=s._createHelper(f),i.HmacMD5=s._createHmacHelper(f)}(Math),n.MD5})})($p);var X_=$p.exports;const Np=pn(X_);var zp={exports:{}};(function(e,t){(function(n,r){e.exports=r(zc())})($t,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var u=c.byteLength,f=[],d=0;d<u;d++)f[d>>>2]|=c[d]<<24-d%4*8;a.call(this,f,u)}else a.apply(this,arguments)};s.prototype=o}}(),n.lib.WordArray})})(zp);var Z_=zp.exports;const jp=pn(Z_);var Up={exports:{}};(function(e,t){(function(n,r){e.exports=r(zc())})($t,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(c){var u=c.words,f=c.sigBytes,d=this._map;c.clamp();for(var h=[],g=0;g<f;g+=3)for(var v=u[g>>>2]>>>24-g%4*8&255,m=u[g+1>>>2]>>>24-(g+1)%4*8&255,b=u[g+2>>>2]>>>24-(g+2)%4*8&255,x=v<<16|m<<8|b,S=0;S<4&&g+S*.75<f;S++)h.push(d.charAt(x>>>6*(3-S)&63));var C=d.charAt(64);if(C)for(;h.length%4;)h.push(C);return h.join("")},parse:function(c){var u=c.length,f=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h<f.length;h++)d[f.charCodeAt(h)]=h}var g=f.charAt(64);if(g){var v=c.indexOf(g);v!==-1&&(u=v)}return s(c,u,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(c,u,f){for(var d=[],h=0,g=0;g<u;g++)if(g%4){var v=f[c.charCodeAt(g-1)]<<g%4*2,m=f[c.charCodeAt(g)]>>>6-g%4*2,b=v|m;d[h>>>2]|=b<<24-h%4*8,h++}return o.create(d,h)}}(),n.enc.Base64})})(Up);var eP=Up.exports;const tP=pn(eP);class Vp{constructor(){X(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=jp.create(new Uint8Array(a)),u=Np(s).toString(tP);n(u)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));X(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=jp.create(new Uint8Array(a)),c=Np(s).toString();n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Hp=({title:e,open:t,imageSrc:n,toggleModal:r})=>l.jsx(p.Modal,{open:t,onClose:r,children:l.jsxs(p.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l.jsx(p.ModalClose,{}),l.jsx(p.DialogTitle,{sx:{marginBottom:"10px"},children:e}),l.jsx(p.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:l.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Wp=Be(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Ye=()=>{const e=y.useContext(aa);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},nP=Be(l.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),rP=({isLoading:e,images:t,onClick:n})=>l.jsxs(l.Fragment,{children:[l.jsx(p.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return l.jsx(p.Grid,{xs:5,sm:4,md:3,children:l.jsxs(p.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,s;return n(((s=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:s.embed)||"")},children:[l.jsx(p.Box,{component:"img",src:(o=(i=r.urls)==null?void 0:i.uploaded)==null?void 0:o.thumbnail,alt:`image-${r.id}`,sx:{width:"100%",height:"auto",borderRadius:"8px"}}),l.jsx(p.Box,{className:"overlay",sx:{position:"absolute",top:0,left:0,right:0,bottom:5,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0)",opacity:0,transition:"background-color 0.3s ease, opacity 0.3s ease",borderRadius:"8px",cursor:"pointer"},children:l.jsx(p.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?l.jsx(p.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:l.jsx(p.CircularProgress,{variant:"solid",color:"neutral"})}):l.jsx(l.Fragment,{})]}),iP=Be(l.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),oP=Be(l.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),aP=e=>l.jsx(p.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:l.jsxs(p.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&l.jsx(p.Button,{variant:"outlined",color:"neutral",startDecorator:l.jsx(iP,{}),onClick:e.getPreviousPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:"4px 0 0 4px",borderRight:0,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.previous}),e.images&&e.images.length===20&&l.jsx(p.Button,{variant:"outlined",color:"neutral",endDecorator:l.jsx(oP,{}),onClick:e.getNextPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:e.pageCount!==1?"0 4px 4px 0":"4px",borderLeft:e.pageCount!==1?0:1,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.next})]})}),ar=Be(l.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),sP=Be(l.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),lP=({color:e})=>e==="warning"?l.jsx(sP,{}):l.jsx(ar,{}),Ke=e=>l.jsx(p.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:l.jsx(lP,{color:e.color}),children:e.message},e.message),co=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return l.jsxs(p.FormControl,{sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{required:n,color:"primary",children:e}),l.jsx(p.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},cP=({labels:e,showFilters:t,onClick:n})=>l.jsx(p.Tooltip,{title:t?e.hideFilters:e.showFilters,children:l.jsx(p.IconButton,{"aria-label":"Filters",onClick:n,children:l.jsx(nP,{})})}),Gp=({labels:e,onChangeImages:t})=>{const[n,r]=y.useState(!1),[i,o]=y.useState(!1),[a,s]=y.useState(!1),[c,u]=y.useState(!1),[f,d]=y.useState(1),[h,g]=y.useState(""),[v,m]=y.useState(null),[b,x]=y.useState([]),{https:S}=Ye();y.useEffect(()=>{E()},[f]);const C=()=>u(!c),I=()=>d($=>$-1),w=()=>d($=>$+1),A=()=>_(this,null,function*(){if(h){o(!0);const $=v?B({},v):null,G=yield S.fetchImagesFromSportal365(h,$,f);if(G){const O=yield G.json();G.ok?(x(O.data),d(O.meta.pagination.current_page)):(console.error(O),C())}o(!1)}else x([])}),E=()=>_(this,null,function*(){if(h){s(!0),x([]);const $=v&&v.from&&v.to?B({},v):null,G=yield S.fetchImagesFromSportal365(h,$,f);if(G){const O=yield G.json();G.ok?(x(O.data),d(O.meta.pagination.current_page)):(console.error(O),C())}s(!1)}}),k=($,G)=>{m(O=>O?q(B({},O),{[G]:$}):{[G]:$})};return l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{sx:{marginBottom:"10px"},children:[l.jsx(p.Input,{value:h,onChange:$=>g($.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:l.jsx(cP,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?l.jsxs(p.Grid,{container:!0,spacing:2,children:[l.jsx(p.Grid,{xs:6,children:l.jsx(co,{label:e.fromDate,defaultValue:v==null?void 0:v.from,required:!1,onChange:$=>k($,"from")})}),l.jsx(p.Grid,{xs:6,children:l.jsx(co,{label:e.toDate,defaultValue:v==null?void 0:v.to,required:!1,onChange:$=>k($,"to")})})]}):l.jsx(l.Fragment,{}),l.jsx(p.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),l.jsx(rP,{images:b,isLoading:a,onClick:t}),l.jsx(aP,{labels:e,pageCount:f,images:b,getPreviousPage:I,getNextPage:w})]}),l.jsx(Ke,{showToast:c,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:C})]})},Yp=Be(l.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"Loupe"),Kp=p.styled("input")`
2351
2351
  clip: rect(0 0 0 0);
2352
2352
  clip-path: inset(50%);
2353
2353
  height: 1px;
@@ -2357,7 +2357,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
2357
2357
  left: 0;
2358
2358
  white-space: nowrap;
2359
2359
  width: 1px;
2360
- `;var qp=!1,Tr,jc,Uc,Za,es,Qp,ts,Vc,Hc,Wc,Jp,Gc,Yc,Xp,Zp;function zt(){if(!qp){qp=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Gc=/\b(iPhone|iP[ao]d)/.exec(e),Yc=/\b(iP[ao]d)/.exec(e),Wc=/Android/i.exec(e),Xp=/FBAN\/\w+;/i.exec(e),Zp=/Mobile/i.exec(e),Jp=!!/Win64/.exec(e),t){Tr=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Tr&&document&&document.documentMode&&(Tr=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Qp=r?parseFloat(r[1])+4:Tr,jc=t[2]?parseFloat(t[2]):NaN,Uc=t[3]?parseFloat(t[3]):NaN,Za=t[4]?parseFloat(t[4]):NaN,Za?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),es=t&&t[1]?parseFloat(t[1]):NaN):es=NaN}else Tr=jc=Uc=es=Za=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);ts=i?parseFloat(i[1].replace("_",".")):!0}else ts=!1;Vc=!!n[2],Hc=!!n[3]}else ts=Vc=Hc=!1}}var Kc={ie:function(){return zt()||Tr},ieCompatibilityMode:function(){return zt()||Qp>Tr},ie64:function(){return Kc.ie()&&Jp},firefox:function(){return zt()||jc},opera:function(){return zt()||Uc},webkit:function(){return zt()||Za},safari:function(){return Kc.webkit()},chrome:function(){return zt()||es},windows:function(){return zt()||Vc},osx:function(){return zt()||ts},linux:function(){return zt()||Hc},iphone:function(){return zt()||Gc},mobile:function(){return zt()||Gc||Yc||Wc||Zp},nativeApp:function(){return zt()||Xp},android:function(){return zt()||Wc},ipad:function(){return zt()||Yc}},uP=Kc,ns=!!(typeof window!="undefined"&&window.document&&window.document.createElement),dP={canUseDOM:ns,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:ns&&!!(window.addEventListener||window.attachEvent),canUseViewport:ns&&!!window.screen,isInWorker:!ns},fP=dP,eg=fP,tg;eg.canUseDOM&&(tg=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
2360
+ `;var Qp=!1,Tr,jc,Uc,Za,es,qp,ts,Vc,Hc,Wc,Jp,Gc,Yc,Xp,Zp;function zt(){if(!Qp){Qp=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Gc=/\b(iPhone|iP[ao]d)/.exec(e),Yc=/\b(iP[ao]d)/.exec(e),Wc=/Android/i.exec(e),Xp=/FBAN\/\w+;/i.exec(e),Zp=/Mobile/i.exec(e),Jp=!!/Win64/.exec(e),t){Tr=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Tr&&document&&document.documentMode&&(Tr=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);qp=r?parseFloat(r[1])+4:Tr,jc=t[2]?parseFloat(t[2]):NaN,Uc=t[3]?parseFloat(t[3]):NaN,Za=t[4]?parseFloat(t[4]):NaN,Za?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),es=t&&t[1]?parseFloat(t[1]):NaN):es=NaN}else Tr=jc=Uc=es=Za=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);ts=i?parseFloat(i[1].replace("_",".")):!0}else ts=!1;Vc=!!n[2],Hc=!!n[3]}else ts=Vc=Hc=!1}}var Kc={ie:function(){return zt()||Tr},ieCompatibilityMode:function(){return zt()||qp>Tr},ie64:function(){return Kc.ie()&&Jp},firefox:function(){return zt()||jc},opera:function(){return zt()||Uc},webkit:function(){return zt()||Za},safari:function(){return Kc.webkit()},chrome:function(){return zt()||es},windows:function(){return zt()||Vc},osx:function(){return zt()||ts},linux:function(){return zt()||Hc},iphone:function(){return zt()||Gc},mobile:function(){return zt()||Gc||Yc||Wc||Zp},nativeApp:function(){return zt()||Xp},android:function(){return zt()||Wc},ipad:function(){return zt()||Yc}},uP=Kc,ns=!!(typeof window!="undefined"&&window.document&&window.document.createElement),dP={canUseDOM:ns,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:ns&&!!(window.addEventListener||window.attachEvent),canUseViewport:ns&&!!window.screen,isInWorker:!ns},fP=dP,eg=fP,tg;eg.canUseDOM&&(tg=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
2361
2361
  * Checks if an event is supported in the current execution environment.
2362
2362
  *
2363
2363
  * NOTE: This will not work correctly for non-generic events such as `change`,
@@ -2450,17 +2450,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
2450
2450
  border-left: 0;
2451
2451
  border-right: 0;
2452
2452
  }
2453
- `,PP=1,DP=3,OP=function(e){xy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=K.createRef(),n.videoRef=K.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document!="undefined"?document:null,n.currentWindow=typeof window!="undefined"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver=="undefined"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=AP(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=i.crop,a=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}else if(n.props.initialCroppedAreaPixels){var s=EP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=s.crop,a=s.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,s,c,u=n.imageRef.current||n.videoRef.current;if(u&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var f=n.containerRect.width/n.containerRect.height,d=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,h=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((a=n.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,g=u.offsetWidth<d||u.offsetHeight<h,v=d/h,m=void 0;if(g)switch(n.state.mediaObjectFit){default:case"contain":m=f>v?{width:n.containerRect.height*v,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/v};break;case"horizontal-cover":m={width:n.containerRect.width,height:n.containerRect.width/v};break;case"vertical-cover":m={width:n.containerRect.height*v,height:n.containerRect.height};break}else m={width:u.offsetWidth,height:u.offsetHeight};n.mediaSize=Et(Et({},m),{naturalWidth:d,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:xP(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==b.height||((c=n.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(t.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(t.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(t.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=t.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+r.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,a=r.x,s=r.y;n.dragStartPosition={x:a,y:s},n.dragStartCrop=Et({},n.props.crop),(o=(i=n.props).onInteractionStart)===null||o===void 0||o.call(i)},n.onDrag=function(r){var i=r.x,o=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||o===void 0)){var a=i-n.dragStartPosition.x,s=o-n.dragStartPosition.y,c={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+s},u=n.props.restrictPosition?rs(c,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):c;n.props.onCropChange(u)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=t.getMousePoint(r),o=yP(r).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,c;return(c=(s=n.props).onInteractionStart)===null||c===void 0?void 0:c.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,c;return(c=(s=n.props).onInteractionEnd)===null||c===void 0?void 0:c.call(s)})},250)}},n.getPointOnContainer=function(r,i){var o=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-i.x),y:n.containerRect.height/2-(a-i.y)}},n.getPointOnMedia=function(r){var i=r.x,o=r.y,a=n.props,s=a.crop,c=a.zoom;return{x:(i+s.x)/c,y:(o+s.y)/c}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,s=a.shouldUpdatePosition,c=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var u=is(r,n.props.minZoom,n.props.maxZoom);if(c){var f=n.getPointOnContainer(i,n.containerPosition),d=n.getPointOnMedia(f),h={x:d.x*u-f.x,y:d.y*u-f.y},g=n.props.restrictPosition?rs(h,n.mediaSize,n.state.cropSize,u,n.props.rotation):h;n.props.onCropChange(g)}n.props.onZoomChange(u)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?rs(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return wP(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?rs(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver=="undefined"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=_P,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver=="undefined"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(n){var r,i,o,a,s,c,u,f,d;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=n.crop)===null||u===void 0?void 0:u.y)!==((f=this.props.crop)===null||f===void 0?void 0:f.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((d=this.videoRef.current)===null||d===void 0||d.load());var h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},t.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},t.prototype.getObjectFit=function(){var n,r,i,o;if(this.props.objectFit==="cover"){var a=this.imageRef.current||this.videoRef.current;if(a&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,c=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,f=c/u;return f<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(n){var r=t.getTouchPoint(n.touches[0]),i=t.getTouchPoint(n.touches[1]);this.lastPinchDistance=sg(r,i),this.lastPinchRotation=lg(r,i),this.onDragStart(cg(r,i))},t.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=t.getTouchPoint(n.touches[0]),o=t.getTouchPoint(n.touches[1]),a=cg(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=sg(i,o),c=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(c,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var u=lg(i,o),f=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(f),r.lastPinchRotation=u})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,s=i.mediaProps,c=i.transform,u=i.crop,f=u.x,d=u.y,h=i.rotation,g=i.zoom,v=i.cropShape,m=i.showGrid,b=i.style,x=b.containerStyle,S=b.cropAreaStyle,C=b.mediaStyle,I=i.classes,w=I.containerClassName,A=I.cropAreaClassName,E=I.mediaClassName,k=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return K.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(G){return n.containerRef=G},"data-testid":"container",style:x,className:os("reactEasyCrop_Container",w)},o?K.createElement("img",Et({alt:"",className:os("reactEasyCrop_Image",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{src:o,ref:this.imageRef,style:Et(Et({},C),{transform:c||"translate(".concat(f,"px, ").concat(d,"px) rotate(").concat(h,"deg) scale(").concat(g,")")}),onLoad:this.onMediaLoad})):a&&K.createElement("video",Et({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:os("reactEasyCrop_Video",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Et(Et({},C),{transform:c||"translate(".concat(f,"px, ").concat(d,"px) rotate(").concat(h,"deg) scale(").concat(g,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(B){return K.createElement("source",Et({key:B.src},B))})),this.state.cropSize&&K.createElement("div",{style:Et(Et({},S),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:os("reactEasyCrop_CropArea",v==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:DP,minZoom:PP,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t}(K.Component);const RP=e=>new Promise((t,n)=>{const r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",i=>n(i)),r.crossOrigin="Anonymous",r.src=e});function MP(e){return e*Math.PI/180}function LP(e,t,n=0){return _(this,null,function*(){const r=yield RP(e),i=document.createElement("canvas"),o=i.getContext("2d"),s=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=s,i.height=s,o.translate(s/2,s/2),o.rotate(MP(n)),o.translate(-s/2,-s/2),o.drawImage(r,s/2-r.width*.5,s/2-r.height*.5);const c=o.getImageData(0,0,s,s);return i.width=t.width,i.height=t.height,o.putImageData(c,Math.round(0-s/2+r.width*.5-t.x),Math.round(0-s/2+r.height*.5-t.y)),new Promise(u=>i.toBlob(f=>{const d=new File([f],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});u(d)},"image/jpeg"))})}const ug=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,s]=y.useState({x:0,y:0}),[c,u]=y.useState(1),[f,d]=y.useState(16/9),[h,g]=y.useState(null),v=(C,I)=>{g(I)},m=(C,I)=>d(I),b=()=>_(this,null,function*(){const C=yield LP(n,h);S(),o(C)}),x=()=>{S(),r()},S=()=>{s({x:0,y:0}),u(1),d(16/9),g(null)};return l.jsx(p.Modal,{open:t,onClose:i,children:l.jsxs(p.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l.jsx(p.ModalClose,{}),l.jsx(p.DialogTitle,{children:e.cropImage}),l.jsxs(p.DialogContent,{sx:{width:"100%"},children:[l.jsx(p.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:l.jsx(OP,{image:n,crop:a,zoom:c,aspect:f,onCropChange:s,onCropComplete:v,onZoomChange:u})}),l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e.aspectRatio}),l.jsxs(p.Select,{value:f,onChange:m,children:[l.jsx(p.Option,{value:4/3,children:"4 / 3"}),l.jsx(p.Option,{value:16/9,children:"16 / 9"}),l.jsx(p.Option,{value:1,children:"1"})]})]}),l.jsx(p.Box,{mb:1,mx:2,children:l.jsx(p.Slider,{value:c,min:1,max:3,step:.1,onChange:(C,I)=>u(I)})}),l.jsxs(p.DialogActions,{children:[l.jsx(p.Button,{color:"primary",onClick:b,loading:!1,children:e.crop}),l.jsx(p.Button,{color:"primary",variant:"outlined",onClick:x,loading:!1,children:e.reset})]})]})]})})},dg=Be(l.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),fg=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=y.useState(!1),[s,c]=y.useState(!1),[u,f]=y.useState(!1),[d,h]=y.useState(!1),[g,v]=y.useState(""),[m,b]=y.useState("primary"),[x,S]=y.useState(""),C=y.useRef(null),I=()=>h(!d),w=()=>{C.current&&C.current.click()},A=new Vp,E=y.useContext(aa),k=()=>{v(""),c(!1)},B=M=>{let V="",Y="primary";switch(M){case"copy_url":V=e.urlCopiedToClipboardMessage,Y="primary";break;case"image_deleted":V=e.imageDeletedMessage,Y="primary";break;case"image_reset":V=e.imageResetMessage,Y="primary";break;case"upload_success":V=e.uploadingImageMessage,Y="success";break;case"upload_failed":V=e.uploadingImageErrorMessage,Y="danger";break;case"sign_in_url_failed":V=e.generateSignedInUrlErrorMessage,Y="danger";break;case"encrypting_file_failed":V=e.encryptingImageErrorMessage,Y="danger";break}b(Y),v(V),c(!0)},G=()=>f(!u),O=()=>{i(),B("image_deleted")},T=M=>{navigator.clipboard.writeText(M),B("copy_url")},N=M=>_(this,null,function*(){M.persist();const V=M.target.files?M.target.files[0]:null;if(V){a(!0);try{const Y=V.type.split("/")[1],Z=yield A.readFileAndHash(V),D=(yield A.generateHashFileName(V))+"."+Y,L={image_type:Y,image_file_name:D,image_size:V.size,base64_sum:Z},U=yield E==null?void 0:E.https.generateSignedInUrl(L);if(U!=null&&U.ok){const W=yield U.json(),ie={"Content-Type":V.type,"Content-MD5":Z};try{const le=new File([V],D,{type:V.type}),ae=yield E==null?void 0:E.https.storeInBucket(W.data.signed_url,le,ie);r(ae||""),S(ae),B("upload_success")}catch(le){console.error("There was a problem with uploading the file: ",le),B("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield U==null?void 0:U.json()),B("sign_in_url_failed")}catch(Y){console.error("There was a problem with encrypting file...",Y),B("encrypting_file_failed")}a(!1)}}),H=M=>_(this,null,function*(){if(M){a(!0);try{const V=M.type.split("/")[1],Y=yield A.readFileAndHash(M),Z=(yield A.generateHashFileName(M))+"."+V,D={image_type:V,image_file_name:Z,image_size:M.size,base64_sum:Y},L=yield E==null?void 0:E.https.generateSignedInUrl(D);if(L!=null&&L.ok){const U=yield L.json(),W={"Content-Type":M.type,"Content-MD5":Y};try{const ie=new File([M],Z,{type:M.type}),le=yield E==null?void 0:E.https.storeInBucket(U.data.signed_url,ie,W);r(le||""),B("upload_success")}catch(ie){console.error("There was a problem with uploading the file: ",ie),B("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield L==null?void 0:L.json()),B("sign_in_url_failed")}catch(V){console.error("There was a problem with encrypting file...",V),B("encrypting_file_failed")}a(!1)}}),j=()=>{r(x),B("image_reset")},F=M=>{r(M),S(M)};return l.jsxs(l.Fragment,{children:[l.jsxs(p.Card,{sx:{marginBottom:"10px"},children:[l.jsxs(p.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[l.jsx(p.Typography,{level:"title-lg",children:t}),l.jsx(p.Tooltip,{title:e.clearImage,children:l.jsx(p.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:O,children:l.jsx(Dp,{})})})]}),l.jsxs(p.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[l.jsxs(p.Skeleton,{loading:o,animation:"wave",children:[n?l.jsx(p.Box,{component:"img",src:n,loading:"lazy",alt:t,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):l.jsx($c,{sx:{fontSize:"3rem",opacity:.2}}),n?l.jsx(p.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:l.jsx(Wp,{sx:{fontSize:"3rem",color:"#fff"}})}):l.jsx(l.Fragment,{})]}),l.jsx(p.Tooltip,{title:e.copyUrl,children:l.jsx(oi,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:l.jsx(Oe.ContentCopy,{})})}),l.jsx(p.Tooltip,{title:e.viewImage,children:l.jsx(oi,{onClick:G,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:l.jsx(Yp,{})})}),l.jsx(p.Tooltip,{title:e.cropImage,children:l.jsx(oi,{onClick:I,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:l.jsx(dg,{})})})]}),l.jsx(p.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:l.jsxs(oi,{sx:{width:"100%"},onClick:w,children:[l.jsx(Oe.Upload,{})," ",e.uploadImage,l.jsx(Kp,{type:"file",accept:"image/*",onChange:N,ref:C})]})}),E!=null&&E.https.sportal365Config?l.jsx(p.AccordionGroup,{variant:"soft",children:l.jsxs(p.Accordion,{children:[l.jsx(p.AccordionSummary,{children:l.jsx(p.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),l.jsx(p.AccordionDetails,{children:l.jsx(Gp,{labels:e,onChangeImages:F})})]})}):l.jsx(l.Fragment,{})]}),l.jsx(Ke,{showToast:s,message:g,color:m,hideToast:k}),l.jsx(Hp,{title:e.viewImage,open:u,imageSrc:n,toggleModal:G}),l.jsx(ug,{labels:e,open:d,imageSrc:n,toggleModal:I,uploadImage:H,resetDefaultImageUrl:j})]})},BP=e=>new Map().set("main_logo",e.mainLogo).set("mobile_logo",e.mobileLogo).set("background_image",e.backgroundImage).set("mobile_background_image",e.mobileBackgroundImage).set("additional_image",e.additionalImage),$P=e=>new Map().set("primary_color",e.primaryColor).set("secondary_color",e.secondaryColor).set("content_color",e.contentColor).set("background_color",e.backgroundColor).set("border_color",e.borderColor).set("additional_color",e.additionalColor),FP=e=>new Map().set("primary_url",e.primaryUrl).set("secondary_url",e.secondaryUrl).set("privacy_policy_url",e.privacyPolicyUrl).set("terms_and_conditions_url",e.termsAndConditionsUrl).set("additional_url",e.additionalUrl),NP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=y.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],s=BP(e),c=$P(e),u=FP(e),f=(v,m)=>{const b=v.target.value;o.colors[m]=b,n(o)},d=(v,m)=>{const b=v.target.value;o.urls[m]=b,n(o)},h=(v,m)=>{o.images[m]=v,n(o)},g=v=>{o.images[v]="",n(o)};return l.jsx(p.Box,{children:l.jsxs(Qh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[l.jsxs(Jh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${xc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[l.jsxs(Kr,{children:[l.jsx(p.ListItemDecorator,{children:l.jsx($c,{sx:{width:"20px"}})}),e.images]}),l.jsxs(Kr,{children:[l.jsx(p.ListItemDecorator,{children:l.jsx(u_,{sx:{width:"20px"}})}),e.colors]}),l.jsxs(Kr,{children:[l.jsx(p.ListItemDecorator,{children:l.jsx(d_,{sx:{width:"20px"}})}),e.urls]})]}),l.jsxs(ri,{value:0,sx:{px:0},children:[l.jsx(fg,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:v=>h(v,"main_logo"),clearImage:()=>g("main_logo")}),l.jsx(p.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?l.jsx(l.Fragment,{children:a.map(v=>l.jsx(fg,{labels:e,title:s.get(v),image:o.images[v],onChangeImages:m=>h(m,v),clearImage:()=>g(v)},`branding-image-${v}`))}):l.jsx(l.Fragment,{})]}),l.jsx(ri,{value:1,sx:{px:0},children:l.jsx(p.Box,{children:Object.keys(o.colors).map(v=>l.jsx(p.Box,{mb:2,children:l.jsx(on,{size:"sm",label:c.get(v),placeholder:"",defaultValue:o.colors[v],required:!1,onChange:m=>f(m,v)})},`branding-color-${v}`))})}),l.jsx(ri,{value:2,sx:{px:0},children:l.jsx(p.Box,{children:Object.keys(o.urls).map(v=>l.jsx(p.Box,{mb:2,children:l.jsx(on,{size:"sm",label:u.get(v),placeholder:"",defaultValue:o.urls[v],required:!1,onChange:m=>d(m,v)})},`branding-url-${v}`))})})]})})},hg=Be(l.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutlineOutlined"),pg=e=>{const t=()=>_(this,null,function*(){yield qi(e.environment).signOut()});return l.jsx(p.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},zP=Be(l.jsx("path",{d:"m8.71 11.71 2.59 2.59c.39.39 1.02.39 1.41 0l2.59-2.59c.63-.63.18-1.71-.71-1.71H9.41c-.89 0-1.33 1.08-.7 1.71"}),"ArrowDropDownRounded"),jP=Be(l.jsx("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm0 6-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25zm-7.5-5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zm-1.51 3.49L9 15.17l-.99-2.18L5.83 12l2.18-.99L9 8.83l.99 2.18 2.18.99z"}),"AutoAwesomeOutlined"),UP=(e,t)=>{let n=[{id:"football_post_match",label:t.generateFootballPostMatchLabel}];switch(e){case"classic_quiz":n=[...n,{id:"formula1_post_event",label:(t==null?void 0:t.generateFormula1PostEventLabel)||""}];break}return n},VP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,generateLabels:r,entityType:i,environment:o,onClickCreate:a,onClickCreateFromTemplate:s,onClickGenerate:c})=>{const u=()=>{if(!r||!c)return l.jsx(l.Fragment,{});const f=UP(i,r);return l.jsxs(p.Dropdown,{children:[l.jsxs(p.ButtonGroup,{variant:"solid",size:"md",color:"neutral",children:[l.jsx(p.MenuButton,{slots:{root:p.Button},startDecorator:l.jsx(jP,{}),sx:{border:1,borderColor:"neutral.outlinedBorder",borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0,bgcolor:"transparent",color:"neutral.outlinedColor","&:hover":{bgcolor:"neutral.outlinedActiveBg"}},children:r.generateAIEntityLabel}),l.jsx(p.MenuButton,{slots:{root:p.IconButton},"aria-label":"More AI quiz options",sx:{border:1,borderColor:"neutral.outlinedBorder",borderLeft:"none",bgcolor:"transparent",color:"neutral.outlinedColor","&:hover":{bgcolor:"neutral.outlinedActiveBg"},borderTopRightRadius:"6px !important",borderBottomRightRadius:"6px !important"},children:l.jsx(zP,{})})]}),l.jsx(p.Menu,{placement:"bottom",sx:{maxHeight:240,borderRadius:12,boxShadow:"md"},children:f.map(d=>l.jsx(p.MenuItem,{onClick:()=>c(d.id),children:d.label},d.id))})]})};return l.jsx(l.Fragment,{children:l.jsxs(p.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[l.jsxs(p.Stack,{direction:"row",alignItems:"center",spacing:2,children:[l.jsx(p.Button,{startDecorator:l.jsx(hg,{}),variant:"solid",color:"primary",onClick:a,children:e}),t?l.jsx(p.Button,{startDecorator:l.jsx(hg,{}),variant:"outlined",color:"primary",onClick:s,children:t}):l.jsx(l.Fragment,{}),u()]}),n?l.jsx(pg,{signOutLabel:n,environment:o}):l.jsx(l.Fragment,{})]})})};var gg={},qc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],si={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console!="undefined"&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},uo={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},jt=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},an=function(e){return e===!0?1:0};function mg(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var Qc=function(e){return e instanceof Array?e:[e]};function Rt(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function $e(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,n!==void 0&&(r.textContent=n),r}function as(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function vg(e,t){if(t(e))return e;if(e.parentNode)return vg(e.parentNode,t)}function ss(e,t){var n=$e("div","numInputWrapper"),r=$e("input","numInput "+e),i=$e("span","arrowUp"),o=$e("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Kt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var Jc=function(){},ls=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},HP={D:Jc,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*an(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:Jc,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:Jc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},Er={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},fo={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[fo.w(e,t,n)]},F:function(e,t,n){return ls(fo.n(e,t,n)-1,!1,t)},G:function(e,t,n){return jt(fo.h(e,t,n))},H:function(e){return jt(e.getHours())},J:function(e,t){return t.ordinal!==void 0?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[an(e.getHours()>11)]},M:function(e,t){return ls(e.getMonth(),!0,t)},S:function(e){return jt(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return jt(e.getFullYear(),4)},d:function(e){return jt(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return jt(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return jt(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},bg=function(e){var t=e.config,n=t===void 0?si:t,r=e.l10n,i=r===void 0?uo:r,o=e.isMobile,a=o===void 0?!1:o;return function(s,c,u){var f=u||i;return n.formatDate!==void 0&&!a?n.formatDate(s,c,f):c.split("").map(function(d,h,g){return fo[d]&&g[h-1]!=="\\"?fo[d](s,f,n):d!=="\\"?d:""}).join("")}},Xc=function(e){var t=e.config,n=t===void 0?si:t,r=e.l10n,i=r===void 0?uo:r;return function(o,a,s,c){if(!(o!==0&&!o)){var u=c||i,f,d=o;if(o instanceof Date)f=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)f=new Date(o);else if(typeof o=="string"){var h=a||(n||si).dateFormat,g=String(o).trim();if(g==="today")f=new Date,s=!0;else if(n&&n.parseDate)f=n.parseDate(o,h);else if(/Z$/.test(g)||/GMT$/.test(g))f=new Date(o);else{for(var v=void 0,m=[],b=0,x=0,S="";b<h.length;b++){var C=h[b],I=C==="\\",w=h[b-1]==="\\"||I;if(Er[C]&&!w){S+=Er[C];var A=new RegExp(S).exec(o);A&&(v=!0)&&m[C!=="Y"?"push":"unshift"]({fn:HP[C],val:A[++x]})}else I||(S+=".")}f=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),m.forEach(function(E){var k=E.fn,B=E.val;return f=k(f,B,u)||f}),f=v?f:void 0}}if(!(f instanceof Date&&!isNaN(f.getTime()))){n.errorHandler(new Error("Invalid date provided: "+d));return}return s===!0&&f.setHours(0,0,0,0),f}}};function qt(e,t,n){return n===void 0&&(n=!0),n!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var WP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},Zc=function(e,t,n){return e*3600+t*60+n},GP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},YP={DAY:864e5};function eu(e){var t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(e.minDate!==void 0){var i=e.minDate.getHours(),o=e.minDate.getMinutes(),a=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<o&&(n=o),t===i&&n===o&&r<a&&(r=e.minDate.getSeconds())}if(e.maxDate!==void 0){var s=e.maxDate.getHours(),c=e.maxDate.getMinutes();t=Math.min(t,s),t===s&&(n=Math.min(c,n)),t===s&&n===c&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var r=function(s){s&&Object.keys(s).forEach(function(c){return e[c]=s[c]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var _t=function(){return _t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_t.apply(this,arguments)},yg=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},KP=300;function qP(e,t){var n={config:_t(_t({},si),gt.defaultConfig),l10n:uo};n.parseDate=Xc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=m,n._setHoursFromDate=h,n._positionCalendar=Ce,n.changeMonth=D,n.changeYear=ae,n.clear=L,n.close=U,n.onMouseOver=ve,n._createElement=$e,n.createDay=A,n.destroy=W,n.isEnabled=ee,n.jumpToDate=S,n.updateValue=fn,n.open=yt,n.redraw=De,n.set=Ut,n.setDate=Qt,n.toggle=zu;function r(){n.utils={getDaysInMonth:function(P,z){return P===void 0&&(P=n.currentMonth),z===void 0&&(z=n.currentYear),P===1&&(z%4===0&&z%100!==0||z%400===0)?29:n.l10n.daysInMonth[P]}}}function i(){n.element=n.input=e,n.isOpen=!1,Pt(),pe(),In(),zs(),r(),n.isMobile||w(),x(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),fn(!1)),s();var P=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&P&&Ce(),He("onReady")}function o(){var P;return((P=n.calendarContainer)===null||P===void 0?void 0:P.getRootNode()).activeElement||document.activeElement}function a(P){return P.bind(n)}function s(){var P=n.config;P.weekNumbers===!1&&P.showMonths===1||P.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var z=(n.days.offsetWidth+1)*P.showMonths;n.daysContainer.style.width=z+"px",n.calendarContainer.style.width=z+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function c(P){if(n.selectedDates.length===0){var z=n.config.minDate===void 0||qt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),q=eu(n.config);z.setHours(q.hours,q.minutes,q.seconds,z.getMilliseconds()),n.selectedDates=[z],n.latestSelectedDateObj=z}P!==void 0&&P.type!=="blur"&&It(P);var te=n._input.value;d(),fn(),n._input.value!==te&&n._debouncedChange()}function u(P,z){return P%12+12*an(z===n.l10n.amPM[1])}function f(P){switch(P%24){case 0:case 12:return 12;default:return P%12}}function d(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var P=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,z=(parseInt(n.minuteElement.value,10)||0)%60,q=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(P=u(P,n.amPM.textContent));var te=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&qt(n.latestSelectedDateObj,n.config.minDate,!0)===0,oe=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&qt(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var ue=Zc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),we=Zc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),de=Zc(P,z,q);if(de>we&&de<ue){var Se=GP(ue);P=Se[0],z=Se[1],q=Se[2]}}else{if(oe){var he=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;P=Math.min(P,he.getHours()),P===he.getHours()&&(z=Math.min(z,he.getMinutes())),z===he.getMinutes()&&(q=Math.min(q,he.getSeconds()))}if(te){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;P=Math.max(P,me.getHours()),P===me.getHours()&&z<me.getMinutes()&&(z=me.getMinutes()),z===me.getMinutes()&&(q=Math.max(q,me.getSeconds()))}}g(P,z,q)}}function h(P){var z=P||n.latestSelectedDateObj;z&&z instanceof Date&&g(z.getHours(),z.getMinutes(),z.getSeconds())}function g(P,z,q){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(P%24,z,q||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=jt(n.config.time_24hr?P:(12+P)%12+12*an(P%12===0)),n.minuteElement.value=jt(z),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[an(P>=12)]),n.secondElement!==void 0&&(n.secondElement.value=jt(q)))}function v(P){var z=Kt(P),q=parseInt(z.value)+(P.delta||0);(q/1e3>1||P.key==="Enter"&&!/[^\d]/.test(q.toString()))&&ae(q)}function m(P,z,q,te){if(z instanceof Array)return z.forEach(function(oe){return m(P,oe,q,te)});if(P instanceof Array)return P.forEach(function(oe){return m(oe,z,q,te)});P.addEventListener(z,q,te),n._handlers.push({remove:function(){return P.removeEventListener(z,q,te)}})}function b(){He("onChange")}function x(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(q){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+q+"]"),function(te){return m(te,"click",n[q])})}),n.isMobile){Nu();return}var P=mg(ze,50);if(n._debouncedChange=mg(b,KP),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(n.daysContainer,"mouseover",function(q){n.config.mode==="range"&&ve(Kt(q))}),m(n._input,"keydown",ce),n.calendarContainer!==void 0&&m(n.calendarContainer,"keydown",ce),!n.config.inline&&!n.config.static&&m(window,"resize",P),window.ontouchstart!==void 0?m(window.document,"touchstart",le):m(window.document,"mousedown",le),m(window.document,"focus",le,{capture:!0}),n.config.clickOpens===!0&&(m(n._input,"focus",n.open),m(n._input,"click",n.open)),n.daysContainer!==void 0&&(m(n.monthNav,"click",Us),m(n.monthNav,["keyup","increment"],v),m(n.daysContainer,"click",At)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var z=function(q){return Kt(q).select()};m(n.timeContainer,["increment"],c),m(n.timeContainer,"blur",c,{capture:!0}),m(n.timeContainer,"click",C),m([n.hourElement,n.minuteElement],["focus","click"],z),n.secondElement!==void 0&&m(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&m(n.amPM,"click",function(q){c(q)})}n.config.allowInput&&m(n._input,"blur",J)}function S(P,z){var q=P!==void 0?n.parseDate(P):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),te=n.currentYear,oe=n.currentMonth;try{q!==void 0&&(n.currentYear=q.getFullYear(),n.currentMonth=q.getMonth())}catch(ue){ue.message="Invalid date supplied: "+q,n.config.errorHandler(ue)}z&&n.currentYear!==te&&(He("onYearChange"),N()),z&&(n.currentYear!==te||n.currentMonth!==oe)&&He("onMonthChange"),n.redraw()}function C(P){var z=Kt(P);~z.className.indexOf("arrow")&&I(P,z.classList.contains("arrowUp")?1:-1)}function I(P,z,q){var te=P&&Kt(P),oe=q||te&&te.parentNode&&te.parentNode.firstChild,ue=wi("increment");ue.delta=z,oe&&oe.dispatchEvent(ue)}function w(){var P=window.document.createDocumentFragment();if(n.calendarContainer=$e("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(P.appendChild(F()),n.innerContainer=$e("div","flatpickr-innerContainer"),n.config.weekNumbers){var z=Z(),q=z.weekWrapper,te=z.weekNumbers;n.innerContainer.appendChild(q),n.weekNumbers=te,n.weekWrapper=q}n.rContainer=$e("div","flatpickr-rContainer"),n.rContainer.appendChild(V()),n.daysContainer||(n.daysContainer=$e("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),P.appendChild(n.innerContainer)}n.config.enableTime&&P.appendChild(M()),Rt(n.calendarContainer,"rangeMode",n.config.mode==="range"),Rt(n.calendarContainer,"animate",n.config.animate===!0),Rt(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(P);var oe=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!oe&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var ue=$e("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ue,n.element),ue.appendChild(n.element),n.altInput&&ue.appendChild(n.altInput),ue.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function A(P,z,q,te){var oe=ee(z,!0),ue=$e("span",P,z.getDate().toString());return ue.dateObj=z,ue.$i=te,ue.setAttribute("aria-label",n.formatDate(z,n.config.ariaDateFormat)),P.indexOf("hidden")===-1&&qt(z,n.now)===0&&(n.todayDateElem=ue,ue.classList.add("today"),ue.setAttribute("aria-current","date")),oe?(ue.tabIndex=-1,Do(z)&&(ue.classList.add("selected"),n.selectedDateElem=ue,n.config.mode==="range"&&(Rt(ue,"startRange",n.selectedDates[0]&&qt(z,n.selectedDates[0],!0)===0),Rt(ue,"endRange",n.selectedDates[1]&&qt(z,n.selectedDates[1],!0)===0),P==="nextMonthDay"&&ue.classList.add("inRange")))):ue.classList.add("flatpickr-disabled"),n.config.mode==="range"&&js(z)&&!Do(z)&&ue.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&P!=="prevMonthDay"&&te%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(z)+"</span>"),He("onDayCreate",ue),ue}function E(P){P.focus(),n.config.mode==="range"&&ve(P)}function k(P){for(var z=P>0?0:n.config.showMonths-1,q=P>0?n.config.showMonths:-1,te=z;te!=q;te+=P)for(var oe=n.daysContainer.children[te],ue=P>0?0:oe.children.length-1,we=P>0?oe.children.length:-1,de=ue;de!=we;de+=P){var Se=oe.children[de];if(Se.className.indexOf("hidden")===-1&&ee(Se.dateObj))return Se}}function B(P,z){for(var q=P.className.indexOf("Month")===-1?P.dateObj.getMonth():n.currentMonth,te=z>0?n.config.showMonths:-1,oe=z>0?1:-1,ue=q-n.currentMonth;ue!=te;ue+=oe)for(var we=n.daysContainer.children[ue],de=q-n.currentMonth===ue?P.$i+z:z<0?we.children.length-1:0,Se=we.children.length,he=de;he>=0&&he<Se&&he!=(z>0?Se:-1);he+=oe){var me=we.children[he];if(me.className.indexOf("hidden")===-1&&ee(me.dateObj)&&Math.abs(P.$i-he)>=Math.abs(z))return E(me)}n.changeMonth(oe),G(k(oe),0)}function G(P,z){var q=o(),te=ne(q||document.body),oe=P!==void 0?P:te?q:n.selectedDateElem!==void 0&&ne(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&ne(n.todayDateElem)?n.todayDateElem:k(z>0?1:-1);oe===void 0?n._input.focus():te?B(oe,z):E(oe)}function O(P,z){for(var q=(new Date(P,z,1).getDay()-n.l10n.firstDayOfWeek+7)%7,te=n.utils.getDaysInMonth((z-1+12)%12,P),oe=n.utils.getDaysInMonth(z,P),ue=window.document.createDocumentFragment(),we=n.config.showMonths>1,de=we?"prevMonthDay hidden":"prevMonthDay",Se=we?"nextMonthDay hidden":"nextMonthDay",he=te+1-q,me=0;he<=te;he++,me++)ue.appendChild(A("flatpickr-day "+de,new Date(P,z-1,he),he,me));for(he=1;he<=oe;he++,me++)ue.appendChild(A("flatpickr-day",new Date(P,z,he),he,me));for(var Me=oe+1;Me<=42-q&&(n.config.showMonths===1||me%7!==0);Me++,me++)ue.appendChild(A("flatpickr-day "+Se,new Date(P,z+1,Me%oe),Me,me));var Dt=$e("div","dayContainer");return Dt.appendChild(ue),Dt}function T(){if(n.daysContainer!==void 0){as(n.daysContainer),n.weekNumbers&&as(n.weekNumbers);for(var P=document.createDocumentFragment(),z=0;z<n.config.showMonths;z++){var q=new Date(n.currentYear,n.currentMonth,1);q.setMonth(n.currentMonth+z),P.appendChild(O(q.getFullYear(),q.getMonth()))}n.daysContainer.appendChild(P),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&ve()}}function N(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var P=function(te){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&te<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&te>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var z=0;z<12;z++)if(P(z)){var q=$e("option","flatpickr-monthDropdown-month");q.value=new Date(n.currentYear,z).getMonth().toString(),q.textContent=ls(z,n.config.shorthandCurrentMonth,n.l10n),q.tabIndex=-1,n.currentMonth===z&&(q.selected=!0),n.monthsDropdownContainer.appendChild(q)}}}function H(){var P=$e("div","flatpickr-month"),z=window.document.createDocumentFragment(),q;n.config.showMonths>1||n.config.monthSelectorType==="static"?q=$e("span","cur-month"):(n.monthsDropdownContainer=$e("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),m(n.monthsDropdownContainer,"change",function(we){var de=Kt(we),Se=parseInt(de.value,10);n.changeMonth(Se-n.currentMonth),He("onMonthChange")}),N(),q=n.monthsDropdownContainer);var te=ss("cur-year",{tabindex:"-1"}),oe=te.getElementsByTagName("input")[0];oe.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&oe.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(oe.setAttribute("max",n.config.maxDate.getFullYear().toString()),oe.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ue=$e("div","flatpickr-current-month");return ue.appendChild(q),ue.appendChild(te),z.appendChild(ue),P.appendChild(z),{container:P,yearElement:oe,monthElement:q}}function j(){as(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var P=n.config.showMonths;P--;){var z=H();n.yearElements.push(z.yearElement),n.monthElements.push(z.monthElement),n.monthNav.appendChild(z.container)}n.monthNav.appendChild(n.nextMonthNav)}function F(){return n.monthNav=$e("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=$e("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=$e("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,j(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(P){n.__hidePrevMonthArrow!==P&&(Rt(n.prevMonthNav,"flatpickr-disabled",P),n.__hidePrevMonthArrow=P)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(P){n.__hideNextMonthArrow!==P&&(Rt(n.nextMonthNav,"flatpickr-disabled",P),n.__hideNextMonthArrow=P)}}),n.currentYearElement=n.yearElements[0],Si(),n.monthNav}function M(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var P=eu(n.config);n.timeContainer=$e("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var z=$e("span","flatpickr-time-separator",":"),q=ss("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=q.getElementsByTagName("input")[0];var te=ss("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=te.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=jt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?P.hours:f(P.hours)),n.minuteElement.value=jt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():P.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(q),n.timeContainer.appendChild(z),n.timeContainer.appendChild(te),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var oe=ss("flatpickr-second");n.secondElement=oe.getElementsByTagName("input")[0],n.secondElement.value=jt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():P.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild($e("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(oe)}return n.config.time_24hr||(n.amPM=$e("span","flatpickr-am-pm",n.l10n.amPM[an((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function V(){n.weekdayContainer?as(n.weekdayContainer):n.weekdayContainer=$e("div","flatpickr-weekdays");for(var P=n.config.showMonths;P--;){var z=$e("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(z)}return Y(),n.weekdayContainer}function Y(){if(n.weekdayContainer){var P=n.l10n.firstDayOfWeek,z=yg(n.l10n.weekdays.shorthand);P>0&&P<z.length&&(z=yg(z.splice(P,z.length),z.splice(0,P)));for(var q=n.config.showMonths;q--;)n.weekdayContainer.children[q].innerHTML=`
2453
+ `,PP=1,DP=3,OP=function(e){xy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=K.createRef(),n.videoRef=K.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document!="undefined"?document:null,n.currentWindow=typeof window!="undefined"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver=="undefined"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=AP(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=i.crop,a=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}else if(n.props.initialCroppedAreaPixels){var s=EP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=s.crop,a=s.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,s,c,u=n.imageRef.current||n.videoRef.current;if(u&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var f=n.containerRect.width/n.containerRect.height,d=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,h=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((a=n.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,g=u.offsetWidth<d||u.offsetHeight<h,v=d/h,m=void 0;if(g)switch(n.state.mediaObjectFit){default:case"contain":m=f>v?{width:n.containerRect.height*v,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/v};break;case"horizontal-cover":m={width:n.containerRect.width,height:n.containerRect.width/v};break;case"vertical-cover":m={width:n.containerRect.height*v,height:n.containerRect.height};break}else m={width:u.offsetWidth,height:u.offsetHeight};n.mediaSize=Et(Et({},m),{naturalWidth:d,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:xP(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==b.height||((c=n.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(t.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(t.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(t.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=t.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+r.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,a=r.x,s=r.y;n.dragStartPosition={x:a,y:s},n.dragStartCrop=Et({},n.props.crop),(o=(i=n.props).onInteractionStart)===null||o===void 0||o.call(i)},n.onDrag=function(r){var i=r.x,o=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||o===void 0)){var a=i-n.dragStartPosition.x,s=o-n.dragStartPosition.y,c={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+s},u=n.props.restrictPosition?rs(c,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):c;n.props.onCropChange(u)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=t.getMousePoint(r),o=yP(r).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,c;return(c=(s=n.props).onInteractionStart)===null||c===void 0?void 0:c.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,c;return(c=(s=n.props).onInteractionEnd)===null||c===void 0?void 0:c.call(s)})},250)}},n.getPointOnContainer=function(r,i){var o=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-i.x),y:n.containerRect.height/2-(a-i.y)}},n.getPointOnMedia=function(r){var i=r.x,o=r.y,a=n.props,s=a.crop,c=a.zoom;return{x:(i+s.x)/c,y:(o+s.y)/c}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,s=a.shouldUpdatePosition,c=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var u=is(r,n.props.minZoom,n.props.maxZoom);if(c){var f=n.getPointOnContainer(i,n.containerPosition),d=n.getPointOnMedia(f),h={x:d.x*u-f.x,y:d.y*u-f.y},g=n.props.restrictPosition?rs(h,n.mediaSize,n.state.cropSize,u,n.props.rotation):h;n.props.onCropChange(g)}n.props.onZoomChange(u)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?rs(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return wP(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?rs(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver=="undefined"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=_P,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver=="undefined"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(n){var r,i,o,a,s,c,u,f,d;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=n.crop)===null||u===void 0?void 0:u.y)!==((f=this.props.crop)===null||f===void 0?void 0:f.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((d=this.videoRef.current)===null||d===void 0||d.load());var h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},t.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},t.prototype.getObjectFit=function(){var n,r,i,o;if(this.props.objectFit==="cover"){var a=this.imageRef.current||this.videoRef.current;if(a&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,c=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,f=c/u;return f<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(n){var r=t.getTouchPoint(n.touches[0]),i=t.getTouchPoint(n.touches[1]);this.lastPinchDistance=sg(r,i),this.lastPinchRotation=lg(r,i),this.onDragStart(cg(r,i))},t.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=t.getTouchPoint(n.touches[0]),o=t.getTouchPoint(n.touches[1]),a=cg(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=sg(i,o),c=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(c,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var u=lg(i,o),f=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(f),r.lastPinchRotation=u})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,s=i.mediaProps,c=i.transform,u=i.crop,f=u.x,d=u.y,h=i.rotation,g=i.zoom,v=i.cropShape,m=i.showGrid,b=i.style,x=b.containerStyle,S=b.cropAreaStyle,C=b.mediaStyle,I=i.classes,w=I.containerClassName,A=I.cropAreaClassName,E=I.mediaClassName,k=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return K.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(G){return n.containerRef=G},"data-testid":"container",style:x,className:os("reactEasyCrop_Container",w)},o?K.createElement("img",Et({alt:"",className:os("reactEasyCrop_Image",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{src:o,ref:this.imageRef,style:Et(Et({},C),{transform:c||"translate(".concat(f,"px, ").concat(d,"px) rotate(").concat(h,"deg) scale(").concat(g,")")}),onLoad:this.onMediaLoad})):a&&K.createElement("video",Et({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:os("reactEasyCrop_Video",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:Et(Et({},C),{transform:c||"translate(".concat(f,"px, ").concat(d,"px) rotate(").concat(h,"deg) scale(").concat(g,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function($){return K.createElement("source",Et({key:$.src},$))})),this.state.cropSize&&K.createElement("div",{style:Et(Et({},S),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:os("reactEasyCrop_CropArea",v==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:DP,minZoom:PP,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t}(K.Component);const RP=e=>new Promise((t,n)=>{const r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",i=>n(i)),r.crossOrigin="Anonymous",r.src=e});function MP(e){return e*Math.PI/180}function LP(e,t,n=0){return _(this,null,function*(){const r=yield RP(e),i=document.createElement("canvas"),o=i.getContext("2d"),s=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=s,i.height=s,o.translate(s/2,s/2),o.rotate(MP(n)),o.translate(-s/2,-s/2),o.drawImage(r,s/2-r.width*.5,s/2-r.height*.5);const c=o.getImageData(0,0,s,s);return i.width=t.width,i.height=t.height,o.putImageData(c,Math.round(0-s/2+r.width*.5-t.x),Math.round(0-s/2+r.height*.5-t.y)),new Promise(u=>i.toBlob(f=>{const d=new File([f],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});u(d)},"image/jpeg"))})}const ug=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,s]=y.useState({x:0,y:0}),[c,u]=y.useState(1),[f,d]=y.useState(16/9),[h,g]=y.useState(null),v=(C,I)=>{g(I)},m=(C,I)=>d(I),b=()=>_(this,null,function*(){const C=yield LP(n,h);S(),o(C)}),x=()=>{S(),r()},S=()=>{s({x:0,y:0}),u(1),d(16/9),g(null)};return l.jsx(p.Modal,{open:t,onClose:i,children:l.jsxs(p.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l.jsx(p.ModalClose,{}),l.jsx(p.DialogTitle,{children:e.cropImage}),l.jsxs(p.DialogContent,{sx:{width:"100%"},children:[l.jsx(p.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:l.jsx(OP,{image:n,crop:a,zoom:c,aspect:f,onCropChange:s,onCropComplete:v,onZoomChange:u})}),l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e.aspectRatio}),l.jsxs(p.Select,{value:f,onChange:m,children:[l.jsx(p.Option,{value:4/3,children:"4 / 3"}),l.jsx(p.Option,{value:16/9,children:"16 / 9"}),l.jsx(p.Option,{value:1,children:"1"})]})]}),l.jsx(p.Box,{mb:1,mx:2,children:l.jsx(p.Slider,{value:c,min:1,max:3,step:.1,onChange:(C,I)=>u(I)})}),l.jsxs(p.DialogActions,{children:[l.jsx(p.Button,{color:"primary",onClick:b,loading:!1,children:e.crop}),l.jsx(p.Button,{color:"primary",variant:"outlined",onClick:x,loading:!1,children:e.reset})]})]})]})})},dg=Be(l.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),fg=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=y.useState(!1),[s,c]=y.useState(!1),[u,f]=y.useState(!1),[d,h]=y.useState(!1),[g,v]=y.useState(""),[m,b]=y.useState("primary"),[x,S]=y.useState(""),C=y.useRef(null),I=()=>h(!d),w=()=>{C.current&&C.current.click()},A=new Vp,E=y.useContext(aa),k=()=>{v(""),c(!1)},$=M=>{let V="",Y="primary";switch(M){case"copy_url":V=e.urlCopiedToClipboardMessage,Y="primary";break;case"image_deleted":V=e.imageDeletedMessage,Y="primary";break;case"image_reset":V=e.imageResetMessage,Y="primary";break;case"upload_success":V=e.uploadingImageMessage,Y="success";break;case"upload_failed":V=e.uploadingImageErrorMessage,Y="danger";break;case"sign_in_url_failed":V=e.generateSignedInUrlErrorMessage,Y="danger";break;case"encrypting_file_failed":V=e.encryptingImageErrorMessage,Y="danger";break}b(Y),v(V),c(!0)},G=()=>f(!u),O=()=>{i(),$("image_deleted")},T=M=>{navigator.clipboard.writeText(M),$("copy_url")},N=M=>_(this,null,function*(){M.persist();const V=M.target.files?M.target.files[0]:null;if(V){a(!0);try{const Y=V.type.split("/")[1],Z=yield A.readFileAndHash(V),D=(yield A.generateHashFileName(V))+"."+Y,L={image_type:Y,image_file_name:D,image_size:V.size,base64_sum:Z},U=yield E==null?void 0:E.https.generateSignedInUrl(L);if(U!=null&&U.ok){const W=yield U.json(),ie={"Content-Type":V.type,"Content-MD5":Z};try{const le=new File([V],D,{type:V.type}),ae=yield E==null?void 0:E.https.storeInBucket(W.data.signed_url,le,ie);r(ae||""),S(ae),$("upload_success")}catch(le){console.error("There was a problem with uploading the file: ",le),$("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield U==null?void 0:U.json()),$("sign_in_url_failed")}catch(Y){console.error("There was a problem with encrypting file...",Y),$("encrypting_file_failed")}a(!1)}}),H=M=>_(this,null,function*(){if(M){a(!0);try{const V=M.type.split("/")[1],Y=yield A.readFileAndHash(M),Z=(yield A.generateHashFileName(M))+"."+V,D={image_type:V,image_file_name:Z,image_size:M.size,base64_sum:Y},L=yield E==null?void 0:E.https.generateSignedInUrl(D);if(L!=null&&L.ok){const U=yield L.json(),W={"Content-Type":M.type,"Content-MD5":Y};try{const ie=new File([M],Z,{type:M.type}),le=yield E==null?void 0:E.https.storeInBucket(U.data.signed_url,ie,W);r(le||""),$("upload_success")}catch(ie){console.error("There was a problem with uploading the file: ",ie),$("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield L==null?void 0:L.json()),$("sign_in_url_failed")}catch(V){console.error("There was a problem with encrypting file...",V),$("encrypting_file_failed")}a(!1)}}),j=()=>{r(x),$("image_reset")},F=M=>{r(M),S(M)};return l.jsxs(l.Fragment,{children:[l.jsxs(p.Card,{sx:{marginBottom:"10px"},children:[l.jsxs(p.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[l.jsx(p.Typography,{level:"title-lg",children:t}),l.jsx(p.Tooltip,{title:e.clearImage,children:l.jsx(p.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:O,children:l.jsx(Dp,{})})})]}),l.jsxs(p.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[l.jsxs(p.Skeleton,{loading:o,animation:"wave",children:[n?l.jsx(p.Box,{component:"img",src:n,loading:"lazy",alt:t,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):l.jsx($c,{sx:{fontSize:"3rem",opacity:.2}}),n?l.jsx(p.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:l.jsx(Wp,{sx:{fontSize:"3rem",color:"#fff"}})}):l.jsx(l.Fragment,{})]}),l.jsx(p.Tooltip,{title:e.copyUrl,children:l.jsx(oi,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:l.jsx(Oe.ContentCopy,{})})}),l.jsx(p.Tooltip,{title:e.viewImage,children:l.jsx(oi,{onClick:G,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:l.jsx(Yp,{})})}),l.jsx(p.Tooltip,{title:e.cropImage,children:l.jsx(oi,{onClick:I,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:l.jsx(dg,{})})})]}),l.jsx(p.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:l.jsxs(oi,{sx:{width:"100%"},onClick:w,children:[l.jsx(Oe.Upload,{})," ",e.uploadImage,l.jsx(Kp,{type:"file",accept:"image/*",onChange:N,ref:C})]})}),E!=null&&E.https.sportal365Config?l.jsx(p.AccordionGroup,{variant:"soft",children:l.jsxs(p.Accordion,{children:[l.jsx(p.AccordionSummary,{children:l.jsx(p.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),l.jsx(p.AccordionDetails,{children:l.jsx(Gp,{labels:e,onChangeImages:F})})]})}):l.jsx(l.Fragment,{})]}),l.jsx(Ke,{showToast:s,message:g,color:m,hideToast:k}),l.jsx(Hp,{title:e.viewImage,open:u,imageSrc:n,toggleModal:G}),l.jsx(ug,{labels:e,open:d,imageSrc:n,toggleModal:I,uploadImage:H,resetDefaultImageUrl:j})]})},BP=e=>new Map().set("main_logo",e.mainLogo).set("mobile_logo",e.mobileLogo).set("background_image",e.backgroundImage).set("mobile_background_image",e.mobileBackgroundImage).set("additional_image",e.additionalImage),$P=e=>new Map().set("primary_color",e.primaryColor).set("secondary_color",e.secondaryColor).set("content_color",e.contentColor).set("background_color",e.backgroundColor).set("border_color",e.borderColor).set("additional_color",e.additionalColor),FP=e=>new Map().set("primary_url",e.primaryUrl).set("secondary_url",e.secondaryUrl).set("privacy_policy_url",e.privacyPolicyUrl).set("terms_and_conditions_url",e.termsAndConditionsUrl).set("additional_url",e.additionalUrl),NP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=y.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],s=BP(e),c=$P(e),u=FP(e),f=(v,m)=>{const b=v.target.value;o.colors[m]=b,n(o)},d=(v,m)=>{const b=v.target.value;o.urls[m]=b,n(o)},h=(v,m)=>{o.images[m]=v,n(o)},g=v=>{o.images[v]="",n(o)};return l.jsx(p.Box,{children:l.jsxs(qh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[l.jsxs(Jh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${xc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[l.jsxs(Kr,{children:[l.jsx(p.ListItemDecorator,{children:l.jsx($c,{sx:{width:"20px"}})}),e.images]}),l.jsxs(Kr,{children:[l.jsx(p.ListItemDecorator,{children:l.jsx(u_,{sx:{width:"20px"}})}),e.colors]}),l.jsxs(Kr,{children:[l.jsx(p.ListItemDecorator,{children:l.jsx(d_,{sx:{width:"20px"}})}),e.urls]})]}),l.jsxs(ri,{value:0,sx:{px:0},children:[l.jsx(fg,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:v=>h(v,"main_logo"),clearImage:()=>g("main_logo")}),l.jsx(p.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?l.jsx(l.Fragment,{children:a.map(v=>l.jsx(fg,{labels:e,title:s.get(v),image:o.images[v],onChangeImages:m=>h(m,v),clearImage:()=>g(v)},`branding-image-${v}`))}):l.jsx(l.Fragment,{})]}),l.jsx(ri,{value:1,sx:{px:0},children:l.jsx(p.Box,{children:Object.keys(o.colors).map(v=>l.jsx(p.Box,{mb:2,children:l.jsx(on,{size:"sm",label:c.get(v),placeholder:"",defaultValue:o.colors[v],required:!1,onChange:m=>f(m,v)})},`branding-color-${v}`))})}),l.jsx(ri,{value:2,sx:{px:0},children:l.jsx(p.Box,{children:Object.keys(o.urls).map(v=>l.jsx(p.Box,{mb:2,children:l.jsx(on,{size:"sm",label:u.get(v),placeholder:"",defaultValue:o.urls[v],required:!1,onChange:m=>d(m,v)})},`branding-url-${v}`))})})]})})},hg=Be(l.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutlineOutlined"),pg=e=>{const t=()=>_(this,null,function*(){yield Qi(e.environment).signOut()});return l.jsx(p.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},zP=Be(l.jsx("path",{d:"m8.71 11.71 2.59 2.59c.39.39 1.02.39 1.41 0l2.59-2.59c.63-.63.18-1.71-.71-1.71H9.41c-.89 0-1.33 1.08-.7 1.71"}),"ArrowDropDownRounded"),jP=Be(l.jsx("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm0 6-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25zm-7.5-5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zm-1.51 3.49L9 15.17l-.99-2.18L5.83 12l2.18-.99L9 8.83l.99 2.18 2.18.99z"}),"AutoAwesomeOutlined"),UP=(e,t)=>{let n=[{id:"football_post_match",label:t.generateFootballPostMatchLabel}];switch(e){case"classic_quiz":n=[...n,{id:"formula1_post_event",label:(t==null?void 0:t.generateFormula1PostEventLabel)||""}];break}return n},VP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,generateLabels:r,entityType:i,environment:o,onClickCreate:a,onClickCreateFromTemplate:s,onClickGenerate:c})=>{const u=()=>{if(!r||!c)return l.jsx(l.Fragment,{});const f=UP(i,r);return l.jsxs(p.Dropdown,{children:[l.jsxs(p.ButtonGroup,{variant:"solid",size:"md",color:"neutral",children:[l.jsx(p.MenuButton,{slots:{root:p.Button},startDecorator:l.jsx(jP,{}),sx:{border:1,borderColor:"neutral.outlinedBorder",borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0,bgcolor:"transparent",color:"neutral.outlinedColor","&:hover":{bgcolor:"neutral.outlinedActiveBg"}},children:r.generateAIEntityLabel}),l.jsx(p.MenuButton,{slots:{root:p.IconButton},"aria-label":"More AI quiz options",sx:{border:1,borderColor:"neutral.outlinedBorder",borderLeft:"none",bgcolor:"transparent",color:"neutral.outlinedColor","&:hover":{bgcolor:"neutral.outlinedActiveBg"},borderTopRightRadius:"6px !important",borderBottomRightRadius:"6px !important"},children:l.jsx(zP,{})})]}),l.jsx(p.Menu,{placement:"bottom",sx:{maxHeight:240,borderRadius:12,boxShadow:"md"},children:f.map(d=>l.jsx(p.MenuItem,{onClick:()=>c(d.id),children:d.label},d.id))})]})};return l.jsx(l.Fragment,{children:l.jsxs(p.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[l.jsxs(p.Stack,{direction:"row",alignItems:"center",spacing:2,children:[l.jsx(p.Button,{startDecorator:l.jsx(hg,{}),variant:"solid",color:"primary",onClick:a,children:e}),t?l.jsx(p.Button,{startDecorator:l.jsx(hg,{}),variant:"outlined",color:"primary",onClick:s,children:t}):l.jsx(l.Fragment,{}),u()]}),n?l.jsx(pg,{signOutLabel:n,environment:o}):l.jsx(l.Fragment,{})]})})};var gg={},Qc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],si={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console!="undefined"&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},uo={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},jt=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},an=function(e){return e===!0?1:0};function mg(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var qc=function(e){return e instanceof Array?e:[e]};function Rt(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function $e(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,n!==void 0&&(r.textContent=n),r}function as(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function vg(e,t){if(t(e))return e;if(e.parentNode)return vg(e.parentNode,t)}function ss(e,t){var n=$e("div","numInputWrapper"),r=$e("input","numInput "+e),i=$e("span","arrowUp"),o=$e("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Kt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var Jc=function(){},ls=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},HP={D:Jc,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*an(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:Jc,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:Jc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},Er={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},fo={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[fo.w(e,t,n)]},F:function(e,t,n){return ls(fo.n(e,t,n)-1,!1,t)},G:function(e,t,n){return jt(fo.h(e,t,n))},H:function(e){return jt(e.getHours())},J:function(e,t){return t.ordinal!==void 0?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[an(e.getHours()>11)]},M:function(e,t){return ls(e.getMonth(),!0,t)},S:function(e){return jt(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return jt(e.getFullYear(),4)},d:function(e){return jt(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return jt(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return jt(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},bg=function(e){var t=e.config,n=t===void 0?si:t,r=e.l10n,i=r===void 0?uo:r,o=e.isMobile,a=o===void 0?!1:o;return function(s,c,u){var f=u||i;return n.formatDate!==void 0&&!a?n.formatDate(s,c,f):c.split("").map(function(d,h,g){return fo[d]&&g[h-1]!=="\\"?fo[d](s,f,n):d!=="\\"?d:""}).join("")}},Xc=function(e){var t=e.config,n=t===void 0?si:t,r=e.l10n,i=r===void 0?uo:r;return function(o,a,s,c){if(!(o!==0&&!o)){var u=c||i,f,d=o;if(o instanceof Date)f=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)f=new Date(o);else if(typeof o=="string"){var h=a||(n||si).dateFormat,g=String(o).trim();if(g==="today")f=new Date,s=!0;else if(n&&n.parseDate)f=n.parseDate(o,h);else if(/Z$/.test(g)||/GMT$/.test(g))f=new Date(o);else{for(var v=void 0,m=[],b=0,x=0,S="";b<h.length;b++){var C=h[b],I=C==="\\",w=h[b-1]==="\\"||I;if(Er[C]&&!w){S+=Er[C];var A=new RegExp(S).exec(o);A&&(v=!0)&&m[C!=="Y"?"push":"unshift"]({fn:HP[C],val:A[++x]})}else I||(S+=".")}f=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),m.forEach(function(E){var k=E.fn,$=E.val;return f=k(f,$,u)||f}),f=v?f:void 0}}if(!(f instanceof Date&&!isNaN(f.getTime()))){n.errorHandler(new Error("Invalid date provided: "+d));return}return s===!0&&f.setHours(0,0,0,0),f}}};function Qt(e,t,n){return n===void 0&&(n=!0),n!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var WP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},Zc=function(e,t,n){return e*3600+t*60+n},GP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},YP={DAY:864e5};function eu(e){var t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(e.minDate!==void 0){var i=e.minDate.getHours(),o=e.minDate.getMinutes(),a=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<o&&(n=o),t===i&&n===o&&r<a&&(r=e.minDate.getSeconds())}if(e.maxDate!==void 0){var s=e.maxDate.getHours(),c=e.maxDate.getMinutes();t=Math.min(t,s),t===s&&(n=Math.min(c,n)),t===s&&n===c&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var r=function(s){s&&Object.keys(s).forEach(function(c){return e[c]=s[c]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var _t=function(){return _t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_t.apply(this,arguments)},yg=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},KP=300;function QP(e,t){var n={config:_t(_t({},si),gt.defaultConfig),l10n:uo};n.parseDate=Xc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=m,n._setHoursFromDate=h,n._positionCalendar=Ce,n.changeMonth=D,n.changeYear=ae,n.clear=L,n.close=U,n.onMouseOver=ve,n._createElement=$e,n.createDay=A,n.destroy=W,n.isEnabled=ee,n.jumpToDate=S,n.updateValue=fn,n.open=yt,n.redraw=De,n.set=Ut,n.setDate=qt,n.toggle=zu;function r(){n.utils={getDaysInMonth:function(P,z){return P===void 0&&(P=n.currentMonth),z===void 0&&(z=n.currentYear),P===1&&(z%4===0&&z%100!==0||z%400===0)?29:n.l10n.daysInMonth[P]}}}function i(){n.element=n.input=e,n.isOpen=!1,Pt(),pe(),In(),zs(),r(),n.isMobile||w(),x(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),fn(!1)),s();var P=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&P&&Ce(),He("onReady")}function o(){var P;return((P=n.calendarContainer)===null||P===void 0?void 0:P.getRootNode()).activeElement||document.activeElement}function a(P){return P.bind(n)}function s(){var P=n.config;P.weekNumbers===!1&&P.showMonths===1||P.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var z=(n.days.offsetWidth+1)*P.showMonths;n.daysContainer.style.width=z+"px",n.calendarContainer.style.width=z+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function c(P){if(n.selectedDates.length===0){var z=n.config.minDate===void 0||Qt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),Q=eu(n.config);z.setHours(Q.hours,Q.minutes,Q.seconds,z.getMilliseconds()),n.selectedDates=[z],n.latestSelectedDateObj=z}P!==void 0&&P.type!=="blur"&&It(P);var te=n._input.value;d(),fn(),n._input.value!==te&&n._debouncedChange()}function u(P,z){return P%12+12*an(z===n.l10n.amPM[1])}function f(P){switch(P%24){case 0:case 12:return 12;default:return P%12}}function d(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var P=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,z=(parseInt(n.minuteElement.value,10)||0)%60,Q=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(P=u(P,n.amPM.textContent));var te=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Qt(n.latestSelectedDateObj,n.config.minDate,!0)===0,oe=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Qt(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var ue=Zc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),we=Zc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),de=Zc(P,z,Q);if(de>we&&de<ue){var Se=GP(ue);P=Se[0],z=Se[1],Q=Se[2]}}else{if(oe){var he=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;P=Math.min(P,he.getHours()),P===he.getHours()&&(z=Math.min(z,he.getMinutes())),z===he.getMinutes()&&(Q=Math.min(Q,he.getSeconds()))}if(te){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;P=Math.max(P,me.getHours()),P===me.getHours()&&z<me.getMinutes()&&(z=me.getMinutes()),z===me.getMinutes()&&(Q=Math.max(Q,me.getSeconds()))}}g(P,z,Q)}}function h(P){var z=P||n.latestSelectedDateObj;z&&z instanceof Date&&g(z.getHours(),z.getMinutes(),z.getSeconds())}function g(P,z,Q){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(P%24,z,Q||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=jt(n.config.time_24hr?P:(12+P)%12+12*an(P%12===0)),n.minuteElement.value=jt(z),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[an(P>=12)]),n.secondElement!==void 0&&(n.secondElement.value=jt(Q)))}function v(P){var z=Kt(P),Q=parseInt(z.value)+(P.delta||0);(Q/1e3>1||P.key==="Enter"&&!/[^\d]/.test(Q.toString()))&&ae(Q)}function m(P,z,Q,te){if(z instanceof Array)return z.forEach(function(oe){return m(P,oe,Q,te)});if(P instanceof Array)return P.forEach(function(oe){return m(oe,z,Q,te)});P.addEventListener(z,Q,te),n._handlers.push({remove:function(){return P.removeEventListener(z,Q,te)}})}function b(){He("onChange")}function x(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(Q){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+Q+"]"),function(te){return m(te,"click",n[Q])})}),n.isMobile){Nu();return}var P=mg(ze,50);if(n._debouncedChange=mg(b,KP),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(n.daysContainer,"mouseover",function(Q){n.config.mode==="range"&&ve(Kt(Q))}),m(n._input,"keydown",ce),n.calendarContainer!==void 0&&m(n.calendarContainer,"keydown",ce),!n.config.inline&&!n.config.static&&m(window,"resize",P),window.ontouchstart!==void 0?m(window.document,"touchstart",le):m(window.document,"mousedown",le),m(window.document,"focus",le,{capture:!0}),n.config.clickOpens===!0&&(m(n._input,"focus",n.open),m(n._input,"click",n.open)),n.daysContainer!==void 0&&(m(n.monthNav,"click",Us),m(n.monthNav,["keyup","increment"],v),m(n.daysContainer,"click",At)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var z=function(Q){return Kt(Q).select()};m(n.timeContainer,["increment"],c),m(n.timeContainer,"blur",c,{capture:!0}),m(n.timeContainer,"click",C),m([n.hourElement,n.minuteElement],["focus","click"],z),n.secondElement!==void 0&&m(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&m(n.amPM,"click",function(Q){c(Q)})}n.config.allowInput&&m(n._input,"blur",J)}function S(P,z){var Q=P!==void 0?n.parseDate(P):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),te=n.currentYear,oe=n.currentMonth;try{Q!==void 0&&(n.currentYear=Q.getFullYear(),n.currentMonth=Q.getMonth())}catch(ue){ue.message="Invalid date supplied: "+Q,n.config.errorHandler(ue)}z&&n.currentYear!==te&&(He("onYearChange"),N()),z&&(n.currentYear!==te||n.currentMonth!==oe)&&He("onMonthChange"),n.redraw()}function C(P){var z=Kt(P);~z.className.indexOf("arrow")&&I(P,z.classList.contains("arrowUp")?1:-1)}function I(P,z,Q){var te=P&&Kt(P),oe=Q||te&&te.parentNode&&te.parentNode.firstChild,ue=wi("increment");ue.delta=z,oe&&oe.dispatchEvent(ue)}function w(){var P=window.document.createDocumentFragment();if(n.calendarContainer=$e("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(P.appendChild(F()),n.innerContainer=$e("div","flatpickr-innerContainer"),n.config.weekNumbers){var z=Z(),Q=z.weekWrapper,te=z.weekNumbers;n.innerContainer.appendChild(Q),n.weekNumbers=te,n.weekWrapper=Q}n.rContainer=$e("div","flatpickr-rContainer"),n.rContainer.appendChild(V()),n.daysContainer||(n.daysContainer=$e("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),P.appendChild(n.innerContainer)}n.config.enableTime&&P.appendChild(M()),Rt(n.calendarContainer,"rangeMode",n.config.mode==="range"),Rt(n.calendarContainer,"animate",n.config.animate===!0),Rt(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(P);var oe=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!oe&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var ue=$e("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ue,n.element),ue.appendChild(n.element),n.altInput&&ue.appendChild(n.altInput),ue.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function A(P,z,Q,te){var oe=ee(z,!0),ue=$e("span",P,z.getDate().toString());return ue.dateObj=z,ue.$i=te,ue.setAttribute("aria-label",n.formatDate(z,n.config.ariaDateFormat)),P.indexOf("hidden")===-1&&Qt(z,n.now)===0&&(n.todayDateElem=ue,ue.classList.add("today"),ue.setAttribute("aria-current","date")),oe?(ue.tabIndex=-1,Do(z)&&(ue.classList.add("selected"),n.selectedDateElem=ue,n.config.mode==="range"&&(Rt(ue,"startRange",n.selectedDates[0]&&Qt(z,n.selectedDates[0],!0)===0),Rt(ue,"endRange",n.selectedDates[1]&&Qt(z,n.selectedDates[1],!0)===0),P==="nextMonthDay"&&ue.classList.add("inRange")))):ue.classList.add("flatpickr-disabled"),n.config.mode==="range"&&js(z)&&!Do(z)&&ue.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&P!=="prevMonthDay"&&te%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(z)+"</span>"),He("onDayCreate",ue),ue}function E(P){P.focus(),n.config.mode==="range"&&ve(P)}function k(P){for(var z=P>0?0:n.config.showMonths-1,Q=P>0?n.config.showMonths:-1,te=z;te!=Q;te+=P)for(var oe=n.daysContainer.children[te],ue=P>0?0:oe.children.length-1,we=P>0?oe.children.length:-1,de=ue;de!=we;de+=P){var Se=oe.children[de];if(Se.className.indexOf("hidden")===-1&&ee(Se.dateObj))return Se}}function $(P,z){for(var Q=P.className.indexOf("Month")===-1?P.dateObj.getMonth():n.currentMonth,te=z>0?n.config.showMonths:-1,oe=z>0?1:-1,ue=Q-n.currentMonth;ue!=te;ue+=oe)for(var we=n.daysContainer.children[ue],de=Q-n.currentMonth===ue?P.$i+z:z<0?we.children.length-1:0,Se=we.children.length,he=de;he>=0&&he<Se&&he!=(z>0?Se:-1);he+=oe){var me=we.children[he];if(me.className.indexOf("hidden")===-1&&ee(me.dateObj)&&Math.abs(P.$i-he)>=Math.abs(z))return E(me)}n.changeMonth(oe),G(k(oe),0)}function G(P,z){var Q=o(),te=ne(Q||document.body),oe=P!==void 0?P:te?Q:n.selectedDateElem!==void 0&&ne(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&ne(n.todayDateElem)?n.todayDateElem:k(z>0?1:-1);oe===void 0?n._input.focus():te?$(oe,z):E(oe)}function O(P,z){for(var Q=(new Date(P,z,1).getDay()-n.l10n.firstDayOfWeek+7)%7,te=n.utils.getDaysInMonth((z-1+12)%12,P),oe=n.utils.getDaysInMonth(z,P),ue=window.document.createDocumentFragment(),we=n.config.showMonths>1,de=we?"prevMonthDay hidden":"prevMonthDay",Se=we?"nextMonthDay hidden":"nextMonthDay",he=te+1-Q,me=0;he<=te;he++,me++)ue.appendChild(A("flatpickr-day "+de,new Date(P,z-1,he),he,me));for(he=1;he<=oe;he++,me++)ue.appendChild(A("flatpickr-day",new Date(P,z,he),he,me));for(var Me=oe+1;Me<=42-Q&&(n.config.showMonths===1||me%7!==0);Me++,me++)ue.appendChild(A("flatpickr-day "+Se,new Date(P,z+1,Me%oe),Me,me));var Dt=$e("div","dayContainer");return Dt.appendChild(ue),Dt}function T(){if(n.daysContainer!==void 0){as(n.daysContainer),n.weekNumbers&&as(n.weekNumbers);for(var P=document.createDocumentFragment(),z=0;z<n.config.showMonths;z++){var Q=new Date(n.currentYear,n.currentMonth,1);Q.setMonth(n.currentMonth+z),P.appendChild(O(Q.getFullYear(),Q.getMonth()))}n.daysContainer.appendChild(P),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&ve()}}function N(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var P=function(te){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&te<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&te>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var z=0;z<12;z++)if(P(z)){var Q=$e("option","flatpickr-monthDropdown-month");Q.value=new Date(n.currentYear,z).getMonth().toString(),Q.textContent=ls(z,n.config.shorthandCurrentMonth,n.l10n),Q.tabIndex=-1,n.currentMonth===z&&(Q.selected=!0),n.monthsDropdownContainer.appendChild(Q)}}}function H(){var P=$e("div","flatpickr-month"),z=window.document.createDocumentFragment(),Q;n.config.showMonths>1||n.config.monthSelectorType==="static"?Q=$e("span","cur-month"):(n.monthsDropdownContainer=$e("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),m(n.monthsDropdownContainer,"change",function(we){var de=Kt(we),Se=parseInt(de.value,10);n.changeMonth(Se-n.currentMonth),He("onMonthChange")}),N(),Q=n.monthsDropdownContainer);var te=ss("cur-year",{tabindex:"-1"}),oe=te.getElementsByTagName("input")[0];oe.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&oe.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(oe.setAttribute("max",n.config.maxDate.getFullYear().toString()),oe.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ue=$e("div","flatpickr-current-month");return ue.appendChild(Q),ue.appendChild(te),z.appendChild(ue),P.appendChild(z),{container:P,yearElement:oe,monthElement:Q}}function j(){as(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var P=n.config.showMonths;P--;){var z=H();n.yearElements.push(z.yearElement),n.monthElements.push(z.monthElement),n.monthNav.appendChild(z.container)}n.monthNav.appendChild(n.nextMonthNav)}function F(){return n.monthNav=$e("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=$e("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=$e("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,j(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(P){n.__hidePrevMonthArrow!==P&&(Rt(n.prevMonthNav,"flatpickr-disabled",P),n.__hidePrevMonthArrow=P)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(P){n.__hideNextMonthArrow!==P&&(Rt(n.nextMonthNav,"flatpickr-disabled",P),n.__hideNextMonthArrow=P)}}),n.currentYearElement=n.yearElements[0],Si(),n.monthNav}function M(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var P=eu(n.config);n.timeContainer=$e("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var z=$e("span","flatpickr-time-separator",":"),Q=ss("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=Q.getElementsByTagName("input")[0];var te=ss("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=te.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=jt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?P.hours:f(P.hours)),n.minuteElement.value=jt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():P.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(Q),n.timeContainer.appendChild(z),n.timeContainer.appendChild(te),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var oe=ss("flatpickr-second");n.secondElement=oe.getElementsByTagName("input")[0],n.secondElement.value=jt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():P.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild($e("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(oe)}return n.config.time_24hr||(n.amPM=$e("span","flatpickr-am-pm",n.l10n.amPM[an((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function V(){n.weekdayContainer?as(n.weekdayContainer):n.weekdayContainer=$e("div","flatpickr-weekdays");for(var P=n.config.showMonths;P--;){var z=$e("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(z)}return Y(),n.weekdayContainer}function Y(){if(n.weekdayContainer){var P=n.l10n.firstDayOfWeek,z=yg(n.l10n.weekdays.shorthand);P>0&&P<z.length&&(z=yg(z.splice(P,z.length),z.splice(0,P)));for(var Q=n.config.showMonths;Q--;)n.weekdayContainer.children[Q].innerHTML=`
2454
2454
  <span class='flatpickr-weekday'>
2455
2455
  `+z.join("</span><span class='flatpickr-weekday'>")+`
2456
2456
  </span>
2457
- `}}function Z(){n.calendarContainer.classList.add("hasWeeks");var P=$e("div","flatpickr-weekwrapper");P.appendChild($e("span","flatpickr-weekday",n.l10n.weekAbbreviation));var z=$e("div","flatpickr-weeks");return P.appendChild(z),{weekWrapper:P,weekNumbers:z}}function D(P,z){z===void 0&&(z=!0);var q=z?P:P-n.currentMonth;q<0&&n._hidePrevMonthArrow===!0||q>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=q,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,He("onYearChange"),N()),T(),He("onMonthChange"),Si())}function L(P,z){if(P===void 0&&(P=!0),z===void 0&&(z=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,z===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var q=eu(n.config),te=q.hours,oe=q.minutes,ue=q.seconds;g(te,oe,ue)}n.redraw(),P&&He("onChange")}function U(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),He("onClose")}function W(){n.config!==void 0&&He("onDestroy");for(var P=n._handlers.length;P--;)n._handlers[P].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var z=n.calendarContainer.parentNode;if(z.lastChild&&z.removeChild(z.lastChild),z.parentNode){for(;z.firstChild;)z.parentNode.insertBefore(z.firstChild,z);z.parentNode.removeChild(z)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(q){try{delete n[q]}catch(te){}})}function ie(P){return n.calendarContainer.contains(P)}function le(P){if(n.isOpen&&!n.config.inline){var z=Kt(P),q=ie(z),te=z===n.input||z===n.altInput||n.element.contains(z)||P.path&&P.path.indexOf&&(~P.path.indexOf(n.input)||~P.path.indexOf(n.altInput)),oe=!te&&!q&&!ie(P.relatedTarget),ue=!n.config.ignoredFocusElements.some(function(we){return we.contains(z)});oe&&ue&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&c(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(P){if(!(!P||n.config.minDate&&P<n.config.minDate.getFullYear()||n.config.maxDate&&P>n.config.maxDate.getFullYear())){var z=P,q=n.currentYear!==z;n.currentYear=z||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),q&&(n.redraw(),He("onYearChange"),N())}}function ee(P,z){var q;z===void 0&&(z=!0);var te=n.parseDate(P,void 0,z);if(n.config.minDate&&te&&qt(te,n.config.minDate,z!==void 0?z:!n.minDateHasTime)<0||n.config.maxDate&&te&&qt(te,n.config.maxDate,z!==void 0?z:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(te===void 0)return!1;for(var oe=!!n.config.enable,ue=(q=n.config.enable)!==null&&q!==void 0?q:n.config.disable,we=0,de=void 0;we<ue.length;we++){if(de=ue[we],typeof de=="function"&&de(te))return oe;if(de instanceof Date&&te!==void 0&&de.getTime()===te.getTime())return oe;if(typeof de=="string"){var Se=n.parseDate(de,void 0,!0);return Se&&Se.getTime()===te.getTime()?oe:!oe}else if(typeof de=="object"&&te!==void 0&&de.from&&de.to&&te.getTime()>=de.from.getTime()&&te.getTime()<=de.to.getTime())return oe}return!oe}function ne(P){return n.daysContainer!==void 0?P.className.indexOf("hidden")===-1&&P.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(P):!1}function J(P){var z=P.target===n._input,q=n._input.value.trimEnd()!==Oo();z&&q&&!(P.relatedTarget&&ie(P.relatedTarget))&&n.setDate(n._input.value,!0,P.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ce(P){var z=Kt(P),q=n.config.wrap?e.contains(z):z===n._input,te=n.config.allowInput,oe=n.isOpen&&(!te||!q),ue=n.config.inline&&q&&!te;if(P.keyCode===13&&q){if(te)return n.setDate(n._input.value,!0,z===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),z.blur();n.open()}else if(ie(z)||oe||ue){var we=!!n.timeContainer&&n.timeContainer.contains(z);switch(P.keyCode){case 13:we?(P.preventDefault(),c(),ke()):At(P);break;case 27:P.preventDefault(),ke();break;case 8:case 46:q&&!n.config.allowInput&&(P.preventDefault(),n.clear());break;case 37:case 39:if(!we&&!q){P.preventDefault();var de=o();if(n.daysContainer!==void 0&&(te===!1||de&&ne(de))){var Se=P.keyCode===39?1:-1;P.ctrlKey?(P.stopPropagation(),D(Se),G(k(1),0)):G(void 0,Se)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:P.preventDefault();var he=P.keyCode===40?1:-1;n.daysContainer&&z.$i!==void 0||z===n.input||z===n.altInput?P.ctrlKey?(P.stopPropagation(),ae(n.currentYear-he),G(k(1),0)):we||G(void 0,he*7):z===n.currentYearElement?ae(n.currentYear-he):n.config.enableTime&&(!we&&n.hourElement&&n.hourElement.focus(),c(P),n._debouncedChange());break;case 9:if(we){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(at){return at}),Me=me.indexOf(z);if(Me!==-1){var Dt=me[Me+(P.shiftKey?-1:1)];P.preventDefault(),(Dt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(z)&&P.shiftKey&&(P.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&z===n.amPM)switch(P.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],d(),fn();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],d(),fn();break}(q||ie(z))&&He("onKeyDown",P)}function ve(P,z){if(z===void 0&&(z="flatpickr-day"),!(n.selectedDates.length!==1||P&&(!P.classList.contains(z)||P.classList.contains("flatpickr-disabled")))){for(var q=P?P.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),te=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),oe=Math.min(q,n.selectedDates[0].getTime()),ue=Math.max(q,n.selectedDates[0].getTime()),we=!1,de=0,Se=0,he=oe;he<ue;he+=YP.DAY)ee(new Date(he),!0)||(we=we||he>oe&&he<ue,he<te&&(!de||he>de)?de=he:he>te&&(!Se||he<Se)&&(Se=he));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+z));me.forEach(function(Me){var Dt=Me.dateObj,at=Dt.getTime(),hn=de>0&&at<de||Se>0&&at>Se;if(hn){Me.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(An){Me.classList.remove(An)});return}else if(we&&!hn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(An){Me.classList.remove(An)}),P!==void 0&&(P.classList.add(q<=n.selectedDates[0].getTime()?"startRange":"endRange"),te<q&&at===te?Me.classList.add("startRange"):te>q&&at===te&&Me.classList.add("endRange"),at>=de&&(Se===0||at<=Se)&&WP(at,te,q)&&Me.classList.add("inRange"))})}}function ze(){n.isOpen&&!n.config.static&&!n.config.inline&&Ce()}function yt(P,z){if(z===void 0&&(z=n._positionElement),n.isMobile===!0){if(P){P.preventDefault();var q=Kt(P);q&&q.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),He("onOpen");return}else if(n._input.disabled||n.config.inline)return;var te=n.isOpen;n.isOpen=!0,te||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),He("onOpen"),Ce(z)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(P===void 0||!n.timeContainer.contains(P.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function dt(P){return function(z){var q=n.config["_"+P+"Date"]=n.parseDate(z,n.config.dateFormat),te=n.config["_"+(P==="min"?"max":"min")+"Date"];q!==void 0&&(n[P==="min"?"minDateHasTime":"maxDateHasTime"]=q.getHours()>0||q.getMinutes()>0||q.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(oe){return ee(oe)}),!n.selectedDates.length&&P==="min"&&h(q),fn()),n.daysContainer&&(De(),q!==void 0?n.currentYearElement[P]=q.getFullYear().toString():n.currentYearElement.removeAttribute(P),n.currentYearElement.disabled=!!te&&q!==void 0&&te.getFullYear()===q.getFullYear())}}function Pt(){var P=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],z=_t(_t({},JSON.parse(JSON.stringify(e.dataset||{}))),t),q={};n.config.parseDate=z.parseDate,n.config.formatDate=z.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=dr(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=dr(me)}});var te=z.mode==="time";if(!z.dateFormat&&(z.enableTime||te)){var oe=gt.defaultConfig.dateFormat||si.dateFormat;q.dateFormat=z.noCalendar||te?"H:i"+(z.enableSeconds?":S":""):oe+" H:i"+(z.enableSeconds?":S":"")}if(z.altInput&&(z.enableTime||te)&&!z.altFormat){var ue=gt.defaultConfig.altFormat||si.altFormat;q.altFormat=z.noCalendar||te?"h:i"+(z.enableSeconds?":S K":" K"):ue+(" h:i"+(z.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:dt("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:dt("max")});var we=function(me){return function(Me){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(Me,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:we("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:we("max")}),z.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,q,z);for(var de=0;de<P.length;de++)n.config[P[de]]=n.config[P[de]]===!0||n.config[P[de]]==="true";qc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=Qc(n.config[me]||[]).map(a)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode==="single"&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var de=0;de<n.config.plugins.length;de++){var Se=n.config.plugins[de](n)||{};for(var he in Se)qc.indexOf(he)>-1?n.config[he]=Qc(Se[he]).map(a).concat(n.config[he]):typeof z[he]=="undefined"&&(n.config[he]=Se[he])}z.altInputClass||(n.config.altInputClass=fe().className+" "+n.config.altInputClass),He("onParseConfig")}function fe(){return n.config.wrap?e.querySelector("[data-input]"):e}function pe(){typeof n.config.locale!="object"&&typeof gt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=_t(_t({},gt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?gt.l10ns[n.config.locale]:void 0),Er.D="("+n.l10n.weekdays.shorthand.join("|")+")",Er.l="("+n.l10n.weekdays.longhand.join("|")+")",Er.M="("+n.l10n.months.shorthand.join("|")+")",Er.F="("+n.l10n.months.longhand.join("|")+")",Er.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var P=_t(_t({},t),JSON.parse(JSON.stringify(e.dataset||{})));P.time_24hr===void 0&&gt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=bg(n),n.parseDate=Xc({config:n.config,l10n:n.l10n})}function Ce(P){if(typeof n.config.position=="function")return void n.config.position(n,P);if(n.calendarContainer!==void 0){He("onPreCalendarPosition");var z=P||n._positionElement,q=Array.prototype.reduce.call(n.calendarContainer.children,function(oz,az){return oz+az.offsetHeight},0),te=n.calendarContainer.offsetWidth,oe=n.config.position.split(" "),ue=oe[0],we=oe.length>1?oe[1]:null,de=z.getBoundingClientRect(),Se=window.innerHeight-de.bottom,he=ue==="above"||ue!=="below"&&Se<q&&de.top>q,me=window.pageYOffset+de.top+(he?-q-2:z.offsetHeight+2);if(Rt(n.calendarContainer,"arrowTop",!he),Rt(n.calendarContainer,"arrowBottom",he),!n.config.inline){var Me=window.pageXOffset+de.left,Dt=!1,at=!1;we==="center"?(Me-=(te-de.width)/2,Dt=!0):we==="right"&&(Me-=te-de.width,at=!0),Rt(n.calendarContainer,"arrowLeft",!Dt&&!at),Rt(n.calendarContainer,"arrowCenter",Dt),Rt(n.calendarContainer,"arrowRight",at);var hn=window.document.body.offsetWidth-(window.pageXOffset+de.right),An=Me+te>window.document.body.offsetWidth,XN=hn+te>window.document.body.offsetWidth;if(Rt(n.calendarContainer,"rightMost",An),!n.config.static)if(n.calendarContainer.style.top=me+"px",!An)n.calendarContainer.style.left=Me+"px",n.calendarContainer.style.right="auto";else if(!XN)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=hn+"px";else{var ju=Ee();if(ju===void 0)return;var ZN=window.document.body.offsetWidth,ez=Math.max(0,ZN/2-te/2),tz=".flatpickr-calendar.centerMost:before",nz=".flatpickr-calendar.centerMost:after",rz=ju.cssRules.length,iz="{left:"+de.left+"px;right:auto;}";Rt(n.calendarContainer,"rightMost",!1),Rt(n.calendarContainer,"centerMost",!0),ju.insertRule(tz+","+nz+iz,rz),n.calendarContainer.style.left=ez+"px",n.calendarContainer.style.right="auto"}}}}function Ee(){for(var P=null,z=0;z<document.styleSheets.length;z++){var q=document.styleSheets[z];if(q.cssRules){try{q.cssRules}catch(te){continue}P=q;break}}return P!=null?P:Qe()}function Qe(){var P=document.createElement("style");return document.head.appendChild(P),P.sheet}function De(){n.config.noCalendar||n.isMobile||(N(),Si(),T())}function ke(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function At(P){P.preventDefault(),P.stopPropagation();var z=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},q=vg(Kt(P),z);if(q!==void 0){var te=q,oe=n.latestSelectedDateObj=new Date(te.dateObj.getTime()),ue=(oe.getMonth()<n.currentMonth||oe.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=te,n.config.mode==="single")n.selectedDates=[oe];else if(n.config.mode==="multiple"){var we=Do(oe);we?n.selectedDates.splice(parseInt(we),1):n.selectedDates.push(oe)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=oe,n.selectedDates.push(oe),qt(oe,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,Me){return me.getTime()-Me.getTime()}));if(d(),ue){var de=n.currentYear!==oe.getFullYear();n.currentYear=oe.getFullYear(),n.currentMonth=oe.getMonth(),de&&(He("onYearChange"),N()),He("onMonthChange")}if(Si(),T(),fn(),!ue&&n.config.mode!=="range"&&n.config.showMonths===1?E(te):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var Se=n.config.mode==="single"&&!n.config.enableTime,he=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(Se||he)&&ke()}b()}}var Tt={locale:[pe,Y],showMonths:[j,s,V],minDate:[S],maxDate:[S],positionElement:[Po],clickOpens:[function(){n.config.clickOpens===!0?(m(n._input,"focus",n.open),m(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function Ut(P,z){if(P!==null&&typeof P=="object"){Object.assign(n.config,P);for(var q in P)Tt[q]!==void 0&&Tt[q].forEach(function(te){return te()})}else n.config[P]=z,Tt[P]!==void 0?Tt[P].forEach(function(te){return te()}):qc.indexOf(P)>-1&&(n.config[P]=Qc(z));n.redraw(),fn(!0)}function Lt(P,z){var q=[];if(P instanceof Array)q=P.map(function(te){return n.parseDate(te,z)});else if(P instanceof Date||typeof P=="number")q=[n.parseDate(P,z)];else if(typeof P=="string")switch(n.config.mode){case"single":case"time":q=[n.parseDate(P,z)];break;case"multiple":q=P.split(n.config.conjunction).map(function(te){return n.parseDate(te,z)});break;case"range":q=P.split(n.l10n.rangeSeparator).map(function(te){return n.parseDate(te,z)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(P)));n.selectedDates=n.config.allowInvalidPreload?q:q.filter(function(te){return te instanceof Date&&ee(te,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(te,oe){return te.getTime()-oe.getTime()})}function Qt(P,z,q){if(z===void 0&&(z=!1),q===void 0&&(q=n.config.dateFormat),P!==0&&!P||P instanceof Array&&P.length===0)return n.clear(z);Lt(P,q),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),S(void 0,z),h(),n.selectedDates.length===0&&n.clear(!1),fn(z),z&&He("onChange")}function dr(P){return P.slice().map(function(z){return typeof z=="string"||typeof z=="number"||z instanceof Date?n.parseDate(z,void 0,!0):z&&typeof z=="object"&&z.from&&z.to?{from:n.parseDate(z.from,void 0),to:n.parseDate(z.to,void 0)}:z}).filter(function(z){return z})}function zs(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var P=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);P&&Lt(P,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function In(){if(n.input=fe(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=$e(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),Po()}function Po(){n._positionElement=n.config.positionElement||n._input}function Nu(){var P=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=$e("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=P,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=P==="datetime-local"?"Y-m-d\\TH:i:S":P==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(z){}m(n.mobileInput,"change",function(z){n.setDate(Kt(z).value,!1,n.mobileFormatStr),He("onChange"),He("onClose")})}function zu(P){if(n.isOpen===!0)return n.close();n.open(P)}function He(P,z){if(n.config!==void 0){var q=n.config[P];if(q!==void 0&&q.length>0)for(var te=0;q[te]&&te<q.length;te++)q[te](n.selectedDates,n.input.value,n,z);P==="onChange"&&(n.input.dispatchEvent(wi("change")),n.input.dispatchEvent(wi("input")))}}function wi(P){var z=document.createEvent("Event");return z.initEvent(P,!0,!0),z}function Do(P){for(var z=0;z<n.selectedDates.length;z++){var q=n.selectedDates[z];if(q instanceof Date&&qt(q,P)===0)return""+z}return!1}function js(P){return n.config.mode!=="range"||n.selectedDates.length<2?!1:qt(P,n.selectedDates[0])>=0&&qt(P,n.selectedDates[1])<=0}function Si(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(P,z){var q=new Date(n.currentYear,n.currentMonth,1);q.setMonth(n.currentMonth+z),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[z].textContent=ls(q.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=q.getMonth().toString(),P.value=q.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Oo(P){var z=P||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(q){return n.formatDate(q,z)}).filter(function(q,te,oe){return n.config.mode!=="range"||n.config.enableTime||oe.indexOf(q)===te}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function fn(P){P===void 0&&(P=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Oo(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=Oo(n.config.altFormat)),P!==!1&&He("onValueUpdate")}function Us(P){var z=Kt(P),q=n.prevMonthNav.contains(z),te=n.nextMonthNav.contains(z);q||te?D(q?-1:1):n.yearElements.indexOf(z)>=0?z.select():z.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):z.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function It(P){P.preventDefault();var z=P.type==="keydown",q=Kt(P),te=q;n.amPM!==void 0&&q===n.amPM&&(n.amPM.textContent=n.l10n.amPM[an(n.amPM.textContent===n.l10n.amPM[0])]);var oe=parseFloat(te.getAttribute("min")),ue=parseFloat(te.getAttribute("max")),we=parseFloat(te.getAttribute("step")),de=parseInt(te.value,10),Se=P.delta||(z?P.which===38?1:-1:0),he=de+we*Se;if(typeof te.value!="undefined"&&te.value.length===2){var me=te===n.hourElement,Me=te===n.minuteElement;he<oe?(he=ue+he+an(!me)+(an(me)&&an(!n.amPM)),Me&&I(void 0,-1,n.hourElement)):he>ue&&(he=te===n.hourElement?he-ue-an(!n.amPM):oe,Me&&I(void 0,1,n.hourElement)),n.amPM&&me&&(we===1?he+de===23:Math.abs(he-de)>we)&&(n.amPM.textContent=n.l10n.amPM[an(n.amPM.textContent===n.l10n.amPM[0])]),te.value=jt(he)}}return i(),n}function li(e,t){for(var n=Array.prototype.slice.call(e).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<n.length;i++){var o=n[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=qP(o,t||{}),r.push(o._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return li(this,e)},HTMLElement.prototype.flatpickr=function(e){return li([this],e)});var gt=function(e,t){return typeof e=="string"?li(window.document.querySelectorAll(e),t):e instanceof Node?li([e],t):li(e,t)};gt.defaultConfig={},gt.l10ns={en:_t({},uo),default:_t({},uo)},gt.localize=function(e){gt.l10ns.default=_t(_t({},gt.l10ns.default),e)},gt.setDefaults=function(e){gt.defaultConfig=_t(_t({},gt.defaultConfig),e)},gt.parseDate=Xc({}),gt.formatDate=bg({}),gt.compareDates=qt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return li(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e=="string"?parseInt(e,10):e))},typeof window!="undefined"&&(window.flatpickr=gt);const QP=Vu(Object.freeze(Object.defineProperty({__proto__:null,default:gt},Symbol.toStringTag,{value:"Module"})));(function(e){function t(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(U){return typeof U}:t=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},t(D)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(y),r=o(YS),i=o(QP);function o(D){return D&&D.__esModule?D:{default:D}}function a(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return a=function(){return D},D}function s(D){if(D&&D.__esModule)return D;if(D===null||t(D)!=="object"&&typeof D!="function")return{default:D};var L=a();if(L&&L.has(D))return L.get(D);var U={},W=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ie in D)if(Object.prototype.hasOwnProperty.call(D,ie)){var le=W?Object.getOwnPropertyDescriptor(D,ie):null;le&&(le.get||le.set)?Object.defineProperty(U,ie,le):U[ie]=D[ie]}return U.default=D,L&&L.set(D,U),U}function c(D){return h(D)||d(D)||f(D)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2458
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(D,L){if(D){if(typeof D=="string")return g(D,L);var U=Object.prototype.toString.call(D).slice(8,-1);if(U==="Object"&&D.constructor&&(U=D.constructor.name),U==="Map"||U==="Set")return Array.from(D);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return g(D,L)}}function d(D){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(D))return Array.from(D)}function h(D){if(Array.isArray(D))return g(D)}function g(D,L){(L==null||L>D.length)&&(L=D.length);for(var U=0,W=new Array(L);U<L;U++)W[U]=D[U];return W}function v(){return v=Object.assign||function(D){for(var L=1;L<arguments.length;L++){var U=arguments[L];for(var W in U)Object.prototype.hasOwnProperty.call(U,W)&&(D[W]=U[W])}return D},v.apply(this,arguments)}function m(D,L){if(D==null)return{};var U=b(D,L),W,ie;if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(D);for(ie=0;ie<le.length;ie++)W=le[ie],!(L.indexOf(W)>=0)&&Object.prototype.propertyIsEnumerable.call(D,W)&&(U[W]=D[W])}return U}function b(D,L){if(D==null)return{};var U={},W=Object.keys(D),ie,le;for(le=0;le<W.length;le++)ie=W[le],!(L.indexOf(ie)>=0)&&(U[ie]=D[ie]);return U}function x(D,L){var U=Object.keys(D);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(D);L&&(W=W.filter(function(ie){return Object.getOwnPropertyDescriptor(D,ie).enumerable})),U.push.apply(U,W)}return U}function S(D){for(var L=1;L<arguments.length;L++){var U=arguments[L]!=null?arguments[L]:{};L%2?x(Object(U),!0).forEach(function(W){N(D,W,U[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(U)):x(Object(U)).forEach(function(W){Object.defineProperty(D,W,Object.getOwnPropertyDescriptor(U,W))})}return D}function C(D,L){if(!(D instanceof L))throw new TypeError("Cannot call a class as a function")}function I(D,L){for(var U=0;U<L.length;U++){var W=L[U];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(D,W.key,W)}}function w(D,L,U){return L&&I(D.prototype,L),D}function A(D,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(L&&L.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),L&&E(D,L)}function E(D,L){return E=Object.setPrototypeOf||function(W,ie){return W.__proto__=ie,W},E(D,L)}function k(D){var L=O();return function(){var W=T(D),ie;if(L){var le=T(this).constructor;ie=Reflect.construct(W,arguments,le)}else ie=W.apply(this,arguments);return B(this,ie)}}function B(D,L){return L&&(t(L)==="object"||typeof L=="function")?L:G(D)}function G(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function O(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(D){return!1}}function T(D){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},T(D)}function N(D,L,U){return L in D?Object.defineProperty(D,L,{value:U,enumerable:!0,configurable:!0,writable:!0}):D[L]=U,D}var H=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],j=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),F=["onCreate","onDestroy"],M=r.default.func,V=function(D){A(U,D);var L=k(U);function U(){var W;C(this,U);for(var ie=arguments.length,le=new Array(ie),ae=0;ae<ie;ae++)le[ae]=arguments[ae];return W=L.call.apply(L,[this].concat(le)),N(G(W),"createFlatpickrInstance",function(){var ee=S({onClose:function(){W.node.blur&&W.node.blur()}},W.props.options);ee=Y(ee,W.props),W.flatpickr=(0,i.default)(W.node,ee),W.props.hasOwnProperty("value")&&W.flatpickr.setDate(W.props.value,!1);var ne=W.props.onCreate;ne&&ne(W.flatpickr)}),N(G(W),"destroyFlatpickrInstance",function(){var ee=W.props.onDestroy;ee&&ee(W.flatpickr),W.flatpickr.destroy(),W.flatpickr=null}),N(G(W),"handleNodeChange",function(ee){W.node=ee,W.flatpickr&&(W.destroyFlatpickrInstance(),W.createFlatpickrInstance())}),W}return w(U,[{key:"componentDidUpdate",value:function(ie){var le=this.props.options,ae=ie.options;le=Y(le,this.props),ae=Y(ae,ie);for(var ee=Object.getOwnPropertyNames(le),ne=ee.length-1;ne>=0;ne--){var J=ee[ne],ce=le[J];ce!==ae[J]&&(H.indexOf(J)!==-1&&!Array.isArray(ce)&&(ce=[ce]),this.flatpickr.set(J,ce))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&ie.value&&Array.isArray(ie.value)&&this.props.value.every(function(ve,ze){ie[ze]}))&&this.props.value!==ie.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var ie=this.props,le=ie.options,ae=ie.defaultValue,ee=ie.value,ne=ie.children,J=ie.render,ce=m(ie,["options","defaultValue","value","children","render"]);return H.forEach(function(ve){delete ce[ve]}),F.forEach(function(ve){delete ce[ve]}),J?J(S(S({},ce),{},{defaultValue:ae,value:ee}),this.handleNodeChange):le.wrap?n.default.createElement("div",v({},ce,{ref:this.handleNodeChange}),ne):n.default.createElement("input",v({},ce,{defaultValue:ae,ref:this.handleNodeChange}))}}]),U}(n.Component);N(V,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:j,onOpen:j,onClose:j,onMonthChange:j,onYearChange:j,onReady:j,onValueUpdate:j,onDayCreate:j,onCreate:M,onDestroy:M,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),N(V,"defaultProps",{options:{}});function Y(D,L){var U=S({},D);return H.forEach(function(W){if(L.hasOwnProperty(W)){var ie;U[W]&&!Array.isArray(U[W])?U[W]=[U[W]]:U[W]||(U[W]=[]);var le=Array.isArray(L[W])?L[W]:[L[W]];(ie=U[W]).push.apply(ie,c(le))}}),U}var Z=V;e.default=Z})(gg);const xg=pn(gg);var Cg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",c="hour",u="day",f="week",d="month",h="quarter",g="year",v="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var j=["th","st","nd","rd"],F=H%100;return"["+H+(j[(F-20)%10]||j[F]||j[0])+"]"}},C=function(H,j,F){var M=String(H);return!M||M.length>=j?H:""+Array(j+1-M.length).join(F)+H},I={s:C,z:function(H){var j=-H.utcOffset(),F=Math.abs(j),M=Math.floor(F/60),V=F%60;return(j<=0?"+":"-")+C(M,2,"0")+":"+C(V,2,"0")},m:function H(j,F){if(j.date()<F.date())return-H(F,j);var M=12*(F.year()-j.year())+(F.month()-j.month()),V=j.clone().add(M,d),Y=F-V<0,Z=j.clone().add(M+(Y?-1:1),d);return+(-(M+(F-V)/(Y?V-Z:Z-V))||0)},a:function(H){return H<0?Math.ceil(H)||0:Math.floor(H)},p:function(H){return{M:d,y:g,w:f,d:u,D:v,h:c,m:s,s:a,ms:o,Q:h}[H]||String(H||"").toLowerCase().replace(/s$/,"")},u:function(H){return H===void 0}},w="en",A={};A[w]=S;var E="$isDayjsObject",k=function(H){return H instanceof T||!(!H||!H[E])},B=function H(j,F,M){var V;if(!j)return w;if(typeof j=="string"){var Y=j.toLowerCase();A[Y]&&(V=Y),F&&(A[Y]=F,V=Y);var Z=j.split("-");if(!V&&Z.length>1)return H(Z[0])}else{var D=j.name;A[D]=j,V=D}return!M&&V&&(w=V),V||!M&&w},G=function(H,j){if(k(H))return H.clone();var F=typeof j=="object"?j:{};return F.date=H,F.args=arguments,new T(F)},O=I;O.l=B,O.i=k,O.w=function(H,j){return G(H,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var T=function(){function H(F){this.$L=B(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[E]=!0}var j=H.prototype;return j.parse=function(F){this.$d=function(M){var V=M.date,Y=M.utc;if(V===null)return new Date(NaN);if(O.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var Z=V.match(b);if(Z){var D=Z[2]-1||0,L=(Z[7]||"0").substring(0,3);return Y?new Date(Date.UTC(Z[1],D,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,L)):new Date(Z[1],D,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,L)}}return new Date(V)}(F),this.init()},j.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},j.$utils=function(){return O},j.isValid=function(){return this.$d.toString()!==m},j.isSame=function(F,M){var V=G(F);return this.startOf(M)<=V&&V<=this.endOf(M)},j.isAfter=function(F,M){return G(F)<this.startOf(M)},j.isBefore=function(F,M){return this.endOf(M)<G(F)},j.$g=function(F,M,V){return O.u(F)?this[M]:this.set(V,F)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(F,M){var V=this,Y=!!O.u(M)||M,Z=O.p(F),D=function(ne,J){var ce=O.w(V.$u?Date.UTC(V.$y,J,ne):new Date(V.$y,J,ne),V);return Y?ce:ce.endOf(u)},L=function(ne,J){return O.w(V.toDate()[ne].apply(V.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(J)),V)},U=this.$W,W=this.$M,ie=this.$D,le="set"+(this.$u?"UTC":"");switch(Z){case g:return Y?D(1,0):D(31,11);case d:return Y?D(1,W):D(0,W+1);case f:var ae=this.$locale().weekStart||0,ee=(U<ae?U+7:U)-ae;return D(Y?ie-ee:ie+(6-ee),W);case u:case v:return L(le+"Hours",0);case c:return L(le+"Minutes",1);case s:return L(le+"Seconds",2);case a:return L(le+"Milliseconds",3);default:return this.clone()}},j.endOf=function(F){return this.startOf(F,!1)},j.$set=function(F,M){var V,Y=O.p(F),Z="set"+(this.$u?"UTC":""),D=(V={},V[u]=Z+"Date",V[v]=Z+"Date",V[d]=Z+"Month",V[g]=Z+"FullYear",V[c]=Z+"Hours",V[s]=Z+"Minutes",V[a]=Z+"Seconds",V[o]=Z+"Milliseconds",V)[Y],L=Y===u?this.$D+(M-this.$W):M;if(Y===d||Y===g){var U=this.clone().set(v,1);U.$d[D](L),U.init(),this.$d=U.set(v,Math.min(this.$D,U.daysInMonth())).$d}else D&&this.$d[D](L);return this.init(),this},j.set=function(F,M){return this.clone().$set(F,M)},j.get=function(F){return this[O.p(F)]()},j.add=function(F,M){var V,Y=this;F=Number(F);var Z=O.p(M),D=function(W){var ie=G(Y);return O.w(ie.date(ie.date()+Math.round(W*F)),Y)};if(Z===d)return this.set(d,this.$M+F);if(Z===g)return this.set(g,this.$y+F);if(Z===u)return D(1);if(Z===f)return D(7);var L=(V={},V[s]=r,V[c]=i,V[a]=n,V)[Z]||1,U=this.$d.getTime()+F*L;return O.w(U,this)},j.subtract=function(F,M){return this.add(-1*F,M)},j.format=function(F){var M=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var Y=F||"YYYY-MM-DDTHH:mm:ssZ",Z=O.z(this),D=this.$H,L=this.$m,U=this.$M,W=V.weekdays,ie=V.months,le=V.meridiem,ae=function(J,ce,ve,ze){return J&&(J[ce]||J(M,Y))||ve[ce].slice(0,ze)},ee=function(J){return O.s(D%12||12,J,"0")},ne=le||function(J,ce,ve){var ze=J<12?"AM":"PM";return ve?ze.toLowerCase():ze};return Y.replace(x,function(J,ce){return ce||function(ve){switch(ve){case"YY":return String(M.$y).slice(-2);case"YYYY":return O.s(M.$y,4,"0");case"M":return U+1;case"MM":return O.s(U+1,2,"0");case"MMM":return ae(V.monthsShort,U,ie,3);case"MMMM":return ae(ie,U);case"D":return M.$D;case"DD":return O.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return ae(V.weekdaysMin,M.$W,W,2);case"ddd":return ae(V.weekdaysShort,M.$W,W,3);case"dddd":return W[M.$W];case"H":return String(D);case"HH":return O.s(D,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return ne(D,L,!0);case"A":return ne(D,L,!1);case"m":return String(L);case"mm":return O.s(L,2,"0");case"s":return String(M.$s);case"ss":return O.s(M.$s,2,"0");case"SSS":return O.s(M.$ms,3,"0");case"Z":return Z}return null}(J)||Z.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(F,M,V){var Y,Z=this,D=O.p(M),L=G(F),U=(L.utcOffset()-this.utcOffset())*r,W=this-L,ie=function(){return O.m(Z,L)};switch(D){case g:Y=ie()/12;break;case d:Y=ie();break;case h:Y=ie()/3;break;case f:Y=(W-U)/6048e5;break;case u:Y=(W-U)/864e5;break;case c:Y=W/i;break;case s:Y=W/r;break;case a:Y=W/n;break;default:Y=W}return V?Y:O.a(Y)},j.daysInMonth=function(){return this.endOf(d).$D},j.$locale=function(){return A[this.$L]},j.locale=function(F,M){if(!F)return this.$L;var V=this.clone(),Y=B(F,M,!0);return Y&&(V.$L=Y),V},j.clone=function(){return O.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},H}(),N=T.prototype;return G.prototype=N,[["$ms",o],["$s",a],["$m",s],["$H",c],["$W",u],["$M",d],["$y",g],["$D",v]].forEach(function(H){N[H[1]]=function(j){return this.$g(j,H[0],H[1])}}),G.extend=function(H,j){return H.$i||(H(j,T,G),H.$i=!0),G},G.locale=B,G.isDayjs=k,G.unix=function(H){return G(1e3*H)},G.en=A[w],G.Ls=A,G.p={},G})})(Cg);var JP=Cg.exports;const ut=pn(JP);var wg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,a){var s,c=function(h,g,v){v===void 0&&(v={});var m=new Date(h),b=function(x,S){S===void 0&&(S={});var C=S.timeZoneName||"short",I=x+"|"+C,w=r[I];return w||(w=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:x,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:C}),r[I]=w),w}(g,v);return b.formatToParts(m)},u=function(h,g){for(var v=c(h,g),m=[],b=0;b<v.length;b+=1){var x=v[b],S=x.type,C=x.value,I=n[S];I>=0&&(m[I]=parseInt(C,10))}var w=m[3],A=w===24?0:w,E=m[0]+"-"+m[1]+"-"+m[2]+" "+A+":"+m[4]+":"+m[5]+":000",k=+h;return(a.utc(E).valueOf()-(k-=k%1e3))/6e4},f=o.prototype;f.tz=function(h,g){h===void 0&&(h=s);var v,m=this.utcOffset(),b=this.toDate(),x=b.toLocaleString("en-US",{timeZone:h}),S=Math.round((b-new Date(x))/1e3/60),C=15*-Math.round(b.getTimezoneOffset()/15)-S;if(!Number(C))v=this.utcOffset(0,g);else if(v=a(x,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(C,!0),g){var I=v.utcOffset();v=v.add(m-I,"minute")}return v.$x.$timezone=h,v},f.offsetName=function(h){var g=this.$x.$timezone||a.tz.guess(),v=c(this.valueOf(),g,{timeZoneName:h}).find(function(m){return m.type.toLowerCase()==="timezonename"});return v&&v.value};var d=f.startOf;f.startOf=function(h,g){if(!this.$x||!this.$x.$timezone)return d.call(this,h,g);var v=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(v,h,g).tz(this.$x.$timezone,!0)},a.tz=function(h,g,v){var m=v&&g,b=v||g||s,x=u(+a(),b);if(typeof h!="string")return a(h).tz(b);var S=function(A,E,k){var B=A-60*E*1e3,G=u(B,k);if(E===G)return[B,E];var O=u(B-=60*(G-E)*1e3,k);return G===O?[B,G]:[A-60*Math.min(G,O)*1e3,Math.max(G,O)]}(a.utc(h,m).valueOf(),x,b),C=S[0],I=S[1],w=a(C).utcOffset(I);return w.$x.$timezone=b,w},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){s=h}}})})(wg);var XP=wg.exports;const ZP=pn(XP);var Sg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,s){var c=a.prototype;s.utc=function(m){var b={date:m,utc:!0,args:arguments};return new a(b)},c.utc=function(m){var b=s(this.toDate(),{locale:this.$L,utc:!0});return m?b.add(this.utcOffset(),n):b},c.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var u=c.parse;c.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var f=c.init;c.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else f.call(this)};var d=c.utcOffset;c.utcOffset=function(m,b){var x=this.$utils().u;if(x(m))return this.$u?0:x(this.$offset)?d.call(this):this.$offset;if(typeof m=="string"&&(m=function(w){w===void 0&&(w="");var A=w.match(r);if(!A)return null;var E=(""+A[0]).match(i)||["-",0,0],k=E[0],B=60*+E[1]+ +E[2];return B===0?0:k==="+"?B:-B}(m),m===null))return this;var S=Math.abs(m)<=16?60*m:m,C=this;if(b)return C.$offset=S,C.$u=m===0,C;if(m!==0){var I=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(C=this.local().add(S+I,n)).$offset=S,C.$x.$localOffset=I}else C=this.utc();return C};var h=c.format;c.format=function(m){var b=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,b)},c.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var g=c.toDate;c.toDate=function(m){return m==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var v=c.diff;c.diff=function(m,b,x){if(m&&this.$u===m.$u)return v.call(this,m,b,x);var S=this.local(),C=s(m).local();return v.call(S,C,b,x)}}})})(Sg);var eD=Sg.exports;const tD=pn(eD);ut.extend(ZP),ut.extend(tD);const nD=e=>{if(!ut(e).isAfter(ut(Date.now()).subtract(15,"minute")))return ut(Date.now()).add(15,"minute").toDate()},tu=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const s=ut.utc(a[0]).toISOString();i(s)}else i("")};return l.jsx(p.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",paddingLeft:"0.5rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,minHeight:"37px",color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:l.jsx(xg,{value:e&&ut(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||nD(e),maxDate:n,parseDate:(a,s)=>ut(a,s).toDate(),formatDate:(a,s)=>ut(a).format(s),time_24hr:!0,minuteIncrement:1}})})},rD=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return l.jsxs(p.Box,{sx:{marginBottom:"16px"},children:[l.jsx(p.FormControl,{children:l.jsx(p.FormLabel,{required:e,color:"primary",children:"Duration"})}),l.jsxs(p.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[l.jsx(co,{label:"From date",defaultValue:i,required:e,onChange:n}),l.jsx(co,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},Ig=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(ut(t).toDate()),n&&r.push(ut(n).toDate()),r},iD=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=y.useState(Ig(t)),[a,s]=y.useState(!1),c=()=>s(!a),u=f=>{if(f&&f.length>0){const d="YYYY-MM-DD",h=ut(f[0]).format(d),g=ut(f[1]).format(d);r({from:h,to:g})}else f&&f.length===0&&(r({from:"",to:""}),c());o(f)};return l.jsxs(p.FormControl,{sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{required:n,color:"primary",children:e}),l.jsx(p.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",padding:"0.5rem 0.75rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:l.jsx(xg,{value:i,onChange:u,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(f,d)=>ut(f,d).toDate(),formatDate:(f,d)=>ut(f).format(d),defaultDate:Ig(t)||void 0}})}),l.jsx(Ke,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:c})]})},oD=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{qi(e).signOut().then(()=>n(null)).catch(s=>{console.error("There was a problem logging out the user:",s)})};return l.jsx(p.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:l.jsx(p.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:l.jsxs(p.CardContent,{children:[l.jsx(p.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),l.jsx(p.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),l.jsx(p.Box,{display:"flex",justifyContent:"center",children:l.jsx(p.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},Ag=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],nu=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),aD=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=y.useState(Ag(n)),[a,s]=y.useState(null),[c,u]=y.useState(""),[f,d]=y.useState(""),[h,g]=y.useState(""),[v,m]=y.useState("");y.useEffect(()=>o(Ag(n)),[n]);const b=()=>{const I=[...i];I.push({key:c,value:h}),o(I),u(""),g(""),r(nu(I))},x=I=>{const w=i.filter((A,E)=>E!==I);o(w),r(nu(w))},S=(I,w)=>{d(w.key),m(w.value),s(I)},C=I=>{const w=[...i];w[I]={key:f,value:v},o(w),s(null),d(""),m(""),r(nu(w))};return l.jsxs(p.Box,{children:[i.map((I,w)=>l.jsx(p.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:l.jsx(p.CardContent,{style:{flex:1},children:a===w?l.jsxs(p.Box,{display:"flex",alignItems:"center",children:[l.jsx(p.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:f,onChange:A=>d(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),l.jsx(p.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:v,onChange:A=>m(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),l.jsx(p.Tooltip,{title:e.save,children:f&&v?l.jsx(p.IconButton,{onClick:()=>C(w),children:l.jsx(Oe.Check,{})}):l.jsx("span",{children:l.jsx(p.IconButton,{disabled:!0,children:l.jsx(Oe.Check,{})})})})]}):l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[l.jsxs(p.Box,{children:[l.jsxs(p.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",l.jsx(p.Typography,{whiteSpace:"wrap",children:I.key})]}),l.jsxs(p.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",l.jsx(p.Typography,{whiteSpace:"wrap",children:I.value})]})]}),l.jsxs(p.Box,{children:[l.jsx(p.Tooltip,{title:e.edit,children:l.jsx(p.IconButton,{onClick:()=>S(w,I),children:l.jsx(Oe.Edit,{})})}),l.jsx(p.Tooltip,{title:e.delete,children:l.jsx(p.IconButton,{onClick:()=>x(w),children:l.jsx(Oe.Delete,{})})})]})]})})},`dynamic-fields-${t}-${w}`)),l.jsxs(p.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[l.jsx(p.Input,{size:"md",variant:"outlined",color:"neutral",value:c,placeholder:e.keyDynamicFields,onChange:I=>u(I.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),l.jsx(p.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:I=>g(I.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),l.jsx(p.Tooltip,{title:e.add,children:c&&h?l.jsx(p.Button,{onClick:b,children:l.jsx(Oe.Add,{})}):l.jsx("span",{children:l.jsx(p.Button,{disabled:!0,children:l.jsx(Oe.Add,{})})})})]})]})};function ho(e,t,n){return(t=lc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tg(Object(n),!0).forEach(function(r){ho(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lc(r.key),r)}}function lD(e,t,n){return t&&Eg(e.prototype,t),n&&Eg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ru(e,t){return ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ru(e,t)}function cD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ru(e,t)}function cs(e){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},cs(e)}function kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(kg=function(){return!!e})()}function uD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dD(e,t){if(t&&(Sr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uD(e)}function fD(e){var t=kg();return function(){var n,r=cs(e);if(t){var i=cs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dD(this,n)}}function iu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hD(e){if(Array.isArray(e))return iu(e)}function pD(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _g(e,t){if(e){if(typeof e=="string")return iu(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?iu(e,t):void 0}}function gD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2457
+ `}}function Z(){n.calendarContainer.classList.add("hasWeeks");var P=$e("div","flatpickr-weekwrapper");P.appendChild($e("span","flatpickr-weekday",n.l10n.weekAbbreviation));var z=$e("div","flatpickr-weeks");return P.appendChild(z),{weekWrapper:P,weekNumbers:z}}function D(P,z){z===void 0&&(z=!0);var Q=z?P:P-n.currentMonth;Q<0&&n._hidePrevMonthArrow===!0||Q>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=Q,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,He("onYearChange"),N()),T(),He("onMonthChange"),Si())}function L(P,z){if(P===void 0&&(P=!0),z===void 0&&(z=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,z===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var Q=eu(n.config),te=Q.hours,oe=Q.minutes,ue=Q.seconds;g(te,oe,ue)}n.redraw(),P&&He("onChange")}function U(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),He("onClose")}function W(){n.config!==void 0&&He("onDestroy");for(var P=n._handlers.length;P--;)n._handlers[P].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var z=n.calendarContainer.parentNode;if(z.lastChild&&z.removeChild(z.lastChild),z.parentNode){for(;z.firstChild;)z.parentNode.insertBefore(z.firstChild,z);z.parentNode.removeChild(z)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(Q){try{delete n[Q]}catch(te){}})}function ie(P){return n.calendarContainer.contains(P)}function le(P){if(n.isOpen&&!n.config.inline){var z=Kt(P),Q=ie(z),te=z===n.input||z===n.altInput||n.element.contains(z)||P.path&&P.path.indexOf&&(~P.path.indexOf(n.input)||~P.path.indexOf(n.altInput)),oe=!te&&!Q&&!ie(P.relatedTarget),ue=!n.config.ignoredFocusElements.some(function(we){return we.contains(z)});oe&&ue&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&c(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(P){if(!(!P||n.config.minDate&&P<n.config.minDate.getFullYear()||n.config.maxDate&&P>n.config.maxDate.getFullYear())){var z=P,Q=n.currentYear!==z;n.currentYear=z||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),Q&&(n.redraw(),He("onYearChange"),N())}}function ee(P,z){var Q;z===void 0&&(z=!0);var te=n.parseDate(P,void 0,z);if(n.config.minDate&&te&&Qt(te,n.config.minDate,z!==void 0?z:!n.minDateHasTime)<0||n.config.maxDate&&te&&Qt(te,n.config.maxDate,z!==void 0?z:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(te===void 0)return!1;for(var oe=!!n.config.enable,ue=(Q=n.config.enable)!==null&&Q!==void 0?Q:n.config.disable,we=0,de=void 0;we<ue.length;we++){if(de=ue[we],typeof de=="function"&&de(te))return oe;if(de instanceof Date&&te!==void 0&&de.getTime()===te.getTime())return oe;if(typeof de=="string"){var Se=n.parseDate(de,void 0,!0);return Se&&Se.getTime()===te.getTime()?oe:!oe}else if(typeof de=="object"&&te!==void 0&&de.from&&de.to&&te.getTime()>=de.from.getTime()&&te.getTime()<=de.to.getTime())return oe}return!oe}function ne(P){return n.daysContainer!==void 0?P.className.indexOf("hidden")===-1&&P.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(P):!1}function J(P){var z=P.target===n._input,Q=n._input.value.trimEnd()!==Oo();z&&Q&&!(P.relatedTarget&&ie(P.relatedTarget))&&n.setDate(n._input.value,!0,P.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ce(P){var z=Kt(P),Q=n.config.wrap?e.contains(z):z===n._input,te=n.config.allowInput,oe=n.isOpen&&(!te||!Q),ue=n.config.inline&&Q&&!te;if(P.keyCode===13&&Q){if(te)return n.setDate(n._input.value,!0,z===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),z.blur();n.open()}else if(ie(z)||oe||ue){var we=!!n.timeContainer&&n.timeContainer.contains(z);switch(P.keyCode){case 13:we?(P.preventDefault(),c(),ke()):At(P);break;case 27:P.preventDefault(),ke();break;case 8:case 46:Q&&!n.config.allowInput&&(P.preventDefault(),n.clear());break;case 37:case 39:if(!we&&!Q){P.preventDefault();var de=o();if(n.daysContainer!==void 0&&(te===!1||de&&ne(de))){var Se=P.keyCode===39?1:-1;P.ctrlKey?(P.stopPropagation(),D(Se),G(k(1),0)):G(void 0,Se)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:P.preventDefault();var he=P.keyCode===40?1:-1;n.daysContainer&&z.$i!==void 0||z===n.input||z===n.altInput?P.ctrlKey?(P.stopPropagation(),ae(n.currentYear-he),G(k(1),0)):we||G(void 0,he*7):z===n.currentYearElement?ae(n.currentYear-he):n.config.enableTime&&(!we&&n.hourElement&&n.hourElement.focus(),c(P),n._debouncedChange());break;case 9:if(we){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(at){return at}),Me=me.indexOf(z);if(Me!==-1){var Dt=me[Me+(P.shiftKey?-1:1)];P.preventDefault(),(Dt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(z)&&P.shiftKey&&(P.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&z===n.amPM)switch(P.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],d(),fn();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],d(),fn();break}(Q||ie(z))&&He("onKeyDown",P)}function ve(P,z){if(z===void 0&&(z="flatpickr-day"),!(n.selectedDates.length!==1||P&&(!P.classList.contains(z)||P.classList.contains("flatpickr-disabled")))){for(var Q=P?P.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),te=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),oe=Math.min(Q,n.selectedDates[0].getTime()),ue=Math.max(Q,n.selectedDates[0].getTime()),we=!1,de=0,Se=0,he=oe;he<ue;he+=YP.DAY)ee(new Date(he),!0)||(we=we||he>oe&&he<ue,he<te&&(!de||he>de)?de=he:he>te&&(!Se||he<Se)&&(Se=he));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+z));me.forEach(function(Me){var Dt=Me.dateObj,at=Dt.getTime(),hn=de>0&&at<de||Se>0&&at>Se;if(hn){Me.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(An){Me.classList.remove(An)});return}else if(we&&!hn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(An){Me.classList.remove(An)}),P!==void 0&&(P.classList.add(Q<=n.selectedDates[0].getTime()?"startRange":"endRange"),te<Q&&at===te?Me.classList.add("startRange"):te>Q&&at===te&&Me.classList.add("endRange"),at>=de&&(Se===0||at<=Se)&&WP(at,te,Q)&&Me.classList.add("inRange"))})}}function ze(){n.isOpen&&!n.config.static&&!n.config.inline&&Ce()}function yt(P,z){if(z===void 0&&(z=n._positionElement),n.isMobile===!0){if(P){P.preventDefault();var Q=Kt(P);Q&&Q.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),He("onOpen");return}else if(n._input.disabled||n.config.inline)return;var te=n.isOpen;n.isOpen=!0,te||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),He("onOpen"),Ce(z)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(P===void 0||!n.timeContainer.contains(P.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function dt(P){return function(z){var Q=n.config["_"+P+"Date"]=n.parseDate(z,n.config.dateFormat),te=n.config["_"+(P==="min"?"max":"min")+"Date"];Q!==void 0&&(n[P==="min"?"minDateHasTime":"maxDateHasTime"]=Q.getHours()>0||Q.getMinutes()>0||Q.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(oe){return ee(oe)}),!n.selectedDates.length&&P==="min"&&h(Q),fn()),n.daysContainer&&(De(),Q!==void 0?n.currentYearElement[P]=Q.getFullYear().toString():n.currentYearElement.removeAttribute(P),n.currentYearElement.disabled=!!te&&Q!==void 0&&te.getFullYear()===Q.getFullYear())}}function Pt(){var P=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],z=_t(_t({},JSON.parse(JSON.stringify(e.dataset||{}))),t),Q={};n.config.parseDate=z.parseDate,n.config.formatDate=z.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=dr(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=dr(me)}});var te=z.mode==="time";if(!z.dateFormat&&(z.enableTime||te)){var oe=gt.defaultConfig.dateFormat||si.dateFormat;Q.dateFormat=z.noCalendar||te?"H:i"+(z.enableSeconds?":S":""):oe+" H:i"+(z.enableSeconds?":S":"")}if(z.altInput&&(z.enableTime||te)&&!z.altFormat){var ue=gt.defaultConfig.altFormat||si.altFormat;Q.altFormat=z.noCalendar||te?"h:i"+(z.enableSeconds?":S K":" K"):ue+(" h:i"+(z.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:dt("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:dt("max")});var we=function(me){return function(Me){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(Me,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:we("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:we("max")}),z.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,Q,z);for(var de=0;de<P.length;de++)n.config[P[de]]=n.config[P[de]]===!0||n.config[P[de]]==="true";Qc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=qc(n.config[me]||[]).map(a)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode==="single"&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var de=0;de<n.config.plugins.length;de++){var Se=n.config.plugins[de](n)||{};for(var he in Se)Qc.indexOf(he)>-1?n.config[he]=qc(Se[he]).map(a).concat(n.config[he]):typeof z[he]=="undefined"&&(n.config[he]=Se[he])}z.altInputClass||(n.config.altInputClass=fe().className+" "+n.config.altInputClass),He("onParseConfig")}function fe(){return n.config.wrap?e.querySelector("[data-input]"):e}function pe(){typeof n.config.locale!="object"&&typeof gt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=_t(_t({},gt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?gt.l10ns[n.config.locale]:void 0),Er.D="("+n.l10n.weekdays.shorthand.join("|")+")",Er.l="("+n.l10n.weekdays.longhand.join("|")+")",Er.M="("+n.l10n.months.shorthand.join("|")+")",Er.F="("+n.l10n.months.longhand.join("|")+")",Er.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var P=_t(_t({},t),JSON.parse(JSON.stringify(e.dataset||{})));P.time_24hr===void 0&&gt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=bg(n),n.parseDate=Xc({config:n.config,l10n:n.l10n})}function Ce(P){if(typeof n.config.position=="function")return void n.config.position(n,P);if(n.calendarContainer!==void 0){He("onPreCalendarPosition");var z=P||n._positionElement,Q=Array.prototype.reduce.call(n.calendarContainer.children,function(oz,az){return oz+az.offsetHeight},0),te=n.calendarContainer.offsetWidth,oe=n.config.position.split(" "),ue=oe[0],we=oe.length>1?oe[1]:null,de=z.getBoundingClientRect(),Se=window.innerHeight-de.bottom,he=ue==="above"||ue!=="below"&&Se<Q&&de.top>Q,me=window.pageYOffset+de.top+(he?-Q-2:z.offsetHeight+2);if(Rt(n.calendarContainer,"arrowTop",!he),Rt(n.calendarContainer,"arrowBottom",he),!n.config.inline){var Me=window.pageXOffset+de.left,Dt=!1,at=!1;we==="center"?(Me-=(te-de.width)/2,Dt=!0):we==="right"&&(Me-=te-de.width,at=!0),Rt(n.calendarContainer,"arrowLeft",!Dt&&!at),Rt(n.calendarContainer,"arrowCenter",Dt),Rt(n.calendarContainer,"arrowRight",at);var hn=window.document.body.offsetWidth-(window.pageXOffset+de.right),An=Me+te>window.document.body.offsetWidth,XN=hn+te>window.document.body.offsetWidth;if(Rt(n.calendarContainer,"rightMost",An),!n.config.static)if(n.calendarContainer.style.top=me+"px",!An)n.calendarContainer.style.left=Me+"px",n.calendarContainer.style.right="auto";else if(!XN)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=hn+"px";else{var ju=Ee();if(ju===void 0)return;var ZN=window.document.body.offsetWidth,ez=Math.max(0,ZN/2-te/2),tz=".flatpickr-calendar.centerMost:before",nz=".flatpickr-calendar.centerMost:after",rz=ju.cssRules.length,iz="{left:"+de.left+"px;right:auto;}";Rt(n.calendarContainer,"rightMost",!1),Rt(n.calendarContainer,"centerMost",!0),ju.insertRule(tz+","+nz+iz,rz),n.calendarContainer.style.left=ez+"px",n.calendarContainer.style.right="auto"}}}}function Ee(){for(var P=null,z=0;z<document.styleSheets.length;z++){var Q=document.styleSheets[z];if(Q.cssRules){try{Q.cssRules}catch(te){continue}P=Q;break}}return P!=null?P:qe()}function qe(){var P=document.createElement("style");return document.head.appendChild(P),P.sheet}function De(){n.config.noCalendar||n.isMobile||(N(),Si(),T())}function ke(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function At(P){P.preventDefault(),P.stopPropagation();var z=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},Q=vg(Kt(P),z);if(Q!==void 0){var te=Q,oe=n.latestSelectedDateObj=new Date(te.dateObj.getTime()),ue=(oe.getMonth()<n.currentMonth||oe.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=te,n.config.mode==="single")n.selectedDates=[oe];else if(n.config.mode==="multiple"){var we=Do(oe);we?n.selectedDates.splice(parseInt(we),1):n.selectedDates.push(oe)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=oe,n.selectedDates.push(oe),Qt(oe,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,Me){return me.getTime()-Me.getTime()}));if(d(),ue){var de=n.currentYear!==oe.getFullYear();n.currentYear=oe.getFullYear(),n.currentMonth=oe.getMonth(),de&&(He("onYearChange"),N()),He("onMonthChange")}if(Si(),T(),fn(),!ue&&n.config.mode!=="range"&&n.config.showMonths===1?E(te):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var Se=n.config.mode==="single"&&!n.config.enableTime,he=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(Se||he)&&ke()}b()}}var Tt={locale:[pe,Y],showMonths:[j,s,V],minDate:[S],maxDate:[S],positionElement:[Po],clickOpens:[function(){n.config.clickOpens===!0?(m(n._input,"focus",n.open),m(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function Ut(P,z){if(P!==null&&typeof P=="object"){Object.assign(n.config,P);for(var Q in P)Tt[Q]!==void 0&&Tt[Q].forEach(function(te){return te()})}else n.config[P]=z,Tt[P]!==void 0?Tt[P].forEach(function(te){return te()}):Qc.indexOf(P)>-1&&(n.config[P]=qc(z));n.redraw(),fn(!0)}function Lt(P,z){var Q=[];if(P instanceof Array)Q=P.map(function(te){return n.parseDate(te,z)});else if(P instanceof Date||typeof P=="number")Q=[n.parseDate(P,z)];else if(typeof P=="string")switch(n.config.mode){case"single":case"time":Q=[n.parseDate(P,z)];break;case"multiple":Q=P.split(n.config.conjunction).map(function(te){return n.parseDate(te,z)});break;case"range":Q=P.split(n.l10n.rangeSeparator).map(function(te){return n.parseDate(te,z)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(P)));n.selectedDates=n.config.allowInvalidPreload?Q:Q.filter(function(te){return te instanceof Date&&ee(te,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(te,oe){return te.getTime()-oe.getTime()})}function qt(P,z,Q){if(z===void 0&&(z=!1),Q===void 0&&(Q=n.config.dateFormat),P!==0&&!P||P instanceof Array&&P.length===0)return n.clear(z);Lt(P,Q),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),S(void 0,z),h(),n.selectedDates.length===0&&n.clear(!1),fn(z),z&&He("onChange")}function dr(P){return P.slice().map(function(z){return typeof z=="string"||typeof z=="number"||z instanceof Date?n.parseDate(z,void 0,!0):z&&typeof z=="object"&&z.from&&z.to?{from:n.parseDate(z.from,void 0),to:n.parseDate(z.to,void 0)}:z}).filter(function(z){return z})}function zs(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var P=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);P&&Lt(P,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function In(){if(n.input=fe(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=$e(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),Po()}function Po(){n._positionElement=n.config.positionElement||n._input}function Nu(){var P=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=$e("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=P,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=P==="datetime-local"?"Y-m-d\\TH:i:S":P==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(z){}m(n.mobileInput,"change",function(z){n.setDate(Kt(z).value,!1,n.mobileFormatStr),He("onChange"),He("onClose")})}function zu(P){if(n.isOpen===!0)return n.close();n.open(P)}function He(P,z){if(n.config!==void 0){var Q=n.config[P];if(Q!==void 0&&Q.length>0)for(var te=0;Q[te]&&te<Q.length;te++)Q[te](n.selectedDates,n.input.value,n,z);P==="onChange"&&(n.input.dispatchEvent(wi("change")),n.input.dispatchEvent(wi("input")))}}function wi(P){var z=document.createEvent("Event");return z.initEvent(P,!0,!0),z}function Do(P){for(var z=0;z<n.selectedDates.length;z++){var Q=n.selectedDates[z];if(Q instanceof Date&&Qt(Q,P)===0)return""+z}return!1}function js(P){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Qt(P,n.selectedDates[0])>=0&&Qt(P,n.selectedDates[1])<=0}function Si(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(P,z){var Q=new Date(n.currentYear,n.currentMonth,1);Q.setMonth(n.currentMonth+z),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[z].textContent=ls(Q.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=Q.getMonth().toString(),P.value=Q.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Oo(P){var z=P||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(Q){return n.formatDate(Q,z)}).filter(function(Q,te,oe){return n.config.mode!=="range"||n.config.enableTime||oe.indexOf(Q)===te}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function fn(P){P===void 0&&(P=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Oo(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=Oo(n.config.altFormat)),P!==!1&&He("onValueUpdate")}function Us(P){var z=Kt(P),Q=n.prevMonthNav.contains(z),te=n.nextMonthNav.contains(z);Q||te?D(Q?-1:1):n.yearElements.indexOf(z)>=0?z.select():z.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):z.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function It(P){P.preventDefault();var z=P.type==="keydown",Q=Kt(P),te=Q;n.amPM!==void 0&&Q===n.amPM&&(n.amPM.textContent=n.l10n.amPM[an(n.amPM.textContent===n.l10n.amPM[0])]);var oe=parseFloat(te.getAttribute("min")),ue=parseFloat(te.getAttribute("max")),we=parseFloat(te.getAttribute("step")),de=parseInt(te.value,10),Se=P.delta||(z?P.which===38?1:-1:0),he=de+we*Se;if(typeof te.value!="undefined"&&te.value.length===2){var me=te===n.hourElement,Me=te===n.minuteElement;he<oe?(he=ue+he+an(!me)+(an(me)&&an(!n.amPM)),Me&&I(void 0,-1,n.hourElement)):he>ue&&(he=te===n.hourElement?he-ue-an(!n.amPM):oe,Me&&I(void 0,1,n.hourElement)),n.amPM&&me&&(we===1?he+de===23:Math.abs(he-de)>we)&&(n.amPM.textContent=n.l10n.amPM[an(n.amPM.textContent===n.l10n.amPM[0])]),te.value=jt(he)}}return i(),n}function li(e,t){for(var n=Array.prototype.slice.call(e).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<n.length;i++){var o=n[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=QP(o,t||{}),r.push(o._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return li(this,e)},HTMLElement.prototype.flatpickr=function(e){return li([this],e)});var gt=function(e,t){return typeof e=="string"?li(window.document.querySelectorAll(e),t):e instanceof Node?li([e],t):li(e,t)};gt.defaultConfig={},gt.l10ns={en:_t({},uo),default:_t({},uo)},gt.localize=function(e){gt.l10ns.default=_t(_t({},gt.l10ns.default),e)},gt.setDefaults=function(e){gt.defaultConfig=_t(_t({},gt.defaultConfig),e)},gt.parseDate=Xc({}),gt.formatDate=bg({}),gt.compareDates=Qt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return li(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e=="string"?parseInt(e,10):e))},typeof window!="undefined"&&(window.flatpickr=gt);const qP=Vu(Object.freeze(Object.defineProperty({__proto__:null,default:gt},Symbol.toStringTag,{value:"Module"})));(function(e){function t(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(U){return typeof U}:t=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},t(D)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(y),r=o(YS),i=o(qP);function o(D){return D&&D.__esModule?D:{default:D}}function a(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return a=function(){return D},D}function s(D){if(D&&D.__esModule)return D;if(D===null||t(D)!=="object"&&typeof D!="function")return{default:D};var L=a();if(L&&L.has(D))return L.get(D);var U={},W=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ie in D)if(Object.prototype.hasOwnProperty.call(D,ie)){var le=W?Object.getOwnPropertyDescriptor(D,ie):null;le&&(le.get||le.set)?Object.defineProperty(U,ie,le):U[ie]=D[ie]}return U.default=D,L&&L.set(D,U),U}function c(D){return h(D)||d(D)||f(D)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2458
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(D,L){if(D){if(typeof D=="string")return g(D,L);var U=Object.prototype.toString.call(D).slice(8,-1);if(U==="Object"&&D.constructor&&(U=D.constructor.name),U==="Map"||U==="Set")return Array.from(D);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return g(D,L)}}function d(D){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(D))return Array.from(D)}function h(D){if(Array.isArray(D))return g(D)}function g(D,L){(L==null||L>D.length)&&(L=D.length);for(var U=0,W=new Array(L);U<L;U++)W[U]=D[U];return W}function v(){return v=Object.assign||function(D){for(var L=1;L<arguments.length;L++){var U=arguments[L];for(var W in U)Object.prototype.hasOwnProperty.call(U,W)&&(D[W]=U[W])}return D},v.apply(this,arguments)}function m(D,L){if(D==null)return{};var U=b(D,L),W,ie;if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(D);for(ie=0;ie<le.length;ie++)W=le[ie],!(L.indexOf(W)>=0)&&Object.prototype.propertyIsEnumerable.call(D,W)&&(U[W]=D[W])}return U}function b(D,L){if(D==null)return{};var U={},W=Object.keys(D),ie,le;for(le=0;le<W.length;le++)ie=W[le],!(L.indexOf(ie)>=0)&&(U[ie]=D[ie]);return U}function x(D,L){var U=Object.keys(D);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(D);L&&(W=W.filter(function(ie){return Object.getOwnPropertyDescriptor(D,ie).enumerable})),U.push.apply(U,W)}return U}function S(D){for(var L=1;L<arguments.length;L++){var U=arguments[L]!=null?arguments[L]:{};L%2?x(Object(U),!0).forEach(function(W){N(D,W,U[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(U)):x(Object(U)).forEach(function(W){Object.defineProperty(D,W,Object.getOwnPropertyDescriptor(U,W))})}return D}function C(D,L){if(!(D instanceof L))throw new TypeError("Cannot call a class as a function")}function I(D,L){for(var U=0;U<L.length;U++){var W=L[U];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(D,W.key,W)}}function w(D,L,U){return L&&I(D.prototype,L),D}function A(D,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(L&&L.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),L&&E(D,L)}function E(D,L){return E=Object.setPrototypeOf||function(W,ie){return W.__proto__=ie,W},E(D,L)}function k(D){var L=O();return function(){var W=T(D),ie;if(L){var le=T(this).constructor;ie=Reflect.construct(W,arguments,le)}else ie=W.apply(this,arguments);return $(this,ie)}}function $(D,L){return L&&(t(L)==="object"||typeof L=="function")?L:G(D)}function G(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function O(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(D){return!1}}function T(D){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},T(D)}function N(D,L,U){return L in D?Object.defineProperty(D,L,{value:U,enumerable:!0,configurable:!0,writable:!0}):D[L]=U,D}var H=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],j=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),F=["onCreate","onDestroy"],M=r.default.func,V=function(D){A(U,D);var L=k(U);function U(){var W;C(this,U);for(var ie=arguments.length,le=new Array(ie),ae=0;ae<ie;ae++)le[ae]=arguments[ae];return W=L.call.apply(L,[this].concat(le)),N(G(W),"createFlatpickrInstance",function(){var ee=S({onClose:function(){W.node.blur&&W.node.blur()}},W.props.options);ee=Y(ee,W.props),W.flatpickr=(0,i.default)(W.node,ee),W.props.hasOwnProperty("value")&&W.flatpickr.setDate(W.props.value,!1);var ne=W.props.onCreate;ne&&ne(W.flatpickr)}),N(G(W),"destroyFlatpickrInstance",function(){var ee=W.props.onDestroy;ee&&ee(W.flatpickr),W.flatpickr.destroy(),W.flatpickr=null}),N(G(W),"handleNodeChange",function(ee){W.node=ee,W.flatpickr&&(W.destroyFlatpickrInstance(),W.createFlatpickrInstance())}),W}return w(U,[{key:"componentDidUpdate",value:function(ie){var le=this.props.options,ae=ie.options;le=Y(le,this.props),ae=Y(ae,ie);for(var ee=Object.getOwnPropertyNames(le),ne=ee.length-1;ne>=0;ne--){var J=ee[ne],ce=le[J];ce!==ae[J]&&(H.indexOf(J)!==-1&&!Array.isArray(ce)&&(ce=[ce]),this.flatpickr.set(J,ce))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&ie.value&&Array.isArray(ie.value)&&this.props.value.every(function(ve,ze){ie[ze]}))&&this.props.value!==ie.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var ie=this.props,le=ie.options,ae=ie.defaultValue,ee=ie.value,ne=ie.children,J=ie.render,ce=m(ie,["options","defaultValue","value","children","render"]);return H.forEach(function(ve){delete ce[ve]}),F.forEach(function(ve){delete ce[ve]}),J?J(S(S({},ce),{},{defaultValue:ae,value:ee}),this.handleNodeChange):le.wrap?n.default.createElement("div",v({},ce,{ref:this.handleNodeChange}),ne):n.default.createElement("input",v({},ce,{defaultValue:ae,ref:this.handleNodeChange}))}}]),U}(n.Component);N(V,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:j,onOpen:j,onClose:j,onMonthChange:j,onYearChange:j,onReady:j,onValueUpdate:j,onDayCreate:j,onCreate:M,onDestroy:M,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),N(V,"defaultProps",{options:{}});function Y(D,L){var U=S({},D);return H.forEach(function(W){if(L.hasOwnProperty(W)){var ie;U[W]&&!Array.isArray(U[W])?U[W]=[U[W]]:U[W]||(U[W]=[]);var le=Array.isArray(L[W])?L[W]:[L[W]];(ie=U[W]).push.apply(ie,c(le))}}),U}var Z=V;e.default=Z})(gg);const xg=pn(gg);var Cg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",c="hour",u="day",f="week",d="month",h="quarter",g="year",v="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var j=["th","st","nd","rd"],F=H%100;return"["+H+(j[(F-20)%10]||j[F]||j[0])+"]"}},C=function(H,j,F){var M=String(H);return!M||M.length>=j?H:""+Array(j+1-M.length).join(F)+H},I={s:C,z:function(H){var j=-H.utcOffset(),F=Math.abs(j),M=Math.floor(F/60),V=F%60;return(j<=0?"+":"-")+C(M,2,"0")+":"+C(V,2,"0")},m:function H(j,F){if(j.date()<F.date())return-H(F,j);var M=12*(F.year()-j.year())+(F.month()-j.month()),V=j.clone().add(M,d),Y=F-V<0,Z=j.clone().add(M+(Y?-1:1),d);return+(-(M+(F-V)/(Y?V-Z:Z-V))||0)},a:function(H){return H<0?Math.ceil(H)||0:Math.floor(H)},p:function(H){return{M:d,y:g,w:f,d:u,D:v,h:c,m:s,s:a,ms:o,Q:h}[H]||String(H||"").toLowerCase().replace(/s$/,"")},u:function(H){return H===void 0}},w="en",A={};A[w]=S;var E="$isDayjsObject",k=function(H){return H instanceof T||!(!H||!H[E])},$=function H(j,F,M){var V;if(!j)return w;if(typeof j=="string"){var Y=j.toLowerCase();A[Y]&&(V=Y),F&&(A[Y]=F,V=Y);var Z=j.split("-");if(!V&&Z.length>1)return H(Z[0])}else{var D=j.name;A[D]=j,V=D}return!M&&V&&(w=V),V||!M&&w},G=function(H,j){if(k(H))return H.clone();var F=typeof j=="object"?j:{};return F.date=H,F.args=arguments,new T(F)},O=I;O.l=$,O.i=k,O.w=function(H,j){return G(H,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var T=function(){function H(F){this.$L=$(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[E]=!0}var j=H.prototype;return j.parse=function(F){this.$d=function(M){var V=M.date,Y=M.utc;if(V===null)return new Date(NaN);if(O.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var Z=V.match(b);if(Z){var D=Z[2]-1||0,L=(Z[7]||"0").substring(0,3);return Y?new Date(Date.UTC(Z[1],D,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,L)):new Date(Z[1],D,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,L)}}return new Date(V)}(F),this.init()},j.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},j.$utils=function(){return O},j.isValid=function(){return this.$d.toString()!==m},j.isSame=function(F,M){var V=G(F);return this.startOf(M)<=V&&V<=this.endOf(M)},j.isAfter=function(F,M){return G(F)<this.startOf(M)},j.isBefore=function(F,M){return this.endOf(M)<G(F)},j.$g=function(F,M,V){return O.u(F)?this[M]:this.set(V,F)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(F,M){var V=this,Y=!!O.u(M)||M,Z=O.p(F),D=function(ne,J){var ce=O.w(V.$u?Date.UTC(V.$y,J,ne):new Date(V.$y,J,ne),V);return Y?ce:ce.endOf(u)},L=function(ne,J){return O.w(V.toDate()[ne].apply(V.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(J)),V)},U=this.$W,W=this.$M,ie=this.$D,le="set"+(this.$u?"UTC":"");switch(Z){case g:return Y?D(1,0):D(31,11);case d:return Y?D(1,W):D(0,W+1);case f:var ae=this.$locale().weekStart||0,ee=(U<ae?U+7:U)-ae;return D(Y?ie-ee:ie+(6-ee),W);case u:case v:return L(le+"Hours",0);case c:return L(le+"Minutes",1);case s:return L(le+"Seconds",2);case a:return L(le+"Milliseconds",3);default:return this.clone()}},j.endOf=function(F){return this.startOf(F,!1)},j.$set=function(F,M){var V,Y=O.p(F),Z="set"+(this.$u?"UTC":""),D=(V={},V[u]=Z+"Date",V[v]=Z+"Date",V[d]=Z+"Month",V[g]=Z+"FullYear",V[c]=Z+"Hours",V[s]=Z+"Minutes",V[a]=Z+"Seconds",V[o]=Z+"Milliseconds",V)[Y],L=Y===u?this.$D+(M-this.$W):M;if(Y===d||Y===g){var U=this.clone().set(v,1);U.$d[D](L),U.init(),this.$d=U.set(v,Math.min(this.$D,U.daysInMonth())).$d}else D&&this.$d[D](L);return this.init(),this},j.set=function(F,M){return this.clone().$set(F,M)},j.get=function(F){return this[O.p(F)]()},j.add=function(F,M){var V,Y=this;F=Number(F);var Z=O.p(M),D=function(W){var ie=G(Y);return O.w(ie.date(ie.date()+Math.round(W*F)),Y)};if(Z===d)return this.set(d,this.$M+F);if(Z===g)return this.set(g,this.$y+F);if(Z===u)return D(1);if(Z===f)return D(7);var L=(V={},V[s]=r,V[c]=i,V[a]=n,V)[Z]||1,U=this.$d.getTime()+F*L;return O.w(U,this)},j.subtract=function(F,M){return this.add(-1*F,M)},j.format=function(F){var M=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var Y=F||"YYYY-MM-DDTHH:mm:ssZ",Z=O.z(this),D=this.$H,L=this.$m,U=this.$M,W=V.weekdays,ie=V.months,le=V.meridiem,ae=function(J,ce,ve,ze){return J&&(J[ce]||J(M,Y))||ve[ce].slice(0,ze)},ee=function(J){return O.s(D%12||12,J,"0")},ne=le||function(J,ce,ve){var ze=J<12?"AM":"PM";return ve?ze.toLowerCase():ze};return Y.replace(x,function(J,ce){return ce||function(ve){switch(ve){case"YY":return String(M.$y).slice(-2);case"YYYY":return O.s(M.$y,4,"0");case"M":return U+1;case"MM":return O.s(U+1,2,"0");case"MMM":return ae(V.monthsShort,U,ie,3);case"MMMM":return ae(ie,U);case"D":return M.$D;case"DD":return O.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return ae(V.weekdaysMin,M.$W,W,2);case"ddd":return ae(V.weekdaysShort,M.$W,W,3);case"dddd":return W[M.$W];case"H":return String(D);case"HH":return O.s(D,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return ne(D,L,!0);case"A":return ne(D,L,!1);case"m":return String(L);case"mm":return O.s(L,2,"0");case"s":return String(M.$s);case"ss":return O.s(M.$s,2,"0");case"SSS":return O.s(M.$ms,3,"0");case"Z":return Z}return null}(J)||Z.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(F,M,V){var Y,Z=this,D=O.p(M),L=G(F),U=(L.utcOffset()-this.utcOffset())*r,W=this-L,ie=function(){return O.m(Z,L)};switch(D){case g:Y=ie()/12;break;case d:Y=ie();break;case h:Y=ie()/3;break;case f:Y=(W-U)/6048e5;break;case u:Y=(W-U)/864e5;break;case c:Y=W/i;break;case s:Y=W/r;break;case a:Y=W/n;break;default:Y=W}return V?Y:O.a(Y)},j.daysInMonth=function(){return this.endOf(d).$D},j.$locale=function(){return A[this.$L]},j.locale=function(F,M){if(!F)return this.$L;var V=this.clone(),Y=$(F,M,!0);return Y&&(V.$L=Y),V},j.clone=function(){return O.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},H}(),N=T.prototype;return G.prototype=N,[["$ms",o],["$s",a],["$m",s],["$H",c],["$W",u],["$M",d],["$y",g],["$D",v]].forEach(function(H){N[H[1]]=function(j){return this.$g(j,H[0],H[1])}}),G.extend=function(H,j){return H.$i||(H(j,T,G),H.$i=!0),G},G.locale=$,G.isDayjs=k,G.unix=function(H){return G(1e3*H)},G.en=A[w],G.Ls=A,G.p={},G})})(Cg);var JP=Cg.exports;const ut=pn(JP);var wg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,a){var s,c=function(h,g,v){v===void 0&&(v={});var m=new Date(h),b=function(x,S){S===void 0&&(S={});var C=S.timeZoneName||"short",I=x+"|"+C,w=r[I];return w||(w=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:x,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:C}),r[I]=w),w}(g,v);return b.formatToParts(m)},u=function(h,g){for(var v=c(h,g),m=[],b=0;b<v.length;b+=1){var x=v[b],S=x.type,C=x.value,I=n[S];I>=0&&(m[I]=parseInt(C,10))}var w=m[3],A=w===24?0:w,E=m[0]+"-"+m[1]+"-"+m[2]+" "+A+":"+m[4]+":"+m[5]+":000",k=+h;return(a.utc(E).valueOf()-(k-=k%1e3))/6e4},f=o.prototype;f.tz=function(h,g){h===void 0&&(h=s);var v,m=this.utcOffset(),b=this.toDate(),x=b.toLocaleString("en-US",{timeZone:h}),S=Math.round((b-new Date(x))/1e3/60),C=15*-Math.round(b.getTimezoneOffset()/15)-S;if(!Number(C))v=this.utcOffset(0,g);else if(v=a(x,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(C,!0),g){var I=v.utcOffset();v=v.add(m-I,"minute")}return v.$x.$timezone=h,v},f.offsetName=function(h){var g=this.$x.$timezone||a.tz.guess(),v=c(this.valueOf(),g,{timeZoneName:h}).find(function(m){return m.type.toLowerCase()==="timezonename"});return v&&v.value};var d=f.startOf;f.startOf=function(h,g){if(!this.$x||!this.$x.$timezone)return d.call(this,h,g);var v=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(v,h,g).tz(this.$x.$timezone,!0)},a.tz=function(h,g,v){var m=v&&g,b=v||g||s,x=u(+a(),b);if(typeof h!="string")return a(h).tz(b);var S=function(A,E,k){var $=A-60*E*1e3,G=u($,k);if(E===G)return[$,E];var O=u($-=60*(G-E)*1e3,k);return G===O?[$,G]:[A-60*Math.min(G,O)*1e3,Math.max(G,O)]}(a.utc(h,m).valueOf(),x,b),C=S[0],I=S[1],w=a(C).utcOffset(I);return w.$x.$timezone=b,w},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){s=h}}})})(wg);var XP=wg.exports;const ZP=pn(XP);var Sg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($t,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,s){var c=a.prototype;s.utc=function(m){var b={date:m,utc:!0,args:arguments};return new a(b)},c.utc=function(m){var b=s(this.toDate(),{locale:this.$L,utc:!0});return m?b.add(this.utcOffset(),n):b},c.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var u=c.parse;c.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var f=c.init;c.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else f.call(this)};var d=c.utcOffset;c.utcOffset=function(m,b){var x=this.$utils().u;if(x(m))return this.$u?0:x(this.$offset)?d.call(this):this.$offset;if(typeof m=="string"&&(m=function(w){w===void 0&&(w="");var A=w.match(r);if(!A)return null;var E=(""+A[0]).match(i)||["-",0,0],k=E[0],$=60*+E[1]+ +E[2];return $===0?0:k==="+"?$:-$}(m),m===null))return this;var S=Math.abs(m)<=16?60*m:m,C=this;if(b)return C.$offset=S,C.$u=m===0,C;if(m!==0){var I=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(C=this.local().add(S+I,n)).$offset=S,C.$x.$localOffset=I}else C=this.utc();return C};var h=c.format;c.format=function(m){var b=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,b)},c.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var g=c.toDate;c.toDate=function(m){return m==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var v=c.diff;c.diff=function(m,b,x){if(m&&this.$u===m.$u)return v.call(this,m,b,x);var S=this.local(),C=s(m).local();return v.call(S,C,b,x)}}})})(Sg);var eD=Sg.exports;const tD=pn(eD);ut.extend(ZP),ut.extend(tD);const nD=e=>{if(!ut(e).isAfter(ut(Date.now()).subtract(15,"minute")))return ut(Date.now()).add(15,"minute").toDate()},tu=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const s=ut.utc(a[0]).toISOString();i(s)}else i("")};return l.jsx(p.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",paddingLeft:"0.5rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,minHeight:"37px",color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:l.jsx(xg,{value:e&&ut(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||nD(e),maxDate:n,parseDate:(a,s)=>ut(a,s).toDate(),formatDate:(a,s)=>ut(a).format(s),time_24hr:!0,minuteIncrement:1}})})},rD=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return l.jsxs(p.Box,{sx:{marginBottom:"16px"},children:[l.jsx(p.FormControl,{children:l.jsx(p.FormLabel,{required:e,color:"primary",children:"Duration"})}),l.jsxs(p.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[l.jsx(co,{label:"From date",defaultValue:i,required:e,onChange:n}),l.jsx(co,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},Ig=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(ut(t).toDate()),n&&r.push(ut(n).toDate()),r},iD=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=y.useState(Ig(t)),[a,s]=y.useState(!1),c=()=>s(!a),u=f=>{if(f&&f.length>0){const d="YYYY-MM-DD",h=ut(f[0]).format(d),g=ut(f[1]).format(d);r({from:h,to:g})}else f&&f.length===0&&(r({from:"",to:""}),c());o(f)};return l.jsxs(p.FormControl,{sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{required:n,color:"primary",children:e}),l.jsx(p.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",padding:"0.5rem 0.75rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:l.jsx(xg,{value:i,onChange:u,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(f,d)=>ut(f,d).toDate(),formatDate:(f,d)=>ut(f).format(d),defaultDate:Ig(t)||void 0}})}),l.jsx(Ke,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:c})]})},oD=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{Qi(e).signOut().then(()=>n(null)).catch(s=>{console.error("There was a problem logging out the user:",s)})};return l.jsx(p.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:l.jsx(p.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:l.jsxs(p.CardContent,{children:[l.jsx(p.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),l.jsx(p.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),l.jsx(p.Box,{display:"flex",justifyContent:"center",children:l.jsx(p.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},Ag=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],nu=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),aD=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=y.useState(Ag(n)),[a,s]=y.useState(null),[c,u]=y.useState(""),[f,d]=y.useState(""),[h,g]=y.useState(""),[v,m]=y.useState("");y.useEffect(()=>o(Ag(n)),[n]);const b=()=>{const I=[...i];I.push({key:c,value:h}),o(I),u(""),g(""),r(nu(I))},x=I=>{const w=i.filter((A,E)=>E!==I);o(w),r(nu(w))},S=(I,w)=>{d(w.key),m(w.value),s(I)},C=I=>{const w=[...i];w[I]={key:f,value:v},o(w),s(null),d(""),m(""),r(nu(w))};return l.jsxs(p.Box,{children:[i.map((I,w)=>l.jsx(p.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:l.jsx(p.CardContent,{style:{flex:1},children:a===w?l.jsxs(p.Box,{display:"flex",alignItems:"center",children:[l.jsx(p.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:f,onChange:A=>d(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),l.jsx(p.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:v,onChange:A=>m(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),l.jsx(p.Tooltip,{title:e.save,children:f&&v?l.jsx(p.IconButton,{onClick:()=>C(w),children:l.jsx(Oe.Check,{})}):l.jsx("span",{children:l.jsx(p.IconButton,{disabled:!0,children:l.jsx(Oe.Check,{})})})})]}):l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[l.jsxs(p.Box,{children:[l.jsxs(p.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",l.jsx(p.Typography,{whiteSpace:"wrap",children:I.key})]}),l.jsxs(p.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",l.jsx(p.Typography,{whiteSpace:"wrap",children:I.value})]})]}),l.jsxs(p.Box,{children:[l.jsx(p.Tooltip,{title:e.edit,children:l.jsx(p.IconButton,{onClick:()=>S(w,I),children:l.jsx(Oe.Edit,{})})}),l.jsx(p.Tooltip,{title:e.delete,children:l.jsx(p.IconButton,{onClick:()=>x(w),children:l.jsx(Oe.Delete,{})})})]})]})})},`dynamic-fields-${t}-${w}`)),l.jsxs(p.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[l.jsx(p.Input,{size:"md",variant:"outlined",color:"neutral",value:c,placeholder:e.keyDynamicFields,onChange:I=>u(I.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),l.jsx(p.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:I=>g(I.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),l.jsx(p.Tooltip,{title:e.add,children:c&&h?l.jsx(p.Button,{onClick:b,children:l.jsx(Oe.Add,{})}):l.jsx("span",{children:l.jsx(p.Button,{disabled:!0,children:l.jsx(Oe.Add,{})})})})]})]})};function ho(e,t,n){return(t=lc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tg(Object(n),!0).forEach(function(r){ho(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lc(r.key),r)}}function lD(e,t,n){return t&&Eg(e.prototype,t),n&&Eg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ru(e,t){return ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ru(e,t)}function cD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ru(e,t)}function cs(e){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},cs(e)}function kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(kg=function(){return!!e})()}function uD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dD(e,t){if(t&&(Sr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uD(e)}function fD(e){var t=kg();return function(){var n,r=cs(e);if(t){var i=cs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dD(this,n)}}function iu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hD(e){if(Array.isArray(e))return iu(e)}function pD(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _g(e,t){if(e){if(typeof e=="string")return iu(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?iu(e,t):void 0}}function gD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2459
2459
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ci(e){return hD(e)||pD(e)||_g(e)||gD()}function mD(e){if(Array.isArray(e))return e}function vD(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function bD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2460
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hn(e,t){return mD(e)||vD(e,t)||_g(e,t)||bD()}function wn(e,t){if(e==null)return{};var n,r,i=Te(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ou=y.useLayoutEffect,xD=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],us=function(){};function CD(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function wD(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&o.push("".concat(CD(e,a)));return o.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var ds=function(t){return DD(t)?t.filter(Boolean):Sr(t)==="object"&&t!==null?[t]:[]},Pg=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=wn(t,xD);return be({},n)},ot=function(t,n,r){var i=t.cx,o=t.getStyles,a=t.getClassNames,s=t.className;return{css:o(n,t),className:i(r!=null?r:{},a(n,t),s)}};function fs(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function SD(e){return fs(e)?window.innerHeight:e.clientHeight}function Dg(e){return fs(e)?window.pageYOffset:e.scrollTop}function hs(e,t){if(fs(e)){window.scrollTo(0,t);return}e.scrollTop=t}function ID(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function AD(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ps(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:us,i=Dg(e),o=t-i,a=10,s=0;function c(){s+=a;var u=AD(s,i,o,n);hs(e,u),s<n?window.requestAnimationFrame(c):r(e)}c()}function Og(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?hs(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&hs(e,Math.max(t.offsetTop-i,0))}function TD(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Rg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function ED(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var Mg=!1,kD={get passive(){return Mg=!0}},gs=typeof window!="undefined"?window:{};gs.addEventListener&&gs.removeEventListener&&(gs.addEventListener("p",us,kD),gs.removeEventListener("p",us,!1));var _D=Mg;function PD(e){return e!=null}function DD(e){return Array.isArray(e)}function po(e,t,n){return e?t:n}function xz(e){return e}function Cz(e){return e}var OD=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(a){var s=Hn(a,1),c=s[0];return!r.includes(c)});return o.reduce(function(a,s){var c=Hn(s,2),u=c[0],f=c[1];return a[u]=f,a},{})},RD=["children","innerProps"],MD=["children","innerProps"];function LD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,c=ID(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var f=c.getBoundingClientRect(),d=f.height,h=n.getBoundingClientRect(),g=h.bottom,v=h.height,m=h.top,b=n.offsetParent.getBoundingClientRect(),x=b.top,S=a?window.innerHeight:SD(c),C=Dg(c),I=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),A=x-w,E=S-m,k=A+C,B=d-C-m,G=g-S+C+I,O=C+m-w,T=160;switch(i){case"auto":case"bottom":if(E>=v)return{placement:"bottom",maxHeight:t};if(B>=v&&!a)return o&&ps(c,G,T),{placement:"bottom",maxHeight:t};if(!a&&B>=r||a&&E>=r){o&&ps(c,G,T);var N=a?E-I:B-I;return{placement:"bottom",maxHeight:N}}if(i==="auto"||a){var H=t,j=a?A:k;return j>=r&&(H=Math.min(j-I-s,t)),{placement:"top",maxHeight:H}}if(i==="bottom")return o&&hs(c,G),{placement:"bottom",maxHeight:t};break;case"top":if(A>=v)return{placement:"top",maxHeight:t};if(k>=v&&!a)return o&&ps(c,O,T),{placement:"top",maxHeight:t};if(!a&&k>=r||a&&A>=r){var F=t;return(!a&&k>=r||a&&A>=r)&&(F=a?A-w:k-w),o&&ps(c,O,T),{placement:"top",maxHeight:F}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function BD(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Lg=function(t){return t==="auto"?"bottom":t},$D=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,s=o.spacing,c=o.colors;return be((r={label:"menu"},ho(r,BD(i),"100%"),ho(r,"position","absolute"),ho(r,"width","100%"),ho(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},Bg=y.createContext(null),FD=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,c=t.theme,u=y.useContext(Bg)||{},f=u.setPortalPlacement,d=y.useRef(null),h=y.useState(i),g=Hn(h,2),v=g[0],m=g[1],b=y.useState(null),x=Hn(b,2),S=x[0],C=x[1],I=c.spacing.controlHeight;return ou(function(){var w=d.current;if(w){var A=a==="fixed",E=s&&!A,k=LD({maxHeight:i,menuEl:w,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:A,controlHeight:I});m(k.maxHeight),C(k.placement),f==null||f(k.placement)}},[i,o,a,s,r,f,I]),n({ref:d,placerProps:be(be({},t),{},{placement:S||Lg(o),maxHeight:v})})},ND=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return ge.jsx("div",R({},ot(t,"menu",{menu:!0}),{ref:r},i),n)},zD=ND,jD=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return be({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},UD=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return ge.jsx("div",R({},ot(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},$g=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return be({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},VD=$g,HD=$g,WD=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=wn(t,RD);return ge.jsx("div",R({},ot(be(be({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},GD=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=wn(t,MD);return ge.jsx("div",R({},ot(be(be({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},YD=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},KD=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,s=t.menuPosition,c=y.useRef(null),u=y.useRef(null),f=y.useState(Lg(a)),d=Hn(f,2),h=d[0],g=d[1],v=y.useMemo(function(){return{setPortalPlacement:g}},[]),m=y.useState(null),b=Hn(m,2),x=b[0],S=b[1],C=y.useCallback(function(){if(i){var E=TD(i),k=s==="fixed"?0:window.pageYOffset,B=E[h]+k;(B!==(x==null?void 0:x.offset)||E.left!==(x==null?void 0:x.rect.left)||E.width!==(x==null?void 0:x.rect.width))&&S({offset:B,rect:E})}},[i,s,h,x==null?void 0:x.offset,x==null?void 0:x.rect.left,x==null?void 0:x.rect.width]);ou(function(){C()},[C]);var I=y.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&c.current&&(u.current=ZI(i,c.current,C,{elementResize:"ResizeObserver"in window}))},[i,C]);ou(function(){I()},[I]);var w=y.useCallback(function(E){c.current=E,I()},[I]);if(!n&&s!=="fixed"||!x)return null;var A=ge.jsx("div",R({ref:w},ot(be(be({},t),{},{offset:x.offset,position:s,rect:x.rect}),"menuPortal",{"menu-portal":!0}),o),r);return ge.jsx(Bg.Provider,{value:v},n?Le.createPortal(A,n):A)},qD=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},QD=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return ge.jsx("div",R({},ot(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},JD=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return be({alignItems:"center",display:i&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},XD=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return ge.jsx("div",R({},ot(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},ZD=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},eO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",R({},ot(t,"indicatorsContainer",{indicators:!0}),r),n)},Fg,tO=["size"],nO=["innerProps","isRtl","size"],rO={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ng=function(t){var n=t.size,r=wn(t,tO);return ge.jsx("svg",R({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:rO},r))},au=function(t){return ge.jsx(Ng,R({size:20},t),ge.jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},zg=function(t){return ge.jsx(Ng,R({size:20},t),ge.jsx("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},jg=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return be({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},iO=jg,oO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",R({},ot(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ge.jsx(zg,null))},aO=jg,sO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",R({},ot(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ge.jsx(au,null))},lO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return be({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},cO=function(t){var n=t.innerProps;return ge.jsx("span",R({},n,ot(t,"indicatorSeparator",{"indicator-separator":!0})))},uO=ge.keyframes(Fg||(Fg=yD([`
2460
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hn(e,t){return mD(e)||vD(e,t)||_g(e,t)||bD()}function wn(e,t){if(e==null)return{};var n,r,i=Te(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ou=y.useLayoutEffect,xD=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],us=function(){};function CD(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function wD(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&o.push("".concat(CD(e,a)));return o.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var ds=function(t){return DD(t)?t.filter(Boolean):Sr(t)==="object"&&t!==null?[t]:[]},Pg=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=wn(t,xD);return be({},n)},ot=function(t,n,r){var i=t.cx,o=t.getStyles,a=t.getClassNames,s=t.className;return{css:o(n,t),className:i(r!=null?r:{},a(n,t),s)}};function fs(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function SD(e){return fs(e)?window.innerHeight:e.clientHeight}function Dg(e){return fs(e)?window.pageYOffset:e.scrollTop}function hs(e,t){if(fs(e)){window.scrollTo(0,t);return}e.scrollTop=t}function ID(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function AD(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ps(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:us,i=Dg(e),o=t-i,a=10,s=0;function c(){s+=a;var u=AD(s,i,o,n);hs(e,u),s<n?window.requestAnimationFrame(c):r(e)}c()}function Og(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?hs(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&hs(e,Math.max(t.offsetTop-i,0))}function TD(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Rg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function ED(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var Mg=!1,kD={get passive(){return Mg=!0}},gs=typeof window!="undefined"?window:{};gs.addEventListener&&gs.removeEventListener&&(gs.addEventListener("p",us,kD),gs.removeEventListener("p",us,!1));var _D=Mg;function PD(e){return e!=null}function DD(e){return Array.isArray(e)}function po(e,t,n){return e?t:n}function xz(e){return e}function Cz(e){return e}var OD=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(a){var s=Hn(a,1),c=s[0];return!r.includes(c)});return o.reduce(function(a,s){var c=Hn(s,2),u=c[0],f=c[1];return a[u]=f,a},{})},RD=["children","innerProps"],MD=["children","innerProps"];function LD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,c=ID(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var f=c.getBoundingClientRect(),d=f.height,h=n.getBoundingClientRect(),g=h.bottom,v=h.height,m=h.top,b=n.offsetParent.getBoundingClientRect(),x=b.top,S=a?window.innerHeight:SD(c),C=Dg(c),I=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),A=x-w,E=S-m,k=A+C,$=d-C-m,G=g-S+C+I,O=C+m-w,T=160;switch(i){case"auto":case"bottom":if(E>=v)return{placement:"bottom",maxHeight:t};if($>=v&&!a)return o&&ps(c,G,T),{placement:"bottom",maxHeight:t};if(!a&&$>=r||a&&E>=r){o&&ps(c,G,T);var N=a?E-I:$-I;return{placement:"bottom",maxHeight:N}}if(i==="auto"||a){var H=t,j=a?A:k;return j>=r&&(H=Math.min(j-I-s,t)),{placement:"top",maxHeight:H}}if(i==="bottom")return o&&hs(c,G),{placement:"bottom",maxHeight:t};break;case"top":if(A>=v)return{placement:"top",maxHeight:t};if(k>=v&&!a)return o&&ps(c,O,T),{placement:"top",maxHeight:t};if(!a&&k>=r||a&&A>=r){var F=t;return(!a&&k>=r||a&&A>=r)&&(F=a?A-w:k-w),o&&ps(c,O,T),{placement:"top",maxHeight:F}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function BD(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Lg=function(t){return t==="auto"?"bottom":t},$D=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,s=o.spacing,c=o.colors;return be((r={label:"menu"},ho(r,BD(i),"100%"),ho(r,"position","absolute"),ho(r,"width","100%"),ho(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},Bg=y.createContext(null),FD=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,c=t.theme,u=y.useContext(Bg)||{},f=u.setPortalPlacement,d=y.useRef(null),h=y.useState(i),g=Hn(h,2),v=g[0],m=g[1],b=y.useState(null),x=Hn(b,2),S=x[0],C=x[1],I=c.spacing.controlHeight;return ou(function(){var w=d.current;if(w){var A=a==="fixed",E=s&&!A,k=LD({maxHeight:i,menuEl:w,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:A,controlHeight:I});m(k.maxHeight),C(k.placement),f==null||f(k.placement)}},[i,o,a,s,r,f,I]),n({ref:d,placerProps:be(be({},t),{},{placement:S||Lg(o),maxHeight:v})})},ND=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return ge.jsx("div",R({},ot(t,"menu",{menu:!0}),{ref:r},i),n)},zD=ND,jD=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return be({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},UD=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return ge.jsx("div",R({},ot(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},$g=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return be({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},VD=$g,HD=$g,WD=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=wn(t,RD);return ge.jsx("div",R({},ot(be(be({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},GD=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=wn(t,MD);return ge.jsx("div",R({},ot(be(be({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},YD=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},KD=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,s=t.menuPosition,c=y.useRef(null),u=y.useRef(null),f=y.useState(Lg(a)),d=Hn(f,2),h=d[0],g=d[1],v=y.useMemo(function(){return{setPortalPlacement:g}},[]),m=y.useState(null),b=Hn(m,2),x=b[0],S=b[1],C=y.useCallback(function(){if(i){var E=TD(i),k=s==="fixed"?0:window.pageYOffset,$=E[h]+k;($!==(x==null?void 0:x.offset)||E.left!==(x==null?void 0:x.rect.left)||E.width!==(x==null?void 0:x.rect.width))&&S({offset:$,rect:E})}},[i,s,h,x==null?void 0:x.offset,x==null?void 0:x.rect.left,x==null?void 0:x.rect.width]);ou(function(){C()},[C]);var I=y.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&c.current&&(u.current=ZI(i,c.current,C,{elementResize:"ResizeObserver"in window}))},[i,C]);ou(function(){I()},[I]);var w=y.useCallback(function(E){c.current=E,I()},[I]);if(!n&&s!=="fixed"||!x)return null;var A=ge.jsx("div",R({ref:w},ot(be(be({},t),{},{offset:x.offset,position:s,rect:x.rect}),"menuPortal",{"menu-portal":!0}),o),r);return ge.jsx(Bg.Provider,{value:v},n?Le.createPortal(A,n):A)},QD=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},qD=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return ge.jsx("div",R({},ot(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},JD=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return be({alignItems:"center",display:i&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},XD=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return ge.jsx("div",R({},ot(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},ZD=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},eO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",R({},ot(t,"indicatorsContainer",{indicators:!0}),r),n)},Fg,tO=["size"],nO=["innerProps","isRtl","size"],rO={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ng=function(t){var n=t.size,r=wn(t,tO);return ge.jsx("svg",R({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:rO},r))},au=function(t){return ge.jsx(Ng,R({size:20},t),ge.jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},zg=function(t){return ge.jsx(Ng,R({size:20},t),ge.jsx("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},jg=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return be({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},iO=jg,oO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",R({},ot(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ge.jsx(zg,null))},aO=jg,sO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",R({},ot(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ge.jsx(au,null))},lO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return be({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},cO=function(t){var n=t.innerProps;return ge.jsx("span",R({},n,ot(t,"indicatorSeparator",{"indicator-separator":!0})))},uO=ge.keyframes(Fg||(Fg=yD([`
2461
2461
  0%, 80%, 100% { opacity: 0; }
2462
2462
  40% { opacity: 1; }
2463
- `]))),dO=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return be({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},su=function(t){var n=t.delay,r=t.offset;return ge.jsx("span",{css:ge.css({animation:"".concat(uO," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},fO=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=wn(t,nO);return ge.jsx("div",R({},ot(be(be({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ge.jsx(su,{delay:0,offset:r}),ge.jsx(su,{delay:160,offset:!0}),ge.jsx(su,{delay:320,offset:!r}))},hO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,c=o.spacing;return be({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},pO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return ge.jsx("div",R({ref:o},ot(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a,{"aria-disabled":r||void 0}),n)},gO=pO,mO=["data"],vO=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},bO=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,c=t.innerProps,u=t.label,f=t.theme,d=t.selectProps;return ge.jsx("div",R({},ot(t,"group",{group:!0}),c),ge.jsx(a,R({},s,{selectProps:d,theme:f,getStyles:i,getClassNames:o,cx:r}),u),ge.jsx("div",null,n))},yO=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return be({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},xO=function(t){var n=Pg(t);n.data;var r=wn(n,mO);return ge.jsx("div",R({},ot(t,"groupHeading",{"group-heading":!0}),r))},CO=bO,wO=["innerRef","isDisabled","isHidden","inputClassName"],SO=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return be(be({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},IO),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Ug={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},IO={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":be({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Ug)},AO=function(t){return be({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Ug)},TO=function(t){var n=t.cx,r=t.value,i=Pg(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,c=i.inputClassName,u=wn(i,wO);return ge.jsx("div",R({},ot(t,"input",{"input-container":!0}),{"data-value":r||""}),ge.jsx("input",R({className:n({input:!0},c),ref:o,style:AO(s),disabled:a},u)))},EO=TO,kO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return be({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},_O=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return be({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},PO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return be({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Vg=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",r,n)},DO=Vg,OO=Vg;function RO(e){var t=e.children,n=e.innerProps;return ge.jsx("div",R({role:"button"},n),t||ge.jsx(au,{size:14}))}var MO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,c=t.selectProps,u=r.Container,f=r.Label,d=r.Remove;return ge.jsx(u,{data:i,innerProps:be(be({},ot(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:c},ge.jsx(f,{data:i,innerProps:be({},ot(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ge.jsx(d,{data:i,innerProps:be(be({},ot(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:c}))},LO=MO,BO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,c=a.colors;return be({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?c.primary:i?c.primary25:"transparent",color:r?c.neutral20:o?c.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?c.primary:c.primary50}})},$O=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return ge.jsx("div",R({},ot(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},FO=$O,NO=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return be({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},zO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",R({},ot(t,"placeholder",{placeholder:!0}),r),n)},jO=zO,UO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return be({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},VO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return ge.jsx("div",R({},ot(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},HO=VO,WO={ClearIndicator:sO,Control:gO,DropdownIndicator:oO,DownChevron:zg,CrossIcon:au,Group:CO,GroupHeading:xO,IndicatorsContainer:eO,IndicatorSeparator:cO,Input:EO,LoadingIndicator:fO,Menu:zD,MenuList:UD,MenuPortal:KD,LoadingMessage:GD,NoOptionsMessage:WD,MultiValue:LO,MultiValueContainer:DO,MultiValueLabel:OO,MultiValueRemove:RO,Option:FO,Placeholder:jO,SelectContainer:QD,SingleValue:HO,ValueContainer:XD},GO=function(t){return be(be({},WO),t.components)},Hg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function YO(e,t){return!!(e===t||Hg(e)&&Hg(t))}function KO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!YO(e[n],t[n]))return!1;return!0}function qO(e,t){t===void 0&&(t=KO);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}for(var QO={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},JO=function(t){return ge.jsx("span",R({css:QO},t))},Wg=JO,XO={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,a=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,c=t.isDisabled,u=t.isSelected,f=t.isAppleDevice,d=function(m,b){return m&&m.length?"".concat(m.indexOf(b)+1," of ").concat(m.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(d(s,r),".");if(n==="menu"&&f){var h=c?" disabled":"",g="".concat(u?" selected":"").concat(h);return"".concat(a).concat(g,", ").concat(d(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},ZO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,c=t.selectProps,u=t.id,f=t.isAppleDevice,d=c.ariaLiveMessages,h=c.getOptionLabel,g=c.inputValue,v=c.isMulti,m=c.isOptionDisabled,b=c.isSearchable,x=c.menuIsOpen,S=c.options,C=c.screenReaderStatus,I=c.tabSelectsValue,w=c.isLoading,A=c["aria-label"],E=c["aria-live"],k=y.useMemo(function(){return be(be({},XO),d||{})},[d]),B=y.useMemo(function(){var j="";if(n&&k.onChange){var F=n.option,M=n.options,V=n.removedValue,Y=n.removedValues,Z=n.value,D=function(ee){return Array.isArray(ee)?null:ee},L=V||F||D(Z),U=L?h(L):"",W=M||Y||void 0,ie=W?W.map(h):[],le=be({isDisabled:L&&m(L,s),label:U,labels:ie},n);j=k.onChange(le)}return j},[n,k,m,s,h]),G=y.useMemo(function(){var j="",F=r||i,M=!!(r&&s&&s.includes(r));if(F&&k.onFocus){var V={focused:F,label:h(F),isDisabled:m(F,s),isSelected:M,options:o,context:F===r?"menu":"value",selectValue:s,isAppleDevice:f};j=k.onFocus(V)}return j},[r,i,h,m,k,o,s,f]),O=y.useMemo(function(){var j="";if(x&&S.length&&!w&&k.onFilter){var F=C({count:o.length});j=k.onFilter({inputValue:g,resultsMessage:F})}return j},[o,g,x,k,S,C,w]),T=(n==null?void 0:n.action)==="initial-input-focus",N=y.useMemo(function(){var j="";if(k.guidance){var F=i?"value":x?"menu":"input";j=k.guidance({"aria-label":A,context:F,isDisabled:r&&m(r,s),isMulti:v,isSearchable:b,tabSelectsValue:I,isInitialFocus:T})}return j},[A,r,i,v,m,b,x,k,s,I,T]),H=ge.jsx(y.Fragment,null,ge.jsx("span",{id:"aria-selection"},B),ge.jsx("span",{id:"aria-focused"},G),ge.jsx("span",{id:"aria-results"},O),ge.jsx("span",{id:"aria-guidance"},N));return ge.jsx(y.Fragment,null,ge.jsx(Wg,{id:u},T&&H),ge.jsx(Wg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&H))},eR=ZO,lu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],tR=new RegExp("["+lu.map(function(e){return e.letters}).join("")+"]","g"),Gg={},cu=0;cu<lu.length;cu++)for(var uu=lu[cu],du=0;du<uu.letters.length;du++)Gg[uu.letters[du]]=uu.base;var Yg=function(t){return t.replace(tR,function(n){return Gg[n]})},nR=qO(Yg),Kg=function(t){return t.replace(/^\s+|\s+$/g,"")},rR=function(t){return"".concat(t.label," ").concat(t.value)},iR=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=be({ignoreCase:!0,ignoreAccents:!0,stringify:rR,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,s=i.stringify,c=i.trim,u=i.matchFrom,f=c?Kg(r):r,d=c?Kg(s(n)):s(n);return o&&(f=f.toLowerCase(),d=d.toLowerCase()),a&&(f=nR(f),d=Yg(d)),u==="start"?d.substr(0,f.length)===f:d.indexOf(f)>-1}},oR=["innerRef"];function aR(e){var t=e.innerRef,n=wn(e,oR),r=OD(n,"onExited","in","enter","exit","appear");return ge.jsx("input",R({ref:t},r,{css:ge.css({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var sR=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function lR(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=y.useRef(!1),s=y.useRef(!1),c=y.useRef(0),u=y.useRef(null),f=y.useCallback(function(b,x){if(u.current!==null){var S=u.current,C=S.scrollTop,I=S.scrollHeight,w=S.clientHeight,A=u.current,E=x>0,k=I-w-C,B=!1;k>x&&a.current&&(r&&r(b),a.current=!1),E&&s.current&&(o&&o(b),s.current=!1),E&&x>k?(n&&!a.current&&n(b),A.scrollTop=I,B=!0,a.current=!0):!E&&-x>C&&(i&&!s.current&&i(b),A.scrollTop=0,B=!0,s.current=!0),B&&sR(b)}},[n,r,i,o]),d=y.useCallback(function(b){f(b,b.deltaY)},[f]),h=y.useCallback(function(b){c.current=b.changedTouches[0].clientY},[]),g=y.useCallback(function(b){var x=c.current-b.changedTouches[0].clientY;f(b,x)},[f]),v=y.useCallback(function(b){if(b){var x=_D?{passive:!1}:!1;b.addEventListener("wheel",d,x),b.addEventListener("touchstart",h,x),b.addEventListener("touchmove",g,x)}},[g,h,d]),m=y.useCallback(function(b){b&&(b.removeEventListener("wheel",d,!1),b.removeEventListener("touchstart",h,!1),b.removeEventListener("touchmove",g,!1))},[g,h,d]);return y.useEffect(function(){if(t){var b=u.current;return v(b),function(){m(b)}}},[t,v,m]),function(b){u.current=b}}var qg=["boxSizing","height","overflow","paddingRight","position"],Qg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Jg(e){e.preventDefault()}function Xg(e){e.stopPropagation()}function Zg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function em(){return"ontouchstart"in window||navigator.maxTouchPoints}var tm=!!(typeof window!="undefined"&&window.document&&window.document.createElement),go=0,ui={capture:!1,passive:!1};function cR(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=y.useRef({}),o=y.useRef(null),a=y.useCallback(function(c){if(tm){var u=document.body,f=u&&u.style;if(r&&qg.forEach(function(v){var m=f&&f[v];i.current[v]=m}),r&&go<1){var d=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,g=window.innerWidth-h+d||0;Object.keys(Qg).forEach(function(v){var m=Qg[v];f&&(f[v]=m)}),f&&(f.paddingRight="".concat(g,"px"))}u&&em()&&(u.addEventListener("touchmove",Jg,ui),c&&(c.addEventListener("touchstart",Zg,ui),c.addEventListener("touchmove",Xg,ui))),go+=1}},[r]),s=y.useCallback(function(c){if(tm){var u=document.body,f=u&&u.style;go=Math.max(go-1,0),r&&go<1&&qg.forEach(function(d){var h=i.current[d];f&&(f[d]=h)}),u&&em()&&(u.removeEventListener("touchmove",Jg,ui),c&&(c.removeEventListener("touchstart",Zg,ui),c.removeEventListener("touchmove",Xg,ui)))}},[r]);return y.useEffect(function(){if(t){var c=o.current;return a(c),function(){s(c)}}},[t,a,s]),function(c){o.current=c}}var uR=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},dR={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function fR(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,c=e.onTopLeave,u=lR({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:c}),f=cR({isEnabled:n}),d=function(g){u(g),f(g)};return ge.jsx(y.Fragment,null,n&&ge.jsx("div",{onClick:uR,css:dR}),t(d))}var hR={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},pR=function(t){var n=t.name,r=t.onFocus;return ge.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:hR,value:"",onChange:function(){}})},gR=pR;function fu(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function mR(){return fu(/^iPhone/i)}function nm(){return fu(/^Mac/i)}function vR(){return fu(/^iPad/i)||nm()&&navigator.maxTouchPoints>1}function bR(){return mR()||vR()}function yR(){return nm()||bR()}var xR=function(t){return t.label},rm=function(t){return t.label},im=function(t){return t.value},CR=function(t){return!!t.isDisabled},wR={clearIndicator:aO,container:qD,control:hO,dropdownIndicator:iO,group:vO,groupHeading:yO,indicatorsContainer:ZD,indicatorSeparator:lO,input:SO,loadingIndicator:dO,loadingMessage:HD,menu:$D,menuList:jD,menuPortal:YD,multiValue:kO,multiValueLabel:_O,multiValueRemove:PO,noOptionsMessage:VD,option:BO,placeholder:NO,singleValue:UO,valueContainer:JD},SR={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},IR=4,om=4,AR=38,TR=om*2,ER={baseUnit:om,controlHeight:AR,menuGutter:TR},hu={borderRadius:IR,colors:SR,spacing:ER},kR={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Rg(),captureMenuScroll:!Rg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:iR(),formatGroupLabel:xR,getOptionLabel:rm,getOptionValue:im,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:CR,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!ED(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function am(e,t,n,r){var i=dm(e,t,n),o=fm(e,t,n),a=um(e,t),s=vs(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function ms(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return am(e,a,t,s)}).filter(function(a){return cm(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=am(e,n,t,r);return cm(e,o)?o:void 0}).filter(PD)}function sm(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ci(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function lm(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ci(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function _R(e,t){return sm(ms(e,t))}function cm(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!pm(e)||!o)&&hm(e,{label:a,value:s,data:i},r)}function PR(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function DR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var pu=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},um=function(t,n){return t.getOptionLabel(n)},vs=function(t,n){return t.getOptionValue(n)};function dm(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function fm(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=vs(e,t);return n.some(function(i){return vs(e,i)===r})}function hm(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var pm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},OR=1,gm=function(e){cD(n,e);var t=fD(n);function n(r){var i;if(sD(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=yR(),i.controlRef=null,i.getControlRef=function(c){i.controlRef=c},i.focusedOptionRef=null,i.getFocusedOptionRef=function(c){i.focusedOptionRef=c},i.menuListRef=null,i.getMenuListRef=function(c){i.menuListRef=c},i.inputRef=null,i.getInputRef=function(c){i.inputRef=c},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(c,u){var f=i.props,d=f.onChange,h=f.name;u.name=h,i.ariaOnChange(c,u),d(c,u)},i.setValue=function(c,u,f){var d=i.props,h=d.closeMenuOnSelect,g=d.isMulti,v=d.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:v}),h&&(i.setState({inputIsHiddenAfterUpdate:!g}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(c,{action:u,option:f})},i.selectOption=function(c){var u=i.props,f=u.blurInputOnSelect,d=u.isMulti,h=u.name,g=i.state.selectValue,v=d&&i.isOptionSelected(c,g),m=i.isOptionDisabled(c,g);if(v){var b=i.getOptionValue(c);i.setValue(g.filter(function(x){return i.getOptionValue(x)!==b}),"deselect-option",c)}else if(!m)d?i.setValue([].concat(ci(g),[c]),"select-option",c):i.setValue(c,"select-option");else{i.ariaOnChange(c,{action:"select-option",option:c,name:h});return}f&&i.blurInput()},i.removeValue=function(c){var u=i.props.isMulti,f=i.state.selectValue,d=i.getOptionValue(c),h=f.filter(function(v){return i.getOptionValue(v)!==d}),g=po(u,h,h[0]||null);i.onChange(g,{action:"remove-value",removedValue:c}),i.focusInput()},i.clearValue=function(){var c=i.state.selectValue;i.onChange(po(i.props.isMulti,[],null),{action:"clear",removedValues:c})},i.popValue=function(){var c=i.props.isMulti,u=i.state.selectValue,f=u[u.length-1],d=u.slice(0,u.length-1),h=po(c,d,d[0]||null);i.onChange(h,{action:"pop-value",removedValue:f})},i.getFocusedOptionId=function(c){return pu(i.state.focusableOptionsWithIds,c)},i.getFocusableOptionsWithIds=function(){return lm(ms(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];return wD.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(c){return um(i.props,c)},i.getOptionValue=function(c){return vs(i.props,c)},i.getStyles=function(c,u){var f=i.props.unstyled,d=wR[c](u,f);d.boxSizing="border-box";var h=i.props.styles[c];return h?h(d,u):d},i.getClassNames=function(c,u){var f,d;return(f=(d=i.props.classNames)[c])===null||f===void 0?void 0:f.call(d,u)},i.getElementId=function(c){return"".concat(i.state.instancePrefix,"-").concat(c)},i.getComponents=function(){return GO(i.props)},i.buildCategorizedOptions=function(){return ms(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return sm(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(c,u){i.setState({ariaSelection:be({value:c},u)})},i.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(c){i.blockOptionHover=!1},i.onControlMouseDown=function(c){if(!c.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},i.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!i.props.isDisabled){var u=i.props,f=u.isMulti,d=u.menuIsOpen;i.focusInput(),d?(i.setState({inputIsHiddenAfterUpdate:!f}),i.onMenuClose()):i.openMenu("first"),c.preventDefault()}},i.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(i.clearValue(),c.preventDefault(),i.openAfterFocus=!1,c.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(c){typeof i.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&fs(c.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(c)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(c){var u=c.touches,f=u&&u.item(0);f&&(i.initialTouchX=f.clientX,i.initialTouchY=f.clientY,i.userIsDragging=!1)},i.onTouchMove=function(c){var u=c.touches,f=u&&u.item(0);if(f){var d=Math.abs(f.clientX-i.initialTouchX),h=Math.abs(f.clientY-i.initialTouchY),g=5;i.userIsDragging=d>g||h>g}},i.onTouchEnd=function(c){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(c.target)&&i.menuListRef&&!i.menuListRef.contains(c.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(c){i.userIsDragging||i.onControlMouseDown(c)},i.onClearIndicatorTouchEnd=function(c){i.userIsDragging||i.onClearIndicatorMouseDown(c)},i.onDropdownIndicatorTouchEnd=function(c){i.userIsDragging||i.onDropdownIndicatorMouseDown(c)},i.handleInputChange=function(c){var u=i.props.inputValue,f=c.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(f,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(c){i.props.onFocus&&i.props.onFocus(c),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(c){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(c),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(c){if(!(i.blockOptionHover||i.state.focusedOption===c)){var u=i.getFocusableOptions(),f=u.indexOf(c);i.setState({focusedOption:c,focusedOptionId:f>-1?i.getFocusedOptionId(c):null})}},i.shouldHideSelectedOptions=function(){return pm(i.props)},i.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),i.focus()},i.onKeyDown=function(c){var u=i.props,f=u.isMulti,d=u.backspaceRemovesValue,h=u.escapeClearsValue,g=u.inputValue,v=u.isClearable,m=u.isDisabled,b=u.menuIsOpen,x=u.onKeyDown,S=u.tabSelectsValue,C=u.openMenuOnFocus,I=i.state,w=I.focusedOption,A=I.focusedValue,E=I.selectValue;if(!m&&!(typeof x=="function"&&(x(c),c.defaultPrevented))){switch(i.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||g)return;i.focusValue("previous");break;case"ArrowRight":if(!f||g)return;i.focusValue("next");break;case"Delete":case"Backspace":if(g)return;if(A)i.removeValue(A);else{if(!d)return;f?i.popValue():v&&i.clearValue()}break;case"Tab":if(i.isComposing||c.shiftKey||!b||!S||!w||C&&i.isOptionSelected(w,E))return;i.selectOption(w);break;case"Enter":if(c.keyCode===229)break;if(b){if(!w||i.isComposing)return;i.selectOption(w);break}return;case"Escape":b?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:g}),i.onMenuClose()):v&&h&&i.clearValue();break;case" ":if(g)return;if(!b){i.openMenu("first");break}if(!w)return;i.selectOption(w);break;case"ArrowUp":b?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":b?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!b)return;i.focusOption("pageup");break;case"PageDown":if(!b)return;i.focusOption("pagedown");break;case"Home":if(!b)return;i.focusOption("first");break;case"End":if(!b)return;i.focusOption("last");break;default:return}c.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++OR),i.state.selectValue=ds(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),s=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[s],i.state.focusedOptionId=pu(o,a[s])}return i}return lD(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Og(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,c=this.state.isFocused;(c&&!a&&i.isDisabled||c&&s&&!i.menuIsOpen)&&this.focusInput(),c&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Og(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,c=a.isFocused,u=this.buildFocusableOptions(),f=i==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(s[0]);d>-1&&(f=d)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[f],focusedOptionId:this.getFocusedOptionId(u[f])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(s);s||(c=-1);var u=a.length-1,f=-1;if(a.length){switch(i){case"previous":c===0?f=0:c===-1?f=u:f=c-1;break;case"next":c>-1&&c<u&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var c=0,u=s.indexOf(a);a||(u=-1),i==="up"?c=u>0?u-1:s.length-1:i==="down"?c=(u+1)%s.length:i==="pageup"?(c=u-o,c<0&&(c=0)):i==="pagedown"?(c=u+o,c>s.length-1&&(c=s.length-1)):i==="last"&&(c=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(hu):be(be({},hu),this.props.theme):hu}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,c=this.getValue,u=this.selectOption,f=this.setValue,d=this.props,h=d.isMulti,g=d.isRtl,v=d.options,m=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:c,hasValue:m,isMulti:h,isRtl:g,options:v,selectOption:u,selectProps:d,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return dm(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return fm(this.props,i,o)}},{key:"filterOption",value:function(i,o){return hm(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,c=i.inputValue,u=i.tabIndex,f=i.form,d=i.menuIsOpen,h=i.required,g=this.getComponents(),v=g.Input,m=this.state,b=m.inputIsHidden,x=m.ariaSelection,S=this.commonProps,C=s||this.getElementId("input"),I=be(be(be({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?K.createElement(v,R({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:o,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:f,type:"text",value:c},I)):K.createElement(aR,R({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:us,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:f,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,c=o.MultiValueLabel,u=o.MultiValueRemove,f=o.SingleValue,d=o.Placeholder,h=this.commonProps,g=this.props,v=g.controlShouldRenderValue,m=g.isDisabled,b=g.isMulti,x=g.inputValue,S=g.placeholder,C=this.state,I=C.selectValue,w=C.focusedValue,A=C.isFocused;if(!this.hasValue()||!v)return x?null:K.createElement(d,R({},h,{key:"placeholder",isDisabled:m,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),S);if(b)return I.map(function(k,B){var G=k===w,O="".concat(i.getOptionLabel(k),"-").concat(i.getOptionValue(k));return K.createElement(a,R({},h,{components:{Container:s,Label:c,Remove:u},isFocused:G,isDisabled:m,key:O,index:B,removeProps:{onClick:function(){return i.removeValue(k)},onTouchEnd:function(){return i.removeValue(k)},onMouseDown:function(N){N.preventDefault()}},data:k}),i.formatOptionLabel(k,"value"))});if(x)return null;var E=I[0];return K.createElement(f,R({},h,{data:E,isDisabled:m}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,c=s.isDisabled,u=s.isLoading,f=this.state.isFocused;if(!this.isClearable()||!o||c||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return K.createElement(o,R({},a,{innerProps:d,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,c=s.isDisabled,u=s.isLoading,f=this.state.isFocused;if(!o||!u)return null;var d={"aria-hidden":"true"};return K.createElement(o,R({},a,{innerProps:d,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,c=this.props.isDisabled,u=this.state.isFocused;return K.createElement(a,R({},s,{isDisabled:c,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,c=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return K.createElement(o,R({},a,{innerProps:u,isDisabled:s,isFocused:c}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,c=o.Menu,u=o.MenuList,f=o.MenuPortal,d=o.LoadingMessage,h=o.NoOptionsMessage,g=o.Option,v=this.commonProps,m=this.state.focusedOption,b=this.props,x=b.captureMenuScroll,S=b.inputValue,C=b.isLoading,I=b.loadingMessage,w=b.minMenuHeight,A=b.maxMenuHeight,E=b.menuIsOpen,k=b.menuPlacement,B=b.menuPosition,G=b.menuPortalTarget,O=b.menuShouldBlockScroll,T=b.menuShouldScrollIntoView,N=b.noOptionsMessage,H=b.onMenuScrollToTop,j=b.onMenuScrollToBottom;if(!E)return null;var F=function(U,W){var ie=U.type,le=U.data,ae=U.isDisabled,ee=U.isSelected,ne=U.label,J=U.value,ce=m===le,ve=ae?void 0:function(){return i.onOptionHover(le)},ze=ae?void 0:function(){return i.selectOption(le)},yt="".concat(i.getElementId("option"),"-").concat(W),dt={id:yt,onClick:ze,onMouseMove:ve,onMouseOver:ve,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:ee};return K.createElement(g,R({},v,{innerProps:dt,data:le,isDisabled:ae,isSelected:ee,key:yt,label:ne,type:ie,value:J,isFocused:ce,innerRef:ce?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(U.data,"menu"))},M;if(this.hasOptions())M=this.getCategorizedOptions().map(function(L){if(L.type==="group"){var U=L.data,W=L.options,ie=L.index,le="".concat(i.getElementId("group"),"-").concat(ie),ae="".concat(le,"-heading");return K.createElement(a,R({},v,{key:le,data:U,options:W,Heading:s,headingProps:{id:ae,data:L.data},label:i.formatGroupLabel(L.data)}),L.options.map(function(ee){return F(ee,"".concat(ie,"-").concat(ee.index))}))}else if(L.type==="option")return F(L,"".concat(L.index))});else if(C){var V=I({inputValue:S});if(V===null)return null;M=K.createElement(d,v,V)}else{var Y=N({inputValue:S});if(Y===null)return null;M=K.createElement(h,v,Y)}var Z={minMenuHeight:w,maxMenuHeight:A,menuPlacement:k,menuPosition:B,menuShouldScrollIntoView:T},D=K.createElement(FD,R({},v,Z),function(L){var U=L.ref,W=L.placerProps,ie=W.placement,le=W.maxHeight;return K.createElement(c,R({},v,Z,{innerRef:U,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:C,placement:ie}),K.createElement(fR,{captureEnabled:x,onTopArrive:H,onBottomArrive:j,lockEnabled:O},function(ae){return K.createElement(u,R({},v,{innerRef:function(ne){i.getMenuListRef(ne),ae(ne)},innerProps:{role:"listbox","aria-multiselectable":v.isMulti,id:i.getElementId("listbox")},isLoading:C,maxHeight:le,focusedOption:m}),M)}))});return G||B==="fixed"?K.createElement(f,R({},v,{appendTo:G,controlElement:this.controlRef,menuPlacement:k,menuPosition:B}),D):D}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,c=o.isMulti,u=o.name,f=o.required,d=this.state.selectValue;if(f&&!this.hasValue()&&!s)return K.createElement(gR,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(c)if(a){var h=d.map(function(m){return i.getOptionValue(m)}).join(a);return K.createElement("input",{name:u,type:"hidden",value:h})}else{var g=d.length>0?d.map(function(m,b){return K.createElement("input",{key:"i-".concat(b),name:u,type:"hidden",value:i.getOptionValue(m)})}):K.createElement("input",{name:u,type:"hidden",value:""});return K.createElement("div",null,g)}else{var v=d[0]?this.getOptionValue(d[0]):"";return K.createElement("input",{name:u,type:"hidden",value:v})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,c=o.focusedValue,u=o.isFocused,f=o.selectValue,d=this.getFocusableOptions();return K.createElement(eR,R({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:c,isFocused:u,selectValue:f,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,c=i.ValueContainer,u=this.props,f=u.className,d=u.id,h=u.isDisabled,g=u.menuIsOpen,v=this.state.isFocused,m=this.commonProps=this.getCommonProps();return K.createElement(s,R({},m,{className:f,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:v}),this.renderLiveRegion(),K.createElement(o,R({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:v,menuIsOpen:g}),K.createElement(c,R({},m,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),K.createElement(a,R({},m,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,c=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,f=o.isFocused,d=o.prevWasFocused,h=o.instancePrefix,g=i.options,v=i.value,m=i.menuIsOpen,b=i.inputValue,x=i.isMulti,S=ds(v),C={};if(a&&(v!==a.value||g!==a.options||m!==a.menuIsOpen||b!==a.inputValue)){var I=m?_R(i,S):[],w=m?lm(ms(i,S),"".concat(h,"-option")):[],A=s?PR(o,S):null,E=DR(o,I),k=pu(w,E);C={selectValue:S,focusedOption:E,focusedOptionId:k,focusableOptionsWithIds:w,focusedValue:A,clearFocusValueOnUpdate:!1}}var B=c!=null&&i!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},G=u,O=f&&d;return f&&!O&&(G={value:po(x,S,S[0]||null),options:S,action:"initial-input-focus"},O=!d),(u==null?void 0:u.action)==="initial-input-focus"&&(G=null),be(be(be({},C),B),{},{prevProps:i,ariaSelection:G,prevWasFocused:O})}}]),n}(y.Component);gm.defaultProps=kR;var RR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function MR(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,a=o===void 0?null:o,s=e.inputValue,c=e.menuIsOpen,u=e.onChange,f=e.onInputChange,d=e.onMenuClose,h=e.onMenuOpen,g=e.value,v=wn(e,RR),m=y.useState(s!==void 0?s:n),b=Hn(m,2),x=b[0],S=b[1],C=y.useState(c!==void 0?c:i),I=Hn(C,2),w=I[0],A=I[1],E=y.useState(g!==void 0?g:a),k=Hn(E,2),B=k[0],G=k[1],O=y.useCallback(function(V,Y){typeof u=="function"&&u(V,Y),G(V)},[u]),T=y.useCallback(function(V,Y){var Z;typeof f=="function"&&(Z=f(V,Y)),S(Z!==void 0?Z:V)},[f]),N=y.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),H=y.useCallback(function(){typeof d=="function"&&d(),A(!1)},[d]),j=s!==void 0?s:x,F=c!==void 0?c:w,M=g!==void 0?g:B;return be(be({},v),{},{inputValue:j,menuIsOpen:F,onChange:O,onInputChange:T,onMenuClose:H,onMenuOpen:N,value:M})}var LR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],mm=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return o===i||a===i},gu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return mm(t,o,i)})||r.some(function(o){return mm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function BR(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,a=o===void 0?gu.formatCreateLabel:o,s=e.isValidNewOption,c=s===void 0?gu.isValidNewOption:s,u=e.getNewOptionData,f=u===void 0?gu.getNewOptionData:u,d=e.onCreateOption,h=e.options,g=h===void 0?[]:h,v=e.onChange,m=wn(e,LR),b=m.getOptionValue,x=b===void 0?im:b,S=m.getOptionLabel,C=S===void 0?rm:S,I=m.inputValue,w=m.isLoading,A=m.isMulti,E=m.value,k=m.name,B=y.useMemo(function(){return c(I,ds(E),g,{getOptionValue:x,getOptionLabel:C})?f(I,a(I)):void 0},[a,f,C,x,I,c,g,E]),G=y.useMemo(function(){return(n||!w)&&B?i==="first"?[B].concat(ci(g)):[].concat(ci(g),[B]):g},[n,i,w,B,g]),O=y.useCallback(function(T,N){if(N.action!=="select-option")return v(T,N);var H=Array.isArray(T)?T:[T];if(H[H.length-1]===B){if(d)d(I);else{var j=f(I,I),F={action:"create-option",name:k,option:j};v(po(A,[].concat(ci(ds(E)),[j]),j),F)}return}v(T,N)},[f,I,A,k,B,d,v,E]);return be(be({},m),{},{options:G,onChange:O})}var $R=y.forwardRef(function(e,t){var n=MR(e),r=BR(n);return K.createElement(gm,R({ref:t},r))}),vm=$R;const FR={control:(e,t)=>Q($({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px",fontFamily:'var(--joy-fontFamily-body, "Inter", var(--joy-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"));',"&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>Q($({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>Q($({},e),{minHeight:"36px"}),menu:e=>Q($({},e),{position:"relative"}),clearIndicator:e=>Q($({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>Q($({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>Q($({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>Q($({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>Q($({},e),{color:"#333"})},NR=e=>e.map(t=>({label:t,value:t})),zR=e=>{const[t,n]=y.useState(""),[r,i]=y.useState(!1),o=e.sx||{marginBottom:"16px"},a=NR(e.flags),s=()=>i(!r),c=h=>{e.onChange(h.map(g=>g.value))},u=h=>{n(h)},f=h=>{h.persist();const{key:g}=h;if(t)switch(g){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const v=[...e.flags,t];e.onChange(v)}if(e.flags&&e.flags.length>0&&d()){const v=[...e.flags,t];e.onChange(v)}n(""),h.preventDefault()}},d=()=>{let h=!1;return e.flags.length&&e.flags.includes(t)?(s(),h):(h=!0,h)};return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:o,children:l.jsx(vm,{styles:FR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:c,onInputChange:u,onKeyDown:f,placeholder:e.labels.flagsPlaceholder,value:a})}),l.jsx(Ke,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:s})]})},mo=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(!1),[o,a]=y.useState(!1),[s,c]=y.useState(!1),[u,f]=y.useState(""),[d,h]=y.useState("primary"),[g,v]=y.useState(""),m=y.useRef(null),b=()=>{m.current&&m.current.click()},x=new Vp,S=Ye(),C=()=>{f(""),i(!1)},I=N=>{let H="",j="primary";switch(N){case"copy_url":H=e.labels.urlCopiedToClipboardMessage,j="primary";break;case"image_deleted":H=e.labels.imageDeletedMessage,j="primary";break;case"image_reset":H=e.labels.imageResetMessage,j="primary";break;case"upload_success":H=e.labels.uploadingImageMessage,j="success";break;case"upload_failed":H=e.labels.uploadingImageErrorMessage,j="danger";break;case"sign_in_url_failed":H=e.labels.generateSignedInUrlErrorMessage,j="danger";break;case"encrypting_file_failed":H=e.labels.encryptingImageErrorMessage,j="danger";break}h(j),f(H),i(!0)},w=()=>a(!o),A=()=>c(!s),E=()=>{e.clearImage(),I("image_deleted")},k=N=>{navigator.clipboard.writeText(N),I("copy_url")},B=N=>_(this,null,function*(){N.persist();const H=N.target.files?N.target.files[0]:null;if(H){n(!0);try{const j=H.type.split("/")[1],F=yield x.readFileAndHash(H),M=(yield x.generateHashFileName(H))+"."+j,V={image_type:j,image_file_name:M,image_size:H.size,base64_sum:F},Y=yield S==null?void 0:S.https.generateSignedInUrl(V);if(Y!=null&&Y.ok){const Z=yield Y.json(),D={"Content-Type":H.type,"Content-MD5":F};try{const L=new File([H],M,{type:H.type}),U=yield S==null?void 0:S.https.storeInBucket(Z.data.signed_url,L,D);e.onChangeImages(U||""),v(U),I("upload_success")}catch(L){console.error("There was a problem with uploading the file: ",L),I("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield Y==null?void 0:Y.json()),I("sign_in_url_failed")}catch(j){console.error("There was a problem with encrypting file...",j),I("encrypting_file_failed")}n(!1)}}),G=N=>_(this,null,function*(){if(N){n(!0);try{const H=N.type.split("/")[1],j=yield x.readFileAndHash(N),F=(yield x.generateHashFileName(N))+"."+H,M={image_type:H,image_file_name:F,image_size:N.size,base64_sum:j},V=yield S==null?void 0:S.https.generateSignedInUrl(M);if(V!=null&&V.ok){const Y=yield V.json(),Z={"Content-Type":N.type,"Content-MD5":j};try{const D=new File([N],F,{type:N.type}),L=yield S==null?void 0:S.https.storeInBucket(Y.data.signed_url,D,Z);e.onChangeImages(L||""),I("upload_success")}catch(D){console.error("There was a problem with uploading the file: ",D),I("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield V==null?void 0:V.json()),I("sign_in_url_failed")}catch(H){console.error("There was a problem with encrypting file...",H),I("encrypting_file_failed")}n(!1)}}),O=()=>{e.onChangeImages(g),I("image_reset")},T=N=>{e.onChangeImages(N),v(N)};return l.jsxs(l.Fragment,{children:[l.jsxs(p.Card,{sx:{marginBottom:"10px"},children:[l.jsxs(p.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[l.jsx(p.Typography,{level:"title-lg",children:e.title}),l.jsx(p.Tooltip,{title:e.labels.clearImage,children:l.jsx(p.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:l.jsx(Dp,{})})})]}),l.jsxs(p.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[l.jsxs(p.Skeleton,{loading:t,animation:"wave",children:[e.image?l.jsx(p.Box,{component:"img",src:e.image,loading:"lazy",alt:e.title,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):l.jsx($c,{sx:{fontSize:"3rem",opacity:.2}}),e.image?l.jsx(p.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:l.jsx(Wp,{sx:{fontSize:"3rem",color:"#fff"}})}):l.jsx(l.Fragment,{})]}),l.jsx(p.Tooltip,{title:e.labels.copyUrl,children:l.jsx(p.Button,{onClick:()=>k(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:l.jsx(Oe.ContentCopy,{})})}),l.jsx(p.Tooltip,{title:e.labels.viewImage,children:l.jsx(p.Button,{onClick:w,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:l.jsx(Yp,{})})}),l.jsx(p.Tooltip,{title:e.labels.cropImage,children:l.jsx(p.Button,{onClick:A,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:l.jsx(dg,{})})})]}),l.jsx(p.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:l.jsxs(p.Button,{sx:{width:"100%"},onClick:b,children:[l.jsx(Oe.Upload,{})," ",e.labels.uploadImage,l.jsx(Kp,{type:"file",accept:"image/*",onChange:B,ref:m})]})}),S.https.sportal365Config?l.jsx(p.AccordionGroup,{variant:"soft",children:l.jsxs(p.Accordion,{children:[l.jsx(p.AccordionSummary,{children:l.jsx(p.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),l.jsx(p.AccordionDetails,{children:l.jsx(Gp,{labels:e.labels,onChangeImages:T})})]})}):l.jsx(l.Fragment,{})]}),l.jsx(Ke,{showToast:r,message:u,color:d,hideToast:C}),l.jsx(Hp,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:w}),l.jsx(ug,{labels:e.labels,open:s,imageSrc:e.image,toggleModal:A,uploadImage:G,resetDefaultImageUrl:O})]})},jR=["cover","mobile"],UR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),VR=e=>e?$({},e):{main:"",mobile:"",cover:""},HR=e=>{const[t,n]=y.useState(!1),r=VR(e.defaultValue),i=UR(e.labels),o=(s,c)=>{r[c]=s,e.onChange(r)},a=s=>{r[s]="",e.onChange(r)};return l.jsxs(p.Box,{sx:{marginBottom:"10px"},children:[l.jsx(mo,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:s=>o(s,"main"),clearImage:()=>a("main")}),l.jsx(p.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?l.jsx(l.Fragment,{children:jR.map(s=>l.jsx(mo,{labels:e.labels,title:i.get(s),image:r[s],onChangeImages:c=>o(c,s),clearImage:()=>a(s)},`images-${s}`))}):l.jsx(l.Fragment,{})]})};function WR(e){return lt("MuiSheet",e)}We("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const GR=["className","color","component","variant","invertedColors","slots","slotProps"],YR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${xe(t)}`,n&&`color${xe(n)}`]};return ht(r,WR,{})},KR=ye("div",{name:"JoySheet",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r;const i=(n=e.variants[t.variant])==null?void 0:n[t.color],{borderRadius:o,bgcolor:a,backgroundColor:s,background:c}=hc({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),u=rr(e,`palette.${a}`)||a||rr(e,`palette.${s}`)||s||c||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||e.vars.palette.background.surface;return[R({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":u==="transparent"?"initial":u,"--Sheet-background":u==="transparent"?"initial":u},o!==void 0&&{"--List-radius":`calc(${o} - var(--variant-borderWidth, 0px))`,"--unstable_actionRadius":`calc(${o} - var(--variant-borderWidth, 0px))`},{backgroundColor:e.vars.palette.background.surface,position:"relative"}),R({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&x_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&C_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),qR=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:s="plain",invertedColors:c=!1,slots:u={},slotProps:f={}}=r,d=Te(r,GR),h=R({},r,{color:o,component:a,invertedColors:c,variant:s}),g=YR(h),v=R({},d,{component:a,slots:u,slotProps:f}),[m,b]=Ae("root",{ref:n,className:$n(g.root,i),elementType:KR,externalForwardedProps:v,ownerState:h});return l.jsx(m,R({},b))});function QR(e){return lt("MuiTypography",e)}We("MuiTypography",["root","h1","h2","h3","h4","title-lg","title-md","title-sm","body-lg","body-md","body-sm","body-xs","noWrap","gutterBottom","startDecorator","endDecorator","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const JR=["color","textColor"],XR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],mu=K.createContext(!1),ZR=K.createContext(!1),eM=e=>{const{gutterBottom:t,noWrap:n,level:r,color:i,variant:o}=e,a={root:["root",r,t&&"gutterBottom",n&&"noWrap",i&&`color${xe(i)}`,o&&`variant${xe(o)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return ht(a,QR,{})},tM=ye("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),nM=ye("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),rM=ye("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return R({"--Icon-fontSize":`calc(1em * ${s})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:R({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&R({display:"flex",alignItems:"center"},t.nesting&&R({display:"inline-flex"},t.startDecorator&&{verticalAlign:"bottom"})),t.level&&t.level!=="inherit"&&e.typography[t.level],{fontSize:`var(--Typography-fontSize, ${t.level&&t.level!=="inherit"&&(r=(i=e.typography[t.level])==null?void 0:i.fontSize)!=null?r:"inherit"})`},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.color&&{color:`var(--variant-plainColor, rgba(${(o=e.vars.palette[t.color])==null?void 0:o.mainChannel} / 1))`},t.variant&&R({borderRadius:e.vars.radius.xs,paddingBlock:"min(0.1em, 4px)",paddingInline:"0.25em"},!t.nesting&&{marginInline:"-0.25em"},(a=e.variants[t.variant])==null?void 0:a[t.color]))}),bm={h1:"h1",h2:"h2",h3:"h3",h4:"h4","title-lg":"p","title-md":"p","title-sm":"p","body-lg":"p","body-md":"p","body-sm":"p","body-xs":"span",inherit:"p"},vu=K.forwardRef(function(t,n){var r;const i=pt({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,s=Te(i,JR),c=K.useContext(mu),u=K.useContext(ZR),f=u1(R({},s,{color:a})),{component:d,gutterBottom:h=!1,noWrap:g=!1,level:v="body-md",levelMapping:m=bm,children:b,endDecorator:x,startDecorator:S,variant:C,slots:I={},slotProps:w={}}=f,A=Te(f,XR),E=(r=t.color)!=null?r:C?o!=null?o:"neutral":o,k=c||u?t.level||"inherit":v,B=rh(b,["Skeleton"]),G=d||(c?"span":m[k]||bm[k]||"span"),O=R({},f,{level:k,component:G,color:E,gutterBottom:h,noWrap:g,nesting:c,variant:C,unstable_hasSkeleton:B}),T=eM(O),N=R({},A,{component:G,slots:I,slotProps:w}),[H,j]=Ae("root",{ref:n,className:T.root,elementType:rM,externalForwardedProps:N,ownerState:O}),[F,M]=Ae("startDecorator",{className:T.startDecorator,elementType:tM,externalForwardedProps:N,ownerState:O}),[V,Y]=Ae("endDecorator",{className:T.endDecorator,elementType:nM,externalForwardedProps:N,ownerState:O});return l.jsx(mu.Provider,{value:!0,children:l.jsxs(H,R({},j,{children:[S&&l.jsx(F,R({},M,{children:S})),B?K.cloneElement(b,{variant:b.props.variant||"inline"}):b,x&&l.jsx(V,R({},Y,{children:x}))]}))})});vu.muiName="Typography";function iM(e){return lt("MuiFormControl",e)}const ym=We("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),oM=We("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),aM=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],sM=e=>{const{disabled:t,error:n,size:r,color:i,orientation:o}=e,a={root:["root",o,t&&"disabled",n&&"error",i&&`color${xe(i)}`,r&&`size${xe(r)}`]};return ht(a,iM,{})},lM=ye("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return R({"--unstable_RadioGroup-margin":"0.5rem 0","--FormLabel-alignSelf":t.orientation==="horizontal"?"align-items":"flex-start","--FormLabel-asteriskColor":e.vars.palette.danger[500]},t.size==="sm"&&{"--FormLabel-fontSize":e.vars.fontSize.xs,"--FormLabel-lineHeight":e.vars.lineHeight.xl,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.5rem 0 0":"0 0 0.25rem 0","--FormHelperText-fontSize":e.vars.fontSize.xs,"--FormHelperText-lineHeight":e.vars.lineHeight.xl},t.size==="md"&&{"--FormLabel-fontSize":e.vars.fontSize.sm,"--FormLabel-lineHeight":e.vars.lineHeight.sm,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.75rem 0 0":"0 0 0.375rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.size==="lg"&&{"--FormLabel-fontSize":e.vars.fontSize.md,"--FormLabel-lineHeight":e.vars.lineHeight.md,"--FormLabel-margin":t.orientation==="horizontal"?"0 1rem 0 0":"0 0 0.5rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.color&&{"--FormHelperText-color":(n=e.vars.palette[t.color])==null?void 0:n[500]},{"--FormHelperText-margin":"0.375rem 0 0 0",[`&.${ym.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${ym.disabled}`]:{"--FormLabel-color":(r=e.variants.plainDisabled)==null||(r=r[t.color||"neutral"])==null?void 0:r.color,"--FormHelperText-color":(i=e.variants.plainDisabled)==null||(i=i[t.color||"neutral"])==null?void 0:i.color},display:"flex",position:"relative",flexDirection:t.orientation==="horizontal"?"row":"column"},t.orientation==="horizontal"&&{[`& > label ~ .${oM.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),bu=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:s=!1,required:c=!1,error:u=!1,color:f,size:d="md",orientation:h="vertical",slots:g={},slotProps:v={}}=r,m=Te(r,aM),b=Qi(i),[x,S]=K.useState(null),C=R({},r,{id:b,component:a,color:f,disabled:s,error:u,required:c,size:d,orientation:h});let I;const w=sM(C),[A,E]=Ae("root",{ref:n,className:$n(w.root,o),elementType:lM,externalForwardedProps:R({},m,{component:a,slots:g,slotProps:v}),ownerState:C}),k=K.useMemo(()=>({disabled:s,required:c,error:u,color:f,size:d,htmlFor:b,labelId:`${b}-label`,"aria-describedby":x?`${b}-helper-text`:void 0,setHelperText:S,registerEffect:I}),[f,s,u,x,b,I,c,d]);return l.jsx(Ja.Provider,{value:k,children:l.jsx(A,R({},E))})});function cM(e){return lt("MuiFormLabel",e)}We("MuiFormLabel",["root","asterisk"]);const uM=["children","component","htmlFor","id","slots","slotProps"],dM=()=>ht({root:["root"],asterisk:["asterisk"]},cM,{}),fM=ye("label",{name:"JoyFormLabel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({"--Icon-fontSize":"calc(var(--FormLabel-lineHeight) * 1em)",WebkitTapHighlightColor:"transparent",alignSelf:"var(--FormLabel-alignSelf)",display:"flex",gap:"2px",alignItems:"center",flexWrap:"wrap",userSelect:"none",fontFamily:e.vars.fontFamily.body,fontSize:`var(--FormLabel-fontSize, ${e.vars.fontSize.sm})`,fontWeight:e.vars.fontWeight.md,lineHeight:`var(--FormLabel-lineHeight, ${e.vars.lineHeight.sm})`,color:`var(--FormLabel-color, ${e.vars.palette.text.primary})`,margin:"var(--FormLabel-margin, 0px)"})),hM=ye("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),yu=K.forwardRef(function(t,n){var r,i;const o=pt({props:t,name:"JoyFormLabel"}),{children:a,component:s="label",htmlFor:c,id:u,slots:f={},slotProps:d={}}=o,h=Te(o,uM),g=K.useContext(Ja),v=(r=(i=t.required)!=null?i:g==null?void 0:g.required)!=null?r:!1,m=R({},o,{required:v}),b=dM(),x=R({},h,{component:s,slots:f,slotProps:d}),[S,C]=Ae("root",{additionalProps:{htmlFor:c!=null?c:g==null?void 0:g.htmlFor,id:u!=null?u:g==null?void 0:g.labelId},ref:n,className:b.root,elementType:fM,externalForwardedProps:x,ownerState:m}),[I,w]=Ae("asterisk",{additionalProps:{"aria-hidden":!0},className:b.asterisk,elementType:hM,externalForwardedProps:x,ownerState:m});return l.jsxs(S,R({},C,{children:[a,v&&l.jsxs(I,R({},w,{children:[" ","*"]}))]}))}),pM=({environment:e,userNotFound:t})=>{const[n,r]=y.useState(""),[i,o]=y.useState(""),[a,s]=y.useState(!1),c=()=>{s(!a)},u=h=>{h.persist(),r(h.target.value)},f=h=>{h.persist(),o(h.target.value)},d=()=>_(this,null,function*(){try{yield qi(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),c()}});return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsxs(qR,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[l.jsxs("div",{children:[l.jsx(vu,{level:"h4",component:"h1",children:l.jsx("b",{children:"Sign in"})}),l.jsx(vu,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),l.jsxs(bu,{children:[l.jsx(yu,{children:"Email"}),l.jsx(Xa,{name:"email",type:"email",onChange:u})]}),l.jsxs(bu,{children:[l.jsx(yu,{children:"Password"}),l.jsx(Xa,{name:"password",type:"password",onChange:f})]}),l.jsx(oi,{sx:{mt:1},onClick:d,children:"Log in"})]})}),l.jsx(Ke,{showToast:a,message:t,color:"danger",hideToast:c})]})};function gM(e){return lt("MuiCheckbox",e)}const di=We("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),mM=mc(l.jsx("path",{d:"M9 16.17 5.53 12.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L9 16.17z"}),"Check"),vM=mc(l.jsx("path",{d:"M19 13H5c-.55 0-1-.45-1-1s.45-1 1-1h14c.55 0 1 .45 1 1s-.45 1-1 1z"}),"HorizontalRule"),bM=["checked","uncheckedIcon","checkedIcon","label","defaultChecked","disabled","disableIcon","overlay","id","indeterminate","indeterminateIcon","name","onBlur","onChange","onFocus","onFocusVisible","readOnly","required","value","color","variant","size","component","slots","slotProps"],yM=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:s,indeterminate:c}=e,u={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${xe(a)}`,o&&`color${xe(o)}`,s&&`size${xe(s)}`],checkbox:["checkbox",t&&"checked",c&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return ht(u,gM,{})},xM=ye("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return R({"--Icon-fontSize":"var(--Checkbox-size)"},e.size==="sm"&&{"--Checkbox-size":"1rem","& ~ *":{"--FormHelperText-margin":"0 0 0 1.5rem"},fontSize:t.vars.fontSize.sm,gap:"var(--Checkbox-gap, 0.5rem)"},e.size==="md"&&{"--Checkbox-size":"1.25rem","& ~ *":{"--FormHelperText-margin":"0.25rem 0 0 1.875rem"},fontSize:t.vars.fontSize.md,gap:"var(--Checkbox-gap, 0.625rem)"},e.size==="lg"&&{"--Checkbox-size":"1.5rem","& ~ *":{"--FormHelperText-margin":"0.375rem 0 0 2.25rem"},fontSize:t.vars.fontSize.lg,gap:"var(--Checkbox-gap, 0.75rem)"},{position:e.overlay?"initial":"relative",display:"inline-flex",fontFamily:t.vars.fontFamily.body,lineHeight:"var(--Checkbox-size)",color:t.vars.palette.text.primary,[`&.${di.disabled}`]:{color:(n=t.variants.plainDisabled)==null||(n=n[e.color])==null?void 0:n.color}},e.disableIcon&&{color:(r=t.variants[e.variant])==null||(r=r[e.color])==null?void 0:r.color,[`&.${di.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),CM=ye("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[R({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,boxSizing:"border-box",borderRadius:`min(${e.vars.radius.sm}, 0.25rem)`,width:"var(--Checkbox-size)",height:"var(--Checkbox-size)",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0},t.disableIcon&&{display:"contents"},{[`&.${di.checked}, &.${di.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[R({},s,{backgroundColor:(r=s==null?void 0:s.backgroundColor)!=null?r:e.vars.palette.background.surface}),{"&:hover":{"@media (hover: hover)":(i=e.variants[`${t.variant}Hover`])==null?void 0:i[t.color]}},{"&:active":(o=e.variants[`${t.variant}Active`])==null?void 0:o[t.color]},{[`&.${di.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),wM=ye("span",{name:"JoyCheckbox",slot:"Action",overridesResolver:(e,t)=>t.action})(({theme:e,ownerState:t})=>{var n,r,i,o;return[{borderRadius:`var(--Checkbox-actionRadius, ${t.overlay?"var(--unstable_actionRadius, inherit)":"inherit"})`,textAlign:"left",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))",bottom:"calc(-1 * var(--variant-borderWidth, 0px))",right:"calc(-1 * var(--variant-borderWidth, 0px))",zIndex:1,[e.focus.selector]:e.focus.default},...t.disableIcon?[(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},{"&:active":(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]},{[`&.${di.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),SM=ye("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),IM=ye("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>R({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),AM=l.jsx(mM,{}),TM=l.jsx(vM,{}),EM=K.forwardRef(function(t,n){var r,i,o,a,s;const c=pt({props:t,name:"JoyCheckbox"}),{checked:u,uncheckedIcon:f,checkedIcon:d=AM,label:h,defaultChecked:g,disabled:v,disableIcon:m=!1,overlay:b,id:x,indeterminate:S=!1,indeterminateIcon:C=TM,name:I,onBlur:w,onChange:A,onFocus:E,onFocusVisible:k,readOnly:B,required:G,value:O,color:T,variant:N,size:H="md",component:j,slots:F={},slotProps:M={}}=c,V=Te(c,bM),Y=K.useContext(Ja),Z=(r=(i=t.disabled)!=null?i:Y==null?void 0:Y.disabled)!=null?r:v,D=(o=(a=t.size)!=null?a:Y==null?void 0:Y.size)!=null?o:H,L=Qi(x!=null?x:Y==null?void 0:Y.htmlFor),U={checked:u,defaultChecked:g,disabled:Z,onBlur:w,onChange:A,onFocus:E,onFocusVisible:k},{getInputProps:W,checked:ie,disabled:le,focusVisible:ae}=eA(U),ee=ie||S,ce=ee?N||"solid":N||"outlined",ve=t.color||(Y!=null&&Y.error?"danger":(s=Y==null?void 0:Y.color)!=null?s:T),dt=R({},c,{checked:ie,disabled:le,disableIcon:m,overlay:b,focusVisible:ae,color:ee?ve||"primary":ve||"neutral",variant:ce,size:D}),Pt=yM(dt),fe=R({},V,{component:j,slots:F,slotProps:M}),[pe,Ce]=Ae("root",{ref:n,className:Pt.root,elementType:xM,externalForwardedProps:fe,ownerState:dt}),[Ee,Qe]=Ae("checkbox",{className:Pt.checkbox,elementType:CM,externalForwardedProps:fe,ownerState:dt}),[De,ke]=Ae("action",{className:Pt.action,elementType:wM,externalForwardedProps:fe,ownerState:dt}),[At,Tt]=Ae("input",{additionalProps:R({id:L,name:I,value:O,readOnly:B,role:void 0,required:G!=null?G:Y==null?void 0:Y.required,"aria-describedby":Y==null?void 0:Y["aria-describedby"]},S&&{"aria-checked":"mixed"}),className:Pt.input,elementType:SM,externalForwardedProps:fe,getSlotProps:W,ownerState:dt}),[Ut,Lt]=Ae("label",{additionalProps:{htmlFor:L},className:Pt.label,elementType:IM,externalForwardedProps:fe,ownerState:dt});let Qt=f;return m?Qt=null:S?Qt=C:ie&&(Qt=d),l.jsxs(pe,R({},Ce,{children:[l.jsxs(Ee,R({},Qe,{children:[l.jsx(De,R({},ke,{children:l.jsx(At,R({},Tt))})),Qt]})),h&&l.jsx(mu.Provider,{value:!0,children:l.jsx(Ut,R({},Lt,{children:h}))})]}))}),kM=Be(l.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),kr=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:s})=>{const c=(u,f)=>{u.persist();let d=[...t];if(u.target.checked){d.push(f),a(d);return}d=t.filter(h=>h!==f),a(d)};return l.jsxs(p.Box,{sx:{mb:2},children:[l.jsx(p.Typography,{level:"body-sm",mb:1,children:e}),l.jsxs(oT,{orientation:"horizontal",wrap:!0,sx:{columnGap:"12px","--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(u=>l.jsxs(Gh,{children:[t.includes(u)&&l.jsx(kM,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),l.jsx(EM,{checked:t.includes(u),variant:t.includes(u)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[u]||"N/A",onChange:f=>c(f,u),slotProps:{action:({checked:f})=>({sx:f?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${u}`)),i===!1?l.jsx(Gh,{children:l.jsx(p.Link,{onClick:s,children:o})}):l.jsx(l.Fragment,{})]})]})},fi={popular:["FT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","CORRECT_SCORE","OVER_CORNERS_9_5"],playerRelated:["PLAYER_YELLOW_CARD","PLAYER_RED_CARD","PLAYER_SCORE","PLAYER_SCORE_FIRST_GOAL","PLAYER_SCORE_TWICE","PLAYER_SCORE_HATTRICK"],goals:["OVER_GOALS_0_5","OVER_GOALS_1_5","OVER_GOALS_2_5","OVER_GOALS_3_5","OVER_GOALS_4_5","OVER_GOALS_5_5","OVER_GOALS_6_5"],corners:["CORNERS_MATCH","OVER_CORNERS_6_5","OVER_CORNERS_7_5","OVER_CORNERS_8_5","OVER_CORNERS_9_5","OVER_CORNERS_10_5","OVER_CORNERS_11_5","OVER_CORNERS_12_5","OVER_CORNERS_13_5"],correctScores:["CORRECT_SCORE","CORRECT_SCORE_HT","CORRECT_SCORE_ADVANCED"],misc:["FT_1X2","HT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","HT_FT","RED_CARD_MATCH","PENALTY_MATCH"]},_M=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=y.useState(!1);return l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e.marketSelection}),l.jsx(p.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),l.jsx(kr,{label:"Popular",values:t,allValues:fi.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?l.jsxs(l.Fragment,{children:[l.jsx(kr,{label:e.playerRelated,values:t,allValues:fi.playerRelated,valuesMap:n,onChange:r}),l.jsx(kr,{label:e.goals,values:t,allValues:fi.goals,valuesMap:n,onChange:r}),l.jsx(kr,{label:e.corners,values:t,allValues:fi.corners,valuesMap:n,onChange:r}),l.jsx(kr,{label:e.correctScores,values:t,allValues:fi.correctScores,valuesMap:n,onChange:r}),l.jsx(kr,{label:e.misc,values:t,allValues:fi.misc,valuesMap:n,onChange:r})]}):l.jsx(l.Fragment,{})]})},Re={avatar:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMA+h6XBeOBCz4ozafvc/W9X+nD29ROsWmINjBVRxC4F3uPnhL6/TMAAAygSURBVHja7N0JkqJAEIXhAsEFEEVs9z3vf8eZmI6J3mxFZamq/L8zaC2ZrxKjTzTaLfu9xWweZ7n8FeRFmRwuq+XbZmDgs2gzPR9iuaGYpOl4yO/AQ+G0lwRSUXJ+40fgkXCaxvKgYDIeGXhgvZrLk8rVxsBp63MsLyn7rAPOCvul1GB+Cg2cE20nUpvDNjJwybpXSK2KPsuAM8J+LPULUk6EbjgF0pDD0MB2w0QaNOMnYLfhRL7iJ6DJaCEtOHAWsNO+F0g7Um4EFlpm0pq8T6/IMptEWhVPDewxWAXSthlNAltEu1I6EKyoD9sgOufSkZIrYfeOM+lQj8NgxzaxdKpcG3RonEvHgpNBV8KDWGByNOjENBMrFJwFu7BPxRbB2KBtw1gsknIbaNk4EKskHATaNLBn+f8vpjLcnn0i9skue4NWHOdipYRfwHUa/v//JBwFWzCYibUm9AebtxCLpQYN64nVVgaNGovllgYN2or13gwaM7Ss/ndNTmuoMevOu/9VZGREGrKxpP17T8bToUaMCnFEQV+gAaFV/d/bYt6O1e5YikPmtAVqNrC2AUBboA2RFfHPRywManQR5/QManMSB5EU1VQApij8k7IC4E855YBaHB0qAHwVExWuQWRxAuieiYHvCZDbzgYvmorTtgYvGTl6APwv4yD4koGlTwCqSwgKqz0AUBHUWgGiHlST0JEI0G0F1YBnOdcCpDFYq6V4grGyTwkdvwF+yEiIKd4A2AR0lgApCL5o70wIvIqCkKiCEBjloBqtxTO8FnqMYynw+2YGWk+AnAMfNnA2Bfa7mLag5zFwYuK1OXpTA/wsoymkKAXAVfAFIwcGwTwjIB7mwSRApgheQw2oGqYHVTERbx0M7tqJxxghd5/DL8F4K8YCwBLAAsAS8IqheI4lQO0VgIuA7hoAyRDVRUDKgZWMxH8BjwTUtQFpCqrOAXyXExFXFQQiGlRZ5GESkHSg7igwAWGqwLwRqGojapANU3sH5Cb4q4GKO+C7jO+JeDwQhqExPAflGEgbgGPgg1aiCp+Z/86riTD3xQaasqA/7Qw+S0WZi4HSIsC7jI6Qd2PBGSJOFpBsIDtAVTl7gOodgD1A9R2APeCLyIsvg3APoArEM0GiIHxW9AlK0sDflQYaO8EfeCT2bixKLQ08+zgQnxJ6QqSwDMhFUNNUGC6Ct/VFrZOBohdhzAy7KvJ0NjgdwT/snVlSAlEMRYO2duEADnQVIO2U/e9RLSkZbB7o5zvnbAGqX3Jzc2MJYHq0KoBZEZqBHAm7EOB6wGHOEo3jAKQbTF8Ydidwn8ugg50EOQ+yBrQKjHhJOPTYULQO6EAQlgykK2iHZtGtxlBD8Ibz8apbEGdC/Su8/Nvmfo4rBTp//h1uYPnBkGB43UGOgB0N2/uZG7VHD10FO8YFJUEYbAN2MoQ5DeU5KTsAO4FhHlPIC+O2AHCbONwCZBmIOgzxV66ietqUw4zqlwIsAeD+ELwDhO4PwTtA6NFx6FVAbeI2Afg2QCcQfE8AnAdyCjdROylFonKalCK1O8QVAuF/AL8A8D+ANQC8BrALoHcByPNA6gAbZikFZlE70xR0ejDyRKDJkRveUgrMo3Y0hBS5i9qBHonUEmY0rNGxCgHqQOwLMcd5iPqxDUB7QiPuUsBNAPhSsDWgtlBHQYrBcCFYLRBfAlgE0EsAM2LAZgCVAPgo0IgA+CTom8ZxwCD3QcGMgEHOg4JvAPoF+MS0aGpKpHHR9JxYbUGHGEFUIJOCsOlAWkMtAc2KAqdD6QsqAjsbF40TIWwP6CcA6wRwT5w+CN7mKeWHLoC4IQJKBRhiaVzQmtE4kOgMAu0DDdE6FGSdjFUQhh+N1hoENwL9plUMyBn2AfhiiT8kPYF2ACrC0CGQl2SZuyAuC5PXgcs04PDYafXXAU6hxQ4FHtANwIYW+g2Y+vuvaZB1wLXff7QkSBYA3RThpIGYGqIL1DfAF+A4XcJAugALtDB/2MQWkH1M6jlkl9tEcRuCjo+0CWRvCtF2gTUG7HEZss8iQSxDyNFhyoDwN0AjGPwN8AVgD4SIaQDGR0IjIdWCVIHMjgOeB/WclIFQ/6BHzISdBMO3hNwGgl+SgIUCKwUoAmgL0QpyKn31gRGTPqTAe1aOdvAyy6wceCIMPkCWGQrrhoiZgB/snVFOwzAQRO2QElJFhUAJClUpwve/I0h8tagobVzH3nnvColsz+7sLEoQDUhDgDbAFOo+mGVFJoR2MYgi0BQas9vlO/qA2tYwrGDT2Bs9AjgAxI8ADgDtV0DPAaAtBJAA2tuEqAGIrxGgCKgdF0EkhPhCMdqAF/IRTDE4uIzW1JCI6nJYFsuKL4edw95QW1h3OSxSEAmIPxQnqPg7UH05qHxXkC7gtdQm6oFbmgBXMxq4BPzoQDk8klBI7UtgzQUwi/fCLwFPKOhMPkPRYAPSXiZECWg+VcEO0f7gQHlgnOWA2o1hFGAc6kIzhJ9RgJGoirQG9ISCR+OhwGqAJxH0B+FRoTcHTjg/kDzAuNSF2YMeeQBG5lBUetgLgbDRaQuqCHaYwH4RlQIbBMBN2IUy8FSAj1HLkEQAniBmDsAE/AcpjyAdoJtyFzKHMdBj1P4ACoCnaP0BfP9zaPhDOP/PIPISvHfwD+abw1jAk/GUYVXYkwKRkNfsFkxuyIFLypiZTXDFCFhiqqzGRtcYQJPTDCEbBlLAJmJTDiL/FmKXxVOwo/2/GG0GD4Et9q8FaRa3i39x/X+zdyc5CMNAEEUhuQnc/46sEFMGWyJy1PX+Fept7R7bfXAXdQWAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQADofPelvQrqqd7+BPRUcX8C2qu5PwGtVd2fgLbq7k9AS5X3J2C/2vsTsFf1/QnYrv7+BGyVsD8B62XsT8BaKfsTsFzO/gQslbQ/Ab9l7U/Ad2n7E/BZ3v4EvJe4PwGvMvcn4Fnq/gQc0zT8W+D2bu5H/LtpPuGdqPWuMwLB8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8CD/buRStRKIDC8NaBRBBFzfttxvP+7zi1Wq2mxgxLC87+v1f4d6VwIPv8TMA+PxOwz88E7PMzAfv8TMA+PxOQukfr/I86xieIyW89gT75n3WKvtz0C/IbT6BfBLxhNAHyn1as5YD875uvFDvyn7ePewJr8n9olClW63lADZOtYkT++vKZYkN+6wmsyH+xfKNYrPYBn3BfKQbk/7xplajlyP816aLVE8jI/2Vp2VNLZaOAKxi3cwLkv57B79ZNgPzXNbjbqUXIf32D5UEtQf7bGP5pxQSyScCNDJt/inxL/tM8HiQg/+11jo09PEj+8yI/QrzNAz4W6xHiGfm/17xRR4jJf4nojhCT/4fsG3F+lPyXiuoIMfkvE9kENuT/eZO6EyB/rEZr/YDNfUBTFF2dR/7Inb9HQH4D70+A/Ca+aQIV+RvrG24TVdOAJnt1gZj8jm72dHlC/pa4rxLye0sXybXzpwFtMi575Pd2tceJkgX52+lhAuT3Ni4T8ntLK/Kby7PP5i/JH4eiS35vw1KX2pI/Knlfl9jxTt/YdErVt+LHP0Kjg2pa8N9cojTOVEfyKyBOtf4M9Hitb8SOyYf9ecY/avse/b1Ndjoj4f1e0cvPLYCv/wbynt5zF2BglOi0WYCFQid1BwEeSp3CFwAbnUz/KwNspDu91ecGgJNfeosrAF4yvbYJsJLrlYTnvtxU+tciwEya6EXCESA/C34BeJvqBZ8AHM30bBtgaK5nnAKz1DnoSZeLgJ5K7gJ4m+gJ73x2ddCjfoCpir8A3gruA3pL9aDHdwBfXa4CedtIWgbYWvIRwNteEofBjaVSN8BYj8eBvK25DORtpmOAsZIvAd6WnAbzVmgYYGyvAGc5A/A2ZQDexgzA25ABmGMA5hiAOQZgjgGYYwDmGIA5BmCOAZjjTKg5jQOcifeDeWMA5hiAOT4DmPvb3h2lNAxEYRT+kzo0JtNqoFpQmyCz/z2KFJFa8d2e863hvCRzZ65fAXAOhcL5IwjOAOAMAM4A4AwAzgDgDADOAOAMAM4A4AwAzgDg4lPRaN4Ohus8DmYrjoSxLVmawHY+Fcu2zdrENSeOBZNtkmyasNa4MYJsdHMs25BPL01MY86mJqT7nJ28Hob0ni9DE88h3x6baOopFgBW+1x48lgYpfT5oXd9GMjzNteGyfEwhvKW363HxQZu3uE1f7gbdtO4b1e6WudSylz3JvJ/dfPDcc2FD2jGIfoz6ZkMAAAAAElFTkSuQmCC",team:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMAcN3YbAMJ8lQsGkdh97kVyyLTsT0Q7ayEfDXD6KSLdeSclIjjiMMAAAu4SURBVHja7NjbasJAFIbRbY0S0npA641Cxc77v2OveyElYCY7nbWe4YPZ/wQAAAAAAAAAAAAAAAAAAAAAANCU7bXvVrxI11+3sSDD/Vh4sdt9iGUYHoVJPJaQwGa1K0xk120iucu+MKHzJVIbToVJnQ6R2GFd+K2pAraO/wpuee+A70IFX5HUe6GKz0hp4wCs5JjzEegLlfSRkR+AavaR0FCoJuMU/Cg818AbYAP+4b8vQSdARefIxwis6Bj5vBWqWUc+AnhOAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASCAxgmgcQJonAAaJ4DGCaBxAmicABongJfpZiaAmcXMBDCOAAQgAAEIIPIRgACWKEYSgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABLBEMZIABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQggCWKkQQgAAH8sEvHNAAAAAiA7J/aDJ5ukAEBBBBAAAEEEEAAAQQQQAABBBBAgEcZCSCAAAIIIIAAAggggAACCCCAAAIIIIAAjzISQAABBBBAAAEEEEAAAQQQQAABBBBAAAEeZSSAAAIIIIAAAggggAACCCCAAAIIIIAAAjzKSAABBBBAAAEEEEAAAQQQQAABBBBAAAEEeJSRAAIIIIAAAggggAACCCCAAAIIIIAAAgjwKCMBBBBAAAEEEEAAAQQQQAABBBBAAAEEEOBRRgIIIIAAAggggAACCCCAAAIIIIAAAgggwKOMBBBAAAEEEEAAAQQQQAABBBBAAAEEEECARxkJIIAAAggggAACCCCAAAIIIIAAAggggACPMhJAAAEEEEAAAQQQQAABBBBAAAEEEEAAAR5lJIAAAggggAACCCCAAAIIIIAAAggggAACPMpIgLJLxzQAAAAIgOyf2gyebpABAQQQQAABBBBAAAEEEEAAAQQQQAABBHiUkQACCCCAAAIIIIAAAggggAACCCCAAAII8CgjAQQQQAABBBBAAAEEEEAAAQQQQAABBBDgUUYClF07y2kgiKEoehVIAGUgE5CkRYC8/e+RNZR/7NfyWULrSl1lVwfQAXQAHUAH0AF0AB1AB9ABdAAdQAcQt+wAxswtgNV8AniSJcYUCeBIPUdZIte7QvbUs5clch0UMlHPJEvkuilkRz07WSLXWiEn6vmSJXJtFPJNPX+yRK6rQh7Uc5Elcj0UcqWeH1kiIP/k9Ew9G1ki10Ihr9SzliUC0lcBOlPPmywxosxHO1DPhywxqsR/c0VBL3JEqrtCPqnIcxtEqmk+uyA4yRGZltv5DALhLkdkuinmQkWegwCGFRiebajoLEeMS58D6kZFnvdAEq22c7oFwq8MMS59eLqgJssnIYzKXwX+k3cvOgnEUBBAx0ddXbMqJkAUMJj5/38UwsMA4rZsdjtTzieIudveO20l4yC2A2Ekyz4JkhwGrz3SEFLlHwTwGZpqGkK67I2TV4ia0w+yCcvC1oCeuVCkUeibaDaCXVNhSCSQolXMg2180g9yGTe80BNUBcNIANIIjE4mAbIMJ8JIohCfmELXDe0gnsYSUHgJYBkMRTSVYqkYCDWeByGPEVlcF8DzgCCiCP2hFI8FOp8OQRZ1w9IGAfuIgxlk8cVLVcKbQMuNICKpFADlTaBlMhQJsidBRI+FWgcDEUljC8BGNA7o+w1ABgsW+wXwiwUhnsLMTP0L4LcPQIrsF+pV8l8AYEEriKJSI7+hz6wXhKE9LLlS0M0gx4LXteGIpRCe154D7HzQCeJoDExVDwQ4p8MxrDBjBzUsWLUCEEGlU6rfBDBcBmJQdUWy0EGg6TIQ7VTOzyq+E+N/PgCtVD4A0mHAQ2OjbiAGNKrYQTWGDaNkGFrI7ADEs2C26WC00GmQSKeBfS8LQQuFkwDS14K47wQxlNclycLHAI6PyGEg4YVb5TwUV0QuBP/S2RrrJ0FMm0E4T+mb+C6eBveNB2MQowm3iroctoQSgCE8vLGbW7sCYFMCcJ5QTM6vANiUAJyj0wHyLAAuJQBnSO2IHAuASwlA754adnRnWQBMegHo22hOXlkPYCc4PCOFno3f+aukJ6JKmQjglFIH2CkJ5jkURK/ClJ29wJdBLgB/y38RgMHFoEVEg3BCqQFgFgQ6VctfHose3bO7SvZxgEICwjgm1gm7gbdwR204pNYG8RsDu20Fsaf4+7sFwQyfEcGe4j++7uMgxawDsaH5+7uvADfuqQy9eG64cqVTwGNhRmHYEvz+c2a/AjToB2JN8/dvrHuAP+zd62KiMBAF4CkWUBTFG6JSLz3v/45bbbu77noBm8AknO8F/EFMJpPJxJWmMfJN2f7/w158ESq+JiJnGmOezJMF4GSg9764iOic7vxZAHRnhOWTgpcAnG0HUUWotjJAjAqPMGTs0QJwkuTQSUyK5jAkd6QjnPsVomLQZItPnS4Du+UdKok50x7OOl8Fcl2ks0ZYjNmUAHeAd0xVngqJKf0UpsROtQNyPAzQlv7xNAD4tIM+YkT4DnMK8ZXGbICYsBwDYAbgsYm+x6XFgOkM5gQONQStb6PuUEB+bpHjA48A3GwaoCv8c/cmsLOBoKrwz+cA8Fuo7D0RPdnfk5XHAaDSjKD8yOYAkzIH3oVU0TJDywAYpTDp4N0RoANbAXledIRRsecbAJ05YXnaNMMJM8Ct75zaGQDDHL/xFoi7m0F5TljghBvAJ4Vq3hiXpyRjXOP5u+AiHp4LyTOGJQybdyABcClScllExfSPbScSAJcmOhJCUluyhWkzr08Ab0lU9BKWuvo5TAs6kgBSmRKUeqJ3GHfwtATwsYGC2yJSy6AH48rOfn+RQfuFwlJDuId5eWcSwNdsWh8BUt10iw/8/kYtYrRLKhvFMC/eSMe1PQKkoskcJ/z+vo2Aeps/fn8Rz0aAVDF5wxm//5lXkaBU0C/xB+O/M2/yAfLQZAUrSn7/3wYl2tLS6g8c+P3/Mg3QErkvmcOOoMP5v2uSHtoh94SvMeyYdfT8R9/psNwxyGBJ5kUbcLOWW7RBbop2sGXcwfoPwz3W7A+AYYCreAHsXwq7LP58ACQrWPPO739LgcbdOPdNYc1aSFH7ALli2MP/eP/jAXXN1qppdvZH2qH7Xwr6rTwxAKJ1CntKHv88NAjQJLnUD2BRj+m/CiYZGnQ5+Mawacv0j76EgPwxOcKqFdM/FYU7NEa+RfsYVu24/dfYQOD+4s/tX1uGMZohZ4sMdsXc/tU0OKAR59+aw7KA1R+1JRmaIJIccRPD/xZFb2jAskhh25Hhn94nZ3M8xCdgW9OP4TyGfw7lhb8w/NNjqaWZ1JPGnWz+IuJmVtC8guGfgyUCxsTev/5wCwOBkx6Xf0OWyh6Z4OGfCa0357HsRcighYaWcjWUC6EbtLRntmnM5P9tahq027Pm7u8BJT267Thw+rdk4sQyMOf0b034oj4plL4KWTTQ0WT+phmTP3UpaNcNVv66ZKjvDfovAaO/RizVvDh16Y1Hv0/S8GrHj5U8+mtQou54aMXNX7NGqsoFY977qcTXw4E5u/5V4eskkPPvX5mPkcCKf/9aPNsOMPi3xt5TDtz7+2QYoDUBb/0oEO3Qkh3LPnXYZGhBxoM/NcKXGA2LX3nwp0myQqPeuPfT5n4wyODPf9E6RSNSFv0qNZ2jAXP2e9XL/jrQ4+yvmuV1IN5z9tcuecMFxv6dY6vtZ8Zm/44IRyWMO4w4+7sjKlIYlRbM+7tlugJY9NFp5kKBjBc+nBSOSi7+3WYgFEjXXPxd9tOswJGLv+sGYzxtzJoPHwxneMqMaX9PhKMDagsY+3kk2ueoJX9h7OeXZRGjsnjNcn//THYpKokLXvX206SI+fm7bbnOcVfOyd9z0b7ETQeGfh0QjQJc1ePGryPCfob/bPv8/B2yWOHCiuVeXTMtZvgyK1jq30nLRf/1tb9g3P+rPTgkAAAAABD0/7U3DAAAAAAAAAAAAAAAAAAAAAAAALATZ09HWAi+hXYAAAAASUVORK5CYII=",competition:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACjCAYAAABotuf8AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALiQAAC4kBN8nLrQAAEnpJREFUeJztXQmQXFUVpaBCzCIIghAooCBRIZDp7r93/+5Ze++GYrNEooALUux7sYmAqIAUQgWpArRKBBHKsMgiawhhEWIpi4AssoY9rAGUBEgGz+2ewDDTPfPf//3+7f79TtUtqMnMe/+de9599/3/lnXWUVBQUFBQUFBQUFBQUFBghe7k5unJ/FlWurzMSBVXGcnCMOxTZQ1tGBx9DK6W4/8vBG+D3P5rSxipQtl0S4/Ymepqp3fnT5V5N+IMAnuWOITApnH7sm3Qo/dtBWJWcDuo04041JxchdufgaHZ2el6srCfZudOQbS5xM5UrvFjIORlbqdExcDna4hg1/r0w58S1tBpdZ9mNwxdUAkrux7G953NVGkhGvGula6sxn/ZSVUW3ODLYfIpAsWt8PE+8PX6oQmLwi0e4G1uEpTJNQjsE93JHxWWqBIImyu5G60sNHF9DJ+XpIoK4+80zDx+xd1YZeEahsSb4+bgTGnCQpI+23LLz3E3VFm4RjkXhsSYNGHpyXwKSd0n3A1VFrawKmswU5T3GgMhcX/uRirjMfj+TGnCQo51DHcDlfEYfL9AmrB6jP4TuRuojMfg+wulCQuqPYO7gcp4LGFlr5YmLCtduZG7gcp4DL5/UZqwTLd8G3cDlfEYfL9cmrAwM1js56HsTHUVbGUzc3qra7iJi5CtmYTvVfQ7ouXC929LE5aZKi0SfqBkYdhKlx0ovqnpyfxF6iN2cCMOzVRx4UR8079BJA+Ilg3fvyVNWJZbul30gdAQsm0mFa1buoPbMZ1uxCE66XYT+hC+QL70kI+y32idksY/1K1+Gqw7hZ7JyrYzlQ00J38BGv0yhsaxPRHhu6o+fPfWhrIPxv4cnC3Xk8U/O+BwMp7JFyjjcdG64fvXWqOiBoBqr/BDSI/eZ3gpn9b+xIyBr2P4/IFmZ09O2NlTIbZjEbrzqPsqfsfyGni5xEgVMnqycEyNGzt3On52UMIeioG7GV44Jl+gEz8lWjeGwgeDqWcCwOm+XpBuPy+ZClp33Bz8KbdjuS1uDZ0UlEfyBaLPM6J1w/cXBa27KdBLjvJDiOZkvxO07rg51PVv/RGhjgvKI/kCEest0brh+3OD1t0U9BHaz+wNofskO11eN0jdGBqP43Yst+lIC4L6sOaLTEV4hQp8f3LQupsC+Y6vZTO00QKkfCVI3bqTO5bbsdwGDo8J6kPyhSMYHGrLZpx8NWjdTQHV7oQZyLs+1H7HvERm0lcOEwGh+Hhux3JbK4ZC8oVovfRiFX/nBK27KZDAbQHF3yv6YJZbfgeKTwepO4HEldux3Ibk/cQgHMIHU034QlxYlWWYPE34fiwQMK3dGMK6xofikWflfxikbkyzz+d2LLchYp0RhMMevc/ykyNjlHoCHXuzIHVPCs3J+UqijWTht0HqxRT5L9yO5TY4+NogHEIcZ/kStJO7Pki9nhA3B4Z8kvIIprqb+q0XY/wtXutCr/yQti1xC6HVZqaKN/nlj7hHSvIvP/XC5/v7rdczoPqvYTgUPrgD4/R7mNlpfupEtJuOOpd6dgB+F9PqF7iF0GpD57rLSOan++EQUUcjH4jWiYCwBj7f1k+dwkAS6Gv5DIT1Bz/17Rh3t0QDn/ZcT7JwPm0R5xZCq40+xczTej19Hhvns2T+ND91mqnSY37q8wXKszDUDAs/pFt6GxOArUXrw2xoLkhd7l1Y+aPxjGdyC0GCsF7X7OzuovwR5+D+bj91IkpeJlqfb6Bxup2uvO/nQeH0wy23NEWkPtrPCFI/8loHkZ+wsidwC6H1wqrSYXTCZykQ5/hbX/4Cl/Lzq7VAMjfDdMv3+3lQzO5eQUMzIvXRpwyv02T6vbg5OBs9zdd3zba22kK+klA6QUdNEed+6oOPP4Kv5b5mGAv0nAX+CKoOm27xAiNV8Hw8DoY1z8t1MPNZiQR3Csg8jF0IEgxD2j2efQSO0YnnE+d+6kKuers/dQQAKt0dCfUqPw9Mh4Ohwdt7rQvR53XPwkqXX6C/QR2HcItAhqF973j3UX57/P6D/nxU/QQ+/p4PaQQDpqD0Fv7SAD3vaTR80jAbM/rn0GFgAuXWXiKCmAO5RSDDaNKUMAcnnRliBr4ZuLghgIAfJB+3QitCQERYF7nPbqJfykcbItE5k9WDxu0hQPpqlHk6/Z1m58rIR9iFIMOQN034zdDJVKZAVOc2WsbszWqf4I4hH7dKL0KIG5TElzy/BhgnhHRlZcwc6G1WPs0ekSf8TEBYKyD279PfxoyBPtohxC0CGYY2TviJJWFnDXDheRY91uDT1zEBCv8M0tFAYn0UlO2zZ9TyrQ8ggEMblR23BrdFI+/yWhZ9LAUhtXOcSLAQZSSP9sYwRS9Kt2jEmZ4szgcPrwUpX3PyR8rUjCfUX76VPTu/iSDeQqI4f2zZCMcuSPR81ilEuBhDYe2TBwQGYRUjKSx0xvfRoe3xfBVIVE8EFO2biHjCL7GlwHSL+wU9+B+EfBAzBg/E8Dd1bbkg6jCRHM5MFT87EQX51T4ok10EsgzcHLy2rcQZOtKuxGEwwVbXoDPyR6u1wMPQDPHi4IRV10CkV6G8OVQuyrxO5O/xd4evfSaI7Ehu58s0DPOXUzvj5sBMiGxBK1ZzQJhLyZdcOmoIPNA3EaKFly036DXD1ECIam/890nvpJQ/pP2Ha5+H9iNyO1+m0ZBnuWVE5fLN4P2/gXlPV+hs9305NdQURqr085FDJwITNzK0iry/uhfJ/mfLZzE0RH0pM7hp3b1D5Dt0zPa8hwcheSYe7iIOolHveWsTdwJ68u/bwPkdYXSKkO7k5R233Qogt+nhOEeL7n8Z/RxqKbM3oyEV+ZrJJBcxYBja1PK5rMYnObR8dqvRz4BeGLmFfhJ4e19P5nfh0okvIILsgajxfBgEIb/6wjGGCSvbg4RW+ESVbjL45iPyEbgL7xKmVgHj9gB6xZsyCaJZJKLTJaPr3THu9ocl6k602gtpJ19mkkVw4OHXQ68oIXq0ZKbYRFgfjv0khDoPws8DT8GjaOQLdMTDyDdcumgZ0JDdEEH+I6f3lR9O2ENzRtenOflf0HkD3E5sN6OcinwB67zhrxlGFvTf6WcTxkQ2dhgkYFZ6PbcT28nqL51LS/1sZOkIJOzBjSGEK2l1YqsIM5L5cR+v0TOFDxaLsoHzKzQ7O6eRTyIDDFHTMFTNR/R6Nbiwatuhdhhdvu7kpiNiRW4XtB9DmvA68s3TiXMuf4cOJNybGqnCwiAfT9ETb7PT5amjy+3R+9LcDuW2+krawkJ0ukkPFY4kNCc3E7YLSBBO7GmbF4gb99EU0fBgbsdyGi3yQ4c7WrNz7f2JJgwg6myAsP2iCIEYSl8ZW07cGtzIdIu+N3h0uhGHGAkCHyQcGcTNQcsW2IlD67YstzTuWKSENdQDwXVt4o5capiOMufwYdtBs4doQ8ZNgj3zyYSdHffh1Ki/GO3q91fgZpHmZMPdvdyOSNQP/HhDhDzkEH9sVJaZKl7G7Vhuo8NT0On2DNuPbQeI5HdixFVXNzrBV0/mDSSuwjcuRNEQte7g8GXbgN4E05JiEdJMt/wohDVrbFkQ6An03ZDbqe1gdDKP1i47bThgpArCB3doTu74RmXR1i9uh7aT6U7uR2H7s20AMfxNhCz8/rJG5dBOFUQ+9bZ9lCGC300bfsP2KTswg6uKfDOkg94QrY4eW07M6F8PQ+MB3I5sNyNu0RGP4PAtGzAEzrDSYhdfgqT75unjt5WjV85C71SrGRqJK11Zgk7n+6TqjoOeLGTqd0F77n1rmr34M1PFvZGsRnIrfQuE9W7CGuyOXEuzh6ZAJOeJEISItERP5jcZWxYi2Pr4N+GbMrrJEOkfwAxR6MzXjkTCHtKQaHs+uIKuQNOcbMP12RgG59K1tdzOa2erHdQGzsP2c+igE/e8nolJCaiRLJ7XqBwnU5mGIfVObsd1gtH9R8i1Ng/b16EBSftckdsRLLd8HwgZd1apVt+ksVvQE266xcD5CojrWxw+DwXIrQRu8Kp+2uxIHfx8W9MtL+F2WCcZnRcbtr9DQT0fKnvOh5A7rUbS2fA8eAh0P7ULR8woF01YQzs04rOjgSFNaElLfaNE4fhGt1jg599AD/R8G5iy+isbzcmdyuB6uTBT4is7EeH+DTL0RuUhApq0TZzbYZ1kyHEfDdvv0uFHWCPiWtaj9321UZkg6tv+j5zuPkNu+kjYfpcODIU/9rcjp3Y2w5X4+y3HlonZ4fT6eVzdvWrUk4F73cmdxOF7qcDQtYXp84bPkUNXz9YaHA6Gn8+DCV+A3m2G5P0xJO8Nj/DueCDh3qj+mkA8wpC4MJzejzLGrXWfp/V+GT9/jNt57WrEuZkqRXuPIaJLDA290RE4X/Rzqw7b6cqDKGOXmNH/hYMtUOaudqaixPVFG0aO+lyN81Sp80+XmQwY0rZGYx/ySxidzozZ4qWa/cXdKCjTQEKvVpKOGKL4I+Da4vIzC+Lm4MZ+r5Nda+iN7xnJwkUoa08kppuOlDuT8glup3IbcYvOF+f2MwsQXWIj9+n5PtqIci8Mj8tB5N9R3i2IWjchokk9RbDNjc7Jf4a41exc9Ie/ZoCwtqHe5fVqXmXNjTgEn0thDV8qdyWQCyygD8/czulkIw57jP7uWYrsBQlraBNErgsRxgNfm9JtNrIs5krikNuPbYkeva92GK7pltVnGs+iqn5ipkqHgrupkzPc5YiZA3Mhrsf93r7eHUbnipZfSljZLF3Vy+2zjgEiVwLEXauO1W4oqo+IG93JN732WGEC6Mn8hkaysBfyB89bxaJutFTISBWOIG64/dPxMN3iTiB0cZeffUVD32LDLQ5y+yNSQOSaqtnZXTADeq7bBIY2v4YZ3wHEAbcfIgsMAdvQwWvdsPt55J6guxvtVFKQANrZGzcHdSOZvwzDQ+ReTdB5rMijbsDseKgrdjG3IxDBXCtdWuS04LJtdkMb6JMM2pTl5lVhnfrpNWaqOB85yKJO3BZGQ56eLPyj1oZUYSNuPhXGAI6Zgt4eR15yvuWWl7X1h+36B+MV9KwGfW3As3Pzp+ABCWvwS/P0XldzcjfTKsp2iGQ0m7XSlZc0J38z8qfv0jNy86TgE3FzYErM6N8GM6u9gtzb0wJRfYzo9JMeo38OPRM3LwotBGZbK/iEVXnXdEsONwcKEgDnBr7KLoCwXoWw1AK8KAIJ8m1cwjJTpdswDG7FzYGCBCBinMd1phbyq19j9jeDmwMFCdCT+V4I61kGYQ33GH0x7vYrSIKdLk9B1Do1zNkh1UVHLtlqMV60UTtDIu3vDAk/ZqXLj9GRS9ztVggBiCCz4PCHnV65kYvqQF1qlWc3QbOzW5hu8RQZyTyVabml6xKoA0PgutxtVQgZmKk5EMEqCcJaaaaK3XWPjcLnwFBlYziUcMdh9UOUfRh3+xSYQMISudNHJGKh7MO526fABLM+FEoRlhoKuxi6k3eRXLd8ZkhlouxjudunwAQ4v2inW79Oi8pE2b/kbp8CE0y3dEjrE/e6Ice6irt9CkxI2NnjZQnLSBZu4W6fAhOMlMilUWKGaBi9WyAUvMFyy9fJEhbyrPe426fAALqEG1FlqcQca01XXfStUEfM6E8hqjwjS1hkVAd3OxVChpEsHij77C2qg7udCiFDTxZ+QzuQZQqL6oibg2o5cjfBTJXukSkqMqojZg5sx91WhRCBxF3CqoYxwkIdmp1zuduqEBLi5sB+skU1ajg8lbu9CiFAd/JT4OyrwxIWotZfUafKs6KOhJ2dbWcqL4YlLKoLdea5260gGUaysGeYZ5iO3A67gLvdCh5hpArT49bQ5pjOz/JqCWtoFoR1cViiGjUcPkp1izwrGdr4FW6euwa6k9sIOdK5iAL3IRo8KWhPwf4XtrBqN8PW6xZ6XgjyAbT1crR5NjfvkQXtJAbRVcstvxC+MHjNSpffQNsPVLupJUBzci4Ifp7byVw2cl2xeifWakBUoedG7WbEAbcfIgU6zAM51RJux3IbcQAupnH7IzIwksXNnEz1cW7Hshs4ABc93P6IDIxkQQnrM2EVlLBaBSUsJSwpUMJSwpICJSwlLClQwlLCkgIlLCUsKVDCUsKSAiUsJSwpUMJSwpICJSwlLCmoCatXCYs4UMJqIZxMZWoY+wDb3WocZCobcPsjUkBPPRs9lt25nEYccPshctCcbMZ0S69wO5fLrHTlfeKA2w+RRMwY6LPS5Te5ncwgqvfQ9n25+Y80NCcXN1KFc3Qnf0/CHvpnlI3aSG2lNnPzrqCgoKCgoKCg0D74PybY2tE87U6rAAAAAElFTkSuQmCC",bin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA8klEQVR4nOWUvQ3CMBCFX5MGloAJwgQwAUwAYoAwATSUMAGZACYgA/CzQSaAjgGgQTIyegU6WfbZioQET3Lxonf+4uR8wL9oCcCItUrZyDS0vgewqhnK306nnDW2NqiK4WEEYMSavSZcMlx8PJNHl35Gv9EAFo4uMQHAmn6uAUwY3kYAdvRjDWDA8CkCcKbvawBdhi8RgCt9RwPIADy5MgXAlQ9KvpHxAFwnDkp+U+MBuP5ZULIrjAfg6rqgZF8bD8B1b4IqWFTSHx2Ag+fmNzpbqoTZhV7EdKwTpi/aAB4R8/8OoIVITQHcFJvbjO2kH9UL+0+m+SiE/A0AAAAASUVORK5CYII=",checkMark:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE10lEQVR4nO2ZXVBUdRjGdzS78BLqSmqyIKducjKZuvKqNMMpMgQW17IENEIFEWhVViYEJlm+dmG/JAFFZFcQ+QqlRKAQiNUWli/5EJYFgd0FUWI/gJ7mv+ZkAp497GG3Znhmzv3vec/7f//veQ6LtaIVrchuySFfLbY0vpc528DNtDQUCi31bemm+vE0Y50lZbrWkmysGedP31AnTVUXJk1d5yZOVr/LA28Vy9n6AU0vSeaaEiUzTVrRbCMyZxogtNyEwFyPdNMvSDXWIcVYi+TpGiT9cQOnp6rx/cPrSHz4E+Inrw3GTV5N4Okr3BwOnoVbL8rmlBLJbJNZMtsEuvAJD6pwavIa4u5fxXfjleaTExUi3oOSFxwCL8MttnROaZDO/Qa74ScqETvxI06OV4CnL9MfHyv1WzZwCZrXnIFSJvtTCcbhDWU4oS/FcV0JuKNXxEGQrGEafu0ZKCuWG/7Y2BV8O1aMqJGict5QyVomK+8w+OjRy8QAjg4rqnhq+fN2G3BE2xx7Gv7eJUQMKxA+JBfZCX87wGnww3KEDRXgkDbfd0nwOWh0lc0pdc6EP6y9iNDBC4bwoTz6I5bMeWfDHxzMR6gmDyH95zNowUuhcmPkkmIA/puB8/h6INcc1Jvzss0GrOuBg+CPaC/CuywWIT25i8Cfw4H+XAT3ZSfYBM8DVolnmgYdAR+uLcDGU/5wYb+D9Yc+QHB71oLw++/mILD3rNYH8tWUBshW6ajKvxXnB9fdm60GXPw3wT1s24LwQX3ZxAC+6pV5UhqwrsSOgud4zjOwOHwW9vbKoikNZFhuFi1728SzH8Fz/jHwysH3sU8tXRT+y54z+KJbpqA0ILDUq22BjxkpAefn04jVly+t8k8YeDVsKwLbnw2/t1uGPXekLdQGTL8aKOGHi7EheocV4O14NmJ0pfQr//ezPmwrZeUJ/Od3pNjTJdFRGkg31pmp2uZN7if/gtgUH4ATo8X0Ks/xxGsRHyKwXWYrPHZ3ik2UBlKna81UPf/GUwYevwnuSNGywXO6xAjoEFEbSDHWGKgOLHewEBuivOZBbYzzQ+TwJRvaZhv2tUnpwXeKwG4XUreQNT2wYdpEaRR4fQETpNoRWgXz8B0Z8GsTUh/ipKnqIltHZUR/ATwiFzbBWNt0PoL3bxdiV5uAeoyS3IbOnD9y9wI8Ij+aB8tk5f3bhfBtE8BHnRZFaYCETnQvqcN9ec80wQT8LnU6vFtTN1MaIIlZwmSVhu4NG9qTC/fI7csGv7M1bcDmNI8kZkvZ50O6s+F+dDvj8J+p07CzNTXeJnjrW9BXuJHEbCkfI/s7z8Ijeof1sefA+j4J35Ji8rnNX8eiIxL32f8lxUjl4a1KFtCCt76F+5UuMfoynbPhP1Xx9V7NSUvLTUlW6VT4lmR4t/B9WPaIZJXOgv/4d76QZa/Id2jUaNFlh8Or+GVbqnnPsZgQCVoj7inKHQhf6tUsYSbcfSwSeZOs0hFts4Wpyi8kklWGavJ1jI/KFv6Y3QfWVoVoc1xJ3Hdg4JyJiUvKW5Us8FHzXViOVrAmex1JzAL7sjW0dxt1moasB7Rv2OUQWbJI6ERyGxJ9kPSA0yU2cLpE5oDOTDO7Q2jwbxOoyD5PVmKyVf4nfrOuaEWs/7/+Atqs1blaLwVcAAAAAElFTkSuQmCC",upload:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC+ElEQVR4nO2aO2gUURSGP8T1AaImIGjUIkIMooj4KgRBbFJZiYVY2agIVj5WsDC9VklIsLNQwS2yhZVmN4KotYVPWERFLBbER1Y0aBy5cAaGZXZm7nhn92bmfnBg2T1n98x/z5z7mAWHw+FwOBwOh8MheDm3WLycmxMgDi/n5gSIw8u5OQHi8BLaPHAJGBAry3uFqYBySGy5SAJsCIldXyQBBkJiNxb9FricUdK3gDu2CTAvImTdBN8Ca4C1wAebBPC6YL+BA4HcDgJ/iiTA1ZD8rhdFgMfA0pD8lgPP8i7AV2AwIsftwM88C3AiQZ7n8yTAJ6ACnAK2JEkSWALU8yDAbdKjFl6fF7MAH4F+/o+jNgrQBI4BR6S8w3wWgMOY4Z1NAlSAdYHv6wNuhPhdwxw3bRCgKaMexqE23+fACoMCnOy1AJW2UW/nYcD3F7ATswz2SoBmxKh3Gn01f2fBMmAlsAnYD5wD7gKtrASoxIx62OjXZf7uJquBM7KrNCbAC40ERiXmC7AZcwzLFrwGvJKRbsnrmnymfHxUz7liSoBRzWSV/3HMsA+Y1ahUVXV7dX7AS2BqM9JtSsAk8DdFk1YxE/IdsXgGy98U/W29JK3NyrokEi/FIUWWlDRLPs4eyYzREdvKf9Lgxfs2HvWDXo/tvZz6+A0vyT0/F8i/lbAn7LFVgNOBXJKWfiMQ00gYM2OjAD+AVZLHNs3zQ58nGnHDtgmglq5pnjNOB+KmNeIu2ibA2UAeNY24qUDclEbcA9sEUJsYnzcdfFpyn6tSr8osMRKIG5H3quLTiGiMr20TQD1d9pnr4JOWuNnDCgGChyTfuyDAt6SO3TJ//u/pLWALM11ogvexmLTTYFUj7gIWM6RxIarUfZ5qxG3Fcuq9WArbxC55gBJ3MarJGdsM2cZEBrPNGIuIUsqnwKkPRGykz9CpUD3JkZjNlTCe8lB0Qco+7C83i44dwD2Ni1fdfjc5ZEj282pLqx6GqI2NspeywlOfKZ9I/gGPNfEFBL9FwQAAAABJRU5ErkJggg==",upArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAz0lEQVR4nO3YywrCMBBG4fOE1oWDC/vsCiq+RAuVQLpzvDVtJvAfCJSki/nIqgWllFJKKaUqtwfuwDU/N5kBAzDlNQI9jSOmFjHmIJrCHF8gBmcvvdvMTYzACTg4Z31LiLnwGPsCER5jPyDCYuwPRDiMLUCEwVgBRHWMFURUw9gKiM0xtiJiM4xtgFgdYxsi5opjaiCKY2oiimEiIBZjuoDfDkdnpjSr2y0Y4h0m/dBwewREeJg0q1uXpedPV1epDrjkGXe1h1FKKaWUUrTVE5bz7NyN3sYLAAAAAElFTkSuQmCC",downArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAgklEQVR4nO2UOwrAIBAF5xKReP+bJFV+TSxynATBQiSI0TXVDggW7htesYKiKIogE7ADRiDLZxzAXPJ4BW7ANcpNyPBZS8nAAJxh4AJshTTNGGsH7R/SFnmztEYuJv0iF5eWyLtJc/Lu0rfddMld4sPJErfs3jTFt9vC6d5UURSFmAePTDtnrV72/QAAAABJRU5ErkJggg==",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAABvUlEQVR4nO2XTUrDQBSAPwXBn7ps0TO4EFfd24obEfQQHqOt4qIewAt4BkFci+610IIW7MpFXQtWxJGRNxBK02k0qTPpfDCUvDbJ+/LezDQQCARmBpWTQe5EfEUFEcdQoSKOoUJFMmIZOAG6wEA+G8CSTxXRyd7F7A+3FhmnRI4lh2egAqwAVaAn8bovIl3JYXsoXpX4ky8iA8mhMBRflfh7miIlYJNsK1IZiu9I/DEtES3RAtrAIunTkBx60k4FkTBzpJaGiJEwvztL3+NnVdKr06hV68by8CYSiUroCfcpo5yBjE62LvcZyGdtgg6wihSBB/muA6xJNcyxbaOaFmqcSLQSLTlGnk5b4s2YCy/giEgpRsJQjrTYHnAAnAJXQD/mnKmLFEe00yialtdOfe76f4mULJWIYlqsL5XQFTmUfWbSa2Qm0kqYQNxqkuSBZCKiLO2UhGiLjmu/rSxEOilJJJH5kF19Pu05Mi30HnQOfMm9r/+wOCgX/v3uAi9y/1dg31cRpBMuI3lcyIuVdyKaOeAIeLPMqXHDCRHDBnCfB5HfEERcQ4XWcgwVKuIYKrcVUZ4PciMSCARmgG9mLvK/OR2iiQAAAABJRU5ErkJggg==",flag:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIUAAACBCAYAAADuS3kqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACfRJREFUeJztnXuIXNUdx913shutjfVBqtGFupuZ3Xnd9zz3Ne/dYKEo/isSEGqFSlslSFBi2kStSqkiCEGl1D/ECP4hKLYmTUziZjfRjUl8FzU0pbJLtIlJ1t2N37PZQHBM9t67d845d+b3hS8z9+59nfP73N/5nZnZmcsuI5FIJJJE0pOlpqg+2NwbTbUEQlZLd4/ecnNAbT3vrqDWuqbXbA1GEq0RbaBFSxSbRF8zySOF1b5G1cqtDCl93Xhcq1r530X1gYeMVHlUTxSPYnkqZgydBCDTCP4cfJY9YnkG608pVu44gDiGbXdFtP6N2P4+xcwWw2p/AH/vwHYEi+xC8BoQrOUI1q3wk1jeA39ppIZPm+nhOSuz9uxSjePMmjgeYPlIjeffCGt9vwcoAZyvRXT7SQvCUHAFAjIIGNYjUP/A8gkzPbLk4DsxzjmtJQrjgGNzVBtI4FpaRfdL3QkdvwypPaPFC5uMZGkcmQAgDHMF4cezyMickSxPApLtuL518C8AS6Po/qppYShYjbtwHdL2q3qyfEo0BIsMM3OoXY4iez0AeDvNVLlBdP/VjHC3tQGComLmtgGE06KD7caA42u0YyOK3JVL7hAccAW8DR5d8L6LeAze6kEMpBIq/lvUeGEn7rrvRAd26ZljZE5PFg+j7uhH1nA/pOBgP4E/sXni3R7GQ5gwdbwaIGzAuPwpagVPZgwyGVnjjBYvbsEweLmrDqonKBQru0q18vdjDJ4UHbhqm9UbGBJfQpHc5bijcIArah0KFI8rAMPdyAzHWIoVHTCOnsFM5UHHHVbLUKDwuhLTtQ1Ip/+TIEAiPAsoNjruOIdQ7KlC7DwXIOjQ4vlfYZjYgTQ6I0FwfAnFx7UCRdQY7EIR+SJgmJYgKKJd31AoZu46DTAgSxAMHkBxuZ+hAAjNmHr9AUPFvyUIgmyuLygw1boKReSv8fhxnc0onELxsOPO9RsUmHtfjaxwJ4aJccBwRoKOl9lcoNhbhTjbEoaIFTEzu05Plj63MpQZ6hYKI1VqiZlD3agb/gYYpmiYkBiKrqDeGlIyN1jpYc8/6ME+PBLVB8PICvdgmHgbU8uTEnSuX+0aihVOoQAQIRR5n8HPhrW+jGrl25YCgmJmGwFCGhlhA471MrLCccoKnkGxiQsUCGAMQZv/AAoeZ1D8/Ze9RqBYubvwPN8TSXZim9W406/HRf0cvhLPVyELrAZQnRGtP6InSndgm3uxfif2+8pIDc9K0Im1ZjFQ/MBz7GVlzAxO4vFrKz0yhXWTWP4cy5PY5zj7WBt7a5dtK0Gn1bqXBMVHNk/yDtsHd3z0IlCQ5TJBQfYOig6CombNEQozGwEU30rQaPLiUPyRCxSYQoYJCl+YCxSj56DIERT+MEcorFyIoPCF+UGhnoOCXn6W366haHcORb6XoPCFZ40ULyjiBIVPzBOKAkHhD7N/QP6TWyg+tHmSfWwfLVHoISh8YZ5QFINWeuSEBI0mywKFTlD4xa6hWO4YimQpYGUICh+YoCCLgWLsHBRlQLGWoJDfDIrNvKBYg+f/l6DRZFmgMAgKv5gjFKlyN0HhCwOKYVdQLHMKhZkaJij8YY5QpEe68PwbCRpNXhyKLW6h+MDmScYXMsWNOFnNf5lYDZgfFOynCmJm1m52IdcDFDcHVPZFIXb3IfsQijbnUGiAIntEgkaTZYGiKwgoTILCB2ZQPFJtKPZfAMVhCRpNlgiKJoWg8IN5QqE3IVMckqDRZFmg6O4hKHxi11C0uoECw8f7EjSaLA8UBqDIERTym0HxaLWhOHABFAclaDS5ilDYfc2BoPCXOULROw/FhASNJlcJihanUKzpNQkKf5g7FO9J0Gjy4lA8xguKRoLCF+YCxbvzUISsRsXKvStBo8kEBVlaKAKAQrVyByRoNLlKUDQ7hyIOKPIEhfzmCEV4Hor9EjSavDgUfyYoyJ5BYfcDM++xfYLhBINiXIJGkwkKMi8omhxDEQEU8fyYBI0mywJFTyRJUPjDXKFo0OKFfRI0mrw4FI9XG4qJeSiiBIVfzBuKUdENJksFRapBJSh8YbdQNDqFovccFO+IbjBZJihiKTZ8EBQ+MEco0gyKvaIbLKPN9MhZLVE4ZaTKX+nJ0ljUGHpBtfLPaoni01j+q5Es/0WHsfwUsu0zMTO7VbVyryF4x7DuhNe/3IzjPuEWCrv/7XWQ7RMiKM4DwKZ8JxHcCS1ReiOiDdyvxvO3OQ7Cgsz0MIbl/K1hrf8+gPU6IPoC677zBxRKpgFU7xEdFEEgnEWwvgEIb8aM7DoEsFNPFJrdgnAp4cb7Kc5T1uL5vyPzTFkZ51mENxS7RQeIlwHBDIJzULFyW5ANBsJqX4PnBCwiPVFcFlb7h5BJngcgtr+Z0C0UDQRFpdnQABjYOP9yVB8soc3XeB5pF0L2aAYYA7i25wDHot9QyBGKvpqFYr5QjBcOozjcHDUGA4qZ5Z4V7ArXVgQcE+yaLwHFk44P7BCK98/vByjeFh1Aj2GYBQzjipn7ZUTrlxaEHxMyx1Zc/4wMUOwSHUgvjDttFiBsQ7V/i5EstnsaLU7SE6V2tOMx+LRQKHSfQ4Gp3oyRLO/AMJEVUThWQ6h9CgDjuDgoksWdogPrEoZpdNx+DBVr0YZGT6MigZDBkyhA/4Ppq3somNxBUfIdFADhQxRntxvJUodnUZBQMTO7CnXGAQYGbyj+JTrI9jLD/ItNX6jxwnpkiZWe9bzkwrD4M7T7Jdj5ex9MLNg2O/nQ+X38AAXS6CSKyMdjxuBNyBI1UTc4EWJ0LWo/xdXOLqHYITrol4BhFrOJ15BCcyi+6g4GT1QrUACGM0ibb0b1gSxqh5orIrnKHRTl7aIhuACGGWSFVzBMpCNaP8HghdxAgTn+WyJBWCggj0aNwU3ICgZlBo/lEop/CgCB/XreFIqn7Sgcf6tauWBYyRAM1RA63O7XH7Kp63zhhuBwgWIhI5zA8LBLsXL3KOZQJ7JCk+g+q3m5gQKB+Q3u1DH23r6RWtqngy4EAMeaRhaaBAB7o8bQw3AhrPa1ITMQCDzlBgoA0RhSMq0IXjceFUwB740ZQw/GzOwzAGU3UvwYZgIT+PshAHQE6z9gZs+x/qAaLxxABhiF34poA6wuWI9tb++NpsL4+40hta8Z56DppCi5geJiYu8nIMDLAUp7IBxvX9NrdHQFdVhbsI51ZnswkliODLAMw0Ibr3aSHMhLKEg1IgdQHCYo6kQItN2vVCYo6kUEBalCBAWpQgQFqUIEBalCDqGg9xrqQQi03Z9pICjqRQQFqUIEBalCBAWpQgQFqUIItN1f+TlCUNSJCApShQgKUoUIClKFCApShRxCQR+grQch0HZ/OZCgqBcRFKQKERSkChEUJBKJRCKRHOh7LktbCRuu/n0AAAAASUVORK5CYII="},PM=({match:e,timeFormat:t})=>{var n,r,i,o;return l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[l.jsxs(p.Typography,{mr:1,children:["[",ut(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?l.jsx(p.Tooltip,{title:e.homeTeam.name,children:l.jsxs(p.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[l.jsx(p.Typography,{children:e.homeTeam.code||e.homeTeam.name}),l.jsx(p.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||Re.team,sx:{width:"20px",height:"20px"}})]})}):l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{children:e.homeTeam.code||e.homeTeam.name}),l.jsx(p.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||Re.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?l.jsx(p.Tooltip,{title:e.awayTeam.name,children:l.jsxs(p.Box,{display:"flex",gap:.5,alignItems:"center",children:[l.jsx(p.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||Re.team,sx:{width:"20px",height:"20px"}})," ",l.jsx(p.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):l.jsxs(l.Fragment,{children:[l.jsx(p.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||Re.team,sx:{width:"20px",height:"20px"}}),l.jsx(p.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},bs=Be(l.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),DM=e=>{const[t,n]=y.useState([]),[r,i]=y.useState([]),[o,a]=y.useState(!1),{sdk:s}=Ye(),c=()=>_(this,null,function*(){try{const h=yield s.topX.getGames({limit:50},!0),g=yield s.matchQuiz.getGames({limit:50},!0),v=[...h.data,...g.data];if(e.related&&e.related.length>0){const m=v.filter(b=>{var x;return(x=e.related)==null?void 0:x.some(S=>S.entity_id===b.id)}).map(b=>b.id);n(m)}i(v)}catch(d){console.error(d),f()}}),u=(d,h)=>{const g=h.map(v=>({entity_id:v,entity_type:"GAME",entity_relationship:"relatedTo"}));e.onChange(g)},f=()=>a(!o);return y.useEffect(()=>{c()},[]),l.jsxs(l.Fragment,{children:[r.length>0?l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e.label}),l.jsx(p.Select,{multiple:!0,indicator:l.jsx(bs,{}),defaultValue:t,renderValue:d=>l.jsx(p.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:d.map((h,g)=>l.jsx(p.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${g}`))}),onChange:u,sx:{minWidth:"15rem",[`& .${p.selectClasses.indicator}`]:{transition:"0.2s",[`&.${p.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(d=>l.jsx(p.Option,{value:d.id,children:d.title?d.title+` (${d.type})`:`Game with no title (${d.type}). ID: ${d.id}`},`related-game-title-${d.id}`))})]}):l.jsx(l.Fragment,{}),l.jsx(Ke,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:f})]})},OM=e=>{const[t,n]=y.useState([]),[r,i]=y.useState([]),[o,a]=y.useState(!1),{sdk:s}=Ye(),c=()=>_(this,null,function*(){try{const h=yield s.loyalty.getTemplates(void 0,!0);if(e.related&&e.related.length>0){const g=h.data.filter(v=>{var m;return(m=e.related)==null?void 0:m.some(b=>b.entity_id===v.id)}).map(v=>v.id);n(g)}i(h.data)}catch(d){console.error(d),f()}}),u=(d,h)=>{const g=h.map(v=>({entity_id:v,entity_type:"TEMPLATE",entity_relationship:"relatedTo"}));e.onChange(g)},f=()=>a(!o);return y.useEffect(()=>{c()},[]),l.jsxs(l.Fragment,{children:[r.length>0?l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e.label}),l.jsx(p.Select,{multiple:!0,indicator:l.jsx(bs,{}),defaultValue:t,renderValue:d=>l.jsx(p.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:d.map((h,g)=>l.jsx(p.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${g}`))}),onChange:u,sx:{minWidth:"15rem",[`& .${p.selectClasses.indicator}`]:{transition:"0.2s",[`&.${p.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(d=>l.jsx(p.Option,{value:d.id,children:d.name||`Template with no name. ID: ${d.id}`},`related-template-name-${d.id}`))})]}):l.jsx(l.Fragment,{}),l.jsx(Ke,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:f})]})},xm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),Cm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),RM=e=>{const t=(n,r)=>{if(r==="games"){const i=Cm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=xm(e.related);e.onChange([...n,...i])}};return l.jsxs(l.Fragment,{children:[l.jsx(DM,{label:e.labels.games,related:xm(e.related),onChange:n=>t(n,"games")}),l.jsx(OM,{label:e.labels.templates,related:Cm(e.related),onChange:n=>t(n,"templates")})]})},MM=(e,t)=>{const[n,r]=y.useState(null),{https:i}=Ye(),o=()=>_(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const s=yield a.json();r(s.data);return}r([])});return y.useEffect(()=>(o(),()=>r(null)),[e,t]),n},hi=({my:e})=>l.jsx(p.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:l.jsx(p.CircularProgress,{variant:"solid",color:"neutral"})}),LM=["PENDING","LIVE","SETTLED"],BM=["OPEN"],$M=["ACTIVE","INACTIVE","EXPIRED"],FM=new Map().set("PENDING","Pending").set("LIVE","Live").set("SETTLED","Settled").set("CANCELED","Canceled").set("OPEN","Open").set("ACTIVE","Active").set("INACTIVE","Inactive").set("PENDING","Pending").set("EXPIRED","Expired"),wm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="PERSONALITY_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from($M):e.entityType==="TEMPLATE"?t=Array.from(LM):t=Array.from(BM),l.jsx(l.Fragment,{children:t.map(n=>l.jsx(p.Option,{value:n,children:FM.get(n)},`${e.entityType}-${n}-status`))})};class NM{constructor(){X(this,"name","");X(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});X(this,"trigger",{trigger_type:"DATETIME",date:""})}}const zM=Be(l.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded"),jM=e=>{const[t,n]=y.useState(!1),{https:r}=Ye(),i=o=>_(this,null,function*(){if(o.stopPropagation(),n(!0),(yield r.deleteScheduledTask(e.taskId)).ok){n(!1),e.toggleToast("success",e.labels.deleteScheduledTaskMessage),e.refetchTasks(),e.toggleModal();return}n(!1),e.toggleToast("danger",e.labels.deleteScheduledTaskErrorMessage)});return l.jsx(l.Fragment,{children:l.jsx(p.Modal,{open:e.isOpen,onClose:e.toggleModal,children:l.jsxs(p.ModalDialog,{children:[l.jsxs(p.DialogTitle,{children:[l.jsx(zM,{}),e.labels.deleteScheduledTaskModalTitle]}),l.jsx(p.Divider,{}),l.jsx(p.DialogContent,{children:l.jsxs(p.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,l.jsx(p.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),l.jsxs(p.DialogActions,{children:[l.jsx(p.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),l.jsx(p.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},UM=e=>{const[t,n]=y.useState(null),[r,i]=y.useState(""),[o,a]=y.useState(""),[s,c]=y.useState(""),[u,f]=y.useState(""),[d,h]=y.useState(!1),[g,v]=y.useState(!1),[m,b]=y.useState(!1),[x,S]=y.useState("success"),[C,I]=y.useState(""),[w,A]=y.useState(!1),E=y.useRef(!1),k=MM(e.entityId,E.current),{https:B}=Ye();if(!k)return l.jsx(hi,{my:10});const G=()=>A(!w),O=(M,V)=>{b(!0),S(M),I(V)},T=(M,V)=>{i(V.scheduled_task_config.change.status),c(V.trigger.date),n(M)},N=()=>_(this,null,function*(){h(!0);const M=F("CREATE","");if((yield B.setSchedulers(M,"CREATE",null)).ok){h(!1),a(""),f(""),E.current=!E.current,O("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),f(""),O("danger",e.labels.createScheduledTaskErrorMessage)}),H=(M,V)=>_(this,null,function*(){v(!0);const Y=F("UPDATE",V);if((yield B.setSchedulers(Y,"UPDATE",M)).ok){v(!1),n(null),i(""),c(""),E.current=!E.current,O("success",e.labels.updateScheduledTaskMessage);return}v(!1),O("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),c("")}),j=()=>{E.current=!E.current},F=(M,V)=>{const Y=new NM,Z=M==="CREATE"?o:r,D=M==="CREATE"?null:V,L=M==="CREATE"?u:s;return Y.scheduled_task_config.entity_id=e.entityId,Y.scheduled_task_config.entity_type=e.entityType,Y.scheduled_task_config.change.status=Z,Y.trigger.date=L,Y.name=D,Y};return l.jsxs(l.Fragment,{children:[k.map((M,V)=>l.jsx(p.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:l.jsx(p.CardContent,{children:t===V?l.jsxs(p.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[l.jsxs(p.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),l.jsx(p.Select,{value:r,size:"sm",name:"status",onChange:(Y,Z)=>i(Z),sx:{minHeight:"36px"},children:l.jsx(wm,{entityType:e.entityType})})]}),l.jsxs(p.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:e.labels.at}),l.jsx(tu,{defaultDate:s,onChange:Y=>c(Y)})]}),r&&s?l.jsx(p.Button,{onClick:()=>H(M.id,M.name),loading:g,sx:{mt:"auto"},children:e.labels.save}):l.jsx(p.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):l.jsxs(p.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[l.jsxs(p.Box,{children:[l.jsxs(p.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",l.jsx(p.Typography,{whiteSpace:"wrap",children:M.name})]}),l.jsxs(p.Typography,{style:{color:"gray"},children:[e.labels.status,": ",l.jsx(p.Typography,{whiteSpace:"wrap",children:M.status})]})]}),!e.readOnly&&l.jsxs(p.Box,{children:[l.jsx(p.Tooltip,{title:e.labels.edit,children:l.jsx(p.IconButton,{onClick:()=>T(V,M),children:l.jsx(Oe.Edit,{})})}),l.jsx(p.Tooltip,{title:e.labels.delete,children:l.jsx(p.IconButton,{onClick:G,children:l.jsx(Oe.Delete,{})})})]}),l.jsx(jM,{labels:e.labels,isOpen:w,taskId:M.id,taskName:M.name,toggleModal:G,refetchTasks:j,toggleToast:O})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${M.id}`)),!e.readOnly&&l.jsxs(p.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:k&&k.length?2:0},children:[l.jsxs(p.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),l.jsx(p.Select,{value:o,size:"sm",name:"status",onChange:(M,V)=>a(V),sx:{minHeight:"37px"},children:l.jsx(wm,{entityType:e.entityType})})]}),l.jsxs(p.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:e.labels.at}),l.jsx(tu,{defaultDate:u,onChange:M=>f(M)})]}),o&&u?l.jsx(p.Button,{onClick:N,loading:d,sx:{mt:"auto"},children:e.labels.create}):l.jsx(p.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),l.jsx(Ke,{showToast:m,message:C,color:x,hideToast:()=>b(!1)})]})};function VM(e){return lt("MuiIconButton",e)}We("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const HM=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],WM=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:s}=e,c={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${xe(a)}`,t&&`color${xe(t)}`,o&&`size${xe(o)}`,s&&"loading"],loadingIndicator:["loadingIndicator"]},u=ht(c,VM,{});return r&&i&&(u.root+=` ${i}`),u},GM=ye("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.instanceSize&&{"--IconButton-size":{sm:"2rem",md:"2.25rem",lg:"2.75rem"}[t.instanceSize]},t.size==="sm"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2rem) / 1.6)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2rem)",minHeight:"var(--IconButton-size, 2rem)",fontSize:e.vars.fontSize.sm,paddingInline:"2px"},t.size==="md"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.25rem) / 1.5)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2.25rem)",minHeight:"var(--IconButton-size, 2.25rem)",fontSize:e.vars.fontSize.md,paddingInline:"0.25rem"},t.size==="lg"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.75rem) / 1.571)","--CircularProgress-size":"28px","--CircularProgress-thickness":"4px",minWidth:"var(--IconButton-size, 2.75rem)",minHeight:"var(--IconButton-size, 2.75rem)",fontSize:e.vars.fontSize.lg,paddingInline:"0.375rem"},{WebkitTapHighlightColor:"transparent",paddingBlock:0,fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,margin:"var(--IconButton-margin)",borderRadius:`var(--IconButton-radius, ${e.vars.radius.sm})`,border:"none",boxSizing:"border-box",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",[e.focus.selector]:R({"--Icon-color":"currentColor"},e.focus.default)}),R({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":R({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':R({"--Icon-color":"currentColor"},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]),"&:disabled":(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]})]}),YM=ye(GM,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),KM=ye("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return R({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),Sm=K.forwardRef(function(t,n){var r;const i=pt({props:t,name:"JoyIconButton"}),{children:o,action:a,component:s="button",color:c="neutral",disabled:u,variant:f="plain",loading:d=!1,loadingIndicator:h,size:g="md",slots:v={},slotProps:m={}}=i,b=Te(i,HM),x=K.useContext(Lp),S=K.useContext(Bp),C=t.variant||x.variant||f,I=t.size||x.size||g,w=t.color||x.color||c,A=(r=t.loading||t.disabled)!=null?r:x.disabled||d||u,E=K.useRef(null),k=cn(E,n),{focusVisible:B,setFocusVisible:G,getRootProps:O}=Yl(R({},i,{disabled:A,rootRef:k})),T=h!=null?h:l.jsx(Rp,{color:w,thickness:{sm:2,md:3,lg:4}[I]||3});K.useImperativeHandle(a,()=>({focusVisible:()=>{var L;G(!0),(L=E.current)==null||L.focus()}}),[G]);const N=R({},i,{component:s,color:w,disabled:A,variant:C,loading:d,size:I,focusVisible:B,instanceSize:t.size}),H=WM(N),j=L=>{var U;let W=i.onClick;if(typeof m.root=="function"?W=m.root(N).onClick:m.root&&(W=m.root.onClick),(U=W)==null||U(L),S){var ie;(ie=S.onClick)==null||ie.call(S,L,i.value)}};let F=i["aria-pressed"];typeof m.root=="function"?F=m.root(N)["aria-pressed"]:m.root&&(F=m.root["aria-pressed"]),S!=null&&S.value&&(Array.isArray(S.value)?F=S.value.indexOf(i.value)!==-1:F=S.value===i.value);const M=R({},b,{component:s,slots:v,slotProps:m}),[V,Y]=Ae("root",{ref:n,className:H.root,elementType:YM,getSlotProps:O,externalForwardedProps:M,ownerState:N,additionalProps:{onClick:j,"aria-pressed":F}}),[Z,D]=Ae("loadingIndicator",{className:H.loadingIndicator,elementType:KM,externalForwardedProps:M,ownerState:N});return l.jsx(V,R({},Y,{children:d?l.jsx(Z,R({},D,{children:T})):o}))});Sm.muiName="IconButton";const Im=Be(l.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),qM=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(c){var u,f;return c?l.jsxs(l.Fragment,{children:[l.jsx(p.ListItemDecorator,{children:l.jsx(p.Avatar,{size:"sm",src:((f=(u=n.find(d=>d.id===c.value))==null?void 0:u.assets)==null?void 0:f.logo)||Re.competition})}),c.label]}):null}const a=y.useRef(null),s=(c,u)=>{i(u)};return l.jsxs(p.FormControl,{sx:{mb:1},children:[l.jsx(p.FormLabel,{required:r,color:"primary",children:e}),l.jsx(p.Select,Q($({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:s},t&&{endDecorator:l.jsx(Sm,{variant:"plain",color:"neutral",onMouseDown:c=>{c.stopPropagation()},onClick:()=>{var c;i(""),(c=a.current)==null||c.focusVisible()},sx:{width:"18px",height:"18px"},children:l.jsx(Im,{})}),indicator:null}),{children:n.map((c,u)=>{var f;return l.jsxs(y.Fragment,{children:[u!==0?l.jsx(p.ListDivider,{role:"none"}):null,l.jsxs(p.Option,{value:c.id,label:c.name,children:[l.jsx(p.ListItemDecorator,{children:l.jsx(p.Avatar,{size:"sm",src:((f=c.assets)==null?void 0:f.logo)||Re.competition})}),c.name]})]},`${c.id}-${u}`)})}))]})};function QM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Am=QM,JM=typeof $t=="object"&&$t&&$t.Object===Object&&$t,XM=JM,ZM=XM,eL=typeof self=="object"&&self&&self.Object===Object&&self,tL=ZM||eL||Function("return this")(),Tm=tL,nL=Tm,rL=function(){return nL.Date.now()},iL=rL,oL=/\s/;function aL(e){for(var t=e.length;t--&&oL.test(e.charAt(t)););return t}var sL=aL,lL=sL,cL=/^\s+/;function uL(e){return e&&e.slice(0,lL(e)+1).replace(cL,"")}var dL=uL,fL=Tm,hL=fL.Symbol,xu=hL,Em=xu,km=Object.prototype,pL=km.hasOwnProperty,gL=km.toString,vo=Em?Em.toStringTag:void 0;function mL(e){var t=pL.call(e,vo),n=e[vo];try{e[vo]=void 0;var r=!0}catch(o){}var i=gL.call(e);return r&&(t?e[vo]=n:delete e[vo]),i}var vL=mL,bL=Object.prototype,yL=bL.toString;function xL(e){return yL.call(e)}var CL=xL,_m=xu,wL=vL,SL=CL,IL="[object Null]",AL="[object Undefined]",Pm=_m?_m.toStringTag:void 0;function TL(e){return e==null?e===void 0?AL:IL:Pm&&Pm in Object(e)?wL(e):SL(e)}var EL=TL;function kL(e){return e!=null&&typeof e=="object"}var _L=kL,PL=EL,DL=_L,OL="[object Symbol]";function RL(e){return typeof e=="symbol"||DL(e)&&PL(e)==OL}var Dm=RL,ML=dL,Om=Am,LL=Dm,Rm=NaN,BL=/^[-+]0x[0-9a-f]+$/i,$L=/^0b[01]+$/i,FL=/^0o[0-7]+$/i,NL=parseInt;function zL(e){if(typeof e=="number")return e;if(LL(e))return Rm;if(Om(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Om(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ML(e);var n=$L.test(e);return n||FL.test(e)?NL(e.slice(2),n?2:8):BL.test(e)?Rm:+e}var jL=zL,UL=Am,Cu=iL,Mm=jL,VL="Expected a function",HL=Math.max,WL=Math.min;function GL(e,t,n){var r,i,o,a,s,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(VL);t=Mm(t)||0,UL(n)&&(f=!!n.leading,d="maxWait"in n,o=d?HL(Mm(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function g(A){var E=r,k=i;return r=i=void 0,u=A,a=e.apply(k,E),a}function v(A){return u=A,s=setTimeout(x,t),f?g(A):a}function m(A){var E=A-c,k=A-u,B=t-E;return d?WL(B,o-k):B}function b(A){var E=A-c,k=A-u;return c===void 0||E>=t||E<0||d&&k>=o}function x(){var A=Cu();if(b(A))return S(A);s=setTimeout(x,m(A))}function S(A){return s=void 0,h&&r?g(A):(r=i=void 0,a)}function C(){s!==void 0&&clearTimeout(s),u=0,r=c=i=s=void 0}function I(){return s===void 0?a:S(Cu())}function w(){var A=Cu(),E=b(A);if(r=arguments,i=this,c=A,E){if(s===void 0)return v(c);if(d)return clearTimeout(s),s=setTimeout(x,t),g(c)}return s===void 0&&(s=setTimeout(x,t)),a}return w.cancel=C,w.flush=I,w}var YL=GL;const sr=pn(YL),Sn=({option:e})=>l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),l.jsx(p.Typography,{children:e.label}),l.jsx(p.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),Lm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||Re.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||Re.flag}}))||[],KL=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=y.useState([]),[s,c]=y.useState([]),[u,f]=y.useState(!1),[d,h]=y.useState(""),[g,v]=y.useState(!1),{sdk:m}=Ye(),b=()=>v(!g),x=(w,A)=>{a(A),i(A[0]?[A[0].id]:[])},S=3;y.useEffect(()=>{!d&&n&&n.length&&m.football.getCompetitions({competitionIds:n}).then(w=>{a(Lm(w))}).catch(w=>{console.error(w),b(),a([])})},[]);const C=y.useMemo(()=>sr(w=>{f(!0),m.football.getCompetitions({name:w}).then(A=>{c([...Lm(A)]),f(!1)}).catch(A=>{console.error(A),b(),c([]),f(!1)})},300),[]);y.useEffect(()=>{if(!d||d.length<S){c([]);return}return C(d),()=>C.cancel()},[d,C]);const I=(w,A)=>w.map((E,k)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:B=>A({index:k}).onClick(B),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:E},`option_${E.id}`)},E.id));return l.jsxs(p.FormControl,{sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{required:r,color:"primary",children:t}),l.jsx(p.Box,{children:l.jsx(p.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:u,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(w,A)=>w.id===A.id,endDecorator:u?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:s,disabled:o.length===1,filterOptions:w=>w.filter(A=>!o.some(E=>E.value===A.value)),onInputChange:(w,A)=>{h(A)},onChange:x,getOptionKey:w=>w.id,value:o,renderTags:I,renderOption:(w,A)=>l.jsx(p.AutocompleteOption,Q($({},w),{children:l.jsx(Sn,{option:A})}))})}),l.jsx(Ke,{showToast:g,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:b})]})},Bm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||Re.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||Re.flag}}))||[],qL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=y.useState([]),[a,s]=y.useState([]),[c,u]=y.useState(!1),[f,d]=y.useState(""),[h,g]=y.useState(!1),{sdk:v}=Ye(),m=()=>g(!h),b=(I,w)=>{o(w);const A=w.map(E=>E.id);r(A&&A.length?A:null)},x=3;y.useEffect(()=>{!f&&t&&t.length&&v.football.getCompetitions({competitionIds:t}).then(I=>{o(Bm(I))}).catch(I=>{console.error(I),m(),o([])})},[]);const S=y.useMemo(()=>sr(I=>{u(!0);const w={name:I,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?w.competitionIds=Array.from(n):delete w.competitionIds,v.football.getCompetitions(w).then(A=>{s([...Bm(A)]),u(!1)}).catch(A=>{console.error(A),m(),s([]),u(!1)})},300),[]);y.useEffect(()=>{if(!f||f.length<x){s([]);return}return S(f),()=>S.cancel()},[f,S]);const C=(I,w)=>I.map((A,E)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>w({index:E}).onClick(k),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:A},`option_${A.id}`)},A.id));return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:{marginBottom:"16px"},children:l.jsx(p.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(I,w)=>I.id===w.id,endDecorator:c?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:I=>I.filter(w=>!i.some(A=>A.value===w.value)),onInputChange:(I,w)=>{d(w)},onChange:b,getOptionKey:I=>I.id,value:i,renderTags:C,renderOption:(I,w)=>l.jsx(p.AutocompleteOption,Q($({},I),{children:l.jsx(Sn,{option:w})}))})}),l.jsx(Ke,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:m})]})},$m=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],QL=({labels:e,ids:t,onChange:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState([]),[s,c]=y.useState(!1),[u,f]=y.useState(""),[d,h]=y.useState(!1),{sdk:g}=Ye(),v=()=>h(!d),m=(C,I)=>{i(I);const w=I.map(A=>A.id);n(w&&w.length?w:null)},b=3;y.useEffect(()=>{!u&&t&&t.length&&g.profile.getByIds(t).then(C=>{i($m(C))}).catch(C=>{v(),console.error(C),i([])})},[]);const x=y.useMemo(()=>sr(C=>{c(!0),g.profile.getByIds([],C).then(I=>{a([...$m(I)]),c(!1)}).catch(I=>{console.error(I),v(),a([]),c(!1)})},300),[]);y.useEffect(()=>{if(!u||u.length<b){a([]);return}return x(u),()=>x.cancel()},[u,x]);const S=(C,I)=>C.map((w,A)=>{var E;return l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>I({index:A}).onClick(k),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=w.avatar)!=null?E:Re.avatar}),l.jsx(p.Typography,{children:w.label})]})},w.id)});return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:{marginBottom:"16px"},children:l.jsx(p.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(C,I)=>C.id===I.id,endDecorator:s?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:C=>C.filter(I=>!r.some(w=>w.value===I.value)),onInputChange:(C,I)=>{f(I)},onChange:m,getOptionKey:C=>C.id,value:r,renderTags:S,renderOption:(C,I)=>{var w;return l.jsx(p.AutocompleteOption,Q($({},C),{children:l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(w=I.avatar)!=null?w:Re.avatar}),l.jsx(p.Typography,{children:I.label})]})}))}})}),l.jsx(Ke,{showToast:d,message:e.searchProfilesErrorMessage,color:"danger",hideToast:v})]})},Fm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Team with no name",label:t.name?t.name:"Team with no name",logo:((n=t.assets)==null?void 0:n.logo)||Re.team,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||Re.flag}}))||[],Nm=({labels:e,ids:t,scope:n,readOnly:r,AdditionalCheckbox:i,onChange:o})=>{const[a,s]=y.useState([]),[c,u]=y.useState([]),[f,d]=y.useState(!1),[h,g]=y.useState(""),[v,m]=y.useState(!1),{sdk:b}=Ye(),x=()=>m(!v),S=(A,E)=>{s(E),o(E)},C=3;y.useEffect(()=>{!h&&t&&t.length&&b.football.getTeams({teamIds:t,scope:n}).then(A=>{const E=A.data.filter(k=>!k.name.includes("/"));s(Fm(E))}).catch(A=>{console.error(A),x(),s([])})},[]);const I=y.useMemo(()=>sr((A,E)=>{d(!0),b.football.getTeams({name:A,scope:E}).then(k=>{const B=k.data.filter(G=>!G.name.includes("/"));u([...Fm(B)]),d(!1)}).catch(k=>{console.error(k),x(),u([]),d(!1)})},300),[]);y.useEffect(()=>{if(!h||h.length<C){u([]);return}return I(h,n),()=>I.cancel()},[h,I]);const w=(A,E)=>A.map((k,B)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:G=>E({index:B}).onClick(G),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:k},`option_${k.id}`)},k.id));return l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{sx:{marginBottom:"16px"},children:[l.jsx(p.Autocomplete,{readOnly:r||!1,forcePopupIcon:!1,multiple:!0,loading:f,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38,marginBottom:i?1:0}}},isOptionEqualToValue:(A,E)=>A.id===E.id,endDecorator:f?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:a.length>0?"":e.teamsSelectionPlaceholder,options:c,filterOptions:A=>A.filter(E=>!a.some(k=>k.value===E.value)),onInputChange:(A,E)=>{g(E)},onChange:S,getOptionKey:A=>A.id,value:a,renderTags:w,renderOption:(A,E)=>l.jsx(p.AutocompleteOption,Q($({},A),{children:l.jsx(Sn,{option:E})}))}),i]}),l.jsx(Ke,{showToast:v,message:e.searchTeamsErrorMessage,color:"danger",hideToast:x})]})},JL=({checked:e,disabled:t,sx:n,onChange:r})=>{const i=n?$({},n):{ml:1};return l.jsx(p.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:o=>r(o.target.checked),sx:Q($({},i),{"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${p.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}})})},pi=({label:e,labelPosition:t="start",defaultValue:n,description:r,disabled:i,descriptionColor:o,sx:a,onChange:s})=>{const c=l.jsx(JL,{checked:n,disabled:i,onChange:s,sx:a==null?void 0:a.switch}),u=a!=null&&a.container?$({},a.container):{mb:2},f=a!=null&&a.label?$({},a.label):{};return r?l.jsxs(p.Box,{sx:$({},u),children:[l.jsx(p.Typography,{component:"label",startDecorator:t=="start"?void 0:c,endDecorator:t=="start"?c:void 0,sx:f,children:e}),l.jsx(p.Typography,{level:"body-sm",color:o||"neutral",children:r})]}):l.jsx(p.Typography,{sx:Object.keys(f)?$({},f):{mb:2},component:"label",startDecorator:t=="start"?void 0:c,endDecorator:t=="start"?c:void 0,children:e})},XL={control:(e,t)=>Q($({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px","&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>Q($({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>Q($({},e),{minHeight:"36px"}),menu:e=>Q($({},e),{position:"relative"}),clearIndicator:e=>Q($({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>Q($({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>Q($({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>Q($({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>Q($({},e),{color:"#333"})},ZL=e=>e.map(t=>({label:t,value:t})),zm=e=>{const[t,n]=y.useState(""),[r,i]=y.useState(!1),o=ZL(e.tags),a=()=>i(!r),s=d=>{e.onChange(d.map(h=>h.value))},c=d=>{n(d)},u=d=>{d.persist();const{key:h}=d;if(t)switch(h){case"Enter":case"Tab":if(e.tags&&e.tags.length===0){const g=[...e.tags,t];e.onChange(g)}if(e.tags&&e.tags.length>0&&f()){const g=[...e.tags,t];e.onChange(g)}n(""),d.preventDefault()}},f=()=>{let d=!1;return e.tags&&e.tags.length&&e.tags.includes(t)?(a(),d):(d=!0,d)};return l.jsxs(l.Fragment,{children:[l.jsx(vm,{styles:XL,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:s,onInputChange:c,onKeyDown:u,placeholder:e.labels.tagsPlaceholder,value:o}),l.jsx(Ke,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},e2=Be(l.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class jm{constructor(){X(this,"contestId","");X(this,"contestType","");X(this,"description","");X(this,"userList",[])}}const t2=(e,t,n)=>{const[r,i]=y.useState(null),{sdk:o}=Ye(),a=()=>_(this,null,function*(){try{let s;switch(t){case"top_x":s=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":s=yield o.matchQuiz.getGameWinners(e,!0);break;default:s=yield o.loyalty.getTemplateWinners(e,!0)}s.userList&&s.userList.forEach(c=>{c.tags||(c.tags=[])}),i(s)}catch(s){const c=o.helpers.getSDKConfiguration();let u=null;c.errorHandlingMode==="standard"?u=s.error:u=s.data.error,u.code!==404&&u.status!=="code_unknown_contest"&&n(),i(new jm)}});return y.useEffect(()=>{a()},[]),r};class n2{constructor(){X(this,"position","");X(this,"profileId","");X(this,"note","");X(this,"tags",[])}}function r2(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var i2=r2,o2=Array.isArray,a2=o2,Um=xu,s2=i2,l2=a2,c2=Dm,u2=1/0,Vm=Um?Um.prototype:void 0,Hm=Vm?Vm.toString:void 0;function Wm(e){if(typeof e=="string")return e;if(l2(e))return s2(e,Wm)+"";if(c2(e))return Hm?Hm.call(e):"";var t=e+"";return t=="0"&&1/e==-u2?"-0":t}var d2=Wm,f2=d2;function h2(e){return e==null?"":f2(e)}var Gm=h2;function p2(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}var g2=p2;function m2(e){return function(t){return e==null?void 0:e[t]}}var v2=m2,b2=v2,y2={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},x2=b2(y2),C2=x2,w2=C2,S2=Gm,I2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,A2="\\u0300-\\u036f",T2="\\ufe20-\\ufe2f",E2="\\u20d0-\\u20ff",k2=A2+T2+E2,_2="["+k2+"]",P2=RegExp(_2,"g");function D2(e){return e=S2(e),e&&e.replace(I2,w2).replace(P2,"")}var O2=D2,R2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function M2(e){return e.match(R2)||[]}var L2=M2,B2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function $2(e){return B2.test(e)}var F2=$2,Ym="\\ud800-\\udfff",N2="\\u0300-\\u036f",z2="\\ufe20-\\ufe2f",j2="\\u20d0-\\u20ff",U2=N2+z2+j2,Km="\\u2700-\\u27bf",qm="a-z\\xdf-\\xf6\\xf8-\\xff",V2="\\xac\\xb1\\xd7\\xf7",H2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",W2="\\u2000-\\u206f",G2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qm="A-Z\\xc0-\\xd6\\xd8-\\xde",Y2="\\ufe0e\\ufe0f",Jm=V2+H2+W2+G2,Xm="['’]",Zm="["+Jm+"]",K2="["+U2+"]",ev="\\d+",q2="["+Km+"]",tv="["+qm+"]",nv="[^"+Ym+Jm+ev+Km+qm+Qm+"]",Q2="\\ud83c[\\udffb-\\udfff]",J2="(?:"+K2+"|"+Q2+")",X2="[^"+Ym+"]",rv="(?:\\ud83c[\\udde6-\\uddff]){2}",iv="[\\ud800-\\udbff][\\udc00-\\udfff]",gi="["+Qm+"]",Z2="\\u200d",ov="(?:"+tv+"|"+nv+")",eB="(?:"+gi+"|"+nv+")",av="(?:"+Xm+"(?:d|ll|m|re|s|t|ve))?",sv="(?:"+Xm+"(?:D|LL|M|RE|S|T|VE))?",lv=J2+"?",cv="["+Y2+"]?",tB="(?:"+Z2+"(?:"+[X2,rv,iv].join("|")+")"+cv+lv+")*",nB="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rB="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",iB=cv+lv+tB,oB="(?:"+[q2,rv,iv].join("|")+")"+iB,aB=RegExp([gi+"?"+tv+"+"+av+"(?="+[Zm,gi,"$"].join("|")+")",eB+"+"+sv+"(?="+[Zm,gi+ov,"$"].join("|")+")",gi+"?"+ov+"+"+av,gi+"+"+sv,rB,nB,ev,oB].join("|"),"g");function sB(e){return e.match(aB)||[]}var lB=sB,cB=L2,uB=F2,dB=Gm,fB=lB;function hB(e,t,n){return e=dB(e),t=n?void 0:t,t===void 0?uB(e)?fB(e):cB(e):e.match(t)||[]}var pB=hB,gB=g2,mB=O2,vB=pB,bB="['’]",yB=RegExp(bB,"g");function xB(e){return function(t){return gB(vB(mB(t).replace(yB,"")),e,"")}}var CB=xB,wB=CB,SB=wB(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),IB=SB;const AB=pn(IB);class TB{constructor(){X(this,"id","");X(this,"value","");X(this,"label","")}}class EB extends TB{constructor(){super(...arguments);X(this,"logo","");X(this,"countryFlag","");X(this,"countryName","")}}class uv extends EB{constructor(){super(...arguments);X(this,"group","")}}const kB=(e,t)=>t||e||"-------------",wu=(e,t)=>Array.isArray(e)?e.map(n=>wu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>Q($({},n),{[AB(r)]:wu(e[r])}),{}):e,dv=e=>{const t=[];return e.competitions.forEach(n=>{t.push(Su(n,"competition"))}),e.teams.forEach(n=>{t.push(Su(n,"team"))}),e.players.forEach(n=>{t.push(Su(n,"player"))}),t},Su=(e,t)=>{var r,i,o,a,s;const n=new uv;return n.label=e.name,n.value=e.id,n.id=e.id,n.group=t,t==="player"?n.logo=((r=e.assets)==null?void 0:r.headshot)||Re.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||Re.team:n.logo=((o=e.assets)==null?void 0:o.logo)||Re.competition,n.countryName=e.country.name,n.countryFlag=((s=(a=e.country)==null?void 0:a.assets)==null?void 0:s.flag)||Re.country,n},_B=e=>{switch(e){case"CLASSIC_QUIZ":return"success";case"EITHER_OR":return"success";case"POLL":return"warning";case"TOP_X":return"primary";case"MATCH_QUIZ":return"primary";case"LEADERBOARD_TEMPLATES":return"neutral";default:return"neutral"}},PB=e=>{switch(e){case"CLASSIC_QUIZ":return"CLASSIC QUIZ";case"EITHER_OR":return"EITHER/OR";case"POLL":return"POLL";case"TOP_X":return"TOP X";case"MATCH_QUIZ":return"MATCH QUIZ";case"LEADERBOARD_TEMPLATES":return"LEADERBOARD TEMPLATES"}},DB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var b,x,S,C,I,w;const[o,a]=y.useState(t.position),[s,c]=y.useState(t.note),[u,f]=y.useState(t.tags),d=o||s||u.length>0,h=A=>{A.persist();const{value:E}=A.target;a(E),r("position",E)},g=A=>{A.persist();const{value:E}=A.target;c(E),r("note",E)},v=A=>{f(A),r("tags",A)},m=()=>{a(""),c(""),f([]),i()};return l.jsxs("tr",{style:{backgroundColor:d?"rgb(255 237 213)":""},children:[l.jsx("td",{children:l.jsx(p.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),l.jsx("td",{children:l.jsxs(p.Box,{display:"flex",alignItems:"center",children:[l.jsx(p.Avatar,{src:((b=e.profileModel)==null?void 0:b.avatar)||"",alt:((x=e.profileModel)==null?void 0:x.name)||"Unknown",sx:{mr:1}}),l.jsxs(p.Box,{children:[l.jsxs(p.Typography,{fontWeight:"md",children:[kB((S=e.profileModel)==null?void 0:S.name,(C=e.profileModel)==null?void 0:C.nickname),"  ",(I=e.profileModel)!=null&&I.name?l.jsxs(p.Typography,{children:["(",(w=e.profileModel)==null?void 0:w.name,")"]}):l.jsx(l.Fragment,{})]}),l.jsx(p.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),l.jsx("td",{style:{textAlign:"center"},children:e.points}),l.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),l.jsx("td",{children:l.jsx(p.Input,{name:"note",value:s,placeholder:"This user has...",onChange:g,sx:{backgroundColor:"#fff"}})}),l.jsx("td",{children:l.jsx(zm,{labels:n,tags:u,onChange:v})}),l.jsx("td",{children:l.jsx(p.Tooltip,{title:n.clearWinner,children:l.jsx(p.IconButton,{onClick:m,variant:"outlined",color:"danger",disabled:!d,children:l.jsx(Oe.Remove,{})})})})]})},OB=e=>{const t=(i,o,a)=>{if(e.winners.find(f=>f.profileId===i)){const f=e.winners.map(d=>d.profileId===i?Q($({},d),{[o]:a}):d);r(f);return}const c=new n2;c.profileId=i,c[o]=a;const u=[...e.winners,c];r(u)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>Q($({},o),{userList:i}))};return e.leaderboard?l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?l.jsx(p.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):l.jsx(l.Fragment,{}),l.jsxs(p.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:last-child, & > tbody > tr > td:last-child":{textAlign:"center",width:"50px"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"}},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{style:{width:"70px"},children:e.labels.position}),l.jsx("th",{children:e.labels.nicknameAndName}),l.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),l.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),l.jsx("th",{children:e.labels.note}),l.jsx("th",{children:e.labels.tags}),l.jsx("th",{children:e.labels.actions})]})}),l.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>l.jsx(DB,{winner:e.winners.find(o=>o.profileId===i.profileId)||{position:"",profileId:"",note:"",tags:[]},profile:i,labels:e.labels,onChange:(o,a)=>t(i.profileId,o,a),onRemove:()=>n(i.profileId)},`winner-profile-${i.profileId}`)):l.jsx(l.Fragment,{}),l.jsx("tr",{children:l.jsx("td",{colSpan:7,children:e.hasMoreParticipants?l.jsx(p.Box,{textAlign:"center",my:1,children:l.jsx(p.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):l.jsx(l.Fragment,{})})})]})]})]}):l.jsx(hi,{my:40})},RB=(e,t,n,r,i)=>{const[o,a]=y.useState(null),[s,c]=y.useState(!1),[u,f]=y.useState(!1),{sdk:d}=Ye(),h=()=>_(this,null,function*(){f(!0);const g={limit:10,page:r},v=!0;try{let m;t==="template"?m=yield d.loyalty.getLeaderboard(e,g,v):m=yield d.loyalty.getLeaderboardForGame(e,g,v),m.meta.pagination.numberOfPages>r?c(!0):c(!1),o&&o.length?a(b=>[...b,...m.data]):a(m.data)}catch(m){console.error(m),i("danger",n),a([])}f(!1)});return y.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:s,isLeaderboardLoading:u}};class MB{constructor(){X(this,"isValid",!0);X(this,"message","");X(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));X(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});X(this,"validateWinnerIds",(t,n)=>{const r=t.map(o=>o.profileId),i=new Set(r);r.length!==i.size&&(this.isValid=!1,this.message=n)})}}const LB=e=>{const t=e.winners.userList.length>0&&(e.winners.userList[0].position||e.winners.userList[0].profileId||e.winners.userList[0].note||e.winners.userList[0].tags.length);return l.jsx(p.Card,{variant:"plain",children:t?l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),l.jsx(p.Sheet,{children:l.jsxs(p.Table,{sx:{"& > thead > tr > th:nth-of-type(n + 3), & > tbody > tr > td:nth-of-type(n + 3)":{textAlign:"right"},"& > thead > tr > th:nth-of-type(3), & > thead > tr > th:nth-of-type(4), & > tbody > tr > td:nth-of-type(3), & > tbody > tr > td:nth-of-type(4)":{fontSize:"sm",display:{xs:"none",md:"table-cell"}}},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{style:{width:"3%"},children:"#"}),l.jsx("th",{children:e.labels.name}),l.jsx("th",{children:e.labels.note}),l.jsx("th",{children:e.labels.tags})]})}),l.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return l.jsxs("tr",{children:[l.jsx("td",{children:n.position}),l.jsx("td",{children:l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[l.jsx(p.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),l.jsxs(p.Box,{textAlign:"left",children:[l.jsxs(p.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",l.jsxs(p.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),l.jsx(p.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),l.jsx("td",{children:n.note}),l.jsx("td",{children:n.tags.map(o=>l.jsx(p.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):l.jsx(p.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},BB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new jm,$B=e=>{var w;const[t,n]=y.useState(BB(e.winners)),[r,i]=y.useState(((w=e.winners)==null?void 0:w.description)||""),[o,a]=y.useState(!1),[s,c]=y.useState(1),[u,f]=y.useState(!1),[d,h]=y.useState("danger"),[g,v]=y.useState(""),m=(A,E)=>{h(A),v(E),f(!0)},{leaderboard:b,hasMoreParticipants:x,isLeaderboardLoading:S}=RB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,s,m),{https:C}=Ye(),I=()=>_(this,null,function*(){a(!0);const A=JSON.parse(JSON.stringify(t));if(A.contestId=e.entityId,A.contestType=e.entityType==="template"?"TEMPLATE":"GAME",A.description=r,delete A.contestModel,A.userList.length>0){const k=new MB().validate(A.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!k.isValid){m("danger",k.message),a(!1);return}}else delete A.userList;const E=wu(A);try{yield C.setWinners(E),m("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(k){console.error(k),m("danger",Object.keys(e.winners).length?e.labels.editWinnersErrorMessage:e.labels.createWinnersErrorMessage)}a(!1)});return l.jsxs(l.Fragment,{children:[l.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:l.jsx(p.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:l.jsxs(p.Box,{width:"100%",sx:{overflowX:"auto"},children:[l.jsxs(p.Card,{variant:"plain",children:[l.jsx(bc,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:A=>{i(A)}}),l.jsx(OB,{winners:t.userList,leaderboard:b,hasMoreParticipants:x,isLoading:S,setPage:c,setWinnersRequestBody:n,labels:e.labels}),l.jsx(p.Box,{textAlign:"center",my:3,children:l.jsx(p.Button,{variant:"solid",color:"primary",onClick:I,loading:o,children:e.labels.save})}),l.jsx(p.Divider,{sx:{my:4}})]}),b?l.jsx(LB,{winners:t,profiles:b.map(A=>A.profileModel),labels:e.labels}):l.jsx(l.Fragment,{})]})})}),l.jsx(Ke,{showToast:u,color:d,message:g,hideToast:()=>f(!1)})]})},FB=e=>{const[t,n]=y.useState(!1),r=()=>n(!0),i=t2(e.entityId,e.entityType,r);return i?l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{p:2,children:[l.jsx(p.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:l.jsx(e2,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),l.jsxs(p.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",l.jsx(p.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),l.jsx($B,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),l.jsx(Ke,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):l.jsx(hi,{my:50})},NB=10,zB=e=>{var d;const[t,n]=y.useState([]),[r,i]=y.useState(!1),[o,a]=y.useState(""),{sdk:s}=Ye(),c=y.useMemo(()=>sr(h=>{if(!h){n([]),i(!1);return}i(!0),s.football.search({query:h}).then(g=>{n([...dv(g)]),i(!1)}).catch(g=>{console.error(g),n([]),i(!1)})},300),[]);y.useEffect(()=>(c(o),()=>c.cancel()),[o,c]);const u=(h,g)=>{const v=g.map(m=>m.id);e.setOptions(g),e.handleResetData(),e.setFilters(m=>Q($({},m),{entityIds:v}))},f=(h,g)=>h.map((v,m)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:b=>g({index:m}).onClick(b),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:v},`option_${v.id}`)},v.id));return l.jsxs(p.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),l.jsx(p.Autocomplete,{getOptionDisabled:()=>e.options.length===NB,forcePopupIcon:!1,multiple:!0,loading:r,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(h,g)=>h.id===g.id,endDecorator:r?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.options.length>0?"":e.labels.typeContextTagNamePlaceholder,options:t,filterOptions:h=>h.filter(g=>!e.options.some(v=>v.value===g.value)),onInputChange:(h,g)=>{a(g)},onChange:u,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(d=e.options)!=null?d:[],renderTags:f,renderOption:(h,g)=>l.jsx(p.AutocompleteOption,Q($({},h),{children:l.jsx(Sn,{option:g})}))})]})};function fv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var bo;(function(e){e.event="event",e.props="prop"})(bo||(bo={}));function lr(){}function jB(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(o,a){return o===t[a]})||(t=r,n=e.apply(void 0,r)),n}}function yo(e){return!!(e||"").match(/\d/)}function mi(e){return e==null}function UB(e){return typeof e=="number"&&isNaN(e)}function hv(e){return mi(e)||UB(e)||typeof e=="number"&&!isFinite(e)}function pv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function VB(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function HB(e,t,n){var r=VB(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function WB(e){var t=y.useRef(e);t.current=e;var n=y.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function Iu(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),o=i[0],a=i[1]||"";return{beforeDecimal:o,afterDecimal:a,hasNegation:n,addNegation:r}}function GB(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function gv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function mv(e,t){return Array(t+1).join(e)}function vv(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],o=r[1];if(o=Number(o),!o)return n+i;i=i.replace(".","");var a=1+o,s=i.length;return a<0?i="0."+mv("0",Math.abs(a))+i:a>=s?i=i+mv("0",a-s):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function bv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=Iu(e),o=i.beforeDecimal,a=i.afterDecimal,s=i.hasNegation,c=parseFloat("0."+(a||"0")),u=a.length<=t?"0."+a:c.toFixed(t),f=u.split("."),d=o;o&&Number(f[0])&&(d=o.split("").reverse().reduce(function(m,b,x){return m.length>x?(Number(m[0])+Number(b)).toString()+m.substring(1,m.length):b+m},f[0]));var h=gv(f[1]||"",t,n),g=s?"-":"",v=r?".":"";return""+g+d+v+h}function _r(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var yv=jB(function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[o-1-r]&&o-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}}),YB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function KB(e,t,n){return Math.min(Math.max(e,t),n)}function Au(e){return Math.max(e.selectionStart,e.selectionEnd)}function qB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function QB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function JB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function XB(e,t,n,r,i,o,a){a===void 0&&(a=JB);var s=i.findIndex(function(I){return I}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r=r+c.length);for(var u=n.length,f=e.length,d={},h=new Array(u),g=0;g<u;g++){h[g]=-1;for(var v=0,m=f;v<m;v++){var b=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:g,formattedValueIndex:v});if(b&&d[v]!==!0){h[g]=v,d[v]=!0;break}}}for(var x=r;x<u&&(h[x]===-1||!o(n[x]));)x++;var S=x===u||h[x]===-1?f:h[x];for(x=r-1;x>0&&h[x]===-1;)x--;var C=x===-1||h[x]===-1?0:h[x]+1;return C>S?S:r-C<S-r?C:S}function xv(e,t,n,r){var i=e.length;if(t=KB(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function ZB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(yo(e[n])||yo(e[n-1]));return t}function Cv(e,t,n,r,i,o){o===void 0&&(o=lr);var a=WB(function(v,m){var b,x;return hv(v)?(x="",b=""):typeof v=="number"||m?(x=typeof v=="number"?vv(v):v,b=r(x)):(x=i(v,void 0),b=r(x)),{formattedValue:b,numAsString:x}}),s=y.useState(function(){return a(mi(e)?t:e,n)}),c=s[0],u=s[1],f=function(v,m){v.formattedValue!==c.formattedValue&&u({formattedValue:v.formattedValue,numAsString:v.value}),o(v,m)},d=e,h=n;mi(e)&&(d=c.numAsString,h=!0);var g=a(d,h);return y.useMemo(function(){u(g)},[g.formattedValue]),[c,f]}function e$(e){return e.replace(/[^0-9]/g,"")}function t$(e){return e}function n$(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,o=e.getInputRef,a=e.format;a===void 0&&(a=t$);var s=e.removeFormatting;s===void 0&&(s=e$);var c=e.defaultValue,u=e.valueIsNumericString,f=e.onValueChange,d=e.isAllowed,h=e.onChange;h===void 0&&(h=lr);var g=e.onKeyDown;g===void 0&&(g=lr);var v=e.onMouseUp;v===void 0&&(v=lr);var m=e.onFocus;m===void 0&&(m=lr);var b=e.onBlur;b===void 0&&(b=lr);var x=e.value,S=e.getCaretBoundary;S===void 0&&(S=ZB);var C=e.isValidInputCharacter;C===void 0&&(C=yo);var I=e.isCharacterSame,w=fv(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=Cv(x,c,!!u,a,s,f),E=A[0],k=E.formattedValue,B=E.numAsString,G=A[1],O=y.useRef(),T=y.useRef({formattedValue:k,numAsString:B}),N=function(fe,pe){T.current={formattedValue:fe.formattedValue,numAsString:fe.value},G(fe,pe)},H=y.useState(!1),j=H[0],F=H[1],M=y.useRef(null),V=y.useRef({setCaretTimeout:null,focusTimeout:null});y.useEffect(function(){return F(!0),function(){clearTimeout(V.current.setCaretTimeout),clearTimeout(V.current.focusTimeout)}},[]);var Y=a,Z=function(fe,pe){var Ce=parseFloat(pe);return{formattedValue:fe,value:pe,floatValue:isNaN(Ce)?void 0:Ce}},D=function(fe,pe,Ce){fe.selectionStart===0&&fe.selectionEnd===fe.value.length||(_r(fe,pe),V.current.setCaretTimeout=setTimeout(function(){fe.value===Ce&&fe.selectionStart!==pe&&_r(fe,pe)},0))},L=function(fe,pe,Ce){return xv(fe,pe,S(fe),Ce)},U=function(fe,pe,Ce){var Ee=S(pe),Qe=XB(pe,k,fe,Ce,Ee,C,I);return Qe=xv(pe,Qe,Ee),Qe},W=function(fe){var pe=fe.formattedValue;pe===void 0&&(pe="");var Ce=fe.input,Ee=fe.source,Qe=fe.event,De=fe.numAsString,ke;if(Ce){var At=fe.inputValue||Ce.value,Tt=Au(Ce);Ce.value=pe,ke=U(At,pe,Tt),ke!==void 0&&D(Ce,ke,pe)}pe!==k&&N(Z(pe,De),{event:Qe,source:Ee})};y.useEffect(function(){var fe=T.current,pe=fe.formattedValue,Ce=fe.numAsString;(k!==pe||B!==Ce)&&N(Z(k,B),{event:void 0,source:bo.props})},[k,B]);var ie=M.current?Au(M.current):void 0,le=typeof window!="undefined"?y.useLayoutEffect:y.useEffect;le(function(){var fe=M.current;if(k!==T.current.formattedValue&&fe){var pe=U(T.current.formattedValue,k,ie);fe.value=k,D(fe,pe,k)}},[k]);var ae=function(fe,pe,Ce){var Ee=pe.target,Qe=O.current?YB(O.current,Ee.selectionEnd):yv(k,fe),De=Object.assign(Object.assign({},Qe),{lastValue:k}),ke=s(fe,De),At=Y(ke);if(ke=s(At,void 0),d&&!d(Z(At,ke))){var Tt=pe.target,Ut=Au(Tt),Lt=U(fe,k,Ut);return Tt.value=k,D(Tt,Lt,k),!1}return W({formattedValue:At,numAsString:ke,inputValue:fe,event:pe,source:Ce,input:pe.target}),!0},ee=function(fe,pe){pe===void 0&&(pe=0);var Ce=fe.selectionStart,Ee=fe.selectionEnd;O.current={selectionStart:Ce,selectionEnd:Ee+pe}},ne=function(fe){var pe=fe.target,Ce=pe.value,Ee=ae(Ce,fe,bo.event);Ee&&h(fe),O.current=void 0},J=function(fe){var pe=fe.target,Ce=fe.key,Ee=pe.selectionStart,Qe=pe.selectionEnd,De=pe.value;De===void 0&&(De="");var ke;Ce==="ArrowLeft"||Ce==="Backspace"?ke=Math.max(Ee-1,0):Ce==="ArrowRight"?ke=Math.min(Ee+1,De.length):Ce==="Delete"&&(ke=Ee);var At=0;Ce==="Delete"&&Ee===Qe&&(At=1);var Tt=Ce==="ArrowLeft"||Ce==="ArrowRight";if(ke===void 0||Ee!==Qe&&!Tt){g(fe),ee(pe,At);return}var Ut=ke;if(Tt){var Lt=Ce==="ArrowLeft"?"left":"right";Ut=L(De,ke,Lt),Ut!==ke&&fe.preventDefault()}else Ce==="Delete"&&!C(De[ke])?Ut=L(De,ke,"right"):Ce==="Backspace"&&!C(De[ke])&&(Ut=L(De,ke,"left"));Ut!==ke&&D(pe,Ut,De),g(fe),ee(pe,At)},ce=function(fe){var pe=fe.target,Ce=function(){var Ee=pe.selectionStart,Qe=pe.selectionEnd,De=pe.value;if(De===void 0&&(De=""),Ee===Qe){var ke=L(De,Ee);ke!==Ee&&D(pe,ke,De)}};Ce(),requestAnimationFrame(function(){Ce()}),v(fe),ee(pe)},ve=function(fe){fe.persist&&fe.persist();var pe=fe.target,Ce=fe.currentTarget;M.current=pe,V.current.focusTimeout=setTimeout(function(){var Ee=pe.selectionStart,Qe=pe.selectionEnd,De=pe.value;De===void 0&&(De="");var ke=L(De,Ee);ke!==Ee&&!(Ee===0&&Qe===De.length)&&D(pe,ke,De),m(Object.assign(Object.assign({},fe),{currentTarget:Ce}))},0)},ze=function(fe){M.current=null,clearTimeout(V.current.focusTimeout),clearTimeout(V.current.setCaretTimeout),b(fe)},yt=j&&qB()?"numeric":void 0,dt=Object.assign({inputMode:yt},w,{type:t,value:k,onChange:ne,onKeyDown:J,onMouseUp:ce,onFocus:ve,onBlur:ze});if(n==="text")return i?y.createElement(y.Fragment,null,i(k,w)||null):y.createElement("span",Object.assign({},w,{ref:o}),k);if(r){var Pt=r;return y.createElement(Pt,Object.assign({},dt,{ref:o}))}return y.createElement("input",Object.assign({},dt,{ref:o}))}function wv(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var o=t.suffix;o===void 0&&(o="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var c=ys(t),u=c.thousandSeparator,f=c.decimalSeparator,d=n!==0&&e.indexOf(".")!==-1||n&&r,h=Iu(e,a),g=h.beforeDecimal,v=h.afterDecimal,m=h.addNegation;return n!==void 0&&(v=gv(v,n,!!r)),u&&(g=HB(g,u,s)),i&&(g=i+g),o&&(v=v+o),m&&(g="-"+g),e=g+(d&&f||"")+v,e}function ys(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function r$(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),i&&!o&&t&&(e="-"+e),e}function i$(e,t){return new RegExp("(^-)|[0-9]|"+pv(e),"g")}function o$(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function a$(e,t,n){var r;t===void 0&&(t=QB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var s=n.decimalScale,c=t.from,u=t.to,f=u.start,d=u.end,h=ys(n),g=h.allowedDecimalSeparators,v=h.decimalSeparator,m=e[d]===v;if(yo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(d-f===1&&g.indexOf(e[f])!==-1){var b=s===0?"":v;e=e.substring(0,f)+b+e.substring(f+1,e.length)}var x=function(M,V,Y){var Z=!1,D=!1;o.startsWith("-")?Z=!1:M.startsWith("--")?(Z=!1,D=!0):a.startsWith("-")&&M.length===a.length?Z=!1:M[0]==="-"&&(Z=!0);var L=Z?1:0;return D&&(L=2),L&&(M=M.substring(L),V-=L,Y-=L),{value:M,start:V,end:Y,hasNegation:Z}},S=x(e,f,d),C=S.hasNegation;r=S,e=r.value,f=r.start,d=r.end;var I=x(t.lastValue,c.start,c.end),w=I.start,A=I.end,E=I.value,k=e.substring(f,d);e.length&&E.length&&(w>E.length-a.length||A<o.length)&&!(k&&a.startsWith(k))&&(e=E);var B=0;e.startsWith(o)?B+=o.length:f<o.length&&(B=f),e=e.substring(B),d-=B;var G=e.length,O=e.length-a.length;e.endsWith(a)?G=O:(d>O||d>e.length-a.length)&&(G=d),e=e.substring(0,G),e=r$(C?"-"+e:e,i),e=(e.match(i$(v))||[]).join("");var T=e.indexOf(v);e=e.replace(new RegExp(pv(v),"g"),function(M,V){return V===T?".":""});var N=Iu(e,i),H=N.beforeDecimal,j=N.afterDecimal,F=N.addNegation;return u.end-u.start<c.end-c.start&&H===""&&m&&!parseFloat(j)&&(e=F?"-":""),e}function s$(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";i.fill(!1,0,n.length+(o?1:0));var a=e.length;return i.fill(!1,a-r.length+1,a+1),i}function l$(e){var t=ys(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var o=e.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
2463
+ `]))),dO=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return be({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},su=function(t){var n=t.delay,r=t.offset;return ge.jsx("span",{css:ge.css({animation:"".concat(uO," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},fO=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=wn(t,nO);return ge.jsx("div",R({},ot(be(be({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ge.jsx(su,{delay:0,offset:r}),ge.jsx(su,{delay:160,offset:!0}),ge.jsx(su,{delay:320,offset:!r}))},hO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,c=o.spacing;return be({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},pO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return ge.jsx("div",R({ref:o},ot(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a,{"aria-disabled":r||void 0}),n)},gO=pO,mO=["data"],vO=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},bO=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,c=t.innerProps,u=t.label,f=t.theme,d=t.selectProps;return ge.jsx("div",R({},ot(t,"group",{group:!0}),c),ge.jsx(a,R({},s,{selectProps:d,theme:f,getStyles:i,getClassNames:o,cx:r}),u),ge.jsx("div",null,n))},yO=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return be({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},xO=function(t){var n=Pg(t);n.data;var r=wn(n,mO);return ge.jsx("div",R({},ot(t,"groupHeading",{"group-heading":!0}),r))},CO=bO,wO=["innerRef","isDisabled","isHidden","inputClassName"],SO=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return be(be({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},IO),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Ug={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},IO={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":be({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Ug)},AO=function(t){return be({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Ug)},TO=function(t){var n=t.cx,r=t.value,i=Pg(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,c=i.inputClassName,u=wn(i,wO);return ge.jsx("div",R({},ot(t,"input",{"input-container":!0}),{"data-value":r||""}),ge.jsx("input",R({className:n({input:!0},c),ref:o,style:AO(s),disabled:a},u)))},EO=TO,kO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return be({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},_O=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return be({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},PO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return be({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Vg=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",r,n)},DO=Vg,OO=Vg;function RO(e){var t=e.children,n=e.innerProps;return ge.jsx("div",R({role:"button"},n),t||ge.jsx(au,{size:14}))}var MO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,c=t.selectProps,u=r.Container,f=r.Label,d=r.Remove;return ge.jsx(u,{data:i,innerProps:be(be({},ot(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:c},ge.jsx(f,{data:i,innerProps:be({},ot(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ge.jsx(d,{data:i,innerProps:be(be({},ot(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:c}))},LO=MO,BO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,c=a.colors;return be({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?c.primary:i?c.primary25:"transparent",color:r?c.neutral20:o?c.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?c.primary:c.primary50}})},$O=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return ge.jsx("div",R({},ot(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},FO=$O,NO=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return be({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},zO=function(t){var n=t.children,r=t.innerProps;return ge.jsx("div",R({},ot(t,"placeholder",{placeholder:!0}),r),n)},jO=zO,UO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return be({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},VO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return ge.jsx("div",R({},ot(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},HO=VO,WO={ClearIndicator:sO,Control:gO,DropdownIndicator:oO,DownChevron:zg,CrossIcon:au,Group:CO,GroupHeading:xO,IndicatorsContainer:eO,IndicatorSeparator:cO,Input:EO,LoadingIndicator:fO,Menu:zD,MenuList:UD,MenuPortal:KD,LoadingMessage:GD,NoOptionsMessage:WD,MultiValue:LO,MultiValueContainer:DO,MultiValueLabel:OO,MultiValueRemove:RO,Option:FO,Placeholder:jO,SelectContainer:qD,SingleValue:HO,ValueContainer:XD},GO=function(t){return be(be({},WO),t.components)},Hg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function YO(e,t){return!!(e===t||Hg(e)&&Hg(t))}function KO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!YO(e[n],t[n]))return!1;return!0}function QO(e,t){t===void 0&&(t=KO);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}for(var qO={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},JO=function(t){return ge.jsx("span",R({css:qO},t))},Wg=JO,XO={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,a=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,c=t.isDisabled,u=t.isSelected,f=t.isAppleDevice,d=function(m,b){return m&&m.length?"".concat(m.indexOf(b)+1," of ").concat(m.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(d(s,r),".");if(n==="menu"&&f){var h=c?" disabled":"",g="".concat(u?" selected":"").concat(h);return"".concat(a).concat(g,", ").concat(d(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},ZO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,c=t.selectProps,u=t.id,f=t.isAppleDevice,d=c.ariaLiveMessages,h=c.getOptionLabel,g=c.inputValue,v=c.isMulti,m=c.isOptionDisabled,b=c.isSearchable,x=c.menuIsOpen,S=c.options,C=c.screenReaderStatus,I=c.tabSelectsValue,w=c.isLoading,A=c["aria-label"],E=c["aria-live"],k=y.useMemo(function(){return be(be({},XO),d||{})},[d]),$=y.useMemo(function(){var j="";if(n&&k.onChange){var F=n.option,M=n.options,V=n.removedValue,Y=n.removedValues,Z=n.value,D=function(ee){return Array.isArray(ee)?null:ee},L=V||F||D(Z),U=L?h(L):"",W=M||Y||void 0,ie=W?W.map(h):[],le=be({isDisabled:L&&m(L,s),label:U,labels:ie},n);j=k.onChange(le)}return j},[n,k,m,s,h]),G=y.useMemo(function(){var j="",F=r||i,M=!!(r&&s&&s.includes(r));if(F&&k.onFocus){var V={focused:F,label:h(F),isDisabled:m(F,s),isSelected:M,options:o,context:F===r?"menu":"value",selectValue:s,isAppleDevice:f};j=k.onFocus(V)}return j},[r,i,h,m,k,o,s,f]),O=y.useMemo(function(){var j="";if(x&&S.length&&!w&&k.onFilter){var F=C({count:o.length});j=k.onFilter({inputValue:g,resultsMessage:F})}return j},[o,g,x,k,S,C,w]),T=(n==null?void 0:n.action)==="initial-input-focus",N=y.useMemo(function(){var j="";if(k.guidance){var F=i?"value":x?"menu":"input";j=k.guidance({"aria-label":A,context:F,isDisabled:r&&m(r,s),isMulti:v,isSearchable:b,tabSelectsValue:I,isInitialFocus:T})}return j},[A,r,i,v,m,b,x,k,s,I,T]),H=ge.jsx(y.Fragment,null,ge.jsx("span",{id:"aria-selection"},$),ge.jsx("span",{id:"aria-focused"},G),ge.jsx("span",{id:"aria-results"},O),ge.jsx("span",{id:"aria-guidance"},N));return ge.jsx(y.Fragment,null,ge.jsx(Wg,{id:u},T&&H),ge.jsx(Wg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&H))},eR=ZO,lu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],tR=new RegExp("["+lu.map(function(e){return e.letters}).join("")+"]","g"),Gg={},cu=0;cu<lu.length;cu++)for(var uu=lu[cu],du=0;du<uu.letters.length;du++)Gg[uu.letters[du]]=uu.base;var Yg=function(t){return t.replace(tR,function(n){return Gg[n]})},nR=QO(Yg),Kg=function(t){return t.replace(/^\s+|\s+$/g,"")},rR=function(t){return"".concat(t.label," ").concat(t.value)},iR=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=be({ignoreCase:!0,ignoreAccents:!0,stringify:rR,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,s=i.stringify,c=i.trim,u=i.matchFrom,f=c?Kg(r):r,d=c?Kg(s(n)):s(n);return o&&(f=f.toLowerCase(),d=d.toLowerCase()),a&&(f=nR(f),d=Yg(d)),u==="start"?d.substr(0,f.length)===f:d.indexOf(f)>-1}},oR=["innerRef"];function aR(e){var t=e.innerRef,n=wn(e,oR),r=OD(n,"onExited","in","enter","exit","appear");return ge.jsx("input",R({ref:t},r,{css:ge.css({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var sR=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function lR(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=y.useRef(!1),s=y.useRef(!1),c=y.useRef(0),u=y.useRef(null),f=y.useCallback(function(b,x){if(u.current!==null){var S=u.current,C=S.scrollTop,I=S.scrollHeight,w=S.clientHeight,A=u.current,E=x>0,k=I-w-C,$=!1;k>x&&a.current&&(r&&r(b),a.current=!1),E&&s.current&&(o&&o(b),s.current=!1),E&&x>k?(n&&!a.current&&n(b),A.scrollTop=I,$=!0,a.current=!0):!E&&-x>C&&(i&&!s.current&&i(b),A.scrollTop=0,$=!0,s.current=!0),$&&sR(b)}},[n,r,i,o]),d=y.useCallback(function(b){f(b,b.deltaY)},[f]),h=y.useCallback(function(b){c.current=b.changedTouches[0].clientY},[]),g=y.useCallback(function(b){var x=c.current-b.changedTouches[0].clientY;f(b,x)},[f]),v=y.useCallback(function(b){if(b){var x=_D?{passive:!1}:!1;b.addEventListener("wheel",d,x),b.addEventListener("touchstart",h,x),b.addEventListener("touchmove",g,x)}},[g,h,d]),m=y.useCallback(function(b){b&&(b.removeEventListener("wheel",d,!1),b.removeEventListener("touchstart",h,!1),b.removeEventListener("touchmove",g,!1))},[g,h,d]);return y.useEffect(function(){if(t){var b=u.current;return v(b),function(){m(b)}}},[t,v,m]),function(b){u.current=b}}var Qg=["boxSizing","height","overflow","paddingRight","position"],qg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Jg(e){e.preventDefault()}function Xg(e){e.stopPropagation()}function Zg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function em(){return"ontouchstart"in window||navigator.maxTouchPoints}var tm=!!(typeof window!="undefined"&&window.document&&window.document.createElement),go=0,ui={capture:!1,passive:!1};function cR(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=y.useRef({}),o=y.useRef(null),a=y.useCallback(function(c){if(tm){var u=document.body,f=u&&u.style;if(r&&Qg.forEach(function(v){var m=f&&f[v];i.current[v]=m}),r&&go<1){var d=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,g=window.innerWidth-h+d||0;Object.keys(qg).forEach(function(v){var m=qg[v];f&&(f[v]=m)}),f&&(f.paddingRight="".concat(g,"px"))}u&&em()&&(u.addEventListener("touchmove",Jg,ui),c&&(c.addEventListener("touchstart",Zg,ui),c.addEventListener("touchmove",Xg,ui))),go+=1}},[r]),s=y.useCallback(function(c){if(tm){var u=document.body,f=u&&u.style;go=Math.max(go-1,0),r&&go<1&&Qg.forEach(function(d){var h=i.current[d];f&&(f[d]=h)}),u&&em()&&(u.removeEventListener("touchmove",Jg,ui),c&&(c.removeEventListener("touchstart",Zg,ui),c.removeEventListener("touchmove",Xg,ui)))}},[r]);return y.useEffect(function(){if(t){var c=o.current;return a(c),function(){s(c)}}},[t,a,s]),function(c){o.current=c}}var uR=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},dR={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function fR(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,c=e.onTopLeave,u=lR({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:c}),f=cR({isEnabled:n}),d=function(g){u(g),f(g)};return ge.jsx(y.Fragment,null,n&&ge.jsx("div",{onClick:uR,css:dR}),t(d))}var hR={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},pR=function(t){var n=t.name,r=t.onFocus;return ge.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:hR,value:"",onChange:function(){}})},gR=pR;function fu(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function mR(){return fu(/^iPhone/i)}function nm(){return fu(/^Mac/i)}function vR(){return fu(/^iPad/i)||nm()&&navigator.maxTouchPoints>1}function bR(){return mR()||vR()}function yR(){return nm()||bR()}var xR=function(t){return t.label},rm=function(t){return t.label},im=function(t){return t.value},CR=function(t){return!!t.isDisabled},wR={clearIndicator:aO,container:QD,control:hO,dropdownIndicator:iO,group:vO,groupHeading:yO,indicatorsContainer:ZD,indicatorSeparator:lO,input:SO,loadingIndicator:dO,loadingMessage:HD,menu:$D,menuList:jD,menuPortal:YD,multiValue:kO,multiValueLabel:_O,multiValueRemove:PO,noOptionsMessage:VD,option:BO,placeholder:NO,singleValue:UO,valueContainer:JD},SR={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},IR=4,om=4,AR=38,TR=om*2,ER={baseUnit:om,controlHeight:AR,menuGutter:TR},hu={borderRadius:IR,colors:SR,spacing:ER},kR={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Rg(),captureMenuScroll:!Rg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:iR(),formatGroupLabel:xR,getOptionLabel:rm,getOptionValue:im,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:CR,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!ED(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function am(e,t,n,r){var i=dm(e,t,n),o=fm(e,t,n),a=um(e,t),s=vs(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function ms(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return am(e,a,t,s)}).filter(function(a){return cm(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=am(e,n,t,r);return cm(e,o)?o:void 0}).filter(PD)}function sm(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ci(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function lm(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ci(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function _R(e,t){return sm(ms(e,t))}function cm(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!pm(e)||!o)&&hm(e,{label:a,value:s,data:i},r)}function PR(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function DR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var pu=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},um=function(t,n){return t.getOptionLabel(n)},vs=function(t,n){return t.getOptionValue(n)};function dm(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function fm(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=vs(e,t);return n.some(function(i){return vs(e,i)===r})}function hm(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var pm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},OR=1,gm=function(e){cD(n,e);var t=fD(n);function n(r){var i;if(sD(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=yR(),i.controlRef=null,i.getControlRef=function(c){i.controlRef=c},i.focusedOptionRef=null,i.getFocusedOptionRef=function(c){i.focusedOptionRef=c},i.menuListRef=null,i.getMenuListRef=function(c){i.menuListRef=c},i.inputRef=null,i.getInputRef=function(c){i.inputRef=c},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(c,u){var f=i.props,d=f.onChange,h=f.name;u.name=h,i.ariaOnChange(c,u),d(c,u)},i.setValue=function(c,u,f){var d=i.props,h=d.closeMenuOnSelect,g=d.isMulti,v=d.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:v}),h&&(i.setState({inputIsHiddenAfterUpdate:!g}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(c,{action:u,option:f})},i.selectOption=function(c){var u=i.props,f=u.blurInputOnSelect,d=u.isMulti,h=u.name,g=i.state.selectValue,v=d&&i.isOptionSelected(c,g),m=i.isOptionDisabled(c,g);if(v){var b=i.getOptionValue(c);i.setValue(g.filter(function(x){return i.getOptionValue(x)!==b}),"deselect-option",c)}else if(!m)d?i.setValue([].concat(ci(g),[c]),"select-option",c):i.setValue(c,"select-option");else{i.ariaOnChange(c,{action:"select-option",option:c,name:h});return}f&&i.blurInput()},i.removeValue=function(c){var u=i.props.isMulti,f=i.state.selectValue,d=i.getOptionValue(c),h=f.filter(function(v){return i.getOptionValue(v)!==d}),g=po(u,h,h[0]||null);i.onChange(g,{action:"remove-value",removedValue:c}),i.focusInput()},i.clearValue=function(){var c=i.state.selectValue;i.onChange(po(i.props.isMulti,[],null),{action:"clear",removedValues:c})},i.popValue=function(){var c=i.props.isMulti,u=i.state.selectValue,f=u[u.length-1],d=u.slice(0,u.length-1),h=po(c,d,d[0]||null);i.onChange(h,{action:"pop-value",removedValue:f})},i.getFocusedOptionId=function(c){return pu(i.state.focusableOptionsWithIds,c)},i.getFocusableOptionsWithIds=function(){return lm(ms(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var c=arguments.length,u=new Array(c),f=0;f<c;f++)u[f]=arguments[f];return wD.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(c){return um(i.props,c)},i.getOptionValue=function(c){return vs(i.props,c)},i.getStyles=function(c,u){var f=i.props.unstyled,d=wR[c](u,f);d.boxSizing="border-box";var h=i.props.styles[c];return h?h(d,u):d},i.getClassNames=function(c,u){var f,d;return(f=(d=i.props.classNames)[c])===null||f===void 0?void 0:f.call(d,u)},i.getElementId=function(c){return"".concat(i.state.instancePrefix,"-").concat(c)},i.getComponents=function(){return GO(i.props)},i.buildCategorizedOptions=function(){return ms(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return sm(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(c,u){i.setState({ariaSelection:be({value:c},u)})},i.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(c){i.blockOptionHover=!1},i.onControlMouseDown=function(c){if(!c.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},i.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!i.props.isDisabled){var u=i.props,f=u.isMulti,d=u.menuIsOpen;i.focusInput(),d?(i.setState({inputIsHiddenAfterUpdate:!f}),i.onMenuClose()):i.openMenu("first"),c.preventDefault()}},i.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(i.clearValue(),c.preventDefault(),i.openAfterFocus=!1,c.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(c){typeof i.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&fs(c.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(c)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(c){var u=c.touches,f=u&&u.item(0);f&&(i.initialTouchX=f.clientX,i.initialTouchY=f.clientY,i.userIsDragging=!1)},i.onTouchMove=function(c){var u=c.touches,f=u&&u.item(0);if(f){var d=Math.abs(f.clientX-i.initialTouchX),h=Math.abs(f.clientY-i.initialTouchY),g=5;i.userIsDragging=d>g||h>g}},i.onTouchEnd=function(c){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(c.target)&&i.menuListRef&&!i.menuListRef.contains(c.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(c){i.userIsDragging||i.onControlMouseDown(c)},i.onClearIndicatorTouchEnd=function(c){i.userIsDragging||i.onClearIndicatorMouseDown(c)},i.onDropdownIndicatorTouchEnd=function(c){i.userIsDragging||i.onDropdownIndicatorMouseDown(c)},i.handleInputChange=function(c){var u=i.props.inputValue,f=c.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(f,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(c){i.props.onFocus&&i.props.onFocus(c),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(c){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(c),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(c){if(!(i.blockOptionHover||i.state.focusedOption===c)){var u=i.getFocusableOptions(),f=u.indexOf(c);i.setState({focusedOption:c,focusedOptionId:f>-1?i.getFocusedOptionId(c):null})}},i.shouldHideSelectedOptions=function(){return pm(i.props)},i.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),i.focus()},i.onKeyDown=function(c){var u=i.props,f=u.isMulti,d=u.backspaceRemovesValue,h=u.escapeClearsValue,g=u.inputValue,v=u.isClearable,m=u.isDisabled,b=u.menuIsOpen,x=u.onKeyDown,S=u.tabSelectsValue,C=u.openMenuOnFocus,I=i.state,w=I.focusedOption,A=I.focusedValue,E=I.selectValue;if(!m&&!(typeof x=="function"&&(x(c),c.defaultPrevented))){switch(i.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||g)return;i.focusValue("previous");break;case"ArrowRight":if(!f||g)return;i.focusValue("next");break;case"Delete":case"Backspace":if(g)return;if(A)i.removeValue(A);else{if(!d)return;f?i.popValue():v&&i.clearValue()}break;case"Tab":if(i.isComposing||c.shiftKey||!b||!S||!w||C&&i.isOptionSelected(w,E))return;i.selectOption(w);break;case"Enter":if(c.keyCode===229)break;if(b){if(!w||i.isComposing)return;i.selectOption(w);break}return;case"Escape":b?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:g}),i.onMenuClose()):v&&h&&i.clearValue();break;case" ":if(g)return;if(!b){i.openMenu("first");break}if(!w)return;i.selectOption(w);break;case"ArrowUp":b?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":b?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!b)return;i.focusOption("pageup");break;case"PageDown":if(!b)return;i.focusOption("pagedown");break;case"Home":if(!b)return;i.focusOption("first");break;case"End":if(!b)return;i.focusOption("last");break;default:return}c.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++OR),i.state.selectValue=ds(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),s=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[s],i.state.focusedOptionId=pu(o,a[s])}return i}return lD(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Og(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,c=this.state.isFocused;(c&&!a&&i.isDisabled||c&&s&&!i.menuIsOpen)&&this.focusInput(),c&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Og(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,c=a.isFocused,u=this.buildFocusableOptions(),f=i==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(s[0]);d>-1&&(f=d)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[f],focusedOptionId:this.getFocusedOptionId(u[f])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(s);s||(c=-1);var u=a.length-1,f=-1;if(a.length){switch(i){case"previous":c===0?f=0:c===-1?f=u:f=c-1;break;case"next":c>-1&&c<u&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var c=0,u=s.indexOf(a);a||(u=-1),i==="up"?c=u>0?u-1:s.length-1:i==="down"?c=(u+1)%s.length:i==="pageup"?(c=u-o,c<0&&(c=0)):i==="pagedown"?(c=u+o,c>s.length-1&&(c=s.length-1)):i==="last"&&(c=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(hu):be(be({},hu),this.props.theme):hu}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,c=this.getValue,u=this.selectOption,f=this.setValue,d=this.props,h=d.isMulti,g=d.isRtl,v=d.options,m=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:c,hasValue:m,isMulti:h,isRtl:g,options:v,selectOption:u,selectProps:d,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return dm(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return fm(this.props,i,o)}},{key:"filterOption",value:function(i,o){return hm(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,c=i.inputValue,u=i.tabIndex,f=i.form,d=i.menuIsOpen,h=i.required,g=this.getComponents(),v=g.Input,m=this.state,b=m.inputIsHidden,x=m.ariaSelection,S=this.commonProps,C=s||this.getElementId("input"),I=be(be(be({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?K.createElement(v,R({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:o,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:f,type:"text",value:c},I)):K.createElement(aR,R({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:us,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:f,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,c=o.MultiValueLabel,u=o.MultiValueRemove,f=o.SingleValue,d=o.Placeholder,h=this.commonProps,g=this.props,v=g.controlShouldRenderValue,m=g.isDisabled,b=g.isMulti,x=g.inputValue,S=g.placeholder,C=this.state,I=C.selectValue,w=C.focusedValue,A=C.isFocused;if(!this.hasValue()||!v)return x?null:K.createElement(d,R({},h,{key:"placeholder",isDisabled:m,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),S);if(b)return I.map(function(k,$){var G=k===w,O="".concat(i.getOptionLabel(k),"-").concat(i.getOptionValue(k));return K.createElement(a,R({},h,{components:{Container:s,Label:c,Remove:u},isFocused:G,isDisabled:m,key:O,index:$,removeProps:{onClick:function(){return i.removeValue(k)},onTouchEnd:function(){return i.removeValue(k)},onMouseDown:function(N){N.preventDefault()}},data:k}),i.formatOptionLabel(k,"value"))});if(x)return null;var E=I[0];return K.createElement(f,R({},h,{data:E,isDisabled:m}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,c=s.isDisabled,u=s.isLoading,f=this.state.isFocused;if(!this.isClearable()||!o||c||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return K.createElement(o,R({},a,{innerProps:d,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,c=s.isDisabled,u=s.isLoading,f=this.state.isFocused;if(!o||!u)return null;var d={"aria-hidden":"true"};return K.createElement(o,R({},a,{innerProps:d,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,c=this.props.isDisabled,u=this.state.isFocused;return K.createElement(a,R({},s,{isDisabled:c,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,c=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return K.createElement(o,R({},a,{innerProps:u,isDisabled:s,isFocused:c}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,c=o.Menu,u=o.MenuList,f=o.MenuPortal,d=o.LoadingMessage,h=o.NoOptionsMessage,g=o.Option,v=this.commonProps,m=this.state.focusedOption,b=this.props,x=b.captureMenuScroll,S=b.inputValue,C=b.isLoading,I=b.loadingMessage,w=b.minMenuHeight,A=b.maxMenuHeight,E=b.menuIsOpen,k=b.menuPlacement,$=b.menuPosition,G=b.menuPortalTarget,O=b.menuShouldBlockScroll,T=b.menuShouldScrollIntoView,N=b.noOptionsMessage,H=b.onMenuScrollToTop,j=b.onMenuScrollToBottom;if(!E)return null;var F=function(U,W){var ie=U.type,le=U.data,ae=U.isDisabled,ee=U.isSelected,ne=U.label,J=U.value,ce=m===le,ve=ae?void 0:function(){return i.onOptionHover(le)},ze=ae?void 0:function(){return i.selectOption(le)},yt="".concat(i.getElementId("option"),"-").concat(W),dt={id:yt,onClick:ze,onMouseMove:ve,onMouseOver:ve,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:ee};return K.createElement(g,R({},v,{innerProps:dt,data:le,isDisabled:ae,isSelected:ee,key:yt,label:ne,type:ie,value:J,isFocused:ce,innerRef:ce?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(U.data,"menu"))},M;if(this.hasOptions())M=this.getCategorizedOptions().map(function(L){if(L.type==="group"){var U=L.data,W=L.options,ie=L.index,le="".concat(i.getElementId("group"),"-").concat(ie),ae="".concat(le,"-heading");return K.createElement(a,R({},v,{key:le,data:U,options:W,Heading:s,headingProps:{id:ae,data:L.data},label:i.formatGroupLabel(L.data)}),L.options.map(function(ee){return F(ee,"".concat(ie,"-").concat(ee.index))}))}else if(L.type==="option")return F(L,"".concat(L.index))});else if(C){var V=I({inputValue:S});if(V===null)return null;M=K.createElement(d,v,V)}else{var Y=N({inputValue:S});if(Y===null)return null;M=K.createElement(h,v,Y)}var Z={minMenuHeight:w,maxMenuHeight:A,menuPlacement:k,menuPosition:$,menuShouldScrollIntoView:T},D=K.createElement(FD,R({},v,Z),function(L){var U=L.ref,W=L.placerProps,ie=W.placement,le=W.maxHeight;return K.createElement(c,R({},v,Z,{innerRef:U,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:C,placement:ie}),K.createElement(fR,{captureEnabled:x,onTopArrive:H,onBottomArrive:j,lockEnabled:O},function(ae){return K.createElement(u,R({},v,{innerRef:function(ne){i.getMenuListRef(ne),ae(ne)},innerProps:{role:"listbox","aria-multiselectable":v.isMulti,id:i.getElementId("listbox")},isLoading:C,maxHeight:le,focusedOption:m}),M)}))});return G||$==="fixed"?K.createElement(f,R({},v,{appendTo:G,controlElement:this.controlRef,menuPlacement:k,menuPosition:$}),D):D}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,c=o.isMulti,u=o.name,f=o.required,d=this.state.selectValue;if(f&&!this.hasValue()&&!s)return K.createElement(gR,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(c)if(a){var h=d.map(function(m){return i.getOptionValue(m)}).join(a);return K.createElement("input",{name:u,type:"hidden",value:h})}else{var g=d.length>0?d.map(function(m,b){return K.createElement("input",{key:"i-".concat(b),name:u,type:"hidden",value:i.getOptionValue(m)})}):K.createElement("input",{name:u,type:"hidden",value:""});return K.createElement("div",null,g)}else{var v=d[0]?this.getOptionValue(d[0]):"";return K.createElement("input",{name:u,type:"hidden",value:v})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,c=o.focusedValue,u=o.isFocused,f=o.selectValue,d=this.getFocusableOptions();return K.createElement(eR,R({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:c,isFocused:u,selectValue:f,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,c=i.ValueContainer,u=this.props,f=u.className,d=u.id,h=u.isDisabled,g=u.menuIsOpen,v=this.state.isFocused,m=this.commonProps=this.getCommonProps();return K.createElement(s,R({},m,{className:f,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:v}),this.renderLiveRegion(),K.createElement(o,R({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:v,menuIsOpen:g}),K.createElement(c,R({},m,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),K.createElement(a,R({},m,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,c=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,f=o.isFocused,d=o.prevWasFocused,h=o.instancePrefix,g=i.options,v=i.value,m=i.menuIsOpen,b=i.inputValue,x=i.isMulti,S=ds(v),C={};if(a&&(v!==a.value||g!==a.options||m!==a.menuIsOpen||b!==a.inputValue)){var I=m?_R(i,S):[],w=m?lm(ms(i,S),"".concat(h,"-option")):[],A=s?PR(o,S):null,E=DR(o,I),k=pu(w,E);C={selectValue:S,focusedOption:E,focusedOptionId:k,focusableOptionsWithIds:w,focusedValue:A,clearFocusValueOnUpdate:!1}}var $=c!=null&&i!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},G=u,O=f&&d;return f&&!O&&(G={value:po(x,S,S[0]||null),options:S,action:"initial-input-focus"},O=!d),(u==null?void 0:u.action)==="initial-input-focus"&&(G=null),be(be(be({},C),$),{},{prevProps:i,ariaSelection:G,prevWasFocused:O})}}]),n}(y.Component);gm.defaultProps=kR;var RR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function MR(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,a=o===void 0?null:o,s=e.inputValue,c=e.menuIsOpen,u=e.onChange,f=e.onInputChange,d=e.onMenuClose,h=e.onMenuOpen,g=e.value,v=wn(e,RR),m=y.useState(s!==void 0?s:n),b=Hn(m,2),x=b[0],S=b[1],C=y.useState(c!==void 0?c:i),I=Hn(C,2),w=I[0],A=I[1],E=y.useState(g!==void 0?g:a),k=Hn(E,2),$=k[0],G=k[1],O=y.useCallback(function(V,Y){typeof u=="function"&&u(V,Y),G(V)},[u]),T=y.useCallback(function(V,Y){var Z;typeof f=="function"&&(Z=f(V,Y)),S(Z!==void 0?Z:V)},[f]),N=y.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),H=y.useCallback(function(){typeof d=="function"&&d(),A(!1)},[d]),j=s!==void 0?s:x,F=c!==void 0?c:w,M=g!==void 0?g:$;return be(be({},v),{},{inputValue:j,menuIsOpen:F,onChange:O,onInputChange:T,onMenuClose:H,onMenuOpen:N,value:M})}var LR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],mm=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return o===i||a===i},gu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return mm(t,o,i)})||r.some(function(o){return mm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function BR(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,a=o===void 0?gu.formatCreateLabel:o,s=e.isValidNewOption,c=s===void 0?gu.isValidNewOption:s,u=e.getNewOptionData,f=u===void 0?gu.getNewOptionData:u,d=e.onCreateOption,h=e.options,g=h===void 0?[]:h,v=e.onChange,m=wn(e,LR),b=m.getOptionValue,x=b===void 0?im:b,S=m.getOptionLabel,C=S===void 0?rm:S,I=m.inputValue,w=m.isLoading,A=m.isMulti,E=m.value,k=m.name,$=y.useMemo(function(){return c(I,ds(E),g,{getOptionValue:x,getOptionLabel:C})?f(I,a(I)):void 0},[a,f,C,x,I,c,g,E]),G=y.useMemo(function(){return(n||!w)&&$?i==="first"?[$].concat(ci(g)):[].concat(ci(g),[$]):g},[n,i,w,$,g]),O=y.useCallback(function(T,N){if(N.action!=="select-option")return v(T,N);var H=Array.isArray(T)?T:[T];if(H[H.length-1]===$){if(d)d(I);else{var j=f(I,I),F={action:"create-option",name:k,option:j};v(po(A,[].concat(ci(ds(E)),[j]),j),F)}return}v(T,N)},[f,I,A,k,$,d,v,E]);return be(be({},m),{},{options:G,onChange:O})}var $R=y.forwardRef(function(e,t){var n=MR(e),r=BR(n);return K.createElement(gm,R({ref:t},r))}),vm=$R;const FR={control:(e,t)=>q(B({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px",fontFamily:'var(--joy-fontFamily-body, "Inter", var(--joy-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"));',"&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(B({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(B({},e),{minHeight:"36px"}),menu:e=>q(B({},e),{position:"relative"}),clearIndicator:e=>q(B({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(B({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(B({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(B({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>q(B({},e),{color:"#333"})},NR=e=>e.map(t=>({label:t,value:t})),zR=e=>{const[t,n]=y.useState(""),[r,i]=y.useState(!1),o=e.sx||{marginBottom:"16px"},a=NR(e.flags),s=()=>i(!r),c=h=>{e.onChange(h.map(g=>g.value))},u=h=>{n(h)},f=h=>{h.persist();const{key:g}=h;if(t)switch(g){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const v=[...e.flags,t];e.onChange(v)}if(e.flags&&e.flags.length>0&&d()){const v=[...e.flags,t];e.onChange(v)}n(""),h.preventDefault()}},d=()=>{let h=!1;return e.flags.length&&e.flags.includes(t)?(s(),h):(h=!0,h)};return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:o,children:l.jsx(vm,{styles:FR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:c,onInputChange:u,onKeyDown:f,placeholder:e.labels.flagsPlaceholder,value:a})}),l.jsx(Ke,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:s})]})},mo=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(!1),[o,a]=y.useState(!1),[s,c]=y.useState(!1),[u,f]=y.useState(""),[d,h]=y.useState("primary"),[g,v]=y.useState(""),m=y.useRef(null),b=()=>{m.current&&m.current.click()},x=new Vp,S=Ye(),C=()=>{f(""),i(!1)},I=N=>{let H="",j="primary";switch(N){case"copy_url":H=e.labels.urlCopiedToClipboardMessage,j="primary";break;case"image_deleted":H=e.labels.imageDeletedMessage,j="primary";break;case"image_reset":H=e.labels.imageResetMessage,j="primary";break;case"upload_success":H=e.labels.uploadingImageMessage,j="success";break;case"upload_failed":H=e.labels.uploadingImageErrorMessage,j="danger";break;case"sign_in_url_failed":H=e.labels.generateSignedInUrlErrorMessage,j="danger";break;case"encrypting_file_failed":H=e.labels.encryptingImageErrorMessage,j="danger";break}h(j),f(H),i(!0)},w=()=>a(!o),A=()=>c(!s),E=()=>{e.clearImage(),I("image_deleted")},k=N=>{navigator.clipboard.writeText(N),I("copy_url")},$=N=>_(this,null,function*(){N.persist();const H=N.target.files?N.target.files[0]:null;if(H){n(!0);try{const j=H.type.split("/")[1],F=yield x.readFileAndHash(H),M=(yield x.generateHashFileName(H))+"."+j,V={image_type:j,image_file_name:M,image_size:H.size,base64_sum:F},Y=yield S==null?void 0:S.https.generateSignedInUrl(V);if(Y!=null&&Y.ok){const Z=yield Y.json(),D={"Content-Type":H.type,"Content-MD5":F};try{const L=new File([H],M,{type:H.type}),U=yield S==null?void 0:S.https.storeInBucket(Z.data.signed_url,L,D);e.onChangeImages(U||""),v(U),I("upload_success")}catch(L){console.error("There was a problem with uploading the file: ",L),I("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield Y==null?void 0:Y.json()),I("sign_in_url_failed")}catch(j){console.error("There was a problem with encrypting file...",j),I("encrypting_file_failed")}n(!1)}}),G=N=>_(this,null,function*(){if(N){n(!0);try{const H=N.type.split("/")[1],j=yield x.readFileAndHash(N),F=(yield x.generateHashFileName(N))+"."+H,M={image_type:H,image_file_name:F,image_size:N.size,base64_sum:j},V=yield S==null?void 0:S.https.generateSignedInUrl(M);if(V!=null&&V.ok){const Y=yield V.json(),Z={"Content-Type":N.type,"Content-MD5":j};try{const D=new File([N],F,{type:N.type}),L=yield S==null?void 0:S.https.storeInBucket(Y.data.signed_url,D,Z);e.onChangeImages(L||""),I("upload_success")}catch(D){console.error("There was a problem with uploading the file: ",D),I("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield V==null?void 0:V.json()),I("sign_in_url_failed")}catch(H){console.error("There was a problem with encrypting file...",H),I("encrypting_file_failed")}n(!1)}}),O=()=>{e.onChangeImages(g),I("image_reset")},T=N=>{e.onChangeImages(N),v(N)};return l.jsxs(l.Fragment,{children:[l.jsxs(p.Card,{sx:{marginBottom:"10px"},children:[l.jsxs(p.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[l.jsx(p.Typography,{level:"title-lg",children:e.title}),l.jsx(p.Tooltip,{title:e.labels.clearImage,children:l.jsx(p.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:l.jsx(Dp,{})})})]}),l.jsxs(p.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[l.jsxs(p.Skeleton,{loading:t,animation:"wave",children:[e.image?l.jsx(p.Box,{component:"img",src:e.image,loading:"lazy",alt:e.title,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):l.jsx($c,{sx:{fontSize:"3rem",opacity:.2}}),e.image?l.jsx(p.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:l.jsx(Wp,{sx:{fontSize:"3rem",color:"#fff"}})}):l.jsx(l.Fragment,{})]}),l.jsx(p.Tooltip,{title:e.labels.copyUrl,children:l.jsx(p.Button,{onClick:()=>k(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:l.jsx(Oe.ContentCopy,{})})}),l.jsx(p.Tooltip,{title:e.labels.viewImage,children:l.jsx(p.Button,{onClick:w,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:l.jsx(Yp,{})})}),l.jsx(p.Tooltip,{title:e.labels.cropImage,children:l.jsx(p.Button,{onClick:A,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:l.jsx(dg,{})})})]}),l.jsx(p.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:l.jsxs(p.Button,{sx:{width:"100%"},onClick:b,children:[l.jsx(Oe.Upload,{})," ",e.labels.uploadImage,l.jsx(Kp,{type:"file",accept:"image/*",onChange:$,ref:m})]})}),S.https.sportal365Config?l.jsx(p.AccordionGroup,{variant:"soft",children:l.jsxs(p.Accordion,{children:[l.jsx(p.AccordionSummary,{children:l.jsx(p.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),l.jsx(p.AccordionDetails,{children:l.jsx(Gp,{labels:e.labels,onChangeImages:T})})]})}):l.jsx(l.Fragment,{})]}),l.jsx(Ke,{showToast:r,message:u,color:d,hideToast:C}),l.jsx(Hp,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:w}),l.jsx(ug,{labels:e.labels,open:s,imageSrc:e.image,toggleModal:A,uploadImage:G,resetDefaultImageUrl:O})]})},jR=["cover","mobile"],UR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),VR=e=>e?B({},e):{main:"",mobile:"",cover:""},HR=e=>{const[t,n]=y.useState(!1),r=VR(e.defaultValue),i=UR(e.labels),o=(s,c)=>{r[c]=s,e.onChange(r)},a=s=>{r[s]="",e.onChange(r)};return l.jsxs(p.Box,{sx:{marginBottom:"10px"},children:[l.jsx(mo,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:s=>o(s,"main"),clearImage:()=>a("main")}),l.jsx(p.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?l.jsx(l.Fragment,{children:jR.map(s=>l.jsx(mo,{labels:e.labels,title:i.get(s),image:r[s],onChangeImages:c=>o(c,s),clearImage:()=>a(s)},`images-${s}`))}):l.jsx(l.Fragment,{})]})};function WR(e){return lt("MuiSheet",e)}We("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const GR=["className","color","component","variant","invertedColors","slots","slotProps"],YR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${xe(t)}`,n&&`color${xe(n)}`]};return ht(r,WR,{})},KR=ye("div",{name:"JoySheet",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r;const i=(n=e.variants[t.variant])==null?void 0:n[t.color],{borderRadius:o,bgcolor:a,backgroundColor:s,background:c}=hc({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),u=rr(e,`palette.${a}`)||a||rr(e,`palette.${s}`)||s||c||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||e.vars.palette.background.surface;return[R({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":u==="transparent"?"initial":u,"--Sheet-background":u==="transparent"?"initial":u},o!==void 0&&{"--List-radius":`calc(${o} - var(--variant-borderWidth, 0px))`,"--unstable_actionRadius":`calc(${o} - var(--variant-borderWidth, 0px))`},{backgroundColor:e.vars.palette.background.surface,position:"relative"}),R({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&x_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&C_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),QR=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:s="plain",invertedColors:c=!1,slots:u={},slotProps:f={}}=r,d=Te(r,GR),h=R({},r,{color:o,component:a,invertedColors:c,variant:s}),g=YR(h),v=R({},d,{component:a,slots:u,slotProps:f}),[m,b]=Ae("root",{ref:n,className:$n(g.root,i),elementType:KR,externalForwardedProps:v,ownerState:h});return l.jsx(m,R({},b))});function qR(e){return lt("MuiTypography",e)}We("MuiTypography",["root","h1","h2","h3","h4","title-lg","title-md","title-sm","body-lg","body-md","body-sm","body-xs","noWrap","gutterBottom","startDecorator","endDecorator","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const JR=["color","textColor"],XR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],mu=K.createContext(!1),ZR=K.createContext(!1),eM=e=>{const{gutterBottom:t,noWrap:n,level:r,color:i,variant:o}=e,a={root:["root",r,t&&"gutterBottom",n&&"noWrap",i&&`color${xe(i)}`,o&&`variant${xe(o)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return ht(a,qR,{})},tM=ye("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),nM=ye("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),rM=ye("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return R({"--Icon-fontSize":`calc(1em * ${s})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:R({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&R({display:"flex",alignItems:"center"},t.nesting&&R({display:"inline-flex"},t.startDecorator&&{verticalAlign:"bottom"})),t.level&&t.level!=="inherit"&&e.typography[t.level],{fontSize:`var(--Typography-fontSize, ${t.level&&t.level!=="inherit"&&(r=(i=e.typography[t.level])==null?void 0:i.fontSize)!=null?r:"inherit"})`},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.color&&{color:`var(--variant-plainColor, rgba(${(o=e.vars.palette[t.color])==null?void 0:o.mainChannel} / 1))`},t.variant&&R({borderRadius:e.vars.radius.xs,paddingBlock:"min(0.1em, 4px)",paddingInline:"0.25em"},!t.nesting&&{marginInline:"-0.25em"},(a=e.variants[t.variant])==null?void 0:a[t.color]))}),bm={h1:"h1",h2:"h2",h3:"h3",h4:"h4","title-lg":"p","title-md":"p","title-sm":"p","body-lg":"p","body-md":"p","body-sm":"p","body-xs":"span",inherit:"p"},vu=K.forwardRef(function(t,n){var r;const i=pt({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,s=Te(i,JR),c=K.useContext(mu),u=K.useContext(ZR),f=u1(R({},s,{color:a})),{component:d,gutterBottom:h=!1,noWrap:g=!1,level:v="body-md",levelMapping:m=bm,children:b,endDecorator:x,startDecorator:S,variant:C,slots:I={},slotProps:w={}}=f,A=Te(f,XR),E=(r=t.color)!=null?r:C?o!=null?o:"neutral":o,k=c||u?t.level||"inherit":v,$=rh(b,["Skeleton"]),G=d||(c?"span":m[k]||bm[k]||"span"),O=R({},f,{level:k,component:G,color:E,gutterBottom:h,noWrap:g,nesting:c,variant:C,unstable_hasSkeleton:$}),T=eM(O),N=R({},A,{component:G,slots:I,slotProps:w}),[H,j]=Ae("root",{ref:n,className:T.root,elementType:rM,externalForwardedProps:N,ownerState:O}),[F,M]=Ae("startDecorator",{className:T.startDecorator,elementType:tM,externalForwardedProps:N,ownerState:O}),[V,Y]=Ae("endDecorator",{className:T.endDecorator,elementType:nM,externalForwardedProps:N,ownerState:O});return l.jsx(mu.Provider,{value:!0,children:l.jsxs(H,R({},j,{children:[S&&l.jsx(F,R({},M,{children:S})),$?K.cloneElement(b,{variant:b.props.variant||"inline"}):b,x&&l.jsx(V,R({},Y,{children:x}))]}))})});vu.muiName="Typography";function iM(e){return lt("MuiFormControl",e)}const ym=We("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),oM=We("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),aM=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],sM=e=>{const{disabled:t,error:n,size:r,color:i,orientation:o}=e,a={root:["root",o,t&&"disabled",n&&"error",i&&`color${xe(i)}`,r&&`size${xe(r)}`]};return ht(a,iM,{})},lM=ye("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return R({"--unstable_RadioGroup-margin":"0.5rem 0","--FormLabel-alignSelf":t.orientation==="horizontal"?"align-items":"flex-start","--FormLabel-asteriskColor":e.vars.palette.danger[500]},t.size==="sm"&&{"--FormLabel-fontSize":e.vars.fontSize.xs,"--FormLabel-lineHeight":e.vars.lineHeight.xl,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.5rem 0 0":"0 0 0.25rem 0","--FormHelperText-fontSize":e.vars.fontSize.xs,"--FormHelperText-lineHeight":e.vars.lineHeight.xl},t.size==="md"&&{"--FormLabel-fontSize":e.vars.fontSize.sm,"--FormLabel-lineHeight":e.vars.lineHeight.sm,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.75rem 0 0":"0 0 0.375rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.size==="lg"&&{"--FormLabel-fontSize":e.vars.fontSize.md,"--FormLabel-lineHeight":e.vars.lineHeight.md,"--FormLabel-margin":t.orientation==="horizontal"?"0 1rem 0 0":"0 0 0.5rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.color&&{"--FormHelperText-color":(n=e.vars.palette[t.color])==null?void 0:n[500]},{"--FormHelperText-margin":"0.375rem 0 0 0",[`&.${ym.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${ym.disabled}`]:{"--FormLabel-color":(r=e.variants.plainDisabled)==null||(r=r[t.color||"neutral"])==null?void 0:r.color,"--FormHelperText-color":(i=e.variants.plainDisabled)==null||(i=i[t.color||"neutral"])==null?void 0:i.color},display:"flex",position:"relative",flexDirection:t.orientation==="horizontal"?"row":"column"},t.orientation==="horizontal"&&{[`& > label ~ .${oM.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),bu=K.forwardRef(function(t,n){const r=pt({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:s=!1,required:c=!1,error:u=!1,color:f,size:d="md",orientation:h="vertical",slots:g={},slotProps:v={}}=r,m=Te(r,aM),b=qi(i),[x,S]=K.useState(null),C=R({},r,{id:b,component:a,color:f,disabled:s,error:u,required:c,size:d,orientation:h});let I;const w=sM(C),[A,E]=Ae("root",{ref:n,className:$n(w.root,o),elementType:lM,externalForwardedProps:R({},m,{component:a,slots:g,slotProps:v}),ownerState:C}),k=K.useMemo(()=>({disabled:s,required:c,error:u,color:f,size:d,htmlFor:b,labelId:`${b}-label`,"aria-describedby":x?`${b}-helper-text`:void 0,setHelperText:S,registerEffect:I}),[f,s,u,x,b,I,c,d]);return l.jsx(Ja.Provider,{value:k,children:l.jsx(A,R({},E))})});function cM(e){return lt("MuiFormLabel",e)}We("MuiFormLabel",["root","asterisk"]);const uM=["children","component","htmlFor","id","slots","slotProps"],dM=()=>ht({root:["root"],asterisk:["asterisk"]},cM,{}),fM=ye("label",{name:"JoyFormLabel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({"--Icon-fontSize":"calc(var(--FormLabel-lineHeight) * 1em)",WebkitTapHighlightColor:"transparent",alignSelf:"var(--FormLabel-alignSelf)",display:"flex",gap:"2px",alignItems:"center",flexWrap:"wrap",userSelect:"none",fontFamily:e.vars.fontFamily.body,fontSize:`var(--FormLabel-fontSize, ${e.vars.fontSize.sm})`,fontWeight:e.vars.fontWeight.md,lineHeight:`var(--FormLabel-lineHeight, ${e.vars.lineHeight.sm})`,color:`var(--FormLabel-color, ${e.vars.palette.text.primary})`,margin:"var(--FormLabel-margin, 0px)"})),hM=ye("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),yu=K.forwardRef(function(t,n){var r,i;const o=pt({props:t,name:"JoyFormLabel"}),{children:a,component:s="label",htmlFor:c,id:u,slots:f={},slotProps:d={}}=o,h=Te(o,uM),g=K.useContext(Ja),v=(r=(i=t.required)!=null?i:g==null?void 0:g.required)!=null?r:!1,m=R({},o,{required:v}),b=dM(),x=R({},h,{component:s,slots:f,slotProps:d}),[S,C]=Ae("root",{additionalProps:{htmlFor:c!=null?c:g==null?void 0:g.htmlFor,id:u!=null?u:g==null?void 0:g.labelId},ref:n,className:b.root,elementType:fM,externalForwardedProps:x,ownerState:m}),[I,w]=Ae("asterisk",{additionalProps:{"aria-hidden":!0},className:b.asterisk,elementType:hM,externalForwardedProps:x,ownerState:m});return l.jsxs(S,R({},C,{children:[a,v&&l.jsxs(I,R({},w,{children:[" ","*"]}))]}))}),pM=({environment:e,userNotFound:t})=>{const[n,r]=y.useState(""),[i,o]=y.useState(""),[a,s]=y.useState(!1),c=()=>{s(!a)},u=h=>{h.persist(),r(h.target.value)},f=h=>{h.persist(),o(h.target.value)},d=()=>_(this,null,function*(){try{yield Qi(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),c()}});return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsxs(QR,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[l.jsxs("div",{children:[l.jsx(vu,{level:"h4",component:"h1",children:l.jsx("b",{children:"Sign in"})}),l.jsx(vu,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),l.jsxs(bu,{children:[l.jsx(yu,{children:"Email"}),l.jsx(Xa,{name:"email",type:"email",onChange:u})]}),l.jsxs(bu,{children:[l.jsx(yu,{children:"Password"}),l.jsx(Xa,{name:"password",type:"password",onChange:f})]}),l.jsx(oi,{sx:{mt:1},onClick:d,children:"Log in"})]})}),l.jsx(Ke,{showToast:a,message:t,color:"danger",hideToast:c})]})};function gM(e){return lt("MuiCheckbox",e)}const di=We("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),mM=mc(l.jsx("path",{d:"M9 16.17 5.53 12.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L9 16.17z"}),"Check"),vM=mc(l.jsx("path",{d:"M19 13H5c-.55 0-1-.45-1-1s.45-1 1-1h14c.55 0 1 .45 1 1s-.45 1-1 1z"}),"HorizontalRule"),bM=["checked","uncheckedIcon","checkedIcon","label","defaultChecked","disabled","disableIcon","overlay","id","indeterminate","indeterminateIcon","name","onBlur","onChange","onFocus","onFocusVisible","readOnly","required","value","color","variant","size","component","slots","slotProps"],yM=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:s,indeterminate:c}=e,u={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${xe(a)}`,o&&`color${xe(o)}`,s&&`size${xe(s)}`],checkbox:["checkbox",t&&"checked",c&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return ht(u,gM,{})},xM=ye("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return R({"--Icon-fontSize":"var(--Checkbox-size)"},e.size==="sm"&&{"--Checkbox-size":"1rem","& ~ *":{"--FormHelperText-margin":"0 0 0 1.5rem"},fontSize:t.vars.fontSize.sm,gap:"var(--Checkbox-gap, 0.5rem)"},e.size==="md"&&{"--Checkbox-size":"1.25rem","& ~ *":{"--FormHelperText-margin":"0.25rem 0 0 1.875rem"},fontSize:t.vars.fontSize.md,gap:"var(--Checkbox-gap, 0.625rem)"},e.size==="lg"&&{"--Checkbox-size":"1.5rem","& ~ *":{"--FormHelperText-margin":"0.375rem 0 0 2.25rem"},fontSize:t.vars.fontSize.lg,gap:"var(--Checkbox-gap, 0.75rem)"},{position:e.overlay?"initial":"relative",display:"inline-flex",fontFamily:t.vars.fontFamily.body,lineHeight:"var(--Checkbox-size)",color:t.vars.palette.text.primary,[`&.${di.disabled}`]:{color:(n=t.variants.plainDisabled)==null||(n=n[e.color])==null?void 0:n.color}},e.disableIcon&&{color:(r=t.variants[e.variant])==null||(r=r[e.color])==null?void 0:r.color,[`&.${di.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),CM=ye("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[R({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,boxSizing:"border-box",borderRadius:`min(${e.vars.radius.sm}, 0.25rem)`,width:"var(--Checkbox-size)",height:"var(--Checkbox-size)",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0},t.disableIcon&&{display:"contents"},{[`&.${di.checked}, &.${di.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[R({},s,{backgroundColor:(r=s==null?void 0:s.backgroundColor)!=null?r:e.vars.palette.background.surface}),{"&:hover":{"@media (hover: hover)":(i=e.variants[`${t.variant}Hover`])==null?void 0:i[t.color]}},{"&:active":(o=e.variants[`${t.variant}Active`])==null?void 0:o[t.color]},{[`&.${di.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),wM=ye("span",{name:"JoyCheckbox",slot:"Action",overridesResolver:(e,t)=>t.action})(({theme:e,ownerState:t})=>{var n,r,i,o;return[{borderRadius:`var(--Checkbox-actionRadius, ${t.overlay?"var(--unstable_actionRadius, inherit)":"inherit"})`,textAlign:"left",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))",bottom:"calc(-1 * var(--variant-borderWidth, 0px))",right:"calc(-1 * var(--variant-borderWidth, 0px))",zIndex:1,[e.focus.selector]:e.focus.default},...t.disableIcon?[(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},{"&:active":(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]},{[`&.${di.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),SM=ye("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),IM=ye("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>R({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),AM=l.jsx(mM,{}),TM=l.jsx(vM,{}),EM=K.forwardRef(function(t,n){var r,i,o,a,s;const c=pt({props:t,name:"JoyCheckbox"}),{checked:u,uncheckedIcon:f,checkedIcon:d=AM,label:h,defaultChecked:g,disabled:v,disableIcon:m=!1,overlay:b,id:x,indeterminate:S=!1,indeterminateIcon:C=TM,name:I,onBlur:w,onChange:A,onFocus:E,onFocusVisible:k,readOnly:$,required:G,value:O,color:T,variant:N,size:H="md",component:j,slots:F={},slotProps:M={}}=c,V=Te(c,bM),Y=K.useContext(Ja),Z=(r=(i=t.disabled)!=null?i:Y==null?void 0:Y.disabled)!=null?r:v,D=(o=(a=t.size)!=null?a:Y==null?void 0:Y.size)!=null?o:H,L=qi(x!=null?x:Y==null?void 0:Y.htmlFor),U={checked:u,defaultChecked:g,disabled:Z,onBlur:w,onChange:A,onFocus:E,onFocusVisible:k},{getInputProps:W,checked:ie,disabled:le,focusVisible:ae}=eA(U),ee=ie||S,ce=ee?N||"solid":N||"outlined",ve=t.color||(Y!=null&&Y.error?"danger":(s=Y==null?void 0:Y.color)!=null?s:T),dt=R({},c,{checked:ie,disabled:le,disableIcon:m,overlay:b,focusVisible:ae,color:ee?ve||"primary":ve||"neutral",variant:ce,size:D}),Pt=yM(dt),fe=R({},V,{component:j,slots:F,slotProps:M}),[pe,Ce]=Ae("root",{ref:n,className:Pt.root,elementType:xM,externalForwardedProps:fe,ownerState:dt}),[Ee,qe]=Ae("checkbox",{className:Pt.checkbox,elementType:CM,externalForwardedProps:fe,ownerState:dt}),[De,ke]=Ae("action",{className:Pt.action,elementType:wM,externalForwardedProps:fe,ownerState:dt}),[At,Tt]=Ae("input",{additionalProps:R({id:L,name:I,value:O,readOnly:$,role:void 0,required:G!=null?G:Y==null?void 0:Y.required,"aria-describedby":Y==null?void 0:Y["aria-describedby"]},S&&{"aria-checked":"mixed"}),className:Pt.input,elementType:SM,externalForwardedProps:fe,getSlotProps:W,ownerState:dt}),[Ut,Lt]=Ae("label",{additionalProps:{htmlFor:L},className:Pt.label,elementType:IM,externalForwardedProps:fe,ownerState:dt});let qt=f;return m?qt=null:S?qt=C:ie&&(qt=d),l.jsxs(pe,R({},Ce,{children:[l.jsxs(Ee,R({},qe,{children:[l.jsx(De,R({},ke,{children:l.jsx(At,R({},Tt))})),qt]})),h&&l.jsx(mu.Provider,{value:!0,children:l.jsx(Ut,R({},Lt,{children:h}))})]}))}),kM=Be(l.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),kr=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:s})=>{const c=(u,f)=>{u.persist();let d=[...t];if(u.target.checked){d.push(f),a(d);return}d=t.filter(h=>h!==f),a(d)};return l.jsxs(p.Box,{sx:{mb:2},children:[l.jsx(p.Typography,{level:"body-sm",mb:1,children:e}),l.jsxs(oT,{orientation:"horizontal",wrap:!0,sx:{columnGap:"12px","--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(u=>l.jsxs(Gh,{children:[t.includes(u)&&l.jsx(kM,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),l.jsx(EM,{checked:t.includes(u),variant:t.includes(u)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[u]||"N/A",onChange:f=>c(f,u),slotProps:{action:({checked:f})=>({sx:f?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${u}`)),i===!1?l.jsx(Gh,{children:l.jsx(p.Link,{onClick:s,children:o})}):l.jsx(l.Fragment,{})]})]})},fi={popular:["FT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","CORRECT_SCORE","OVER_CORNERS_9_5"],playerRelated:["PLAYER_YELLOW_CARD","PLAYER_RED_CARD","PLAYER_SCORE","PLAYER_SCORE_FIRST_GOAL","PLAYER_SCORE_TWICE","PLAYER_SCORE_HATTRICK"],goals:["OVER_GOALS_0_5","OVER_GOALS_1_5","OVER_GOALS_2_5","OVER_GOALS_3_5","OVER_GOALS_4_5","OVER_GOALS_5_5","OVER_GOALS_6_5"],corners:["CORNERS_MATCH","OVER_CORNERS_6_5","OVER_CORNERS_7_5","OVER_CORNERS_8_5","OVER_CORNERS_9_5","OVER_CORNERS_10_5","OVER_CORNERS_11_5","OVER_CORNERS_12_5","OVER_CORNERS_13_5"],correctScores:["CORRECT_SCORE","CORRECT_SCORE_HT","CORRECT_SCORE_ADVANCED"],misc:["FT_1X2","HT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","HT_FT","RED_CARD_MATCH","PENALTY_MATCH"]},_M=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=y.useState(!1);return l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e.marketSelection}),l.jsx(p.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),l.jsx(kr,{label:"Popular",values:t,allValues:fi.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?l.jsxs(l.Fragment,{children:[l.jsx(kr,{label:e.playerRelated,values:t,allValues:fi.playerRelated,valuesMap:n,onChange:r}),l.jsx(kr,{label:e.goals,values:t,allValues:fi.goals,valuesMap:n,onChange:r}),l.jsx(kr,{label:e.corners,values:t,allValues:fi.corners,valuesMap:n,onChange:r}),l.jsx(kr,{label:e.correctScores,values:t,allValues:fi.correctScores,valuesMap:n,onChange:r}),l.jsx(kr,{label:e.misc,values:t,allValues:fi.misc,valuesMap:n,onChange:r})]}):l.jsx(l.Fragment,{})]})},Re={avatar:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMA+h6XBeOBCz4ozafvc/W9X+nD29ROsWmINjBVRxC4F3uPnhL6/TMAAAygSURBVHja7N0JkqJAEIXhAsEFEEVs9z3vf8eZmI6J3mxFZamq/L8zaC2ZrxKjTzTaLfu9xWweZ7n8FeRFmRwuq+XbZmDgs2gzPR9iuaGYpOl4yO/AQ+G0lwRSUXJ+40fgkXCaxvKgYDIeGXhgvZrLk8rVxsBp63MsLyn7rAPOCvul1GB+Cg2cE20nUpvDNjJwybpXSK2KPsuAM8J+LPULUk6EbjgF0pDD0MB2w0QaNOMnYLfhRL7iJ6DJaCEtOHAWsNO+F0g7Um4EFlpm0pq8T6/IMptEWhVPDewxWAXSthlNAltEu1I6EKyoD9sgOufSkZIrYfeOM+lQj8NgxzaxdKpcG3RonEvHgpNBV8KDWGByNOjENBMrFJwFu7BPxRbB2KBtw1gsknIbaNk4EKskHATaNLBn+f8vpjLcnn0i9skue4NWHOdipYRfwHUa/v//JBwFWzCYibUm9AebtxCLpQYN64nVVgaNGovllgYN2or13gwaM7Ss/ndNTmuoMevOu/9VZGREGrKxpP17T8bToUaMCnFEQV+gAaFV/d/bYt6O1e5YikPmtAVqNrC2AUBboA2RFfHPRywManQR5/QManMSB5EU1VQApij8k7IC4E855YBaHB0qAHwVExWuQWRxAuieiYHvCZDbzgYvmorTtgYvGTl6APwv4yD4koGlTwCqSwgKqz0AUBHUWgGiHlST0JEI0G0F1YBnOdcCpDFYq6V4grGyTwkdvwF+yEiIKd4A2AR0lgApCL5o70wIvIqCkKiCEBjloBqtxTO8FnqMYynw+2YGWk+AnAMfNnA2Bfa7mLag5zFwYuK1OXpTA/wsoymkKAXAVfAFIwcGwTwjIB7mwSRApgheQw2oGqYHVTERbx0M7tqJxxghd5/DL8F4K8YCwBLAAsAS8IqheI4lQO0VgIuA7hoAyRDVRUDKgZWMxH8BjwTUtQFpCqrOAXyXExFXFQQiGlRZ5GESkHSg7igwAWGqwLwRqGojapANU3sH5Cb4q4GKO+C7jO+JeDwQhqExPAflGEgbgGPgg1aiCp+Z/86riTD3xQaasqA/7Qw+S0WZi4HSIsC7jI6Qd2PBGSJOFpBsIDtAVTl7gOodgD1A9R2APeCLyIsvg3APoArEM0GiIHxW9AlK0sDflQYaO8EfeCT2bixKLQ08+zgQnxJ6QqSwDMhFUNNUGC6Ct/VFrZOBohdhzAy7KvJ0NjgdwT/snVlSAlEMRYO2duEADnQVIO2U/e9RLSkZbB7o5zvnbAGqX3Jzc2MJYHq0KoBZEZqBHAm7EOB6wGHOEo3jAKQbTF8Ydidwn8ugg50EOQ+yBrQKjHhJOPTYULQO6EAQlgykK2iHZtGtxlBD8Ibz8apbEGdC/Su8/Nvmfo4rBTp//h1uYPnBkGB43UGOgB0N2/uZG7VHD10FO8YFJUEYbAN2MoQ5DeU5KTsAO4FhHlPIC+O2AHCbONwCZBmIOgzxV66ietqUw4zqlwIsAeD+ELwDhO4PwTtA6NFx6FVAbeI2Afg2QCcQfE8AnAdyCjdROylFonKalCK1O8QVAuF/AL8A8D+ANQC8BrALoHcByPNA6gAbZikFZlE70xR0ejDyRKDJkRveUgrMo3Y0hBS5i9qBHonUEmY0rNGxCgHqQOwLMcd5iPqxDUB7QiPuUsBNAPhSsDWgtlBHQYrBcCFYLRBfAlgE0EsAM2LAZgCVAPgo0IgA+CTom8ZxwCD3QcGMgEHOg4JvAPoF+MS0aGpKpHHR9JxYbUGHGEFUIJOCsOlAWkMtAc2KAqdD6QsqAjsbF40TIWwP6CcA6wRwT5w+CN7mKeWHLoC4IQJKBRhiaVzQmtE4kOgMAu0DDdE6FGSdjFUQhh+N1hoENwL9plUMyBn2AfhiiT8kPYF2ACrC0CGQl2SZuyAuC5PXgcs04PDYafXXAU6hxQ4FHtANwIYW+g2Y+vuvaZB1wLXff7QkSBYA3RThpIGYGqIL1DfAF+A4XcJAugALtDB/2MQWkH1M6jlkl9tEcRuCjo+0CWRvCtF2gTUG7HEZss8iQSxDyNFhyoDwN0AjGPwN8AVgD4SIaQDGR0IjIdWCVIHMjgOeB/WclIFQ/6BHzISdBMO3hNwGgl+SgIUCKwUoAmgL0QpyKn31gRGTPqTAe1aOdvAyy6wceCIMPkCWGQrrhoiZgB/snVFOwzAQRO2QElJFhUAJClUpwve/I0h8tagobVzH3nnvColsz+7sLEoQDUhDgDbAFOo+mGVFJoR2MYgi0BQas9vlO/qA2tYwrGDT2Bs9AjgAxI8ADgDtV0DPAaAtBJAA2tuEqAGIrxGgCKgdF0EkhPhCMdqAF/IRTDE4uIzW1JCI6nJYFsuKL4edw95QW1h3OSxSEAmIPxQnqPg7UH05qHxXkC7gtdQm6oFbmgBXMxq4BPzoQDk8klBI7UtgzQUwi/fCLwFPKOhMPkPRYAPSXiZECWg+VcEO0f7gQHlgnOWA2o1hFGAc6kIzhJ9RgJGoirQG9ISCR+OhwGqAJxH0B+FRoTcHTjg/kDzAuNSF2YMeeQBG5lBUetgLgbDRaQuqCHaYwH4RlQIbBMBN2IUy8FSAj1HLkEQAniBmDsAE/AcpjyAdoJtyFzKHMdBj1P4ACoCnaP0BfP9zaPhDOP/PIPISvHfwD+abw1jAk/GUYVXYkwKRkNfsFkxuyIFLypiZTXDFCFhiqqzGRtcYQJPTDCEbBlLAJmJTDiL/FmKXxVOwo/2/GG0GD4Et9q8FaRa3i39x/X+zdyc5CMNAEEUhuQnc/46sEFMGWyJy1PX+Fept7R7bfXAXdQWAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQADofPelvQrqqd7+BPRUcX8C2qu5PwGtVd2fgLbq7k9AS5X3J2C/2vsTsFf1/QnYrv7+BGyVsD8B62XsT8BaKfsTsFzO/gQslbQ/Ab9l7U/Ad2n7E/BZ3v4EvJe4PwGvMvcn4Fnq/gQc0zT8W+D2bu5H/LtpPuGdqPWuMwLB8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8CD/buRStRKIDC8NaBRBBFzfttxvP+7zi1Wq2mxgxLC87+v1f4d6VwIPv8TMA+PxOwz88E7PMzAfv8TMA+PxOQukfr/I86xieIyW89gT75n3WKvtz0C/IbT6BfBLxhNAHyn1as5YD875uvFDvyn7ePewJr8n9olClW63lADZOtYkT++vKZYkN+6wmsyH+xfKNYrPYBn3BfKQbk/7xplajlyP816aLVE8jI/2Vp2VNLZaOAKxi3cwLkv57B79ZNgPzXNbjbqUXIf32D5UEtQf7bGP5pxQSyScCNDJt/inxL/tM8HiQg/+11jo09PEj+8yI/QrzNAz4W6xHiGfm/17xRR4jJf4nojhCT/4fsG3F+lPyXiuoIMfkvE9kENuT/eZO6EyB/rEZr/YDNfUBTFF2dR/7Inb9HQH4D70+A/Ca+aQIV+RvrG24TVdOAJnt1gZj8jm72dHlC/pa4rxLye0sXybXzpwFtMi575Pd2tceJkgX52+lhAuT3Ni4T8ntLK/Kby7PP5i/JH4eiS35vw1KX2pI/Knlfl9jxTt/YdErVt+LHP0Kjg2pa8N9cojTOVEfyKyBOtf4M9Hitb8SOyYf9ecY/avse/b1Ndjoj4f1e0cvPLYCv/wbynt5zF2BglOi0WYCFQid1BwEeSp3CFwAbnUz/KwNspDu91ecGgJNfeosrAF4yvbYJsJLrlYTnvtxU+tciwEya6EXCESA/C34BeJvqBZ8AHM30bBtgaK5nnAKz1DnoSZeLgJ5K7gJ4m+gJ73x2ddCjfoCpir8A3gruA3pL9aDHdwBfXa4CedtIWgbYWvIRwNteEofBjaVSN8BYj8eBvK25DORtpmOAsZIvAd6WnAbzVmgYYGyvAGc5A/A2ZQDexgzA25ABmGMA5hiAOQZgjgGYYwDmGIA5BmCOAZjjTKg5jQOcifeDeWMA5hiAOT4DmPvb3h2lNAxEYRT+kzo0JtNqoFpQmyCz/z2KFJFa8d2e863hvCRzZ65fAXAOhcL5IwjOAOAMAM4A4AwAzgDgDADOAOAMAM4A4AwAzgDg4lPRaN4Ohus8DmYrjoSxLVmawHY+Fcu2zdrENSeOBZNtkmyasNa4MYJsdHMs25BPL01MY86mJqT7nJ28Hob0ni9DE88h3x6baOopFgBW+1x48lgYpfT5oXd9GMjzNteGyfEwhvKW363HxQZu3uE1f7gbdtO4b1e6WudSylz3JvJ/dfPDcc2FD2jGIfoz6ZkMAAAAAElFTkSuQmCC",team:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMAcN3YbAMJ8lQsGkdh97kVyyLTsT0Q7ayEfDXD6KSLdeSclIjjiMMAAAu4SURBVHja7NjbasJAFIbRbY0S0npA641Cxc77v2OveyElYCY7nbWe4YPZ/wQAAAAAAAAAAAAAAAAAAAAAANCU7bXvVrxI11+3sSDD/Vh4sdt9iGUYHoVJPJaQwGa1K0xk120iucu+MKHzJVIbToVJnQ6R2GFd+K2pAraO/wpuee+A70IFX5HUe6GKz0hp4wCs5JjzEegLlfSRkR+AavaR0FCoJuMU/Cg818AbYAP+4b8vQSdARefIxwis6Bj5vBWqWUc+AnhOAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASCAxgmgcQJonAAaJ4DGCaBxAmicABongJfpZiaAmcXMBDCOAAQgAAEIIPIRgACWKEYSgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABLBEMZIABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQggCWKkQQgAAH8sEvHNAAAAAiA7J/aDJ5ukAEBBBBAAAEEEEAAAQQQQAABBBBAgEcZCSCAAAIIIIAAAggggAACCCCAAAIIIIAAjzISQAABBBBAAAEEEEAAAQQQQAABBBBAAAEeZSSAAAIIIIAAAggggAACCCCAAAIIIIAAAjzKSAABBBBAAAEEEEAAAQQQQAABBBBAAAEEeJSRAAIIIIAAAggggAACCCCAAAIIIIAAAgjwKCMBBBBAAAEEEEAAAQQQQAABBBBAAAEEEOBRRgIIIIAAAggggAACCCCAAAIIIIAAAgggwKOMBBBAAAEEEEAAAQQQQAABBBBAAAEEEECARxkJIIAAAggggAACCCCAAAIIIIAAAggggACPMhJAAAEEEEAAAQQQQAABBBBAAAEEEEAAAR5lJIAAAggggAACCCCAAAIIIIAAAggggAACPMpIgLJLxzQAAAAIgOyf2gyebpABAQQQQAABBBBAAAEEEEAAAQQQQAABBHiUkQACCCCAAAIIIIAAAggggAACCCCAAAII8CgjAQQQQAABBBBAAAEEEEAAAQQQQAABBBDgUUYClF07y2kgiKEoehVIAGUgE5CkRYC8/e+RNZR/7NfyWULrSl1lVwfQAXQAHUAH0AF0AB1AB9ABdAAdQAcQt+wAxswtgNV8AniSJcYUCeBIPUdZIte7QvbUs5clch0UMlHPJEvkuilkRz07WSLXWiEn6vmSJXJtFPJNPX+yRK6rQh7Uc5Elcj0UcqWeH1kiIP/k9Ew9G1ki10Ihr9SzliUC0lcBOlPPmywxosxHO1DPhywxqsR/c0VBL3JEqrtCPqnIcxtEqmk+uyA4yRGZltv5DALhLkdkuinmQkWegwCGFRiebajoLEeMS58D6kZFnvdAEq22c7oFwq8MMS59eLqgJssnIYzKXwX+k3cvOgnEUBBAx0ddXbMqJkAUMJj5/38UwsMA4rZsdjtTzieIudveO20l4yC2A2Ekyz4JkhwGrz3SEFLlHwTwGZpqGkK67I2TV4ia0w+yCcvC1oCeuVCkUeibaDaCXVNhSCSQolXMg2180g9yGTe80BNUBcNIANIIjE4mAbIMJ8JIohCfmELXDe0gnsYSUHgJYBkMRTSVYqkYCDWeByGPEVlcF8DzgCCiCP2hFI8FOp8OQRZ1w9IGAfuIgxlk8cVLVcKbQMuNICKpFADlTaBlMhQJsidBRI+FWgcDEUljC8BGNA7o+w1ABgsW+wXwiwUhnsLMTP0L4LcPQIrsF+pV8l8AYEEriKJSI7+hz6wXhKE9LLlS0M0gx4LXteGIpRCe154D7HzQCeJoDExVDwQ4p8MxrDBjBzUsWLUCEEGlU6rfBDBcBmJQdUWy0EGg6TIQ7VTOzyq+E+N/PgCtVD4A0mHAQ2OjbiAGNKrYQTWGDaNkGFrI7ADEs2C26WC00GmQSKeBfS8LQQuFkwDS14K47wQxlNclycLHAI6PyGEg4YVb5TwUV0QuBP/S2RrrJ0FMm0E4T+mb+C6eBveNB2MQowm3iroctoQSgCE8vLGbW7sCYFMCcJ5QTM6vANiUAJyj0wHyLAAuJQBnSO2IHAuASwlA754adnRnWQBMegHo22hOXlkPYCc4PCOFno3f+aukJ6JKmQjglFIH2CkJ5jkURK/ClJ29wJdBLgB/y38RgMHFoEVEg3BCqQFgFgQ6VctfHose3bO7SvZxgEICwjgm1gm7gbdwR204pNYG8RsDu20Fsaf4+7sFwQyfEcGe4j++7uMgxawDsaH5+7uvADfuqQy9eG64cqVTwGNhRmHYEvz+c2a/AjToB2JN8/dvrHuAP+zd62KiMBAF4CkWUBTFG6JSLz3v/45bbbu77noBm8AknO8F/EFMJpPJxJWmMfJN2f7/w158ESq+JiJnGmOezJMF4GSg9764iOic7vxZAHRnhOWTgpcAnG0HUUWotjJAjAqPMGTs0QJwkuTQSUyK5jAkd6QjnPsVomLQZItPnS4Du+UdKok50x7OOl8Fcl2ks0ZYjNmUAHeAd0xVngqJKf0UpsROtQNyPAzQlv7xNAD4tIM+YkT4DnMK8ZXGbICYsBwDYAbgsYm+x6XFgOkM5gQONQStb6PuUEB+bpHjA48A3GwaoCv8c/cmsLOBoKrwz+cA8Fuo7D0RPdnfk5XHAaDSjKD8yOYAkzIH3oVU0TJDywAYpTDp4N0RoANbAXledIRRsecbAJ05YXnaNMMJM8Ct75zaGQDDHL/xFoi7m0F5TljghBvAJ4Vq3hiXpyRjXOP5u+AiHp4LyTOGJQybdyABcClScllExfSPbScSAJcmOhJCUluyhWkzr08Ab0lU9BKWuvo5TAs6kgBSmRKUeqJ3GHfwtATwsYGC2yJSy6AH48rOfn+RQfuFwlJDuId5eWcSwNdsWh8BUt10iw/8/kYtYrRLKhvFMC/eSMe1PQKkoskcJ/z+vo2Aeps/fn8Rz0aAVDF5wxm//5lXkaBU0C/xB+O/M2/yAfLQZAUrSn7/3wYl2tLS6g8c+P3/Mg3QErkvmcOOoMP5v2uSHtoh94SvMeyYdfT8R9/psNwxyGBJ5kUbcLOWW7RBbop2sGXcwfoPwz3W7A+AYYCreAHsXwq7LP58ACQrWPPO739LgcbdOPdNYc1aSFH7ALli2MP/eP/jAXXN1qppdvZH2qH7Xwr6rTwxAKJ1CntKHv88NAjQJLnUD2BRj+m/CiYZGnQ5+Mawacv0j76EgPwxOcKqFdM/FYU7NEa+RfsYVu24/dfYQOD+4s/tX1uGMZohZ4sMdsXc/tU0OKAR59+aw7KA1R+1JRmaIJIccRPD/xZFb2jAskhh25Hhn94nZ3M8xCdgW9OP4TyGfw7lhb8w/NNjqaWZ1JPGnWz+IuJmVtC8guGfgyUCxsTev/5wCwOBkx6Xf0OWyh6Z4OGfCa0357HsRcighYaWcjWUC6EbtLRntmnM5P9tahq027Pm7u8BJT267Thw+rdk4sQyMOf0b034oj4plL4KWTTQ0WT+phmTP3UpaNcNVv66ZKjvDfovAaO/RizVvDh16Y1Hv0/S8GrHj5U8+mtQou54aMXNX7NGqsoFY977qcTXw4E5u/5V4eskkPPvX5mPkcCKf/9aPNsOMPi3xt5TDtz7+2QYoDUBb/0oEO3Qkh3LPnXYZGhBxoM/NcKXGA2LX3nwp0myQqPeuPfT5n4wyODPf9E6RSNSFv0qNZ2jAXP2e9XL/jrQ4+yvmuV1IN5z9tcuecMFxv6dY6vtZ8Zm/44IRyWMO4w4+7sjKlIYlRbM+7tlugJY9NFp5kKBjBc+nBSOSi7+3WYgFEjXXPxd9tOswJGLv+sGYzxtzJoPHwxneMqMaX9PhKMDagsY+3kk2ueoJX9h7OeXZRGjsnjNcn//THYpKokLXvX206SI+fm7bbnOcVfOyd9z0b7ETQeGfh0QjQJc1ePGryPCfob/bPv8/B2yWOHCiuVeXTMtZvgyK1jq30nLRf/1tb9g3P+rPTgkAAAAABD0/7U3DAAAAAAAAAAAAAAAAAAAAAAAALATZ09HWAi+hXYAAAAASUVORK5CYII=",competition:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACjCAYAAABotuf8AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALiQAAC4kBN8nLrQAAEnpJREFUeJztXQmQXFUVpaBCzCIIghAooCBRIZDp7r93/+5Ze++GYrNEooALUux7sYmAqIAUQgWpArRKBBHKsMgiawhhEWIpi4AssoY9rAGUBEgGz+2ewDDTPfPf//3+7f79TtUtqMnMe/+de9599/3/lnXWUVBQUFBQUFBQUFBQUFBghe7k5unJ/FlWurzMSBVXGcnCMOxTZQ1tGBx9DK6W4/8vBG+D3P5rSxipQtl0S4/Ymepqp3fnT5V5N+IMAnuWOITApnH7sm3Qo/dtBWJWcDuo04041JxchdufgaHZ2el6srCfZudOQbS5xM5UrvFjIORlbqdExcDna4hg1/r0w58S1tBpdZ9mNwxdUAkrux7G953NVGkhGvGula6sxn/ZSVUW3ODLYfIpAsWt8PE+8PX6oQmLwi0e4G1uEpTJNQjsE93JHxWWqBIImyu5G60sNHF9DJ+XpIoK4+80zDx+xd1YZeEahsSb4+bgTGnCQpI+23LLz3E3VFm4RjkXhsSYNGHpyXwKSd0n3A1VFrawKmswU5T3GgMhcX/uRirjMfj+TGnCQo51DHcDlfEYfL9AmrB6jP4TuRuojMfg+wulCQuqPYO7gcp4LGFlr5YmLCtduZG7gcp4DL5/UZqwTLd8G3cDlfEYfL9cmrAwM1js56HsTHUVbGUzc3qra7iJi5CtmYTvVfQ7ouXC929LE5aZKi0SfqBkYdhKlx0ovqnpyfxF6iN2cCMOzVRx4UR8079BJA+Ilg3fvyVNWJZbul30gdAQsm0mFa1buoPbMZ1uxCE66XYT+hC+QL70kI+y32idksY/1K1+Gqw7hZ7JyrYzlQ00J38BGv0yhsaxPRHhu6o+fPfWhrIPxv4cnC3Xk8U/O+BwMp7JFyjjcdG64fvXWqOiBoBqr/BDSI/eZ3gpn9b+xIyBr2P4/IFmZ09O2NlTIbZjEbrzqPsqfsfyGni5xEgVMnqycEyNGzt3On52UMIeioG7GV44Jl+gEz8lWjeGwgeDqWcCwOm+XpBuPy+ZClp33Bz8KbdjuS1uDZ0UlEfyBaLPM6J1w/cXBa27KdBLjvJDiOZkvxO07rg51PVv/RGhjgvKI/kCEest0brh+3OD1t0U9BHaz+wNofskO11eN0jdGBqP43Yst+lIC4L6sOaLTEV4hQp8f3LQupsC+Y6vZTO00QKkfCVI3bqTO5bbsdwGDo8J6kPyhSMYHGrLZpx8NWjdTQHV7oQZyLs+1H7HvERm0lcOEwGh+Hhux3JbK4ZC8oVovfRiFX/nBK27KZDAbQHF3yv6YJZbfgeKTwepO4HEldux3Ibk/cQgHMIHU034QlxYlWWYPE34fiwQMK3dGMK6xofikWflfxikbkyzz+d2LLchYp0RhMMevc/ykyNjlHoCHXuzIHVPCs3J+UqijWTht0HqxRT5L9yO5TY4+NogHEIcZ/kStJO7Pki9nhA3B4Z8kvIIprqb+q0XY/wtXutCr/yQti1xC6HVZqaKN/nlj7hHSvIvP/XC5/v7rdczoPqvYTgUPrgD4/R7mNlpfupEtJuOOpd6dgB+F9PqF7iF0GpD57rLSOan++EQUUcjH4jWiYCwBj7f1k+dwkAS6Gv5DIT1Bz/17Rh3t0QDn/ZcT7JwPm0R5xZCq40+xczTej19Hhvns2T+ND91mqnSY37q8wXKszDUDAs/pFt6GxOArUXrw2xoLkhd7l1Y+aPxjGdyC0GCsF7X7OzuovwR5+D+bj91IkpeJlqfb6Bxup2uvO/nQeH0wy23NEWkPtrPCFI/8loHkZ+wsidwC6H1wqrSYXTCZykQ5/hbX/4Cl/Lzq7VAMjfDdMv3+3lQzO5eQUMzIvXRpwyv02T6vbg5OBs9zdd3zba22kK+klA6QUdNEed+6oOPP4Kv5b5mGAv0nAX+CKoOm27xAiNV8Hw8DoY1z8t1MPNZiQR3Csg8jF0IEgxD2j2efQSO0YnnE+d+6kKuers/dQQAKt0dCfUqPw9Mh4Ohwdt7rQvR53XPwkqXX6C/QR2HcItAhqF973j3UX57/P6D/nxU/QQ+/p4PaQQDpqD0Fv7SAD3vaTR80jAbM/rn0GFgAuXWXiKCmAO5RSDDaNKUMAcnnRliBr4ZuLghgIAfJB+3QitCQERYF7nPbqJfykcbItE5k9WDxu0hQPpqlHk6/Z1m58rIR9iFIMOQN034zdDJVKZAVOc2WsbszWqf4I4hH7dKL0KIG5TElzy/BhgnhHRlZcwc6G1WPs0ekSf8TEBYKyD279PfxoyBPtohxC0CGYY2TviJJWFnDXDheRY91uDT1zEBCv8M0tFAYn0UlO2zZ9TyrQ8ggEMblR23BrdFI+/yWhZ9LAUhtXOcSLAQZSSP9sYwRS9Kt2jEmZ4szgcPrwUpX3PyR8rUjCfUX76VPTu/iSDeQqI4f2zZCMcuSPR81ilEuBhDYe2TBwQGYRUjKSx0xvfRoe3xfBVIVE8EFO2biHjCL7GlwHSL+wU9+B+EfBAzBg/E8Dd1bbkg6jCRHM5MFT87EQX51T4ok10EsgzcHLy2rcQZOtKuxGEwwVbXoDPyR6u1wMPQDPHi4IRV10CkV6G8OVQuyrxO5O/xd4evfSaI7Ehu58s0DPOXUzvj5sBMiGxBK1ZzQJhLyZdcOmoIPNA3EaKFly036DXD1ECIam/890nvpJQ/pP2Ha5+H9iNyO1+m0ZBnuWVE5fLN4P2/gXlPV+hs9305NdQURqr085FDJwITNzK0iry/uhfJ/mfLZzE0RH0pM7hp3b1D5Dt0zPa8hwcheSYe7iIOolHveWsTdwJ68u/bwPkdYXSKkO7k5R233Qogt+nhOEeL7n8Z/RxqKbM3oyEV+ZrJJBcxYBja1PK5rMYnObR8dqvRz4BeGLmFfhJ4e19P5nfh0okvIILsgajxfBgEIb/6wjGGCSvbg4RW+ESVbjL45iPyEbgL7xKmVgHj9gB6xZsyCaJZJKLTJaPr3THu9ocl6k602gtpJ19mkkVw4OHXQ68oIXq0ZKbYRFgfjv0khDoPws8DT8GjaOQLdMTDyDdcumgZ0JDdEEH+I6f3lR9O2ENzRtenOflf0HkD3E5sN6OcinwB67zhrxlGFvTf6WcTxkQ2dhgkYFZ6PbcT28nqL51LS/1sZOkIJOzBjSGEK2l1YqsIM5L5cR+v0TOFDxaLsoHzKzQ7O6eRTyIDDFHTMFTNR/R6Nbiwatuhdhhdvu7kpiNiRW4XtB9DmvA68s3TiXMuf4cOJNybGqnCwiAfT9ETb7PT5amjy+3R+9LcDuW2+krawkJ0ukkPFY4kNCc3E7YLSBBO7GmbF4gb99EU0fBgbsdyGi3yQ4c7WrNz7f2JJgwg6myAsP2iCIEYSl8ZW07cGtzIdIu+N3h0uhGHGAkCHyQcGcTNQcsW2IlD67YstzTuWKSENdQDwXVt4o5capiOMufwYdtBs4doQ8ZNgj3zyYSdHffh1Ki/GO3q91fgZpHmZMPdvdyOSNQP/HhDhDzkEH9sVJaZKl7G7Vhuo8NT0On2DNuPbQeI5HdixFVXNzrBV0/mDSSuwjcuRNEQte7g8GXbgN4E05JiEdJMt/wohDVrbFkQ6An03ZDbqe1gdDKP1i47bThgpArCB3doTu74RmXR1i9uh7aT6U7uR2H7s20AMfxNhCz8/rJG5dBOFUQ+9bZ9lCGC300bfsP2KTswg6uKfDOkg94QrY4eW07M6F8PQ+MB3I5sNyNu0RGP4PAtGzAEzrDSYhdfgqT75unjt5WjV85C71SrGRqJK11Zgk7n+6TqjoOeLGTqd0F77n1rmr34M1PFvZGsRnIrfQuE9W7CGuyOXEuzh6ZAJOeJEISItERP5jcZWxYi2Pr4N+GbMrrJEOkfwAxR6MzXjkTCHtKQaHs+uIKuQNOcbMP12RgG59K1tdzOa2erHdQGzsP2c+igE/e8nolJCaiRLJ7XqBwnU5mGIfVObsd1gtH9R8i1Ng/b16EBSftckdsRLLd8HwgZd1apVt+ksVvQE266xcD5CojrWxw+DwXIrQRu8Kp+2uxIHfx8W9MtL+F2WCcZnRcbtr9DQT0fKnvOh5A7rUbS2fA8eAh0P7ULR8woF01YQzs04rOjgSFNaElLfaNE4fhGt1jg599AD/R8G5iy+isbzcmdyuB6uTBT4is7EeH+DTL0RuUhApq0TZzbYZ1kyHEfDdvv0uFHWCPiWtaj9321UZkg6tv+j5zuPkNu+kjYfpcODIU/9rcjp3Y2w5X4+y3HlonZ4fT6eVzdvWrUk4F73cmdxOF7qcDQtYXp84bPkUNXz9YaHA6Gn8+DCV+A3m2G5P0xJO8Nj/DueCDh3qj+mkA8wpC4MJzejzLGrXWfp/V+GT9/jNt57WrEuZkqRXuPIaJLDA290RE4X/Rzqw7b6cqDKGOXmNH/hYMtUOaudqaixPVFG0aO+lyN81Sp80+XmQwY0rZGYx/ySxidzozZ4qWa/cXdKCjTQEKvVpKOGKL4I+Da4vIzC+Lm4MZ+r5Nda+iN7xnJwkUoa08kppuOlDuT8glup3IbcYvOF+f2MwsQXWIj9+n5PtqIci8Mj8tB5N9R3i2IWjchokk9RbDNjc7Jf4a41exc9Ie/ZoCwtqHe5fVqXmXNjTgEn0thDV8qdyWQCyygD8/czulkIw57jP7uWYrsBQlraBNErgsRxgNfm9JtNrIs5krikNuPbYkeva92GK7pltVnGs+iqn5ipkqHgrupkzPc5YiZA3Mhrsf93r7eHUbnipZfSljZLF3Vy+2zjgEiVwLEXauO1W4oqo+IG93JN732WGEC6Mn8hkaysBfyB89bxaJutFTISBWOIG64/dPxMN3iTiB0cZeffUVD32LDLQ5y+yNSQOSaqtnZXTADeq7bBIY2v4YZ3wHEAbcfIgsMAdvQwWvdsPt55J6guxvtVFKQANrZGzcHdSOZvwzDQ+ReTdB5rMijbsDseKgrdjG3IxDBXCtdWuS04LJtdkMb6JMM2pTl5lVhnfrpNWaqOB85yKJO3BZGQ56eLPyj1oZUYSNuPhXGAI6Zgt4eR15yvuWWl7X1h+36B+MV9KwGfW3As3Pzp+ABCWvwS/P0XldzcjfTKsp2iGQ0m7XSlZc0J38z8qfv0jNy86TgE3FzYErM6N8GM6u9gtzb0wJRfYzo9JMeo38OPRM3LwotBGZbK/iEVXnXdEsONwcKEgDnBr7KLoCwXoWw1AK8KAIJ8m1cwjJTpdswDG7FzYGCBCBinMd1phbyq19j9jeDmwMFCdCT+V4I61kGYQ33GH0x7vYrSIKdLk9B1Do1zNkh1UVHLtlqMV60UTtDIu3vDAk/ZqXLj9GRS9ztVggBiCCz4PCHnV65kYvqQF1qlWc3QbOzW5hu8RQZyTyVabml6xKoA0PgutxtVQgZmKk5EMEqCcJaaaaK3XWPjcLnwFBlYziUcMdh9UOUfRh3+xSYQMISudNHJGKh7MO526fABLM+FEoRlhoKuxi6k3eRXLd8ZkhlouxjudunwAQ4v2inW79Oi8pE2b/kbp8CE0y3dEjrE/e6Ice6irt9CkxI2NnjZQnLSBZu4W6fAhOMlMilUWKGaBi9WyAUvMFyy9fJEhbyrPe426fAALqEG1FlqcQca01XXfStUEfM6E8hqjwjS1hkVAd3OxVChpEsHij77C2qg7udCiFDTxZ+QzuQZQqL6oibg2o5cjfBTJXukSkqMqojZg5sx91WhRCBxF3CqoYxwkIdmp1zuduqEBLi5sB+skU1ajg8lbu9CiFAd/JT4OyrwxIWotZfUafKs6KOhJ2dbWcqL4YlLKoLdea5260gGUaysGeYZ5iO3A67gLvdCh5hpArT49bQ5pjOz/JqCWtoFoR1cViiGjUcPkp1izwrGdr4FW6euwa6k9sIOdK5iAL3IRo8KWhPwf4XtrBqN8PW6xZ6XgjyAbT1crR5NjfvkQXtJAbRVcstvxC+MHjNSpffQNsPVLupJUBzci4Ifp7byVw2cl2xeifWakBUoedG7WbEAbcfIgU6zAM51RJux3IbcQAupnH7IzIwksXNnEz1cW7Hshs4ABc93P6IDIxkQQnrM2EVlLBaBSUsJSwpUMJSwpICJSwlLClQwlLCkgIlLCUsKVDCUsKSAiUsJSwpUMJSwpICJSwlLCmoCatXCYs4UMJqIZxMZWoY+wDb3WocZCobcPsjUkBPPRs9lt25nEYccPshctCcbMZ0S69wO5fLrHTlfeKA2w+RRMwY6LPS5Te5ncwgqvfQ9n25+Y80NCcXN1KFc3Qnf0/CHvpnlI3aSG2lNnPzrqCgoKCgoKCg0D74PybY2tE87U6rAAAAAElFTkSuQmCC",bin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA8klEQVR4nOWUvQ3CMBCFX5MGloAJwgQwAUwAYoAwATSUMAGZACYgA/CzQSaAjgGgQTIyegU6WfbZioQET3Lxonf+4uR8wL9oCcCItUrZyDS0vgewqhnK306nnDW2NqiK4WEEYMSavSZcMlx8PJNHl35Gv9EAFo4uMQHAmn6uAUwY3kYAdvRjDWDA8CkCcKbvawBdhi8RgCt9RwPIADy5MgXAlQ9KvpHxAFwnDkp+U+MBuP5ZULIrjAfg6rqgZF8bD8B1b4IqWFTSHx2Ag+fmNzpbqoTZhV7EdKwTpi/aAB4R8/8OoIVITQHcFJvbjO2kH9UL+0+m+SiE/A0AAAAASUVORK5CYII=",checkMark:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE10lEQVR4nO2ZXVBUdRjGdzS78BLqSmqyIKducjKZuvKqNMMpMgQW17IENEIFEWhVViYEJlm+dmG/JAFFZFcQ+QqlRKAQiNUWli/5EJYFgd0FUWI/gJ7mv+ZkAp497GG3Znhmzv3vec/7f//veQ6LtaIVrchuySFfLbY0vpc528DNtDQUCi31bemm+vE0Y50lZbrWkmysGedP31AnTVUXJk1d5yZOVr/LA28Vy9n6AU0vSeaaEiUzTVrRbCMyZxogtNyEwFyPdNMvSDXWIcVYi+TpGiT9cQOnp6rx/cPrSHz4E+Inrw3GTV5N4Okr3BwOnoVbL8rmlBLJbJNZMtsEuvAJD6pwavIa4u5fxXfjleaTExUi3oOSFxwCL8MttnROaZDO/Qa74ScqETvxI06OV4CnL9MfHyv1WzZwCZrXnIFSJvtTCcbhDWU4oS/FcV0JuKNXxEGQrGEafu0ZKCuWG/7Y2BV8O1aMqJGict5QyVomK+8w+OjRy8QAjg4rqnhq+fN2G3BE2xx7Gv7eJUQMKxA+JBfZCX87wGnww3KEDRXgkDbfd0nwOWh0lc0pdc6EP6y9iNDBC4bwoTz6I5bMeWfDHxzMR6gmDyH95zNowUuhcmPkkmIA/puB8/h6INcc1Jvzss0GrOuBg+CPaC/CuywWIT25i8Cfw4H+XAT3ZSfYBM8DVolnmgYdAR+uLcDGU/5wYb+D9Yc+QHB71oLw++/mILD3rNYH8tWUBshW6ajKvxXnB9fdm60GXPw3wT1s24LwQX3ZxAC+6pV5UhqwrsSOgud4zjOwOHwW9vbKoikNZFhuFi1728SzH8Fz/jHwysH3sU8tXRT+y54z+KJbpqA0ILDUq22BjxkpAefn04jVly+t8k8YeDVsKwLbnw2/t1uGPXekLdQGTL8aKOGHi7EheocV4O14NmJ0pfQr//ezPmwrZeUJ/Od3pNjTJdFRGkg31pmp2uZN7if/gtgUH4ATo8X0Ks/xxGsRHyKwXWYrPHZ3ik2UBlKna81UPf/GUwYevwnuSNGywXO6xAjoEFEbSDHWGKgOLHewEBuivOZBbYzzQ+TwJRvaZhv2tUnpwXeKwG4XUreQNT2wYdpEaRR4fQETpNoRWgXz8B0Z8GsTUh/ipKnqIltHZUR/ATwiFzbBWNt0PoL3bxdiV5uAeoyS3IbOnD9y9wI8Ij+aB8tk5f3bhfBtE8BHnRZFaYCETnQvqcN9ec80wQT8LnU6vFtTN1MaIIlZwmSVhu4NG9qTC/fI7csGv7M1bcDmNI8kZkvZ50O6s+F+dDvj8J+p07CzNTXeJnjrW9BXuJHEbCkfI/s7z8Ijeof1sefA+j4J35Ji8rnNX8eiIxL32f8lxUjl4a1KFtCCt76F+5UuMfoynbPhP1Xx9V7NSUvLTUlW6VT4lmR4t/B9WPaIZJXOgv/4d76QZa/Id2jUaNFlh8Or+GVbqnnPsZgQCVoj7inKHQhf6tUsYSbcfSwSeZOs0hFts4Wpyi8kklWGavJ1jI/KFv6Y3QfWVoVoc1xJ3Hdg4JyJiUvKW5Us8FHzXViOVrAmex1JzAL7sjW0dxt1moasB7Rv2OUQWbJI6ERyGxJ9kPSA0yU2cLpE5oDOTDO7Q2jwbxOoyD5PVmKyVf4nfrOuaEWs/7/+Atqs1blaLwVcAAAAAElFTkSuQmCC",upload:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC+ElEQVR4nO2aO2gUURSGP8T1AaImIGjUIkIMooj4KgRBbFJZiYVY2agIVj5WsDC9VklIsLNQwS2yhZVmN4KotYVPWERFLBbER1Y0aBy5cAaGZXZm7nhn92bmfnBg2T1n98x/z5z7mAWHw+FwOBwOh8MheDm3WLycmxMgDi/n5gSIw8u5OQHi8BLaPHAJGBAry3uFqYBySGy5SAJsCIldXyQBBkJiNxb9FricUdK3gDu2CTAvImTdBN8Ca4C1wAebBPC6YL+BA4HcDgJ/iiTA1ZD8rhdFgMfA0pD8lgPP8i7AV2AwIsftwM88C3AiQZ7n8yTAJ6ACnAK2JEkSWALU8yDAbdKjFl6fF7MAH4F+/o+jNgrQBI4BR6S8w3wWgMOY4Z1NAlSAdYHv6wNuhPhdwxw3bRCgKaMexqE23+fACoMCnOy1AJW2UW/nYcD3F7ATswz2SoBmxKh3Gn01f2fBMmAlsAnYD5wD7gKtrASoxIx62OjXZf7uJquBM7KrNCbAC40ERiXmC7AZcwzLFrwGvJKRbsnrmnymfHxUz7liSoBRzWSV/3HMsA+Y1ahUVXV7dX7AS2BqM9JtSsAk8DdFk1YxE/IdsXgGy98U/W29JK3NyrokEi/FIUWWlDRLPs4eyYzREdvKf9Lgxfs2HvWDXo/tvZz6+A0vyT0/F8i/lbAn7LFVgNOBXJKWfiMQ00gYM2OjAD+AVZLHNs3zQ58nGnHDtgmglq5pnjNOB+KmNeIu2ibA2UAeNY24qUDclEbcA9sEUJsYnzcdfFpyn6tSr8osMRKIG5H3quLTiGiMr20TQD1d9pnr4JOWuNnDCgGChyTfuyDAt6SO3TJ//u/pLWALM11ogvexmLTTYFUj7gIWM6RxIarUfZ5qxG3Fcuq9WArbxC55gBJ3MarJGdsM2cZEBrPNGIuIUsqnwKkPRGykz9CpUD3JkZjNlTCe8lB0Qco+7C83i44dwD2Ni1fdfjc5ZEj282pLqx6GqI2NspeywlOfKZ9I/gGPNfEFBL9FwQAAAABJRU5ErkJggg==",upArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAz0lEQVR4nO3YywrCMBBG4fOE1oWDC/vsCiq+RAuVQLpzvDVtJvAfCJSki/nIqgWllFJKKaUqtwfuwDU/N5kBAzDlNQI9jSOmFjHmIJrCHF8gBmcvvdvMTYzACTg4Z31LiLnwGPsCER5jPyDCYuwPRDiMLUCEwVgBRHWMFURUw9gKiM0xtiJiM4xtgFgdYxsi5opjaiCKY2oiimEiIBZjuoDfDkdnpjSr2y0Y4h0m/dBwewREeJg0q1uXpedPV1epDrjkGXe1h1FKKaWUUrTVE5bz7NyN3sYLAAAAAElFTkSuQmCC",downArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAgklEQVR4nO2UOwrAIBAF5xKReP+bJFV+TSxynATBQiSI0TXVDggW7htesYKiKIogE7ADRiDLZxzAXPJ4BW7ANcpNyPBZS8nAAJxh4AJshTTNGGsH7R/SFnmztEYuJv0iF5eWyLtJc/Lu0rfddMld4sPJErfs3jTFt9vC6d5UURSFmAePTDtnrV72/QAAAABJRU5ErkJggg==",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAABvUlEQVR4nO2XTUrDQBSAPwXBn7ps0TO4EFfd24obEfQQHqOt4qIewAt4BkFci+610IIW7MpFXQtWxJGRNxBK02k0qTPpfDCUvDbJ+/LezDQQCARmBpWTQe5EfEUFEcdQoSKOoUJFMmIZOAG6wEA+G8CSTxXRyd7F7A+3FhmnRI4lh2egAqwAVaAn8bovIl3JYXsoXpX4ky8iA8mhMBRflfh7miIlYJNsK1IZiu9I/DEtES3RAtrAIunTkBx60k4FkTBzpJaGiJEwvztL3+NnVdKr06hV68by8CYSiUroCfcpo5yBjE62LvcZyGdtgg6wihSBB/muA6xJNcyxbaOaFmqcSLQSLTlGnk5b4s2YCy/giEgpRsJQjrTYHnAAnAJXQD/mnKmLFEe00yialtdOfe76f4mULJWIYlqsL5XQFTmUfWbSa2Qm0kqYQNxqkuSBZCKiLO2UhGiLjmu/rSxEOilJJJH5kF19Pu05Mi30HnQOfMm9r/+wOCgX/v3uAi9y/1dg31cRpBMuI3lcyIuVdyKaOeAIeLPMqXHDCRHDBnCfB5HfEERcQ4XWcgwVKuIYKrcVUZ4PciMSCARmgG9mLvK/OR2iiQAAAABJRU5ErkJggg==",flag:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIUAAACBCAYAAADuS3kqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACfRJREFUeJztnXuIXNUdx913shutjfVBqtGFupuZ3Xnd9zz3Ne/dYKEo/isSEGqFSlslSFBi2kStSqkiCEGl1D/ECP4hKLYmTUziZjfRjUl8FzU0pbJLtIlJ1t2N37PZQHBM9t67d845d+b3hS8z9+59nfP73N/5nZnZmcsuI5FIJJJE0pOlpqg+2NwbTbUEQlZLd4/ecnNAbT3vrqDWuqbXbA1GEq0RbaBFSxSbRF8zySOF1b5G1cqtDCl93Xhcq1r530X1gYeMVHlUTxSPYnkqZgydBCDTCP4cfJY9YnkG608pVu44gDiGbXdFtP6N2P4+xcwWw2p/AH/vwHYEi+xC8BoQrOUI1q3wk1jeA39ppIZPm+nhOSuz9uxSjePMmjgeYPlIjeffCGt9vwcoAZyvRXT7SQvCUHAFAjIIGNYjUP/A8gkzPbLk4DsxzjmtJQrjgGNzVBtI4FpaRfdL3QkdvwypPaPFC5uMZGkcmQAgDHMF4cezyMickSxPApLtuL518C8AS6Po/qppYShYjbtwHdL2q3qyfEo0BIsMM3OoXY4iez0AeDvNVLlBdP/VjHC3tQGComLmtgGE06KD7caA42u0YyOK3JVL7hAccAW8DR5d8L6LeAze6kEMpBIq/lvUeGEn7rrvRAd26ZljZE5PFg+j7uhH1nA/pOBgP4E/sXni3R7GQ5gwdbwaIGzAuPwpagVPZgwyGVnjjBYvbsEweLmrDqonKBQru0q18vdjDJ4UHbhqm9UbGBJfQpHc5bijcIArah0KFI8rAMPdyAzHWIoVHTCOnsFM5UHHHVbLUKDwuhLTtQ1Ip/+TIEAiPAsoNjruOIdQ7KlC7DwXIOjQ4vlfYZjYgTQ6I0FwfAnFx7UCRdQY7EIR+SJgmJYgKKJd31AoZu46DTAgSxAMHkBxuZ+hAAjNmHr9AUPFvyUIgmyuLygw1boKReSv8fhxnc0onELxsOPO9RsUmHtfjaxwJ4aJccBwRoKOl9lcoNhbhTjbEoaIFTEzu05Plj63MpQZ6hYKI1VqiZlD3agb/gYYpmiYkBiKrqDeGlIyN1jpYc8/6ME+PBLVB8PICvdgmHgbU8uTEnSuX+0aihVOoQAQIRR5n8HPhrW+jGrl25YCgmJmGwFCGhlhA471MrLCccoKnkGxiQsUCGAMQZv/AAoeZ1D8/Ze9RqBYubvwPN8TSXZim9W406/HRf0cvhLPVyELrAZQnRGtP6InSndgm3uxfif2+8pIDc9K0Im1ZjFQ/MBz7GVlzAxO4vFrKz0yhXWTWP4cy5PY5zj7WBt7a5dtK0Gn1bqXBMVHNk/yDtsHd3z0IlCQ5TJBQfYOig6CombNEQozGwEU30rQaPLiUPyRCxSYQoYJCl+YCxSj56DIERT+MEcorFyIoPCF+UGhnoOCXn6W366haHcORb6XoPCFZ40ULyjiBIVPzBOKAkHhD7N/QP6TWyg+tHmSfWwfLVHoISh8YZ5QFINWeuSEBI0mywKFTlD4xa6hWO4YimQpYGUICh+YoCCLgWLsHBRlQLGWoJDfDIrNvKBYg+f/l6DRZFmgMAgKv5gjFKlyN0HhCwOKYVdQLHMKhZkaJij8YY5QpEe68PwbCRpNXhyKLW6h+MDmScYXMsWNOFnNf5lYDZgfFOynCmJm1m52IdcDFDcHVPZFIXb3IfsQijbnUGiAIntEgkaTZYGiKwgoTILCB2ZQPFJtKPZfAMVhCRpNlgiKJoWg8IN5QqE3IVMckqDRZFmg6O4hKHxi11C0uoECw8f7EjSaLA8UBqDIERTym0HxaLWhOHABFAclaDS5ilDYfc2BoPCXOULROw/FhASNJlcJihanUKzpNQkKf5g7FO9J0Gjy4lA8xguKRoLCF+YCxbvzUISsRsXKvStBo8kEBVlaKAKAQrVyByRoNLlKUDQ7hyIOKPIEhfzmCEV4Hor9EjSavDgUfyYoyJ5BYfcDM++xfYLhBINiXIJGkwkKMi8omhxDEQEU8fyYBI0mywJFTyRJUPjDXKFo0OKFfRI0mrw4FI9XG4qJeSiiBIVfzBuKUdENJksFRapBJSh8YbdQNDqFovccFO+IbjBZJihiKTZ8EBQ+MEco0gyKvaIbLKPN9MhZLVE4ZaTKX+nJ0ljUGHpBtfLPaoni01j+q5Es/0WHsfwUsu0zMTO7VbVyryF4x7DuhNe/3IzjPuEWCrv/7XWQ7RMiKM4DwKZ8JxHcCS1ReiOiDdyvxvO3OQ7Cgsz0MIbl/K1hrf8+gPU6IPoC677zBxRKpgFU7xEdFEEgnEWwvgEIb8aM7DoEsFNPFJrdgnAp4cb7Kc5T1uL5vyPzTFkZ51mENxS7RQeIlwHBDIJzULFyW5ANBsJqX4PnBCwiPVFcFlb7h5BJngcgtr+Z0C0UDQRFpdnQABjYOP9yVB8soc3XeB5pF0L2aAYYA7i25wDHot9QyBGKvpqFYr5QjBcOozjcHDUGA4qZ5Z4V7ArXVgQcE+yaLwHFk44P7BCK98/vByjeFh1Aj2GYBQzjipn7ZUTrlxaEHxMyx1Zc/4wMUOwSHUgvjDttFiBsQ7V/i5EstnsaLU7SE6V2tOMx+LRQKHSfQ4Gp3oyRLO/AMJEVUThWQ6h9CgDjuDgoksWdogPrEoZpdNx+DBVr0YZGT6MigZDBkyhA/4Ppq3somNxBUfIdFADhQxRntxvJUodnUZBQMTO7CnXGAQYGbyj+JTrI9jLD/ItNX6jxwnpkiZWe9bzkwrD4M7T7Jdj5ex9MLNg2O/nQ+X38AAXS6CSKyMdjxuBNyBI1UTc4EWJ0LWo/xdXOLqHYITrol4BhFrOJ15BCcyi+6g4GT1QrUACGM0ibb0b1gSxqh5orIrnKHRTl7aIhuACGGWSFVzBMpCNaP8HghdxAgTn+WyJBWCggj0aNwU3ICgZlBo/lEop/CgCB/XreFIqn7Sgcf6tauWBYyRAM1RA63O7XH7Kp63zhhuBwgWIhI5zA8LBLsXL3KOZQJ7JCk+g+q3m5gQKB+Q3u1DH23r6RWtqngy4EAMeaRhaaBAB7o8bQw3AhrPa1ITMQCDzlBgoA0RhSMq0IXjceFUwB740ZQw/GzOwzAGU3UvwYZgIT+PshAHQE6z9gZs+x/qAaLxxABhiF34poA6wuWI9tb++NpsL4+40hta8Z56DppCi5geJiYu8nIMDLAUp7IBxvX9NrdHQFdVhbsI51ZnswkliODLAMw0Ibr3aSHMhLKEg1IgdQHCYo6kQItN2vVCYo6kUEBalCBAWpQgQFqUIEBalCDqGg9xrqQQi03Z9pICjqRQQFqUIEBalCBAWpQgQFqUIItN1f+TlCUNSJCApShQgKUoUIClKFCApShRxCQR+grQch0HZ/OZCgqBcRFKQKERSkChEUJBKJRCKRHOh7LktbCRuu/n0AAAAASUVORK5CYII="},PM=({match:e,timeFormat:t})=>{var n,r,i,o;return l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[l.jsxs(p.Typography,{mr:1,children:["[",ut(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?l.jsx(p.Tooltip,{title:e.homeTeam.name,children:l.jsxs(p.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[l.jsx(p.Typography,{children:e.homeTeam.code||e.homeTeam.name}),l.jsx(p.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||Re.team,sx:{width:"20px",height:"20px"}})]})}):l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{children:e.homeTeam.code||e.homeTeam.name}),l.jsx(p.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||Re.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?l.jsx(p.Tooltip,{title:e.awayTeam.name,children:l.jsxs(p.Box,{display:"flex",gap:.5,alignItems:"center",children:[l.jsx(p.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||Re.team,sx:{width:"20px",height:"20px"}})," ",l.jsx(p.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):l.jsxs(l.Fragment,{children:[l.jsx(p.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||Re.team,sx:{width:"20px",height:"20px"}}),l.jsx(p.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},bs=Be(l.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),DM=e=>{const[t,n]=y.useState([]),[r,i]=y.useState([]),[o,a]=y.useState(!1),{sdk:s}=Ye(),c=()=>_(this,null,function*(){try{const h=yield s.topX.getGames({limit:50},!0),g=yield s.matchQuiz.getGames({limit:50},!0),v=[...h.data,...g.data];if(e.related&&e.related.length>0){const m=v.filter(b=>{var x;return(x=e.related)==null?void 0:x.some(S=>S.entity_id===b.id)}).map(b=>b.id);n(m)}i(v)}catch(d){console.error(d),f()}}),u=(d,h)=>{const g=h.map(v=>({entity_id:v,entity_type:"GAME",entity_relationship:"relatedTo"}));e.onChange(g)},f=()=>a(!o);return y.useEffect(()=>{c()},[]),l.jsxs(l.Fragment,{children:[r.length>0?l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e.label}),l.jsx(p.Select,{multiple:!0,indicator:l.jsx(bs,{}),defaultValue:t,renderValue:d=>l.jsx(p.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:d.map((h,g)=>l.jsx(p.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${g}`))}),onChange:u,sx:{minWidth:"15rem",[`& .${p.selectClasses.indicator}`]:{transition:"0.2s",[`&.${p.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(d=>l.jsx(p.Option,{value:d.id,children:d.title?d.title+` (${d.type})`:`Game with no title (${d.type}). ID: ${d.id}`},`related-game-title-${d.id}`))})]}):l.jsx(l.Fragment,{}),l.jsx(Ke,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:f})]})},OM=e=>{const[t,n]=y.useState([]),[r,i]=y.useState([]),[o,a]=y.useState(!1),{sdk:s}=Ye(),c=()=>_(this,null,function*(){try{const h=yield s.loyalty.getTemplates(void 0,!0);if(e.related&&e.related.length>0){const g=h.data.filter(v=>{var m;return(m=e.related)==null?void 0:m.some(b=>b.entity_id===v.id)}).map(v=>v.id);n(g)}i(h.data)}catch(d){console.error(d),f()}}),u=(d,h)=>{const g=h.map(v=>({entity_id:v,entity_type:"TEMPLATE",entity_relationship:"relatedTo"}));e.onChange(g)},f=()=>a(!o);return y.useEffect(()=>{c()},[]),l.jsxs(l.Fragment,{children:[r.length>0?l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:e.label}),l.jsx(p.Select,{multiple:!0,indicator:l.jsx(bs,{}),defaultValue:t,renderValue:d=>l.jsx(p.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:d.map((h,g)=>l.jsx(p.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${g}`))}),onChange:u,sx:{minWidth:"15rem",[`& .${p.selectClasses.indicator}`]:{transition:"0.2s",[`&.${p.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(d=>l.jsx(p.Option,{value:d.id,children:d.name||`Template with no name. ID: ${d.id}`},`related-template-name-${d.id}`))})]}):l.jsx(l.Fragment,{}),l.jsx(Ke,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:f})]})},xm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),Cm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),RM=e=>{const t=(n,r)=>{if(r==="games"){const i=Cm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=xm(e.related);e.onChange([...n,...i])}};return l.jsxs(l.Fragment,{children:[l.jsx(DM,{label:e.labels.games,related:xm(e.related),onChange:n=>t(n,"games")}),l.jsx(OM,{label:e.labels.templates,related:Cm(e.related),onChange:n=>t(n,"templates")})]})},MM=(e,t)=>{const[n,r]=y.useState(null),{https:i}=Ye(),o=()=>_(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const s=yield a.json();r(s.data);return}r([])});return y.useEffect(()=>(o(),()=>r(null)),[e,t]),n},hi=({my:e})=>l.jsx(p.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:l.jsx(p.CircularProgress,{variant:"solid",color:"neutral"})}),LM=["PENDING","LIVE","SETTLED"],BM=["OPEN"],$M=["ACTIVE","INACTIVE","EXPIRED"],FM=new Map().set("PENDING","Pending").set("LIVE","Live").set("SETTLED","Settled").set("CANCELED","Canceled").set("OPEN","Open").set("ACTIVE","Active").set("INACTIVE","Inactive").set("PENDING","Pending").set("EXPIRED","Expired"),wm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="PERSONALITY_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from($M):e.entityType==="TEMPLATE"?t=Array.from(LM):t=Array.from(BM),l.jsx(l.Fragment,{children:t.map(n=>l.jsx(p.Option,{value:n,children:FM.get(n)},`${e.entityType}-${n}-status`))})};class NM{constructor(){X(this,"name","");X(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});X(this,"trigger",{trigger_type:"DATETIME",date:""})}}const zM=Be(l.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded"),jM=e=>{const[t,n]=y.useState(!1),{https:r}=Ye(),i=o=>_(this,null,function*(){if(o.stopPropagation(),n(!0),(yield r.deleteScheduledTask(e.taskId)).ok){n(!1),e.toggleToast("success",e.labels.deleteScheduledTaskMessage),e.refetchTasks(),e.toggleModal();return}n(!1),e.toggleToast("danger",e.labels.deleteScheduledTaskErrorMessage)});return l.jsx(l.Fragment,{children:l.jsx(p.Modal,{open:e.isOpen,onClose:e.toggleModal,children:l.jsxs(p.ModalDialog,{children:[l.jsxs(p.DialogTitle,{children:[l.jsx(zM,{}),e.labels.deleteScheduledTaskModalTitle]}),l.jsx(p.Divider,{}),l.jsx(p.DialogContent,{children:l.jsxs(p.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,l.jsx(p.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),l.jsxs(p.DialogActions,{children:[l.jsx(p.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),l.jsx(p.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},UM=e=>{const[t,n]=y.useState(null),[r,i]=y.useState(""),[o,a]=y.useState(""),[s,c]=y.useState(""),[u,f]=y.useState(""),[d,h]=y.useState(!1),[g,v]=y.useState(!1),[m,b]=y.useState(!1),[x,S]=y.useState("success"),[C,I]=y.useState(""),[w,A]=y.useState(!1),E=y.useRef(!1),k=MM(e.entityId,E.current),{https:$}=Ye();if(!k)return l.jsx(hi,{my:10});const G=()=>A(!w),O=(M,V)=>{b(!0),S(M),I(V)},T=(M,V)=>{i(V.scheduled_task_config.change.status),c(V.trigger.date),n(M)},N=()=>_(this,null,function*(){h(!0);const M=F("CREATE","");if((yield $.setSchedulers(M,"CREATE",null)).ok){h(!1),a(""),f(""),E.current=!E.current,O("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),f(""),O("danger",e.labels.createScheduledTaskErrorMessage)}),H=(M,V)=>_(this,null,function*(){v(!0);const Y=F("UPDATE",V);if((yield $.setSchedulers(Y,"UPDATE",M)).ok){v(!1),n(null),i(""),c(""),E.current=!E.current,O("success",e.labels.updateScheduledTaskMessage);return}v(!1),O("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),c("")}),j=()=>{E.current=!E.current},F=(M,V)=>{const Y=new NM,Z=M==="CREATE"?o:r,D=M==="CREATE"?null:V,L=M==="CREATE"?u:s;return Y.scheduled_task_config.entity_id=e.entityId,Y.scheduled_task_config.entity_type=e.entityType,Y.scheduled_task_config.change.status=Z,Y.trigger.date=L,Y.name=D,Y};return l.jsxs(l.Fragment,{children:[k.map((M,V)=>l.jsx(p.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:l.jsx(p.CardContent,{children:t===V?l.jsxs(p.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[l.jsxs(p.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),l.jsx(p.Select,{value:r,size:"sm",name:"status",onChange:(Y,Z)=>i(Z),sx:{minHeight:"36px"},children:l.jsx(wm,{entityType:e.entityType})})]}),l.jsxs(p.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:e.labels.at}),l.jsx(tu,{defaultDate:s,onChange:Y=>c(Y)})]}),r&&s?l.jsx(p.Button,{onClick:()=>H(M.id,M.name),loading:g,sx:{mt:"auto"},children:e.labels.save}):l.jsx(p.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):l.jsxs(p.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[l.jsxs(p.Box,{children:[l.jsxs(p.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",l.jsx(p.Typography,{whiteSpace:"wrap",children:M.name})]}),l.jsxs(p.Typography,{style:{color:"gray"},children:[e.labels.status,": ",l.jsx(p.Typography,{whiteSpace:"wrap",children:M.status})]})]}),!e.readOnly&&l.jsxs(p.Box,{children:[l.jsx(p.Tooltip,{title:e.labels.edit,children:l.jsx(p.IconButton,{onClick:()=>T(V,M),children:l.jsx(Oe.Edit,{})})}),l.jsx(p.Tooltip,{title:e.labels.delete,children:l.jsx(p.IconButton,{onClick:G,children:l.jsx(Oe.Delete,{})})})]}),l.jsx(jM,{labels:e.labels,isOpen:w,taskId:M.id,taskName:M.name,toggleModal:G,refetchTasks:j,toggleToast:O})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${M.id}`)),!e.readOnly&&l.jsxs(p.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:k&&k.length?2:0},children:[l.jsxs(p.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),l.jsx(p.Select,{value:o,size:"sm",name:"status",onChange:(M,V)=>a(V),sx:{minHeight:"37px"},children:l.jsx(wm,{entityType:e.entityType})})]}),l.jsxs(p.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:e.labels.at}),l.jsx(tu,{defaultDate:u,onChange:M=>f(M)})]}),o&&u?l.jsx(p.Button,{onClick:N,loading:d,sx:{mt:"auto"},children:e.labels.create}):l.jsx(p.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),l.jsx(Ke,{showToast:m,message:C,color:x,hideToast:()=>b(!1)})]})};function VM(e){return lt("MuiIconButton",e)}We("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const HM=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],WM=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:s}=e,c={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${xe(a)}`,t&&`color${xe(t)}`,o&&`size${xe(o)}`,s&&"loading"],loadingIndicator:["loadingIndicator"]},u=ht(c,VM,{});return r&&i&&(u.root+=` ${i}`),u},GM=ye("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.instanceSize&&{"--IconButton-size":{sm:"2rem",md:"2.25rem",lg:"2.75rem"}[t.instanceSize]},t.size==="sm"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2rem) / 1.6)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2rem)",minHeight:"var(--IconButton-size, 2rem)",fontSize:e.vars.fontSize.sm,paddingInline:"2px"},t.size==="md"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.25rem) / 1.5)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2.25rem)",minHeight:"var(--IconButton-size, 2.25rem)",fontSize:e.vars.fontSize.md,paddingInline:"0.25rem"},t.size==="lg"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.75rem) / 1.571)","--CircularProgress-size":"28px","--CircularProgress-thickness":"4px",minWidth:"var(--IconButton-size, 2.75rem)",minHeight:"var(--IconButton-size, 2.75rem)",fontSize:e.vars.fontSize.lg,paddingInline:"0.375rem"},{WebkitTapHighlightColor:"transparent",paddingBlock:0,fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,margin:"var(--IconButton-margin)",borderRadius:`var(--IconButton-radius, ${e.vars.radius.sm})`,border:"none",boxSizing:"border-box",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",[e.focus.selector]:R({"--Icon-color":"currentColor"},e.focus.default)}),R({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":R({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':R({"--Icon-color":"currentColor"},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]),"&:disabled":(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]})]}),YM=ye(GM,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),KM=ye("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return R({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),Sm=K.forwardRef(function(t,n){var r;const i=pt({props:t,name:"JoyIconButton"}),{children:o,action:a,component:s="button",color:c="neutral",disabled:u,variant:f="plain",loading:d=!1,loadingIndicator:h,size:g="md",slots:v={},slotProps:m={}}=i,b=Te(i,HM),x=K.useContext(Lp),S=K.useContext(Bp),C=t.variant||x.variant||f,I=t.size||x.size||g,w=t.color||x.color||c,A=(r=t.loading||t.disabled)!=null?r:x.disabled||d||u,E=K.useRef(null),k=cn(E,n),{focusVisible:$,setFocusVisible:G,getRootProps:O}=Yl(R({},i,{disabled:A,rootRef:k})),T=h!=null?h:l.jsx(Rp,{color:w,thickness:{sm:2,md:3,lg:4}[I]||3});K.useImperativeHandle(a,()=>({focusVisible:()=>{var L;G(!0),(L=E.current)==null||L.focus()}}),[G]);const N=R({},i,{component:s,color:w,disabled:A,variant:C,loading:d,size:I,focusVisible:$,instanceSize:t.size}),H=WM(N),j=L=>{var U;let W=i.onClick;if(typeof m.root=="function"?W=m.root(N).onClick:m.root&&(W=m.root.onClick),(U=W)==null||U(L),S){var ie;(ie=S.onClick)==null||ie.call(S,L,i.value)}};let F=i["aria-pressed"];typeof m.root=="function"?F=m.root(N)["aria-pressed"]:m.root&&(F=m.root["aria-pressed"]),S!=null&&S.value&&(Array.isArray(S.value)?F=S.value.indexOf(i.value)!==-1:F=S.value===i.value);const M=R({},b,{component:s,slots:v,slotProps:m}),[V,Y]=Ae("root",{ref:n,className:H.root,elementType:YM,getSlotProps:O,externalForwardedProps:M,ownerState:N,additionalProps:{onClick:j,"aria-pressed":F}}),[Z,D]=Ae("loadingIndicator",{className:H.loadingIndicator,elementType:KM,externalForwardedProps:M,ownerState:N});return l.jsx(V,R({},Y,{children:d?l.jsx(Z,R({},D,{children:T})):o}))});Sm.muiName="IconButton";const Im=Be(l.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),QM=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(c){var u,f;return c?l.jsxs(l.Fragment,{children:[l.jsx(p.ListItemDecorator,{children:l.jsx(p.Avatar,{size:"sm",src:((f=(u=n.find(d=>d.id===c.value))==null?void 0:u.assets)==null?void 0:f.logo)||Re.competition})}),c.label]}):null}const a=y.useRef(null),s=(c,u)=>{i(u)};return l.jsxs(p.FormControl,{sx:{mb:1},children:[l.jsx(p.FormLabel,{required:r,color:"primary",children:e}),l.jsx(p.Select,q(B({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:s},t&&{endDecorator:l.jsx(Sm,{variant:"plain",color:"neutral",onMouseDown:c=>{c.stopPropagation()},onClick:()=>{var c;i(""),(c=a.current)==null||c.focusVisible()},sx:{width:"18px",height:"18px"},children:l.jsx(Im,{})}),indicator:null}),{children:n.map((c,u)=>{var f;return l.jsxs(y.Fragment,{children:[u!==0?l.jsx(p.ListDivider,{role:"none"}):null,l.jsxs(p.Option,{value:c.id,label:c.name,children:[l.jsx(p.ListItemDecorator,{children:l.jsx(p.Avatar,{size:"sm",src:((f=c.assets)==null?void 0:f.logo)||Re.competition})}),c.name]})]},`${c.id}-${u}`)})}))]})};function qM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Am=qM,JM=typeof $t=="object"&&$t&&$t.Object===Object&&$t,XM=JM,ZM=XM,eL=typeof self=="object"&&self&&self.Object===Object&&self,tL=ZM||eL||Function("return this")(),Tm=tL,nL=Tm,rL=function(){return nL.Date.now()},iL=rL,oL=/\s/;function aL(e){for(var t=e.length;t--&&oL.test(e.charAt(t)););return t}var sL=aL,lL=sL,cL=/^\s+/;function uL(e){return e&&e.slice(0,lL(e)+1).replace(cL,"")}var dL=uL,fL=Tm,hL=fL.Symbol,xu=hL,Em=xu,km=Object.prototype,pL=km.hasOwnProperty,gL=km.toString,vo=Em?Em.toStringTag:void 0;function mL(e){var t=pL.call(e,vo),n=e[vo];try{e[vo]=void 0;var r=!0}catch(o){}var i=gL.call(e);return r&&(t?e[vo]=n:delete e[vo]),i}var vL=mL,bL=Object.prototype,yL=bL.toString;function xL(e){return yL.call(e)}var CL=xL,_m=xu,wL=vL,SL=CL,IL="[object Null]",AL="[object Undefined]",Pm=_m?_m.toStringTag:void 0;function TL(e){return e==null?e===void 0?AL:IL:Pm&&Pm in Object(e)?wL(e):SL(e)}var EL=TL;function kL(e){return e!=null&&typeof e=="object"}var _L=kL,PL=EL,DL=_L,OL="[object Symbol]";function RL(e){return typeof e=="symbol"||DL(e)&&PL(e)==OL}var Dm=RL,ML=dL,Om=Am,LL=Dm,Rm=NaN,BL=/^[-+]0x[0-9a-f]+$/i,$L=/^0b[01]+$/i,FL=/^0o[0-7]+$/i,NL=parseInt;function zL(e){if(typeof e=="number")return e;if(LL(e))return Rm;if(Om(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Om(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ML(e);var n=$L.test(e);return n||FL.test(e)?NL(e.slice(2),n?2:8):BL.test(e)?Rm:+e}var jL=zL,UL=Am,Cu=iL,Mm=jL,VL="Expected a function",HL=Math.max,WL=Math.min;function GL(e,t,n){var r,i,o,a,s,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(VL);t=Mm(t)||0,UL(n)&&(f=!!n.leading,d="maxWait"in n,o=d?HL(Mm(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function g(A){var E=r,k=i;return r=i=void 0,u=A,a=e.apply(k,E),a}function v(A){return u=A,s=setTimeout(x,t),f?g(A):a}function m(A){var E=A-c,k=A-u,$=t-E;return d?WL($,o-k):$}function b(A){var E=A-c,k=A-u;return c===void 0||E>=t||E<0||d&&k>=o}function x(){var A=Cu();if(b(A))return S(A);s=setTimeout(x,m(A))}function S(A){return s=void 0,h&&r?g(A):(r=i=void 0,a)}function C(){s!==void 0&&clearTimeout(s),u=0,r=c=i=s=void 0}function I(){return s===void 0?a:S(Cu())}function w(){var A=Cu(),E=b(A);if(r=arguments,i=this,c=A,E){if(s===void 0)return v(c);if(d)return clearTimeout(s),s=setTimeout(x,t),g(c)}return s===void 0&&(s=setTimeout(x,t)),a}return w.cancel=C,w.flush=I,w}var YL=GL;const sr=pn(YL),Sn=({option:e})=>l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),l.jsx(p.Typography,{children:e.label}),l.jsx(p.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),Lm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||Re.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||Re.flag}}))||[],KL=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=y.useState([]),[s,c]=y.useState([]),[u,f]=y.useState(!1),[d,h]=y.useState(""),[g,v]=y.useState(!1),{sdk:m}=Ye(),b=()=>v(!g),x=(w,A)=>{a(A),i(A[0]?[A[0].id]:[])},S=3;y.useEffect(()=>{!d&&n&&n.length&&m.football.getCompetitions({competitionIds:n}).then(w=>{a(Lm(w))}).catch(w=>{console.error(w),b(),a([])})},[]);const C=y.useMemo(()=>sr(w=>{f(!0),m.football.getCompetitions({name:w}).then(A=>{c([...Lm(A)]),f(!1)}).catch(A=>{console.error(A),b(),c([]),f(!1)})},300),[]);y.useEffect(()=>{if(!d||d.length<S){c([]);return}return C(d),()=>C.cancel()},[d,C]);const I=(w,A)=>w.map((E,k)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:$=>A({index:k}).onClick($),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:E},`option_${E.id}`)},E.id));return l.jsxs(p.FormControl,{sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{required:r,color:"primary",children:t}),l.jsx(p.Box,{children:l.jsx(p.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:u,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(w,A)=>w.id===A.id,endDecorator:u?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:s,disabled:o.length===1,filterOptions:w=>w.filter(A=>!o.some(E=>E.value===A.value)),onInputChange:(w,A)=>{h(A)},onChange:x,getOptionKey:w=>w.id,value:o,renderTags:I,renderOption:(w,A)=>l.jsx(p.AutocompleteOption,q(B({},w),{children:l.jsx(Sn,{option:A})}))})}),l.jsx(Ke,{showToast:g,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:b})]})},Bm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||Re.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||Re.flag}}))||[],QL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=y.useState([]),[a,s]=y.useState([]),[c,u]=y.useState(!1),[f,d]=y.useState(""),[h,g]=y.useState(!1),{sdk:v}=Ye(),m=()=>g(!h),b=(I,w)=>{o(w);const A=w.map(E=>E.id);r(A&&A.length?A:null)},x=3;y.useEffect(()=>{!f&&t&&t.length&&v.football.getCompetitions({competitionIds:t}).then(I=>{o(Bm(I))}).catch(I=>{console.error(I),m(),o([])})},[]);const S=y.useMemo(()=>sr(I=>{u(!0);const w={name:I,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?w.competitionIds=Array.from(n):delete w.competitionIds,v.football.getCompetitions(w).then(A=>{s([...Bm(A)]),u(!1)}).catch(A=>{console.error(A),m(),s([]),u(!1)})},300),[]);y.useEffect(()=>{if(!f||f.length<x){s([]);return}return S(f),()=>S.cancel()},[f,S]);const C=(I,w)=>I.map((A,E)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>w({index:E}).onClick(k),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:A},`option_${A.id}`)},A.id));return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:{marginBottom:"16px"},children:l.jsx(p.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(I,w)=>I.id===w.id,endDecorator:c?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:I=>I.filter(w=>!i.some(A=>A.value===w.value)),onInputChange:(I,w)=>{d(w)},onChange:b,getOptionKey:I=>I.id,value:i,renderTags:C,renderOption:(I,w)=>l.jsx(p.AutocompleteOption,q(B({},I),{children:l.jsx(Sn,{option:w})}))})}),l.jsx(Ke,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:m})]})},$m=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],qL=({labels:e,ids:t,onChange:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState([]),[s,c]=y.useState(!1),[u,f]=y.useState(""),[d,h]=y.useState(!1),{sdk:g}=Ye(),v=()=>h(!d),m=(C,I)=>{i(I);const w=I.map(A=>A.id);n(w&&w.length?w:null)},b=3;y.useEffect(()=>{!u&&t&&t.length&&g.profile.getByIds(t).then(C=>{i($m(C))}).catch(C=>{v(),console.error(C),i([])})},[]);const x=y.useMemo(()=>sr(C=>{c(!0),g.profile.getByIds([],C).then(I=>{a([...$m(I)]),c(!1)}).catch(I=>{console.error(I),v(),a([]),c(!1)})},300),[]);y.useEffect(()=>{if(!u||u.length<b){a([]);return}return x(u),()=>x.cancel()},[u,x]);const S=(C,I)=>C.map((w,A)=>{var E;return l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>I({index:A}).onClick(k),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=w.avatar)!=null?E:Re.avatar}),l.jsx(p.Typography,{children:w.label})]})},w.id)});return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:{marginBottom:"16px"},children:l.jsx(p.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(C,I)=>C.id===I.id,endDecorator:s?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:C=>C.filter(I=>!r.some(w=>w.value===I.value)),onInputChange:(C,I)=>{f(I)},onChange:m,getOptionKey:C=>C.id,value:r,renderTags:S,renderOption:(C,I)=>{var w;return l.jsx(p.AutocompleteOption,q(B({},C),{children:l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(w=I.avatar)!=null?w:Re.avatar}),l.jsx(p.Typography,{children:I.label})]})}))}})}),l.jsx(Ke,{showToast:d,message:e.searchProfilesErrorMessage,color:"danger",hideToast:v})]})},Fm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Team with no name",label:t.name?t.name:"Team with no name",logo:((n=t.assets)==null?void 0:n.logo)||Re.team,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||Re.flag}}))||[],Nm=({labels:e,ids:t,scope:n,readOnly:r,AdditionalCheckbox:i,onChange:o})=>{const[a,s]=y.useState([]),[c,u]=y.useState([]),[f,d]=y.useState(!1),[h,g]=y.useState(""),[v,m]=y.useState(!1),{sdk:b}=Ye(),x=()=>m(!v),S=(A,E)=>{s(E),o(E)},C=3;y.useEffect(()=>{!h&&t&&t.length&&b.football.getTeams({teamIds:t,scope:n}).then(A=>{const E=A.data.filter(k=>!k.name.includes("/"));s(Fm(E))}).catch(A=>{console.error(A),x(),s([])})},[]);const I=y.useMemo(()=>sr((A,E)=>{d(!0),b.football.getTeams({name:A,scope:E}).then(k=>{const $=k.data.filter(G=>!G.name.includes("/"));u([...Fm($)]),d(!1)}).catch(k=>{console.error(k),x(),u([]),d(!1)})},300),[]);y.useEffect(()=>{if(!h||h.length<C){u([]);return}return I(h,n),()=>I.cancel()},[h,I]);const w=(A,E)=>A.map((k,$)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:G=>E({index:$}).onClick(G),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:k},`option_${k.id}`)},k.id));return l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{sx:{marginBottom:"16px"},children:[l.jsx(p.Autocomplete,{readOnly:r||!1,forcePopupIcon:!1,multiple:!0,loading:f,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38,marginBottom:i?1:0}}},isOptionEqualToValue:(A,E)=>A.id===E.id,endDecorator:f?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:a.length>0?"":e.teamsSelectionPlaceholder,options:c,filterOptions:A=>A.filter(E=>!a.some(k=>k.value===E.value)),onInputChange:(A,E)=>{g(E)},onChange:S,getOptionKey:A=>A.id,value:a,renderTags:w,renderOption:(A,E)=>l.jsx(p.AutocompleteOption,q(B({},A),{children:l.jsx(Sn,{option:E})}))}),i]}),l.jsx(Ke,{showToast:v,message:e.searchTeamsErrorMessage,color:"danger",hideToast:x})]})},JL=({checked:e,disabled:t,sx:n,onChange:r})=>{const i=n?B({},n):{ml:1};return l.jsx(p.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:o=>r(o.target.checked),sx:q(B({},i),{"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${p.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}})})},pi=({label:e,labelPosition:t="start",defaultValue:n,description:r,disabled:i,descriptionColor:o,sx:a,onChange:s})=>{const c=l.jsx(JL,{checked:n,disabled:i,onChange:s,sx:a==null?void 0:a.switch}),u=a!=null&&a.container?B({},a.container):{mb:2},f=a!=null&&a.label?B({},a.label):{};return r?l.jsxs(p.Box,{sx:B({},u),children:[l.jsx(p.Typography,{component:"label",startDecorator:t=="start"?void 0:c,endDecorator:t=="start"?c:void 0,sx:f,children:e}),l.jsx(p.Typography,{level:"body-sm",color:o||"neutral",children:r})]}):l.jsx(p.Typography,{sx:Object.keys(f)?B({},f):{mb:2},component:"label",startDecorator:t=="start"?void 0:c,endDecorator:t=="start"?c:void 0,children:e})},XL={control:(e,t)=>q(B({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px","&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(B({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(B({},e),{minHeight:"36px"}),menu:e=>q(B({},e),{position:"relative"}),clearIndicator:e=>q(B({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(B({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(B({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(B({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>q(B({},e),{color:"#333"})},ZL=e=>e.map(t=>({label:t,value:t})),zm=e=>{const[t,n]=y.useState(""),[r,i]=y.useState(!1),o=ZL(e.tags),a=()=>i(!r),s=d=>{e.onChange(d.map(h=>h.value))},c=d=>{n(d)},u=d=>{d.persist();const{key:h}=d;if(t)switch(h){case"Enter":case"Tab":if(e.tags&&e.tags.length===0){const g=[...e.tags,t];e.onChange(g)}if(e.tags&&e.tags.length>0&&f()){const g=[...e.tags,t];e.onChange(g)}n(""),d.preventDefault()}},f=()=>{let d=!1;return e.tags&&e.tags.length&&e.tags.includes(t)?(a(),d):(d=!0,d)};return l.jsxs(l.Fragment,{children:[l.jsx(vm,{styles:XL,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:s,onInputChange:c,onKeyDown:u,placeholder:e.labels.tagsPlaceholder,value:o}),l.jsx(Ke,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},e2=Be(l.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class jm{constructor(){X(this,"contestId","");X(this,"contestType","");X(this,"description","");X(this,"userList",[])}}const t2=(e,t,n)=>{const[r,i]=y.useState(null),{sdk:o}=Ye(),a=()=>_(this,null,function*(){try{let s;switch(t){case"top_x":s=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":s=yield o.matchQuiz.getGameWinners(e,!0);break;default:s=yield o.loyalty.getTemplateWinners(e,!0)}s.userList&&s.userList.forEach(c=>{c.tags||(c.tags=[])}),i(s)}catch(s){const c=o.helpers.getSDKConfiguration();let u=null;c.errorHandlingMode==="standard"?u=s.error:u=s.data.error,u.code!==404&&u.status!=="code_unknown_contest"&&n(),i(new jm)}});return y.useEffect(()=>{a()},[]),r};class n2{constructor(){X(this,"position","");X(this,"profileId","");X(this,"note","");X(this,"tags",[])}}function r2(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var i2=r2,o2=Array.isArray,a2=o2,Um=xu,s2=i2,l2=a2,c2=Dm,u2=1/0,Vm=Um?Um.prototype:void 0,Hm=Vm?Vm.toString:void 0;function Wm(e){if(typeof e=="string")return e;if(l2(e))return s2(e,Wm)+"";if(c2(e))return Hm?Hm.call(e):"";var t=e+"";return t=="0"&&1/e==-u2?"-0":t}var d2=Wm,f2=d2;function h2(e){return e==null?"":f2(e)}var Gm=h2;function p2(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}var g2=p2;function m2(e){return function(t){return e==null?void 0:e[t]}}var v2=m2,b2=v2,y2={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},x2=b2(y2),C2=x2,w2=C2,S2=Gm,I2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,A2="\\u0300-\\u036f",T2="\\ufe20-\\ufe2f",E2="\\u20d0-\\u20ff",k2=A2+T2+E2,_2="["+k2+"]",P2=RegExp(_2,"g");function D2(e){return e=S2(e),e&&e.replace(I2,w2).replace(P2,"")}var O2=D2,R2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function M2(e){return e.match(R2)||[]}var L2=M2,B2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function $2(e){return B2.test(e)}var F2=$2,Ym="\\ud800-\\udfff",N2="\\u0300-\\u036f",z2="\\ufe20-\\ufe2f",j2="\\u20d0-\\u20ff",U2=N2+z2+j2,Km="\\u2700-\\u27bf",Qm="a-z\\xdf-\\xf6\\xf8-\\xff",V2="\\xac\\xb1\\xd7\\xf7",H2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",W2="\\u2000-\\u206f",G2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qm="A-Z\\xc0-\\xd6\\xd8-\\xde",Y2="\\ufe0e\\ufe0f",Jm=V2+H2+W2+G2,Xm="['’]",Zm="["+Jm+"]",K2="["+U2+"]",ev="\\d+",Q2="["+Km+"]",tv="["+Qm+"]",nv="[^"+Ym+Jm+ev+Km+Qm+qm+"]",q2="\\ud83c[\\udffb-\\udfff]",J2="(?:"+K2+"|"+q2+")",X2="[^"+Ym+"]",rv="(?:\\ud83c[\\udde6-\\uddff]){2}",iv="[\\ud800-\\udbff][\\udc00-\\udfff]",gi="["+qm+"]",Z2="\\u200d",ov="(?:"+tv+"|"+nv+")",eB="(?:"+gi+"|"+nv+")",av="(?:"+Xm+"(?:d|ll|m|re|s|t|ve))?",sv="(?:"+Xm+"(?:D|LL|M|RE|S|T|VE))?",lv=J2+"?",cv="["+Y2+"]?",tB="(?:"+Z2+"(?:"+[X2,rv,iv].join("|")+")"+cv+lv+")*",nB="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rB="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",iB=cv+lv+tB,oB="(?:"+[Q2,rv,iv].join("|")+")"+iB,aB=RegExp([gi+"?"+tv+"+"+av+"(?="+[Zm,gi,"$"].join("|")+")",eB+"+"+sv+"(?="+[Zm,gi+ov,"$"].join("|")+")",gi+"?"+ov+"+"+av,gi+"+"+sv,rB,nB,ev,oB].join("|"),"g");function sB(e){return e.match(aB)||[]}var lB=sB,cB=L2,uB=F2,dB=Gm,fB=lB;function hB(e,t,n){return e=dB(e),t=n?void 0:t,t===void 0?uB(e)?fB(e):cB(e):e.match(t)||[]}var pB=hB,gB=g2,mB=O2,vB=pB,bB="['’]",yB=RegExp(bB,"g");function xB(e){return function(t){return gB(vB(mB(t).replace(yB,"")),e,"")}}var CB=xB,wB=CB,SB=wB(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),IB=SB;const AB=pn(IB);class TB{constructor(){X(this,"id","");X(this,"value","");X(this,"label","")}}class EB extends TB{constructor(){super(...arguments);X(this,"logo","");X(this,"countryFlag","");X(this,"countryName","")}}class uv extends EB{constructor(){super(...arguments);X(this,"group","")}}const kB=(e,t)=>t||e||"-------------",wu=(e,t)=>Array.isArray(e)?e.map(n=>wu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>q(B({},n),{[AB(r)]:wu(e[r])}),{}):e,dv=e=>{const t=[];return e.competitions.forEach(n=>{t.push(Su(n,"competition"))}),e.teams.forEach(n=>{t.push(Su(n,"team"))}),e.players.forEach(n=>{t.push(Su(n,"player"))}),t},Su=(e,t)=>{var r,i,o,a,s;const n=new uv;return n.label=e.name,n.value=e.id,n.id=e.id,n.group=t,t==="player"?n.logo=((r=e.assets)==null?void 0:r.headshot)||Re.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||Re.team:n.logo=((o=e.assets)==null?void 0:o.logo)||Re.competition,n.countryName=e.country.name,n.countryFlag=((s=(a=e.country)==null?void 0:a.assets)==null?void 0:s.flag)||Re.country,n},_B=e=>{switch(e){case"CLASSIC_QUIZ":return"success";case"EITHER_OR":return"success";case"POLL":return"warning";case"TOP_X":return"primary";case"MATCH_QUIZ":return"primary";case"LEADERBOARD_TEMPLATES":return"neutral";default:return"neutral"}},PB=e=>{switch(e){case"CLASSIC_QUIZ":return"CLASSIC QUIZ";case"EITHER_OR":return"EITHER/OR";case"POLL":return"POLL";case"TOP_X":return"TOP X";case"MATCH_QUIZ":return"MATCH QUIZ";case"LEADERBOARD_TEMPLATES":return"LEADERBOARD TEMPLATES"}},DB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var b,x,S,C,I,w;const[o,a]=y.useState(t.position),[s,c]=y.useState(t.note),[u,f]=y.useState(t.tags),d=o||s||u.length>0,h=A=>{A.persist();const{value:E}=A.target;a(E),r("position",E)},g=A=>{A.persist();const{value:E}=A.target;c(E),r("note",E)},v=A=>{f(A),r("tags",A)},m=()=>{a(""),c(""),f([]),i()};return l.jsxs("tr",{style:{backgroundColor:d?"rgb(255 237 213)":""},children:[l.jsx("td",{children:l.jsx(p.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),l.jsx("td",{children:l.jsxs(p.Box,{display:"flex",alignItems:"center",children:[l.jsx(p.Avatar,{src:((b=e.profileModel)==null?void 0:b.avatar)||"",alt:((x=e.profileModel)==null?void 0:x.name)||"Unknown",sx:{mr:1}}),l.jsxs(p.Box,{children:[l.jsxs(p.Typography,{fontWeight:"md",children:[kB((S=e.profileModel)==null?void 0:S.name,(C=e.profileModel)==null?void 0:C.nickname),"  ",(I=e.profileModel)!=null&&I.name?l.jsxs(p.Typography,{children:["(",(w=e.profileModel)==null?void 0:w.name,")"]}):l.jsx(l.Fragment,{})]}),l.jsx(p.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),l.jsx("td",{style:{textAlign:"center"},children:e.points}),l.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),l.jsx("td",{children:l.jsx(p.Input,{name:"note",value:s,placeholder:"This user has...",onChange:g,sx:{backgroundColor:"#fff"}})}),l.jsx("td",{children:l.jsx(zm,{labels:n,tags:u,onChange:v})}),l.jsx("td",{children:l.jsx(p.Tooltip,{title:n.clearWinner,children:l.jsx(p.IconButton,{onClick:m,variant:"outlined",color:"danger",disabled:!d,children:l.jsx(Oe.Remove,{})})})})]})},OB=e=>{const t=(i,o,a)=>{if(e.winners.find(f=>f.profileId===i)){const f=e.winners.map(d=>d.profileId===i?q(B({},d),{[o]:a}):d);r(f);return}const c=new n2;c.profileId=i,c[o]=a;const u=[...e.winners,c];r(u)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>q(B({},o),{userList:i}))};return e.leaderboard?l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?l.jsx(p.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):l.jsx(l.Fragment,{}),l.jsxs(p.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:last-child, & > tbody > tr > td:last-child":{textAlign:"center",width:"50px"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"}},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{style:{width:"70px"},children:e.labels.position}),l.jsx("th",{children:e.labels.nicknameAndName}),l.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),l.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),l.jsx("th",{children:e.labels.note}),l.jsx("th",{children:e.labels.tags}),l.jsx("th",{children:e.labels.actions})]})}),l.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>l.jsx(DB,{winner:e.winners.find(o=>o.profileId===i.profileId)||{position:"",profileId:"",note:"",tags:[]},profile:i,labels:e.labels,onChange:(o,a)=>t(i.profileId,o,a),onRemove:()=>n(i.profileId)},`winner-profile-${i.profileId}`)):l.jsx(l.Fragment,{}),l.jsx("tr",{children:l.jsx("td",{colSpan:7,children:e.hasMoreParticipants?l.jsx(p.Box,{textAlign:"center",my:1,children:l.jsx(p.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):l.jsx(l.Fragment,{})})})]})]})]}):l.jsx(hi,{my:40})},RB=(e,t,n,r,i)=>{const[o,a]=y.useState(null),[s,c]=y.useState(!1),[u,f]=y.useState(!1),{sdk:d}=Ye(),h=()=>_(this,null,function*(){f(!0);const g={limit:10,page:r},v=!0;try{let m;t==="template"?m=yield d.loyalty.getLeaderboard(e,g,v):m=yield d.loyalty.getLeaderboardForGame(e,g,v),m.meta.pagination.numberOfPages>r?c(!0):c(!1),o&&o.length?a(b=>[...b,...m.data]):a(m.data)}catch(m){console.error(m),i("danger",n),a([])}f(!1)});return y.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:s,isLeaderboardLoading:u}};class MB{constructor(){X(this,"isValid",!0);X(this,"message","");X(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));X(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});X(this,"validateWinnerIds",(t,n)=>{const r=t.map(o=>o.profileId),i=new Set(r);r.length!==i.size&&(this.isValid=!1,this.message=n)})}}const LB=e=>{const t=e.winners.userList.length>0&&(e.winners.userList[0].position||e.winners.userList[0].profileId||e.winners.userList[0].note||e.winners.userList[0].tags.length);return l.jsx(p.Card,{variant:"plain",children:t?l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),l.jsx(p.Sheet,{children:l.jsxs(p.Table,{sx:{"& > thead > tr > th:nth-of-type(n + 3), & > tbody > tr > td:nth-of-type(n + 3)":{textAlign:"right"},"& > thead > tr > th:nth-of-type(3), & > thead > tr > th:nth-of-type(4), & > tbody > tr > td:nth-of-type(3), & > tbody > tr > td:nth-of-type(4)":{fontSize:"sm",display:{xs:"none",md:"table-cell"}}},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{style:{width:"3%"},children:"#"}),l.jsx("th",{children:e.labels.name}),l.jsx("th",{children:e.labels.note}),l.jsx("th",{children:e.labels.tags})]})}),l.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return l.jsxs("tr",{children:[l.jsx("td",{children:n.position}),l.jsx("td",{children:l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[l.jsx(p.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),l.jsxs(p.Box,{textAlign:"left",children:[l.jsxs(p.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",l.jsxs(p.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),l.jsx(p.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),l.jsx("td",{children:n.note}),l.jsx("td",{children:n.tags.map(o=>l.jsx(p.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):l.jsx(p.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},BB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new jm,$B=e=>{var w;const[t,n]=y.useState(BB(e.winners)),[r,i]=y.useState(((w=e.winners)==null?void 0:w.description)||""),[o,a]=y.useState(!1),[s,c]=y.useState(1),[u,f]=y.useState(!1),[d,h]=y.useState("danger"),[g,v]=y.useState(""),m=(A,E)=>{h(A),v(E),f(!0)},{leaderboard:b,hasMoreParticipants:x,isLeaderboardLoading:S}=RB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,s,m),{https:C}=Ye(),I=()=>_(this,null,function*(){a(!0);const A=JSON.parse(JSON.stringify(t));if(A.contestId=e.entityId,A.contestType=e.entityType==="template"?"TEMPLATE":"GAME",A.description=r,delete A.contestModel,A.userList.length>0){const k=new MB().validate(A.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!k.isValid){m("danger",k.message),a(!1);return}}else delete A.userList;const E=wu(A);try{yield C.setWinners(E),m("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(k){console.error(k),m("danger",Object.keys(e.winners).length?e.labels.editWinnersErrorMessage:e.labels.createWinnersErrorMessage)}a(!1)});return l.jsxs(l.Fragment,{children:[l.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:l.jsx(p.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:l.jsxs(p.Box,{width:"100%",sx:{overflowX:"auto"},children:[l.jsxs(p.Card,{variant:"plain",children:[l.jsx(bc,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:A=>{i(A)}}),l.jsx(OB,{winners:t.userList,leaderboard:b,hasMoreParticipants:x,isLoading:S,setPage:c,setWinnersRequestBody:n,labels:e.labels}),l.jsx(p.Box,{textAlign:"center",my:3,children:l.jsx(p.Button,{variant:"solid",color:"primary",onClick:I,loading:o,children:e.labels.save})}),l.jsx(p.Divider,{sx:{my:4}})]}),b?l.jsx(LB,{winners:t,profiles:b.map(A=>A.profileModel),labels:e.labels}):l.jsx(l.Fragment,{})]})})}),l.jsx(Ke,{showToast:u,color:d,message:g,hideToast:()=>f(!1)})]})},FB=e=>{const[t,n]=y.useState(!1),r=()=>n(!0),i=t2(e.entityId,e.entityType,r);return i?l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{p:2,children:[l.jsx(p.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:l.jsx(e2,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),l.jsxs(p.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",l.jsx(p.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),l.jsx($B,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),l.jsx(Ke,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):l.jsx(hi,{my:50})},NB=10,zB=e=>{var d;const[t,n]=y.useState([]),[r,i]=y.useState(!1),[o,a]=y.useState(""),{sdk:s}=Ye(),c=y.useMemo(()=>sr(h=>{if(!h){n([]),i(!1);return}i(!0),s.football.search({query:h}).then(g=>{n([...dv(g)]),i(!1)}).catch(g=>{console.error(g),n([]),i(!1)})},300),[]);y.useEffect(()=>(c(o),()=>c.cancel()),[o,c]);const u=(h,g)=>{const v=g.map(m=>m.id);e.setOptions(g),e.handleResetData(),e.setFilters(m=>q(B({},m),{entityIds:v}))},f=(h,g)=>h.map((v,m)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:b=>g({index:m}).onClick(b),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:v},`option_${v.id}`)},v.id));return l.jsxs(p.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),l.jsx(p.Autocomplete,{getOptionDisabled:()=>e.options.length===NB,forcePopupIcon:!1,multiple:!0,loading:r,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(h,g)=>h.id===g.id,endDecorator:r?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.options.length>0?"":e.labels.typeContextTagNamePlaceholder,options:t,filterOptions:h=>h.filter(g=>!e.options.some(v=>v.value===g.value)),onInputChange:(h,g)=>{a(g)},onChange:u,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(d=e.options)!=null?d:[],renderTags:f,renderOption:(h,g)=>l.jsx(p.AutocompleteOption,q(B({},h),{children:l.jsx(Sn,{option:g})}))})]})};function fv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var bo;(function(e){e.event="event",e.props="prop"})(bo||(bo={}));function lr(){}function jB(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(o,a){return o===t[a]})||(t=r,n=e.apply(void 0,r)),n}}function yo(e){return!!(e||"").match(/\d/)}function mi(e){return e==null}function UB(e){return typeof e=="number"&&isNaN(e)}function hv(e){return mi(e)||UB(e)||typeof e=="number"&&!isFinite(e)}function pv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function VB(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function HB(e,t,n){var r=VB(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function WB(e){var t=y.useRef(e);t.current=e;var n=y.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function Iu(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),o=i[0],a=i[1]||"";return{beforeDecimal:o,afterDecimal:a,hasNegation:n,addNegation:r}}function GB(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function gv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function mv(e,t){return Array(t+1).join(e)}function vv(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],o=r[1];if(o=Number(o),!o)return n+i;i=i.replace(".","");var a=1+o,s=i.length;return a<0?i="0."+mv("0",Math.abs(a))+i:a>=s?i=i+mv("0",a-s):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function bv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=Iu(e),o=i.beforeDecimal,a=i.afterDecimal,s=i.hasNegation,c=parseFloat("0."+(a||"0")),u=a.length<=t?"0."+a:c.toFixed(t),f=u.split("."),d=o;o&&Number(f[0])&&(d=o.split("").reverse().reduce(function(m,b,x){return m.length>x?(Number(m[0])+Number(b)).toString()+m.substring(1,m.length):b+m},f[0]));var h=gv(f[1]||"",t,n),g=s?"-":"",v=r?".":"";return""+g+d+v+h}function _r(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var yv=jB(function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[o-1-r]&&o-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}}),YB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function KB(e,t,n){return Math.min(Math.max(e,t),n)}function Au(e){return Math.max(e.selectionStart,e.selectionEnd)}function QB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function qB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function JB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function XB(e,t,n,r,i,o,a){a===void 0&&(a=JB);var s=i.findIndex(function(I){return I}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r=r+c.length);for(var u=n.length,f=e.length,d={},h=new Array(u),g=0;g<u;g++){h[g]=-1;for(var v=0,m=f;v<m;v++){var b=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:g,formattedValueIndex:v});if(b&&d[v]!==!0){h[g]=v,d[v]=!0;break}}}for(var x=r;x<u&&(h[x]===-1||!o(n[x]));)x++;var S=x===u||h[x]===-1?f:h[x];for(x=r-1;x>0&&h[x]===-1;)x--;var C=x===-1||h[x]===-1?0:h[x]+1;return C>S?S:r-C<S-r?C:S}function xv(e,t,n,r){var i=e.length;if(t=KB(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function ZB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(yo(e[n])||yo(e[n-1]));return t}function Cv(e,t,n,r,i,o){o===void 0&&(o=lr);var a=WB(function(v,m){var b,x;return hv(v)?(x="",b=""):typeof v=="number"||m?(x=typeof v=="number"?vv(v):v,b=r(x)):(x=i(v,void 0),b=r(x)),{formattedValue:b,numAsString:x}}),s=y.useState(function(){return a(mi(e)?t:e,n)}),c=s[0],u=s[1],f=function(v,m){v.formattedValue!==c.formattedValue&&u({formattedValue:v.formattedValue,numAsString:v.value}),o(v,m)},d=e,h=n;mi(e)&&(d=c.numAsString,h=!0);var g=a(d,h);return y.useMemo(function(){u(g)},[g.formattedValue]),[c,f]}function e$(e){return e.replace(/[^0-9]/g,"")}function t$(e){return e}function n$(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,o=e.getInputRef,a=e.format;a===void 0&&(a=t$);var s=e.removeFormatting;s===void 0&&(s=e$);var c=e.defaultValue,u=e.valueIsNumericString,f=e.onValueChange,d=e.isAllowed,h=e.onChange;h===void 0&&(h=lr);var g=e.onKeyDown;g===void 0&&(g=lr);var v=e.onMouseUp;v===void 0&&(v=lr);var m=e.onFocus;m===void 0&&(m=lr);var b=e.onBlur;b===void 0&&(b=lr);var x=e.value,S=e.getCaretBoundary;S===void 0&&(S=ZB);var C=e.isValidInputCharacter;C===void 0&&(C=yo);var I=e.isCharacterSame,w=fv(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=Cv(x,c,!!u,a,s,f),E=A[0],k=E.formattedValue,$=E.numAsString,G=A[1],O=y.useRef(),T=y.useRef({formattedValue:k,numAsString:$}),N=function(fe,pe){T.current={formattedValue:fe.formattedValue,numAsString:fe.value},G(fe,pe)},H=y.useState(!1),j=H[0],F=H[1],M=y.useRef(null),V=y.useRef({setCaretTimeout:null,focusTimeout:null});y.useEffect(function(){return F(!0),function(){clearTimeout(V.current.setCaretTimeout),clearTimeout(V.current.focusTimeout)}},[]);var Y=a,Z=function(fe,pe){var Ce=parseFloat(pe);return{formattedValue:fe,value:pe,floatValue:isNaN(Ce)?void 0:Ce}},D=function(fe,pe,Ce){fe.selectionStart===0&&fe.selectionEnd===fe.value.length||(_r(fe,pe),V.current.setCaretTimeout=setTimeout(function(){fe.value===Ce&&fe.selectionStart!==pe&&_r(fe,pe)},0))},L=function(fe,pe,Ce){return xv(fe,pe,S(fe),Ce)},U=function(fe,pe,Ce){var Ee=S(pe),qe=XB(pe,k,fe,Ce,Ee,C,I);return qe=xv(pe,qe,Ee),qe},W=function(fe){var pe=fe.formattedValue;pe===void 0&&(pe="");var Ce=fe.input,Ee=fe.source,qe=fe.event,De=fe.numAsString,ke;if(Ce){var At=fe.inputValue||Ce.value,Tt=Au(Ce);Ce.value=pe,ke=U(At,pe,Tt),ke!==void 0&&D(Ce,ke,pe)}pe!==k&&N(Z(pe,De),{event:qe,source:Ee})};y.useEffect(function(){var fe=T.current,pe=fe.formattedValue,Ce=fe.numAsString;(k!==pe||$!==Ce)&&N(Z(k,$),{event:void 0,source:bo.props})},[k,$]);var ie=M.current?Au(M.current):void 0,le=typeof window!="undefined"?y.useLayoutEffect:y.useEffect;le(function(){var fe=M.current;if(k!==T.current.formattedValue&&fe){var pe=U(T.current.formattedValue,k,ie);fe.value=k,D(fe,pe,k)}},[k]);var ae=function(fe,pe,Ce){var Ee=pe.target,qe=O.current?YB(O.current,Ee.selectionEnd):yv(k,fe),De=Object.assign(Object.assign({},qe),{lastValue:k}),ke=s(fe,De),At=Y(ke);if(ke=s(At,void 0),d&&!d(Z(At,ke))){var Tt=pe.target,Ut=Au(Tt),Lt=U(fe,k,Ut);return Tt.value=k,D(Tt,Lt,k),!1}return W({formattedValue:At,numAsString:ke,inputValue:fe,event:pe,source:Ce,input:pe.target}),!0},ee=function(fe,pe){pe===void 0&&(pe=0);var Ce=fe.selectionStart,Ee=fe.selectionEnd;O.current={selectionStart:Ce,selectionEnd:Ee+pe}},ne=function(fe){var pe=fe.target,Ce=pe.value,Ee=ae(Ce,fe,bo.event);Ee&&h(fe),O.current=void 0},J=function(fe){var pe=fe.target,Ce=fe.key,Ee=pe.selectionStart,qe=pe.selectionEnd,De=pe.value;De===void 0&&(De="");var ke;Ce==="ArrowLeft"||Ce==="Backspace"?ke=Math.max(Ee-1,0):Ce==="ArrowRight"?ke=Math.min(Ee+1,De.length):Ce==="Delete"&&(ke=Ee);var At=0;Ce==="Delete"&&Ee===qe&&(At=1);var Tt=Ce==="ArrowLeft"||Ce==="ArrowRight";if(ke===void 0||Ee!==qe&&!Tt){g(fe),ee(pe,At);return}var Ut=ke;if(Tt){var Lt=Ce==="ArrowLeft"?"left":"right";Ut=L(De,ke,Lt),Ut!==ke&&fe.preventDefault()}else Ce==="Delete"&&!C(De[ke])?Ut=L(De,ke,"right"):Ce==="Backspace"&&!C(De[ke])&&(Ut=L(De,ke,"left"));Ut!==ke&&D(pe,Ut,De),g(fe),ee(pe,At)},ce=function(fe){var pe=fe.target,Ce=function(){var Ee=pe.selectionStart,qe=pe.selectionEnd,De=pe.value;if(De===void 0&&(De=""),Ee===qe){var ke=L(De,Ee);ke!==Ee&&D(pe,ke,De)}};Ce(),requestAnimationFrame(function(){Ce()}),v(fe),ee(pe)},ve=function(fe){fe.persist&&fe.persist();var pe=fe.target,Ce=fe.currentTarget;M.current=pe,V.current.focusTimeout=setTimeout(function(){var Ee=pe.selectionStart,qe=pe.selectionEnd,De=pe.value;De===void 0&&(De="");var ke=L(De,Ee);ke!==Ee&&!(Ee===0&&qe===De.length)&&D(pe,ke,De),m(Object.assign(Object.assign({},fe),{currentTarget:Ce}))},0)},ze=function(fe){M.current=null,clearTimeout(V.current.focusTimeout),clearTimeout(V.current.setCaretTimeout),b(fe)},yt=j&&QB()?"numeric":void 0,dt=Object.assign({inputMode:yt},w,{type:t,value:k,onChange:ne,onKeyDown:J,onMouseUp:ce,onFocus:ve,onBlur:ze});if(n==="text")return i?y.createElement(y.Fragment,null,i(k,w)||null):y.createElement("span",Object.assign({},w,{ref:o}),k);if(r){var Pt=r;return y.createElement(Pt,Object.assign({},dt,{ref:o}))}return y.createElement("input",Object.assign({},dt,{ref:o}))}function wv(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var o=t.suffix;o===void 0&&(o="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var c=ys(t),u=c.thousandSeparator,f=c.decimalSeparator,d=n!==0&&e.indexOf(".")!==-1||n&&r,h=Iu(e,a),g=h.beforeDecimal,v=h.afterDecimal,m=h.addNegation;return n!==void 0&&(v=gv(v,n,!!r)),u&&(g=HB(g,u,s)),i&&(g=i+g),o&&(v=v+o),m&&(g="-"+g),e=g+(d&&f||"")+v,e}function ys(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function r$(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),i&&!o&&t&&(e="-"+e),e}function i$(e,t){return new RegExp("(^-)|[0-9]|"+pv(e),"g")}function o$(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function a$(e,t,n){var r;t===void 0&&(t=qB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var s=n.decimalScale,c=t.from,u=t.to,f=u.start,d=u.end,h=ys(n),g=h.allowedDecimalSeparators,v=h.decimalSeparator,m=e[d]===v;if(yo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(d-f===1&&g.indexOf(e[f])!==-1){var b=s===0?"":v;e=e.substring(0,f)+b+e.substring(f+1,e.length)}var x=function(M,V,Y){var Z=!1,D=!1;o.startsWith("-")?Z=!1:M.startsWith("--")?(Z=!1,D=!0):a.startsWith("-")&&M.length===a.length?Z=!1:M[0]==="-"&&(Z=!0);var L=Z?1:0;return D&&(L=2),L&&(M=M.substring(L),V-=L,Y-=L),{value:M,start:V,end:Y,hasNegation:Z}},S=x(e,f,d),C=S.hasNegation;r=S,e=r.value,f=r.start,d=r.end;var I=x(t.lastValue,c.start,c.end),w=I.start,A=I.end,E=I.value,k=e.substring(f,d);e.length&&E.length&&(w>E.length-a.length||A<o.length)&&!(k&&a.startsWith(k))&&(e=E);var $=0;e.startsWith(o)?$+=o.length:f<o.length&&($=f),e=e.substring($),d-=$;var G=e.length,O=e.length-a.length;e.endsWith(a)?G=O:(d>O||d>e.length-a.length)&&(G=d),e=e.substring(0,G),e=r$(C?"-"+e:e,i),e=(e.match(i$(v))||[]).join("");var T=e.indexOf(v);e=e.replace(new RegExp(pv(v),"g"),function(M,V){return V===T?".":""});var N=Iu(e,i),H=N.beforeDecimal,j=N.afterDecimal,F=N.addNegation;return u.end-u.start<c.end-c.start&&H===""&&m&&!parseFloat(j)&&(e=F?"-":""),e}function s$(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";i.fill(!1,0,n.length+(o?1:0));var a=e.length;return i.fill(!1,a-r.length+1,a+1),i}function l$(e){var t=ys(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var o=e.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
2464
2464
  Decimal separator can't be same as thousand separator.
2465
2465
  thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
2466
2466
  decimalSeparator: `+r+` (default value for decimalSeparator is .)
@@ -2468,11 +2468,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2468
2468
  Prefix can't start with '-' when allowNegative is true.
2469
2469
  prefix: `+i+`
2470
2470
  allowNegative: `+o+`
2471
- `),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function c$(e){e=l$(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=lr);var o=e.onBlur;o===void 0&&(o=lr);var a=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,u=e.prefix;u===void 0&&(u="");var f=e.defaultValue,d=e.value,h=e.valueIsNumericString,g=e.onValueChange,v=fv(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),m=ys(e),b=m.decimalSeparator,x=m.allowedDecimalSeparators,S=function(F){return wv(F,e)},C=function(F,M){return a$(F,M,e)},I=mi(d)?f:d,w=h!=null?h:o$(I,u,t);mi(d)?mi(f)||(w=w||typeof f=="number"):w=w||typeof d=="number";var A=function(F){return hv(F)?F:(typeof F=="number"&&(F=vv(F)),w&&typeof s=="number"?bv(F,s,!!c):F)},E=Cv(A(d),A(f),!!w,S,C,g),k=E[0],B=k.numAsString,G=k.formattedValue,O=E[1],T=function(F){var M=F.target,V=F.key,Y=M.selectionStart,Z=M.selectionEnd,D=M.value;if(D===void 0&&(D=""),(V==="Backspace"||V==="Delete")&&Z<u.length){F.preventDefault();return}if(Y!==Z){i(F);return}V==="Backspace"&&D[0]==="-"&&Y===u.length+1&&n&&_r(M,1),s&&c&&(V==="Backspace"&&D[Y-1]===b?(_r(M,Y-1),F.preventDefault()):V==="Delete"&&D[Y]===b&&F.preventDefault()),x!=null&&x.includes(V)&&D[Y]===b&&_r(M,Y+1);var L=a===!0?",":a;V==="Backspace"&&D[Y-1]===L&&_r(M,Y-1),V==="Delete"&&D[Y]===L&&_r(M,Y+1),i(F)},N=function(F){var M=B;if(M.match(/\d/g)||(M=""),r||(M=GB(M)),c&&s&&(M=bv(M,s,c)),M!==B){var V=wv(M,e);O({formattedValue:V,value:M,floatValue:parseFloat(M)},{event:F,source:bo.event})}o(F)},H=function(F){return F===b?!0:yo(F)},j=function(F){var M=F.currentValue,V=F.lastValue,Y=F.formattedValue,Z=F.currentValueIndex,D=F.formattedValueIndex,L=M[Z],U=Y[D],W=yv(V,M),ie=W.to,le=function(ae){return C(ae).indexOf(".")+u.length};return d===0&&c&&s&&M[ie.start]===b&&le(M)<Z&&le(Y)>D?!1:Z>=ie.start&&Z<ie.end&&x&&x.includes(L)&&U===b?!0:L===U};return Object.assign(Object.assign({},v),{value:G,valueIsNumericString:!1,isValidInputCharacter:H,isCharacterSame:j,onValueChange:O,format:S,removeFormatting:C,getCaretBoundary:function(F){return s$(F,e)},onKeyDown:T,onBlur:N})}function u$(e){var t=c$(e);return y.createElement(n$,Object.assign({},t))}const d$=K.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=qe(a,["onChange","isAllowed"]);return l.jsx(u$,Q($({},o),{getInputRef:n,onValueChange:s=>{r({target:{name:t.name,value:s.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),Tu=e=>{const t=n=>{e.onChange(Number(n.target.value))};return l.jsxs(bu,{size:e.size||"sm",children:[l.jsx(yu,{children:e.label}),l.jsx(Xa,{sx:e.sx,value:e.defaultValue,onChange:t,disabled:e.disabled||!1,slotProps:{input:{component:d$,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?l.jsx(p.FormHelperText,{children:e.description}):l.jsx(l.Fragment,{})]})},f$=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",h$=(e,t,n,r)=>{const i=e.filter(u=>u.type.toLocaleLowerCase()==="competition").map(u=>u.id),o=e.filter(u=>u.type.toLocaleLowerCase()==="team").map(u=>u.id),a=e.filter(u=>u.type.toLocaleLowerCase()==="player").map(u=>u.id),s=[],c=[];if(i.length>0){const u=t.football.getCompetitions({competitionIds:i}).then(f=>{c.push(f)}).catch(f=>{console.error(f),r()});s.push(u)}if(o.length>0){const u=t.football.getTeams({teamIds:o}).then(f=>{c.push(f.data)}).catch(f=>{console.error(f),r()});s.push(u)}if(a.length>0){const u=t.football.getPlayers({playerIds:a}).then(f=>{c.push(f.data)}).catch(f=>{console.error(f),r()});s.push(u)}Promise.all(s).then(()=>{const f=Array.prototype.concat.apply([],c).map(d=>p$(d));n(f)})},p$=e=>{const t=new uv;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=f$(e.id),e.birthDate?t.logo=e.assets&&e.assets.headshot&&e.assets.headshot:t.logo=e.assets&&e.assets.logo&&e.assets.logo,t.countryName=e.country.name,t.countryFlag=e.country.assets&&e.country.assets.flag?e.country.assets.flag:Re.country,t},g$=10,m$=e=>{const[t,n]=y.useState([]),[r,i]=y.useState([]),[o,a]=y.useState(!1),[s,c]=y.useState(""),[u,f]=y.useState(!1),{sdk:d}=Ye(),h=()=>f(!u),g=(b,x)=>{n(x),e.onChangeTags(x)};y.useEffect(()=>{h$(e.tags,d,n,h)},[e.tags]);const v=y.useMemo(()=>sr(b=>{if(!b){i([]),a(!1);return}a(!0),d.football.search({query:b}).then(x=>{i([...dv(x)]),a(!1)}).catch(x=>{console.error(x),i([]),a(!1)})},300),[]);y.useEffect(()=>(v(s),()=>v.cancel()),[s,v]);const m=(b,x)=>b.map((S,C)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:I=>x({index:C}).onClick(I),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:S},`option_${S.id}`)},S.id));return l.jsxs(p.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),l.jsx(p.Autocomplete,{getOptionDisabled:()=>t.length===g$,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,x)=>b.id===x.id,endDecorator:o?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:b=>b.filter(x=>!t.some(S=>S.value===x.value)),onInputChange:(b,x)=>{c(x)},onChange:g,getOptionKey:b=>b.id,groupBy:b=>b.group+"s",value:t!=null?t:[],renderTags:m,renderOption:(b,x)=>l.jsx(p.AutocompleteOption,Q($({},b),{children:l.jsx(Sn,{option:x})}))}),l.jsx(Ke,{showToast:u,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},v$=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),b$=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=v$(e.labels),o=(c,u)=>{const f=c.target.value;t.content[u]=f,e.onChange(t)},a=(c,u)=>{const f=c.target.value;t.campaign[u]=f,e.onChange(t)},s=c=>{c.length?t.tags=c.map(u=>({id:u.id,type:u.group,source:"football"})):t.tags=[],e.onChange(t)};return l.jsx(l.Fragment,{children:l.jsxs(Qh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[l.jsxs(Jh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${xc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[l.jsx(Kr,{children:e.labels.tags}),l.jsx(Kr,{children:e.labels.content}),l.jsx(Kr,{children:e.labels.campaign})]}),l.jsx(ri,{value:0,sx:{px:0},children:l.jsx(m$,{labels:e.labels,tags:e.context.tags,onChangeTags:s})}),l.jsx(ri,{value:1,sx:{px:0},children:Object.keys(n).map(c=>l.jsx(p.Box,{mb:2,children:l.jsx(on,{label:i.get(c),placeholder:"",defaultValue:n[c],required:!1,size:"sm",onChange:u=>o(u,c)})},`context-content-${c}`))}),l.jsx(ri,{value:2,sx:{px:0},children:Object.keys(r).map(c=>l.jsx(p.Box,{mb:2,children:l.jsx(on,{label:i.get(c),placeholder:"",defaultValue:r[c],required:!1,size:"sm",onChange:u=>a(u,c)})},`context-campaign-${c}`))})]})})},y$=e=>e?$({},e):{main:"",mobile:""},x$=e=>{const[t,n]=y.useState(!1),r=y$(e.defaultValue),i=(a,s)=>{r[s]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return l.jsxs(p.Box,{sx:{marginBottom:"10px"},children:[l.jsx(mo,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:a=>i(a,"main"),clearImage:()=>o("main")}),l.jsx(p.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?l.jsx(mo,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):l.jsx(l.Fragment,{})]})},C$=({defaultValue:e,isClearable:t=!0,labels:n,onChange:r})=>{const i=y.useRef(null),o=[{id:"FREE",label:n.free},{id:"LEAD",label:n.lead},{id:"REGISTERED",label:n.registered},{id:"PAID",label:n.paid}];return l.jsxs(p.FormControl,{size:"sm",sx:{mb:2},children:[l.jsx(p.FormLabel,{children:n.authRequirement}),l.jsx(p.Select,Q($({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,s)=>r(s),sx:{minHeight:"37px"}},e&&t&&{endDecorator:l.jsx(p.IconButton,{variant:"plain",color:"neutral",onMouseDown:a=>{a.stopPropagation()},onClick:()=>{var a;r(null),(a=i.current)==null||a.focusVisible()},sx:{width:"18px",height:"18px"},children:l.jsx(Im,{})}),indicator:null}),{children:o.map(a=>l.jsx(p.Option,{value:a.id,children:a.label},a.id))})),l.jsx(p.FormHelperText,{children:n.authRequirementDescription})]})};function w$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const xs=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function vi(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Eu(e){return"nodeType"in e}function Mt(e){var t,n;return e?vi(e)?e:Eu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function ku(e){const{Document:t}=Mt(e);return e instanceof t}function xo(e){return vi(e)?!1:e instanceof Mt(e).HTMLElement}function Sv(e){return e instanceof Mt(e).SVGElement}function bi(e){return e?vi(e)?e.document:Eu(e)?ku(e)?e:xo(e)||Sv(e)?e.ownerDocument:document:document:document}const un=xs?y.useLayoutEffect:y.useEffect;function Cs(e){const t=y.useRef(e);return un(()=>{t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function S$(){const e=y.useRef(null),t=y.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=y.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Co(e,t){t===void 0&&(t=[e]);const n=y.useRef(e);return un(()=>{n.current!==e&&(n.current=e)},t),n}function wo(e,t){const n=y.useRef();return y.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ws(e){const t=Cs(e),n=y.useRef(null),r=y.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function Ss(e){const t=y.useRef();return y.useEffect(()=>{t.current=e},[e]),t.current}let _u={};function So(e,t){return y.useMemo(()=>{if(t)return t;const n=_u[e]==null?0:_u[e]+1;return _u[e]=n,e+"-"+n},[e,t])}function Iv(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[c,u]of s){const f=o[c];f!=null&&(o[c]=f+e*u)}return o},$({},t))}}const yi=Iv(1),Io=Iv(-1);function I$(e){return"clientX"in e&&"clientY"in e}function Is(e){if(!e)return!1;const{KeyboardEvent:t}=Mt(e.target);return t&&e instanceof t}function A$(e){if(!e)return!1;const{TouchEvent:t}=Mt(e.target);return t&&e instanceof t}function As(e){if(A$(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return I$(e)?{x:e.clientX,y:e.clientY}:null}const Wn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Wn.Translate.toString(e),Wn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Av="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function T$(e){return e.matches(Av)?e:e.querySelector(Av)}const E$={display:"none"};function k$(e){let{id:t,value:n}=e;return y.createElement("div",{id:t,style:E$},n)}function _$(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return y.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function P$(){const[e,t]=y.useState("");return{announce:y.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Tv=y.createContext(null);function D$(e){const t=y.useContext(Tv);y.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function O$(){const[e]=y.useState(()=>new Set),t=y.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[y.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const R$={draggable:`
2471
+ `),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function c$(e){e=l$(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=lr);var o=e.onBlur;o===void 0&&(o=lr);var a=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,u=e.prefix;u===void 0&&(u="");var f=e.defaultValue,d=e.value,h=e.valueIsNumericString,g=e.onValueChange,v=fv(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),m=ys(e),b=m.decimalSeparator,x=m.allowedDecimalSeparators,S=function(F){return wv(F,e)},C=function(F,M){return a$(F,M,e)},I=mi(d)?f:d,w=h!=null?h:o$(I,u,t);mi(d)?mi(f)||(w=w||typeof f=="number"):w=w||typeof d=="number";var A=function(F){return hv(F)?F:(typeof F=="number"&&(F=vv(F)),w&&typeof s=="number"?bv(F,s,!!c):F)},E=Cv(A(d),A(f),!!w,S,C,g),k=E[0],$=k.numAsString,G=k.formattedValue,O=E[1],T=function(F){var M=F.target,V=F.key,Y=M.selectionStart,Z=M.selectionEnd,D=M.value;if(D===void 0&&(D=""),(V==="Backspace"||V==="Delete")&&Z<u.length){F.preventDefault();return}if(Y!==Z){i(F);return}V==="Backspace"&&D[0]==="-"&&Y===u.length+1&&n&&_r(M,1),s&&c&&(V==="Backspace"&&D[Y-1]===b?(_r(M,Y-1),F.preventDefault()):V==="Delete"&&D[Y]===b&&F.preventDefault()),x!=null&&x.includes(V)&&D[Y]===b&&_r(M,Y+1);var L=a===!0?",":a;V==="Backspace"&&D[Y-1]===L&&_r(M,Y-1),V==="Delete"&&D[Y]===L&&_r(M,Y+1),i(F)},N=function(F){var M=$;if(M.match(/\d/g)||(M=""),r||(M=GB(M)),c&&s&&(M=bv(M,s,c)),M!==$){var V=wv(M,e);O({formattedValue:V,value:M,floatValue:parseFloat(M)},{event:F,source:bo.event})}o(F)},H=function(F){return F===b?!0:yo(F)},j=function(F){var M=F.currentValue,V=F.lastValue,Y=F.formattedValue,Z=F.currentValueIndex,D=F.formattedValueIndex,L=M[Z],U=Y[D],W=yv(V,M),ie=W.to,le=function(ae){return C(ae).indexOf(".")+u.length};return d===0&&c&&s&&M[ie.start]===b&&le(M)<Z&&le(Y)>D?!1:Z>=ie.start&&Z<ie.end&&x&&x.includes(L)&&U===b?!0:L===U};return Object.assign(Object.assign({},v),{value:G,valueIsNumericString:!1,isValidInputCharacter:H,isCharacterSame:j,onValueChange:O,format:S,removeFormatting:C,getCaretBoundary:function(F){return s$(F,e)},onKeyDown:T,onBlur:N})}function u$(e){var t=c$(e);return y.createElement(n$,Object.assign({},t))}const d$=K.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=Qe(a,["onChange","isAllowed"]);return l.jsx(u$,q(B({},o),{getInputRef:n,onValueChange:s=>{r({target:{name:t.name,value:s.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),Tu=e=>{const t=n=>{e.onChange(Number(n.target.value))};return l.jsxs(bu,{size:e.size||"sm",children:[l.jsx(yu,{children:e.label}),l.jsx(Xa,{sx:e.sx,value:e.defaultValue,onChange:t,disabled:e.disabled||!1,slotProps:{input:{component:d$,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?l.jsx(p.FormHelperText,{children:e.description}):l.jsx(l.Fragment,{})]})},f$=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",h$=(e,t,n,r)=>{const i=e.filter(u=>u.type.toLocaleLowerCase()==="competition").map(u=>u.id),o=e.filter(u=>u.type.toLocaleLowerCase()==="team").map(u=>u.id),a=e.filter(u=>u.type.toLocaleLowerCase()==="player").map(u=>u.id),s=[],c=[];if(i.length>0){const u=t.football.getCompetitions({competitionIds:i}).then(f=>{c.push(f)}).catch(f=>{console.error(f),r()});s.push(u)}if(o.length>0){const u=t.football.getTeams({teamIds:o}).then(f=>{c.push(f.data)}).catch(f=>{console.error(f),r()});s.push(u)}if(a.length>0){const u=t.football.getPlayers({playerIds:a}).then(f=>{c.push(f.data)}).catch(f=>{console.error(f),r()});s.push(u)}Promise.all(s).then(()=>{const f=Array.prototype.concat.apply([],c).map(d=>p$(d));n(f)})},p$=e=>{const t=new uv;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=f$(e.id),e.birthDate?t.logo=e.assets&&e.assets.headshot&&e.assets.headshot:t.logo=e.assets&&e.assets.logo&&e.assets.logo,t.countryName=e.country.name,t.countryFlag=e.country.assets&&e.country.assets.flag?e.country.assets.flag:Re.country,t},g$=10,m$=e=>{const[t,n]=y.useState([]),[r,i]=y.useState([]),[o,a]=y.useState(!1),[s,c]=y.useState(""),[u,f]=y.useState(!1),{sdk:d}=Ye(),h=()=>f(!u),g=(b,x)=>{n(x),e.onChangeTags(x)};y.useEffect(()=>{h$(e.tags,d,n,h)},[e.tags]);const v=y.useMemo(()=>sr(b=>{if(!b){i([]),a(!1);return}a(!0),d.football.search({query:b}).then(x=>{i([...dv(x)]),a(!1)}).catch(x=>{console.error(x),i([]),a(!1)})},300),[]);y.useEffect(()=>(v(s),()=>v.cancel()),[s,v]);const m=(b,x)=>b.map((S,C)=>l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:I=>x({index:C}).onClick(I),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsx(Sn,{option:S},`option_${S.id}`)},S.id));return l.jsxs(p.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[l.jsx(p.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),l.jsx(p.Autocomplete,{getOptionDisabled:()=>t.length===g$,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,x)=>b.id===x.id,endDecorator:o?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:b=>b.filter(x=>!t.some(S=>S.value===x.value)),onInputChange:(b,x)=>{c(x)},onChange:g,getOptionKey:b=>b.id,groupBy:b=>b.group+"s",value:t!=null?t:[],renderTags:m,renderOption:(b,x)=>l.jsx(p.AutocompleteOption,q(B({},b),{children:l.jsx(Sn,{option:x})}))}),l.jsx(Ke,{showToast:u,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},v$=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),b$=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=v$(e.labels),o=(c,u)=>{const f=c.target.value;t.content[u]=f,e.onChange(t)},a=(c,u)=>{const f=c.target.value;t.campaign[u]=f,e.onChange(t)},s=c=>{c.length?t.tags=c.map(u=>({id:u.id,type:u.group,source:"football"})):t.tags=[],e.onChange(t)};return l.jsx(l.Fragment,{children:l.jsxs(qh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[l.jsxs(Jh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${xc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[l.jsx(Kr,{children:e.labels.tags}),l.jsx(Kr,{children:e.labels.content}),l.jsx(Kr,{children:e.labels.campaign})]}),l.jsx(ri,{value:0,sx:{px:0},children:l.jsx(m$,{labels:e.labels,tags:e.context.tags,onChangeTags:s})}),l.jsx(ri,{value:1,sx:{px:0},children:Object.keys(n).map(c=>l.jsx(p.Box,{mb:2,children:l.jsx(on,{label:i.get(c),placeholder:"",defaultValue:n[c],required:!1,size:"sm",onChange:u=>o(u,c)})},`context-content-${c}`))}),l.jsx(ri,{value:2,sx:{px:0},children:Object.keys(r).map(c=>l.jsx(p.Box,{mb:2,children:l.jsx(on,{label:i.get(c),placeholder:"",defaultValue:r[c],required:!1,size:"sm",onChange:u=>a(u,c)})},`context-campaign-${c}`))})]})})},y$=e=>e?B({},e):{main:"",mobile:""},x$=e=>{const[t,n]=y.useState(!1),r=y$(e.defaultValue),i=(a,s)=>{r[s]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return l.jsxs(p.Box,{sx:{marginBottom:"10px"},children:[l.jsx(mo,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:a=>i(a,"main"),clearImage:()=>o("main")}),l.jsx(p.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?l.jsx(mo,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):l.jsx(l.Fragment,{})]})},C$=({defaultValue:e,isClearable:t=!0,labels:n,onChange:r})=>{const i=y.useRef(null),o=[{id:"FREE",label:n.free},{id:"LEAD",label:n.lead},{id:"REGISTERED",label:n.registered},{id:"PAID",label:n.paid}];return l.jsxs(p.FormControl,{size:"sm",sx:{mb:2},children:[l.jsx(p.FormLabel,{children:n.authRequirement}),l.jsx(p.Select,q(B({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,s)=>r(s),sx:{minHeight:"37px"}},e&&t&&{endDecorator:l.jsx(p.IconButton,{variant:"plain",color:"neutral",onMouseDown:a=>{a.stopPropagation()},onClick:()=>{var a;r(null),(a=i.current)==null||a.focusVisible()},sx:{width:"18px",height:"18px"},children:l.jsx(Im,{})}),indicator:null}),{children:o.map(a=>l.jsx(p.Option,{value:a.id,children:a.label},a.id))})),l.jsx(p.FormHelperText,{children:n.authRequirementDescription})]})};function w$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const xs=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function vi(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Eu(e){return"nodeType"in e}function Mt(e){var t,n;return e?vi(e)?e:Eu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function ku(e){const{Document:t}=Mt(e);return e instanceof t}function xo(e){return vi(e)?!1:e instanceof Mt(e).HTMLElement}function Sv(e){return e instanceof Mt(e).SVGElement}function bi(e){return e?vi(e)?e.document:Eu(e)?ku(e)?e:xo(e)||Sv(e)?e.ownerDocument:document:document:document}const un=xs?y.useLayoutEffect:y.useEffect;function Cs(e){const t=y.useRef(e);return un(()=>{t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function S$(){const e=y.useRef(null),t=y.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=y.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Co(e,t){t===void 0&&(t=[e]);const n=y.useRef(e);return un(()=>{n.current!==e&&(n.current=e)},t),n}function wo(e,t){const n=y.useRef();return y.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ws(e){const t=Cs(e),n=y.useRef(null),r=y.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function Ss(e){const t=y.useRef();return y.useEffect(()=>{t.current=e},[e]),t.current}let _u={};function So(e,t){return y.useMemo(()=>{if(t)return t;const n=_u[e]==null?0:_u[e]+1;return _u[e]=n,e+"-"+n},[e,t])}function Iv(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[c,u]of s){const f=o[c];f!=null&&(o[c]=f+e*u)}return o},B({},t))}}const yi=Iv(1),Io=Iv(-1);function I$(e){return"clientX"in e&&"clientY"in e}function Is(e){if(!e)return!1;const{KeyboardEvent:t}=Mt(e.target);return t&&e instanceof t}function A$(e){if(!e)return!1;const{TouchEvent:t}=Mt(e.target);return t&&e instanceof t}function As(e){if(A$(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return I$(e)?{x:e.clientX,y:e.clientY}:null}const Wn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Wn.Translate.toString(e),Wn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Av="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function T$(e){return e.matches(Av)?e:e.querySelector(Av)}const E$={display:"none"};function k$(e){let{id:t,value:n}=e;return y.createElement("div",{id:t,style:E$},n)}function _$(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return y.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function P$(){const[e,t]=y.useState("");return{announce:y.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Tv=y.createContext(null);function D$(e){const t=y.useContext(Tv);y.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function O$(){const[e]=y.useState(()=>new Set),t=y.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[y.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const R$={draggable:`
2472
2472
  To pick up a draggable item, press the space bar.
2473
2473
  While dragging, use the arrow keys to move the item.
2474
2474
  Press space again to drop the item in its new position, or press escape to cancel.
2475
- `},M$={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function L$(e){let{announcements:t=M$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=R$}=e;const{announce:o,announcement:a}=P$(),s=So("DndLiveRegion"),[c,u]=y.useState(!1);if(y.useEffect(()=>{u(!0)},[]),D$(y.useMemo(()=>({onDragStart(d){let{active:h}=d;o(t.onDragStart({active:h}))},onDragMove(d){let{active:h,over:g}=d;t.onDragMove&&o(t.onDragMove({active:h,over:g}))},onDragOver(d){let{active:h,over:g}=d;o(t.onDragOver({active:h,over:g}))},onDragEnd(d){let{active:h,over:g}=d;o(t.onDragEnd({active:h,over:g}))},onDragCancel(d){let{active:h,over:g}=d;o(t.onDragCancel({active:h,over:g}))}}),[o,t])),!c)return null;const f=y.createElement(y.Fragment,null,y.createElement(k$,{id:r,value:i.draggable}),y.createElement(_$,{id:s,announcement:a}));return n?Le.createPortal(f,n):f}var bt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(bt||(bt={}));function Ts(){}function Es(e,t){return y.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function Ev(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const dn=Object.freeze({x:0,y:0});function B$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $$(e,t){const n=As(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function F$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function N$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function kv(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function _v(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const z$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=kv(t),o=[];for(const a of r){const{id:s}=a,c=n.get(s);if(c){const u=kv(c),f=i.reduce((h,g,v)=>h+B$(u[v],g),0),d=Number((f/4).toFixed(4));o.push({id:s,data:{droppableContainer:a,value:d}})}}return o.sort(F$)};function j$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){const c=t.width*t.height,u=e.width*e.height,f=a*s,d=f/(c+u-f);return Number(d.toFixed(4))}return 0}const U$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const c=j$(s,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(N$)};function V$(e,t,n){return Q($({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function Pv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:dn}function H$(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>Q($({},a),{top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),$({},n))}}const W$=H$(1);function Dv(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function G$(e,t,n){const r=Dv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,c=e.left-a-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const Y$={ignoreTransform:!1};function xi(e,t){t===void 0&&(t=Y$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=Mt(e).getComputedStyle(e);u&&(n=G$(n,u,f))}const{top:r,left:i,width:o,height:a,bottom:s,right:c}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:c}}function Ov(e){return xi(e,{ignoreTransform:!0})}function K$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function q$(e,t){return t===void 0&&(t=Mt(e).getComputedStyle(e)),t.position==="fixed"}function Q$(e,t){t===void 0&&(t=Mt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function ks(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(ku(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!xo(i)||Sv(i)||n.includes(i))return n;const o=Mt(e).getComputedStyle(i);return i!==e&&Q$(i,o)&&n.push(i),q$(i,o)?n:r(i.parentNode)}return e?r(e):n}function Rv(e){const[t]=ks(e,1);return t!=null?t:null}function Pu(e){return!xs||!e?null:vi(e)?e:Eu(e)?ku(e)||e===bi(e).scrollingElement?window:xo(e)?e:null:null}function Mv(e){return vi(e)?e.scrollX:e.scrollLeft}function Lv(e){return vi(e)?e.scrollY:e.scrollTop}function Du(e){return{x:Mv(e),y:Lv(e)}}var St;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(St||(St={}));function Bv(e){return!xs||!e?!1:e===document.scrollingElement}function $v(e){const t={x:0,y:0},n=Bv(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const J$={x:.2,y:.2};function X$(e,t,n,r,i){let{top:o,left:a,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=J$);const{isTop:u,isBottom:f,isLeft:d,isRight:h}=$v(e),g={x:0,y:0},v={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(g.y=St.Backward,v.y=r*Math.abs((t.top+m.height-o)/m.height)):!f&&c>=t.bottom-m.height&&(g.y=St.Forward,v.y=r*Math.abs((t.bottom-m.height-c)/m.height)),!h&&s>=t.right-m.width?(g.x=St.Forward,v.x=r*Math.abs((t.right-m.width-s)/m.width)):!d&&a<=t.left+m.width&&(g.x=St.Backward,v.x=r*Math.abs((t.left+m.width-a)/m.width)),{direction:g,speed:v}}function Z$(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Fv(e){return e.reduce((t,n)=>yi(t,Du(n)),dn)}function eF(e){return e.reduce((t,n)=>t+Mv(n),0)}function tF(e){return e.reduce((t,n)=>t+Lv(n),0)}function Nv(e,t){if(t===void 0&&(t=xi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Rv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const nF=[["x",["left","right"],eF],["y",["top","bottom"],tF]];class Ou{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ks(n),i=Fv(r);this.rect=$({},t),this.width=t.width,this.height=t.height;for(const[o,a,s]of nF)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(r),f=i[o]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ao{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function rF(e){const{EventTarget:t}=Mt(e);return e instanceof t?e:bi(e)}function Ru(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(Ii(n,2)+Ii(r,2))>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var sn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(sn||(sn={}));function zv(e){e.preventDefault()}function iF(e){e.stopPropagation()}var _e;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(_e||(_e={}));const jv={start:[_e.Space,_e.Enter],cancel:[_e.Esc],end:[_e.Space,_e.Enter,_e.Tab]},oF=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case _e.Right:return Q($({},n),{x:n.x+25});case _e.Left:return Q($({},n),{x:n.x-25});case _e.Down:return Q($({},n),{y:n.y+25});case _e.Up:return Q($({},n),{y:n.y-25})}};class _s{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Ao(bi(n)),this.windowListeners=new Ao(Mt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(sn.Resize,this.handleCancel),this.windowListeners.add(sn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(sn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Nv(r),n(dn)}handleKeyDown(t){if(Is(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=jv,coordinateGetter:a=oF,scrollBehavior:s="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:dn;this.referenceCoordinates||(this.referenceCoordinates=f);const d=a(t,{active:n,context:r.current,currentCoordinates:f});if(d){const h=Io(d,f),g={x:0,y:0},{scrollableAncestors:v}=r.current;for(const m of v){const b=t.code,{isTop:x,isRight:S,isLeft:C,isBottom:I,maxScroll:w,minScroll:A}=$v(m),E=Z$(m),k={x:Math.min(b===_e.Right?E.right-E.width/2:E.right,Math.max(b===_e.Right?E.left:E.left+E.width/2,d.x)),y:Math.min(b===_e.Down?E.bottom-E.height/2:E.bottom,Math.max(b===_e.Down?E.top:E.top+E.height/2,d.y))},B=b===_e.Right&&!S||b===_e.Left&&!C,G=b===_e.Down&&!I||b===_e.Up&&!x;if(B&&k.x!==d.x){const O=m.scrollLeft+h.x,T=b===_e.Right&&O<=w.x||b===_e.Left&&O>=A.x;if(T&&!h.y){m.scrollTo({left:O,behavior:s});return}T?g.x=m.scrollLeft-O:g.x=b===_e.Right?m.scrollLeft-w.x:m.scrollLeft-A.x,g.x&&m.scrollBy({left:-g.x,behavior:s});break}else if(G&&k.y!==d.y){const O=m.scrollTop+h.y,T=b===_e.Down&&O<=w.y||b===_e.Up&&O>=A.y;if(T&&!h.x){m.scrollTo({top:O,behavior:s});return}T?g.y=m.scrollTop-O:g.y=b===_e.Down?m.scrollTop-w.y:m.scrollTop-A.y,g.y&&m.scrollBy({top:-g.y,behavior:s});break}}this.handleMove(t,yi(Io(d,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}_s.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=jv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Uv(e){return!!(e&&"distance"in e)}function Vv(e){return!!(e&&"delay"in e)}class Mu{constructor(t,n,r){var i;r===void 0&&(r=rF(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=bi(a),this.documentListeners=new Ao(this.document),this.listeners=new Ao(r),this.windowListeners=new Ao(Mt(a)),this.initialCoordinates=(i=As(o))!=null?i:dn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(sn.Resize,this.handleCancel),this.windowListeners.add(sn.DragStart,zv),this.windowListeners.add(sn.VisibilityChange,this.handleCancel),this.windowListeners.add(sn.ContextMenu,zv),this.documentListeners.add(sn.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Vv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Uv(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(sn.Click,iF,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(sn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const c=(n=As(t))!=null?n:dn,u=Io(i,c);if(!r&&s){if(Uv(s)){if(s.tolerance!=null&&Ru(u,s.tolerance))return this.handleCancel();if(Ru(u,s.distance))return this.handleStart()}if(Vv(s)&&Ru(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===_e.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const aF={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ps extends Mu{constructor(t){const{event:n}=t,r=bi(n.target);super(t,aF,r)}}Ps.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const sF={move:{name:"mousemove"},end:{name:"mouseup"}};var Lu;(function(e){e[e.RightClick=2]="RightClick"})(Lu||(Lu={}));class lF extends Mu{constructor(t){super(t,sF,bi(t.event.target))}}lF.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Lu.RightClick?!1:(r==null||r({event:n}),!0)}}];const Bu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class cF extends Mu{constructor(t){super(t,Bu)}static setup(){return window.addEventListener(Bu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Bu.move.name,t)};function t(){}}}cF.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var To;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(To||(To={}));var Ds;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ds||(Ds={}));function uF(e){let{acceleration:t,activator:n=To.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=Ds.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:h}=e;const g=fF({delta:d,disabled:!o}),[v,m]=S$(),b=y.useRef({x:0,y:0}),x=y.useRef({x:0,y:0}),S=y.useMemo(()=>{switch(n){case To.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case To.DraggableRect:return i}},[n,i,c]),C=y.useRef(null),I=y.useCallback(()=>{const A=C.current;if(!A)return;const E=b.current.x*x.current.x,k=b.current.y*x.current.y;A.scrollBy(E,k)},[]),w=y.useMemo(()=>s===Ds.TreeOrder?[...u].reverse():u,[s,u]);y.useEffect(()=>{if(!o||!u.length||!S){m();return}for(const A of w){if((r==null?void 0:r(A))===!1)continue;const E=u.indexOf(A),k=f[E];if(!k)continue;const{direction:B,speed:G}=X$(A,k,S,t,h);for(const O of["x","y"])g[O][B[O]]||(G[O]=0,B[O]=0);if(G.x>0||G.y>0){m(),C.current=A,v(I,a),b.current=G,x.current=B;return}}b.current={x:0,y:0},x.current={x:0,y:0},m()},[t,I,r,m,o,a,JSON.stringify(S),JSON.stringify(g),v,u,w,f,JSON.stringify(h)])}const dF={x:{[St.Backward]:!1,[St.Forward]:!1},y:{[St.Backward]:!1,[St.Forward]:!1}};function fF(e){let{delta:t,disabled:n}=e;const r=Ss(t);return wo(i=>{if(n||!r||!i)return dF;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[St.Backward]:i.x[St.Backward]||o.x===-1,[St.Forward]:i.x[St.Forward]||o.x===1},y:{[St.Backward]:i.y[St.Backward]||o.y===-1,[St.Forward]:i.y[St.Forward]||o.y===1}}},[n,t,r])}function hF(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return wo(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function pF(e,t){return y.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Eo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Eo||(Eo={}));var $u;(function(e){e.Optimized="optimized"})($u||($u={}));const Hv=new Map;function gF(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=y.useState(null),{frequency:s,measure:c,strategy:u}=i,f=y.useRef(e),d=b(),h=Co(d),g=y.useCallback(function(x){x===void 0&&(x=[]),!h.current&&a(S=>S===null?x:S.concat(x.filter(C=>!S.includes(C))))},[h]),v=y.useRef(null),m=wo(x=>{if(d&&!n)return Hv;if(!x||x===Hv||f.current!==e||o!=null){const S=new Map;for(let C of e){if(!C)continue;if(o&&o.length>0&&!o.includes(C.id)&&C.rect.current){S.set(C.id,C.rect.current);continue}const I=C.node.current,w=I?new Ou(c(I),I):null;C.rect.current=w,w&&S.set(C.id,w)}return S}return x},[e,o,n,d,c]);return y.useEffect(()=>{f.current=e},[e]),y.useEffect(()=>{d||g()},[n,d]),y.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),y.useEffect(()=>{d||typeof s!="number"||v.current!==null||(v.current=setTimeout(()=>{g(),v.current=null},s))},[s,d,g,...r]),{droppableRects:m,measureDroppableContainers:g,measuringScheduled:o!=null};function b(){switch(u){case Eo.Always:return!1;case Eo.BeforeDragging:return n;default:return!n}}}function Fu(e,t){return wo(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function mF(e,t){return Fu(e,t)}function vF(e){let{callback:t,disabled:n}=e;const r=Cs(t),i=y.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Os(e){let{callback:t,disabled:n}=e;const r=Cs(t),i=y.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function bF(e){return new Ou(xi(e),e)}function Wv(e,t,n){t===void 0&&(t=bF);const[r,i]=y.useState(null);function o(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c!=null?c:n)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const a=vF({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),s=Os({callback:o});return un(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),r}function yF(e){const t=Fu(e);return Pv(e,t)}const Gv=[];function xF(e){const t=y.useRef(e),n=wo(r=>e?r&&r!==Gv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ks(e):Gv,[e]);return y.useEffect(()=>{t.current=e},[e]),n}function CF(e){const[t,n]=y.useState(null),r=y.useRef(e),i=y.useCallback(o=>{const a=Pu(o.target);a&&n(s=>s?(s.set(a,Du(a)),new Map(s)):null)},[]);return y.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(c=>{const u=Pu(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Du(u)]):null}).filter(c=>c!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(c=>{const u=Pu(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),y.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>yi(o,a),dn):Fv(e):dn,[e,t])}function Yv(e,t){t===void 0&&(t=[]);const n=y.useRef(null);return y.useEffect(()=>{n.current=null},t),y.useEffect(()=>{const r=e!==dn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Io(e,n.current):dn}function wF(e){y.useEffect(()=>{if(!xs)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function SF(e,t){return y.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function Kv(e){return y.useMemo(()=>e?K$(e):null,[e])}const qv=[];function IF(e,t){t===void 0&&(t=xi);const[n]=e,r=Kv(n?Mt(n):null),[i,o]=y.useState(qv);function a(){o(()=>e.length?e.map(c=>Bv(c)?r:new Ou(t(c),c)):qv)}const s=Os({callback:a});return un(()=>{s==null||s.disconnect(),a(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function Qv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return xo(t)?t:e}function AF(e){let{measure:t}=e;const[n,r]=y.useState(null),i=y.useCallback(u=>{for(const{target:f}of u)if(xo(f)){r(d=>{const h=t(f);return d?Q($({},d),{width:h.width,height:h.height}):h});break}},[t]),o=Os({callback:i}),a=y.useCallback(u=>{const f=Qv(u);o==null||o.disconnect(),f&&(o==null||o.observe(f)),r(f?t(f):null)},[t,o]),[s,c]=ws(a);return y.useMemo(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const TF=[{sensor:Ps,options:{}},{sensor:_s,options:{}}],EF={current:{}},Rs={draggable:{measure:Ov},droppable:{measure:Ov,strategy:Eo.WhileDragging,frequency:$u.Optimized},dragOverlay:{measure:xi}};class ko extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const kF={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ko,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ts},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Rs,measureDroppableContainers:Ts,windowRect:null,measuringScheduled:!1},Jv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ts,draggableNodes:new Map,over:null,measureDroppableContainers:Ts},_o=y.createContext(Jv),Xv=y.createContext(kF);function _F(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ko}}}function PF(e,t){switch(t.type){case bt.DragStart:return Q($({},e),{draggable:Q($({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case bt.DragMove:return e.draggable.active==null?e:Q($({},e),{draggable:Q($({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case bt.DragEnd:case bt.DragCancel:return Q($({},e),{draggable:Q($({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case bt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new ko(e.droppable.containers);return i.set(r,n),Q($({},e),{droppable:Q($({},e.droppable),{containers:i})})}case bt.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new ko(e.droppable.containers);return a.set(n,Q($({},o),{disabled:i})),Q($({},e),{droppable:Q($({},e.droppable),{containers:a})})}case bt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new ko(e.droppable.containers);return o.delete(n),Q($({},e),{droppable:Q($({},e.droppable),{containers:o})})}default:return e}}function DF(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=y.useContext(_o),o=Ss(r),a=Ss(n==null?void 0:n.id);return y.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!Is(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=T$(f);if(d){d.focus();break}}})}},[r,t,i,a,o]),null}function Zv(e,t){let i=t,{transform:n}=i,r=qe(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a($({transform:o},r)),n):n}function OF(e){return y.useMemo(()=>({draggable:$($({},Rs.draggable),e==null?void 0:e.draggable),droppable:$($({},Rs.droppable),e==null?void 0:e.droppable),dragOverlay:$($({},Rs.dragOverlay),e==null?void 0:e.dragOverlay)}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function RF(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=y.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;un(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=Pv(f,r);if(a||(d.x=0),s||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const h=Rv(u);h&&h.scrollBy({top:d.y,left:d.x})}},[t,a,s,r,n])}const Ms=y.createContext(Q($({},dn),{scaleX:1,scaleY:1}));var cr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(cr||(cr={}));const eb=y.memo(function(t){var n,r,i,o;let Us=t,{id:a,accessibility:s,autoScroll:c=!0,children:u,sensors:f=TF,collisionDetection:d=U$,measuring:h,modifiers:g}=Us,v=qe(Us,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const m=y.useReducer(PF,void 0,_F),[b,x]=m,[S,C]=O$(),[I,w]=y.useState(cr.Uninitialized),A=I===cr.Initialized,{draggable:{active:E,nodes:k,translate:B},droppable:{containers:G}}=b,O=E!=null?k.get(E):null,T=y.useRef({initial:null,translated:null}),N=y.useMemo(()=>{var It;return E!=null?{id:E,data:(It=O==null?void 0:O.data)!=null?It:EF,rect:T}:null},[E,O]),H=y.useRef(null),[j,F]=y.useState(null),[M,V]=y.useState(null),Y=Co(v,Object.values(v)),Z=So("DndDescribedBy",a),D=y.useMemo(()=>G.getEnabled(),[G]),L=OF(h),{droppableRects:U,measureDroppableContainers:W,measuringScheduled:ie}=gF(D,{dragging:A,dependencies:[B.x,B.y],config:L.droppable}),le=hF(k,E),ae=y.useMemo(()=>M?As(M):null,[M]),ee=fn(),ne=mF(le,L.draggable.measure);RF({activeNode:E!=null?k.get(E):null,config:ee.layoutShiftCompensation,initialRect:ne,measure:L.draggable.measure});const J=Wv(le,L.draggable.measure,ne),ce=Wv(le?le.parentElement:null),ve=y.useRef({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ze=G.getNodeFor((n=ve.current.over)==null?void 0:n.id),yt=AF({measure:L.dragOverlay.measure}),dt=(r=yt.nodeRef.current)!=null?r:le,Pt=A?(i=yt.rect)!=null?i:J:null,fe=!!(yt.nodeRef.current&&yt.rect),pe=yF(fe?null:J),Ce=Kv(dt?Mt(dt):null),Ee=xF(A?ze!=null?ze:le:null),Qe=IF(Ee),De=Zv(g,{transform:{x:B.x-pe.x,y:B.y-pe.y,scaleX:1,scaleY:1},activatorEvent:M,active:N,activeNodeRect:J,containerNodeRect:ce,draggingNodeRect:Pt,over:ve.current.over,overlayNodeRect:yt.rect,scrollableAncestors:Ee,scrollableAncestorRects:Qe,windowRect:Ce}),ke=ae?yi(ae,B):null,At=CF(Ee),Tt=Yv(At),Ut=Yv(At,[J]),Lt=yi(De,Tt),Qt=Pt?W$(Pt,De):null,dr=N&&Qt?d({active:N,collisionRect:Qt,droppableRects:U,droppableContainers:D,pointerCoordinates:ke}):null,zs=_v(dr,"id"),[In,Po]=y.useState(null),Nu=fe?De:yi(De,Ut),zu=V$(Nu,(o=In==null?void 0:In.rect)!=null?o:null,J),He=y.useRef(null),wi=y.useCallback((It,P)=>{let{sensor:z,options:q}=P;if(H.current==null)return;const te=k.get(H.current);if(!te)return;const oe=It.nativeEvent,ue=new z({active:H.current,activeNode:te,event:oe,options:q,context:ve,onAbort(de){if(!k.get(de))return;const{onDragAbort:he}=Y.current,me={id:de};he==null||he(me),S({type:"onDragAbort",event:me})},onPending(de,Se,he,me){if(!k.get(de))return;const{onDragPending:Dt}=Y.current,at={id:de,constraint:Se,initialCoordinates:he,offset:me};Dt==null||Dt(at),S({type:"onDragPending",event:at})},onStart(de){const Se=H.current;if(Se==null)return;const he=k.get(Se);if(!he)return;const{onDragStart:me}=Y.current,Me={activatorEvent:oe,active:{id:Se,data:he.data,rect:T}};Le.unstable_batchedUpdates(()=>{me==null||me(Me),w(cr.Initializing),x({type:bt.DragStart,initialCoordinates:de,active:Se}),S({type:"onDragStart",event:Me}),F(He.current),V(oe)})},onMove(de){x({type:bt.DragMove,coordinates:de})},onEnd:we(bt.DragEnd),onCancel:we(bt.DragCancel)});He.current=ue;function we(de){return function(){return _(this,null,function*(){const{active:he,collisions:me,over:Me,scrollAdjustedTranslate:Dt}=ve.current;let at=null;if(he&&Dt){const{cancelDrop:hn}=Y.current;at={activatorEvent:oe,active:he,collisions:me,delta:Dt,over:Me},de===bt.DragEnd&&typeof hn=="function"&&(yield Promise.resolve(hn(at)))&&(de=bt.DragCancel)}H.current=null,Le.unstable_batchedUpdates(()=>{x({type:de}),w(cr.Uninitialized),Po(null),F(null),V(null),He.current=null;const hn=de===bt.DragEnd?"onDragEnd":"onDragCancel";if(at){const An=Y.current[hn];An==null||An(at),S({type:hn,event:at})}})})}}},[k]),Do=y.useCallback((It,P)=>(z,q)=>{const te=z.nativeEvent,oe=k.get(q);if(H.current!==null||!oe||te.dndKit||te.defaultPrevented)return;const ue={active:oe};It(z,P.options,ue)===!0&&(te.dndKit={capturedBy:P.sensor},H.current=q,wi(z,P))},[k,wi]),js=pF(f,Do);wF(f),un(()=>{J&&I===cr.Initializing&&w(cr.Initialized)},[J,I]),y.useEffect(()=>{const{onDragMove:It}=Y.current,{active:P,activatorEvent:z,collisions:q,over:te}=ve.current;if(!P||!z)return;const oe={active:P,activatorEvent:z,collisions:q,delta:{x:Lt.x,y:Lt.y},over:te};Le.unstable_batchedUpdates(()=>{It==null||It(oe),S({type:"onDragMove",event:oe})})},[Lt.x,Lt.y]),y.useEffect(()=>{const{active:It,activatorEvent:P,collisions:z,droppableContainers:q,scrollAdjustedTranslate:te}=ve.current;if(!It||H.current==null||!P||!te)return;const{onDragOver:oe}=Y.current,ue=q.get(zs),we=ue&&ue.rect.current?{id:ue.id,rect:ue.rect.current,data:ue.data,disabled:ue.disabled}:null,de={active:It,activatorEvent:P,collisions:z,delta:{x:te.x,y:te.y},over:we};Le.unstable_batchedUpdates(()=>{Po(we),oe==null||oe(de),S({type:"onDragOver",event:de})})},[zs]),un(()=>{ve.current={activatorEvent:M,active:N,activeNode:le,collisionRect:Qt,collisions:dr,droppableRects:U,draggableNodes:k,draggingNode:dt,draggingNodeRect:Pt,droppableContainers:G,over:In,scrollableAncestors:Ee,scrollAdjustedTranslate:Lt},T.current={initial:Pt,translated:Qt}},[N,le,dr,Qt,k,dt,Pt,U,G,In,Ee,Lt]),uF(Q($({},ee),{delta:B,draggingRect:Qt,pointerCoordinates:ke,scrollableAncestors:Ee,scrollableAncestorRects:Qe}));const Si=y.useMemo(()=>({active:N,activeNode:le,activeNodeRect:J,activatorEvent:M,collisions:dr,containerNodeRect:ce,dragOverlay:yt,draggableNodes:k,droppableContainers:G,droppableRects:U,over:In,measureDroppableContainers:W,scrollableAncestors:Ee,scrollableAncestorRects:Qe,measuringConfiguration:L,measuringScheduled:ie,windowRect:Ce}),[N,le,J,M,dr,ce,yt,k,G,U,In,W,Ee,Qe,L,ie,Ce]),Oo=y.useMemo(()=>({activatorEvent:M,activators:js,active:N,activeNodeRect:J,ariaDescribedById:{draggable:Z},dispatch:x,draggableNodes:k,over:In,measureDroppableContainers:W}),[M,js,N,J,x,Z,k,In,W]);return y.createElement(Tv.Provider,{value:C},y.createElement(_o.Provider,{value:Oo},y.createElement(Xv.Provider,{value:Si},y.createElement(Ms.Provider,{value:zu},u)),y.createElement(DF,{disabled:(s==null?void 0:s.restoreFocus)===!1})),y.createElement(L$,Q($({},s),{hiddenTextDescribedById:Z})));function fn(){const It=(j==null?void 0:j.autoScrollEnabled)===!1,P=typeof c=="object"?c.enabled===!1:c===!1,z=A&&!It&&!P;return typeof c=="object"?Q($({},c),{enabled:z}):{enabled:z}}}),MF=y.createContext(null),tb="button",LF="Draggable";function BF(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=So(LF),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:h}=y.useContext(_o),{role:g=tb,roleDescription:v="draggable",tabIndex:m=0}=i!=null?i:{},b=(c==null?void 0:c.id)===t,x=y.useContext(b?Ms:MF),[S,C]=ws(),[I,w]=ws(),A=SF(a,t),E=Co(n);un(()=>(d.set(t,{id:t,key:o,node:S,activatorNode:I,data:E}),()=>{const B=d.get(t);B&&B.key===o&&d.delete(t)}),[d,t]);const k=y.useMemo(()=>({role:g,tabIndex:m,"aria-disabled":r,"aria-pressed":b&&g===tb?!0:void 0,"aria-roledescription":v,"aria-describedby":f.draggable}),[r,g,m,b,v,f.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:k,isDragging:b,listeners:r?void 0:A,node:S,over:h,setNodeRef:C,setActivatorNodeRef:w,transform:x}}function nb(){return y.useContext(Xv)}const $F="Droppable",FF={timeout:25};function NF(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=So($F),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=y.useContext(_o),f=y.useRef({disabled:n}),d=y.useRef(!1),h=y.useRef(null),g=y.useRef(null),{disabled:v,updateMeasurementsFor:m,timeout:b}=$($({},FF),i),x=Co(m!=null?m:r),S=y.useCallback(()=>{if(!d.current){d.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(x.current)?x.current:[x.current]),g.current=null},b)},[b]),C=Os({callback:S,disabled:v||!a}),I=y.useCallback((k,B)=>{C&&(B&&(C.unobserve(B),d.current=!1),k&&C.observe(k))},[C]),[w,A]=ws(I),E=Co(t);return y.useEffect(()=>{!C||!w.current||(C.disconnect(),d.current=!1,C.observe(w.current))},[w,C]),y.useEffect(()=>(s({type:bt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:w,rect:h,data:E}}),()=>s({type:bt.UnregisterDroppable,key:o,id:r})),[r]),y.useEffect(()=>{n!==f.current.disabled&&(s({type:bt.SetDroppableDisabled,id:r,key:o,disabled:n}),f.current.disabled=n)},[r,o,n,s]),{active:a,rect:h,isOver:(c==null?void 0:c.id)===r,node:w,over:c,setNodeRef:A}}function zF(e){let{animation:t,children:n}=e;const[r,i]=y.useState(null),[o,a]=y.useState(null),s=Ss(n);return!n&&!r&&s&&i(s),un(()=>{if(!o)return;const c=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(c==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),y.createElement(y.Fragment,null,n,r?y.cloneElement(r,{ref:a}):null)}const jF={x:0,y:0,scaleX:1,scaleY:1};function UF(e){let{children:t}=e;return y.createElement(_o.Provider,{value:Jv},y.createElement(Ms.Provider,{value:jF},t))}const VF={position:"fixed",touchAction:"none"},HF=e=>Is(e)?"transform 250ms ease":void 0,WF=y.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:c,transform:u,transition:f=HF}=e;if(!s)return null;const d=i?u:Q($({},u),{scaleX:1,scaleY:1}),h=$(Q($({},VF),{width:s.width,height:s.height,top:s.top,left:s.left,transform:Wn.Transform.toString(d),transformOrigin:i&&r?$$(r,s):void 0,transition:typeof f=="function"?f(r):f}),c);return y.createElement(n,{className:a,style:h,ref:t},o)}),rb=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,c]of Object.entries(o.active))c!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,c));if(o!=null&&o.dragOverlay)for(const[s,c]of Object.entries(o.dragOverlay))c!==void 0&&r.node.style.setProperty(s,c);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[c,u]of Object.entries(i))n.node.style.setProperty(c,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},GF={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Wn.Transform.toString(t)},{transform:Wn.Transform.toString(n)}]},sideEffects:rb({styles:{active:{opacity:"0"}}})};function YF(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Cs((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const c=s.node.current;if(!c)return;const u=Qv(a);if(!u)return;const{transform:f}=Mt(a).getComputedStyle(a),d=Dv(f);if(!d)return;const h=typeof t=="function"?t:KF(t);return Nv(c,i.draggable.measure),h({active:{id:o,data:s.data,node:c,rect:i.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}function KF(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=$($({},GF),e);return o=>{let S=o,{active:a,dragOverlay:s,transform:c}=S,u=qe(S,["active","dragOverlay","transform"]);if(!t)return;const f={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},d={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/s.rect.height:1},h=$({x:c.x-f.x,y:c.y-f.y},d),g=i(Q($({},u),{active:a,dragOverlay:s,transform:{initial:c,final:h}})),[v]=g,m=g[g.length-1];if(JSON.stringify(v)===JSON.stringify(m))return;const b=r==null?void 0:r($({active:a,dragOverlay:s},u)),x=s.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise(C=>{x.onfinish=()=>{b==null||b(),C()}})}}let ib=0;function qF(e){return y.useMemo(()=>{if(e!=null)return ib++,ib},[e])}const QF=y.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:c,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:h,containerNodeRect:g,draggableNodes:v,droppableContainers:m,dragOverlay:b,over:x,measuringConfiguration:S,scrollableAncestors:C,scrollableAncestorRects:I,windowRect:w}=nb(),A=y.useContext(Ms),E=qF(d==null?void 0:d.id),k=Zv(a,{activatorEvent:f,active:d,activeNodeRect:h,containerNodeRect:g,draggingNodeRect:b.rect,over:x,overlayNodeRect:b.rect,scrollableAncestors:C,scrollableAncestorRects:I,transform:A,windowRect:w}),B=Fu(h),G=YF({config:r,draggableNodes:v,droppableContainers:m,measuringConfiguration:S}),O=B?b.setRef:void 0;return y.createElement(UF,null,y.createElement(zF,{animation:G},d&&E?y.createElement(WF,{key:E,id:d.id,ref:O,as:s,activatorEvent:f,adjustScale:t,className:c,transition:o,rect:B,style:$({zIndex:u},i),transform:k},n):null))});function Ls(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function JF(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Bs(e){return e!==null&&e>=0}function XF(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ZF(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ob=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Ls(t,r,n),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},ab="Sortable",sb=y.createContext({activeIndex:-1,containerId:ab,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ob,disabled:{draggable:!1,droppable:!1}});function lb(e){let{children:t,id:n,items:r,strategy:i=ob,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:f}=nb(),d=So(ab,n),h=s.rect!==null,g=y.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),v=a!=null,m=a?g.indexOf(a.id):-1,b=u?g.indexOf(u.id):-1,x=y.useRef(g),S=!XF(g,x.current),C=b!==-1&&m===-1||S,I=ZF(o);un(()=>{S&&v&&f(g)},[S,g,v,f]),y.useEffect(()=>{x.current=g},[g]);const w=y.useMemo(()=>({activeIndex:m,containerId:d,disabled:I,disableTransforms:C,items:g,overIndex:b,useDragOverlay:h,sortedRects:JF(g,c),strategy:i}),[m,d,I.draggable,I.droppable,C,g,b,c,h,i]);return y.createElement(sb.Provider,{value:w},t)}const eN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Ls(n,r,i).indexOf(t)},tN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:c,transition:u}=e;return!u||!r||s!==o&&i===a?!1:n?!0:a!==i&&t===c},nN={duration:200,easing:"ease"},cb="transform",rN=Wn.Transition.toString({property:cb,duration:0,easing:"linear"}),iN={roleDescription:"sortable"};function oN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=y.useState(null),s=y.useRef(n);return un(()=>{if(!t&&n!==s.current&&r.current){const c=i.current;if(c){const u=xi(r.current,{ignoreTransform:!0}),f={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(f.x||f.y)&&a(f)}}n!==s.current&&(s.current=n)},[t,n,r,i]),y.useEffect(()=>{o&&a(null)},[o]),o}function ub(e){let{animateLayoutChanges:t=tN,attributes:n,disabled:r,data:i,getNewIndex:o=eN,id:a,strategy:s,resizeObserverConfig:c,transition:u=nN}=e;const{items:f,containerId:d,activeIndex:h,disabled:g,disableTransforms:v,sortedRects:m,overIndex:b,useDragOverlay:x,strategy:S}=y.useContext(sb),C=aN(r,g),I=f.indexOf(a),w=y.useMemo(()=>$({sortable:{containerId:d,index:I,items:f}},i),[d,i,I,f]),A=y.useMemo(()=>f.slice(f.indexOf(a)),[f,a]),{rect:E,node:k,isOver:B,setNodeRef:G}=NF({id:a,data:w,disabled:C.droppable,resizeObserverConfig:$({updateMeasurementsFor:A},c)}),{active:O,activatorEvent:T,activeNodeRect:N,attributes:H,setNodeRef:j,listeners:F,isDragging:M,over:V,setActivatorNodeRef:Y,transform:Z}=BF({id:a,data:w,attributes:$($({},iN),n),disabled:C.draggable}),D=w$(G,j),L=!!O,U=L&&!v&&Bs(h)&&Bs(b),W=!x&&M,ie=W&&U?Z:null,le=s!=null?s:S,ae=U?ie!=null?ie:le({rects:m,activeNodeRect:N,activeIndex:h,overIndex:b,index:I}):null,ee=Bs(h)&&Bs(b)?o({id:a,items:f,activeIndex:h,overIndex:b}):I,ne=O==null?void 0:O.id,J=y.useRef({activeId:ne,items:f,newIndex:ee,containerId:d}),ce=f!==J.current.items,ve=t({active:O,containerId:d,isDragging:M,isSorting:L,id:a,index:I,items:f,newIndex:J.current.newIndex,previousItems:J.current.items,previousContainerId:J.current.containerId,transition:u,wasDragging:J.current.activeId!=null}),ze=oN({disabled:!ve,index:I,node:k,rect:E});return y.useEffect(()=>{L&&J.current.newIndex!==ee&&(J.current.newIndex=ee),d!==J.current.containerId&&(J.current.containerId=d),f!==J.current.items&&(J.current.items=f)},[L,ee,d,f]),y.useEffect(()=>{if(ne===J.current.activeId)return;if(ne!=null&&J.current.activeId==null){J.current.activeId=ne;return}const dt=setTimeout(()=>{J.current.activeId=ne},50);return()=>clearTimeout(dt)},[ne]),{active:O,activeIndex:h,attributes:H,data:w,rect:E,index:I,newIndex:ee,items:f,isOver:B,isSorting:L,isDragging:M,listeners:F,node:k,overIndex:b,over:V,setNodeRef:D,setActivatorNodeRef:Y,setDroppableNodeRef:G,setDraggableNodeRef:j,transform:ze!=null?ze:ae,transition:yt()};function yt(){if(ze||ce&&J.current.newIndex===I)return rN;if(!(W&&!Is(T)||!u)&&(L||ve))return Wn.Transition.toString(Q($({},u),{property:cb}))}}function aN(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function $s(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const sN=[_e.Down,_e.Right,_e.Up,_e.Left],db=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:s}}=t;if(sN.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];o.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const h=i.get(d.id);if(h)switch(e.code){case _e.Down:r.top<h.top&&c.push(d);break;case _e.Up:r.top>h.top&&c.push(d);break;case _e.Left:r.left>h.left&&c.push(d);break;case _e.Right:r.left<h.left&&c.push(d);break}});const u=z$({active:n,collisionRect:r,droppableRects:i,droppableContainers:c,pointerCoordinates:null});let f=_v(u,"id");if(f===(a==null?void 0:a.id)&&u.length>1&&(f=u[1].id),f!=null){const d=o.get(n.id),h=o.get(f),g=h?i.get(h.id):null,v=h==null?void 0:h.node.current;if(v&&g&&d&&h){const b=ks(v).some((A,E)=>s[E]!==A),x=fb(d,h),S=lN(d,h),C=b||!x?{x:0,y:0}:{x:S?r.width-g.width:0,y:S?r.height-g.height:0},I={x:g.left,y:g.top};return C.x&&C.y?I:Io(I,C)}}}};function fb(e,t){return!$s(e)||!$s(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function lN(e,t){return!$s(e)||!$s(t)||!fb(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const hb=Be(l.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator"),Fs=y.createContext({attributes:{},listeners:void 0,ref(){}}),cN=()=>{const{attributes:e,listeners:t,ref:n}=y.useContext(Fs);return l.jsx(p.Button,Q($($({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:l.jsx(hb,{})}))},pb=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:s,listeners:c,setNodeRef:u,setActivatorNodeRef:f,transform:d,transition:h}=ub({id:t}),g=y.useMemo(()=>({attributes:a,listeners:c,ref:f}),[a,c,f]),v={opacity:s?.6:void 0,transform:Wn.Translate.toString(d),transition:h};return l.jsx(Fs.Provider,{value:g,children:l.jsx(p.ListItem,{variant:o,ref:u,style:v,startAction:i?l.jsx(cN,{}):l.jsx(l.Fragment,{}),endAction:i?l.jsx(p.Tooltip,{title:n,children:l.jsx(p.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:l.jsx(Oe.Remove,{})})}):l.jsx(l.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},uN={sideEffects:rb({styles:{active:{opacity:"0.6"}}})},gb=({children:e})=>l.jsx(QF,{dropAnimation:uN,children:e}),dN=({entities:e=[],labels:t,disabled:n,setEntities:r,removeItem:i})=>{const[o,a]=y.useState(null),s=y.useMemo(()=>e.find(u=>u.id===(o==null?void 0:o.id)),[o,e]),c=Ev(Es(Ps),Es(_s,{coordinateGetter:db}));return l.jsxs(eb,{sensors:c,onDragStart:({active:u})=>{a(u)},onDragEnd:({active:u,over:f})=>{if(f&&u.id!==(f==null?void 0:f.id)){const d=e.findIndex(({id:g})=>g===u.id),h=e.findIndex(({id:g})=>g===f.id);r(Ls(e,d,h))}a(null)},onDragCancel:()=>{a(null)},children:[l.jsx(lb,{items:e,children:l.jsx(p.List,{sx:{gap:"10px",padding:0},children:e.map(u=>l.jsxs(pb,{id:u.id,variant:"outlined",removeItem:()=>i(u.id),tooltipTitle:t.removeEntity,useDraggable:!n,children:[l.jsx(p.Typography,{ml:n?0:2.5,children:u.title||u.name}),u.type&&l.jsx(p.Chip,{color:_B(u.type),sx:{marginLeft:2,marginRight:4},children:PB(u.type)})]},`sortable-item-${u.id}`))})}),l.jsx(gb,{children:s?l.jsx(l.Fragment,{children:e.map(u=>l.jsx(pb,{id:u.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${u.id}`))}):l.jsx(l.Fragment,{})})]})},fN=({labels:e,value:t,options:n,size:r="sm",disabled:i=!1,sx:o={},onChange:a})=>l.jsxs(p.FormControl,{size:r,disabled:i,children:[l.jsx(p.FormLabel,{children:e.itemsPerPage}),l.jsx(p.Select,{value:t,size:r,onChange:a,sx:Q($({},o),{minHeight:"37px"}),children:n.map((s,c)=>l.jsx(p.Option,{value:s,children:s},`items-per-page-${s}-${c}`))})]}),hN=(e,t)=>{const[n,r]=y.useState(null),{sdk:i}=Ye(),o=()=>_(this,null,function*(){let s=[];if(!e){r(s);return}try{switch(e){case"top_x":s=(yield i.topX.getGames({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":s=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"template":s=(yield i.loyalty.getTemplates(void 0,!0)).data.map(x=>({id:x.id,name:x.name,status:x.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":s=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"personality_quiz":s=(yield i.miniGames.getPersonalityQuizzes({limit:50},!1,!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"either_or":s=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"poll":s=(yield i.voting.getPolls({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"bracket":s=(yield i.bracketGame.getGames({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"standing":s=(yield i.standingGame.getGames({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break}}catch(c){console.error(c),r(s),t();return}r(s)});return y.useEffect(()=>(o(),()=>r(null)),[e]),n},pN=({status:e})=>{let t="neutral";switch(e){case"DYNAMIC":t="primary";break;case"CUSTOM":t="success";break;case"OPEN":t="primary";break;case"LIVE":t="primary";break;case"CANCELED":t="warning";break;case"SETTLED":t="success";break;case"INACTIVE":t="danger";break;case"ACTIVE":t="success";break;case"EXPIRED":t="neutral";break}return l.jsx(p.Chip,{color:t,variant:"solid",size:"sm",children:e})},gN=Be(l.jsx("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond"),mN=Be(l.jsx("path",{d:"m21.58 16.09-1.09-7.66C20.21 6.46 18.52 5 16.53 5H7.47C5.48 5 3.79 6.46 3.51 8.43l-1.09 7.66C2.2 17.63 3.39 19 4.94 19c.68 0 1.32-.27 1.8-.75L9 16h6l2.25 2.25c.48.48 1.13.75 1.8.75 1.56 0 2.75-1.37 2.53-2.91M11 11H9v2H8v-2H6v-1h2V8h1v2h2zm4-1c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m2 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"SportsEsports"),vN=Be(l.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark"),bN=Be(l.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),yN=Be(l.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-7h2zm4 0h-2V7h2zm4 0h-2v-4h2z"}),"Poll"),xN=e=>{switch(e.entityType){case"top_x":return l.jsx(p.Tooltip,{title:"Top X",children:l.jsx(gN,{})});case"match_quiz":return l.jsx(p.Tooltip,{title:"Match Quiz",children:l.jsx(mN,{})});case"template":return l.jsx(p.Tooltip,{title:"Leaderboard Templates",children:l.jsx(Oe.EmojiEvents,{})});case"classic_quiz":return l.jsx(p.Tooltip,{title:"Classic Quiz",children:l.jsx(vN,{})});case"either_or":return l.jsx(p.Tooltip,{title:"Either/Or",children:l.jsx(bN,{})});case"poll":return l.jsx(p.Tooltip,{title:"Poll",children:l.jsx(yN,{})});case"bracket":return l.jsx(p.Tooltip,{title:"Custom Bracket Game",children:l.jsx(Oe.EmojiEvents,{})});case"standing":return l.jsx(p.Tooltip,{title:"Custom Standings Game",children:l.jsx(Oe.EmojiEvents,{})});default:return null}},CN=({entity:e,deleteLabel:t,onDelete:n})=>l.jsx(l.Fragment,{children:l.jsx(p.Card,{sx:{p:2,mb:2},children:l.jsx(p.CardContent,{children:l.jsxs(p.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[l.jsx(p.Typography,{fontSize:"sm",startDecorator:l.jsx(xN,{entityType:e.type}),children:e.name}),l.jsx(p.Box,{display:{xs:"none",md:"block"},children:l.jsx(pN,{status:e.status})}),l.jsx(p.Box,{children:l.jsx(p.Tooltip,{title:t,children:l.jsx(p.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:l.jsx(Oe.Delete,{})})})})]})})})}),wN=(e,t,n,r)=>_(this,null,function*(){let o=[];const a=new Map;t.forEach(s=>{if(a.has(s.entity_type)){const c=a.get(s.entity_type);a.set(s.entity_type,[...c,[s.entity_id,s.entity_relationship]])}else a.set(s.entity_type,[[s.entity_id,s.entity_relationship]])});try{for(const[s,c]of a)switch(s){case"top_x":const u=c.map(([O])=>O),f=yield e.topX.getGames({limit:u.length,gameIds:u},!0);o=[...o,...f.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"match_quiz":const d=c.map(([O])=>O),h=yield e.matchQuiz.getGames({limit:d.length,gameIds:d},!0);o=[...o,...h.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"template":const g=c.map(([O])=>O),v=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...v.data.filter(O=>g.includes(O.id)).map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"classic_quiz":const m=c.map(([O])=>O),b=yield e.miniGames.getClassicQuizzes({limit:m.length,classicQuizIds:m},!1,!0);o=[...o,...b.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"personality_quiz":const x=c.map(([O])=>O),S=yield e.miniGames.getPersonalityQuizzes({limit:x.length,personalityQuizIds:x},!1,!0);o=[...o,...S.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"either_or":const C=c.map(([O])=>O),I=yield e.miniGames.getEitherOrs({limit:C.length,eitherOrIds:C},!1,!0);o=[...o,...I.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"poll":const w=c.map(([O])=>O),A=yield e.voting.getPolls({limit:w.length,pollIds:w},!0);o=[...o,...A.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"bracket":const E=c.map(([O])=>O),k=yield e.bracketGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,...k.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"standing":const B=c.map(([O])=>O),G=yield e.standingGame.getGames({limit:B.length,gameIds:B},!0);o=[...o,...G.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;default:}}catch(s){console.error("Error loading related entities",s),n(o),r()}n(o)}),SN=["top_x","match_quiz","template","classic_quiz","personality_quiz","poll","either_or","bracket","standing"],IN=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],AN=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic Quiz").set("personality_quiz","Personality Quiz").set("either_or","Either/Or").set("match_quiz","Match Quiz").set("top_x","Top X").set("bracket","Custom Bracket Game").set("standing","Custom Standing Game").set("poll","Poll"),mb=new Map().set("relatedTo","Related to").set("blocks","Blocks").set("blockedBy","Blocked by").set("nextInSeries","Next in series").set("previousInSeries","Previous in series").set("bonusPointsGame","Bonus points game"),TN=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState(""),[s,c]=y.useState(null),[u,f]=y.useState("relatedTo"),[d,h]=y.useState(!1),g=()=>h(!d),v=hN(s,g),{sdk:m}=Ye();y.useEffect(()=>(e.length>0&&wN(m,e,i,g),()=>{i([]),a(""),c(null),f("relatedTo")}),[]);const b=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===u)){a("");return}const w=[...e,{entity_id:o,entity_type:s,entity_relationship:u}],A=(v==null?void 0:v.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:s,status:E.status,relationship:u})))||[];i([...r,...A]),t(w),a("")},x=(I,w)=>{const A=e.filter(k=>!(k.entity_id===I&&k.entity_relationship===w)),E=r.filter(k=>!(k.id===I&&k.relationship===w));i(E),t(A)},S=r.reduce((I,w)=>{const A=w.relationship;return I[A]||(I[A]=[]),I[A].push(w),I},{}),C=Object.keys(S).sort();return l.jsxs(l.Fragment,{children:[C.map(I=>l.jsxs(p.Box,{sx:{mb:2},children:[l.jsx(p.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:l.jsx(p.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:mb.get(I)||"Unknown relationship"})}),S[I].map((w,A)=>l.jsx(CN,{entity:w,deleteLabel:n.delete,onDelete:x},`related-entity-relationship-${w.id}-${A}`))]},`relationship-group-${I}`)),l.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[l.jsxs(p.FormControl,{children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:n.type}),l.jsx(p.Select,{value:s,size:"sm",name:"entity_type",onChange:(I,w)=>c(w),sx:{minHeight:"37px"},children:SN.map(I=>l.jsx(p.Option,{value:I,children:AN.get(I)},`entity-type-option-${I}`))})]}),l.jsxs(p.FormControl,{children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:n.relationship}),l.jsx(p.Select,{value:u,size:"sm",name:"entity_relationship",onChange:(I,w)=>f(w),sx:{minHeight:"37px"},children:IN.map(I=>l.jsx(p.Option,{value:I,children:mb.get(I)},`entity-relationship-option-${I}`))})]}),l.jsxs(p.FormControl,{children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:n.entity}),l.jsx(p.Select,{value:o,size:"sm",name:"entity_id",onChange:(I,w)=>a(w),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!v&&l.jsx(p.CircularProgress,{size:"sm"}),children:v&&v.map(I=>l.jsx(p.Option,{value:I.id,children:I.name},`entity--${I.id}`))})]}),l.jsx(p.Button,{startDecorator:l.jsx(Oe.Add,{}),disabled:!o||!s,onClick:b,sx:{mb:1},children:n.add})]}),l.jsx(Ke,{showToast:d,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:g})]})},EN=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(!1),[o,a]=y.useState("success"),[s,c]=y.useState(""),u=y.useContext(aa),f=(h,g)=>{a(h),c(g),i(!0)},d=()=>_(this,null,function*(){n(!0);const h=yield u==null?void 0:u.https.exportLeadsPerEntity(e.entityId);if(h!=null&&h.ok){const g=yield h.blob(),v=URL.createObjectURL(g),m=document.createElement("a");m.href=v,m.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(v),n(!1),f("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield h==null?void 0:h.json()),n(!1),f("danger",e.labels.usersLeadsExportErrorMessage)});return l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{mb:2,children:[l.jsx(p.Box,{display:"flex",alignItems:"center",mb:1,children:l.jsx(p.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),l.jsx(p.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:l.jsxs(p.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left",width:"50%"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:e.labels.category}),l.jsx("th",{children:e.labels.action})]})}),l.jsx("tbody",{children:l.jsxs("tr",{children:[l.jsxs("td",{children:[l.jsx(p.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),l.jsx(p.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),l.jsx("td",{children:l.jsx(p.Button,{loading:t,onClick:d,children:e.labels.exportAllUsersLeads})})]})})]})})]}),l.jsx(Ke,{showToast:r,color:o,message:s,hideToast:()=>i(!1)})]})},kN=({tooltipContent:e="Drag to reorder"})=>{const{attributes:t,listeners:n,ref:r}=y.useContext(Fs);return l.jsx(p.Tooltip,{title:e,placement:"left",arrow:!0,children:l.jsx(p.IconButton,Q($($({variant:"plain",color:"neutral",size:"sm",sx:{color:"text.tertiary",my:"auto",mr:1,":hover":{bgcolor:"action.hover"},":active":{bgcolor:"action.selected"},transition:"all 0.2s",cursor:"grab","&:active":{cursor:"grabbing"}}},t),n),{ref:r,children:l.jsx(hb,{})}))})},vb=({id:e,useDraggable:t=!0,variant:n="outlined",item:r,tooltipContent:i})=>{const{attributes:o,isDragging:a,listeners:s,setNodeRef:c,setActivatorNodeRef:u,transform:f,transition:d}=ub({id:e}),h=y.useMemo(()=>({attributes:o,listeners:s,ref:u}),[o,s,u]),g={opacity:a?.6:void 0,transform:Wn.Translate.toString(f),transition:d},v=b=>b.split(" ").map(x=>x[0]).join("").toUpperCase().substring(0,2),m=b=>r!=null&&r.color?r.color:`hsl(${b.split("").reduce((C,I)=>I.charCodeAt(0)+((C<<5)-C),0)%360}, 70%, 80%)`;return l.jsx(Fs.Provider,{value:h,children:l.jsx(p.ListItem,{variant:n,ref:c,style:g,endAction:t?l.jsx(kN,{tooltipContent:i}):null,sx:{p:0,borderRadius:"md",overflow:"hidden",transition:"all 0.2s",boxShadow:a?"md":"sm",transform:`scale(${a?1.02:1})`,border:"1px solid",borderColor:"divider"},children:l.jsxs(p.Box,{sx:{display:"flex",width:"100%",alignItems:"center",gap:2,p:0},children:[l.jsx(p.Sheet,{sx:{width:"8px",alignSelf:"stretch",bgcolor:m(r.name)}}),l.jsx(p.Avatar,{src:r.image,alt:r.name,sx:{bgcolor:m(r.name),my:2,ml:1},children:v(r.name)}),l.jsxs(p.Box,{sx:{py:2,pr:2,flexGrow:1,display:"flex",flexDirection:"column",gap:.5},children:[l.jsx(p.Typography,{level:"title-md",children:r.name}),r.description&&l.jsx(p.Typography,{level:"body-sm",sx:{color:"text.secondary",textOverflow:"ellipsis"},children:r.description}),l.jsx(p.Box,{sx:{mt:.5},children:r.type&&l.jsx(p.Chip,{variant:"soft",color:"primary",size:"sm",sx:{px:1,bgcolor:`${m(r.type)}40`},children:r.type})})]})]})})})},_N=({items:e=[],labels:t,setItems:n})=>{const[r,i]=y.useState(null),o=y.useMemo(()=>e.find(s=>s.id===(r==null?void 0:r.id)),[r,e]),a=Ev(Es(Ps,{activationConstraint:{distance:8}}),Es(_s,{coordinateGetter:db}));return e.length===0?l.jsx(p.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",border:"1px dashed",borderColor:"divider",borderRadius:"md"},children:l.jsx(p.Typography,{level:"body-lg",color:"neutral",children:(t==null?void 0:t.noItemsToDisplay)||"No items to display"})}):l.jsxs(eb,{sensors:a,onDragStart:({active:s})=>{i(s)},onDragEnd:({active:s,over:c})=>{if(c&&s.id!==(c==null?void 0:c.id)){const u=e.findIndex(({id:d})=>d===s.id),f=e.findIndex(({id:d})=>d===c.id);n(Ls(e,u,f))}i(null)},onDragCancel:()=>{i(null)},children:[l.jsx(lb,{items:e,children:l.jsx(p.List,{sx:{gap:2,maxHeight:"70vh",overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"action.focus",borderRadius:"4px"}},children:e.map(s=>l.jsx(vb,{id:s.id,variant:"outlined",item:s,tooltipContent:t==null?void 0:t.dragToReorder},`sortable-item-${s.id}`))})}),l.jsx(gb,{children:o?l.jsx(vb,{id:o.id,useDraggable:!1,item:o,tooltipContent:t.dragToReorder},`sortable-overlay-item-${o.id}`):null})]})},PN=({entityType:e,entityId:t,authRequirement:n,labels:r})=>{const[i,o]=y.useState(!1),[a,s]=y.useState(!1),[c,u]=y.useState(""),[f,d]=y.useState(""),[h,g]=y.useState([]),[v,m]=y.useState("before"),[b,x]=y.useState(!1),[S,C]=y.useState(""),[I,w]=y.useState(""),[A,E]=y.useState("STANDARD"),[k,B]=y.useState("left"),[G,O]=y.useState(!0);y.useEffect(()=>{n!=="LEAD"&&o(!1),n!=="REGISTERED"&&s(!1)},[n]);const T=`
2475
+ `},M$={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function L$(e){let{announcements:t=M$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=R$}=e;const{announce:o,announcement:a}=P$(),s=So("DndLiveRegion"),[c,u]=y.useState(!1);if(y.useEffect(()=>{u(!0)},[]),D$(y.useMemo(()=>({onDragStart(d){let{active:h}=d;o(t.onDragStart({active:h}))},onDragMove(d){let{active:h,over:g}=d;t.onDragMove&&o(t.onDragMove({active:h,over:g}))},onDragOver(d){let{active:h,over:g}=d;o(t.onDragOver({active:h,over:g}))},onDragEnd(d){let{active:h,over:g}=d;o(t.onDragEnd({active:h,over:g}))},onDragCancel(d){let{active:h,over:g}=d;o(t.onDragCancel({active:h,over:g}))}}),[o,t])),!c)return null;const f=y.createElement(y.Fragment,null,y.createElement(k$,{id:r,value:i.draggable}),y.createElement(_$,{id:s,announcement:a}));return n?Le.createPortal(f,n):f}var bt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(bt||(bt={}));function Ts(){}function Es(e,t){return y.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function Ev(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const dn=Object.freeze({x:0,y:0});function B$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $$(e,t){const n=As(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function F$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function N$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function kv(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function _v(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const z$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=kv(t),o=[];for(const a of r){const{id:s}=a,c=n.get(s);if(c){const u=kv(c),f=i.reduce((h,g,v)=>h+B$(u[v],g),0),d=Number((f/4).toFixed(4));o.push({id:s,data:{droppableContainer:a,value:d}})}}return o.sort(F$)};function j$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){const c=t.width*t.height,u=e.width*e.height,f=a*s,d=f/(c+u-f);return Number(d.toFixed(4))}return 0}const U$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const c=j$(s,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(N$)};function V$(e,t,n){return q(B({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function Pv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:dn}function H$(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>q(B({},a),{top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),B({},n))}}const W$=H$(1);function Dv(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function G$(e,t,n){const r=Dv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,c=e.left-a-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const Y$={ignoreTransform:!1};function xi(e,t){t===void 0&&(t=Y$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=Mt(e).getComputedStyle(e);u&&(n=G$(n,u,f))}const{top:r,left:i,width:o,height:a,bottom:s,right:c}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:c}}function Ov(e){return xi(e,{ignoreTransform:!0})}function K$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Q$(e,t){return t===void 0&&(t=Mt(e).getComputedStyle(e)),t.position==="fixed"}function q$(e,t){t===void 0&&(t=Mt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function ks(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(ku(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!xo(i)||Sv(i)||n.includes(i))return n;const o=Mt(e).getComputedStyle(i);return i!==e&&q$(i,o)&&n.push(i),Q$(i,o)?n:r(i.parentNode)}return e?r(e):n}function Rv(e){const[t]=ks(e,1);return t!=null?t:null}function Pu(e){return!xs||!e?null:vi(e)?e:Eu(e)?ku(e)||e===bi(e).scrollingElement?window:xo(e)?e:null:null}function Mv(e){return vi(e)?e.scrollX:e.scrollLeft}function Lv(e){return vi(e)?e.scrollY:e.scrollTop}function Du(e){return{x:Mv(e),y:Lv(e)}}var St;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(St||(St={}));function Bv(e){return!xs||!e?!1:e===document.scrollingElement}function $v(e){const t={x:0,y:0},n=Bv(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const J$={x:.2,y:.2};function X$(e,t,n,r,i){let{top:o,left:a,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=J$);const{isTop:u,isBottom:f,isLeft:d,isRight:h}=$v(e),g={x:0,y:0},v={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(g.y=St.Backward,v.y=r*Math.abs((t.top+m.height-o)/m.height)):!f&&c>=t.bottom-m.height&&(g.y=St.Forward,v.y=r*Math.abs((t.bottom-m.height-c)/m.height)),!h&&s>=t.right-m.width?(g.x=St.Forward,v.x=r*Math.abs((t.right-m.width-s)/m.width)):!d&&a<=t.left+m.width&&(g.x=St.Backward,v.x=r*Math.abs((t.left+m.width-a)/m.width)),{direction:g,speed:v}}function Z$(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Fv(e){return e.reduce((t,n)=>yi(t,Du(n)),dn)}function eF(e){return e.reduce((t,n)=>t+Mv(n),0)}function tF(e){return e.reduce((t,n)=>t+Lv(n),0)}function Nv(e,t){if(t===void 0&&(t=xi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Rv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const nF=[["x",["left","right"],eF],["y",["top","bottom"],tF]];class Ou{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ks(n),i=Fv(r);this.rect=B({},t),this.width=t.width,this.height=t.height;for(const[o,a,s]of nF)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(r),f=i[o]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ao{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function rF(e){const{EventTarget:t}=Mt(e);return e instanceof t?e:bi(e)}function Ru(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(Ii(n,2)+Ii(r,2))>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var sn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(sn||(sn={}));function zv(e){e.preventDefault()}function iF(e){e.stopPropagation()}var _e;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(_e||(_e={}));const jv={start:[_e.Space,_e.Enter],cancel:[_e.Esc],end:[_e.Space,_e.Enter,_e.Tab]},oF=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case _e.Right:return q(B({},n),{x:n.x+25});case _e.Left:return q(B({},n),{x:n.x-25});case _e.Down:return q(B({},n),{y:n.y+25});case _e.Up:return q(B({},n),{y:n.y-25})}};class _s{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Ao(bi(n)),this.windowListeners=new Ao(Mt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(sn.Resize,this.handleCancel),this.windowListeners.add(sn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(sn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Nv(r),n(dn)}handleKeyDown(t){if(Is(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=jv,coordinateGetter:a=oF,scrollBehavior:s="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:dn;this.referenceCoordinates||(this.referenceCoordinates=f);const d=a(t,{active:n,context:r.current,currentCoordinates:f});if(d){const h=Io(d,f),g={x:0,y:0},{scrollableAncestors:v}=r.current;for(const m of v){const b=t.code,{isTop:x,isRight:S,isLeft:C,isBottom:I,maxScroll:w,minScroll:A}=$v(m),E=Z$(m),k={x:Math.min(b===_e.Right?E.right-E.width/2:E.right,Math.max(b===_e.Right?E.left:E.left+E.width/2,d.x)),y:Math.min(b===_e.Down?E.bottom-E.height/2:E.bottom,Math.max(b===_e.Down?E.top:E.top+E.height/2,d.y))},$=b===_e.Right&&!S||b===_e.Left&&!C,G=b===_e.Down&&!I||b===_e.Up&&!x;if($&&k.x!==d.x){const O=m.scrollLeft+h.x,T=b===_e.Right&&O<=w.x||b===_e.Left&&O>=A.x;if(T&&!h.y){m.scrollTo({left:O,behavior:s});return}T?g.x=m.scrollLeft-O:g.x=b===_e.Right?m.scrollLeft-w.x:m.scrollLeft-A.x,g.x&&m.scrollBy({left:-g.x,behavior:s});break}else if(G&&k.y!==d.y){const O=m.scrollTop+h.y,T=b===_e.Down&&O<=w.y||b===_e.Up&&O>=A.y;if(T&&!h.x){m.scrollTo({top:O,behavior:s});return}T?g.y=m.scrollTop-O:g.y=b===_e.Down?m.scrollTop-w.y:m.scrollTop-A.y,g.y&&m.scrollBy({top:-g.y,behavior:s});break}}this.handleMove(t,yi(Io(d,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}_s.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=jv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Uv(e){return!!(e&&"distance"in e)}function Vv(e){return!!(e&&"delay"in e)}class Mu{constructor(t,n,r){var i;r===void 0&&(r=rF(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=bi(a),this.documentListeners=new Ao(this.document),this.listeners=new Ao(r),this.windowListeners=new Ao(Mt(a)),this.initialCoordinates=(i=As(o))!=null?i:dn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(sn.Resize,this.handleCancel),this.windowListeners.add(sn.DragStart,zv),this.windowListeners.add(sn.VisibilityChange,this.handleCancel),this.windowListeners.add(sn.ContextMenu,zv),this.documentListeners.add(sn.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Vv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Uv(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(sn.Click,iF,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(sn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const c=(n=As(t))!=null?n:dn,u=Io(i,c);if(!r&&s){if(Uv(s)){if(s.tolerance!=null&&Ru(u,s.tolerance))return this.handleCancel();if(Ru(u,s.distance))return this.handleStart()}if(Vv(s)&&Ru(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===_e.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const aF={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ps extends Mu{constructor(t){const{event:n}=t,r=bi(n.target);super(t,aF,r)}}Ps.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const sF={move:{name:"mousemove"},end:{name:"mouseup"}};var Lu;(function(e){e[e.RightClick=2]="RightClick"})(Lu||(Lu={}));class lF extends Mu{constructor(t){super(t,sF,bi(t.event.target))}}lF.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Lu.RightClick?!1:(r==null||r({event:n}),!0)}}];const Bu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class cF extends Mu{constructor(t){super(t,Bu)}static setup(){return window.addEventListener(Bu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Bu.move.name,t)};function t(){}}}cF.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var To;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(To||(To={}));var Ds;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ds||(Ds={}));function uF(e){let{acceleration:t,activator:n=To.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=Ds.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:h}=e;const g=fF({delta:d,disabled:!o}),[v,m]=S$(),b=y.useRef({x:0,y:0}),x=y.useRef({x:0,y:0}),S=y.useMemo(()=>{switch(n){case To.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case To.DraggableRect:return i}},[n,i,c]),C=y.useRef(null),I=y.useCallback(()=>{const A=C.current;if(!A)return;const E=b.current.x*x.current.x,k=b.current.y*x.current.y;A.scrollBy(E,k)},[]),w=y.useMemo(()=>s===Ds.TreeOrder?[...u].reverse():u,[s,u]);y.useEffect(()=>{if(!o||!u.length||!S){m();return}for(const A of w){if((r==null?void 0:r(A))===!1)continue;const E=u.indexOf(A),k=f[E];if(!k)continue;const{direction:$,speed:G}=X$(A,k,S,t,h);for(const O of["x","y"])g[O][$[O]]||(G[O]=0,$[O]=0);if(G.x>0||G.y>0){m(),C.current=A,v(I,a),b.current=G,x.current=$;return}}b.current={x:0,y:0},x.current={x:0,y:0},m()},[t,I,r,m,o,a,JSON.stringify(S),JSON.stringify(g),v,u,w,f,JSON.stringify(h)])}const dF={x:{[St.Backward]:!1,[St.Forward]:!1},y:{[St.Backward]:!1,[St.Forward]:!1}};function fF(e){let{delta:t,disabled:n}=e;const r=Ss(t);return wo(i=>{if(n||!r||!i)return dF;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[St.Backward]:i.x[St.Backward]||o.x===-1,[St.Forward]:i.x[St.Forward]||o.x===1},y:{[St.Backward]:i.y[St.Backward]||o.y===-1,[St.Forward]:i.y[St.Forward]||o.y===1}}},[n,t,r])}function hF(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return wo(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function pF(e,t){return y.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Eo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Eo||(Eo={}));var $u;(function(e){e.Optimized="optimized"})($u||($u={}));const Hv=new Map;function gF(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=y.useState(null),{frequency:s,measure:c,strategy:u}=i,f=y.useRef(e),d=b(),h=Co(d),g=y.useCallback(function(x){x===void 0&&(x=[]),!h.current&&a(S=>S===null?x:S.concat(x.filter(C=>!S.includes(C))))},[h]),v=y.useRef(null),m=wo(x=>{if(d&&!n)return Hv;if(!x||x===Hv||f.current!==e||o!=null){const S=new Map;for(let C of e){if(!C)continue;if(o&&o.length>0&&!o.includes(C.id)&&C.rect.current){S.set(C.id,C.rect.current);continue}const I=C.node.current,w=I?new Ou(c(I),I):null;C.rect.current=w,w&&S.set(C.id,w)}return S}return x},[e,o,n,d,c]);return y.useEffect(()=>{f.current=e},[e]),y.useEffect(()=>{d||g()},[n,d]),y.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),y.useEffect(()=>{d||typeof s!="number"||v.current!==null||(v.current=setTimeout(()=>{g(),v.current=null},s))},[s,d,g,...r]),{droppableRects:m,measureDroppableContainers:g,measuringScheduled:o!=null};function b(){switch(u){case Eo.Always:return!1;case Eo.BeforeDragging:return n;default:return!n}}}function Fu(e,t){return wo(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function mF(e,t){return Fu(e,t)}function vF(e){let{callback:t,disabled:n}=e;const r=Cs(t),i=y.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Os(e){let{callback:t,disabled:n}=e;const r=Cs(t),i=y.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function bF(e){return new Ou(xi(e),e)}function Wv(e,t,n){t===void 0&&(t=bF);const[r,i]=y.useState(null);function o(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c!=null?c:n)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const a=vF({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),s=Os({callback:o});return un(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),r}function yF(e){const t=Fu(e);return Pv(e,t)}const Gv=[];function xF(e){const t=y.useRef(e),n=wo(r=>e?r&&r!==Gv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ks(e):Gv,[e]);return y.useEffect(()=>{t.current=e},[e]),n}function CF(e){const[t,n]=y.useState(null),r=y.useRef(e),i=y.useCallback(o=>{const a=Pu(o.target);a&&n(s=>s?(s.set(a,Du(a)),new Map(s)):null)},[]);return y.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(c=>{const u=Pu(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Du(u)]):null}).filter(c=>c!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(c=>{const u=Pu(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),y.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>yi(o,a),dn):Fv(e):dn,[e,t])}function Yv(e,t){t===void 0&&(t=[]);const n=y.useRef(null);return y.useEffect(()=>{n.current=null},t),y.useEffect(()=>{const r=e!==dn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Io(e,n.current):dn}function wF(e){y.useEffect(()=>{if(!xs)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function SF(e,t){return y.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function Kv(e){return y.useMemo(()=>e?K$(e):null,[e])}const Qv=[];function IF(e,t){t===void 0&&(t=xi);const[n]=e,r=Kv(n?Mt(n):null),[i,o]=y.useState(Qv);function a(){o(()=>e.length?e.map(c=>Bv(c)?r:new Ou(t(c),c)):Qv)}const s=Os({callback:a});return un(()=>{s==null||s.disconnect(),a(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function qv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return xo(t)?t:e}function AF(e){let{measure:t}=e;const[n,r]=y.useState(null),i=y.useCallback(u=>{for(const{target:f}of u)if(xo(f)){r(d=>{const h=t(f);return d?q(B({},d),{width:h.width,height:h.height}):h});break}},[t]),o=Os({callback:i}),a=y.useCallback(u=>{const f=qv(u);o==null||o.disconnect(),f&&(o==null||o.observe(f)),r(f?t(f):null)},[t,o]),[s,c]=ws(a);return y.useMemo(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const TF=[{sensor:Ps,options:{}},{sensor:_s,options:{}}],EF={current:{}},Rs={draggable:{measure:Ov},droppable:{measure:Ov,strategy:Eo.WhileDragging,frequency:$u.Optimized},dragOverlay:{measure:xi}};class ko extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const kF={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ko,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ts},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Rs,measureDroppableContainers:Ts,windowRect:null,measuringScheduled:!1},Jv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ts,draggableNodes:new Map,over:null,measureDroppableContainers:Ts},_o=y.createContext(Jv),Xv=y.createContext(kF);function _F(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ko}}}function PF(e,t){switch(t.type){case bt.DragStart:return q(B({},e),{draggable:q(B({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case bt.DragMove:return e.draggable.active==null?e:q(B({},e),{draggable:q(B({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case bt.DragEnd:case bt.DragCancel:return q(B({},e),{draggable:q(B({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case bt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new ko(e.droppable.containers);return i.set(r,n),q(B({},e),{droppable:q(B({},e.droppable),{containers:i})})}case bt.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new ko(e.droppable.containers);return a.set(n,q(B({},o),{disabled:i})),q(B({},e),{droppable:q(B({},e.droppable),{containers:a})})}case bt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new ko(e.droppable.containers);return o.delete(n),q(B({},e),{droppable:q(B({},e.droppable),{containers:o})})}default:return e}}function DF(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=y.useContext(_o),o=Ss(r),a=Ss(n==null?void 0:n.id);return y.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!Is(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=T$(f);if(d){d.focus();break}}})}},[r,t,i,a,o]),null}function Zv(e,t){let i=t,{transform:n}=i,r=Qe(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(B({transform:o},r)),n):n}function OF(e){return y.useMemo(()=>({draggable:B(B({},Rs.draggable),e==null?void 0:e.draggable),droppable:B(B({},Rs.droppable),e==null?void 0:e.droppable),dragOverlay:B(B({},Rs.dragOverlay),e==null?void 0:e.dragOverlay)}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function RF(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=y.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;un(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=Pv(f,r);if(a||(d.x=0),s||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const h=Rv(u);h&&h.scrollBy({top:d.y,left:d.x})}},[t,a,s,r,n])}const Ms=y.createContext(q(B({},dn),{scaleX:1,scaleY:1}));var cr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(cr||(cr={}));const eb=y.memo(function(t){var n,r,i,o;let Us=t,{id:a,accessibility:s,autoScroll:c=!0,children:u,sensors:f=TF,collisionDetection:d=U$,measuring:h,modifiers:g}=Us,v=Qe(Us,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const m=y.useReducer(PF,void 0,_F),[b,x]=m,[S,C]=O$(),[I,w]=y.useState(cr.Uninitialized),A=I===cr.Initialized,{draggable:{active:E,nodes:k,translate:$},droppable:{containers:G}}=b,O=E!=null?k.get(E):null,T=y.useRef({initial:null,translated:null}),N=y.useMemo(()=>{var It;return E!=null?{id:E,data:(It=O==null?void 0:O.data)!=null?It:EF,rect:T}:null},[E,O]),H=y.useRef(null),[j,F]=y.useState(null),[M,V]=y.useState(null),Y=Co(v,Object.values(v)),Z=So("DndDescribedBy",a),D=y.useMemo(()=>G.getEnabled(),[G]),L=OF(h),{droppableRects:U,measureDroppableContainers:W,measuringScheduled:ie}=gF(D,{dragging:A,dependencies:[$.x,$.y],config:L.droppable}),le=hF(k,E),ae=y.useMemo(()=>M?As(M):null,[M]),ee=fn(),ne=mF(le,L.draggable.measure);RF({activeNode:E!=null?k.get(E):null,config:ee.layoutShiftCompensation,initialRect:ne,measure:L.draggable.measure});const J=Wv(le,L.draggable.measure,ne),ce=Wv(le?le.parentElement:null),ve=y.useRef({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ze=G.getNodeFor((n=ve.current.over)==null?void 0:n.id),yt=AF({measure:L.dragOverlay.measure}),dt=(r=yt.nodeRef.current)!=null?r:le,Pt=A?(i=yt.rect)!=null?i:J:null,fe=!!(yt.nodeRef.current&&yt.rect),pe=yF(fe?null:J),Ce=Kv(dt?Mt(dt):null),Ee=xF(A?ze!=null?ze:le:null),qe=IF(Ee),De=Zv(g,{transform:{x:$.x-pe.x,y:$.y-pe.y,scaleX:1,scaleY:1},activatorEvent:M,active:N,activeNodeRect:J,containerNodeRect:ce,draggingNodeRect:Pt,over:ve.current.over,overlayNodeRect:yt.rect,scrollableAncestors:Ee,scrollableAncestorRects:qe,windowRect:Ce}),ke=ae?yi(ae,$):null,At=CF(Ee),Tt=Yv(At),Ut=Yv(At,[J]),Lt=yi(De,Tt),qt=Pt?W$(Pt,De):null,dr=N&&qt?d({active:N,collisionRect:qt,droppableRects:U,droppableContainers:D,pointerCoordinates:ke}):null,zs=_v(dr,"id"),[In,Po]=y.useState(null),Nu=fe?De:yi(De,Ut),zu=V$(Nu,(o=In==null?void 0:In.rect)!=null?o:null,J),He=y.useRef(null),wi=y.useCallback((It,P)=>{let{sensor:z,options:Q}=P;if(H.current==null)return;const te=k.get(H.current);if(!te)return;const oe=It.nativeEvent,ue=new z({active:H.current,activeNode:te,event:oe,options:Q,context:ve,onAbort(de){if(!k.get(de))return;const{onDragAbort:he}=Y.current,me={id:de};he==null||he(me),S({type:"onDragAbort",event:me})},onPending(de,Se,he,me){if(!k.get(de))return;const{onDragPending:Dt}=Y.current,at={id:de,constraint:Se,initialCoordinates:he,offset:me};Dt==null||Dt(at),S({type:"onDragPending",event:at})},onStart(de){const Se=H.current;if(Se==null)return;const he=k.get(Se);if(!he)return;const{onDragStart:me}=Y.current,Me={activatorEvent:oe,active:{id:Se,data:he.data,rect:T}};Le.unstable_batchedUpdates(()=>{me==null||me(Me),w(cr.Initializing),x({type:bt.DragStart,initialCoordinates:de,active:Se}),S({type:"onDragStart",event:Me}),F(He.current),V(oe)})},onMove(de){x({type:bt.DragMove,coordinates:de})},onEnd:we(bt.DragEnd),onCancel:we(bt.DragCancel)});He.current=ue;function we(de){return function(){return _(this,null,function*(){const{active:he,collisions:me,over:Me,scrollAdjustedTranslate:Dt}=ve.current;let at=null;if(he&&Dt){const{cancelDrop:hn}=Y.current;at={activatorEvent:oe,active:he,collisions:me,delta:Dt,over:Me},de===bt.DragEnd&&typeof hn=="function"&&(yield Promise.resolve(hn(at)))&&(de=bt.DragCancel)}H.current=null,Le.unstable_batchedUpdates(()=>{x({type:de}),w(cr.Uninitialized),Po(null),F(null),V(null),He.current=null;const hn=de===bt.DragEnd?"onDragEnd":"onDragCancel";if(at){const An=Y.current[hn];An==null||An(at),S({type:hn,event:at})}})})}}},[k]),Do=y.useCallback((It,P)=>(z,Q)=>{const te=z.nativeEvent,oe=k.get(Q);if(H.current!==null||!oe||te.dndKit||te.defaultPrevented)return;const ue={active:oe};It(z,P.options,ue)===!0&&(te.dndKit={capturedBy:P.sensor},H.current=Q,wi(z,P))},[k,wi]),js=pF(f,Do);wF(f),un(()=>{J&&I===cr.Initializing&&w(cr.Initialized)},[J,I]),y.useEffect(()=>{const{onDragMove:It}=Y.current,{active:P,activatorEvent:z,collisions:Q,over:te}=ve.current;if(!P||!z)return;const oe={active:P,activatorEvent:z,collisions:Q,delta:{x:Lt.x,y:Lt.y},over:te};Le.unstable_batchedUpdates(()=>{It==null||It(oe),S({type:"onDragMove",event:oe})})},[Lt.x,Lt.y]),y.useEffect(()=>{const{active:It,activatorEvent:P,collisions:z,droppableContainers:Q,scrollAdjustedTranslate:te}=ve.current;if(!It||H.current==null||!P||!te)return;const{onDragOver:oe}=Y.current,ue=Q.get(zs),we=ue&&ue.rect.current?{id:ue.id,rect:ue.rect.current,data:ue.data,disabled:ue.disabled}:null,de={active:It,activatorEvent:P,collisions:z,delta:{x:te.x,y:te.y},over:we};Le.unstable_batchedUpdates(()=>{Po(we),oe==null||oe(de),S({type:"onDragOver",event:de})})},[zs]),un(()=>{ve.current={activatorEvent:M,active:N,activeNode:le,collisionRect:qt,collisions:dr,droppableRects:U,draggableNodes:k,draggingNode:dt,draggingNodeRect:Pt,droppableContainers:G,over:In,scrollableAncestors:Ee,scrollAdjustedTranslate:Lt},T.current={initial:Pt,translated:qt}},[N,le,dr,qt,k,dt,Pt,U,G,In,Ee,Lt]),uF(q(B({},ee),{delta:$,draggingRect:qt,pointerCoordinates:ke,scrollableAncestors:Ee,scrollableAncestorRects:qe}));const Si=y.useMemo(()=>({active:N,activeNode:le,activeNodeRect:J,activatorEvent:M,collisions:dr,containerNodeRect:ce,dragOverlay:yt,draggableNodes:k,droppableContainers:G,droppableRects:U,over:In,measureDroppableContainers:W,scrollableAncestors:Ee,scrollableAncestorRects:qe,measuringConfiguration:L,measuringScheduled:ie,windowRect:Ce}),[N,le,J,M,dr,ce,yt,k,G,U,In,W,Ee,qe,L,ie,Ce]),Oo=y.useMemo(()=>({activatorEvent:M,activators:js,active:N,activeNodeRect:J,ariaDescribedById:{draggable:Z},dispatch:x,draggableNodes:k,over:In,measureDroppableContainers:W}),[M,js,N,J,x,Z,k,In,W]);return y.createElement(Tv.Provider,{value:C},y.createElement(_o.Provider,{value:Oo},y.createElement(Xv.Provider,{value:Si},y.createElement(Ms.Provider,{value:zu},u)),y.createElement(DF,{disabled:(s==null?void 0:s.restoreFocus)===!1})),y.createElement(L$,q(B({},s),{hiddenTextDescribedById:Z})));function fn(){const It=(j==null?void 0:j.autoScrollEnabled)===!1,P=typeof c=="object"?c.enabled===!1:c===!1,z=A&&!It&&!P;return typeof c=="object"?q(B({},c),{enabled:z}):{enabled:z}}}),MF=y.createContext(null),tb="button",LF="Draggable";function BF(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=So(LF),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:h}=y.useContext(_o),{role:g=tb,roleDescription:v="draggable",tabIndex:m=0}=i!=null?i:{},b=(c==null?void 0:c.id)===t,x=y.useContext(b?Ms:MF),[S,C]=ws(),[I,w]=ws(),A=SF(a,t),E=Co(n);un(()=>(d.set(t,{id:t,key:o,node:S,activatorNode:I,data:E}),()=>{const $=d.get(t);$&&$.key===o&&d.delete(t)}),[d,t]);const k=y.useMemo(()=>({role:g,tabIndex:m,"aria-disabled":r,"aria-pressed":b&&g===tb?!0:void 0,"aria-roledescription":v,"aria-describedby":f.draggable}),[r,g,m,b,v,f.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:k,isDragging:b,listeners:r?void 0:A,node:S,over:h,setNodeRef:C,setActivatorNodeRef:w,transform:x}}function nb(){return y.useContext(Xv)}const $F="Droppable",FF={timeout:25};function NF(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=So($F),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=y.useContext(_o),f=y.useRef({disabled:n}),d=y.useRef(!1),h=y.useRef(null),g=y.useRef(null),{disabled:v,updateMeasurementsFor:m,timeout:b}=B(B({},FF),i),x=Co(m!=null?m:r),S=y.useCallback(()=>{if(!d.current){d.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(x.current)?x.current:[x.current]),g.current=null},b)},[b]),C=Os({callback:S,disabled:v||!a}),I=y.useCallback((k,$)=>{C&&($&&(C.unobserve($),d.current=!1),k&&C.observe(k))},[C]),[w,A]=ws(I),E=Co(t);return y.useEffect(()=>{!C||!w.current||(C.disconnect(),d.current=!1,C.observe(w.current))},[w,C]),y.useEffect(()=>(s({type:bt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:w,rect:h,data:E}}),()=>s({type:bt.UnregisterDroppable,key:o,id:r})),[r]),y.useEffect(()=>{n!==f.current.disabled&&(s({type:bt.SetDroppableDisabled,id:r,key:o,disabled:n}),f.current.disabled=n)},[r,o,n,s]),{active:a,rect:h,isOver:(c==null?void 0:c.id)===r,node:w,over:c,setNodeRef:A}}function zF(e){let{animation:t,children:n}=e;const[r,i]=y.useState(null),[o,a]=y.useState(null),s=Ss(n);return!n&&!r&&s&&i(s),un(()=>{if(!o)return;const c=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(c==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),y.createElement(y.Fragment,null,n,r?y.cloneElement(r,{ref:a}):null)}const jF={x:0,y:0,scaleX:1,scaleY:1};function UF(e){let{children:t}=e;return y.createElement(_o.Provider,{value:Jv},y.createElement(Ms.Provider,{value:jF},t))}const VF={position:"fixed",touchAction:"none"},HF=e=>Is(e)?"transform 250ms ease":void 0,WF=y.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:c,transform:u,transition:f=HF}=e;if(!s)return null;const d=i?u:q(B({},u),{scaleX:1,scaleY:1}),h=B(q(B({},VF),{width:s.width,height:s.height,top:s.top,left:s.left,transform:Wn.Transform.toString(d),transformOrigin:i&&r?$$(r,s):void 0,transition:typeof f=="function"?f(r):f}),c);return y.createElement(n,{className:a,style:h,ref:t},o)}),rb=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,c]of Object.entries(o.active))c!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,c));if(o!=null&&o.dragOverlay)for(const[s,c]of Object.entries(o.dragOverlay))c!==void 0&&r.node.style.setProperty(s,c);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[c,u]of Object.entries(i))n.node.style.setProperty(c,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},GF={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Wn.Transform.toString(t)},{transform:Wn.Transform.toString(n)}]},sideEffects:rb({styles:{active:{opacity:"0"}}})};function YF(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Cs((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const c=s.node.current;if(!c)return;const u=qv(a);if(!u)return;const{transform:f}=Mt(a).getComputedStyle(a),d=Dv(f);if(!d)return;const h=typeof t=="function"?t:KF(t);return Nv(c,i.draggable.measure),h({active:{id:o,data:s.data,node:c,rect:i.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}function KF(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=B(B({},GF),e);return o=>{let S=o,{active:a,dragOverlay:s,transform:c}=S,u=Qe(S,["active","dragOverlay","transform"]);if(!t)return;const f={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},d={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/s.rect.height:1},h=B({x:c.x-f.x,y:c.y-f.y},d),g=i(q(B({},u),{active:a,dragOverlay:s,transform:{initial:c,final:h}})),[v]=g,m=g[g.length-1];if(JSON.stringify(v)===JSON.stringify(m))return;const b=r==null?void 0:r(B({active:a,dragOverlay:s},u)),x=s.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise(C=>{x.onfinish=()=>{b==null||b(),C()}})}}let ib=0;function QF(e){return y.useMemo(()=>{if(e!=null)return ib++,ib},[e])}const qF=y.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:c,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:h,containerNodeRect:g,draggableNodes:v,droppableContainers:m,dragOverlay:b,over:x,measuringConfiguration:S,scrollableAncestors:C,scrollableAncestorRects:I,windowRect:w}=nb(),A=y.useContext(Ms),E=QF(d==null?void 0:d.id),k=Zv(a,{activatorEvent:f,active:d,activeNodeRect:h,containerNodeRect:g,draggingNodeRect:b.rect,over:x,overlayNodeRect:b.rect,scrollableAncestors:C,scrollableAncestorRects:I,transform:A,windowRect:w}),$=Fu(h),G=YF({config:r,draggableNodes:v,droppableContainers:m,measuringConfiguration:S}),O=$?b.setRef:void 0;return y.createElement(UF,null,y.createElement(zF,{animation:G},d&&E?y.createElement(WF,{key:E,id:d.id,ref:O,as:s,activatorEvent:f,adjustScale:t,className:c,transition:o,rect:$,style:B({zIndex:u},i),transform:k},n):null))});function Ls(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function JF(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Bs(e){return e!==null&&e>=0}function XF(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ZF(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ob=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Ls(t,r,n),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},ab="Sortable",sb=y.createContext({activeIndex:-1,containerId:ab,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ob,disabled:{draggable:!1,droppable:!1}});function lb(e){let{children:t,id:n,items:r,strategy:i=ob,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:f}=nb(),d=So(ab,n),h=s.rect!==null,g=y.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),v=a!=null,m=a?g.indexOf(a.id):-1,b=u?g.indexOf(u.id):-1,x=y.useRef(g),S=!XF(g,x.current),C=b!==-1&&m===-1||S,I=ZF(o);un(()=>{S&&v&&f(g)},[S,g,v,f]),y.useEffect(()=>{x.current=g},[g]);const w=y.useMemo(()=>({activeIndex:m,containerId:d,disabled:I,disableTransforms:C,items:g,overIndex:b,useDragOverlay:h,sortedRects:JF(g,c),strategy:i}),[m,d,I.draggable,I.droppable,C,g,b,c,h,i]);return y.createElement(sb.Provider,{value:w},t)}const eN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Ls(n,r,i).indexOf(t)},tN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:c,transition:u}=e;return!u||!r||s!==o&&i===a?!1:n?!0:a!==i&&t===c},nN={duration:200,easing:"ease"},cb="transform",rN=Wn.Transition.toString({property:cb,duration:0,easing:"linear"}),iN={roleDescription:"sortable"};function oN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=y.useState(null),s=y.useRef(n);return un(()=>{if(!t&&n!==s.current&&r.current){const c=i.current;if(c){const u=xi(r.current,{ignoreTransform:!0}),f={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(f.x||f.y)&&a(f)}}n!==s.current&&(s.current=n)},[t,n,r,i]),y.useEffect(()=>{o&&a(null)},[o]),o}function ub(e){let{animateLayoutChanges:t=tN,attributes:n,disabled:r,data:i,getNewIndex:o=eN,id:a,strategy:s,resizeObserverConfig:c,transition:u=nN}=e;const{items:f,containerId:d,activeIndex:h,disabled:g,disableTransforms:v,sortedRects:m,overIndex:b,useDragOverlay:x,strategy:S}=y.useContext(sb),C=aN(r,g),I=f.indexOf(a),w=y.useMemo(()=>B({sortable:{containerId:d,index:I,items:f}},i),[d,i,I,f]),A=y.useMemo(()=>f.slice(f.indexOf(a)),[f,a]),{rect:E,node:k,isOver:$,setNodeRef:G}=NF({id:a,data:w,disabled:C.droppable,resizeObserverConfig:B({updateMeasurementsFor:A},c)}),{active:O,activatorEvent:T,activeNodeRect:N,attributes:H,setNodeRef:j,listeners:F,isDragging:M,over:V,setActivatorNodeRef:Y,transform:Z}=BF({id:a,data:w,attributes:B(B({},iN),n),disabled:C.draggable}),D=w$(G,j),L=!!O,U=L&&!v&&Bs(h)&&Bs(b),W=!x&&M,ie=W&&U?Z:null,le=s!=null?s:S,ae=U?ie!=null?ie:le({rects:m,activeNodeRect:N,activeIndex:h,overIndex:b,index:I}):null,ee=Bs(h)&&Bs(b)?o({id:a,items:f,activeIndex:h,overIndex:b}):I,ne=O==null?void 0:O.id,J=y.useRef({activeId:ne,items:f,newIndex:ee,containerId:d}),ce=f!==J.current.items,ve=t({active:O,containerId:d,isDragging:M,isSorting:L,id:a,index:I,items:f,newIndex:J.current.newIndex,previousItems:J.current.items,previousContainerId:J.current.containerId,transition:u,wasDragging:J.current.activeId!=null}),ze=oN({disabled:!ve,index:I,node:k,rect:E});return y.useEffect(()=>{L&&J.current.newIndex!==ee&&(J.current.newIndex=ee),d!==J.current.containerId&&(J.current.containerId=d),f!==J.current.items&&(J.current.items=f)},[L,ee,d,f]),y.useEffect(()=>{if(ne===J.current.activeId)return;if(ne!=null&&J.current.activeId==null){J.current.activeId=ne;return}const dt=setTimeout(()=>{J.current.activeId=ne},50);return()=>clearTimeout(dt)},[ne]),{active:O,activeIndex:h,attributes:H,data:w,rect:E,index:I,newIndex:ee,items:f,isOver:$,isSorting:L,isDragging:M,listeners:F,node:k,overIndex:b,over:V,setNodeRef:D,setActivatorNodeRef:Y,setDroppableNodeRef:G,setDraggableNodeRef:j,transform:ze!=null?ze:ae,transition:yt()};function yt(){if(ze||ce&&J.current.newIndex===I)return rN;if(!(W&&!Is(T)||!u)&&(L||ve))return Wn.Transition.toString(q(B({},u),{property:cb}))}}function aN(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function $s(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const sN=[_e.Down,_e.Right,_e.Up,_e.Left],db=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:s}}=t;if(sN.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];o.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const h=i.get(d.id);if(h)switch(e.code){case _e.Down:r.top<h.top&&c.push(d);break;case _e.Up:r.top>h.top&&c.push(d);break;case _e.Left:r.left>h.left&&c.push(d);break;case _e.Right:r.left<h.left&&c.push(d);break}});const u=z$({active:n,collisionRect:r,droppableRects:i,droppableContainers:c,pointerCoordinates:null});let f=_v(u,"id");if(f===(a==null?void 0:a.id)&&u.length>1&&(f=u[1].id),f!=null){const d=o.get(n.id),h=o.get(f),g=h?i.get(h.id):null,v=h==null?void 0:h.node.current;if(v&&g&&d&&h){const b=ks(v).some((A,E)=>s[E]!==A),x=fb(d,h),S=lN(d,h),C=b||!x?{x:0,y:0}:{x:S?r.width-g.width:0,y:S?r.height-g.height:0},I={x:g.left,y:g.top};return C.x&&C.y?I:Io(I,C)}}}};function fb(e,t){return!$s(e)||!$s(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function lN(e,t){return!$s(e)||!$s(t)||!fb(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const hb=Be(l.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator"),Fs=y.createContext({attributes:{},listeners:void 0,ref(){}}),cN=()=>{const{attributes:e,listeners:t,ref:n}=y.useContext(Fs);return l.jsx(p.Button,q(B(B({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:l.jsx(hb,{})}))},pb=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:s,listeners:c,setNodeRef:u,setActivatorNodeRef:f,transform:d,transition:h}=ub({id:t}),g=y.useMemo(()=>({attributes:a,listeners:c,ref:f}),[a,c,f]),v={opacity:s?.6:void 0,transform:Wn.Translate.toString(d),transition:h};return l.jsx(Fs.Provider,{value:g,children:l.jsx(p.ListItem,{variant:o,ref:u,style:v,startAction:i?l.jsx(cN,{}):l.jsx(l.Fragment,{}),endAction:i?l.jsx(p.Tooltip,{title:n,children:l.jsx(p.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:l.jsx(Oe.Remove,{})})}):l.jsx(l.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},uN={sideEffects:rb({styles:{active:{opacity:"0.6"}}})},gb=({children:e})=>l.jsx(qF,{dropAnimation:uN,children:e}),dN=({entities:e=[],labels:t,disabled:n,setEntities:r,removeItem:i})=>{const[o,a]=y.useState(null),s=y.useMemo(()=>e.find(u=>u.id===(o==null?void 0:o.id)),[o,e]),c=Ev(Es(Ps),Es(_s,{coordinateGetter:db}));return l.jsxs(eb,{sensors:c,onDragStart:({active:u})=>{a(u)},onDragEnd:({active:u,over:f})=>{if(f&&u.id!==(f==null?void 0:f.id)){const d=e.findIndex(({id:g})=>g===u.id),h=e.findIndex(({id:g})=>g===f.id);r(Ls(e,d,h))}a(null)},onDragCancel:()=>{a(null)},children:[l.jsx(lb,{items:e,children:l.jsx(p.List,{sx:{gap:"10px",padding:0},children:e.map(u=>l.jsxs(pb,{id:u.id,variant:"outlined",removeItem:()=>i(u.id),tooltipTitle:t.removeEntity,useDraggable:!n,children:[l.jsx(p.Typography,{ml:n?0:2.5,children:u.title||u.name}),u.type&&l.jsx(p.Chip,{color:_B(u.type),sx:{marginLeft:2,marginRight:4},children:PB(u.type)})]},`sortable-item-${u.id}`))})}),l.jsx(gb,{children:s?l.jsx(l.Fragment,{children:e.map(u=>l.jsx(pb,{id:u.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${u.id}`))}):l.jsx(l.Fragment,{})})]})},fN=({labels:e,value:t,options:n,size:r="sm",disabled:i=!1,sx:o={},onChange:a})=>l.jsxs(p.FormControl,{size:r,disabled:i,children:[l.jsx(p.FormLabel,{children:e.itemsPerPage}),l.jsx(p.Select,{value:t,size:r,onChange:a,sx:q(B({},o),{minHeight:"37px"}),children:n.map((s,c)=>l.jsx(p.Option,{value:s,children:s},`items-per-page-${s}-${c}`))})]}),hN=(e,t)=>{const[n,r]=y.useState(null),{sdk:i}=Ye(),o=()=>_(this,null,function*(){let s=[];if(!e){r(s);return}try{switch(e){case"top_x":s=(yield i.topX.getGames({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":s=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"template":s=(yield i.loyalty.getTemplates(void 0,!0)).data.map(x=>({id:x.id,name:x.name,status:x.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":s=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"personality_quiz":s=(yield i.miniGames.getPersonalityQuizzes({limit:50},!1,!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"either_or":s=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"poll":s=(yield i.voting.getPolls({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"bracket":s=(yield i.bracketGame.getGames({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break;case"standing":s=(yield i.standingGame.getGames({limit:50},!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:e,relationship:"relatedTo"}));break}}catch(c){console.error(c),r(s),t();return}r(s)});return y.useEffect(()=>(o(),()=>r(null)),[e]),n},pN=({status:e})=>{let t="neutral";switch(e){case"DYNAMIC":t="primary";break;case"CUSTOM":t="success";break;case"OPEN":t="primary";break;case"LIVE":t="primary";break;case"CANCELED":t="warning";break;case"SETTLED":t="success";break;case"INACTIVE":t="danger";break;case"ACTIVE":t="success";break;case"EXPIRED":t="neutral";break}return l.jsx(p.Chip,{color:t,variant:"solid",size:"sm",children:e})},gN=Be(l.jsx("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond"),mN=Be(l.jsx("path",{d:"m21.58 16.09-1.09-7.66C20.21 6.46 18.52 5 16.53 5H7.47C5.48 5 3.79 6.46 3.51 8.43l-1.09 7.66C2.2 17.63 3.39 19 4.94 19c.68 0 1.32-.27 1.8-.75L9 16h6l2.25 2.25c.48.48 1.13.75 1.8.75 1.56 0 2.75-1.37 2.53-2.91M11 11H9v2H8v-2H6v-1h2V8h1v2h2zm4-1c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m2 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"SportsEsports"),vN=Be(l.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark"),bN=Be(l.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),yN=Be(l.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-7h2zm4 0h-2V7h2zm4 0h-2v-4h2z"}),"Poll"),xN=e=>{switch(e.entityType){case"top_x":return l.jsx(p.Tooltip,{title:"Top X",children:l.jsx(gN,{})});case"match_quiz":return l.jsx(p.Tooltip,{title:"Match Quiz",children:l.jsx(mN,{})});case"template":return l.jsx(p.Tooltip,{title:"Leaderboard Templates",children:l.jsx(Oe.EmojiEvents,{})});case"classic_quiz":return l.jsx(p.Tooltip,{title:"Classic Quiz",children:l.jsx(vN,{})});case"either_or":return l.jsx(p.Tooltip,{title:"Either/Or",children:l.jsx(bN,{})});case"poll":return l.jsx(p.Tooltip,{title:"Poll",children:l.jsx(yN,{})});case"bracket":return l.jsx(p.Tooltip,{title:"Custom Bracket Game",children:l.jsx(Oe.EmojiEvents,{})});case"standing":return l.jsx(p.Tooltip,{title:"Custom Standings Game",children:l.jsx(Oe.EmojiEvents,{})});default:return null}},CN=({entity:e,deleteLabel:t,onDelete:n})=>l.jsx(l.Fragment,{children:l.jsx(p.Card,{sx:{p:2,mb:2},children:l.jsx(p.CardContent,{children:l.jsxs(p.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[l.jsx(p.Typography,{fontSize:"sm",startDecorator:l.jsx(xN,{entityType:e.type}),children:e.name}),l.jsx(p.Box,{display:{xs:"none",md:"block"},children:l.jsx(pN,{status:e.status})}),l.jsx(p.Box,{children:l.jsx(p.Tooltip,{title:t,children:l.jsx(p.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:l.jsx(Oe.Delete,{})})})})]})})})}),wN=(e,t,n,r)=>_(this,null,function*(){let o=[];const a=new Map;t.forEach(s=>{if(a.has(s.entity_type)){const c=a.get(s.entity_type);a.set(s.entity_type,[...c,[s.entity_id,s.entity_relationship]])}else a.set(s.entity_type,[[s.entity_id,s.entity_relationship]])});try{for(const[s,c]of a)switch(s){case"top_x":const u=c.map(([O])=>O),f=yield e.topX.getGames({limit:u.length,gameIds:u},!0);o=[...o,...f.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"match_quiz":const d=c.map(([O])=>O),h=yield e.matchQuiz.getGames({limit:d.length,gameIds:d},!0);o=[...o,...h.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"template":const g=c.map(([O])=>O),v=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...v.data.filter(O=>g.includes(O.id)).map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"classic_quiz":const m=c.map(([O])=>O),b=yield e.miniGames.getClassicQuizzes({limit:m.length,classicQuizIds:m},!1,!0);o=[...o,...b.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"personality_quiz":const x=c.map(([O])=>O),S=yield e.miniGames.getPersonalityQuizzes({limit:x.length,personalityQuizIds:x},!1,!0);o=[...o,...S.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"either_or":const C=c.map(([O])=>O),I=yield e.miniGames.getEitherOrs({limit:C.length,eitherOrIds:C},!1,!0);o=[...o,...I.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"poll":const w=c.map(([O])=>O),A=yield e.voting.getPolls({limit:w.length,pollIds:w},!0);o=[...o,...A.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"bracket":const E=c.map(([O])=>O),k=yield e.bracketGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,...k.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;case"standing":const $=c.map(([O])=>O),G=yield e.standingGame.getGames({limit:$.length,gameIds:$},!0);o=[...o,...G.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:s,relationship:T}})];break;default:}}catch(s){console.error("Error loading related entities",s),n(o),r()}n(o)}),SN=["top_x","match_quiz","template","classic_quiz","personality_quiz","poll","either_or","bracket","standing"],IN=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],AN=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic Quiz").set("personality_quiz","Personality Quiz").set("either_or","Either/Or").set("match_quiz","Match Quiz").set("top_x","Top X").set("bracket","Custom Bracket Game").set("standing","Custom Standing Game").set("poll","Poll"),mb=new Map().set("relatedTo","Related to").set("blocks","Blocks").set("blockedBy","Blocked by").set("nextInSeries","Next in series").set("previousInSeries","Previous in series").set("bonusPointsGame","Bonus points game"),TN=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState(""),[s,c]=y.useState(null),[u,f]=y.useState("relatedTo"),[d,h]=y.useState(!1),g=()=>h(!d),v=hN(s,g),{sdk:m}=Ye();y.useEffect(()=>(e.length>0&&wN(m,e,i,g),()=>{i([]),a(""),c(null),f("relatedTo")}),[]);const b=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===u)){a("");return}const w=[...e,{entity_id:o,entity_type:s,entity_relationship:u}],A=(v==null?void 0:v.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:s,status:E.status,relationship:u})))||[];i([...r,...A]),t(w),a("")},x=(I,w)=>{const A=e.filter(k=>!(k.entity_id===I&&k.entity_relationship===w)),E=r.filter(k=>!(k.id===I&&k.relationship===w));i(E),t(A)},S=r.reduce((I,w)=>{const A=w.relationship;return I[A]||(I[A]=[]),I[A].push(w),I},{}),C=Object.keys(S).sort();return l.jsxs(l.Fragment,{children:[C.map(I=>l.jsxs(p.Box,{sx:{mb:2},children:[l.jsx(p.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:l.jsx(p.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:mb.get(I)||"Unknown relationship"})}),S[I].map((w,A)=>l.jsx(CN,{entity:w,deleteLabel:n.delete,onDelete:x},`related-entity-relationship-${w.id}-${A}`))]},`relationship-group-${I}`)),l.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[l.jsxs(p.FormControl,{children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:n.type}),l.jsx(p.Select,{value:s,size:"sm",name:"entity_type",onChange:(I,w)=>c(w),sx:{minHeight:"37px"},children:SN.map(I=>l.jsx(p.Option,{value:I,children:AN.get(I)},`entity-type-option-${I}`))})]}),l.jsxs(p.FormControl,{children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:n.relationship}),l.jsx(p.Select,{value:u,size:"sm",name:"entity_relationship",onChange:(I,w)=>f(w),sx:{minHeight:"37px"},children:IN.map(I=>l.jsx(p.Option,{value:I,children:mb.get(I)},`entity-relationship-option-${I}`))})]}),l.jsxs(p.FormControl,{children:[l.jsx(p.FormLabel,{required:!0,color:"primary",children:n.entity}),l.jsx(p.Select,{value:o,size:"sm",name:"entity_id",onChange:(I,w)=>a(w),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!v&&l.jsx(p.CircularProgress,{size:"sm"}),children:v&&v.map(I=>l.jsx(p.Option,{value:I.id,children:I.name},`entity--${I.id}`))})]}),l.jsx(p.Button,{startDecorator:l.jsx(Oe.Add,{}),disabled:!o||!s,onClick:b,sx:{mb:1},children:n.add})]}),l.jsx(Ke,{showToast:d,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:g})]})},EN=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(!1),[o,a]=y.useState("success"),[s,c]=y.useState(""),u=y.useContext(aa),f=(h,g)=>{a(h),c(g),i(!0)},d=()=>_(this,null,function*(){n(!0);const h=yield u==null?void 0:u.https.exportLeadsPerEntity(e.entityId);if(h!=null&&h.ok){const g=yield h.blob(),v=URL.createObjectURL(g),m=document.createElement("a");m.href=v,m.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(v),n(!1),f("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield h==null?void 0:h.json()),n(!1),f("danger",e.labels.usersLeadsExportErrorMessage)});return l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{mb:2,children:[l.jsx(p.Box,{display:"flex",alignItems:"center",mb:1,children:l.jsx(p.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),l.jsx(p.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:l.jsxs(p.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left",width:"50%"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:e.labels.category}),l.jsx("th",{children:e.labels.action})]})}),l.jsx("tbody",{children:l.jsxs("tr",{children:[l.jsxs("td",{children:[l.jsx(p.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),l.jsx(p.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),l.jsx("td",{children:l.jsx(p.Button,{loading:t,onClick:d,children:e.labels.exportAllUsersLeads})})]})})]})})]}),l.jsx(Ke,{showToast:r,color:o,message:s,hideToast:()=>i(!1)})]})},kN=({tooltipContent:e="Drag to reorder"})=>{const{attributes:t,listeners:n,ref:r}=y.useContext(Fs);return l.jsx(p.Tooltip,{title:e,placement:"left",arrow:!0,children:l.jsx(p.IconButton,q(B(B({variant:"plain",color:"neutral",size:"sm",sx:{color:"text.tertiary",my:"auto",mr:1,":hover":{bgcolor:"action.hover"},":active":{bgcolor:"action.selected"},transition:"all 0.2s",cursor:"grab","&:active":{cursor:"grabbing"}}},t),n),{ref:r,children:l.jsx(hb,{})}))})},vb=({id:e,useDraggable:t=!0,variant:n="outlined",item:r,tooltipContent:i})=>{const{attributes:o,isDragging:a,listeners:s,setNodeRef:c,setActivatorNodeRef:u,transform:f,transition:d}=ub({id:e}),h=y.useMemo(()=>({attributes:o,listeners:s,ref:u}),[o,s,u]),g={opacity:a?.6:void 0,transform:Wn.Translate.toString(f),transition:d},v=b=>b.split(" ").map(x=>x[0]).join("").toUpperCase().substring(0,2),m=b=>r!=null&&r.color?r.color:`hsl(${b.split("").reduce((C,I)=>I.charCodeAt(0)+((C<<5)-C),0)%360}, 70%, 80%)`;return l.jsx(Fs.Provider,{value:h,children:l.jsx(p.ListItem,{variant:n,ref:c,style:g,endAction:t?l.jsx(kN,{tooltipContent:i}):null,sx:{p:0,borderRadius:"md",overflow:"hidden",transition:"all 0.2s",boxShadow:a?"md":"sm",transform:`scale(${a?1.02:1})`,border:"1px solid",borderColor:"divider"},children:l.jsxs(p.Box,{sx:{display:"flex",width:"100%",alignItems:"center",gap:2,p:0},children:[l.jsx(p.Sheet,{sx:{width:"8px",alignSelf:"stretch",bgcolor:m(r.name)}}),l.jsx(p.Avatar,{src:r.image,alt:r.name,sx:{bgcolor:m(r.name),my:2,ml:1},children:v(r.name)}),l.jsxs(p.Box,{sx:{py:2,pr:2,flexGrow:1,display:"flex",flexDirection:"column",gap:.5},children:[l.jsx(p.Typography,{level:"title-md",children:r.name}),r.description&&l.jsx(p.Typography,{level:"body-sm",sx:{color:"text.secondary",textOverflow:"ellipsis"},children:r.description}),l.jsx(p.Box,{sx:{mt:.5},children:r.type&&l.jsx(p.Chip,{variant:"soft",color:"primary",size:"sm",sx:{px:1,bgcolor:`${m(r.type)}40`},children:r.type})})]})]})})})},_N=({items:e=[],labels:t,setItems:n})=>{const[r,i]=y.useState(null),o=y.useMemo(()=>e.find(s=>s.id===(r==null?void 0:r.id)),[r,e]),a=Ev(Es(Ps,{activationConstraint:{distance:8}}),Es(_s,{coordinateGetter:db}));return e.length===0?l.jsx(p.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",border:"1px dashed",borderColor:"divider",borderRadius:"md"},children:l.jsx(p.Typography,{level:"body-lg",color:"neutral",children:(t==null?void 0:t.noItemsToDisplay)||"No items to display"})}):l.jsxs(eb,{sensors:a,onDragStart:({active:s})=>{i(s)},onDragEnd:({active:s,over:c})=>{if(c&&s.id!==(c==null?void 0:c.id)){const u=e.findIndex(({id:d})=>d===s.id),f=e.findIndex(({id:d})=>d===c.id);n(Ls(e,u,f))}i(null)},onDragCancel:()=>{i(null)},children:[l.jsx(lb,{items:e,children:l.jsx(p.List,{sx:{gap:2,maxHeight:"70vh",overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"action.focus",borderRadius:"4px"}},children:e.map(s=>l.jsx(vb,{id:s.id,variant:"outlined",item:s,tooltipContent:t==null?void 0:t.dragToReorder},`sortable-item-${s.id}`))})}),l.jsx(gb,{children:o?l.jsx(vb,{id:o.id,useDraggable:!1,item:o,tooltipContent:t.dragToReorder},`sortable-overlay-item-${o.id}`):null})]})},PN=({entityType:e,entityId:t,authRequirement:n,labels:r})=>{const[i,o]=y.useState(!1),[a,s]=y.useState(!1),[c,u]=y.useState(""),[f,d]=y.useState(""),[h,g]=y.useState([]),[v,m]=y.useState("before"),[b,x]=y.useState(!1),[S,C]=y.useState(""),[I,w]=y.useState(""),[A,E]=y.useState("STANDARD"),[k,$]=y.useState("left"),[G,O]=y.useState(!0);y.useEffect(()=>{n!=="LEAD"&&o(!1),n!=="REGISTERED"&&s(!1)},[n]);const T=`
2476
2476
  data-content-type="${e}"`,N=`
2477
2477
  data-content-id="${t}"`,H=h.length>0?`
2478
2478
  data-lead-fields="${h.join(", ")}"`:"",j=i?`
@@ -2485,14 +2485,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2485
2485
  data-image-position="${k}"`:"",L=`
2486
2486
  data-show-answer-explanations="${G}"`,U=`<div
2487
2487
  data-component="fu-widget"${T}${N}${Z}${D}${L}${H}${j}${F}${M}${V}${Y}
2488
- ></div>`,W={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},ie=({title:J})=>l.jsx(p.Tooltip,{title:J,sx:{maxWidth:300},children:l.jsx(ar,{color:"primary"})}),le=()=>l.jsxs(p.Card,{sx:{mb:1.5},children:[l.jsx(kr,{label:"",values:h,allValues:Object.keys(W),valuesMap:W,onChange:J=>g(J)}),l.jsxs(p.FormControl,{sx:{mb:2},children:[l.jsx(p.FormLabel,{color:"primary",children:r.leadPosition}),l.jsxs(p.Select,{value:v,size:"md",name:"lead_position",onChange:(J,ce)=>m(ce==="before"?"before":"after"),children:[l.jsx(p.Option,{value:"before",children:"Before"}),l.jsx(p.Option,{value:"after",children:"After"})]})]})]}),ae=()=>l.jsxs(p.Card,{sx:{mb:1.5},children:[l.jsx(on,{label:r.signInLabel,placeholder:"",defaultValue:"",value:c,required:!1,size:"md",endDecorator:l.jsx(ie,{title:r.signInLabelInfoMessage}),onChange:J=>u(J.target.value)}),l.jsx(on,{label:r.authenticationHandler,placeholder:"",defaultValue:f,value:"",required:!1,size:"md",endDecorator:l.jsx(ie,{title:r.authenticationHandlerInfoMessage}),onChange:J=>d(J.target.value)})]}),ee=()=>l.jsxs(p.Card,{sx:{mb:1.5},children:[l.jsx(on,{label:r.id,placeholder:"",defaultValue:S,required:!1,size:"md",endDecorator:l.jsx(ie,{title:r.campaignIdInfoMessage}),onChange:J=>C(J.target.value)}),l.jsx(on,{label:r.name,placeholder:"",defaultValue:I,required:!1,size:"md",endDecorator:l.jsx(ie,{title:r.campaignNameInfoMessage}),onChange:J=>w(J.target.value)})]}),ne=(J,ce)=>{E(ce),B(ce!=="STANDARD"?null:"left")};return l.jsxs(p.Box,{mt:1,children:[e==="classic-quiz"||e==="poll"?l.jsxs(p.Box,{mb:1.5,children:[l.jsxs(p.FormControl,{sx:{mb:1.5},children:[l.jsx(p.FormLabel,{color:"primary",children:r.layoutTemplate}),l.jsxs(p.Select,{value:A,size:"md",name:"layout_template",onChange:ne,children:[l.jsx(p.Option,{value:"STANDARD",children:"Standard"}),l.jsx(p.Option,{value:"SPLIT",children:"Split"}),l.jsx(p.Option,{value:"OVERLAY",children:"Overlay"})]}),l.jsx(p.FormHelperText,{children:r.layoutTemplateDescription})]}),l.jsxs(p.FormControl,{sx:{mb:1.5},children:[l.jsx(p.FormLabel,{color:"primary",children:r.imagePosition}),l.jsxs(p.Select,{value:k,size:"md",name:"image_position",disabled:A!=="STANDARD",onChange:(J,ce)=>B(ce),children:[l.jsx(p.Option,{value:"left",children:"Left"}),l.jsx(p.Option,{value:"right",children:"Right"})]}),l.jsx(p.FormHelperText,{children:r.imagePositionDescription})]})]}):l.jsx(l.Fragment,{}),e==="classic-quiz"?l.jsxs(p.Box,{display:"flex",alignItems:"center",mb:1.5,children:[l.jsx(pi,{defaultValue:G,label:r.showAnswerExplanations,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:J=>{O(J)}}),l.jsx(p.Tooltip,{title:r.showAnswerExplanationsTooltip,sx:{ml:1,maxWidth:300},children:l.jsx(ar,{color:"primary",fontSize:"small"})})]}):l.jsx(l.Fragment,{}),l.jsxs(p.Box,{display:"flex",mb:1.5,alignItems:"center",children:[l.jsx(pi,{defaultValue:i,label:r.configureLeads,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="LEAD",onChange:J=>{J===!1&&(g([]),m("before")),o(J)}}),n!=="LEAD"&&l.jsx(p.Tooltip,{title:r.configureLeadsDisabledMessage,sx:{ml:1,maxWidth:300},children:l.jsx(ar,{color:"primary",fontSize:"small"})})]}),i&&le(),l.jsxs(p.Box,{display:"flex",mb:1.5,alignItems:"center",children:[l.jsx(pi,{defaultValue:a,label:r.configureSignIn,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="REGISTERED",onChange:J=>{J===!1&&(u(""),d("")),s(J)}}),n!=="REGISTERED"&&l.jsx(p.Tooltip,{title:r.configureSignInDisabledMessage,sx:{ml:1,maxWidth:300},children:l.jsx(ar,{color:"primary",fontSize:"small"})})]}),a&&ae(),l.jsx(pi,{sx:{label:{mb:1.5}},defaultValue:b,label:r.addCampaignInfo,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:J=>{J===!1&&(C(""),w("")),x(J)}}),b&&ee(),l.jsxs(p.Box,{position:"relative",mb:1.5,children:[l.jsx(p.Textarea,{value:U,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:J=>J.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),l.jsx(p.Tooltip,{title:r.copyToClipboard,children:l.jsx(p.Button,{onClick:()=>{navigator.clipboard.writeText(U)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:l.jsx(Oe.ContentCopy,{})})})]}),l.jsx(p.Alert,{variant:"outlined",color:"primary",startDecorator:l.jsx(ar,{}),sx:{mb:1.5,width:"fit-content"},children:l.jsxs(p.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[r.divElementTextInfo,l.jsx(p.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},DN=["load-more","limited"],ON={"load-more":"Load more",limited:"Limited"},RN=({entityId:e,labels:t})=>{const[n,r]=y.useState(!1),[i,o]=y.useState(""),[a,s]=y.useState(""),[c,u]=y.useState(""),[f,d]=y.useState(10),[h,g]=y.useState(2),[v,m]=y.useState("load-more"),b=`
2488
+ ></div>`,W={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},ie=({title:J})=>l.jsx(p.Tooltip,{title:J,sx:{maxWidth:300},children:l.jsx(ar,{color:"primary"})}),le=()=>l.jsxs(p.Card,{sx:{mb:1.5},children:[l.jsx(kr,{label:"",values:h,allValues:Object.keys(W),valuesMap:W,onChange:J=>g(J)}),l.jsxs(p.FormControl,{sx:{mb:2},children:[l.jsx(p.FormLabel,{color:"primary",children:r.leadPosition}),l.jsxs(p.Select,{value:v,size:"md",name:"lead_position",onChange:(J,ce)=>m(ce==="before"?"before":"after"),children:[l.jsx(p.Option,{value:"before",children:"Before"}),l.jsx(p.Option,{value:"after",children:"After"})]})]})]}),ae=()=>l.jsxs(p.Card,{sx:{mb:1.5},children:[l.jsx(on,{label:r.signInLabel,placeholder:"",defaultValue:"",value:c,required:!1,size:"md",endDecorator:l.jsx(ie,{title:r.signInLabelInfoMessage}),onChange:J=>u(J.target.value)}),l.jsx(on,{label:r.authenticationHandler,placeholder:"",defaultValue:f,value:"",required:!1,size:"md",endDecorator:l.jsx(ie,{title:r.authenticationHandlerInfoMessage}),onChange:J=>d(J.target.value)})]}),ee=()=>l.jsxs(p.Card,{sx:{mb:1.5},children:[l.jsx(on,{label:r.id,placeholder:"",defaultValue:S,required:!1,size:"md",endDecorator:l.jsx(ie,{title:r.campaignIdInfoMessage}),onChange:J=>C(J.target.value)}),l.jsx(on,{label:r.name,placeholder:"",defaultValue:I,required:!1,size:"md",endDecorator:l.jsx(ie,{title:r.campaignNameInfoMessage}),onChange:J=>w(J.target.value)})]}),ne=(J,ce)=>{E(ce),$(ce!=="STANDARD"?null:"left")};return l.jsxs(p.Box,{mt:1,children:[e==="classic-quiz"||e==="poll"?l.jsxs(p.Box,{mb:1.5,children:[l.jsxs(p.FormControl,{sx:{mb:1.5},children:[l.jsx(p.FormLabel,{color:"primary",children:r.layoutTemplate}),l.jsxs(p.Select,{value:A,size:"md",name:"layout_template",onChange:ne,children:[l.jsx(p.Option,{value:"STANDARD",children:"Standard"}),l.jsx(p.Option,{value:"SPLIT",children:"Split"}),l.jsx(p.Option,{value:"OVERLAY",children:"Overlay"})]}),l.jsx(p.FormHelperText,{children:r.layoutTemplateDescription})]}),l.jsxs(p.FormControl,{sx:{mb:1.5},children:[l.jsx(p.FormLabel,{color:"primary",children:r.imagePosition}),l.jsxs(p.Select,{value:k,size:"md",name:"image_position",disabled:A!=="STANDARD",onChange:(J,ce)=>$(ce),children:[l.jsx(p.Option,{value:"left",children:"Left"}),l.jsx(p.Option,{value:"right",children:"Right"})]}),l.jsx(p.FormHelperText,{children:r.imagePositionDescription})]})]}):l.jsx(l.Fragment,{}),e==="classic-quiz"?l.jsxs(p.Box,{display:"flex",alignItems:"center",mb:1.5,children:[l.jsx(pi,{defaultValue:G,label:r.showAnswerExplanations,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:J=>{O(J)}}),l.jsx(p.Tooltip,{title:r.showAnswerExplanationsTooltip,sx:{ml:1,maxWidth:300},children:l.jsx(ar,{color:"primary",fontSize:"small"})})]}):l.jsx(l.Fragment,{}),l.jsxs(p.Box,{display:"flex",mb:1.5,alignItems:"center",children:[l.jsx(pi,{defaultValue:i,label:r.configureLeads,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="LEAD",onChange:J=>{J===!1&&(g([]),m("before")),o(J)}}),n!=="LEAD"&&l.jsx(p.Tooltip,{title:r.configureLeadsDisabledMessage,sx:{ml:1,maxWidth:300},children:l.jsx(ar,{color:"primary",fontSize:"small"})})]}),i&&le(),l.jsxs(p.Box,{display:"flex",mb:1.5,alignItems:"center",children:[l.jsx(pi,{defaultValue:a,label:r.configureSignIn,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="REGISTERED",onChange:J=>{J===!1&&(u(""),d("")),s(J)}}),n!=="REGISTERED"&&l.jsx(p.Tooltip,{title:r.configureSignInDisabledMessage,sx:{ml:1,maxWidth:300},children:l.jsx(ar,{color:"primary",fontSize:"small"})})]}),a&&ae(),l.jsx(pi,{sx:{label:{mb:1.5}},defaultValue:b,label:r.addCampaignInfo,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:J=>{J===!1&&(C(""),w("")),x(J)}}),b&&ee(),l.jsxs(p.Box,{position:"relative",mb:1.5,children:[l.jsx(p.Textarea,{value:U,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:J=>J.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),l.jsx(p.Tooltip,{title:r.copyToClipboard,children:l.jsx(p.Button,{onClick:()=>{navigator.clipboard.writeText(U)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:l.jsx(Oe.ContentCopy,{})})})]}),l.jsx(p.Alert,{variant:"outlined",color:"primary",startDecorator:l.jsx(ar,{}),sx:{mb:1.5,width:"fit-content"},children:l.jsxs(p.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[r.divElementTextInfo,l.jsx(p.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},DN=["load-more","limited"],ON={"load-more":"Load more",limited:"Limited"},RN=({entityId:e,labels:t})=>{const[n,r]=y.useState(!1),[i,o]=y.useState(""),[a,s]=y.useState(""),[c,u]=y.useState(""),[f,d]=y.useState(10),[h,g]=y.useState(2),[v,m]=y.useState("load-more"),b=`
2489
2489
  data-content-id="${e}"`,x=i?`
2490
2490
  data-classic-quiz-url="${i}"`:"",S=a?`
2491
2491
  data-either-or-url="${a}"`:"",C=c?`
2492
2492
  data-poll-url="${c}"`:"",I=f?Math.min(50,Math.max(1,f)):1,w=h?Math.min(5,Math.max(1,h)):1,A=`
2493
2493
  data-items-count="${I}"`,E=`
2494
2494
  data-items-per-row="${w}"`,k=`
2495
- data-widget-mode="${v}"`,B=`<div
2495
+ data-widget-mode="${v}"`,$=`<div
2496
2496
  data-component="fu-widget"
2497
2497
  data-content-type="list"${b}${x}${S}${C}${A}${E}${k}
2498
- ></div>`,G=({title:N})=>l.jsx(p.Tooltip,{title:N,sx:{maxWidth:300},children:l.jsx(ar,{color:"primary"})}),O=()=>l.jsxs(p.Card,{sx:{pb:1,mb:3},children:[l.jsx(on,{label:t.classicQuizURL,placeholder:"",defaultValue:i,required:!1,size:"md",endDecorator:l.jsx(G,{title:t.quizzesInfoMessage}),onChange:N=>o(N.target.value)}),l.jsx(on,{label:t.eitherOrURL,placeholder:"",defaultValue:a,required:!1,size:"md",endDecorator:l.jsx(G,{title:t.eitherOrsInfoMessage}),onChange:N=>s(N.target.value)}),l.jsx(on,{label:t.pollURL,placeholder:"",defaultValue:c,required:!1,size:"md",endDecorator:l.jsx(G,{title:t.pollsInfoMessage}),onChange:N=>u(N.target.value)})]}),T=()=>l.jsxs(p.Card,{sx:{pb:1,mb:3},children:[l.jsx(Tu,{label:t.itemsPerPage,description:t.itemsPerPageDescription,defaultValue:f,onChange:N=>d(N||null),size:"md"}),l.jsx(Tu,{label:t.itemsPerRow,description:t.itemsPerRowDescription,defaultValue:h,onChange:N=>g(N||null),size:"md"}),l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:t.mode}),l.jsx(p.Select,{defaultValue:v,onChange:(N,H)=>m(H),children:DN.map((N,H)=>l.jsx(p.Option,{value:N,children:ON[N]},`basic-select-${N}-${H}`))}),l.jsx(p.FormHelperText,{children:t.modeDescription})]})]});return l.jsxs(p.Box,{mt:1,children:[T(),l.jsx(pi,{defaultValue:n,label:t.configureURLs,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:N=>{N===!1&&(o(""),s(""),u("")),r(N)}}),n&&O(),l.jsxs(p.Box,{position:"relative",mb:1,children:[l.jsx(p.Textarea,{value:B,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:N=>N.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),l.jsx(p.Tooltip,{title:t.copyToClipboard,children:l.jsx(p.Button,{onClick:()=>{navigator.clipboard.writeText(B)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:l.jsx(Oe.ContentCopy,{})})})]}),l.jsx(p.Alert,{variant:"outlined",color:"primary",startDecorator:l.jsx(ar,{}),sx:{mb:1,width:"fit-content"},children:l.jsxs(p.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[t.divElementTextInfo,l.jsx(p.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},bb=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],MN=({labels:e,ids:t,onChange:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState([]),[s,c]=y.useState(""),[u,f]=y.useState("name"),[d,h]=y.useState(!1),[g,v]=y.useState(!1),{sdk:m}=Ye(),b=!0,x=()=>v(!g),S=(A,E)=>{i(E);const k=E.map(B=>B.id);n(k&&k.length?k:null)},C=3;y.useEffect(()=>{!s&&t&&t.length&&m.profile.getByIds(t,void 0,b).then(A=>{i(bb(A))}).catch(A=>{x(),console.error(A),i([])})},[]);const I=y.useMemo(()=>sr((A,E)=>{h(!0),m.profile.getByIds(E==="id"?[A]:[],E==="name"?A:void 0,b).then(k=>{a([...bb(k)]),h(!1)}).catch(k=>{console.error(k),x(),a([]),h(!1)})},300),[]);y.useEffect(()=>{if(!s||s.length<C){a([]);return}return I(s,u),()=>I.cancel()},[s,I,u]);const w=(A,E)=>A.map((k,B)=>{var G;return l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:O=>E({index:B}).onClick(O),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(G=k.avatar)!=null?G:Re.avatar}),l.jsx(p.Typography,{children:k.label})]})},k.id)});return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:{marginBottom:"16px"},children:l.jsx(p.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:d,disableClearable:!0,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(A,E)=>A.id===E.id,endDecorator:l.jsxs(l.Fragment,{children:[d&&l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary",marginRight:2}}),l.jsx(p.Divider,{orientation:"vertical"}),l.jsxs(p.Select,{variant:"plain",value:u,onChange:(A,E)=>f(E),slotProps:{listbox:{variant:"outlined"}},sx:{mr:-1.5,"&:hover":{bgcolor:"transparent"}},children:[l.jsx(p.Option,{value:"name",children:e.searchByName}),l.jsx(p.Option,{value:"id",children:e.searchById})]})]}),placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:A=>A.filter(E=>!r.some(k=>k.value===E.value)),onInputChange:(A,E)=>{c(E)},onChange:S,getOptionKey:A=>A.id,value:r,renderTags:w,renderOption:(A,E)=>{var k;return l.jsx(p.AutocompleteOption,Q($({},A),{children:l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(k=E.avatar)!=null?k:Re.avatar}),l.jsx(p.Typography,{children:E.label})]})}))}})}),l.jsx(Ke,{showToast:g,message:e.searchProfilesErrorMessage,color:"danger",hideToast:x})]})},LN=({value:e,sx:t,tooltipPlacement:n})=>{const r=c=>{const u=Math.abs(c);return u>=1e9?(c/1e9).toFixed(1)+"b":u>=1e6?(c/1e6).toFixed(1)+"m":u>=1e3?(c/1e3).toFixed(1)+"k":c.toString()},i=c=>new Intl.NumberFormat("en-US").format(c),o=Math.abs(e)>=1e3,a=r(e),s=i(e);return o?l.jsx(p.Tooltip,{title:s,placement:n,arrow:!0,children:l.jsx(p.Typography,{sx:t,children:a})}):l.jsx(p.Typography,{sx:t,children:a})},BN=(e,t,n,r)=>{if(e&&e.length===0){n([]);return}t.football.getPlayers({playerIds:e}).then(i=>{const o=i.data.map(a=>yb(a));n(o)}).catch(i=>{console.error("Error fetching players by ID:",i),r()})},yb=e=>{var t,n,r,i,o;return{id:e.id,name:e.name,avatar:((t=e.assets)==null?void 0:t.headshot)||Re.avatar,countryName:((n=e.country)==null?void 0:n.name)||"Unknown",countryFlag:((i=(r=e.country)==null?void 0:r.assets)==null?void 0:i.flag)||Re.flag,teams:((o=e.teams)==null?void 0:o.map(a=>{var s;return{id:a.id,name:a.name,logo:((s=a.assets)==null?void 0:s.logo)||Re.team}}))||[]}},$N=({player:e,onRemove:t})=>l.jsx(p.Tooltip,{title:l.jsxs(p.Box,{sx:{p:1},children:[l.jsx(p.Typography,{level:"body-sm",fontWeight:"bold",children:e.name}),l.jsxs(p.Typography,{level:"body-xs",sx:{display:"flex",alignItems:"center",gap:.5,mt:.5},children:[l.jsx("img",{src:e.countryFlag,alt:e.countryName,width:16,height:12,loading:"lazy"}),e.countryName]}),e.teams&&e.teams.length>0&&l.jsxs(p.Box,{sx:{mt:.5},children:[l.jsx(p.Typography,{level:"body-xs",sx:{mb:.5},children:"Teams:"}),l.jsx(p.Box,{sx:{display:"flex",flexDirection:"column",gap:.25},children:e.teams.map((n,r)=>l.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l.jsx("img",{src:n.logo,alt:n.name,width:16,height:16,style:{borderRadius:"2px"},loading:"lazy"}),l.jsx(p.Typography,{level:"body-xs",children:n.name})]},r))})]})]}),placement:"left",variant:"solid",sx:{"--Tooltip-radius":"8px",maxWidth:300,bgcolor:"background.level1"},children:l.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:.5,backgroundColor:"#e0f3ff",borderRadius:"50px",padding:"2px 8px 2px 2px",margin:"2px",position:"relative","&:hover":{backgroundColor:"#d0e8ff",cursor:"default"}},children:[l.jsx(p.Avatar,{src:e.avatar,alt:e.name,size:"sm",sx:{width:24,height:24,border:"1px solid #fff"}}),l.jsx(p.Typography,{level:"body-sm",sx:{fontSize:"12px",maxWidth:80,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),l.jsx(p.IconButton,{size:"sm",variant:"plain",color:"danger",onClick:t,sx:{minHeight:16,minWidth:16,padding:0,ml:.5,"&:hover":{backgroundColor:"rgba(255, 0, 0, 0.1)"}},children:l.jsx(Oe.Close,{sx:{fontSize:12}})})]})}),FN=({labels:e,teamIds:t,selectedPlayers:n,onChangePlayers:r})=>{const[i,o]=y.useState([]),[a,s]=y.useState([]),[c,u]=y.useState([]),[f,d]=y.useState(!1),[h,g]=y.useState(""),[v,m]=y.useState(!1),{sdk:b}=Ye(),x=()=>m(!v),S=t&&t.length>0,C=(k,B)=>{o(B),r(B)},I=()=>_(this,null,function*(){if(S){d(!0);try{const k=t.map(O=>b.football.getTeamById(O)),B=yield Promise.all(k),G=[];B.forEach(O=>{if(O.squad&&O.squad.length>0){const T=O.squad.map(N=>{var H,j,F,M,V;return{id:N.id,name:N.name,avatar:((H=N.assets)==null?void 0:H.headshot)||Re.avatar,countryName:((j=N.country)==null?void 0:j.name)||"Unknown",countryFlag:((M=(F=N.country)==null?void 0:F.assets)==null?void 0:M.flag)||Re.flag,teams:[{id:O.id,name:O.name,logo:((V=O.assets)==null?void 0:V.logo)||Re.team}]}}).sort((N,H)=>N.name.localeCompare(H.name));G.push(...T)}}),u(G),s(G)}catch(k){console.error("Error fetching team players:",k),x()}finally{d(!1)}}}),w=k=>{if(!k){s(c);return}const B=c.filter(G=>G.name.toLowerCase().includes(k.toLowerCase()));s(B)};y.useEffect(()=>{BN(n,b,o,x)},[n]),y.useEffect(()=>{S&&I()},[t]);const A=y.useMemo(()=>sr(k=>{if(!S){if(!k||k.length<2){s([]),d(!1);return}d(!0),b.football.getPlayers({name:k,sortField:"name",sortOrder:"asc"}).then(B=>{const G=B.data.map(O=>yb(O));s(G),d(!1)}).catch(B=>{console.error("Error searching players:",B),s([]),d(!1),x()})}},300),[b,S]);y.useEffect(()=>(S?w(h):A(h),()=>{S||A.cancel()}),[h,S]);const E=(k,B)=>k.map((G,O)=>l.jsx($N,{player:G,onRemove:()=>{const T=B({index:O});T.onClick&&T.onClick({})}},G.id));return l.jsxs(l.Fragment,{children:[l.jsx(p.Autocomplete,{forcePopupIcon:S,multiple:!0,loading:f,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38,flexWrap:"wrap"}},noOptions:{sx:{}}},isOptionEqualToValue:(k,B)=>k.id===B.id,endDecorator:f?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e==null?void 0:e.searchPlayersPlaceholder,options:a,filterSelectedOptions:!0,onInputChange:(k,B)=>{g(B)},onChange:C,getOptionKey:k=>typeof k=="string"?k:k.id,getOptionLabel:k=>typeof k=="string"?k:k.name,value:i,renderTags:E,limitTags:1,renderOption:(k,B)=>{const G={props:k};return l.jsxs(p.AutocompleteOption,Q($({},k),{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(p.Avatar,{src:B.avatar,alt:B.name,size:"sm",sx:{width:32,height:32}}),l.jsxs(p.Box,{sx:{flexGrow:1},children:[l.jsx(p.Typography,{level:"body-sm",fontWeight:"bold",children:B.name}),l.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l.jsx("img",{src:B.countryFlag,alt:B.countryName,width:16,height:12,loading:"lazy"}),l.jsx(p.Typography,{level:"body-xs",color:"neutral",children:B.countryName})]})]})]}),`player-option-${B.id}-${G}`)}}),l.jsx(Ke,{showToast:v,message:e.getPlayersErrorMessage,color:"danger",hideToast:x})]})},NN=(e,t={})=>{const{enabled:n=!0}=t,{sdk:r}=Ye(),[i,o]=y.useState(null),[a,s]=y.useState(!1),[c,u]=y.useState(null),[f,d]=y.useState(null),h=y.useMemo(()=>$({},e),[JSON.stringify(e)]),g=y.useCallback(()=>_(this,null,function*(){var v,m;s(!0),u(null);try{const b=yield r.football.getMatches(h);o(b.data),d((m=(v=b.meta)==null?void 0:v.pagination)!=null?m:null)}catch(b){u(b),o([]),d(null)}finally{s(!1)}}),[r,h]);return y.useEffect(()=>{n&&g()},[g,n]),{matches:i,loading:a,error:c,meta:f,refetch:g}},xb=Be(l.jsx("path",{d:"M4.25 5.61C6.57 8.59 10 13 10 13v5c0 1.1.9 2 2 2s2-.9 2-2v-5s3.43-4.41 5.75-7.39c.51-.66.04-1.61-.8-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAltRounded"),Cb=Be(l.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.89-2-2-2m0 16H5V7h14zm-5.5-6c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5M12 9c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"PreviewRounded"),ur=We("MuiStep",["root","indicator","horizontal","vertical","active","completed","disabled"]),Ci=We("MuiStepIndicator",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]),zN=Be(l.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z"}),"KeyboardArrowLeft"),jN=Be(l.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight"),wb=Be(l.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");class UN{constructor(){X(this,"id","");X(this,"title","");X(this,"alternative_title",null);X(this,"description",null);X(this,"type",null);X(this,"auth_requirement",null);X(this,"rules",null);X(this,"ad_content",null);X(this,"labels",null);X(this,"branding",null);X(this,"embed_code",null);X(this,"custom_fields",null);X(this,"images",null);X(this,"status","");X(this,"flags",[]);X(this,"context",null);X(this,"options",[]);X(this,"related",[]);X(this,"multiple_choice",!1);X(this,"max_multiple_choice_options",null);X(this,"participation_count",0);X(this,"preferences_enabled",!1);X(this,"max_attempts",1);X(this,"external_activity",null)}}const VN=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(""),o=e.generatedEntity,a=d=>{const h=new UN;return h.title=d.question||"",h.status="INACTIVE",h.options=(d.options||[]).map(g=>({title:g,description:"",images:{main:"",mobile:"",cover:""},embed_code:null,preference_mappings:[]})),h},s=d=>{i(d.id);const h=a(d);e.setPollRequestBody(h)},c=()=>{if(!o)return l.jsx(p.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.noPreviewAvailable})});const d=()=>l.jsxs(p.Table,{variant:"outlined",size:"sm",sx:{width:"100%",maxWidth:"100%","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[l.jsx("thead",{children:l.jsx("tr",{children:l.jsx("th",{children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.questions})})})}),l.jsx("tbody",{children:o.questions.map((g,v)=>{var m;return l.jsx("tr",{children:l.jsx("td",{children:l.jsxs(p.Typography,{level:"body-sm",children:[g.question," ",l.jsx(p.Typography,{children:(m=g.options)==null?void 0:m.map((b,x)=>l.jsx(p.Chip,{color:b.correct?"success":"neutral",variant:b.correct?"solid":"outlined",sx:{mr:1},size:"sm",children:b.option},`question-option-${x}`))})]})})},`question-${v}`)})})]}),h=()=>{const g=o.questions||[],v=m=>!m&&m!==0?"neutral":m>=5?"success":m>=4?"primary":m>=3?"warning":"neutral";return l.jsx(p.Box,{component:"ul",sx:{listStyle:"none",m:0,p:0,ml:0,pl:0,marginBlockStart:0,marginBlockEnd:0,marginInlineStart:0,marginInlineEnd:0,paddingInlineStart:0,display:"flex",flexDirection:"column",gap:1},children:g.map((m,b)=>{const x=r===m.id;return l.jsx(p.Box,{component:"li",children:l.jsx(p.Sheet,{variant:"outlined",sx:{p:1,borderRadius:"sm",cursor:"pointer",bgcolor:x?"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))":"background.body",borderColor:x?"primary.solidBg":void 0,"&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"},"&:hover .pollOptionChipNeutral":{backgroundColor:"background.level1",borderColor:"neutral.outlinedBorder"}},onClick:()=>s(m),role:"button",tabIndex:0,onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),s(m))},children:l.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[l.jsx(p.Radio,{name:"selectedPollSuggestion",value:m.id,checked:x,onChange:()=>s(m),size:"sm"}),l.jsxs(p.Box,{sx:{flex:1,minWidth:0},children:[l.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5,mb:.5},children:[l.jsx(p.Typography,{level:"body-sm",fontWeight:600,p:0,children:m.question}),l.jsx(p.Box,{sx:{flex:1}}),m.engagement_score?l.jsx(p.Tooltip,{title:e.labels.engagementScore,children:l.jsx(p.Chip,{size:"sm",variant:"solid",color:v(m.engagement_score),children:m.engagement_score})}):l.jsx(l.Fragment,{})]}),l.jsx(p.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(m.options||[]).map((S,C)=>l.jsx(p.Chip,{className:x?void 0:"pollOptionChipNeutral",variant:x?"soft":"outlined",color:x?"primary":"neutral",size:"sm",sx:{mr:.5,mb:.5},children:S},`poll-suggestion-opt-${C}`))})]})]})})},`poll-suggestion-${m.id||b}`)})})};return e.entityType==="poll"?l.jsx(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",p:1,maxHeight:"400px",my:.5},children:h()}):l.jsxs(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:[l.jsxs(p.Box,{role:"button",tabIndex:0,onClick:()=>n(!t),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),n(v=>!v))},sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}},children:[l.jsx(p.Typography,{level:"body-sm",sx:{flexGrow:1},children:o.title}),l.jsx(p.Tooltip,{title:t?"":e.labels.expand,children:l.jsx(p.IconButton,{"aria-label":"expand row",variant:"plain",color:"neutral",size:"sm",sx:{"&:hover":{backgroundColor:"background.surface"}},children:t?l.jsx(wb,{}):l.jsx(bs,{})})})]}),l.jsx(p.Box,{sx:{display:t?"block":"none",p:1},children:t?d():null})]})},u=()=>!e.matches||e.matches.length===0?l.jsx(p.Box,{sx:{height:250,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.noMatchesFound})}):l.jsx(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"250px",my:.5},children:e.matches.map(d=>{var h,g,v,m,b,x,S,C,I,w,A,E,k,B,G,O,T,N,H,j,F,M,V,Y;return l.jsxs(y.Fragment,{children:[l.jsxs(p.Box,{onClick:()=>e.setSelectedMatchId(d.id),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),e.setSelectedMatchId(d.id))},role:"button",tabIndex:0,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"},backgroundColor:e.selectedMatchId===d.id?"rgba(0,0,0,0.04)":"transparent"},children:[l.jsx(p.Radio,{size:"sm",name:"selectedMatch",value:d.id,checked:e.selectedMatchId===d.id,onChange:Z=>e.setSelectedMatchId(Z.target.value),sx:{mr:1}}),l.jsx(p.Tooltip,{title:(((g=(h=d.context)==null?void 0:h.competition)==null?void 0:g.name)||"Competition with no name")+((b=(m=(v=d.context)==null?void 0:v.competition)==null?void 0:m.country)!=null&&b.name?` (${d.context.competition.country.name})`:""),children:l.jsx(p.Avatar,{src:((C=(S=(x=d.context)==null?void 0:x.competition)==null?void 0:S.assets)==null?void 0:C.logo)||Re.competition,sx:{width:"15px",height:"15px"},slotProps:{img:{loading:"lazy"}}})}),l.jsxs(p.Typography,{level:"body-sm",children:["[",ut(d.kickoffAt).format("HH:mm DD.MM.YYYY"),"]"]}),(I=d.homeTeam)!=null&&I.code?l.jsx(p.Tooltip,{title:d.homeTeam.name,children:l.jsxs(p.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[l.jsx(p.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.homeTeam.id)?700:400,children:d.homeTeam.code||d.homeTeam.name}),l.jsx(p.Avatar,{src:((w=d.homeTeam.assets)==null?void 0:w.logo)||Re.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})]})}):l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.homeTeam.id)?700:400,children:d.homeTeam.code||d.homeTeam.name}),l.jsx(p.Avatar,{src:((A=d.homeTeam.assets)==null?void 0:A.logo)||Re.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})]}),((k=(E=d==null?void 0:d.scores)==null?void 0:E.ftScore)==null?void 0:k.homeGoals)!==null&&((G=(B=d==null?void 0:d.scores)==null?void 0:B.ftScore)==null?void 0:G.awayGoals)!==null?l.jsx(p.Chip,{variant:"outlined",children:((N=(T=(O=d.scores)==null?void 0:O.ftScore)==null?void 0:T.homeGoals)!=null?N:"")+":"+((F=(j=(H=d.scores)==null?void 0:H.ftScore)==null?void 0:j.awayGoals)!=null?F:"")}):" : ",(M=d.awayTeam)!=null&&M.code?l.jsx(p.Tooltip,{title:d.awayTeam.name,children:l.jsxs(p.Box,{display:"flex",gap:.5,alignItems:"center",children:[l.jsx(p.Avatar,{src:((V=d.awayTeam.assets)==null?void 0:V.logo)||Re.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})," ",l.jsx(p.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.awayTeam.id)?700:400,children:d.awayTeam.code||d.awayTeam.name})]})}):l.jsxs(l.Fragment,{children:[l.jsx(p.Avatar,{src:((Y=d.awayTeam.assets)==null?void 0:Y.logo)||Re.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}}),l.jsx(p.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.awayTeam.id)?700:400,children:d.awayTeam.code||d.awayTeam.name})]})]}),l.jsx(p.Divider,{sx:{my:.5}})]},`search-matches-custom-${d.id}`)})}),f=()=>l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{level:"body-xs",children:e.pagination?`${e.labels.page} ${e.pagination.currentPage} ${e.labels.of} ${e.pagination.numberOfPages} • ${e.pagination.totalItems} ${e.labels.total}`:""}),l.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[l.jsx(p.IconButton,{size:"sm",color:"neutral",variant:"outlined",disabled:!e.pagination||e.pagination&&e.pagination.currentPage<=1,onClick:()=>e.setPage(d=>Math.max(1,d-1)),sx:{bgcolor:"background.surface"},children:l.jsx(zN,{})}),l.jsx(p.IconButton,{size:"sm",color:"neutral",variant:"outlined",disabled:!e.pagination||e.pagination&&e.pagination.currentPage>=e.pagination.numberOfPages,onClick:()=>e.setPage(d=>e.pagination?Math.min(e.pagination.numberOfPages,d+1):d+1),sx:{bgcolor:"background.surface"},children:l.jsx(jN,{})})]})]});return e.loading?l.jsx(p.Box,{sx:{height:240},children:l.jsx(hi,{my:0})}):l.jsxs(l.Fragment,{children:[e.step==="search"?u():c(),l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[l.jsx(p.Button,{size:"sm",color:"primary",variant:"outlined",disabled:!e.selectedMatchId,onClick:e.onGenerate,children:e.step==="search"?e.labels.generate:e.labels.regenerate}),e.step==="search"?f():l.jsx(l.Fragment,{})]})]})},HN=e=>{const t=ut(Date.now()).format("YYYY-MM-DD");if(e.step==="preview")return l.jsx(l.Fragment,{});const n=()=>e.entityType==="poll"?l.jsx(p.Checkbox,{disabled:!e.matchFilters.teamIds||e.matchFilters.teamIds.length===0,checked:e.useFramingGuidelines,size:"sm",onChange:r=>{e.setUseFramingGuidelines(r.target.checked)},label:e.labels.useFramingGuidelinesLabel}):l.jsx(l.Fragment,{});return l.jsxs(l.Fragment,{children:[l.jsx(Nm,{labels:{teamsSelectionPlaceholder:e.labels.teamsSelectionPlaceholder||"",searchTeamsErrorMessage:e.labels.searchTeamsErrorMessage},ids:e.matchFilters.teamIds||[],onChange:e.onChangeTeams,scope:e.competitionsScope,readOnly:e.isGenerating,AdditionalCheckbox:n()}),l.jsxs(p.Grid,{container:!0,spacing:2,minWidth:"100%",columns:{xs:0,sm:0,md:12},mb:2,children:[l.jsx(p.Grid,{xs:6,children:l.jsxs(p.FormControl,{size:"sm",children:[l.jsx(p.FormLabel,{children:e.labels.fromDate}),l.jsx(p.Input,{name:"fromDate",type:"date",defaultValue:e.matchFilters.fromDate,onChange:e.onChangeDates,sx:{backgroundColor:"#fff",borderRadius:"md",minHeight:"36px"},slotProps:{input:{max:t}},readOnly:e.isGenerating})]})}),l.jsx(p.Grid,{xs:6,children:l.jsxs(p.FormControl,{size:"sm",children:[l.jsx(p.FormLabel,{children:e.labels.toDate}),l.jsx(p.Input,{name:"toDate",type:"date",defaultValue:e.matchFilters.toDate,onChange:e.onChangeDates,sx:{backgroundColor:"#fff",borderRadius:"md",minHeight:"36px"},slotProps:{input:{max:t}},readOnly:e.isGenerating})]})})]})]})},WN=ut(Date.now()).format("YYYY-MM-DD"),Sb=e=>{const t=e==null?void 0:e.toLowerCase();return t&&Ti[t]?Ti[t].key:"en"},Ib=e=>({fromDate:"",toDate:WN,competitionIds:e&&e.length?e:void 0,teamIds:void 0,sortOrder:"desc",status:"finished"}),GN=e=>{var ee;const[t,n]=y.useState(Sb(e.defaultLanguage)),[r,i]=y.useState(Ib(e.competitionsScope)),[o,a]=y.useState(1),[s,c]=y.useState(""),[u,f]=y.useState(!1),[d,h]=y.useState("search"),[g,v]=y.useState(!1),[m,b]=y.useState(null),[x,S]=y.useState(null),[C,I]=y.useState(!1),[w,A]=y.useState(!1),[E,k]=y.useState(""),[B,G]=y.useState(!1),[O,T]=y.useState(""),[N,H]=y.useState("danger"),j=10,F=y.useMemo(()=>{const ze=r,{fromDate:ne,toDate:J}=ze,ce=qe(ze,["fromDate","toDate"]),ve=$({},ce);if(ne&&(ve.fromDate=`${ne}T00:00:00Z`),J){const yt=ut().add(1,"minute").format("THH:mm:ss")+"Z";ve.toDate=J+yt}return Q($({},ve),{page:o,limit:j})},[r,o]),M=y.useMemo(()=>!(!m||e.entityType==="poll"&&!x),[m,e.entityType,x]);y.useEffect(()=>()=>{n(Sb),i(Ib(e.competitionsScope)),a(1),c(""),f(!1),h("search"),b(null)},[]);const{https:V}=Ye(),{matches:Y,loading:Z,meta:D}=NN(F,{enabled:u}),L=()=>{T(""),G(!1)},U=ne=>{let J="",ce="danger";switch(ne){case"on_generate_failed":J=e.labels.onEntityGenerateErrorMessage;break;case"on_create":J=e.labels.onEntityCreateMessage,ce="success";break;case"on_create_failed":J=e.labels.onEntityCreateErrorMessage;break}H(ce),T(J),G(!0)},W=ne=>{var ce;const J=ne.map(ve=>ve.id);i(ve=>Q($({},ve),{teamIds:J||void 0})),a(1),f(!0),e.entityType==="poll"&&(ne.length===0?(k(""),A(!1)):k(((ce=ne[ne.length-1])==null?void 0:ce.label)||""))},ie=ne=>{const{name:J,value:ce}=ne.target;i(ve=>Q($({},ve),{[J]:ce})),f(!0)},le=()=>_(this,null,function*(){v(!0),e.entityType==="poll"&&S(null);let ne=null;switch(e.entityType){case"classic_quiz":ne=yield V.generatePostMatchQuiz({sportType:"football",lang:t,eventId:s});break;case"poll":const ce=w?E:"";ne=yield V.generatePostMatchPoll({targetParticipant:ce,lang:t,eventId:s});break}if(!(ne!=null&&ne.ok)){const ce=yield ne==null?void 0:ne.json();console.error("Failed to generate AI content",ce),v(!1),U("on_generate_failed");return}const J=yield ne==null?void 0:ne.json();if(e.entityType==="poll"){const ce=J;ce.questions.sort((ve,ze)=>ze.engagement_score-ve.engagement_score),b(ce)}else b(J);v(!1),h("preview")}),ae=ne=>_(this,null,function*(){I(!0);let J=null;switch(e.entityType){case"classic_quiz":const ve=m;J=yield V.createClassicQuiz(ve);break;case"poll":J=yield V.createPoll(x);break}const ce=yield J==null?void 0:J.json();if(!(J!=null&&J.ok)){console.error("Failed to create content",ce),I(!1),U("on_create_failed");return}if(I(!1),ne==="goto"){U("on_create"),e.toggleModal(),e.fetchEntityById(ce.data.id);return}U("on_create")});return l.jsx(p.Modal,{open:e.isOpen,onClose:()=>{g||C||e.toggleModal()},children:l.jsxs(l.Fragment,{children:[l.jsxs(p.ModalDialog,{sx:{backgroundColor:"white",minWidth:"50%",height:900},children:[l.jsx(p.DialogTitle,{children:e.labels.generateFootballPostMatchModalTitle}),l.jsx(p.Divider,{}),l.jsx(p.DialogContent,{sx:{overflowX:"hidden"},children:l.jsxs(l.Fragment,{children:[l.jsxs(p.FormControl,{size:"sm",sx:{mb:2},children:[l.jsx(p.FormLabel,{children:e.labels.language}),l.jsx(p.Select,{value:t,onChange:(ne,J)=>J&&n(J),indicator:null,disabled:g,startDecorator:l.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(Gn[t]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(Gn[t]||"gb").toLowerCase()}.png`,alt:((ee=Object.values(Ie).find(ne=>ne.key===t))==null?void 0:ee.name)||"Language"}),sx:{minWidth:220,minHeight:38},children:Object.values(Ie).map(ne=>l.jsxs(p.Option,{value:ne.key,label:ne.name,children:[l.jsx(p.ListItemDecorator,{children:l.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(Gn[ne.key]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(Gn[ne.key]||"gb").toLowerCase()}.png`,alt:ne.name})}),ne.name]},ne.key))}),l.jsx(p.FormHelperText,{children:e.labels.targetLanguageDescription})]}),l.jsxs(p.Stepper,{sx:{my:2,width:"100%","--StepIndicator-size":"3rem","--Step-connectorInset":"0px",[`& .${Ci.root}`]:{borderWidth:3},[`& .${ur.root}::after`]:{height:3},[`& .${ur.completed}`]:{[`& .${Ci.root}`]:{borderColor:"primary.300",color:"primary.300"},"&::after":{bgcolor:"primary.300"}},[`& .${ur.active}`]:{[`& .${Ci.root}`]:{borderColor:"currentColor"}},[`& .${ur.disabled} *`]:{color:"neutral.outlinedDisabledColor"}},children:[l.jsx(p.Step,{active:d==="search",orientation:"vertical",indicator:l.jsx(p.Tooltip,{title:d==="preview"?e.labels.searchMatchTooltip:"",placement:"right",children:l.jsx(p.StepIndicator,{variant:d==="search"?"solid":"outlined",color:"primary",onClick:()=>{d==="preview"&&(b(null),h("search"))},onKeyDown:ne=>{(ne.key==="Enter"||ne.key===" ")&&d==="preview"&&(ne.preventDefault(),b(null),h("search"))},sx:$({cursor:d==="preview"?"pointer":"default"},d==="preview"&&{animation:"pulse 2s infinite","@keyframes pulse":{"0%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0.7)"},"70%":{boxShadow:"0 0 0 10px rgba(25, 118, 210, 0)"},"100%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0)"}},"&:hover":{animation:"none",boxShadow:"0 0 0 4px rgba(25, 118, 210, 0.3)"}}),role:"button",tabIndex:d==="preview"?0:-1,children:l.jsx(xb,{})})}),children:l.jsx(p.Typography,{sx:$({textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},d==="preview"&&{cursor:"pointer"}),onClick:()=>{d==="preview"&&(b(null),h("search"))},onKeyDown:ne=>{(ne.key==="Enter"||ne.key===" ")&&d==="preview"&&(ne.preventDefault(),b(null),h("search"))},role:"button",tabIndex:d==="preview"?0:-1,children:e.labels.searchMatch})}),l.jsx(p.Step,{orientation:"vertical",active:d==="preview",disabled:d!=="preview",indicator:l.jsx(p.StepIndicator,{variant:d==="preview"?"solid":"outlined",color:"primary",children:l.jsx(Cb,{})}),children:l.jsx(p.Typography,{sx:{textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},children:e.labels.preview})})]}),l.jsx(HN,{entityType:e.entityType,step:d,labels:e.labels,useFramingGuidelines:w,matchFilters:r,competitionsScope:e.competitionsScope,generatedEntity:m,isGenerating:g,setUseFramingGuidelines:A,onChangeTeams:W,onChangeDates:ie}),u?l.jsx(p.Sheet,{variant:"outlined",sx:{p:1,borderRadius:"sm",bgcolor:"background.surface"},children:l.jsx(VN,{step:d,loading:Z||g,matches:Y,selectedMatchId:s,generatedEntity:m,labels:e.labels,pagination:D,teamIdsFilter:r.teamIds,setPollRequestBody:S,setPage:a,setSelectedMatchId:c,onGenerate:le,entityType:e.entityType,setGeneratedEntity:b})}):l.jsx(l.Fragment,{})]})}),l.jsxs(p.DialogActions,{children:[l.jsx(p.Button,{variant:"outlined",color:"primary",loading:C,disabled:!M||g,onClick:()=>ae("goto"),children:e.labels.createAndGoTo}),l.jsx(p.Button,{variant:"solid",color:"primary",loading:C,disabled:!M||g,onClick:()=>ae("continue"),children:e.labels.createAndContinue}),l.jsx(p.Button,{disabled:g||C,variant:"plain",color:"neutral",onClick:ne=>{ne.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]}),l.jsx(Ke,{showToast:B,color:N,message:O,hideToast:L})]})})},YN=e=>{const[t,n]=y.useState(!1),r=e.generatedEntity,i=()=>{if(!r)return l.jsx(p.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.noPreviewAvailable})});const a=()=>l.jsxs(p.Table,{variant:"outlined",size:"sm",sx:{width:"100%",maxWidth:"100%","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[l.jsx("thead",{children:l.jsx("tr",{children:l.jsx("th",{children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.questions})})})}),l.jsx("tbody",{children:r.questions.map((s,c)=>{var u;return l.jsx("tr",{children:l.jsx("td",{children:l.jsxs(p.Typography,{level:"body-sm",children:[s.question," ",l.jsx(p.Typography,{children:(u=s.options)==null?void 0:u.map((f,d)=>l.jsx(p.Chip,{color:f.correct?"success":"neutral",variant:f.correct?"solid":"outlined",sx:{mr:1},size:"sm",children:f.option},`question-option-${d}`))})]})})},`question-${c}`)})})]});return l.jsxs(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:[l.jsxs(p.Box,{role:"button",tabIndex:0,onClick:()=>n(!t),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(c=>!c))},sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}},children:[l.jsx(p.Typography,{level:"body-sm",sx:{flexGrow:1},children:r.title}),l.jsx(p.Tooltip,{title:t?"":e.labels.expand,children:l.jsx(p.IconButton,{"aria-label":"expand row",variant:"plain",color:"neutral",size:"sm",sx:{"&:hover":{backgroundColor:"background.surface"}},children:t?l.jsx(wb,{}):l.jsx(bs,{})})})]}),l.jsx(p.Box,{sx:{display:t?"block":"none",p:1},children:t?a():null})]})},o=()=>!e.races||e.races.length===0?l.jsx(p.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.noRacesFound})}):l.jsx(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:e.races.map(a=>{var u;const s=a.status==="Completed",c=a.status==="Scheduled";return l.jsxs(y.Fragment,{children:[l.jsxs(p.Box,{onClick:s?()=>e.setSelectedRaceId(a.id.toString()):void 0,onKeyDown:s?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),e.setSelectedRaceId(a.id.toString()))}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:s?"pointer":"not-allowed",opacity:c?.6:1,"&:hover":s?{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}:{},backgroundColor:e.selectedRaceId===a.id.toString()?"rgba(0,0,0,0.04)":"transparent"},children:[l.jsx(p.Radio,{size:"sm",name:"selectedRace",value:a.id.toString(),checked:e.selectedRaceId===a.id.toString(),disabled:!s,onChange:s?f=>e.setSelectedRaceId(f.target.value):void 0,sx:{mr:1}}),l.jsx(p.Tooltip,{title:a.competition.name+((u=a.competition.location)!=null&&u.country?` (${a.competition.location.country})`:""),children:l.jsx(p.Avatar,{src:a.circuit.image||Re.competition,sx:{width:"15px",height:"15px"},slotProps:{img:{loading:"lazy"}}})}),l.jsxs(p.Typography,{level:"body-sm",children:["[",ut(a.date).format("HH:mm DD.MM.YYYY"),"]"]}),l.jsx(p.Typography,{level:"body-sm",fontWeight:600,children:a.competition.name}),l.jsx(p.Typography,{level:"body-sm",children:a.circuit.name}),l.jsx(p.Chip,{variant:s?"solid":"outlined",color:s?"success":"neutral",size:"sm",children:a.status==="Completed"?"Finished":"Upcoming"})]}),l.jsx(p.Divider,{sx:{my:.5}})]},`race-${a.id}`)})});return e.loading?l.jsx(p.Box,{sx:{height:240},children:l.jsx(hi,{my:0})}):l.jsxs(l.Fragment,{children:[e.step==="search"?o():i(),l.jsx(p.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:l.jsx(p.Button,{size:"sm",color:"primary",variant:"outlined",disabled:!e.selectedRaceId,onClick:e.onGenerate,children:e.step==="search"?e.labels.generate:e.labels.regenerate})})]})},Ab=e=>{const t=e==null?void 0:e.toLowerCase();return t&&Ti[t]?Ti[t].key:"en"},Ns=()=>new Date().getFullYear(),KN=()=>{const e=Ns();return[e,e-1,e-2]},qN={Login:pM,InformationInput:on,RichText:bc,HeaderButtons:VP,MarketSelection:_M,Accordion:kT,DynamicFields:aD,BasicSelect:PT,BooleanSwitch:pi,Branding:NP,ProfileSearchSelect:QL,RangeCalendar:iD,CompetitionSearchSelect:KL,Related:RM,Images:HR,Duration:rD,DatePickerComponent:co,Flags:zR,Spinner:hi,Tags:zm,Toast:Ke,AdContent:_T,Match:PM,Winners:FB,CompetitionsSearchSelect:qL,TeamsSearchSelect:Nm,CustomSelect:qM,Schedule:UM,NoPermissionCard:oD,CustomFlatpickrCalendar:tu,ContextSelectFilter:zB,NumberInput:Tu,EntityContext:b$,MiniGamesImages:x$,AuthRequirement:C$,SortableList:dN,ItemsPerPageFilter:fN,ImageCard:mo,RelatedRelationship:TN,ExportUsersLeads:EN,SignOutButton:pg,BasicSortableList:_N,WidgetEmbedCode:PN,WidgetListEmbedCode:RN,AdvancedProfileSearchSelect:MN,FormatNumber:LN,PlayersSearchSelect:FN,GenerateFootballPostMatchModal:GN,GenerateFormula1PostEventModal:e=>{var M,V;const[t,n]=y.useState(Ab(e.defaultLanguage)),[r,i]=y.useState(Ns()),[o,a]=y.useState([]),[s,c]=y.useState(!1),[u,f]=y.useState(""),[d,h]=y.useState("search"),[g,v]=y.useState(!1),[m,b]=y.useState(null),[x,S]=y.useState(!1),[C,I]=y.useState(!1),[w,A]=y.useState(""),[E,k]=y.useState("danger"),B=y.useMemo(()=>!!m,[m]);y.useEffect(()=>{e.isOpen?N(Ns()):(n(Ab(e.defaultLanguage)),i(Ns()),a([]),f(""),h("search"),b(null))},[e.isOpen]);const{https:G}=Ye(),O=()=>{A(""),I(!1)},T=Y=>{let Z="",D="danger";switch(Y){case"on_generate_failed":Z=e.labels.onEntityGenerateErrorMessage;break;case"on_create":Z=e.labels.onEntityCreateMessage,D="success";break;case"on_create_failed":Z=e.labels.onEntityCreateErrorMessage;break;case"fetch_races_failed":Z=e.labels.fetchRacesErrorMessage;break}k(D),A(Z),I(!0)},N=Y=>_(this,null,function*(){c(!0);const Z=yield G.apiSports.getRaces(Y),D=yield Z.json();if(!Z.ok){console.error("Error fetching races:",D),c(!1),a([]),T("fetch_races_failed");return}const W=(D.response||[]).sort((ne,J)=>new Date(J.date).getTime()-new Date(ne.date).getTime()),ie=W.filter(ne=>ne.status==="Completed"),le=W.filter(ne=>ne.status==="Scheduled"),ee=[...le.length>0?[le.sort((ne,J)=>new Date(ne.date).getTime()-new Date(J.date).getTime())[0]]:[],...ie];a(ee),c(!1)}),H=Y=>{i(Y),f(""),N(Y)},j=()=>_(this,null,function*(){v(!0);const Y=yield G.generatePostMatchQuiz({sportType:"formula1",lang:t,eventId:u});if(!(Y!=null&&Y.ok)){const D=yield Y==null?void 0:Y.json();console.error("Failed to generate AI content",D),v(!1),T("on_generate_failed");return}const Z=yield Y==null?void 0:Y.json();b(Z),v(!1),h("preview")}),F=Y=>_(this,null,function*(){S(!0);const Z=m,D=yield G.createClassicQuiz(Z),L=yield D.json();if(!(D!=null&&D.ok)){console.error("Failed to create content",L),S(!1),T("on_create_failed");return}if(S(!1),Y==="goto"){T("on_create"),e.toggleModal(),e.fetchEntityById(L.data.id);return}T("on_create")});return l.jsx(p.Modal,{open:e.isOpen,onClose:()=>{g||x||e.toggleModal()},children:l.jsxs(l.Fragment,{children:[l.jsxs(p.ModalDialog,{sx:{backgroundColor:"white",minWidth:"50%",height:900},children:[l.jsx(p.DialogTitle,{children:e.labels.generateFormulaOnePostEventModalTitle}),l.jsx(p.Divider,{}),l.jsx(p.DialogContent,{sx:{overflowX:"hidden"},children:l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"},gap:2,mb:2},children:[l.jsxs(p.FormControl,{size:"sm",children:[l.jsx(p.FormLabel,{children:e.labels.language}),l.jsx(p.Select,{value:t,onChange:(Y,Z)=>Z&&n(Z),indicator:null,disabled:g,startDecorator:l.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(Gn[t]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(Gn[t]||"gb").toLowerCase()}.png`,alt:((M=Object.values(Ie).find(Y=>Y.key===t))==null?void 0:M.name)||"Language"}),sx:{minHeight:38},children:Object.values(Ie).map(Y=>l.jsxs(p.Option,{value:Y.key,label:Y.name,children:[l.jsx(p.ListItemDecorator,{children:l.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(Gn[Y.key]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(Gn[Y.key]||"gb").toLowerCase()}.png`,alt:Y.name})}),Y.name]},Y.key))}),l.jsx(p.FormHelperText,{children:e.labels.targetLanguageDescription})]}),l.jsxs(p.FormControl,{size:"sm",children:[l.jsx(p.FormLabel,{children:e.labels.season}),l.jsx(p.Select,{value:r,onChange:(Y,Z)=>Z&&H(Z),disabled:g||!!m,sx:{minHeight:38},children:KN().map(Y=>l.jsx(p.Option,{value:Y,children:Y},Y))}),l.jsx(p.FormHelperText,{children:e.labels.seasonDescription})]})]}),l.jsxs(p.Stepper,{sx:{my:2,width:"100%","--StepIndicator-size":"3rem","--Step-connectorInset":"0px",[`& .${Ci.root}`]:{borderWidth:3},[`& .${ur.root}::after`]:{height:3},[`& .${ur.completed}`]:{[`& .${Ci.root}`]:{borderColor:"primary.300",color:"primary.300"},"&::after":{bgcolor:"primary.300"}},[`& .${ur.active}`]:{[`& .${Ci.root}`]:{borderColor:"currentColor"}},[`& .${ur.disabled} *`]:{color:"neutral.outlinedDisabledColor"}},children:[l.jsx(p.Step,{active:d==="search",orientation:"vertical",indicator:l.jsx(p.Tooltip,{title:d==="preview"?(V=e.labels)==null?void 0:V.searchRaceTooltip:"",placement:"right",children:l.jsx(p.StepIndicator,{variant:d==="search"?"solid":"outlined",color:"primary",onClick:()=>{d==="preview"&&(b(null),h("search"))},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&d==="preview"&&(Y.preventDefault(),b(null),h("search"))},sx:$({cursor:d==="preview"?"pointer":"default"},d==="preview"&&{animation:"pulse 2s infinite","@keyframes pulse":{"0%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0.7)"},"70%":{boxShadow:"0 0 0 10px rgba(25, 118, 210, 0)"},"100%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0)"}},"&:hover":{animation:"none",boxShadow:"0 0 0 4px rgba(25, 118, 210, 0.3)"}}),role:"button",tabIndex:d==="preview"?0:-1,children:l.jsx(xb,{})})}),children:l.jsx(p.Typography,{sx:$({textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},d==="preview"&&{cursor:"pointer"}),onClick:()=>{d==="preview"&&(b(null),h("search"))},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&d==="preview"&&(Y.preventDefault(),b(null),h("search"))},role:"button",tabIndex:d==="preview"?0:-1,children:e.labels.searchRace})}),l.jsx(p.Step,{orientation:"vertical",active:d==="preview",disabled:d!=="preview",indicator:l.jsx(p.StepIndicator,{variant:d==="preview"?"solid":"outlined",color:"primary",children:l.jsx(Cb,{})}),children:l.jsx(p.Typography,{sx:{textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},children:e.labels.preview})})]}),l.jsx(p.Sheet,{variant:"outlined",sx:{mt:2,p:1,borderRadius:"sm",bgcolor:"background.surface"},children:l.jsx(YN,{step:d,loading:s||g,races:o,selectedRaceId:u,generatedEntity:m,labels:e.labels,setSelectedRaceId:f,onGenerate:j,setGeneratedEntity:b})})]})}),l.jsxs(p.DialogActions,{children:[l.jsx(p.Button,{variant:"outlined",color:"primary",loading:x,disabled:!B||g,onClick:()=>F("goto"),children:e.labels.createAndGoTo}),l.jsx(p.Button,{variant:"solid",color:"primary",loading:x,disabled:!B||g,onClick:()=>F("continue"),children:e.labels.createAndContinue}),l.jsx(p.Button,{disabled:g||x,variant:"plain",color:"neutral",onClick:Y=>{Y.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]}),l.jsx(Ke,{showToast:C,color:E,message:w,hideToast:O})]})})}},Tb=y.createContext(null),QN=({children:e})=>l.jsx(Tb.Provider,{value:qN,children:e}),JN=()=>{const e=y.useContext(Tb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},Eb=425,kb=1024;return{APIProvider:jS,AuthProvider:US,AuthContext:Yf,ComponentProvider:QN,useComponentContext:JN,useAPIContext:Ye,useIsMobile:()=>{const[e,t]=y.useState(window.innerWidth<=kb),[n,r]=y.useState(window.innerWidth<=Eb);return y.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=kb),r(window.innerWidth<=Eb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}},constants:{supportedLanguages:Ie,languagesMap:Ti}}});
2498
+ ></div>`,G=({title:N})=>l.jsx(p.Tooltip,{title:N,sx:{maxWidth:300},children:l.jsx(ar,{color:"primary"})}),O=()=>l.jsxs(p.Card,{sx:{pb:1,mb:3},children:[l.jsx(on,{label:t.classicQuizURL,placeholder:"",defaultValue:i,required:!1,size:"md",endDecorator:l.jsx(G,{title:t.quizzesInfoMessage}),onChange:N=>o(N.target.value)}),l.jsx(on,{label:t.eitherOrURL,placeholder:"",defaultValue:a,required:!1,size:"md",endDecorator:l.jsx(G,{title:t.eitherOrsInfoMessage}),onChange:N=>s(N.target.value)}),l.jsx(on,{label:t.pollURL,placeholder:"",defaultValue:c,required:!1,size:"md",endDecorator:l.jsx(G,{title:t.pollsInfoMessage}),onChange:N=>u(N.target.value)})]}),T=()=>l.jsxs(p.Card,{sx:{pb:1,mb:3},children:[l.jsx(Tu,{label:t.itemsPerPage,description:t.itemsPerPageDescription,defaultValue:f,onChange:N=>d(N||null),size:"md"}),l.jsx(Tu,{label:t.itemsPerRow,description:t.itemsPerRowDescription,defaultValue:h,onChange:N=>g(N||null),size:"md"}),l.jsxs(p.FormControl,{sx:()=>({marginBottom:"16px"}),children:[l.jsx(p.FormLabel,{color:"primary",children:t.mode}),l.jsx(p.Select,{defaultValue:v,onChange:(N,H)=>m(H),children:DN.map((N,H)=>l.jsx(p.Option,{value:N,children:ON[N]},`basic-select-${N}-${H}`))}),l.jsx(p.FormHelperText,{children:t.modeDescription})]})]});return l.jsxs(p.Box,{mt:1,children:[T(),l.jsx(pi,{defaultValue:n,label:t.configureURLs,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:N=>{N===!1&&(o(""),s(""),u("")),r(N)}}),n&&O(),l.jsxs(p.Box,{position:"relative",mb:1,children:[l.jsx(p.Textarea,{value:$,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:N=>N.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),l.jsx(p.Tooltip,{title:t.copyToClipboard,children:l.jsx(p.Button,{onClick:()=>{navigator.clipboard.writeText($)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:l.jsx(Oe.ContentCopy,{})})})]}),l.jsx(p.Alert,{variant:"outlined",color:"primary",startDecorator:l.jsx(ar,{}),sx:{mb:1,width:"fit-content"},children:l.jsxs(p.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[t.divElementTextInfo,l.jsx(p.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},bb=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],MN=({labels:e,ids:t,onChange:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState([]),[s,c]=y.useState(""),[u,f]=y.useState("name"),[d,h]=y.useState(!1),[g,v]=y.useState(!1),{sdk:m}=Ye(),b=!0,x=()=>v(!g),S=(A,E)=>{i(E);const k=E.map($=>$.id);n(k&&k.length?k:null)},C=3;y.useEffect(()=>{!s&&t&&t.length&&m.profile.getByIds(t,void 0,b).then(A=>{i(bb(A))}).catch(A=>{x(),console.error(A),i([])})},[]);const I=y.useMemo(()=>sr((A,E)=>{h(!0),m.profile.getByIds(E==="id"?[A]:[],E==="name"?A:void 0,b).then(k=>{a([...bb(k)]),h(!1)}).catch(k=>{console.error(k),x(),a([]),h(!1)})},300),[]);y.useEffect(()=>{if(!s||s.length<C){a([]);return}return I(s,u),()=>I.cancel()},[s,I,u]);const w=(A,E)=>A.map((k,$)=>{var G;return l.jsx(p.Chip,{variant:"solid",endDecorator:l.jsx(p.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:O=>E({index:$}).onClick(O),children:l.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(G=k.avatar)!=null?G:Re.avatar}),l.jsx(p.Typography,{children:k.label})]})},k.id)});return l.jsxs(l.Fragment,{children:[l.jsx(p.Box,{sx:{marginBottom:"16px"},children:l.jsx(p.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:d,disableClearable:!0,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(A,E)=>A.id===E.id,endDecorator:l.jsxs(l.Fragment,{children:[d&&l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary",marginRight:2}}),l.jsx(p.Divider,{orientation:"vertical"}),l.jsxs(p.Select,{variant:"plain",value:u,onChange:(A,E)=>f(E),slotProps:{listbox:{variant:"outlined"}},sx:{mr:-1.5,"&:hover":{bgcolor:"transparent"}},children:[l.jsx(p.Option,{value:"name",children:e.searchByName}),l.jsx(p.Option,{value:"id",children:e.searchById})]})]}),placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:A=>A.filter(E=>!r.some(k=>k.value===E.value)),onInputChange:(A,E)=>{c(E)},onChange:S,getOptionKey:A=>A.id,value:r,renderTags:w,renderOption:(A,E)=>{var k;return l.jsx(p.AutocompleteOption,q(B({},A),{children:l.jsxs(p.Box,{display:"flex",alignItems:"center",mr:1,children:[l.jsx(p.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(k=E.avatar)!=null?k:Re.avatar}),l.jsx(p.Typography,{children:E.label})]})}))}})}),l.jsx(Ke,{showToast:g,message:e.searchProfilesErrorMessage,color:"danger",hideToast:x})]})},LN=({value:e,sx:t,tooltipPlacement:n})=>{const r=c=>{const u=Math.abs(c);return u>=1e9?(c/1e9).toFixed(1)+"b":u>=1e6?(c/1e6).toFixed(1)+"m":u>=1e3?(c/1e3).toFixed(1)+"k":c.toString()},i=c=>new Intl.NumberFormat("en-US").format(c),o=Math.abs(e)>=1e3,a=r(e),s=i(e);return o?l.jsx(p.Tooltip,{title:s,placement:n,arrow:!0,children:l.jsx(p.Typography,{sx:t,children:a})}):l.jsx(p.Typography,{sx:t,children:a})},BN=(e,t,n,r)=>{if(e&&e.length===0){n([]);return}t.football.getPlayers({playerIds:e}).then(i=>{const o=i.data.map(a=>yb(a));n(o)}).catch(i=>{console.error("Error fetching players by ID:",i),r()})},yb=e=>{var t,n,r,i,o;return{id:e.id,name:e.name,avatar:((t=e.assets)==null?void 0:t.headshot)||Re.avatar,countryName:((n=e.country)==null?void 0:n.name)||"Unknown",countryFlag:((i=(r=e.country)==null?void 0:r.assets)==null?void 0:i.flag)||Re.flag,teams:((o=e.teams)==null?void 0:o.map(a=>{var s;return{id:a.id,name:a.name,logo:((s=a.assets)==null?void 0:s.logo)||Re.team}}))||[]}},$N=({player:e,onRemove:t})=>l.jsx(p.Tooltip,{title:l.jsxs(p.Box,{sx:{p:1},children:[l.jsx(p.Typography,{level:"body-sm",fontWeight:"bold",children:e.name}),l.jsxs(p.Typography,{level:"body-xs",sx:{display:"flex",alignItems:"center",gap:.5,mt:.5},children:[l.jsx("img",{src:e.countryFlag,alt:e.countryName,width:16,height:12,loading:"lazy"}),e.countryName]}),e.teams&&e.teams.length>0&&l.jsxs(p.Box,{sx:{mt:.5},children:[l.jsx(p.Typography,{level:"body-xs",sx:{mb:.5},children:"Teams:"}),l.jsx(p.Box,{sx:{display:"flex",flexDirection:"column",gap:.25},children:e.teams.map((n,r)=>l.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l.jsx("img",{src:n.logo,alt:n.name,width:16,height:16,style:{borderRadius:"2px"},loading:"lazy"}),l.jsx(p.Typography,{level:"body-xs",children:n.name})]},r))})]})]}),placement:"left",variant:"solid",sx:{"--Tooltip-radius":"8px",maxWidth:300,bgcolor:"background.level1"},children:l.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:.5,backgroundColor:"#e0f3ff",borderRadius:"50px",padding:"2px 8px 2px 2px",margin:"2px",position:"relative","&:hover":{backgroundColor:"#d0e8ff",cursor:"default"}},children:[l.jsx(p.Avatar,{src:e.avatar,alt:e.name,size:"sm",sx:{width:24,height:24,border:"1px solid #fff"}}),l.jsx(p.Typography,{level:"body-sm",sx:{fontSize:"12px",maxWidth:80,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),l.jsx(p.IconButton,{size:"sm",variant:"plain",color:"danger",onClick:t,sx:{minHeight:16,minWidth:16,padding:0,ml:.5,"&:hover":{backgroundColor:"rgba(255, 0, 0, 0.1)"}},children:l.jsx(Oe.Close,{sx:{fontSize:12}})})]})}),FN=({labels:e,teamIds:t,selectedPlayers:n,onChangePlayers:r})=>{const[i,o]=y.useState([]),[a,s]=y.useState([]),[c,u]=y.useState([]),[f,d]=y.useState(!1),[h,g]=y.useState(""),[v,m]=y.useState(!1),{sdk:b}=Ye(),x=()=>m(!v),S=t&&t.length>0,C=(k,$)=>{o($),r($)},I=()=>_(this,null,function*(){if(S){d(!0);try{const k=t.map(O=>b.football.getTeamById(O)),$=yield Promise.all(k),G=[];$.forEach(O=>{if(O.squad&&O.squad.length>0){const T=O.squad.map(N=>{var H,j,F,M,V;return{id:N.id,name:N.name,avatar:((H=N.assets)==null?void 0:H.headshot)||Re.avatar,countryName:((j=N.country)==null?void 0:j.name)||"Unknown",countryFlag:((M=(F=N.country)==null?void 0:F.assets)==null?void 0:M.flag)||Re.flag,teams:[{id:O.id,name:O.name,logo:((V=O.assets)==null?void 0:V.logo)||Re.team}]}}).sort((N,H)=>N.name.localeCompare(H.name));G.push(...T)}}),u(G),s(G)}catch(k){console.error("Error fetching team players:",k),x()}finally{d(!1)}}}),w=k=>{if(!k){s(c);return}const $=c.filter(G=>G.name.toLowerCase().includes(k.toLowerCase()));s($)};y.useEffect(()=>{BN(n,b,o,x)},[n]),y.useEffect(()=>{S&&I()},[t]);const A=y.useMemo(()=>sr(k=>{if(!S){if(!k||k.length<2){s([]),d(!1);return}d(!0),b.football.getPlayers({name:k,sortField:"name",sortOrder:"asc"}).then($=>{const G=$.data.map(O=>yb(O));s(G),d(!1)}).catch($=>{console.error("Error searching players:",$),s([]),d(!1),x()})}},300),[b,S]);y.useEffect(()=>(S?w(h):A(h),()=>{S||A.cancel()}),[h,S]);const E=(k,$)=>k.map((G,O)=>l.jsx($N,{player:G,onRemove:()=>{const T=$({index:O});T.onClick&&T.onClick({})}},G.id));return l.jsxs(l.Fragment,{children:[l.jsx(p.Autocomplete,{forcePopupIcon:S,multiple:!0,loading:f,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38,flexWrap:"wrap"}},noOptions:{sx:{}}},isOptionEqualToValue:(k,$)=>k.id===$.id,endDecorator:f?l.jsx(p.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e==null?void 0:e.searchPlayersPlaceholder,options:a,filterSelectedOptions:!0,onInputChange:(k,$)=>{g($)},onChange:C,getOptionKey:k=>typeof k=="string"?k:k.id,getOptionLabel:k=>typeof k=="string"?k:k.name,value:i,renderTags:E,limitTags:1,renderOption:(k,$)=>{const G={props:k};return l.jsxs(p.AutocompleteOption,q(B({},k),{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(p.Avatar,{src:$.avatar,alt:$.name,size:"sm",sx:{width:32,height:32}}),l.jsxs(p.Box,{sx:{flexGrow:1},children:[l.jsx(p.Typography,{level:"body-sm",fontWeight:"bold",children:$.name}),l.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l.jsx("img",{src:$.countryFlag,alt:$.countryName,width:16,height:12,loading:"lazy"}),l.jsx(p.Typography,{level:"body-xs",color:"neutral",children:$.countryName})]})]})]}),`player-option-${$.id}-${G}`)}}),l.jsx(Ke,{showToast:v,message:e.getPlayersErrorMessage,color:"danger",hideToast:x})]})},NN=(e,t={})=>{const{enabled:n=!0}=t,{sdk:r}=Ye(),[i,o]=y.useState(null),[a,s]=y.useState(!1),[c,u]=y.useState(null),[f,d]=y.useState(null),h=y.useMemo(()=>B({},e),[JSON.stringify(e)]),g=y.useCallback(()=>_(this,null,function*(){var v,m;s(!0),u(null);try{const b=yield r.football.getMatches(h);o(b.data),d((m=(v=b.meta)==null?void 0:v.pagination)!=null?m:null)}catch(b){u(b),o([]),d(null)}finally{s(!1)}}),[r,h]);return y.useEffect(()=>{n&&g()},[g,n]),{matches:i,loading:a,error:c,meta:f,refetch:g}},xb=Be(l.jsx("path",{d:"M4.25 5.61C6.57 8.59 10 13 10 13v5c0 1.1.9 2 2 2s2-.9 2-2v-5s3.43-4.41 5.75-7.39c.51-.66.04-1.61-.8-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAltRounded"),Cb=Be(l.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.89-2-2-2m0 16H5V7h14zm-5.5-6c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5M12 9c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"PreviewRounded"),ur=We("MuiStep",["root","indicator","horizontal","vertical","active","completed","disabled"]),Ci=We("MuiStepIndicator",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]),zN=Be(l.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z"}),"KeyboardArrowLeft"),jN=Be(l.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight"),wb=Be(l.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");class UN{constructor(){X(this,"id","");X(this,"title","");X(this,"alternative_title",null);X(this,"description",null);X(this,"type",null);X(this,"auth_requirement",null);X(this,"rules",null);X(this,"ad_content",null);X(this,"labels",null);X(this,"branding",null);X(this,"embed_code",null);X(this,"custom_fields",null);X(this,"images",null);X(this,"status","");X(this,"flags",[]);X(this,"context",null);X(this,"options",[]);X(this,"related",[]);X(this,"multiple_choice",!1);X(this,"max_multiple_choice_options",null);X(this,"participation_count",0);X(this,"preferences_enabled",!1);X(this,"max_attempts",1);X(this,"external_activity",null)}}const VN=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(""),o=e.generatedEntity,a=d=>{const h=new UN;return h.title=d.question||"",h.status="INACTIVE",h.options=(d.options||[]).map(g=>({title:g,description:"",images:{main:"",mobile:"",cover:""},embed_code:null,preference_mappings:[]})),h},s=d=>{i(d.id);const h=a(d);e.setPollRequestBody(h)},c=()=>{if(!o)return l.jsx(p.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.noPreviewAvailable})});const d=()=>l.jsxs(p.Table,{variant:"outlined",size:"sm",sx:{width:"100%",maxWidth:"100%","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[l.jsx("thead",{children:l.jsx("tr",{children:l.jsx("th",{children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.questions})})})}),l.jsx("tbody",{children:o.questions.map((g,v)=>{var m;return l.jsx("tr",{children:l.jsx("td",{children:l.jsxs(p.Typography,{level:"body-sm",children:[g.question," ",l.jsx(p.Typography,{children:(m=g.options)==null?void 0:m.map((b,x)=>l.jsx(p.Chip,{color:b.correct?"success":"neutral",variant:b.correct?"solid":"outlined",sx:{mr:1},size:"sm",children:b.option},`question-option-${x}`))})]})})},`question-${v}`)})})]}),h=()=>{const g=o.questions||[],v=m=>!m&&m!==0?"neutral":m>=5?"success":m>=4?"primary":m>=3?"warning":"neutral";return l.jsx(p.Box,{component:"ul",sx:{listStyle:"none",m:0,p:0,ml:0,pl:0,marginBlockStart:0,marginBlockEnd:0,marginInlineStart:0,marginInlineEnd:0,paddingInlineStart:0,display:"flex",flexDirection:"column",gap:1},children:g.map((m,b)=>{const x=r===m.id;return l.jsx(p.Box,{component:"li",children:l.jsx(p.Sheet,{variant:"outlined",sx:{p:1,borderRadius:"sm",cursor:"pointer",bgcolor:x?"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))":"background.body",borderColor:x?"primary.solidBg":void 0,"&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"},"&:hover .pollOptionChipNeutral":{backgroundColor:"background.level1",borderColor:"neutral.outlinedBorder"}},onClick:()=>s(m),role:"button",tabIndex:0,onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),s(m))},children:l.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[l.jsx(p.Radio,{name:"selectedPollSuggestion",value:m.id,checked:x,onChange:()=>s(m),size:"sm"}),l.jsxs(p.Box,{sx:{flex:1,minWidth:0},children:[l.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5,mb:.5},children:[l.jsx(p.Typography,{level:"body-sm",fontWeight:600,p:0,children:m.question}),l.jsx(p.Box,{sx:{flex:1}}),m.engagement_score?l.jsx(p.Tooltip,{title:e.labels.engagementScore,children:l.jsx(p.Chip,{size:"sm",variant:"solid",color:v(m.engagement_score),children:m.engagement_score})}):l.jsx(l.Fragment,{})]}),l.jsx(p.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(m.options||[]).map((S,C)=>l.jsx(p.Chip,{className:x?void 0:"pollOptionChipNeutral",variant:x?"soft":"outlined",color:x?"primary":"neutral",size:"sm",sx:{mr:.5,mb:.5},children:S},`poll-suggestion-opt-${C}`))})]})]})})},`poll-suggestion-${m.id||b}`)})})};return e.entityType==="poll"?l.jsx(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",p:1,maxHeight:"400px",my:.5},children:h()}):l.jsxs(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:[l.jsxs(p.Box,{role:"button",tabIndex:0,onClick:()=>n(!t),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),n(v=>!v))},sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}},children:[l.jsx(p.Typography,{level:"body-sm",sx:{flexGrow:1},children:o.title}),l.jsx(p.Tooltip,{title:t?"":e.labels.expand,children:l.jsx(p.IconButton,{"aria-label":"expand row",variant:"plain",color:"neutral",size:"sm",sx:{"&:hover":{backgroundColor:"background.surface"}},children:t?l.jsx(wb,{}):l.jsx(bs,{})})})]}),l.jsx(p.Box,{sx:{display:t?"block":"none",p:1},children:t?d():null})]})},u=()=>!e.matches||e.matches.length===0?l.jsx(p.Box,{sx:{height:250,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.noMatchesFound})}):l.jsx(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"250px",my:.5},children:e.matches.map(d=>{var h,g,v,m,b,x,S,C,I,w,A,E,k,$,G,O,T,N,H,j,F,M,V,Y;return l.jsxs(y.Fragment,{children:[l.jsxs(p.Box,{onClick:()=>e.setSelectedMatchId(d.id),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),e.setSelectedMatchId(d.id))},role:"button",tabIndex:0,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"},backgroundColor:e.selectedMatchId===d.id?"rgba(0,0,0,0.04)":"transparent"},children:[l.jsx(p.Radio,{size:"sm",name:"selectedMatch",value:d.id,checked:e.selectedMatchId===d.id,onChange:Z=>e.setSelectedMatchId(Z.target.value),sx:{mr:1}}),l.jsx(p.Tooltip,{title:(((g=(h=d.context)==null?void 0:h.competition)==null?void 0:g.name)||"Competition with no name")+((b=(m=(v=d.context)==null?void 0:v.competition)==null?void 0:m.country)!=null&&b.name?` (${d.context.competition.country.name})`:""),children:l.jsx(p.Avatar,{src:((C=(S=(x=d.context)==null?void 0:x.competition)==null?void 0:S.assets)==null?void 0:C.logo)||Re.competition,sx:{width:"15px",height:"15px"},slotProps:{img:{loading:"lazy"}}})}),l.jsxs(p.Typography,{level:"body-sm",children:["[",ut(d.kickoffAt).format("HH:mm DD.MM.YYYY"),"]"]}),(I=d.homeTeam)!=null&&I.code?l.jsx(p.Tooltip,{title:d.homeTeam.name,children:l.jsxs(p.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[l.jsx(p.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.homeTeam.id)?700:400,children:d.homeTeam.code||d.homeTeam.name}),l.jsx(p.Avatar,{src:((w=d.homeTeam.assets)==null?void 0:w.logo)||Re.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})]})}):l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.homeTeam.id)?700:400,children:d.homeTeam.code||d.homeTeam.name}),l.jsx(p.Avatar,{src:((A=d.homeTeam.assets)==null?void 0:A.logo)||Re.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})]}),((k=(E=d==null?void 0:d.scores)==null?void 0:E.ftScore)==null?void 0:k.homeGoals)!==null&&((G=($=d==null?void 0:d.scores)==null?void 0:$.ftScore)==null?void 0:G.awayGoals)!==null?l.jsx(p.Chip,{variant:"outlined",children:((N=(T=(O=d.scores)==null?void 0:O.ftScore)==null?void 0:T.homeGoals)!=null?N:"")+":"+((F=(j=(H=d.scores)==null?void 0:H.ftScore)==null?void 0:j.awayGoals)!=null?F:"")}):" : ",(M=d.awayTeam)!=null&&M.code?l.jsx(p.Tooltip,{title:d.awayTeam.name,children:l.jsxs(p.Box,{display:"flex",gap:.5,alignItems:"center",children:[l.jsx(p.Avatar,{src:((V=d.awayTeam.assets)==null?void 0:V.logo)||Re.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})," ",l.jsx(p.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.awayTeam.id)?700:400,children:d.awayTeam.code||d.awayTeam.name})]})}):l.jsxs(l.Fragment,{children:[l.jsx(p.Avatar,{src:((Y=d.awayTeam.assets)==null?void 0:Y.logo)||Re.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}}),l.jsx(p.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.awayTeam.id)?700:400,children:d.awayTeam.code||d.awayTeam.name})]})]}),l.jsx(p.Divider,{sx:{my:.5}})]},`search-matches-custom-${d.id}`)})}),f=()=>l.jsxs(l.Fragment,{children:[l.jsx(p.Typography,{level:"body-xs",children:e.pagination?`${e.labels.page} ${e.pagination.currentPage} ${e.labels.of} ${e.pagination.numberOfPages} • ${e.pagination.totalItems} ${e.labels.total}`:""}),l.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[l.jsx(p.IconButton,{size:"sm",color:"neutral",variant:"outlined",disabled:!e.pagination||e.pagination&&e.pagination.currentPage<=1,onClick:()=>e.setPage(d=>Math.max(1,d-1)),sx:{bgcolor:"background.surface"},children:l.jsx(zN,{})}),l.jsx(p.IconButton,{size:"sm",color:"neutral",variant:"outlined",disabled:!e.pagination||e.pagination&&e.pagination.currentPage>=e.pagination.numberOfPages,onClick:()=>e.setPage(d=>e.pagination?Math.min(e.pagination.numberOfPages,d+1):d+1),sx:{bgcolor:"background.surface"},children:l.jsx(jN,{})})]})]});return e.loading?l.jsx(p.Box,{sx:{height:240},children:l.jsx(hi,{my:0})}):l.jsxs(l.Fragment,{children:[e.step==="search"?u():c(),l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[l.jsx(p.Button,{size:"sm",color:"primary",variant:"outlined",disabled:!e.selectedMatchId,onClick:e.onGenerate,children:e.step==="search"?e.labels.generate:e.labels.regenerate}),e.step==="search"?f():l.jsx(l.Fragment,{})]})]})},HN=e=>{const t=ut(Date.now()).format("YYYY-MM-DD");if(e.step==="preview")return l.jsx(l.Fragment,{});const n=()=>e.entityType==="poll"?l.jsx(p.Checkbox,{disabled:!e.matchFilters.teamIds||e.matchFilters.teamIds.length===0,checked:e.useFramingGuidelines,size:"sm",onChange:r=>{e.setUseFramingGuidelines(r.target.checked)},label:e.labels.useFramingGuidelinesLabel}):l.jsx(l.Fragment,{});return l.jsxs(l.Fragment,{children:[l.jsx(Nm,{labels:{teamsSelectionPlaceholder:e.labels.teamsSelectionPlaceholder||"",searchTeamsErrorMessage:e.labels.searchTeamsErrorMessage},ids:e.matchFilters.teamIds||[],onChange:e.onChangeTeams,scope:e.competitionsScope,readOnly:e.isGenerating,AdditionalCheckbox:n()}),l.jsxs(p.Grid,{container:!0,spacing:2,minWidth:"100%",columns:{xs:0,sm:0,md:12},mb:2,children:[l.jsx(p.Grid,{xs:6,children:l.jsxs(p.FormControl,{size:"sm",children:[l.jsx(p.FormLabel,{children:e.labels.fromDate}),l.jsx(p.Input,{name:"fromDate",type:"date",defaultValue:e.matchFilters.fromDate,onChange:e.onChangeDates,sx:{backgroundColor:"#fff",borderRadius:"md",minHeight:"36px"},slotProps:{input:{max:t}},readOnly:e.isGenerating})]})}),l.jsx(p.Grid,{xs:6,children:l.jsxs(p.FormControl,{size:"sm",children:[l.jsx(p.FormLabel,{children:e.labels.toDate}),l.jsx(p.Input,{name:"toDate",type:"date",defaultValue:e.matchFilters.toDate,onChange:e.onChangeDates,sx:{backgroundColor:"#fff",borderRadius:"md",minHeight:"36px"},slotProps:{input:{max:t}},readOnly:e.isGenerating})]})})]})]})},WN=ut(Date.now()).format("YYYY-MM-DD"),Sb=e=>{const t=e==null?void 0:e.toLowerCase();return t&&Ti[t]?Ti[t].key:"en"},Ib=e=>({fromDate:"",toDate:WN,competitionIds:e&&e.length?e:void 0,teamIds:void 0,sortOrder:"desc",status:"finished"}),GN=e=>{var ee;const[t,n]=y.useState(Sb(e.defaultLanguage)),[r,i]=y.useState(Ib(e.competitionsScope)),[o,a]=y.useState(1),[s,c]=y.useState(""),[u,f]=y.useState(!1),[d,h]=y.useState("search"),[g,v]=y.useState(!1),[m,b]=y.useState(null),[x,S]=y.useState(null),[C,I]=y.useState(!1),[w,A]=y.useState(!1),[E,k]=y.useState(""),[$,G]=y.useState(!1),[O,T]=y.useState(""),[N,H]=y.useState("danger"),j=10,F=y.useMemo(()=>{const ze=r,{fromDate:ne,toDate:J}=ze,ce=Qe(ze,["fromDate","toDate"]),ve=B({},ce);if(ne&&(ve.fromDate=`${ne}T00:00:00Z`),J){const yt=ut().add(1,"minute").format("THH:mm:ss")+"Z";ve.toDate=J+yt}return q(B({},ve),{page:o,limit:j})},[r,o]),M=y.useMemo(()=>!(!m||e.entityType==="poll"&&!x),[m,e.entityType,x]);y.useEffect(()=>()=>{n(Sb),i(Ib(e.competitionsScope)),a(1),c(""),f(!1),h("search"),b(null)},[]);const{https:V}=Ye(),{matches:Y,loading:Z,meta:D}=NN(F,{enabled:u}),L=()=>{T(""),G(!1)},U=ne=>{let J="",ce="danger";switch(ne){case"on_generate_failed":J=e.labels.onEntityGenerateErrorMessage;break;case"on_create":J=e.labels.onEntityCreateMessage,ce="success";break;case"on_create_failed":J=e.labels.onEntityCreateErrorMessage;break}H(ce),T(J),G(!0)},W=ne=>{var ce;const J=ne.map(ve=>ve.id);i(ve=>q(B({},ve),{teamIds:J||void 0})),a(1),f(!0),e.entityType==="poll"&&(ne.length===0?(k(""),A(!1)):k(((ce=ne[ne.length-1])==null?void 0:ce.label)||""))},ie=ne=>{const{name:J,value:ce}=ne.target;i(ve=>q(B({},ve),{[J]:ce})),f(!0)},le=()=>_(this,null,function*(){v(!0),e.entityType==="poll"&&S(null);let ne=null;switch(e.entityType){case"classic_quiz":ne=yield V.generatePostMatchQuiz({sportType:"football",lang:t,eventId:s});break;case"poll":const ce=w?E:"";ne=yield V.generatePostMatchPoll({targetParticipant:ce,lang:t,eventId:s});break}if(!(ne!=null&&ne.ok)){const ce=yield ne==null?void 0:ne.json();console.error("Failed to generate AI content",ce),v(!1),U("on_generate_failed");return}const J=yield ne==null?void 0:ne.json();if(e.entityType==="poll"){const ce=J;ce.questions.sort((ve,ze)=>ze.engagement_score-ve.engagement_score),b(ce)}else b(J);v(!1),h("preview")}),ae=ne=>_(this,null,function*(){I(!0);let J=null;switch(e.entityType){case"classic_quiz":const ve=m;J=yield V.createClassicQuiz(ve);break;case"poll":J=yield V.createPoll(x);break}const ce=yield J==null?void 0:J.json();if(!(J!=null&&J.ok)){console.error("Failed to create content",ce),I(!1),U("on_create_failed");return}if(I(!1),ne==="goto"){U("on_create"),e.toggleModal(),e.fetchEntityById(ce.data.id);return}U("on_create")});return l.jsx(p.Modal,{open:e.isOpen,onClose:()=>{g||C||e.toggleModal()},children:l.jsxs(l.Fragment,{children:[l.jsxs(p.ModalDialog,{sx:{backgroundColor:"white",minWidth:"50%",height:900},children:[l.jsx(p.DialogTitle,{children:e.labels.generateFootballPostMatchModalTitle}),l.jsx(p.Divider,{}),l.jsx(p.DialogContent,{sx:{overflowX:"hidden"},children:l.jsxs(l.Fragment,{children:[l.jsxs(p.FormControl,{size:"sm",sx:{mb:2},children:[l.jsx(p.FormLabel,{children:e.labels.language}),l.jsx(p.Select,{value:t,onChange:(ne,J)=>J&&n(J),indicator:null,disabled:g,startDecorator:l.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(Gn[t]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(Gn[t]||"gb").toLowerCase()}.png`,alt:((ee=Object.values(Ie).find(ne=>ne.key===t))==null?void 0:ee.name)||"Language"}),sx:{minWidth:220,minHeight:38},children:Object.values(Ie).map(ne=>l.jsxs(p.Option,{value:ne.key,label:ne.name,children:[l.jsx(p.ListItemDecorator,{children:l.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(Gn[ne.key]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(Gn[ne.key]||"gb").toLowerCase()}.png`,alt:ne.name})}),ne.name]},ne.key))}),l.jsx(p.FormHelperText,{children:e.labels.targetLanguageDescription})]}),l.jsxs(p.Stepper,{sx:{my:2,width:"100%","--StepIndicator-size":"3rem","--Step-connectorInset":"0px",[`& .${Ci.root}`]:{borderWidth:3},[`& .${ur.root}::after`]:{height:3},[`& .${ur.completed}`]:{[`& .${Ci.root}`]:{borderColor:"primary.300",color:"primary.300"},"&::after":{bgcolor:"primary.300"}},[`& .${ur.active}`]:{[`& .${Ci.root}`]:{borderColor:"currentColor"}},[`& .${ur.disabled} *`]:{color:"neutral.outlinedDisabledColor"}},children:[l.jsx(p.Step,{active:d==="search",orientation:"vertical",indicator:l.jsx(p.Tooltip,{title:d==="preview"?e.labels.searchMatchTooltip:"",placement:"right",children:l.jsx(p.StepIndicator,{variant:d==="search"?"solid":"outlined",color:"primary",onClick:()=>{d==="preview"&&(b(null),h("search"))},onKeyDown:ne=>{(ne.key==="Enter"||ne.key===" ")&&d==="preview"&&(ne.preventDefault(),b(null),h("search"))},sx:B({cursor:d==="preview"?"pointer":"default"},d==="preview"&&{animation:"pulse 2s infinite","@keyframes pulse":{"0%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0.7)"},"70%":{boxShadow:"0 0 0 10px rgba(25, 118, 210, 0)"},"100%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0)"}},"&:hover":{animation:"none",boxShadow:"0 0 0 4px rgba(25, 118, 210, 0.3)"}}),role:"button",tabIndex:d==="preview"?0:-1,children:l.jsx(xb,{})})}),children:l.jsx(p.Typography,{sx:B({textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},d==="preview"&&{cursor:"pointer"}),onClick:()=>{d==="preview"&&(b(null),h("search"))},onKeyDown:ne=>{(ne.key==="Enter"||ne.key===" ")&&d==="preview"&&(ne.preventDefault(),b(null),h("search"))},role:"button",tabIndex:d==="preview"?0:-1,children:e.labels.searchMatch})}),l.jsx(p.Step,{orientation:"vertical",active:d==="preview",disabled:d!=="preview",indicator:l.jsx(p.StepIndicator,{variant:d==="preview"?"solid":"outlined",color:"primary",children:l.jsx(Cb,{})}),children:l.jsx(p.Typography,{sx:{textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},children:e.labels.preview})})]}),l.jsx(HN,{entityType:e.entityType,step:d,labels:e.labels,useFramingGuidelines:w,matchFilters:r,competitionsScope:e.competitionsScope,generatedEntity:m,isGenerating:g,setUseFramingGuidelines:A,onChangeTeams:W,onChangeDates:ie}),u?l.jsx(p.Sheet,{variant:"outlined",sx:{p:1,borderRadius:"sm",bgcolor:"background.surface"},children:l.jsx(VN,{step:d,loading:Z||g,matches:Y,selectedMatchId:s,generatedEntity:m,labels:e.labels,pagination:D,teamIdsFilter:r.teamIds,setPollRequestBody:S,setPage:a,setSelectedMatchId:c,onGenerate:le,entityType:e.entityType,setGeneratedEntity:b})}):l.jsx(l.Fragment,{})]})}),l.jsxs(p.DialogActions,{children:[l.jsx(p.Button,{variant:"outlined",color:"primary",loading:C,disabled:!M||g,onClick:()=>ae("goto"),children:e.labels.createAndGoTo}),l.jsx(p.Button,{variant:"solid",color:"primary",loading:C,disabled:!M||g,onClick:()=>ae("continue"),children:e.labels.createAndContinue}),l.jsx(p.Button,{disabled:g||C,variant:"plain",color:"neutral",onClick:ne=>{ne.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]}),l.jsx(Ke,{showToast:$,color:N,message:O,hideToast:L})]})})},YN=e=>{const[t,n]=y.useState(!1),r=e.generatedEntity,i=()=>{if(!r)return l.jsx(p.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.noPreviewAvailable})});const a=()=>l.jsxs(p.Table,{variant:"outlined",size:"sm",sx:{width:"100%",maxWidth:"100%","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[l.jsx("thead",{children:l.jsx("tr",{children:l.jsx("th",{children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.questions})})})}),l.jsx("tbody",{children:r.questions.map((s,c)=>{var u;return l.jsx("tr",{children:l.jsx("td",{children:l.jsxs(p.Typography,{level:"body-sm",children:[s.question," ",l.jsx(p.Typography,{children:(u=s.options)==null?void 0:u.map((f,d)=>l.jsx(p.Chip,{color:f.correct?"success":"neutral",variant:f.correct?"solid":"outlined",sx:{mr:1},size:"sm",children:f.option},`question-option-${d}`))})]})})},`question-${c}`)})})]});return l.jsxs(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:[l.jsxs(p.Box,{role:"button",tabIndex:0,onClick:()=>n(!t),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(c=>!c))},sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}},children:[l.jsx(p.Typography,{level:"body-sm",sx:{flexGrow:1},children:r.title}),l.jsx(p.Tooltip,{title:t?"":e.labels.expand,children:l.jsx(p.IconButton,{"aria-label":"expand row",variant:"plain",color:"neutral",size:"sm",sx:{"&:hover":{backgroundColor:"background.surface"}},children:t?l.jsx(wb,{}):l.jsx(bs,{})})})]}),l.jsx(p.Box,{sx:{display:t?"block":"none",p:1},children:t?a():null})]})},o=()=>!e.races||e.races.length===0?l.jsx(p.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(p.Typography,{level:"body-sm",children:e.labels.noRacesFound})}):l.jsx(p.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:e.races.map(a=>{var u;const s=a.status==="Completed",c=a.status==="Scheduled";return l.jsxs(y.Fragment,{children:[l.jsxs(p.Box,{onClick:s?()=>e.setSelectedRaceId(a.id.toString()):void 0,onKeyDown:s?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),e.setSelectedRaceId(a.id.toString()))}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:s?"pointer":"not-allowed",opacity:c?.6:1,"&:hover":s?{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}:{},backgroundColor:e.selectedRaceId===a.id.toString()?"rgba(0,0,0,0.04)":"transparent"},children:[l.jsx(p.Radio,{size:"sm",name:"selectedRace",value:a.id.toString(),checked:e.selectedRaceId===a.id.toString(),disabled:!s,onChange:s?f=>e.setSelectedRaceId(f.target.value):void 0,sx:{mr:1}}),l.jsx(p.Tooltip,{title:a.competition.name+((u=a.competition.location)!=null&&u.country?` (${a.competition.location.country})`:""),children:l.jsx(p.Avatar,{src:a.circuit.image||Re.competition,sx:{width:"15px",height:"15px"},slotProps:{img:{loading:"lazy"}}})}),l.jsxs(p.Typography,{level:"body-sm",children:["[",ut(a.date).format("HH:mm DD.MM.YYYY"),"]"]}),l.jsx(p.Typography,{level:"body-sm",fontWeight:600,children:a.competition.name}),l.jsx(p.Typography,{level:"body-sm",children:a.circuit.name}),l.jsx(p.Chip,{variant:s?"solid":"outlined",color:s?"success":"neutral",size:"sm",children:a.status==="Completed"?"Finished":"Upcoming"})]}),l.jsx(p.Divider,{sx:{my:.5}})]},`race-${a.id}`)})});return e.loading?l.jsx(p.Box,{sx:{height:240},children:l.jsx(hi,{my:0})}):l.jsxs(l.Fragment,{children:[e.step==="search"?o():i(),l.jsx(p.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:l.jsx(p.Button,{size:"sm",color:"primary",variant:"outlined",disabled:!e.selectedRaceId,onClick:e.onGenerate,children:e.step==="search"?e.labels.generate:e.labels.regenerate})})]})},Ab=e=>{const t=e==null?void 0:e.toLowerCase();return t&&Ti[t]?Ti[t].key:"en"},Ns=()=>new Date().getFullYear(),KN=()=>{const e=Ns();return[e,e-1,e-2]},QN={Login:pM,InformationInput:on,RichText:bc,HeaderButtons:VP,MarketSelection:_M,Accordion:kT,DynamicFields:aD,BasicSelect:PT,BooleanSwitch:pi,Branding:NP,ProfileSearchSelect:qL,RangeCalendar:iD,CompetitionSearchSelect:KL,Related:RM,Images:HR,Duration:rD,DatePickerComponent:co,Flags:zR,Spinner:hi,Tags:zm,Toast:Ke,AdContent:_T,Match:PM,Winners:FB,CompetitionsSearchSelect:QL,TeamsSearchSelect:Nm,CustomSelect:QM,Schedule:UM,NoPermissionCard:oD,CustomFlatpickrCalendar:tu,ContextSelectFilter:zB,NumberInput:Tu,EntityContext:b$,MiniGamesImages:x$,AuthRequirement:C$,SortableList:dN,ItemsPerPageFilter:fN,ImageCard:mo,RelatedRelationship:TN,ExportUsersLeads:EN,SignOutButton:pg,BasicSortableList:_N,WidgetEmbedCode:PN,WidgetListEmbedCode:RN,AdvancedProfileSearchSelect:MN,FormatNumber:LN,PlayersSearchSelect:FN,GenerateFootballPostMatchModal:GN,GenerateFormula1PostEventModal:e=>{var M,V;const[t,n]=y.useState(Ab(e.defaultLanguage)),[r,i]=y.useState(Ns()),[o,a]=y.useState([]),[s,c]=y.useState(!1),[u,f]=y.useState(""),[d,h]=y.useState("search"),[g,v]=y.useState(!1),[m,b]=y.useState(null),[x,S]=y.useState(!1),[C,I]=y.useState(!1),[w,A]=y.useState(""),[E,k]=y.useState("danger"),$=y.useMemo(()=>!!m,[m]);y.useEffect(()=>{e.isOpen?N(Ns()):(n(Ab(e.defaultLanguage)),i(Ns()),a([]),f(""),h("search"),b(null))},[e.isOpen]);const{https:G}=Ye(),O=()=>{A(""),I(!1)},T=Y=>{let Z="",D="danger";switch(Y){case"on_generate_failed":Z=e.labels.onEntityGenerateErrorMessage;break;case"on_create":Z=e.labels.onEntityCreateMessage,D="success";break;case"on_create_failed":Z=e.labels.onEntityCreateErrorMessage;break;case"fetch_races_failed":Z=e.labels.fetchRacesErrorMessage;break}k(D),A(Z),I(!0)},N=Y=>_(this,null,function*(){c(!0);const Z=yield G.apiSports.getRaces(Y),D=yield Z.json();if(!Z.ok){console.error("Error fetching races:",D),c(!1),a([]),T("fetch_races_failed");return}const W=(D.response||[]).sort((ne,J)=>new Date(J.date).getTime()-new Date(ne.date).getTime()),ie=W.filter(ne=>ne.status==="Completed"),le=W.filter(ne=>ne.status==="Scheduled"),ee=[...le.length>0?[le.sort((ne,J)=>new Date(ne.date).getTime()-new Date(J.date).getTime())[0]]:[],...ie];a(ee),c(!1)}),H=Y=>{i(Y),f(""),N(Y)},j=()=>_(this,null,function*(){v(!0);const Y=yield G.generatePostMatchQuiz({sportType:"formula1",lang:t,eventId:u});if(!(Y!=null&&Y.ok)){const D=yield Y==null?void 0:Y.json();console.error("Failed to generate AI content",D),v(!1),T("on_generate_failed");return}const Z=yield Y==null?void 0:Y.json();b(Z),v(!1),h("preview")}),F=Y=>_(this,null,function*(){S(!0);const Z=m,D=yield G.createClassicQuiz(Z),L=yield D.json();if(!(D!=null&&D.ok)){console.error("Failed to create content",L),S(!1),T("on_create_failed");return}if(S(!1),Y==="goto"){T("on_create"),e.toggleModal(),e.fetchEntityById(L.data.id);return}T("on_create")});return l.jsx(p.Modal,{open:e.isOpen,onClose:()=>{g||x||e.toggleModal()},children:l.jsxs(l.Fragment,{children:[l.jsxs(p.ModalDialog,{sx:{backgroundColor:"white",minWidth:"50%",height:900},children:[l.jsx(p.DialogTitle,{children:e.labels.generateFormulaOnePostEventModalTitle}),l.jsx(p.Divider,{}),l.jsx(p.DialogContent,{sx:{overflowX:"hidden"},children:l.jsxs(l.Fragment,{children:[l.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"},gap:2,mb:2},children:[l.jsxs(p.FormControl,{size:"sm",children:[l.jsx(p.FormLabel,{children:e.labels.language}),l.jsx(p.Select,{value:t,onChange:(Y,Z)=>Z&&n(Z),indicator:null,disabled:g,startDecorator:l.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(Gn[t]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(Gn[t]||"gb").toLowerCase()}.png`,alt:((M=Object.values(Ie).find(Y=>Y.key===t))==null?void 0:M.name)||"Language"}),sx:{minHeight:38},children:Object.values(Ie).map(Y=>l.jsxs(p.Option,{value:Y.key,label:Y.name,children:[l.jsx(p.ListItemDecorator,{children:l.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(Gn[Y.key]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(Gn[Y.key]||"gb").toLowerCase()}.png`,alt:Y.name})}),Y.name]},Y.key))}),l.jsx(p.FormHelperText,{children:e.labels.targetLanguageDescription})]}),l.jsxs(p.FormControl,{size:"sm",children:[l.jsx(p.FormLabel,{children:e.labels.season}),l.jsx(p.Select,{value:r,onChange:(Y,Z)=>Z&&H(Z),disabled:g||!!m,sx:{minHeight:38},children:KN().map(Y=>l.jsx(p.Option,{value:Y,children:Y},Y))}),l.jsx(p.FormHelperText,{children:e.labels.seasonDescription})]})]}),l.jsxs(p.Stepper,{sx:{my:2,width:"100%","--StepIndicator-size":"3rem","--Step-connectorInset":"0px",[`& .${Ci.root}`]:{borderWidth:3},[`& .${ur.root}::after`]:{height:3},[`& .${ur.completed}`]:{[`& .${Ci.root}`]:{borderColor:"primary.300",color:"primary.300"},"&::after":{bgcolor:"primary.300"}},[`& .${ur.active}`]:{[`& .${Ci.root}`]:{borderColor:"currentColor"}},[`& .${ur.disabled} *`]:{color:"neutral.outlinedDisabledColor"}},children:[l.jsx(p.Step,{active:d==="search",orientation:"vertical",indicator:l.jsx(p.Tooltip,{title:d==="preview"?(V=e.labels)==null?void 0:V.searchRaceTooltip:"",placement:"right",children:l.jsx(p.StepIndicator,{variant:d==="search"?"solid":"outlined",color:"primary",onClick:()=>{d==="preview"&&(b(null),h("search"))},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&d==="preview"&&(Y.preventDefault(),b(null),h("search"))},sx:B({cursor:d==="preview"?"pointer":"default"},d==="preview"&&{animation:"pulse 2s infinite","@keyframes pulse":{"0%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0.7)"},"70%":{boxShadow:"0 0 0 10px rgba(25, 118, 210, 0)"},"100%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0)"}},"&:hover":{animation:"none",boxShadow:"0 0 0 4px rgba(25, 118, 210, 0.3)"}}),role:"button",tabIndex:d==="preview"?0:-1,children:l.jsx(xb,{})})}),children:l.jsx(p.Typography,{sx:B({textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},d==="preview"&&{cursor:"pointer"}),onClick:()=>{d==="preview"&&(b(null),h("search"))},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&d==="preview"&&(Y.preventDefault(),b(null),h("search"))},role:"button",tabIndex:d==="preview"?0:-1,children:e.labels.searchRace})}),l.jsx(p.Step,{orientation:"vertical",active:d==="preview",disabled:d!=="preview",indicator:l.jsx(p.StepIndicator,{variant:d==="preview"?"solid":"outlined",color:"primary",children:l.jsx(Cb,{})}),children:l.jsx(p.Typography,{sx:{textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},children:e.labels.preview})})]}),l.jsx(p.Sheet,{variant:"outlined",sx:{mt:2,p:1,borderRadius:"sm",bgcolor:"background.surface"},children:l.jsx(YN,{step:d,loading:s||g,races:o,selectedRaceId:u,generatedEntity:m,labels:e.labels,setSelectedRaceId:f,onGenerate:j,setGeneratedEntity:b})})]})}),l.jsxs(p.DialogActions,{children:[l.jsx(p.Button,{variant:"outlined",color:"primary",loading:x,disabled:!$||g,onClick:()=>F("goto"),children:e.labels.createAndGoTo}),l.jsx(p.Button,{variant:"solid",color:"primary",loading:x,disabled:!$||g,onClick:()=>F("continue"),children:e.labels.createAndContinue}),l.jsx(p.Button,{disabled:g||x,variant:"plain",color:"neutral",onClick:Y=>{Y.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]}),l.jsx(Ke,{showToast:C,color:E,message:w,hideToast:O})]})})}},Tb=y.createContext(null),qN=({children:e})=>l.jsx(Tb.Provider,{value:QN,children:e}),JN=()=>{const e=y.useContext(Tb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},Eb=425,kb=1024;return{APIProvider:jS,AuthProvider:US,AuthContext:Yf,ComponentProvider:qN,useComponentContext:JN,useAPIContext:Ye,useIsMobile:()=>{const[e,t]=y.useState(window.innerWidth<=kb),[n,r]=y.useState(window.innerWidth<=Eb);return y.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=kb),r(window.innerWidth<=Eb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}},constants:{supportedLanguages:Ie,languagesMap:Ti}}});