fansunited-management-components 1.28.0-RC1 → 1.29.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(C,Me){typeof exports=="object"&&typeof module!="undefined"?module.exports=Me(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"],Me):(C=typeof globalThis!="undefined"?globalThis:C||self,C.FansUnitedComponents=Me(C.React,C.FansUnitedSDK,C.ReactDOM,C.EmotionStyled,C.EmotionReact,C.ReactQuill,C.MaterialUIJoy,C.MaterialUIIcons))})(this,function(C,Me,Oe,Lt,pe,vi,I,Le){"use strict";var vF=Object.defineProperty,bF=Object.defineProperties;var yF=Object.getOwnPropertyDescriptors;var ks=Object.getOwnPropertySymbols,xF=Object.getPrototypeOf,ib=Object.prototype.hasOwnProperty,ob=Object.prototype.propertyIsEnumerable,CF=Reflect.get;var mi=Math.pow,Du=(C,Me,Oe)=>Me in C?vF(C,Me,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):C[Me]=Oe,
|
|
1
|
+
(function(C,Me){typeof exports=="object"&&typeof module!="undefined"?module.exports=Me(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"],Me):(C=typeof globalThis!="undefined"?globalThis:C||self,C.FansUnitedComponents=Me(C.React,C.FansUnitedSDK,C.ReactDOM,C.EmotionStyled,C.EmotionReact,C.ReactQuill,C.MaterialUIJoy,C.MaterialUIIcons))})(this,function(C,Me,Oe,Lt,pe,vi,I,Le){"use strict";var vF=Object.defineProperty,bF=Object.defineProperties;var yF=Object.getOwnPropertyDescriptors;var ks=Object.getOwnPropertySymbols,xF=Object.getPrototypeOf,ib=Object.prototype.hasOwnProperty,ob=Object.prototype.propertyIsEnumerable,CF=Reflect.get;var mi=Math.pow,Du=(C,Me,Oe)=>Me in C?vF(C,Me,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):C[Me]=Oe,U=(C,Me)=>{for(var Oe in Me||(Me={}))ib.call(Me,Oe)&&Du(C,Oe,Me[Oe]);if(ks)for(var Oe of ks(Me))ob.call(Me,Oe)&&Du(C,Oe,Me[Oe]);return C},X=(C,Me)=>bF(C,yF(Me));var Ps=C=>typeof C=="symbol"?C:C+"",We=(C,Me)=>{var Oe={};for(var Lt in C)ib.call(C,Lt)&&Me.indexOf(Lt)<0&&(Oe[Lt]=C[Lt]);if(C!=null&&ks)for(var Lt of ks(C))Me.indexOf(Lt)<0&&ob.call(C,Lt)&&(Oe[Lt]=C[Lt]);return Oe};var oe=(C,Me,Oe)=>Du(C,typeof Me!="symbol"?Me+"":Me,Oe);var Ir=(C,Me,Oe)=>CF(xF(C),Oe,Me);var k=(C,Me,Oe)=>new Promise((Lt,pe)=>{var vi=Sn=>{try{Le(Oe.next(Sn))}catch(j){pe(j)}},I=Sn=>{try{Le(Oe.throw(Sn))}catch(j){pe(j)}},Le=Sn=>Sn.done?Lt(Sn.value):Promise.resolve(Sn.value).then(vi,I);Le((Oe=Oe.apply(C,Me)).next())});function Sn(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 j=Sn(C);var Bt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ou(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 Ru={exports:{}},Ao={};/**
|
|
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 Lu=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},fb=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++],l=e[n++],s=((i&7)<<18|(o&63)<<12|(a&63)<<6|l&63)-65536;t[r++]=String.fromCharCode(55296+(s>>10)),t[r++]=String.fromCharCode(56320+(s&1023))}else{const o=e[n++],a=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}}return t.join("")},Bu={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,l=a?e[i+1]:0,s=i+2<e.length,c=s?e[i+2]:0,d=o>>2,f=(o&3)<<4|l>>4;let h=(l&15)<<2|c>>6,p=c&63;s||(p=64,a||(h=64)),r.push(n[d],n[f],n[h],n[p])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Lu(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):fb(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++)],l=i<e.length?n[e.charAt(i)]:0;++i;const c=i<e.length?n[e.charAt(i)]:64;++i;const f=i<e.length?n[e.charAt(i)]:64;if(++i,o==null||l==null||c==null||f==null)throw new hb;const h=o<<2|l>>4;if(r.push(h),c!==64){const p=l<<4&240|c>>2;if(r.push(p),f!==64){const
|
|
39
|
+
*/const Lu=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},fb=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++],l=e[n++],s=((i&7)<<18|(o&63)<<12|(a&63)<<6|l&63)-65536;t[r++]=String.fromCharCode(55296+(s>>10)),t[r++]=String.fromCharCode(56320+(s&1023))}else{const o=e[n++],a=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|a&63)}}return t.join("")},Bu={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,l=a?e[i+1]:0,s=i+2<e.length,c=s?e[i+2]:0,d=o>>2,f=(o&3)<<4|l>>4;let h=(l&15)<<2|c>>6,p=c&63;s||(p=64,a||(h=64)),r.push(n[d],n[f],n[h],n[p])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Lu(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):fb(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++)],l=i<e.length?n[e.charAt(i)]:0;++i;const c=i<e.length?n[e.charAt(i)]:64;++i;const f=i<e.length?n[e.charAt(i)]:64;if(++i,o==null||l==null||c==null||f==null)throw new hb;const h=o<<2|l>>4;if(r.push(h),c!==64){const p=l<<4&240|c>>2;if(r.push(p),f!==64){const m=c<<6&192|f;r.push(m)}}}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 hb extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const pb=function(e){const t=Lu(e);return Bu.encodeByteArray(t,!0)},$u=function(e){return pb(e).replace(/\./g,"")},Nu=function(e){try{return Bu.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function To(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)||!gb(n)||(e[n]=To(e[n],t[n]));return e}function gb(e){return e!=="__proto__"}/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2022 Google LLC
|
|
42
42
|
*
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
187
187
|
* See the License for the specific language governing permissions and
|
|
188
188
|
* limitations under the License.
|
|
189
|
-
*/class Pb{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new xb;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch(i){}}return this.instancesDeferred.get(n).promise}getImmediate(t){var n;const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(o){if(i)return null;throw o}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Ob(t))try{this.getOrInitializeService({instanceIdentifier:sr})}catch(n){}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:i});r.resolve(o)}catch(o){}}}}clearInstance(t=sr){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return
|
|
189
|
+
*/class Pb{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new xb;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch(i){}}return this.instancesDeferred.get(n).promise}getImmediate(t){var n;const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(o){if(i)return null;throw o}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Ob(t))try{this.getOrInitializeService({instanceIdentifier:sr})}catch(n){}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:i});r.resolve(o)}catch(o){}}}}clearInstance(t=sr){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return k(this,null,function*(){const t=Array.from(this.instances.values());yield Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])})}isComponentSet(){return this.component!=null}isInitialized(t=sr){return this.instances.has(t)}getOptions(t=sr){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[o,a]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(o);r===l&&a.resolve(i)}return i}onInit(t,n){var r;const i=this.normalizeInstanceIdentifier(n),o=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;o.add(t),this.onInitCallbacks.set(i,o);const a=this.instances.get(i);return a&&t(a,i),()=>{o.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(t,n)}catch(o){}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Db(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch(i){}return r||null}normalizeInstanceIdentifier(t=sr){return this.component?this.component.multipleInstances?t:sr:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Db(e){return e===sr?void 0:e}function Ob(e){return e.instantiationMode==="EAGER"}/**
|
|
190
190
|
* @license
|
|
191
191
|
* Copyright 2019 Google LLC
|
|
192
192
|
*
|
|
@@ -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 Ms=[];var Be;(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"})(Be||(Be={}));const Qu={debug:Be.DEBUG,verbose:Be.VERBOSE,info:Be.INFO,warn:Be.WARN,error:Be.ERROR,silent:Be.SILENT},Rb=Be.INFO,Mb={[Be.DEBUG]:"log",[Be.VERBOSE]:"log",[Be.INFO]:"info",[Be.WARN]:"warn",[Be.ERROR]:"error"},Lb=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=Mb[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 Ls{constructor(t){this.name=t,this._logLevel=Rb,this._logHandler=Lb,this._userLogHandler=null,Ms.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Be))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Qu[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,Be.DEBUG,...t),this._logHandler(this,Be.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Be.VERBOSE,...t),this._logHandler(this,Be.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Be.INFO,...t),this._logHandler(this,Be.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Be.WARN,...t),this._logHandler(this,Be.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Be.ERROR,...t),this._logHandler(this,Be.ERROR,...t)}}function Bb(e){Ms.forEach(t=>{t.setLogLevel(e)})}function $b(e,t){for(const n of Ms){let r=null;t&&t.level&&(r=Qu[t.level]),e===null?n.userLogHandler=null:n.userLogHandler=(i,o,...a)=>{const l=a.map(s=>{if(s==null)return null;if(typeof s=="string")return s;if(typeof s=="number"||typeof s=="boolean")return s.toString();if(s instanceof Error)return s.message;try{return JSON.stringify(s)}catch(c){return null}}).filter(s=>s).join(" ");o>=(r!=null?r:i.logLevel)&&e({level:Be[o].toLowerCase(),message:l,args:a,type:i.name})}}}const Nb=(e,t)=>t.some(n=>e instanceof n);let Ju,Xu;function Fb(){return Ju||(Ju=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function zb(){return Xu||(Xu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Zu=new WeakMap,Bs=new WeakMap,ed=new WeakMap,$s=new WeakMap,Ns=new WeakMap;function jb(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{n(Hn(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&Zu.set(n,e)}).catch(()=>{}),Ns.set(t,e),t}function Vb(e){if(Bs.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)});Bs.set(e,t)}let Fs={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bs.get(e);if(t==="objectStoreNames")return e.objectStoreNames||ed.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Hn(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 Ub(e){Fs=e(Fs)}function Hb(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(zs(this),t,...n);return ed.set(r,t.sort?t.sort():[t]),Hn(r)}:zb().includes(e)?function(...t){return e.apply(zs(this),t),Hn(Zu.get(this))}:function(...t){return Hn(e.apply(zs(this),t))}}function Wb(e){return typeof e=="function"?Hb(e):(e instanceof IDBTransaction&&Vb(e),Nb(e,Fb())?new Proxy(e,Fs):e)}function Hn(e){if(e instanceof IDBRequest)return jb(e);if($s.has(e))return $s.get(e);const t=Wb(e);return t!==e&&($s.set(e,t),Ns.set(t,e)),t}const zs=e=>Ns.get(e);function Gb(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),l=Hn(a);return r&&a.addEventListener("upgradeneeded",s=>{r(Hn(a.result),s.oldVersion,s.newVersion,Hn(a.transaction),s)}),n&&a.addEventListener("blocked",s=>n(s.oldVersion,s.newVersion,s)),l.then(s=>{o&&s.addEventListener("close",()=>o()),i&&s.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),l}const Yb=["get","getKey","getAll","getAllKeys","count"],Kb=["put","add","delete","clear"],js=new Map;function td(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(js.get(t))return js.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Kb.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Yb.includes(n)))return;const o=function(a,...l){return
|
|
219
|
+
*/const Ms=[];var Be;(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"})(Be||(Be={}));const Qu={debug:Be.DEBUG,verbose:Be.VERBOSE,info:Be.INFO,warn:Be.WARN,error:Be.ERROR,silent:Be.SILENT},Rb=Be.INFO,Mb={[Be.DEBUG]:"log",[Be.VERBOSE]:"log",[Be.INFO]:"info",[Be.WARN]:"warn",[Be.ERROR]:"error"},Lb=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=Mb[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 Ls{constructor(t){this.name=t,this._logLevel=Rb,this._logHandler=Lb,this._userLogHandler=null,Ms.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Be))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Qu[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,Be.DEBUG,...t),this._logHandler(this,Be.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Be.VERBOSE,...t),this._logHandler(this,Be.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Be.INFO,...t),this._logHandler(this,Be.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Be.WARN,...t),this._logHandler(this,Be.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Be.ERROR,...t),this._logHandler(this,Be.ERROR,...t)}}function Bb(e){Ms.forEach(t=>{t.setLogLevel(e)})}function $b(e,t){for(const n of Ms){let r=null;t&&t.level&&(r=Qu[t.level]),e===null?n.userLogHandler=null:n.userLogHandler=(i,o,...a)=>{const l=a.map(s=>{if(s==null)return null;if(typeof s=="string")return s;if(typeof s=="number"||typeof s=="boolean")return s.toString();if(s instanceof Error)return s.message;try{return JSON.stringify(s)}catch(c){return null}}).filter(s=>s).join(" ");o>=(r!=null?r:i.logLevel)&&e({level:Be[o].toLowerCase(),message:l,args:a,type:i.name})}}}const Nb=(e,t)=>t.some(n=>e instanceof n);let Ju,Xu;function Fb(){return Ju||(Ju=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function zb(){return Xu||(Xu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Zu=new WeakMap,Bs=new WeakMap,ed=new WeakMap,$s=new WeakMap,Ns=new WeakMap;function jb(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{n(Hn(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&Zu.set(n,e)}).catch(()=>{}),Ns.set(t,e),t}function Vb(e){if(Bs.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)});Bs.set(e,t)}let Fs={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bs.get(e);if(t==="objectStoreNames")return e.objectStoreNames||ed.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Hn(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 Ub(e){Fs=e(Fs)}function Hb(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(zs(this),t,...n);return ed.set(r,t.sort?t.sort():[t]),Hn(r)}:zb().includes(e)?function(...t){return e.apply(zs(this),t),Hn(Zu.get(this))}:function(...t){return Hn(e.apply(zs(this),t))}}function Wb(e){return typeof e=="function"?Hb(e):(e instanceof IDBTransaction&&Vb(e),Nb(e,Fb())?new Proxy(e,Fs):e)}function Hn(e){if(e instanceof IDBRequest)return jb(e);if($s.has(e))return $s.get(e);const t=Wb(e);return t!==e&&($s.set(e,t),Ns.set(t,e)),t}const zs=e=>Ns.get(e);function Gb(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),l=Hn(a);return r&&a.addEventListener("upgradeneeded",s=>{r(Hn(a.result),s.oldVersion,s.newVersion,Hn(a.transaction),s)}),n&&a.addEventListener("blocked",s=>n(s.oldVersion,s.newVersion,s)),l.then(s=>{o&&s.addEventListener("close",()=>o()),i&&s.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),l}const Yb=["get","getKey","getAll","getAllKeys","count"],Kb=["put","add","delete","clear"],js=new Map;function td(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(js.get(t))return js.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Kb.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Yb.includes(n)))return;const o=function(a,...l){return k(this,null,function*(){const s=this.transaction(a,i?"readwrite":"readonly");let c=s.store;return r&&(c=c.index(l.shift())),(yield Promise.all([c[n](...l),i&&s.done]))[0]})};return js.set(t,o),o}Ub(e=>X(U({},e),{get:(t,n,r)=>td(t,n)||e.get(t,n,r),has:(t,n)=>!!td(t,n)||e.has(t,n)}));/**
|
|
220
220
|
* @license
|
|
221
221
|
* Copyright 2019 Google LLC
|
|
222
222
|
*
|
|
@@ -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 cr=w0;function Us(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:Wn,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw Qt.create("bad-app-name",{appName:String(i)});if(n||(n=zu()),!n)throw Qt.create("no-options");const o=Gn.get(i);if(o){if(ko(n,o.options)&&ko(r,o.config))return o;throw Qt.create("duplicate-app",{appName:i})}const a=new qu(i);for(const s of Er.values())a.addComponent(s);const l=new id(n,r,a);return Gn.set(i,l),l}function _0(e,t){if(wb()&&!Uu())throw Qt.create("invalid-server-app-environment");t.automaticDataCollectionEnabled===void 0&&(t.automaticDataCollectionEnabled=!1);let n;rd(e)?n=e.options:n=e;const r=Object.assign(Object.assign({},t),n);r.releaseOnDeref!==void 0&&delete r.releaseOnDeref;const i=c=>[...c].reduce((d,f)=>Math.imul(31,d)+f.charCodeAt(0)|0,0);if(t.releaseOnDeref!==void 0&&typeof FinalizationRegistry=="undefined")throw Qt.create("finalization-registry-not-supported",{});const o=""+i(JSON.stringify(r)),a=Tr.get(o);if(a)return a.incRefCount(t.releaseOnDeref),a;const l=new qu(o);for(const c of Er.values())l.addComponent(c);const s=new E0(n,t,o,l);return Tr.set(o,s),s}function od(e=Wn){const t=Gn.get(e);if(!t&&e===Wn&&zu())return Us();if(!t)throw Qt.create("no-app",{appName:e});return t}function k0(){return Array.from(Gn.values())}function Hs(e){return
|
|
339
|
+
*/const cr=w0;function Us(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:Wn,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw Qt.create("bad-app-name",{appName:String(i)});if(n||(n=zu()),!n)throw Qt.create("no-options");const o=Gn.get(i);if(o){if(ko(n,o.options)&&ko(r,o.config))return o;throw Qt.create("duplicate-app",{appName:i})}const a=new qu(i);for(const s of Er.values())a.addComponent(s);const l=new id(n,r,a);return Gn.set(i,l),l}function _0(e,t){if(wb()&&!Uu())throw Qt.create("invalid-server-app-environment");t.automaticDataCollectionEnabled===void 0&&(t.automaticDataCollectionEnabled=!1);let n;rd(e)?n=e.options:n=e;const r=Object.assign(Object.assign({},t),n);r.releaseOnDeref!==void 0&&delete r.releaseOnDeref;const i=c=>[...c].reduce((d,f)=>Math.imul(31,d)+f.charCodeAt(0)|0,0);if(t.releaseOnDeref!==void 0&&typeof FinalizationRegistry=="undefined")throw Qt.create("finalization-registry-not-supported",{});const o=""+i(JSON.stringify(r)),a=Tr.get(o);if(a)return a.incRefCount(t.releaseOnDeref),a;const l=new qu(o);for(const c of Er.values())l.addComponent(c);const s=new E0(n,t,o,l);return Tr.set(o,s),s}function od(e=Wn){const t=Gn.get(e);if(!t&&e===Wn&&zu())return Us();if(!t)throw Qt.create("no-app",{appName:e});return t}function k0(){return Array.from(Gn.values())}function Hs(e){return k(this,null,function*(){let t=!1;const n=e.name;Gn.has(n)?(t=!0,Gn.delete(n)):Tr.has(n)&&e.decRefCount()<=0&&(Tr.delete(n),t=!0),t&&(yield Promise.all(e.container.getProviders().map(r=>r.delete())),e.isDeleted=!0)})}function Tn(e,t,n){var r;let i=(r=I0[e])!==null&&r!==void 0?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const l=[`Unable to register library "${i}" with version "${t}":`];o&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&a&&l.push("and"),a&&l.push(`version name "${t}" contains illegal characters (whitespace or "/")`),An.warn(l.join(" "));return}lr(new Un(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}function ad(e,t){if(e!==null&&typeof e!="function")throw Qt.create("invalid-log-argument");$b(e,t)}function sd(e){Bb(e)}/**
|
|
340
340
|
* @license
|
|
341
341
|
* Copyright 2021 Google LLC
|
|
342
342
|
*
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
352
352
|
* See the License for the specific language governing permissions and
|
|
353
353
|
* limitations under the License.
|
|
354
|
-
*/const P0="firebase-heartbeat-database",D0=1,xi="firebase-heartbeat-store";let Ws=null;function ld(){return Ws||(Ws=Gb(P0,D0,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(xi)}catch(n){console.warn(n)}}}}).catch(e=>{throw Qt.create("idb-open",{originalErrorMessage:e.message})})),Ws}function O0(e){return
|
|
354
|
+
*/const P0="firebase-heartbeat-database",D0=1,xi="firebase-heartbeat-store";let Ws=null;function ld(){return Ws||(Ws=Gb(P0,D0,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(xi)}catch(n){console.warn(n)}}}}).catch(e=>{throw Qt.create("idb-open",{originalErrorMessage:e.message})})),Ws}function O0(e){return k(this,null,function*(){try{const n=(yield ld()).transaction(xi),r=yield n.objectStore(xi).get(ud(e));return yield n.done,r}catch(t){if(t instanceof $t)An.warn(t.message);else{const n=Qt.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});An.warn(n.message)}}})}function cd(e,t){return k(this,null,function*(){try{const r=(yield ld()).transaction(xi,"readwrite");yield r.objectStore(xi).put(t,ud(e)),yield r.done}catch(n){if(n instanceof $t)An.warn(n.message);else{const r=Qt.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});An.warn(r.message)}}})}function ud(e){return`${e.name}!${e.options.appId}`}/**
|
|
355
355
|
* @license
|
|
356
356
|
* Copyright 2021 Google LLC
|
|
357
357
|
*
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
367
367
|
* See the License for the specific language governing permissions and
|
|
368
368
|
* limitations under the License.
|
|
369
|
-
*/const R0=1024,M0=30*24*60*60*1e3;class L0{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new $0(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}triggerHeartbeat(){return
|
|
369
|
+
*/const R0=1024,M0=30*24*60*60*1e3;class L0{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new $0(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}triggerHeartbeat(){return k(this,null,function*(){var t,n,r;try{const o=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),a=dd();return console.log("heartbeats",(t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats),((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((r=this._heartbeatsCache)===null||r===void 0?void 0:r.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===a||this._heartbeatsCache.heartbeats.some(l=>l.date===a)?void 0:(this._heartbeatsCache.heartbeats.push({date:a,agent:o}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(l=>{const s=new Date(l.date).valueOf();return Date.now()-s<=M0}),this._storage.overwrite(this._heartbeatsCache))}catch(i){An.warn(i)}})}getHeartbeatsHeader(){return k(this,null,function*(){var t;try{if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=dd(),{heartbeatsToSend:r,unsentEntries:i}=B0(this._heartbeatsCache.heartbeats),o=$u(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}catch(n){return An.warn(n),""}})}}function dd(){return new Date().toISOString().substring(0,10)}function B0(e,t=R0){const n=[];let r=e.slice();for(const i of e){const o=n.find(a=>a.agent===i.agent);if(o){if(o.dates.push(i.date),fd(n)>t){o.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),fd(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class $0{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return k(this,null,function*(){return _o()?Ib().then(()=>!0).catch(()=>!1):!1})}read(){return k(this,null,function*(){if(yield this._canUseIndexedDBPromise){const n=yield O0(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(t){return k(this,null,function*(){var n;if(yield this._canUseIndexedDBPromise){const i=yield this.read();return cd(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return})}add(t){return k(this,null,function*(){var n;if(yield this._canUseIndexedDBPromise){const i=yield this.read();return cd(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...t.heartbeats]})}else return})}}function fd(e){return $u(JSON.stringify({version:2,heartbeats:e})).length}/**
|
|
370
370
|
* @license
|
|
371
371
|
* Copyright 2019 Google LLC
|
|
372
372
|
*
|
|
@@ -657,7 +657,7 @@
|
|
|
657
657
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
658
658
|
* See the License for the specific language governing permissions and
|
|
659
659
|
* limitations under the License.
|
|
660
|
-
*/const ry=new Ii(3e4,6e4);function Ye(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}function Ke(o,a,l,s){return
|
|
660
|
+
*/const ry=new Ii(3e4,6e4);function Ye(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}function Ke(o,a,l,s){return k(this,arguments,function*(e,t,n,r,i={}){return xd(e,i,()=>k(this,null,function*(){let c={},d={};r&&(t==="GET"?d=r:c={body:JSON.stringify(r)});const f=Sr(Object.assign({key:e.config.apiKey},d)).slice(1),h=yield e._getAdditionalHeaders();return h["Content-Type"]="application/json",e.languageCode&&(h["X-Firebase-Locale"]=e.languageCode),yd.fetch()(Cd(e,e.config.apiHost,n,f),Object.assign({method:t,headers:h,referrerPolicy:"no-referrer"},c))}))})}function xd(e,t,n){return k(this,null,function*(){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},ny),t);try{const i=new oy(e),o=yield Promise.race([n(),i.promise]);i.clearNetworkTimeout();const a=yield o.json();if("needConfirmation"in a)throw Si(e,"account-exists-with-different-credential",a);if(o.ok&&!("errorMessage"in a))return a;{const l=o.ok?a.errorMessage:a.error.message,[s,c]=l.split(" : ");if(s==="FEDERATED_USER_ID_ALREADY_LINKED")throw Si(e,"credential-already-in-use",a);if(s==="EMAIL_EXISTS")throw Si(e,"email-already-in-use",a);if(s==="USER_DISABLED")throw Si(e,"user-disabled",a);const d=r[s]||s.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw Ks(e,d,c);vt(e,d)}}catch(i){if(i instanceof $t)throw i;vt(e,"network-request-failed",{message:String(i)})}})}function En(o,a,l,s){return k(this,arguments,function*(e,t,n,r,i={}){const c=yield Ke(e,t,n,r,i);return"mfaPendingCredential"in c&&vt(e,"multi-factor-auth-required",{_serverResponse:c}),c})}function Cd(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?Js(e.config,i):`${e.config.apiScheme}://${i}`}function iy(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class oy{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(ht(this.auth,"network-request-failed")),ry.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Si(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=ht(e,t,r);return i.customData._tokenResponse=n,i}/**
|
|
661
661
|
* @license
|
|
662
662
|
* Copyright 2020 Google LLC
|
|
663
663
|
*
|
|
@@ -687,7 +687,7 @@
|
|
|
687
687
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
688
688
|
* See the License for the specific language governing permissions and
|
|
689
689
|
* limitations under the License.
|
|
690
|
-
*/function sy(e){return
|
|
690
|
+
*/function sy(e){return k(this,null,function*(){return(yield Ke(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""})}function ly(e,t){return k(this,null,function*(){return Ke(e,"GET","/v2/recaptchaConfig",Ye(e,t))})}/**
|
|
691
691
|
* @license
|
|
692
692
|
* Copyright 2020 Google LLC
|
|
693
693
|
*
|
|
@@ -702,7 +702,7 @@
|
|
|
702
702
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
703
703
|
* See the License for the specific language governing permissions and
|
|
704
704
|
* limitations under the License.
|
|
705
|
-
*/function cy(e,t){return
|
|
705
|
+
*/function cy(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:delete",t)})}function uy(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",t)})}function Sd(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:lookup",t)})}/**
|
|
706
706
|
* @license
|
|
707
707
|
* Copyright 2020 Google LLC
|
|
708
708
|
*
|
|
@@ -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 Ai(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function dy(e,t=!1){return
|
|
720
|
+
*/function Ai(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function dy(e,t=!1){return k(this,null,function*(){const n=ke(e),r=yield n.getIdToken(t),i=Mo(r);ie(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:Ai(Xs(i.auth_time)),issuedAtTime:Ai(Xs(i.iat)),expirationTime:Ai(Xs(i.exp)),signInProvider:a||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}})}function Xs(e){return Number(e)*1e3}function Mo(e){const[t,n,r]=e.split(".");if(t===void 0||n===void 0||r===void 0)return Ro("JWT malformed, contained fewer than 3 sections"),null;try{const i=Nu(n);return i?JSON.parse(i):(Ro("Failed to decode base64 JWT payload"),null)}catch(i){return Ro("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function Ad(e){const t=Mo(e);return ie(t,"internal-error"),ie(typeof t.exp!="undefined","internal-error"),ie(typeof t.iat!="undefined","internal-error"),Number(t.exp)-Number(t.iat)}/**
|
|
721
721
|
* @license
|
|
722
722
|
* Copyright 2020 Google LLC
|
|
723
723
|
*
|
|
@@ -732,7 +732,7 @@
|
|
|
732
732
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
733
733
|
* See the License for the specific language governing permissions and
|
|
734
734
|
* limitations under the License.
|
|
735
|
-
*/function _n(e,t,n=!1){return
|
|
735
|
+
*/function _n(e,t,n=!1){return k(this,null,function*(){if(n)return t;try{return yield t}catch(r){throw r instanceof $t&&fy(r)&&e.auth.currentUser===e&&(yield e.auth.signOut()),r}})}function fy({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}/**
|
|
736
736
|
* @license
|
|
737
737
|
* Copyright 2020 Google LLC
|
|
738
738
|
*
|
|
@@ -747,7 +747,7 @@
|
|
|
747
747
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
748
748
|
* See the License for the specific language governing permissions and
|
|
749
749
|
* limitations under the License.
|
|
750
|
-
*/class hy{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){var n;if(t){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(()=>
|
|
750
|
+
*/class hy{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){var n;if(t){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(()=>k(this,null,function*(){yield this.iteration()}),n)}iteration(){return k(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(t){(t==null?void 0:t.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}}/**
|
|
751
751
|
* @license
|
|
752
752
|
* Copyright 2020 Google LLC
|
|
753
753
|
*
|
|
@@ -777,7 +777,7 @@
|
|
|
777
777
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
778
778
|
* See the License for the specific language governing permissions and
|
|
779
779
|
* limitations under the License.
|
|
780
|
-
*/function Ti(e){return
|
|
780
|
+
*/function Ti(e){return k(this,null,function*(){var t;const n=e.auth,r=yield e.getIdToken(),i=yield _n(e,Sd(n,{idToken:r}));ie(i==null?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const a=!((t=o.providerUserInfo)===null||t===void 0)&&t.length?Td(o.providerUserInfo):[],l=gy(e.providerData,a),s=e.isAnonymous,c=!(e.email&&o.passwordHash)&&!(l!=null&&l.length),d=s?c:!1,f={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:l,metadata:new Zs(o.createdAt,o.lastLoginAt),isAnonymous:d};Object.assign(e,f)})}function py(e){return k(this,null,function*(){const t=ke(e);yield Ti(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}function gy(e,t){return[...e.filter(r=>!t.some(i=>i.providerId===r.providerId)),...t]}function Td(e){return e.map(t=>{var{providerId:n}=t,r=Ys(t,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/**
|
|
781
781
|
* @license
|
|
782
782
|
* Copyright 2020 Google LLC
|
|
783
783
|
*
|
|
@@ -792,7 +792,7 @@
|
|
|
792
792
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
793
793
|
* See the License for the specific language governing permissions and
|
|
794
794
|
* limitations under the License.
|
|
795
|
-
*/function my(e,t){return
|
|
795
|
+
*/function my(e,t){return k(this,null,function*(){const n=yield xd(e,{},()=>k(this,null,function*(){const r=Sr({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:o}=e.config,a=Cd(e,i,"/v1/token",`key=${o}`),l=yield e._getAdditionalHeaders();return l["Content-Type"]="application/x-www-form-urlencoded",yd.fetch()(a,{method:"POST",headers:l,body:r})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}})}function vy(e,t){return k(this,null,function*(){return Ke(e,"POST","/v2/accounts:revokeToken",Ye(e,t))})}/**
|
|
796
796
|
* @license
|
|
797
797
|
* Copyright 2020 Google LLC
|
|
798
798
|
*
|
|
@@ -807,7 +807,7 @@
|
|
|
807
807
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
808
808
|
* See the License for the specific language governing permissions and
|
|
809
809
|
* limitations under the License.
|
|
810
|
-
*/class Pr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){ie(t.idToken,"internal-error"),ie(typeof t.idToken!="undefined","internal-error"),ie(typeof t.refreshToken!="undefined","internal-error");const n="expiresIn"in t&&typeof t.expiresIn!="undefined"?Number(t.expiresIn):Ad(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){ie(t.length!==0,"internal-error");const n=Ad(t);this.updateTokensAndExpiration(t,null,n)}getToken(t,n=!1){return
|
|
810
|
+
*/class Pr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){ie(t.idToken,"internal-error"),ie(typeof t.idToken!="undefined","internal-error"),ie(typeof t.refreshToken!="undefined","internal-error");const n="expiresIn"in t&&typeof t.expiresIn!="undefined"?Number(t.expiresIn):Ad(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){ie(t.length!==0,"internal-error");const n=Ad(t);this.updateTokensAndExpiration(t,null,n)}getToken(t,n=!1){return k(this,null,function*(){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(ie(this.refreshToken,t,"user-token-expired"),this.refreshToken?(yield this.refresh(t,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(t,n){return k(this,null,function*(){const{accessToken:r,refreshToken:i,expiresIn:o}=yield my(t,n);this.updateTokensAndExpiration(r,i,Number(o))})}updateTokensAndExpiration(t,n,r){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(t,n){const{refreshToken:r,accessToken:i,expirationTime:o}=n,a=new Pr;return r&&(ie(typeof r=="string","internal-error",{appName:t}),a.refreshToken=r),i&&(ie(typeof i=="string","internal-error",{appName:t}),a.accessToken=i),o&&(ie(typeof o=="number","internal-error",{appName:t}),a.expirationTime=o),a}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Pr,this.toJSON())}_performRefresh(){return hn("not implemented")}}/**
|
|
811
811
|
* @license
|
|
812
812
|
* Copyright 2020 Google LLC
|
|
813
813
|
*
|
|
@@ -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 Kn(e,t){ie(typeof e=="string"||typeof e=="undefined","internal-error",{appName:t})}class kn{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=Ys(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new hy(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 Zs(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(t){return
|
|
825
|
+
*/function Kn(e,t){ie(typeof e=="string"||typeof e=="undefined","internal-error",{appName:t})}class kn{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=Ys(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new hy(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 Zs(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(t){return k(this,null,function*(){const n=yield _n(this,this.stsTokenManager.getToken(this.auth,t));return ie(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n})}getIdTokenResult(t){return dy(this,t)}reload(){return py(this)}_assign(t){this!==t&&(ie(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 kn(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(t){ie(!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 k(this,null,function*(){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&(yield Ti(this)),yield this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)})}delete(){return k(this,null,function*(){if(Ge(this.auth.app))return Promise.reject(bt(this.auth));const t=yield this.getIdToken();return yield _n(this,cy(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,l,s,c,d;const f=(r=n.displayName)!==null&&r!==void 0?r:void 0,h=(i=n.email)!==null&&i!==void 0?i:void 0,p=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,m=(a=n.photoURL)!==null&&a!==void 0?a:void 0,g=(l=n.tenantId)!==null&&l!==void 0?l:void 0,v=(s=n._redirectEventId)!==null&&s!==void 0?s:void 0,S=(c=n.createdAt)!==null&&c!==void 0?c:void 0,w=(d=n.lastLoginAt)!==null&&d!==void 0?d:void 0,{uid:y,emailVerified:x,isAnonymous:b,providerData:T,stsTokenManager:E}=n;ie(y&&E,t,"internal-error");const P=Pr.fromJSON(this.name,E);ie(typeof y=="string",t,"internal-error"),Kn(f,t.name),Kn(h,t.name),ie(typeof x=="boolean",t,"internal-error"),ie(typeof b=="boolean",t,"internal-error"),Kn(p,t.name),Kn(m,t.name),Kn(g,t.name),Kn(v,t.name),Kn(S,t.name),Kn(w,t.name);const O=new kn({uid:y,auth:t,email:h,emailVerified:x,displayName:f,isAnonymous:b,photoURL:m,phoneNumber:p,tenantId:g,stsTokenManager:P,createdAt:S,lastLoginAt:w});return T&&Array.isArray(T)&&(O.providerData=T.map(G=>Object.assign({},G))),v&&(O._redirectEventId=v),O}static _fromIdTokenResponse(t,n,r=!1){return k(this,null,function*(){const i=new Pr;i.updateFromServerResponse(n);const o=new kn({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r});return yield Ti(o),o})}static _fromGetAccountInfoResponse(t,n,r){return k(this,null,function*(){const i=n.users[0];ie(i.localId!==void 0,"internal-error");const o=i.providerUserInfo!==void 0?Td(i.providerUserInfo):[],a=!(i.email&&i.passwordHash)&&!(o!=null&&o.length),l=new Pr;l.updateFromIdToken(r);const s=new kn({uid:i.localId,auth:t,stsTokenManager:l,isAnonymous:a}),c={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 Zs(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(o!=null&&o.length)};return Object.assign(s,c),s})}}/**
|
|
826
826
|
* @license
|
|
827
827
|
* Copyright 2020 Google LLC
|
|
828
828
|
*
|
|
@@ -852,7 +852,7 @@
|
|
|
852
852
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
853
853
|
* See the License for the specific language governing permissions and
|
|
854
854
|
* limitations under the License.
|
|
855
|
-
*/class _d{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return
|
|
855
|
+
*/class _d{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return k(this,null,function*(){return!0})}_set(t,n){return k(this,null,function*(){this.storage[t]=n})}_get(t){return k(this,null,function*(){const n=this.storage[t];return n===void 0?null:n})}_remove(t){return k(this,null,function*(){delete this.storage[t]})}_addListener(t,n){}_removeListener(t,n){}}_d.type="NONE";const Dr=_d;/**
|
|
856
856
|
* @license
|
|
857
857
|
* Copyright 2019 Google LLC
|
|
858
858
|
*
|
|
@@ -867,7 +867,7 @@
|
|
|
867
867
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
868
868
|
* See the License for the specific language governing permissions and
|
|
869
869
|
* limitations under the License.
|
|
870
|
-
*/function ur(e,t,n){return`firebase:${e}:${t}:${n}`}class Or{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=ur(this.userKey,i.apiKey,o),this.fullPersistenceKey=ur("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}getCurrentUser(){return
|
|
870
|
+
*/function ur(e,t,n){return`firebase:${e}:${t}:${n}`}class Or{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=ur(this.userKey,i.apiKey,o),this.fullPersistenceKey=ur("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}getCurrentUser(){return k(this,null,function*(){const t=yield this.persistence._get(this.fullUserKey);return t?kn._fromJSON(this.auth,t):null})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(t){return k(this,null,function*(){if(this.persistence===t)return;const n=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=t,n)return this.setCurrentUser(n)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(t,n,r="authUser"){return k(this,null,function*(){if(!n.length)return new Or(Vt(Dr),t,r);const i=(yield Promise.all(n.map(c=>k(this,null,function*(){if(yield c._isAvailable())return c})))).filter(c=>c);let o=i[0]||Vt(Dr);const a=ur(r,t.config.apiKey,t.name);let l=null;for(const c of n)try{const d=yield c._get(a);if(d){const f=kn._fromJSON(t,d);c!==o&&(l=f),o=c;break}}catch(d){}const s=i.filter(c=>c._shouldAllowMigration);return!o._shouldAllowMigration||!s.length?new Or(o,t,r):(o=s[0],l&&(yield o._set(a,l.toJSON())),yield Promise.all(n.map(c=>k(this,null,function*(){if(c!==o)try{yield c._remove(a)}catch(d){}}))),new Or(o,t,r))})}}/**
|
|
871
871
|
* @license
|
|
872
872
|
* Copyright 2020 Google LLC
|
|
873
873
|
*
|
|
@@ -912,7 +912,7 @@
|
|
|
912
912
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
913
913
|
* See the License for the specific language governing permissions and
|
|
914
914
|
* limitations under the License.
|
|
915
|
-
*/class Cy{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const r=o=>new Promise((a,l)=>{try{const s=t(o);a(s)}catch(s){l(s)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}runMiddleware(t){return
|
|
915
|
+
*/class Cy{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const r=o=>new Promise((a,l)=>{try{const s=t(o);a(s)}catch(s){l(s)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}runMiddleware(t){return k(this,null,function*(){if(this.auth.currentUser===t)return;const n=[];try{for(const r of this.queue)yield r(t),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const i of n)try{i()}catch(o){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}})}}/**
|
|
916
916
|
* @license
|
|
917
917
|
* Copyright 2023 Google LLC
|
|
918
918
|
*
|
|
@@ -927,7 +927,7 @@
|
|
|
927
927
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
928
928
|
* See the License for the specific language governing permissions and
|
|
929
929
|
* limitations under the License.
|
|
930
|
-
*/function wy(n){return
|
|
930
|
+
*/function wy(n){return k(this,arguments,function*(e,t={}){return Ke(e,"GET","/v2/passwordPolicy",Ye(e,t))})}/**
|
|
931
931
|
* @license
|
|
932
932
|
* Copyright 2023 Google LLC
|
|
933
933
|
*
|
|
@@ -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 Ay{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 Nd(this),this.idTokenSubscription=new Nd(this),this.beforeStateQueue=new Cy(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=vd,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(()=>P(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Or.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 P(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 P(this,null,function*(){try{const n=yield Sd(this,{idToken:t}),r=yield kn._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 P(this,null,function*(){var n;if(Ge(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(l=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(l,l))}):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,l=i==null?void 0:i._redirectEventId,s=yield this.tryRedirectSignIn(t);(!a||a===l)&&(s!=null&&s.user)&&(i=s.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 ie(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return P(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 P(this,null,function*(){try{yield Ti(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 P(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return P(this,null,function*(){if(Ge(this.app))return Promise.reject(bt(this));const n=t?ke(t):null;return n&&ie(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return P(this,null,function*(){if(!this._deleted)return t&&ie(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>P(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return P(this,null,function*(){return Ge(this.app)?Promise.reject(bt(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Ge(this.app)?Promise.reject(bt(this)):this.queue(()=>P(this,null,function*(){yield this.assertedPersistence.setPersistence(Vt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return P(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 P(this,null,function*(){const t=yield wy(this),n=new Sy(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new ar("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 P(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 vy(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 P(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return P(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Vt(t)||this._popupRedirectResolver;ie(n,this,"argument-error"),this.redirectPersistenceManager=yield Or.create(this,[Vt(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return P(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>P(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 P(this,null,function*(){if(t===this.currentUser)return this.queue(()=>P(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 l=this._isInitialized?Promise.resolve():this._initializationPromise;if(ie(l,this,"internal-error"),l.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const s=t.addObserver(n,r,i);return()=>{a=!0,s()}}else{const s=t.addObserver(n);return()=>{a=!0,s()}}}directlySetCurrentUser(t){return P(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 ie(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=$d(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return P(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 P(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&&Z0(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function qe(e){return ke(e)}class Nd{constructor(t){this.auth=t,this.observer=null,this.addObserver=Ku(n=>this.observer=n)}get next(){return ie(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
|
|
960
|
+
*/class Ay{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 Nd(this),this.idTokenSubscription=new Nd(this),this.beforeStateQueue=new Cy(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=vd,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(()=>k(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Or.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 k(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 k(this,null,function*(){try{const n=yield Sd(this,{idToken:t}),r=yield kn._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 k(this,null,function*(){var n;if(Ge(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(l=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(l,l))}):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,l=i==null?void 0:i._redirectEventId,s=yield this.tryRedirectSignIn(t);(!a||a===l)&&(s!=null&&s.user)&&(i=s.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 ie(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return k(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 k(this,null,function*(){try{yield Ti(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 k(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return k(this,null,function*(){if(Ge(this.app))return Promise.reject(bt(this));const n=t?ke(t):null;return n&&ie(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return k(this,null,function*(){if(!this._deleted)return t&&ie(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>k(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return k(this,null,function*(){return Ge(this.app)?Promise.reject(bt(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Ge(this.app)?Promise.reject(bt(this)):this.queue(()=>k(this,null,function*(){yield this.assertedPersistence.setPersistence(Vt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return k(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 k(this,null,function*(){const t=yield wy(this),n=new Sy(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new ar("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 k(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 vy(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 k(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return k(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Vt(t)||this._popupRedirectResolver;ie(n,this,"argument-error"),this.redirectPersistenceManager=yield Or.create(this,[Vt(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return k(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>k(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 k(this,null,function*(){if(t===this.currentUser)return this.queue(()=>k(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 l=this._isInitialized?Promise.resolve():this._initializationPromise;if(ie(l,this,"internal-error"),l.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const s=t.addObserver(n,r,i);return()=>{a=!0,s()}}else{const s=t.addObserver(n);return()=>{a=!0,s()}}}directlySetCurrentUser(t){return k(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 ie(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=$d(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return k(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 k(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&&Z0(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function qe(e){return ke(e)}class Nd{constructor(t){this.auth=t,this.observer=null,this.addObserver=Ku(n=>this.observer=n)}get next(){return ie(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 ki={loadJS(){return
|
|
975
|
+
*/let ki={loadJS(){return k(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Ty(e){ki=e}function el(e){return ki.loadJS(e)}function Ey(){return ki.recaptchaV2Script}function _y(){return ki.recaptchaEnterpriseScript}function ky(){return ki.gapiScript}function Fd(e){return`__${e}${Math.floor(Math.random()*1e6)}`}const Py="recaptcha-enterprise",Dy="NO_RECAPTCHA";class Oy{constructor(t){this.type=Py,this.auth=qe(t)}verify(t="verify",n=!1){return k(this,null,function*(){function r(o){return k(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,l)=>k(this,null,function*(){ly(o,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(s=>{if(s.recaptchaKey===void 0)l(new Error("recaptcha Enterprise site key undefined"));else{const c=new ay(s);return o.tenantId==null?o._agentRecaptchaConfig=c:o._tenantRecaptchaConfigs[o.tenantId]=c,a(c.siteKey)}}).catch(s=>{l(s)})}))})}function i(o,a,l){const s=window.grecaptcha;Id(s)?s.enterprise.ready(()=>{s.enterprise.execute(o,{action:t}).then(c=>{a(c)}).catch(()=>{a(Dy)})}):l(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((o,a)=>{r(this.auth).then(l=>{if(!n&&Id(window.grecaptcha))i(l,o,a);else{if(typeof window=="undefined"){a(new Error("RecaptchaVerifier is only supported in browser"));return}let s=_y();s.length!==0&&(s+=l),el(s).then(()=>{i(l,o,a)}).catch(c=>{a(c)})}}).catch(l=>{a(l)})})})}}function zd(e,t,n,r=!1){return k(this,null,function*(){const i=new Oy(e);let o;try{o=yield i.verify(n)}catch(l){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 Pi(e,t,n,r){return k(this,null,function*(){var i;if(!((i=e._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const o=yield zd(e,t,n,n==="getOobCode");return r(e,o)}else return r(e,t).catch(o=>k(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 zd(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
|
*
|
|
@@ -1017,7 +1017,7 @@
|
|
|
1017
1017
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1018
1018
|
* See the License for the specific language governing permissions and
|
|
1019
1019
|
* limitations under the License.
|
|
1020
|
-
*/function Ud(e,t){return
|
|
1020
|
+
*/function Ud(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:resetPassword",Ye(e,t))})}function $y(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",t)})}function Ny(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:signUp",t)})}function Fy(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",Ye(e,t))})}/**
|
|
1021
1021
|
* @license
|
|
1022
1022
|
* Copyright 2020 Google LLC
|
|
1023
1023
|
*
|
|
@@ -1032,7 +1032,7 @@
|
|
|
1032
1032
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1033
1033
|
* See the License for the specific language governing permissions and
|
|
1034
1034
|
* limitations under the License.
|
|
1035
|
-
*/function zy(e,t){return
|
|
1035
|
+
*/function zy(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithPassword",Ye(e,t))})}function Lo(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:sendOobCode",Ye(e,t))})}function jy(e,t){return k(this,null,function*(){return Lo(e,t)})}function Vy(e,t){return k(this,null,function*(){return Lo(e,t)})}function Uy(e,t){return k(this,null,function*(){return Lo(e,t)})}function Hy(e,t){return k(this,null,function*(){return Lo(e,t)})}/**
|
|
1036
1036
|
* @license
|
|
1037
1037
|
* Copyright 2020 Google LLC
|
|
1038
1038
|
*
|
|
@@ -1047,7 +1047,7 @@
|
|
|
1047
1047
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1048
1048
|
* See the License for the specific language governing permissions and
|
|
1049
1049
|
* limitations under the License.
|
|
1050
|
-
*/function Wy(e,t){return
|
|
1050
|
+
*/function Wy(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithEmailLink",Ye(e,t))})}function Gy(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithEmailLink",Ye(e,t))})}/**
|
|
1051
1051
|
* @license
|
|
1052
1052
|
* Copyright 2020 Google LLC
|
|
1053
1053
|
*
|
|
@@ -1062,7 +1062,7 @@
|
|
|
1062
1062
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1063
1063
|
* See the License for the specific language governing permissions and
|
|
1064
1064
|
* limitations under the License.
|
|
1065
|
-
*/class Di extends Rr{constructor(t,n,r,i=null){super("password",r),this._email=t,this._password=n,this._tenantId=i}static _fromEmailAndPassword(t,n){return new Di(t,n,"password")}static _fromEmailAndCode(t,n,r=null){return new Di(t,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}_getIdTokenResponse(t){return
|
|
1065
|
+
*/class Di extends Rr{constructor(t,n,r,i=null){super("password",r),this._email=t,this._password=n,this._tenantId=i}static _fromEmailAndPassword(t,n){return new Di(t,n,"password")}static _fromEmailAndCode(t,n,r=null){return new Di(t,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}_getIdTokenResponse(t){return k(this,null,function*(){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Pi(t,n,"signInWithPassword",zy);case"emailLink":return Wy(t,{email:this._email,oobCode:this._password});default:vt(t,"internal-error")}})}_linkToIdToken(t,n){return k(this,null,function*(){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Pi(t,r,"signUpPassword",Ny);case"emailLink":return Gy(t,{idToken:n,email:this._email,oobCode:this._password});default:vt(t,"internal-error")}})}_getReauthenticationResolver(t){return this._getIdTokenResponse(t)}}/**
|
|
1066
1066
|
* @license
|
|
1067
1067
|
* Copyright 2020 Google LLC
|
|
1068
1068
|
*
|
|
@@ -1077,7 +1077,7 @@
|
|
|
1077
1077
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1078
1078
|
* See the License for the specific language governing permissions and
|
|
1079
1079
|
* limitations under the License.
|
|
1080
|
-
*/function Pn(e,t){return
|
|
1080
|
+
*/function Pn(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithIdp",Ye(e,t))})}/**
|
|
1081
1081
|
* @license
|
|
1082
1082
|
* Copyright 2020 Google LLC
|
|
1083
1083
|
*
|
|
@@ -1107,7 +1107,7 @@
|
|
|
1107
1107
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1108
1108
|
* See the License for the specific language governing permissions and
|
|
1109
1109
|
* limitations under the License.
|
|
1110
|
-
*/function Ky(e,t){return
|
|
1110
|
+
*/function Ky(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:sendVerificationCode",Ye(e,t))})}function qy(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithPhoneNumber",Ye(e,t))})}function Qy(e,t){return k(this,null,function*(){const n=yield En(e,"POST","/v1/accounts:signInWithPhoneNumber",Ye(e,t));if(n.temporaryProof)throw Si(e,"account-exists-with-different-credential",n);return n})}const Jy={USER_NOT_FOUND:"user-not-found"};function Xy(e,t){return k(this,null,function*(){const n=Object.assign(Object.assign({},t),{operation:"REAUTH"});return En(e,"POST","/v1/accounts:signInWithPhoneNumber",Ye(e,n),Jy)})}/**
|
|
1111
1111
|
* @license
|
|
1112
1112
|
* Copyright 2020 Google LLC
|
|
1113
1113
|
*
|
|
@@ -1287,7 +1287,7 @@
|
|
|
1287
1287
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1288
1288
|
* See the License for the specific language governing permissions and
|
|
1289
1289
|
* limitations under the License.
|
|
1290
|
-
*/function Hd(e,t){return
|
|
1290
|
+
*/function Hd(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signUp",Ye(e,t))})}/**
|
|
1291
1291
|
* @license
|
|
1292
1292
|
* Copyright 2020 Google LLC
|
|
1293
1293
|
*
|
|
@@ -1302,7 +1302,7 @@
|
|
|
1302
1302
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1303
1303
|
* See the License for the specific language governing permissions and
|
|
1304
1304
|
* limitations under the License.
|
|
1305
|
-
*/class Jt{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,n,r,i=!1){return
|
|
1305
|
+
*/class Jt{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,n,r,i=!1){return k(this,null,function*(){const o=yield kn._fromIdTokenResponse(t,r,i),a=Wd(r);return new Jt({user:o,providerId:a,_tokenResponse:r,operationType:n})})}static _forOperation(t,n,r){return k(this,null,function*(){yield t._updateTokensIfNecessary(r,!0);const i=Wd(r);return new Jt({user:t,providerId:i,_tokenResponse:r,operationType:n})})}}function Wd(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
|
|
1306
1306
|
* @license
|
|
1307
1307
|
* Copyright 2020 Google LLC
|
|
1308
1308
|
*
|
|
@@ -1317,7 +1317,7 @@
|
|
|
1317
1317
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1318
1318
|
* See the License for the specific language governing permissions and
|
|
1319
1319
|
* limitations under the License.
|
|
1320
|
-
*/function rx(e){return
|
|
1320
|
+
*/function rx(e){return k(this,null,function*(){var t;if(Ge(e.app))return Promise.reject(bt(e));const n=qe(e);if(yield n._initializationPromise,!((t=n.currentUser)===null||t===void 0)&&t.isAnonymous)return new Jt({user:n.currentUser,providerId:null,operationType:"signIn"});const r=yield Hd(n,{returnSecureToken:!0}),i=yield Jt._fromIdTokenResponse(n,"signIn",r,!0);return yield n._updateCurrentUser(i.user),i})}/**
|
|
1321
1321
|
* @license
|
|
1322
1322
|
* Copyright 2020 Google LLC
|
|
1323
1323
|
*
|
|
@@ -1362,7 +1362,7 @@
|
|
|
1362
1362
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1363
1363
|
* See the License for the specific language governing permissions and
|
|
1364
1364
|
* limitations under the License.
|
|
1365
|
-
*/function ix(e,t){return
|
|
1365
|
+
*/function ix(e,t){return k(this,null,function*(){const n=ke(e);yield Fo(!0,n,t);const{providerUserInfo:r}=yield uy(n.auth,{idToken:yield n.getIdToken(),deleteProvider:[t]}),i=Yd(r||[]);return n.providerData=n.providerData.filter(o=>i.has(o.providerId)),i.has("phone")||(n.phoneNumber=null),yield n.auth._persistUserIfCurrent(n),n})}function nl(e,t,n=!1){return k(this,null,function*(){const r=yield _n(e,t._linkToIdToken(e.auth,yield e.getIdToken()),n);return Jt._forOperation(e,"link",r)})}function Fo(e,t,n){return k(this,null,function*(){yield Ti(t);const r=Yd(t.providerData),i=e===!1?"provider-already-linked":"no-such-provider";ie(r.has(n)===e,t.auth,i)})}/**
|
|
1366
1366
|
* @license
|
|
1367
1367
|
* Copyright 2019 Google LLC
|
|
1368
1368
|
*
|
|
@@ -1377,7 +1377,7 @@
|
|
|
1377
1377
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1378
1378
|
* See the License for the specific language governing permissions and
|
|
1379
1379
|
* limitations under the License.
|
|
1380
|
-
*/function Kd(e,t,n=!1){return
|
|
1380
|
+
*/function Kd(e,t,n=!1){return k(this,null,function*(){const{auth:r}=e;if(Ge(r.app))return Promise.reject(bt(r));const i="reauthenticate";try{const o=yield _n(e,Gd(r,i,t,e),n);ie(o.idToken,r,"internal-error");const a=Mo(o.idToken);ie(a,r,"internal-error");const{sub:l}=a;return ie(e.uid===l,r,"user-mismatch"),Jt._forOperation(e,i,o)}catch(o){throw(o==null?void 0:o.code)==="auth/user-not-found"&&vt(r,"user-mismatch"),o}})}/**
|
|
1381
1381
|
* @license
|
|
1382
1382
|
* Copyright 2020 Google LLC
|
|
1383
1383
|
*
|
|
@@ -1392,7 +1392,7 @@
|
|
|
1392
1392
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1393
1393
|
* See the License for the specific language governing permissions and
|
|
1394
1394
|
* limitations under the License.
|
|
1395
|
-
*/function qd(e,t,n=!1){return
|
|
1395
|
+
*/function qd(e,t,n=!1){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r="signIn",i=yield Gd(e,r,t),o=yield Jt._fromIdTokenResponse(e,r,i);return n||(yield e._updateCurrentUser(o.user)),o})}function zo(e,t){return k(this,null,function*(){return qd(qe(e),t)})}function Qd(e,t){return k(this,null,function*(){const n=ke(e);return yield Fo(!1,n,t.providerId),nl(n,t)})}function Jd(e,t){return k(this,null,function*(){return Kd(ke(e),t)})}/**
|
|
1396
1396
|
* @license
|
|
1397
1397
|
* Copyright 2020 Google LLC
|
|
1398
1398
|
*
|
|
@@ -1407,7 +1407,7 @@
|
|
|
1407
1407
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1408
1408
|
* See the License for the specific language governing permissions and
|
|
1409
1409
|
* limitations under the License.
|
|
1410
|
-
*/function ox(e,t){return
|
|
1410
|
+
*/function ox(e,t){return k(this,null,function*(){return En(e,"POST","/v1/accounts:signInWithCustomToken",Ye(e,t))})}/**
|
|
1411
1411
|
* @license
|
|
1412
1412
|
* Copyright 2020 Google LLC
|
|
1413
1413
|
*
|
|
@@ -1422,7 +1422,7 @@
|
|
|
1422
1422
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1423
1423
|
* See the License for the specific language governing permissions and
|
|
1424
1424
|
* limitations under the License.
|
|
1425
|
-
*/function ax(e,t){return
|
|
1425
|
+
*/function ax(e,t){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const n=qe(e),r=yield ox(n,{token:t,returnSecureToken:!0}),i=yield Jt._fromIdTokenResponse(n,"signIn",r);return yield n._updateCurrentUser(i.user),i})}/**
|
|
1426
1426
|
* @license
|
|
1427
1427
|
* Copyright 2020 Google LLC
|
|
1428
1428
|
*
|
|
@@ -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 ol(e){return
|
|
1470
|
+
*/function ol(e){return k(this,null,function*(){const t=qe(e);t._getPasswordPolicyInternal()&&(yield t._updatePasswordPolicy())})}function sx(e,t,n){return k(this,null,function*(){const r=qe(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};n&&jo(r,i,n),yield Pi(r,i,"getOobCode",Vy)})}function lx(e,t,n){return k(this,null,function*(){yield Ud(ke(e),{oobCode:t,newPassword:n}).catch(r=>k(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&ol(e),r}))})}function cx(e,t){return k(this,null,function*(){yield Fy(ke(e),{oobCode:t})})}function Xd(e,t){return k(this,null,function*(){const n=ke(e),r=yield Ud(n,{oobCode:t}),i=r.requestType;switch(ie(i,n,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":ie(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":ie(r.mfaInfo,n,"internal-error");default:ie(r.email,n,"internal-error")}let o=null;return r.mfaInfo&&(o=Oi._fromServerResponse(qe(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 ux(e,t){return k(this,null,function*(){const{data:n}=yield Xd(ke(e),t);return n.email})}function dx(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e),a=yield Pi(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",Hd).catch(s=>{throw s.code==="auth/password-does-not-meet-requirements"&&ol(e),s}),l=yield Jt._fromIdTokenResponse(r,"signIn",a);return yield r._updateCurrentUser(l.user),l})}function fx(e,t,n){return Ge(e.app)?Promise.reject(bt(e)):zo(ke(e),qn.credential(t,n)).catch(r=>k(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&ol(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 hx(e,t,n){return
|
|
1485
|
+
*/function hx(e,t,n){return k(this,null,function*(){const r=qe(e),i={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};function o(a,l){ie(l.handleCodeInApp,r,"argument-error"),l&&jo(r,a,l)}o(i,n),yield Pi(r,i,"getOobCode",Uy)})}function px(e,t){const n=Bo.parseLink(t);return(n==null?void 0:n.operation)==="EMAIL_SIGNIN"}function gx(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=ke(e),i=qn.credentialWithLink(t,n||wi());return ie(i._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),zo(r,i)})}/**
|
|
1486
1486
|
* @license
|
|
1487
1487
|
* Copyright 2020 Google LLC
|
|
1488
1488
|
*
|
|
@@ -1497,7 +1497,7 @@
|
|
|
1497
1497
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1498
1498
|
* See the License for the specific language governing permissions and
|
|
1499
1499
|
* limitations under the License.
|
|
1500
|
-
*/function mx(e,t){return
|
|
1500
|
+
*/function mx(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:createAuthUri",Ye(e,t))})}/**
|
|
1501
1501
|
* @license
|
|
1502
1502
|
* Copyright 2020 Google LLC
|
|
1503
1503
|
*
|
|
@@ -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 vx(e,t){return
|
|
1515
|
+
*/function vx(e,t){return k(this,null,function*(){const n=Qs()?wi():"http://localhost",r={identifier:t,continueUri:n},{signinMethods:i}=yield mx(ke(e),r);return i||[]})}function bx(e,t){return k(this,null,function*(){const n=ke(e),i={requestType:"VERIFY_EMAIL",idToken:yield e.getIdToken()};t&&jo(n.auth,i,t);const{email:o}=yield jy(n.auth,i);o!==e.email&&(yield e.reload())})}function yx(e,t,n){return k(this,null,function*(){const r=ke(e),o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:yield e.getIdToken(),newEmail:t};n&&jo(r.auth,o,n);const{email:a}=yield Hy(r.auth,o);a!==e.email&&(yield e.reload())})}/**
|
|
1516
1516
|
* @license
|
|
1517
1517
|
* Copyright 2020 Google LLC
|
|
1518
1518
|
*
|
|
@@ -1527,7 +1527,7 @@
|
|
|
1527
1527
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1528
1528
|
* See the License for the specific language governing permissions and
|
|
1529
1529
|
* limitations under the License.
|
|
1530
|
-
*/function xx(e,t){return
|
|
1530
|
+
*/function xx(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",t)})}/**
|
|
1531
1531
|
* @license
|
|
1532
1532
|
* Copyright 2020 Google LLC
|
|
1533
1533
|
*
|
|
@@ -1542,7 +1542,7 @@
|
|
|
1542
1542
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1543
1543
|
* See the License for the specific language governing permissions and
|
|
1544
1544
|
* limitations under the License.
|
|
1545
|
-
*/function Cx(r,i){return
|
|
1545
|
+
*/function Cx(r,i){return k(this,arguments,function*(e,{displayName:t,photoURL:n}){if(t===void 0&&n===void 0)return;const o=ke(e),l={idToken:yield o.getIdToken(),displayName:t,photoUrl:n,returnSecureToken:!0},s=yield _n(o,xx(o.auth,l));o.displayName=s.displayName||null,o.photoURL=s.photoUrl||null;const c=o.providerData.find(({providerId:d})=>d==="password");c&&(c.displayName=o.displayName,c.photoURL=o.photoURL),yield o._updateTokensIfNecessary(s)})}function wx(e,t){const n=ke(e);return Ge(n.auth.app)?Promise.reject(bt(n.auth)):Zd(n,t,null)}function Ix(e,t){return Zd(ke(e),null,t)}function Zd(e,t,n){return k(this,null,function*(){const{auth:r}=e,o={idToken:yield e.getIdToken(),returnSecureToken:!0};t&&(o.email=t),n&&(o.password=n);const a=yield _n(e,$y(r,o));yield e._updateTokensIfNecessary(a,!0)})}/**
|
|
1546
1546
|
* @license
|
|
1547
1547
|
* Copyright 2019 Google LLC
|
|
1548
1548
|
*
|
|
@@ -1587,7 +1587,7 @@
|
|
|
1587
1587
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1588
1588
|
* See the License for the specific language governing permissions and
|
|
1589
1589
|
* limitations under the License.
|
|
1590
|
-
*/class al{constructor(t,n,r){this.session=t,this.hints=n,this.signInResolver=r}static _fromError(t,n){const r=qe(t),i=n.customData._serverResponse,o=(i.mfaInfo||[]).map(l=>Oi._fromServerResponse(r,l));ie(i.mfaPendingCredential,r,"internal-error");const a=fr._fromMfaPendingCredential(i.mfaPendingCredential);return new al(a,o,l=>
|
|
1590
|
+
*/class al{constructor(t,n,r){this.session=t,this.hints=n,this.signInResolver=r}static _fromError(t,n){const r=qe(t),i=n.customData._serverResponse,o=(i.mfaInfo||[]).map(l=>Oi._fromServerResponse(r,l));ie(i.mfaPendingCredential,r,"internal-error");const a=fr._fromMfaPendingCredential(i.mfaPendingCredential);return new al(a,o,l=>k(this,null,function*(){const s=yield l._process(r,a);delete i.mfaInfo,delete i.mfaPendingCredential;const c=Object.assign(Object.assign({},i),{idToken:s.idToken,refreshToken:s.refreshToken});switch(n.operationType){case"signIn":const d=yield Jt._fromIdTokenResponse(r,n.operationType,c);return yield r._updateCurrentUser(d.user),d;case"reauthenticate":return ie(n.user,r,"internal-error"),Jt._forOperation(n.user,n.operationType,c);default:vt(r,"internal-error")}}))}resolveSignIn(t){return k(this,null,function*(){const n=t;return this.signInResolver(n)})}}function Ox(e,t){var n;const r=ke(e),i=t;return ie(t.customData.operationType,r,"argument-error"),ie((n=i.customData._serverResponse)===null||n===void 0?void 0:n.mfaPendingCredential,r,"argument-error"),al._fromError(r,i)}/**
|
|
1591
1591
|
* @license
|
|
1592
1592
|
* Copyright 2020 Google LLC
|
|
1593
1593
|
*
|
|
@@ -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 Rx(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:start",Ye(e,t))}function Mx(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:finalize",Ye(e,t))}function Lx(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:withdraw",Ye(e,t))}class sl{constructor(t){this.user=t,this.enrolledFactors=[],t._onReload(n=>{n.mfaInfo&&(this.enrolledFactors=n.mfaInfo.map(r=>Oi._fromServerResponse(t.auth,r)))})}static _fromUser(t){return new sl(t)}getSession(){return
|
|
1605
|
+
*/function Rx(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:start",Ye(e,t))}function Mx(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:finalize",Ye(e,t))}function Lx(e,t){return Ke(e,"POST","/v2/accounts/mfaEnrollment:withdraw",Ye(e,t))}class sl{constructor(t){this.user=t,this.enrolledFactors=[],t._onReload(n=>{n.mfaInfo&&(this.enrolledFactors=n.mfaInfo.map(r=>Oi._fromServerResponse(t.auth,r)))})}static _fromUser(t){return new sl(t)}getSession(){return k(this,null,function*(){return fr._fromIdtoken(yield this.user.getIdToken(),this.user)})}enroll(t,n){return k(this,null,function*(){const r=t,i=yield this.getSession(),o=yield _n(this.user,r._process(this.user.auth,i,n));return yield this.user._updateTokensIfNecessary(o),this.user.reload()})}unenroll(t){return k(this,null,function*(){const n=typeof t=="string"?t:t.uid,r=yield this.user.getIdToken();try{const i=yield _n(this.user,Lx(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 ll=new WeakMap;function Bx(e){const t=ke(e);return ll.has(t)||ll.set(t,sl._fromUser(t)),ll.get(t)}const Vo="__sak";/**
|
|
1606
1606
|
* @license
|
|
1607
1607
|
* Copyright 2019 Google LLC
|
|
1608
1608
|
*
|
|
@@ -1632,7 +1632,7 @@
|
|
|
1632
1632
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1633
1633
|
* See the License for the specific language governing permissions and
|
|
1634
1634
|
* limitations under the License.
|
|
1635
|
-
*/const $x=1e3,Nx=10;class Nr extends tf{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Bd(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&t(n,i,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((a,l,s)=>{this.notifyListeners(a,s)});return}const r=t.key;n?this.detachListener():this.stopPolling();const i=()=>{const a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},o=this.storage.getItem(r);xy()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(i,Nx):i()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},$x)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(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.detachListener(),this.stopPolling())}_set(t,n){return
|
|
1635
|
+
*/const $x=1e3,Nx=10;class Nr extends tf{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Bd(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&t(n,i,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((a,l,s)=>{this.notifyListeners(a,s)});return}const r=t.key;n?this.detachListener():this.stopPolling();const i=()=>{const a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},o=this.storage.getItem(r);xy()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(i,Nx):i()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},$x)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(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.detachListener(),this.stopPolling())}_set(t,n){return k(this,null,function*(){yield Ir(Nr.prototype,this,"_set").call(this,t,n),this.localCache[t]=JSON.stringify(n)})}_get(t){return k(this,null,function*(){const n=yield Ir(Nr.prototype,this,"_get").call(this,t);return this.localCache[t]=JSON.stringify(n),n})}_remove(t){return k(this,null,function*(){yield Ir(Nr.prototype,this,"_remove").call(this,t),delete this.localCache[t]})}}Nr.type="LOCAL";const Uo=Nr;/**
|
|
1636
1636
|
* @license
|
|
1637
1637
|
* Copyright 2020 Google LLC
|
|
1638
1638
|
*
|
|
@@ -1662,7 +1662,7 @@
|
|
|
1662
1662
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1663
1663
|
* See the License for the specific language governing permissions and
|
|
1664
1664
|
* limitations under the License.
|
|
1665
|
-
*/function Fx(e){return Promise.all(e.map(t=>
|
|
1665
|
+
*/function Fx(e){return Promise.all(e.map(t=>k(this,null,function*(){try{return{fulfilled:!0,value:yield t}}catch(n){return{fulfilled:!1,reason:n}}})))}/**
|
|
1666
1666
|
* @license
|
|
1667
1667
|
* Copyright 2019 Google LLC
|
|
1668
1668
|
*
|
|
@@ -1677,7 +1677,7 @@
|
|
|
1677
1677
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1678
1678
|
* See the License for the specific language governing permissions and
|
|
1679
1679
|
* limitations under the License.
|
|
1680
|
-
*/class Ho{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(i=>i.isListeningto(t));if(n)return n;const r=new Ho(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}handleEvent(t){return
|
|
1680
|
+
*/class Ho{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(i=>i.isListeningto(t));if(n)return n;const r=new Ho(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}handleEvent(t){return k(this,null,function*(){const n=t,{eventId:r,eventType:i,data:o}=n.data,a=this.handlersMap[i];if(!(a!=null&&a.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const l=Array.from(a).map(c=>k(this,null,function*(){return c(n.origin,o)})),s=yield Fx(l);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:s})})}_subscribe(t,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(n)}_unsubscribe(t,n){this.handlersMap[t]&&n&&this.handlersMap[t].delete(n),(!n||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Ho.receivers=[];/**
|
|
1681
1681
|
* @license
|
|
1682
1682
|
* Copyright 2020 Google LLC
|
|
1683
1683
|
*
|
|
@@ -1707,7 +1707,7 @@
|
|
|
1707
1707
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1708
1708
|
* See the License for the specific language governing permissions and
|
|
1709
1709
|
* limitations under the License.
|
|
1710
|
-
*/class zx{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}_send(t,n,r=50){return
|
|
1710
|
+
*/class zx{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}_send(t,n,r=50){return k(this,null,function*(){const i=typeof MessageChannel!="undefined"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let o,a;return new Promise((l,s)=>{const c=Ri("",20);i.port1.start();const d=setTimeout(()=>{s(new Error("unsupported_event"))},r);a={messageChannel:i,onMessage(f){const h=f;if(h.data.eventId===c)switch(h.data.status){case"ack":clearTimeout(d),o=setTimeout(()=>{s(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),l(h.data.response);break;default:clearTimeout(d),clearTimeout(o),s(new Error("invalid_response"));break}}},this.handlers.add(a),i.port1.addEventListener("message",a.onMessage),this.target.postMessage({eventType:t,eventId:c,data:n},[i.port2])}).finally(()=>{a&&this.removeMessageHandler(a)})})}}/**
|
|
1711
1711
|
* @license
|
|
1712
1712
|
* Copyright 2020 Google LLC
|
|
1713
1713
|
*
|
|
@@ -1737,7 +1737,7 @@
|
|
|
1737
1737
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1738
1738
|
* See the License for the specific language governing permissions and
|
|
1739
1739
|
* limitations under the License.
|
|
1740
|
-
*/function cl(){return typeof st().WorkerGlobalScope!="undefined"&&typeof st().importScripts=="function"}function Vx(){return
|
|
1740
|
+
*/function cl(){return typeof st().WorkerGlobalScope!="undefined"&&typeof st().importScripts=="function"}function Vx(){return k(this,null,function*(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(yield navigator.serviceWorker.ready).active}catch(e){return null}})}function Ux(){var e;return((e=navigator==null?void 0:navigator.serviceWorker)===null||e===void 0?void 0:e.controller)||null}function Hx(){return cl()?self:null}/**
|
|
1741
1741
|
* @license
|
|
1742
1742
|
* Copyright 2019 Google LLC
|
|
1743
1743
|
*
|
|
@@ -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 rf="firebaseLocalStorageDb",Wx=1,Wo="firebaseLocalStorage",of="fbase_key";class Mi{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 Go(e,t){return e.transaction([Wo],t?"readwrite":"readonly").objectStore(Wo)}function Gx(){const e=indexedDB.deleteDatabase(rf);return new Mi(e).toPromise()}function ul(){const e=indexedDB.open(rf,Wx);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(Wo,{keyPath:of})}catch(i){n(i)}}),e.addEventListener("success",()=>
|
|
1755
|
+
*/const rf="firebaseLocalStorageDb",Wx=1,Wo="firebaseLocalStorage",of="fbase_key";class Mi{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 Go(e,t){return e.transaction([Wo],t?"readwrite":"readonly").objectStore(Wo)}function Gx(){const e=indexedDB.deleteDatabase(rf);return new Mi(e).toPromise()}function ul(){const e=indexedDB.open(rf,Wx);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(Wo,{keyPath:of})}catch(i){n(i)}}),e.addEventListener("success",()=>k(this,null,function*(){const r=e.result;r.objectStoreNames.contains(Wo)?t(r):(r.close(),yield Gx(),t(yield ul()))}))})}function af(e,t,n){return k(this,null,function*(){const r=Go(e,!0).put({[of]:t,value:n});return new Mi(r).toPromise()})}function Yx(e,t){return k(this,null,function*(){const n=Go(e,!1).get(t),r=yield new Mi(n).toPromise();return r===void 0?null:r.value})}function sf(e,t){const n=Go(e,!0).delete(t);return new Mi(n).toPromise()}const Kx=800,qx=3;class lf{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 k(this,null,function*(){return this.db?this.db:(this.db=yield ul(),this.db)})}_withRetries(t){return k(this,null,function*(){let n=0;for(;;)try{const r=yield this._openDb();return yield t(r)}catch(r){if(n++>qx)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return k(this,null,function*(){return cl()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return k(this,null,function*(){this.receiver=Ho._getInstance(Hx()),this.receiver._subscribe("keyChanged",(t,n)=>k(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(n.key)}})),this.receiver._subscribe("ping",(t,n)=>k(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return k(this,null,function*(){var t,n;if(this.activeServiceWorker=yield Vx(),!this.activeServiceWorker)return;this.sender=new zx(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 k(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||Ux()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch(n){}})}_isAvailable(){return k(this,null,function*(){try{if(!indexedDB)return!1;const t=yield ul();return yield af(t,Vo,"1"),yield sf(t,Vo),!0}catch(t){}return!1})}_withPendingWrite(t){return k(this,null,function*(){this.pendingWrites++;try{yield t()}finally{this.pendingWrites--}})}_set(t,n){return k(this,null,function*(){return this._withPendingWrite(()=>k(this,null,function*(){return yield this._withRetries(r=>af(r,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)}))})}_get(t){return k(this,null,function*(){const n=yield this._withRetries(r=>Yx(r,t));return this.localCache[t]=n,n})}_remove(t){return k(this,null,function*(){return this._withPendingWrite(()=>k(this,null,function*(){return yield this._withRetries(n=>sf(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)}))})}_poll(){return k(this,null,function*(){const t=yield this._withRetries(i=>{const o=Go(i,!1).getAll();return new Mi(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(()=>k(this,null,function*(){return this._poll()}),Kx)}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()}}lf.type="LOCAL";const Fr=lf;/**
|
|
1756
1756
|
* @license
|
|
1757
1757
|
* Copyright 2020 Google LLC
|
|
1758
1758
|
*
|
|
@@ -1782,7 +1782,7 @@
|
|
|
1782
1782
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1783
1783
|
* See the License for the specific language governing permissions and
|
|
1784
1784
|
* limitations under the License.
|
|
1785
|
-
*/const Xx=500,Zx=6e4,Yo=1e12;class eC{constructor(t){this.auth=t,this.counter=Yo,this._widgets=new Map}render(t,n){const r=this.counter;return this._widgets.set(r,new tC(t,this.auth.name,n||{})),this.counter++,r}reset(t){var n;const r=t||Yo;(n=this._widgets.get(r))===null||n===void 0||n.delete(),this._widgets.delete(r)}getResponse(t){var n;const r=t||Yo;return((n=this._widgets.get(r))===null||n===void 0?void 0:n.getResponse())||""}execute(t){return
|
|
1785
|
+
*/const Xx=500,Zx=6e4,Yo=1e12;class eC{constructor(t){this.auth=t,this.counter=Yo,this._widgets=new Map}render(t,n){const r=this.counter;return this._widgets.set(r,new tC(t,this.auth.name,n||{})),this.counter++,r}reset(t){var n;const r=t||Yo;(n=this._widgets.get(r))===null||n===void 0||n.delete(),this._widgets.delete(r)}getResponse(t){var n;const r=t||Yo;return((n=this._widgets.get(r))===null||n===void 0?void 0:n.getResponse())||""}execute(t){return k(this,null,function*(){var n;const r=t||Yo;return(n=this._widgets.get(r))===null||n===void 0||n.execute(),""})}}class tC{constructor(t,n,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const i=typeof t=="string"?document.getElementById(t):t;ie(i,"argument-error",{appName:n}),this.container=i,this.isVisible=this.params.size!=="invisible",this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),!this.timerId&&(this.timerId=window.setTimeout(()=>{this.responseToken=nC(50);const{callback:t,"expired-callback":n}=this.params;if(t)try{t(this.responseToken)}catch(r){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,n)try{n()}catch(r){}this.isVisible&&this.execute()},Zx)},Xx))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}function nC(e){const t=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let r=0;r<e;r++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}/**
|
|
1786
1786
|
* @license
|
|
1787
1787
|
* Copyright 2020 Google LLC
|
|
1788
1788
|
*
|
|
@@ -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 dl=Fd("rcb"),rC=new Ii(3e4,6e4);class iC{constructor(){var t;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((t=st().grecaptcha)===null||t===void 0)&&t.render)}load(t,n=""){return ie(oC(n),t,"argument-error"),this.shouldResolveImmediately(n)&&wd(st().grecaptcha)?Promise.resolve(st().grecaptcha):new Promise((r,i)=>{const o=st().setTimeout(()=>{i(ht(t,"network-request-failed"))},rC.get());st()[dl]=()=>{st().clearTimeout(o),delete st()[dl];const l=st().grecaptcha;if(!l||!wd(l)){i(ht(t,"internal-error"));return}const s=l.render;l.render=(c,d)=>{const f=s(c,d);return this.counter++,f},this.hostLanguage=n,r(l)};const a=`${Ey()}?${Sr({onload:dl,render:"explicit",hl:n})}`;el(a).catch(()=>{clearTimeout(o),i(ht(t,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(t){var n;return!!(!((n=st().grecaptcha)===null||n===void 0)&&n.render)&&(t===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}function oC(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}class aC{load(t){return
|
|
1800
|
+
*/const dl=Fd("rcb"),rC=new Ii(3e4,6e4);class iC{constructor(){var t;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((t=st().grecaptcha)===null||t===void 0)&&t.render)}load(t,n=""){return ie(oC(n),t,"argument-error"),this.shouldResolveImmediately(n)&&wd(st().grecaptcha)?Promise.resolve(st().grecaptcha):new Promise((r,i)=>{const o=st().setTimeout(()=>{i(ht(t,"network-request-failed"))},rC.get());st()[dl]=()=>{st().clearTimeout(o),delete st()[dl];const l=st().grecaptcha;if(!l||!wd(l)){i(ht(t,"internal-error"));return}const s=l.render;l.render=(c,d)=>{const f=s(c,d);return this.counter++,f},this.hostLanguage=n,r(l)};const a=`${Ey()}?${Sr({onload:dl,render:"explicit",hl:n})}`;el(a).catch(()=>{clearTimeout(o),i(ht(t,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(t){var n;return!!(!((n=st().grecaptcha)===null||n===void 0)&&n.render)&&(t===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}function oC(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}class aC{load(t){return k(this,null,function*(){return new eC(t)})}clearedOneInstance(){}}/**
|
|
1801
1801
|
* @license
|
|
1802
1802
|
* Copyright 2020 Google LLC
|
|
1803
1803
|
*
|
|
@@ -1812,7 +1812,7 @@
|
|
|
1812
1812
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1813
1813
|
* See the License for the specific language governing permissions and
|
|
1814
1814
|
* limitations under the License.
|
|
1815
|
-
*/const cf="recaptcha",sC={theme:"light",type:"image"};let lC=class{constructor(t,n,r=Object.assign({},sC)){this.parameters=r,this.type=cf,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=qe(t),this.isInvisible=this.parameters.size==="invisible",ie(typeof document!="undefined",this.auth,"operation-not-supported-in-this-environment");const i=typeof n=="string"?document.getElementById(n):n;ie(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new aC:new iC,this.validateStartingState()}verify(){return
|
|
1815
|
+
*/const cf="recaptcha",sC={theme:"light",type:"image"};let lC=class{constructor(t,n,r=Object.assign({},sC)){this.parameters=r,this.type=cf,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=qe(t),this.isInvisible=this.parameters.size==="invisible",ie(typeof document!="undefined",this.auth,"operation-not-supported-in-this-environment");const i=typeof n=="string"?document.getElementById(n):n;ie(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new aC:new iC,this.validateStartingState()}verify(){return k(this,null,function*(){this.assertNotDestroyed();const t=yield this.render(),n=this.getAssertedRecaptcha(),r=n.getResponse(t);return r||new Promise(i=>{const o=a=>{a&&(this.tokenChangeListeners.delete(o),i(a))};this.tokenChangeListeners.add(o),this.isInvisible&&n.execute(t)})})}render(){try{this.assertNotDestroyed()}catch(t){return Promise.reject(t)}return this.renderPromise?this.renderPromise:(this.renderPromise=this.makeRenderPromise().catch(t=>{throw this.renderPromise=null,t}),this.renderPromise)}_reset(){this.assertNotDestroyed(),this.widgetId!==null&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(t=>{this.container.removeChild(t)})}validateStartingState(){ie(!this.parameters.sitekey,this.auth,"argument-error"),ie(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),ie(typeof document!="undefined",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(t){return n=>{if(this.tokenChangeListeners.forEach(r=>r(n)),typeof t=="function")t(n);else if(typeof t=="string"){const r=st()[t];typeof r=="function"&&r(n)}}}assertNotDestroyed(){ie(!this.destroyed,this.auth,"internal-error")}makeRenderPromise(){return k(this,null,function*(){if(yield this.init(),!this.widgetId){let t=this.container;if(!this.isInvisible){const n=document.createElement("div");t.appendChild(n),t=n}this.widgetId=this.getAssertedRecaptcha().render(t,this.parameters)}return this.widgetId})}init(){return k(this,null,function*(){ie(Qs()&&!cl(),this.auth,"internal-error"),yield cC(),this.recaptcha=yield this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const t=yield sy(this.auth);ie(t,this.auth,"internal-error"),this.parameters.sitekey=t})}getAssertedRecaptcha(){return ie(this.recaptcha,this.auth,"internal-error"),this.recaptcha}};function cC(){let e=null;return new Promise(t=>{if(document.readyState==="complete"){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})}/**
|
|
1816
1816
|
* @license
|
|
1817
1817
|
* Copyright 2020 Google LLC
|
|
1818
1818
|
*
|
|
@@ -1827,7 +1827,7 @@
|
|
|
1827
1827
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1828
1828
|
* See the License for the specific language governing permissions and
|
|
1829
1829
|
* limitations under the License.
|
|
1830
|
-
*/class fl{constructor(t,n){this.verificationId=t,this.onConfirmation=n}confirm(t){const n=dr._fromVerification(this.verificationId,t);return this.onConfirmation(n)}}function uC(e,t,n){return
|
|
1830
|
+
*/class fl{constructor(t,n){this.verificationId=t,this.onConfirmation=n}confirm(t){const n=dr._fromVerification(this.verificationId,t);return this.onConfirmation(n)}}function uC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e),i=yield Ko(r,t,ke(n));return new fl(i,o=>zo(r,o))})}function dC(e,t,n){return k(this,null,function*(){const r=ke(e);yield Fo(!1,r,"phone");const i=yield Ko(r.auth,t,ke(n));return new fl(i,o=>Qd(r,o))})}function fC(e,t,n){return k(this,null,function*(){const r=ke(e);if(Ge(r.auth.app))return Promise.reject(bt(r.auth));const i=yield Ko(r.auth,t,ke(n));return new fl(i,o=>Jd(r,o))})}function Ko(e,t,n){return k(this,null,function*(){var r;const i=yield n.verify();try{ie(typeof i=="string",e,"argument-error"),ie(n.type===cf,e,"argument-error");let o;if(typeof t=="string"?o={phoneNumber:t}:o=t,"session"in o){const a=o.session;if("phoneNumber"in o)return ie(a.type==="enroll",e,"internal-error"),(yield Rx(e,{idToken:a.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}})).phoneSessionInfo.sessionInfo;{ie(a.type==="signin",e,"internal-error");const l=((r=o.multiFactorHint)===null||r===void 0?void 0:r.uid)||o.multiFactorUid;return ie(l,e,"missing-multi-factor-info"),(yield Qx(e,{mfaPendingCredential:a.credential,mfaEnrollmentId:l,phoneSignInInfo:{recaptchaToken:i}})).phoneResponseInfo.sessionInfo}}else{const{sessionInfo:a}=yield Ky(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return a}}finally{n._reset()}})}function hC(e,t){return k(this,null,function*(){const n=ke(e);if(Ge(n.auth.app))return Promise.reject(bt(n.auth));yield nl(n,t)})}/**
|
|
1831
1831
|
* @license
|
|
1832
1832
|
* Copyright 2020 Google LLC
|
|
1833
1833
|
*
|
|
@@ -1872,7 +1872,7 @@
|
|
|
1872
1872
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1873
1873
|
* See the License for the specific language governing permissions and
|
|
1874
1874
|
* limitations under the License.
|
|
1875
|
-
*/class hl extends Rr{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Pn(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Pn(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Pn(t,this._buildIdpRequest())}_buildIdpRequest(t){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(n.idToken=t),n}}function pC(e){return qd(e.auth,new hl(e),e.bypassAuthState)}function gC(e){const{auth:t,user:n}=e;return ie(n,t,"internal-error"),Kd(n,new hl(e),e.bypassAuthState)}function mC(e){return
|
|
1875
|
+
*/class hl extends Rr{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Pn(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Pn(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Pn(t,this._buildIdpRequest())}_buildIdpRequest(t){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(n.idToken=t),n}}function pC(e){return qd(e.auth,new hl(e),e.bypassAuthState)}function gC(e){const{auth:t,user:n}=e;return ie(n,t,"internal-error"),Kd(n,new hl(e),e.bypassAuthState)}function mC(e){return k(this,null,function*(){const{auth:t,user:n}=e;return ie(n,t,"internal-error"),nl(n,new hl(e),e.bypassAuthState)})}/**
|
|
1876
1876
|
* @license
|
|
1877
1877
|
* Copyright 2020 Google LLC
|
|
1878
1878
|
*
|
|
@@ -1887,7 +1887,7 @@
|
|
|
1887
1887
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1888
1888
|
* See the License for the specific language governing permissions and
|
|
1889
1889
|
* limitations under the License.
|
|
1890
|
-
*/class uf{constructor(t,n,r,i,o=!1){this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise((t,n)=>
|
|
1890
|
+
*/class uf{constructor(t,n,r,i,o=!1){this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise((t,n)=>k(this,null,function*(){this.pendingPromise={resolve:t,reject:n};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}}))}onAuthEvent(t){return k(this,null,function*(){const{urlResponse:n,sessionId:r,postBody:i,tenantId:o,error:a,type:l}=t;if(a){this.reject(a);return}const s={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(l)(s))}catch(c){this.reject(c)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return pC;case"linkViaPopup":case"linkViaRedirect":return mC;case"reauthViaPopup":case"reauthViaRedirect":return gC;default:vt(this.auth,"internal-error")}}resolve(t){an(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){an(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
|
|
1891
1891
|
* @license
|
|
1892
1892
|
* Copyright 2020 Google LLC
|
|
1893
1893
|
*
|
|
@@ -1902,7 +1902,7 @@
|
|
|
1902
1902
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1903
1903
|
* See the License for the specific language governing permissions and
|
|
1904
1904
|
* limitations under the License.
|
|
1905
|
-
*/const vC=new Ii(2e3,1e4);function bC(e,t,n){return
|
|
1905
|
+
*/const vC=new Ii(2e3,1e4);function bC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(ht(e,"operation-not-supported-in-this-environment"));const r=qe(e);kr(e,t,Dn);const i=pr(r,n);return new On(r,"signInViaPopup",t,i).executeNotNull()})}function yC(e,t,n){return k(this,null,function*(){const r=ke(e);if(Ge(r.auth.app))return Promise.reject(ht(r.auth,"operation-not-supported-in-this-environment"));kr(r.auth,t,Dn);const i=pr(r.auth,n);return new On(r.auth,"reauthViaPopup",t,i,r).executeNotNull()})}function xC(e,t,n){return k(this,null,function*(){const r=ke(e);kr(r.auth,t,Dn);const i=pr(r.auth,n);return new On(r.auth,"linkViaPopup",t,i,r).executeNotNull()})}class On extends uf{constructor(t,n,r,i,o){super(t,n,i,o),this.provider=r,this.authWindow=null,this.pollId=null,On.currentPopupAction&&On.currentPopupAction.cancel(),On.currentPopupAction=this}executeNotNull(){return k(this,null,function*(){const t=yield this.execute();return ie(t,this.auth,"internal-error"),t})}onExecution(){return k(this,null,function*(){an(this.filter.length===1,"Popup operations only handle one event");const t=Ri();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(ht(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var t;return((t=this.authWindow)===null||t===void 0?void 0:t.associatedEvent)||null}cancel(){this.reject(ht(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,On.currentPopupAction=null}pollUserCancellation(){const t=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(ht(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,vC.get())};t()}}On.currentPopupAction=null;/**
|
|
1906
1906
|
* @license
|
|
1907
1907
|
* Copyright 2020 Google LLC
|
|
1908
1908
|
*
|
|
@@ -1917,7 +1917,7 @@
|
|
|
1917
1917
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1918
1918
|
* See the License for the specific language governing permissions and
|
|
1919
1919
|
* limitations under the License.
|
|
1920
|
-
*/const CC="pendingRedirect",Li=new Map;class Bi extends uf{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}execute(){return
|
|
1920
|
+
*/const CC="pendingRedirect",Li=new Map;class Bi extends uf{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}execute(){return k(this,null,function*(){let t=Li.get(this.auth._key());if(!t){try{const r=(yield wC(this.resolver,this.auth))?yield Ir(Bi.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(r)}catch(n){t=()=>Promise.reject(n)}Li.set(this.auth._key(),t)}return this.bypassAuthState||Li.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return k(this,null,function*(){if(t.type==="signInViaRedirect")return Ir(Bi.prototype,this,"onAuthEvent").call(this,t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const n=yield this.auth._redirectUserForId(t.eventId);if(n)return this.user=n,Ir(Bi.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return k(this,null,function*(){})}cleanUp(){}}function wC(e,t){return k(this,null,function*(){const n=ff(t),r=df(e);if(!(yield r._isAvailable()))return!1;const i=(yield r._get(n))==="true";return yield r._remove(n),i})}function pl(e,t){return k(this,null,function*(){return df(e)._set(ff(t),"true")})}function IC(){Li.clear()}function gl(e,t){Li.set(e._key(),t)}function df(e){return Vt(e._redirectPersistence)}function ff(e){return ur(CC,e.config.apiKey,e.name)}/**
|
|
1921
1921
|
* @license
|
|
1922
1922
|
* Copyright 2020 Google LLC
|
|
1923
1923
|
*
|
|
@@ -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 SC(e,t,n){return AC(e,t,n)}function AC(e,t,n){return
|
|
1935
|
+
*/function SC(e,t,n){return AC(e,t,n)}function AC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e);kr(e,t,Dn),yield r._initializationPromise;const i=pr(r,n);return yield pl(i,r),i._openRedirect(r,t,"signInViaRedirect")})}function TC(e,t,n){return EC(e,t,n)}function EC(e,t,n){return k(this,null,function*(){const r=ke(e);if(kr(r.auth,t,Dn),Ge(r.auth.app))return Promise.reject(bt(r.auth));yield r.auth._initializationPromise;const i=pr(r.auth,n);yield pl(i,r.auth);const o=yield hf(r);return i._openRedirect(r.auth,t,"reauthViaRedirect",o)})}function _C(e,t,n){return kC(e,t,n)}function kC(e,t,n){return k(this,null,function*(){const r=ke(e);kr(r.auth,t,Dn),yield r.auth._initializationPromise;const i=pr(r.auth,n);yield Fo(!1,r,t.providerId),yield pl(i,r.auth);const o=yield hf(r);return i._openRedirect(r.auth,t,"linkViaRedirect",o)})}function PC(e,t){return k(this,null,function*(){return yield qe(e)._initializationPromise,qo(e,t,!1)})}function qo(e,t,n=!1){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=qe(e),i=pr(r,t),a=yield new Bi(r,i,n).execute();return a&&!n&&(delete a.user._redirectEventId,yield r._persistUserIfCurrent(a.user),yield r._setRedirectUser(null,t)),a})}function hf(e){return k(this,null,function*(){const t=Ri(`${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
|
*
|
|
@@ -1962,7 +1962,7 @@
|
|
|
1962
1962
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1963
1963
|
* See the License for the specific language governing permissions and
|
|
1964
1964
|
* limitations under the License.
|
|
1965
|
-
*/function vf(n){return
|
|
1965
|
+
*/function vf(n){return k(this,arguments,function*(e,t={}){return Ke(e,"GET","/v1/projects",t)})}/**
|
|
1966
1966
|
* @license
|
|
1967
1967
|
* Copyright 2020 Google LLC
|
|
1968
1968
|
*
|
|
@@ -1977,7 +1977,7 @@
|
|
|
1977
1977
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1978
1978
|
* See the License for the specific language governing permissions and
|
|
1979
1979
|
* limitations under the License.
|
|
1980
|
-
*/const RC=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,MC=/^https?/;function LC(e){return
|
|
1980
|
+
*/const RC=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,MC=/^https?/;function LC(e){return k(this,null,function*(){if(e.config.emulator)return;const{authorizedDomains:t}=yield vf(e);for(const n of t)try{if(BC(n))return}catch(r){}vt(e,"unauthorized-domain")})}function BC(e){const t=wi(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const a=new URL(e);return a.hostname===""&&r===""?n==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):n==="chrome-extension:"&&a.hostname===r}if(!MC.test(n))return!1;if(RC.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/**
|
|
1981
1981
|
* @license
|
|
1982
1982
|
* Copyright 2020 Google LLC.
|
|
1983
1983
|
*
|
|
@@ -2007,7 +2007,7 @@
|
|
|
2007
2007
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2008
2008
|
* See the License for the specific language governing permissions and
|
|
2009
2009
|
* limitations under the License.
|
|
2010
|
-
*/const zC=new Ii(5e3,15e3),jC="__/auth/iframe",VC="emulator/auth/iframe",UC={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},HC=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function WC(e){const t=e.config;ie(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Js(t,VC):`https://${e.config.authDomain}/${jC}`,r={apiKey:t.apiKey,appName:e.name,v:cr},i=HC.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${Sr(r).slice(1)}`}function GC(e){return
|
|
2010
|
+
*/const zC=new Ii(5e3,15e3),jC="__/auth/iframe",VC="emulator/auth/iframe",UC={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},HC=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function WC(e){const t=e.config;ie(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Js(t,VC):`https://${e.config.authDomain}/${jC}`,r={apiKey:t.apiKey,appName:e.name,v:cr},i=HC.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${Sr(r).slice(1)}`}function GC(e){return k(this,null,function*(){const t=yield FC(e),n=st().gapi;return ie(n,e,"internal-error"),t.open({where:document.body,url:WC(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:UC,dontclear:!0},r=>new Promise((i,o)=>k(this,null,function*(){yield r.restyle({setHideOnLeave:!1});const a=ht(e,"network-request-failed"),l=st().setTimeout(()=>{o(a)},zC.get());function s(){st().clearTimeout(l),i(r)}r.ping(s).then(s,()=>{o(a)})})))})}/**
|
|
2011
2011
|
* @license
|
|
2012
2012
|
* Copyright 2020 Google LLC.
|
|
2013
2013
|
*
|
|
@@ -2022,7 +2022,7 @@
|
|
|
2022
2022
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2023
2023
|
* See the License for the specific language governing permissions and
|
|
2024
2024
|
* limitations under the License.
|
|
2025
|
-
*/const YC={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},KC=500,qC=600,QC="_blank",JC="http://localhost";class yf{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(t){}}}function XC(e,t,n,r=KC,i=qC){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const s=Object.assign(Object.assign({},YC),{width:r.toString(),height:i.toString(),top:o,left:a}),c=ft().toLowerCase();n&&(l=Od(c)?QC:n),Pd(c)&&(t=t||JC,s.scrollbars="yes");const d=Object.entries(s).reduce((h,[p,
|
|
2025
|
+
*/const YC={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},KC=500,qC=600,QC="_blank",JC="http://localhost";class yf{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(t){}}}function XC(e,t,n,r=KC,i=qC){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const s=Object.assign(Object.assign({},YC),{width:r.toString(),height:i.toString(),top:o,left:a}),c=ft().toLowerCase();n&&(l=Od(c)?QC:n),Pd(c)&&(t=t||JC,s.scrollbars="yes");const d=Object.entries(s).reduce((h,[p,m])=>`${h}${p}=${m},`,"");if(yy(c)&&l!=="_self")return ZC(t||"",l),new yf(null);const f=window.open(t||"",l,d);ie(f,e,"popup-blocked");try{f.focus()}catch(h){}return new yf(f)}function ZC(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/**
|
|
2026
2026
|
* @license
|
|
2027
2027
|
* Copyright 2021 Google LLC
|
|
2028
2028
|
*
|
|
@@ -2037,7 +2037,7 @@
|
|
|
2037
2037
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2038
2038
|
* See the License for the specific language governing permissions and
|
|
2039
2039
|
* limitations under the License.
|
|
2040
|
-
*/const ew="__/auth/handler",tw="emulator/auth/handler",nw=encodeURIComponent("fac");function ml(e,t,n,r,i,o){return
|
|
2040
|
+
*/const ew="__/auth/handler",tw="emulator/auth/handler",nw=encodeURIComponent("fac");function ml(e,t,n,r,i,o){return k(this,null,function*(){ie(e.config.authDomain,e,"auth-domain-config-required"),ie(e.config.apiKey,e,"invalid-api-key");const a={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:cr,eventId:i};if(t instanceof Dn){t.setDefaultLanguage(e.languageCode),a.providerId=t.providerId||"",Eb(t.getCustomParameters())||(a.customParameters=JSON.stringify(t.getCustomParameters()));for(const[d,f]of Object.entries(o||{}))a[d]=f}if(t instanceof Mr){const d=t.getScopes().filter(f=>f!=="");d.length>0&&(a.scopes=d.join(","))}e.tenantId&&(a.tid=e.tenantId);const l=a;for(const d of Object.keys(l))l[d]===void 0&&delete l[d];const s=yield e._getAppCheckToken(),c=s?`#${nw}=${encodeURIComponent(s)}`:"";return`${rw(e)}?${Sr(l).slice(1)}${c}`})}function rw({config:e}){return e.emulator?Js(e,tw):`https://${e.authDomain}/${ew}`}/**
|
|
2041
2041
|
* @license
|
|
2042
2042
|
* Copyright 2020 Google LLC
|
|
2043
2043
|
*
|
|
@@ -2052,7 +2052,7 @@
|
|
|
2052
2052
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2053
2053
|
* See the License for the specific language governing permissions and
|
|
2054
2054
|
* limitations under the License.
|
|
2055
|
-
*/const vl="webStorageSupport";class iw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=gl}_openPopup(t,n,r,i){return
|
|
2055
|
+
*/const vl="webStorageSupport";class iw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=gl}_openPopup(t,n,r,i){return k(this,null,function*(){var o;an((o=this.eventManagers[t._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");const a=yield ml(t,n,r,wi(),i);return XC(t,a,Ri())})}_openRedirect(t,n,r,i){return k(this,null,function*(){yield this._originValidation(t);const o=yield ml(t,n,r,wi(),i);return jx(o),new Promise(()=>{})})}_initialize(t){const n=t._key();if(this.eventManagers[n]){const{manager:i,promise:o}=this.eventManagers[n];return i?Promise.resolve(i):(an(o,"If manager is not set, promise should be"),o)}const r=this.initAndGetManager(t);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}initAndGetManager(t){return k(this,null,function*(){const n=yield GC(t),r=new pf(t);return n.register("authEvent",i=>(ie(i==null?void 0:i.authEvent,t,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,r})}_isIframeWebStorageSupported(t,n){this.iframes[t._key()].send(vl,{type:vl},i=>{var o;const a=(o=i==null?void 0:i[0])===null||o===void 0?void 0:o[vl];a!==void 0&&n(!!a),vt(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=LC(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return Bd()||Dd()||_i()}}const xf=iw;class ow{constructor(t){this.factorId=t}_process(t,n,r){switch(n.type){case"enroll":return this._finalizeEnroll(t,n.credential,r);case"signin":return this._finalizeSignIn(t,n.credential);default:return hn("unexpected MultiFactorSessionType")}}}class bl extends ow{constructor(t){super("phone"),this.credential=t}static _fromCredential(t){return new bl(t)}_finalizeEnroll(t,n,r){return Mx(t,{idToken:n,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(t,n){return Jx(t,{mfaPendingCredential:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}class Cf{constructor(){}static assertion(t){return bl._fromCredential(t)}}Cf.FACTOR_ID="phone";var wf="@firebase/auth",If="1.7.7";/**
|
|
2056
2056
|
* @license
|
|
2057
2057
|
* Copyright 2020 Google LLC
|
|
2058
2058
|
*
|
|
@@ -2067,7 +2067,7 @@
|
|
|
2067
2067
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2068
2068
|
* See the License for the specific language governing permissions and
|
|
2069
2069
|
* limitations under the License.
|
|
2070
|
-
*/class aw{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}getToken(t){return
|
|
2070
|
+
*/class aw{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}getToken(t){return k(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(t)}:null})}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(r=>{t((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){ie(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
|
|
2071
2071
|
* @license
|
|
2072
2072
|
* Copyright 2020 Google LLC
|
|
2073
2073
|
*
|
|
@@ -2097,7 +2097,7 @@
|
|
|
2097
2097
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2098
2098
|
* See the License for the specific language governing permissions and
|
|
2099
2099
|
* limitations under the License.
|
|
2100
|
-
*/const cw=5*60,uw=ju("authIdTokenMaxAge")||cw;let Sf=null;const dw=e=>t=>
|
|
2100
|
+
*/const cw=5*60,uw=ju("authIdTokenMaxAge")||cw;let Sf=null;const dw=e=>t=>k(this,null,function*(){const n=t&&(yield t.getIdTokenResult()),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>uw)return;const i=n==null?void 0:n.token;Sf!==i&&(Sf=i,yield fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function fw(e=od()){const t=Do(e,"auth");if(t.isInitialized())return t.getImmediate();const n=Ry(e,{popupRedirectResolver:xf,persistence:[Fr,Uo,Qn]}),r=ju("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(r,location.origin);if(location.origin===o.origin){const a=dw(o.toString());Dx(n,a,()=>a(n.currentUser)),Px(n,l=>a(l))}}const i=yb("auth");return i&&tl(n,`http://${i}`),n}function hw(){var e,t;return(t=(e=document.getElementsByTagName("head"))===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:document}Ty({loadJS(e){return new Promise((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=i=>{const o=ht("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",hw().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="}),lw("Browser");/**
|
|
2101
2101
|
* @license
|
|
2102
2102
|
* Copyright 2021 Google LLC
|
|
2103
2103
|
*
|
|
@@ -2127,7 +2127,7 @@
|
|
|
2127
2127
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2128
2128
|
* See the License for the specific language governing permissions and
|
|
2129
2129
|
* limitations under the License.
|
|
2130
|
-
*/const pw=2e3;function gw(e,t,n){return
|
|
2130
|
+
*/const pw=2e3;function gw(e,t,n){return k(this,null,function*(){var r;const{BuildInfo:i}=gr();an(t.sessionId,"AuthEvent did not contain a session ID");const o=yield xw(t.sessionId),a={};return _i()?a.ibi=i.packageName:Ei()?a.apn=i.packageName:vt(e,"operation-not-supported-in-this-environment"),i.displayName&&(a.appDisplayName=i.displayName),a.sessionId=o,ml(e,n,t.type,void 0,(r=t.eventId)!==null&&r!==void 0?r:void 0,a)})}function mw(e){return k(this,null,function*(){const{BuildInfo:t}=gr(),n={};_i()?n.iosBundleId=t.packageName:Ei()?n.androidPackageName=t.packageName:vt(e,"operation-not-supported-in-this-environment"),yield vf(e,n)})}function vw(e){const{cordova:t}=gr();return new Promise(n=>{t.plugins.browsertab.isAvailable(r=>{let i=null;r?t.plugins.browsertab.openUrl(e):i=t.InAppBrowser.open(e,by()?"_blank":"_system","location=yes"),n(i)})})}function bw(e,t,n){return k(this,null,function*(){const{cordova:r}=gr();let i=()=>{};try{yield new Promise((o,a)=>{let l=null;function s(){var f;o();const h=(f=r.plugins.browsertab)===null||f===void 0?void 0:f.close;typeof h=="function"&&h(),typeof(n==null?void 0:n.close)=="function"&&n.close()}function c(){l||(l=window.setTimeout(()=>{a(ht(e,"redirect-cancelled-by-user"))},pw))}function d(){(document==null?void 0:document.visibilityState)==="visible"&&c()}t.addPassiveListener(s),document.addEventListener("resume",c,!1),Ei()&&document.addEventListener("visibilitychange",d,!1),i=()=>{t.removePassiveListener(s),document.removeEventListener("resume",c,!1),document.removeEventListener("visibilitychange",d,!1),l&&window.clearTimeout(l)}})}finally{i()}})}function yw(e){var t,n,r,i,o,a,l,s,c,d;const f=gr();ie(typeof((t=f==null?void 0:f.universalLinks)===null||t===void 0?void 0:t.subscribe)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-universal-links-plugin-fix"}),ie(typeof((n=f==null?void 0:f.BuildInfo)===null||n===void 0?void 0:n.packageName)!="undefined",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-buildInfo"}),ie(typeof((o=(i=(r=f==null?void 0:f.cordova)===null||r===void 0?void 0:r.plugins)===null||i===void 0?void 0:i.browsertab)===null||o===void 0?void 0:o.openUrl)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),ie(typeof((s=(l=(a=f==null?void 0:f.cordova)===null||a===void 0?void 0:a.plugins)===null||l===void 0?void 0:l.browsertab)===null||s===void 0?void 0:s.isAvailable)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),ie(typeof((d=(c=f==null?void 0:f.cordova)===null||c===void 0?void 0:c.InAppBrowser)===null||d===void 0?void 0:d.open)=="function",e,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-inappbrowser"})}function xw(e){return k(this,null,function*(){const t=Cw(e),n=yield crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(i=>i.toString(16).padStart(2,"0")).join("")})}function Cw(e){if(an(/[0-9a-zA-Z]+/.test(e),"Can only convert alpha-numeric strings"),typeof TextEncoder!="undefined")return new TextEncoder().encode(e);const t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}/**
|
|
2131
2131
|
* @license
|
|
2132
2132
|
* Copyright 2020 Google LLC
|
|
2133
2133
|
*
|
|
@@ -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 ww=20;class Iw extends pf{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
|
|
2145
|
+
*/const ww=20;class Iw extends pf{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 k(this,null,function*(){yield this.initPromise})}}function Sw(e,t,n=null){return{type:t,eventId:n,urlResponse:null,sessionId:Ew(),postBody:null,tenantId:e.tenantId,error:ht(e,"no-auth-event")}}function Aw(e,t){return yl()._set(xl(e),t)}function Af(e){return k(this,null,function*(){const t=yield yl()._get(xl(e));return t&&(yield yl()._remove(xl(e))),t})}function Tw(e,t){var n,r;const i=kw(t);if(i.includes("/__/auth/callback")){const o=Jo(i),a=o.firebaseError?_w(decodeURIComponent(o.firebaseError)):null,l=(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],s=l?ht(l):null;return s?{type:e.type,eventId:e.eventId,tenantId:e.tenantId,error:s,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 Ew(){const e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<ww;n++){const r=Math.floor(Math.random()*t.length);e.push(t.charAt(r))}return e.join("")}function yl(){return Vt(Uo)}function xl(e){return ur("authEvent",e.config.apiKey,e.name)}function _w(e){try{return JSON.parse(e)}catch(t){return null}}function kw(e){const t=Jo(e),n=t.link?decodeURIComponent(t.link):void 0,r=Jo(n).link,i=t.deep_link_id?decodeURIComponent(t.deep_link_id):void 0;return Jo(i).link||i||r||n||e}function Jo(e){if(!(e!=null&&e.includes("?")))return{};const[t,...n]=e.split("?");return Ar(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 Pw=500;class Dw{constructor(){this._redirectPersistence=Qn,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=qo,this._overrideRedirectResult=gl}_initialize(t){return
|
|
2160
|
+
*/const Pw=500;class Dw{constructor(){this._redirectPersistence=Qn,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=qo,this._overrideRedirectResult=gl}_initialize(t){return k(this,null,function*(){const n=t._key();let r=this.eventManagers.get(n);return r||(r=new Iw(t),this.eventManagers.set(n,r),this.attachCallbackListeners(t,r)),r})}_openPopup(t){vt(t,"operation-not-supported-in-this-environment")}_openRedirect(t,n,r,i){return k(this,null,function*(){yw(t);const o=yield this._initialize(t);yield o.initialized(),o.resetRedirect(),IC(),yield this._originValidation(t);const a=Sw(t,r,i);yield Aw(t,a);const l=yield gw(t,a,n),s=yield vw(l);return bw(t,o,s)})}_isIframeWebStorageSupported(t,n){throw new Error("Method not implemented.")}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=mw(t)),this.originValidationPromises[n]}attachCallbackListeners(t,n){const{universalLinks:r,handleOpenURL:i,BuildInfo:o}=gr(),a=setTimeout(()=>k(this,null,function*(){yield Af(t),n.onEvent(Tf())}),Pw),l=d=>k(this,null,function*(){clearTimeout(a);const f=yield Af(t);let h=null;f&&(d!=null&&d.url)&&(h=Tw(f,d.url)),n.onEvent(h||Tf())});typeof r!="undefined"&&typeof r.subscribe=="function"&&r.subscribe(null,l);const s=i,c=`${o.packageName.toLowerCase()}://`;gr().handleOpenURL=d=>k(this,null,function*(){if(d.toLowerCase().startsWith(c)&&l({url:d}),typeof s=="function")try{s(d)}catch(f){console.error(f)}})}}const Ow=Dw;function Tf(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:ht("no-auth-event")}}/**
|
|
2161
2161
|
* @license
|
|
2162
2162
|
* Copyright 2017 Google LLC
|
|
2163
2163
|
*
|
|
@@ -2187,7 +2187,7 @@
|
|
|
2187
2187
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2188
2188
|
* See the License for the specific language governing permissions and
|
|
2189
2189
|
* limitations under the License.
|
|
2190
|
-
*/const Bw=1e3;function $i(){var e;return((e=self==null?void 0:self.location)===null||e===void 0?void 0:e.protocol)||null}function $w(){return $i()==="http:"||$i()==="https:"}function Ef(e=ft()){return!!(($i()==="file:"||$i()==="ionic:"||$i()==="capacitor:")&&e.toLowerCase().match(/iphone|ipad|ipod|android/))}function Nw(){return Os()||Vu()}function Fw(){return Wu()&&(document==null?void 0:document.documentMode)===11}function zw(e=ft()){return/Edge\/\d+/.test(e)}function jw(e=ft()){return Fw()||zw(e)}function _f(){try{const e=self.localStorage,t=Ri();if(e)return e.setItem(t,"1"),e.removeItem(t),jw()?_o():!0}catch(e){return Cl()&&_o()}return!1}function Cl(){return typeof global!="undefined"&&"WorkerGlobalScope"in global&&"importScripts"in global}function wl(){return($w()||Hu()||Ef())&&!Nw()&&_f()&&!Cl()}function kf(){return Ef()&&typeof document!="undefined"}function Vw(){return
|
|
2190
|
+
*/const Bw=1e3;function $i(){var e;return((e=self==null?void 0:self.location)===null||e===void 0?void 0:e.protocol)||null}function $w(){return $i()==="http:"||$i()==="https:"}function Ef(e=ft()){return!!(($i()==="file:"||$i()==="ionic:"||$i()==="capacitor:")&&e.toLowerCase().match(/iphone|ipad|ipod|android/))}function Nw(){return Os()||Vu()}function Fw(){return Wu()&&(document==null?void 0:document.documentMode)===11}function zw(e=ft()){return/Edge\/\d+/.test(e)}function jw(e=ft()){return Fw()||zw(e)}function _f(){try{const e=self.localStorage,t=Ri();if(e)return e.setItem(t,"1"),e.removeItem(t),jw()?_o():!0}catch(e){return Cl()&&_o()}return!1}function Cl(){return typeof global!="undefined"&&"WorkerGlobalScope"in global&&"importScripts"in global}function wl(){return($w()||Hu()||Ef())&&!Nw()&&_f()&&!Cl()}function kf(){return Ef()&&typeof document!="undefined"}function Vw(){return k(this,null,function*(){return kf()?new Promise(e=>{const t=setTimeout(()=>{e(!1)},Bw);document.addEventListener("deviceready",()=>{clearTimeout(t),e(!0)})}):!1})}function Uw(){return typeof window!="undefined"?window:null}/**
|
|
2191
2191
|
* @license
|
|
2192
2192
|
* Copyright 2020 Google LLC
|
|
2193
2193
|
*
|
|
@@ -2202,7 +2202,7 @@
|
|
|
2202
2202
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2203
2203
|
* See the License for the specific language governing permissions and
|
|
2204
2204
|
* limitations under the License.
|
|
2205
|
-
*/const Ut={LOCAL:"local",NONE:"none",SESSION:"session"},Ni=ie,Pf="persistence";function Hw(e,t){if(Ni(Object.values(Ut).includes(t),e,"invalid-persistence-type"),Os()){Ni(t!==Ut.SESSION,e,"unsupported-persistence-type");return}if(Vu()){Ni(t===Ut.NONE,e,"unsupported-persistence-type");return}if(Cl()){Ni(t===Ut.NONE||t===Ut.LOCAL&&_o(),e,"unsupported-persistence-type");return}Ni(t===Ut.NONE||_f(),e,"unsupported-persistence-type")}function Il(e){return
|
|
2205
|
+
*/const Ut={LOCAL:"local",NONE:"none",SESSION:"session"},Ni=ie,Pf="persistence";function Hw(e,t){if(Ni(Object.values(Ut).includes(t),e,"invalid-persistence-type"),Os()){Ni(t!==Ut.SESSION,e,"unsupported-persistence-type");return}if(Vu()){Ni(t===Ut.NONE,e,"unsupported-persistence-type");return}if(Cl()){Ni(t===Ut.NONE||t===Ut.LOCAL&&_o(),e,"unsupported-persistence-type");return}Ni(t===Ut.NONE||_f(),e,"unsupported-persistence-type")}function Il(e){return k(this,null,function*(){yield e._initializationPromise;const t=Df(),n=ur(Pf,e.config.apiKey,e.name);t&&t.setItem(n,e._getPersistence())})}function Ww(e,t){const n=Df();if(!n)return[];const r=ur(Pf,e,t);switch(n.getItem(r)){case Ut.NONE:return[Dr];case Ut.LOCAL:return[Fr,Qn];case Ut.SESSION:return[Qn];default:return[]}}function Df(){var e;try{return((e=Uw())===null||e===void 0?void 0:e.sessionStorage)||null}catch(t){return null}}/**
|
|
2206
2206
|
* @license
|
|
2207
2207
|
* Copyright 2020 Google LLC
|
|
2208
2208
|
*
|
|
@@ -2217,7 +2217,7 @@
|
|
|
2217
2217
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2218
2218
|
* See the License for the specific language governing permissions and
|
|
2219
2219
|
* limitations under the License.
|
|
2220
|
-
*/const Gw=ie;class Jn{constructor(){this.browserResolver=Vt(xf),this.cordovaResolver=Vt(Ow),this.underlyingResolver=null,this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=gl}_initialize(t){return
|
|
2220
|
+
*/const Gw=ie;class Jn{constructor(){this.browserResolver=Vt(xf),this.cordovaResolver=Vt(Ow),this.underlyingResolver=null,this._redirectPersistence=Qn,this._completeRedirectFn=qo,this._overrideRedirectResult=gl}_initialize(t){return k(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._initialize(t)})}_openPopup(t,n,r,i){return k(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openPopup(t,n,r,i)})}_openRedirect(t,n,r,i){return k(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openRedirect(t,n,r,i)})}_isIframeWebStorageSupported(t,n){this.assertedUnderlyingResolver._isIframeWebStorageSupported(t,n)}_originValidation(t){return this.assertedUnderlyingResolver._originValidation(t)}get _shouldInitProactively(){return kf()||this.browserResolver._shouldInitProactively}get assertedUnderlyingResolver(){return Gw(this.underlyingResolver,"internal-error"),this.underlyingResolver}selectUnderlyingResolver(){return k(this,null,function*(){if(this.underlyingResolver)return;const t=yield Vw();this.underlyingResolver=t?this.cordovaResolver:this.browserResolver})}}/**
|
|
2221
2221
|
* @license
|
|
2222
2222
|
* Copyright 2020 Google LLC
|
|
2223
2223
|
*
|
|
@@ -2247,7 +2247,7 @@
|
|
|
2247
2247
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2248
2248
|
* See the License for the specific language governing permissions and
|
|
2249
2249
|
* limitations under the License.
|
|
2250
|
-
*/function Kw(e){return Rf(e)}function qw(e,t){var n;const r=(n=t.customData)===null||n===void 0?void 0:n._tokenResponse;if((t==null?void 0:t.code)==="auth/multi-factor-auth-required"){const i=t;i.resolver=new Qw(e,Ox(e,t))}else if(r){const i=Rf(t),o=t;i&&(o.credential=i,o.tenantId=r.tenantId||void 0,o.email=r.email||void 0,o.phoneNumber=r.phoneNumber||void 0)}}function Rf(e){const{_tokenResponse:t}=e instanceof $t?e.customData:e;if(!t)return null;if(!(e instanceof $t)&&"temporaryProof"in t&&"phoneNumber"in t)return hr.credentialFromResult(e);const n=t.providerId;if(!n||n===Ci.PASSWORD)return null;let r;switch(n){case Ci.GOOGLE:r=mn;break;case Ci.FACEBOOK:r=gn;break;case Ci.GITHUB:r=vn;break;case Ci.TWITTER:r=bn;break;default:const{oauthIdToken:i,oauthAccessToken:o,oauthTokenSecret:a,pendingToken:l,nonce:s}=t;return!o&&!a&&!i&&!l?null:l?n.startsWith("saml.")?Br._create(n,l):pn._fromParams({providerId:n,signInMethod:n,pendingToken:l,idToken:i,accessToken:o}):new Lr(n).credential({idToken:i,accessToken:o,rawNonce:s})}return e instanceof $t?r.credentialFromError(e):r.credentialFromResult(e)}function Nt(e,t){return t.catch(n=>{throw n instanceof $t&&qw(e,n),n}).then(n=>{const r=n.operationType,i=n.user;return{operationType:r,credential:Kw(n),additionalUserInfo:kx(n),user:Rn.getOrCreate(i)}})}function Sl(e,t){return
|
|
2250
|
+
*/function Kw(e){return Rf(e)}function qw(e,t){var n;const r=(n=t.customData)===null||n===void 0?void 0:n._tokenResponse;if((t==null?void 0:t.code)==="auth/multi-factor-auth-required"){const i=t;i.resolver=new Qw(e,Ox(e,t))}else if(r){const i=Rf(t),o=t;i&&(o.credential=i,o.tenantId=r.tenantId||void 0,o.email=r.email||void 0,o.phoneNumber=r.phoneNumber||void 0)}}function Rf(e){const{_tokenResponse:t}=e instanceof $t?e.customData:e;if(!t)return null;if(!(e instanceof $t)&&"temporaryProof"in t&&"phoneNumber"in t)return hr.credentialFromResult(e);const n=t.providerId;if(!n||n===Ci.PASSWORD)return null;let r;switch(n){case Ci.GOOGLE:r=mn;break;case Ci.FACEBOOK:r=gn;break;case Ci.GITHUB:r=vn;break;case Ci.TWITTER:r=bn;break;default:const{oauthIdToken:i,oauthAccessToken:o,oauthTokenSecret:a,pendingToken:l,nonce:s}=t;return!o&&!a&&!i&&!l?null:l?n.startsWith("saml.")?Br._create(n,l):pn._fromParams({providerId:n,signInMethod:n,pendingToken:l,idToken:i,accessToken:o}):new Lr(n).credential({idToken:i,accessToken:o,rawNonce:s})}return e instanceof $t?r.credentialFromError(e):r.credentialFromResult(e)}function Nt(e,t){return t.catch(n=>{throw n instanceof $t&&qw(e,n),n}).then(n=>{const r=n.operationType,i=n.user;return{operationType:r,credential:Kw(n),additionalUserInfo:kx(n),user:Rn.getOrCreate(i)}})}function Sl(e,t){return k(this,null,function*(){const n=yield t;return{verificationId:n.verificationId,confirm:r=>Nt(e,n.confirm(r))}})}class Qw{constructor(t,n){this.resolver=n,this.auth=Yw(t)}get session(){return this.resolver.session}get hints(){return this.resolver.hints}resolveSignIn(t){return Nt(Of(this.auth),this.resolver.resolveSignIn(t))}}/**
|
|
2251
2251
|
* @license
|
|
2252
2252
|
* Copyright 2020 Google LLC
|
|
2253
2253
|
*
|
|
@@ -2262,7 +2262,7 @@
|
|
|
2262
2262
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2263
2263
|
* See the License for the specific language governing permissions and
|
|
2264
2264
|
* limitations under the License.
|
|
2265
|
-
*/class Rn{constructor(t){this._delegate=t,this.multiFactor=Bx(t)}static getOrCreate(t){return Rn.USER_MAP.has(t)||Rn.USER_MAP.set(t,new Rn(t)),Rn.USER_MAP.get(t)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(t){return this._delegate.getIdTokenResult(t)}getIdToken(t){return this._delegate.getIdToken(t)}linkAndRetrieveDataWithCredential(t){return this.linkWithCredential(t)}linkWithCredential(t){return
|
|
2265
|
+
*/class Rn{constructor(t){this._delegate=t,this.multiFactor=Bx(t)}static getOrCreate(t){return Rn.USER_MAP.has(t)||Rn.USER_MAP.set(t,new Rn(t)),Rn.USER_MAP.get(t)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(t){return this._delegate.getIdTokenResult(t)}getIdToken(t){return this._delegate.getIdToken(t)}linkAndRetrieveDataWithCredential(t){return this.linkWithCredential(t)}linkWithCredential(t){return k(this,null,function*(){return Nt(this.auth,Qd(this._delegate,t))})}linkWithPhoneNumber(t,n){return k(this,null,function*(){return Sl(this.auth,dC(this._delegate,t,n))})}linkWithPopup(t){return k(this,null,function*(){return Nt(this.auth,xC(this._delegate,t,Jn))})}linkWithRedirect(t){return k(this,null,function*(){return yield Il(qe(this.auth)),_C(this._delegate,t,Jn)})}reauthenticateAndRetrieveDataWithCredential(t){return this.reauthenticateWithCredential(t)}reauthenticateWithCredential(t){return k(this,null,function*(){return Nt(this.auth,Jd(this._delegate,t))})}reauthenticateWithPhoneNumber(t,n){return Sl(this.auth,fC(this._delegate,t,n))}reauthenticateWithPopup(t){return Nt(this.auth,yC(this._delegate,t,Jn))}reauthenticateWithRedirect(t){return k(this,null,function*(){return yield Il(qe(this.auth)),TC(this._delegate,t,Jn)})}sendEmailVerification(t){return bx(this._delegate,t)}unlink(t){return k(this,null,function*(){return yield ix(this._delegate,t),this})}updateEmail(t){return wx(this._delegate,t)}updatePassword(t){return Ix(this._delegate,t)}updatePhoneNumber(t){return hC(this._delegate,t)}updateProfile(t){return Cx(this._delegate,t)}verifyBeforeUpdateEmail(t,n){return yx(this._delegate,t,n)}get emailVerified(){return this._delegate.emailVerified}get isAnonymous(){return this._delegate.isAnonymous}get metadata(){return this._delegate.metadata}get phoneNumber(){return this._delegate.phoneNumber}get providerData(){return this._delegate.providerData}get refreshToken(){return this._delegate.refreshToken}get tenantId(){return this._delegate.tenantId}get displayName(){return this._delegate.displayName}get email(){return this._delegate.email}get photoURL(){return this._delegate.photoURL}get providerId(){return this._delegate.providerId}get uid(){return this._delegate.uid}get auth(){return this._delegate.auth}}Rn.USER_MAP=new WeakMap;/**
|
|
2266
2266
|
* @license
|
|
2267
2267
|
* Copyright 2020 Google LLC
|
|
2268
2268
|
*
|
|
@@ -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 Fi=ie;class Al{constructor(t,n){if(this.app=t,n.isInitialized()){this._delegate=n.getImmediate(),this.linkUnderlyingAuth();return}const{apiKey:r}=t.options;Fi(r,"invalid-api-key",{appName:t.name}),Fi(r,"invalid-api-key",{appName:t.name});const i=typeof window!="undefined"?Jn:void 0;this._delegate=n.initialize({options:{persistence:Jw(r,t.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(J0),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Rn.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){tl(this._delegate,t,n)}applyActionCode(t){return cx(this._delegate,t)}checkActionCode(t){return Xd(this._delegate,t)}confirmPasswordReset(t,n){return lx(this._delegate,t,n)}createUserWithEmailAndPassword(t,n){return
|
|
2280
|
+
*/const Fi=ie;class Al{constructor(t,n){if(this.app=t,n.isInitialized()){this._delegate=n.getImmediate(),this.linkUnderlyingAuth();return}const{apiKey:r}=t.options;Fi(r,"invalid-api-key",{appName:t.name}),Fi(r,"invalid-api-key",{appName:t.name});const i=typeof window!="undefined"?Jn:void 0;this._delegate=n.initialize({options:{persistence:Jw(r,t.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(J0),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Rn.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){tl(this._delegate,t,n)}applyActionCode(t){return cx(this._delegate,t)}checkActionCode(t){return Xd(this._delegate,t)}confirmPasswordReset(t,n){return lx(this._delegate,t,n)}createUserWithEmailAndPassword(t,n){return k(this,null,function*(){return Nt(this._delegate,dx(this._delegate,t,n))})}fetchProvidersForEmail(t){return this.fetchSignInMethodsForEmail(t)}fetchSignInMethodsForEmail(t){return vx(this._delegate,t)}isSignInWithEmailLink(t){return px(this._delegate,t)}getRedirectResult(){return k(this,null,function*(){Fi(wl(),this._delegate,"operation-not-supported-in-this-environment");const t=yield PC(this._delegate,Jn);return t?Nt(this._delegate,Promise.resolve(t)):{credential:null,user:null}})}addFrameworkForLogging(t){Rw(this._delegate,t)}onAuthStateChanged(t,n,r){const{next:i,error:o,complete:a}=Mf(t,n,r);return this._delegate.onAuthStateChanged(i,o,a)}onIdTokenChanged(t,n,r){const{next:i,error:o,complete:a}=Mf(t,n,r);return this._delegate.onIdTokenChanged(i,o,a)}sendSignInLinkToEmail(t,n){return hx(this._delegate,t,n)}sendPasswordResetEmail(t,n){return sx(this._delegate,t,n||void 0)}setPersistence(t){return k(this,null,function*(){Hw(this._delegate,t);let n;switch(t){case Ut.SESSION:n=Qn;break;case Ut.LOCAL:n=(yield Vt(Fr)._isAvailable())?Fr:Uo;break;case Ut.NONE:n=Dr;break;default:return vt("argument-error",{appName:this._delegate.name})}return this._delegate.setPersistence(n)})}signInAndRetrieveDataWithCredential(t){return this.signInWithCredential(t)}signInAnonymously(){return Nt(this._delegate,rx(this._delegate))}signInWithCredential(t){return Nt(this._delegate,zo(this._delegate,t))}signInWithCustomToken(t){return Nt(this._delegate,ax(this._delegate,t))}signInWithEmailAndPassword(t,n){return Nt(this._delegate,fx(this._delegate,t,n))}signInWithEmailLink(t,n){return Nt(this._delegate,gx(this._delegate,t,n))}signInWithPhoneNumber(t,n){return Sl(this._delegate,uC(this._delegate,t,n))}signInWithPopup(t){return k(this,null,function*(){return Fi(wl(),this._delegate,"operation-not-supported-in-this-environment"),Nt(this._delegate,bC(this._delegate,t,Jn))})}signInWithRedirect(t){return k(this,null,function*(){return Fi(wl(),this._delegate,"operation-not-supported-in-this-environment"),yield Il(this._delegate),SC(this._delegate,t,Jn)})}updateCurrentUser(t){return this._delegate.updateCurrentUser(t)}verifyPasswordResetCode(t){return ux(this._delegate,t)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}Al.Persistence=Ut;function Mf(e,t,n){let r=e;typeof e!="function"&&({next:r,error:t,complete:n}=e);const i=r;return{next:a=>i(a&&Rn.getOrCreate(a)),error:t,complete:n}}function Jw(e,t){const n=Ww(e,t);if(typeof self!="undefined"&&!n.includes(Fr)&&n.push(Fr),typeof window!="undefined")for(const r of[Uo,Qn])n.includes(r)||n.push(r);return n.includes(Dr)||n.push(Dr),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 eI="auth-compat";function tI(e){e.INTERNAL.registerComponent(new Un(eI,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Al(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:_r.EMAIL_SIGNIN,PASSWORD_RESET:_r.PASSWORD_RESET,RECOVER_EMAIL:_r.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:_r.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:_r.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:_r.VERIFY_EMAIL}},EmailAuthProvider:qn,FacebookAuthProvider:gn,GithubAuthProvider:vn,GoogleAuthProvider:mn,OAuthProvider:Lr,SAMLAuthProvider:$o,PhoneAuthProvider:Tl,PhoneMultiFactorGenerator:Cf,RecaptchaVerifier:Zw,TwitterAuthProvider:bn,Auth:Al,AuthCredential:Rr,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Mw,Lw)}tI(Yn);let Lf=!1;const zi=e=>{if(Lf)return Yn.auth();if(e&&e==="dev"){Yn.initializeApp({apiKey:"api_key"});const n=fw();tl(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"};Yn.initializeApp(n)}return Lf=!0,Yn.auth()},nI=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":"https://client.fansunitedapi.com/v1";class rI{constructor(t,n){oe(this,"apiKey","");oe(this,"clientId","");oe(this,"environment","");oe(this,"mainQueryParams",{key:"",client_id:""});oe(this,"headers",{"Content-Type":"application/json"});oe(this,"clientApiBaseUrl","");oe(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");oe(this,"sportal365Config",null);oe(this,"generateSignedInUrl",t=>P(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:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));oe(this,"storeInBucket",(t,n,r)=>P(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)}));oe(this,"fetchImagesFromSportal365",(t,n,r)=>P(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=X(V({},o),{from:n.from})),n.to&&(o=X(V({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));oe(this,"getSchedulersByEntityId",t=>P(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:X(V({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"setSchedulers",(t,n,r)=>P(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:X(V({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(t),method:o})}));oe(this,"deleteScheduledTask",t=>P(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:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(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}`);oe(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)});oe(this,"getToken",()=>P(this,null,function*(){const t=zi(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=nI(this.environment)}}const iI=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":"https://loyalty.fansunitedapi.com/v1",oI=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":"https://prediction.fansunitedapi.com/v1",aI=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":"https://mini-games.fansunitedapi.com/v1",sI=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":"https://reporting.fansunitedapi.com/v1",lI=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":"https://voting.fansunitedapi.com/v1",cI=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1/custom/bracket/resolve?":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1/custom/bracket/resolve?":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1/custom/bracket/resolve?":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1/custom/bracket/resolve?",uI=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":"https://profile.fansunitedapi.com/v1";class dI extends rI{constructor(n,r){super(n,r);oe(this,"loyaltyBaseUrl","");oe(this,"predictionBaseUrl","");oe(this,"miniGamesApiBaseUrl","");oe(this,"reportingApiBaseUrl","");oe(this,"votingApiBaseUrl","");oe(this,"profileApiBaseUrl","");oe(this,"customResolverUrl","");oe(this,"getClientById",()=>P(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:X(V({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"createTemplate",n=>P(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"editTemplate",(n,r)=>P(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deleteTemplate",n=>P(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"setWinners",n=>P(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"exportDetailedLeaderboard",(n,r)=>P(this,null,function*(){const i=`/leaderboard/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(X(V({},this.mainQueryParams),{limit:r.toString()})),{headers:X(V({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"exportDetailedGameLeaderboard",(n,r)=>P(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(X(V({},this.mainQueryParams),{limit:r.toString()})),{headers:X(V({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"createGame",n=>P(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"editGame",(n,r)=>P(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));oe(this,"getClassicQuizFeature",()=>P(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));oe(this,"getEitherOrFeature",()=>P(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));oe(this,"getPollFeature",()=>P(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));oe(this,"createClassicQuiz",n=>P(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateClassicQuiz",(n,r)=>P(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"getClassicQuizById",n=>P(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"deleteClassicQuiz",n=>P(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"calculateQuestionsReport",n=>P(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:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));oe(this,"exportUsers",n=>P(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"getClassicQuizParticipations",(n,r,i,o)=>P(this,null,function*(){const a="/classic-quizzes/participations?",l=X(V({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(l),{headers:X(V({},this.headers),{Authorization:"Bearer "+s})})}));oe(this,"getEntityParticipations",(n,r,i)=>P(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=X(V({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:X(V({},this.headers),{Authorization:"Bearer "+l})})}));oe(this,"createPoll",n=>P(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updatePoll",(n,r)=>P(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deletePoll",n=>P(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"getEitherOrById",n=>P(this,null,function*(){const r=`/either-or/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"createEitherOr",n=>P(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateEitherOr",(n,r)=>P(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deleteEitherOr",n=>P(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"getLists",(n,r,i="DESC")=>P(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:X(V({},this.headers),{Authorization:"Bearer "+l})})}));oe(this,"getListById",n=>P(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:X(V({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"getListContent",(n,r,i="DESC",o)=>P(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,l={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(l.page=o.toString());const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(l),{headers:X(V({},this.headers),{Authorization:"Bearer "+s})})}));oe(this,"createList",n=>P(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:X(V({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateList",(n,r)=>P(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:X(V({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deleteList",n=>P(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:X(V({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));oe(this,"getLanguageConfig",()=>P(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:X(V({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"updateLanguageConfig",n=>P(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:X(V({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));oe(this,"createBracketGame",n=>P(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateBracketGame",(n,r)=>P(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(V({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"resolvePredictions",n=>P(this,null,function*(){const i=yield this.getToken();return yield fetch(this.customResolverUrl+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:X(V({},this.headers),{Authorization:"Bearer "+i}),signal:AbortSignal.timeout(6e5)})}));oe(this,"exportLeadsPerEntity",n=>P(this,null,function*(){const r="/leads/export?",i=X(V({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:X(V({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"getLeadStatistics",n=>P(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(V(V({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:X(V({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"exportLeads",n=>P(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(V(V({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:X(V({},this.headers),{Authorization:"Bearer "+i})})}));this.loyaltyBaseUrl=iI(n.environment),this.predictionBaseUrl=oI(n.environment),this.miniGamesApiBaseUrl=aI(n.environment),this.reportingApiBaseUrl=sI(n.environment),this.votingApiBaseUrl=lI(n.environment),this.profileApiBaseUrl=uI(n.environment),this.customResolverUrl=cI(n.environment)}}const fI=(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"}`},Xo=C.createContext(null),hI=({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=fI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new dI(n,r);return u.jsx(Xo.Provider,{value:{sdk:i,https:o},children:t})},Bf=C.createContext(null),pI=({children:e,environment:t})=>{const[n,r]=C.useState(null),[i,o]=C.useState(!0);return C.useEffect(()=>zi(t).onAuthStateChanged(l=>{Oe.unstable_batchedUpdates(()=>{o(!1),r(l)})}),[t]),u.jsx(Bf.Provider,{value:n,children:!i&&e})};function D(){return D=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},D.apply(null,arguments)}function Ae(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 $f={exports:{}},gI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mI=gI,vI=mI;function Nf(){}function Ff(){}Ff.resetWarningCache=Nf;var bI=function(){function e(r,i,o,a,l,s){if(s!==vI){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}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:Ff,resetWarningCache:Nf};return n.PropTypes=n,n};$f.exports=bI();var yI=$f.exports;function xI(e){return typeof e=="string"}function CI(e,t,n){return e===void 0||xI(e)?t:D({},t,{ownerState:D({},t.ownerState,n)})}function zf(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Mn(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 wI(e,t,n){return typeof e=="function"?e(t,n):e}function II(e){const{rootElementName:t="",componentName:n}=e,[r,i]=z.useState(t.toUpperCase()),o=z.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function SI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return z.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{SI(n,t)})},e)}function jf(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=jf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ln(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jf(e))&&(r&&(r+=" "),r+=t);return r}function Vf(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 AI(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=Ln(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),g=D({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),m=D({},n,i,r);return p.length>0&&(m.className=p),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:void 0}}const a=Mn(D({},i,r)),l=Vf(r),s=Vf(i),c=t(a),d=Ln(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=D({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=D({},c,n,s,l);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function Xn(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 Uf(e){if(z.isValidElement(e)||!Xn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Uf(e[n])}),t}function Bn(e,t,n={clone:!0}){const r=n.clone?D({},e):e;return Xn(e)&&Xn(t)&&Object.keys(t).forEach(i=>{z.isValidElement(t[i])?r[i]=t[i]:Xn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Xn(e[i])?r[i]=Bn(e[i],t[i],n):n.clone?r[i]=Xn(t[i])?Uf(t[i]):t[i]:r[i]=t[i]}),r}function Zo(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 Hf={exports:{}},$e={};/**
|
|
2325
|
+
*/const eI="auth-compat";function tI(e){e.INTERNAL.registerComponent(new Un(eI,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Al(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:_r.EMAIL_SIGNIN,PASSWORD_RESET:_r.PASSWORD_RESET,RECOVER_EMAIL:_r.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:_r.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:_r.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:_r.VERIFY_EMAIL}},EmailAuthProvider:qn,FacebookAuthProvider:gn,GithubAuthProvider:vn,GoogleAuthProvider:mn,OAuthProvider:Lr,SAMLAuthProvider:$o,PhoneAuthProvider:Tl,PhoneMultiFactorGenerator:Cf,RecaptchaVerifier:Zw,TwitterAuthProvider:bn,Auth:Al,AuthCredential:Rr,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Mw,Lw)}tI(Yn);let Lf=!1;const zi=e=>{if(Lf)return Yn.auth();if(e&&e==="dev"){Yn.initializeApp({apiKey:"api_key"});const n=fw();tl(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"};Yn.initializeApp(n)}return Lf=!0,Yn.auth()},nI=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":"https://client.fansunitedapi.com/v1";class rI{constructor(t,n){oe(this,"apiKey","");oe(this,"clientId","");oe(this,"environment","");oe(this,"mainQueryParams",{key:"",client_id:""});oe(this,"headers",{"Content-Type":"application/json"});oe(this,"clientApiBaseUrl","");oe(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");oe(this,"sportal365Config",null);oe(this,"generateSignedInUrl",t=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));oe(this,"storeInBucket",(t,n,r)=>k(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)}));oe(this,"fetchImagesFromSportal365",(t,n,r)=>k(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=X(U({},o),{from:n.from})),n.to&&(o=X(U({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));oe(this,"getSchedulersByEntityId",t=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"setSchedulers",(t,n,r)=>k(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:X(U({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(t),method:o})}));oe(this,"deleteScheduledTask",t=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(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}`);oe(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)});oe(this,"getToken",()=>k(this,null,function*(){const t=zi(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=nI(this.environment)}}const iI=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":"https://loyalty.fansunitedapi.com/v1",oI=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":"https://prediction.fansunitedapi.com/v1",aI=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":"https://mini-games.fansunitedapi.com/v1",sI=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":"https://reporting.fansunitedapi.com/v1",lI=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":"https://voting.fansunitedapi.com/v1",cI=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1/custom/bracket/resolve?":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1/custom/bracket/resolve?":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1/custom/bracket/resolve?":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1/custom/bracket/resolve?",uI=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":"https://profile.fansunitedapi.com/v1";class dI extends rI{constructor(n,r){super(n,r);oe(this,"loyaltyBaseUrl","");oe(this,"predictionBaseUrl","");oe(this,"miniGamesApiBaseUrl","");oe(this,"reportingApiBaseUrl","");oe(this,"votingApiBaseUrl","");oe(this,"profileApiBaseUrl","");oe(this,"customResolverUrl","");oe(this,"getClientById",()=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"createTemplate",n=>k(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"editTemplate",(n,r)=>k(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deleteTemplate",n=>k(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"setWinners",n=>k(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"exportDetailedLeaderboard",(n,r)=>k(this,null,function*(){const i=`/leaderboard/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(X(U({},this.mainQueryParams),{limit:r.toString()})),{headers:X(U({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"exportDetailedGameLeaderboard",(n,r)=>k(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(X(U({},this.mainQueryParams),{limit:r.toString()})),{headers:X(U({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"createGame",n=>k(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"editGame",(n,r)=>k(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));oe(this,"getClassicQuizFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));oe(this,"getEitherOrFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));oe(this,"getPollFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));oe(this,"createClassicQuiz",n=>k(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateClassicQuiz",(n,r)=>k(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"getClassicQuizById",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"deleteClassicQuiz",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"calculateQuestionsReport",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));oe(this,"exportUsers",n=>k(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"getClassicQuizParticipations",(n,r,i,o)=>k(this,null,function*(){const a="/classic-quizzes/participations?",l=X(U({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(l),{headers:X(U({},this.headers),{Authorization:"Bearer "+s})})}));oe(this,"getEntityParticipations",(n,r,i)=>k(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=X(U({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:X(U({},this.headers),{Authorization:"Bearer "+l})})}));oe(this,"createPoll",n=>k(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updatePoll",(n,r)=>k(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deletePoll",n=>k(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"getEitherOrById",n=>k(this,null,function*(){const r=`/either-or/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"createEitherOr",n=>k(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateEitherOr",(n,r)=>k(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deleteEitherOr",n=>k(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));oe(this,"getLists",(n,r,i="DESC")=>k(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:X(U({},this.headers),{Authorization:"Bearer "+l})})}));oe(this,"getListById",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"getListContent",(n,r,i="DESC",o)=>k(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,l={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(l.page=o.toString());const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(l),{headers:X(U({},this.headers),{Authorization:"Bearer "+s})})}));oe(this,"createList",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateList",(n,r)=>k(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:X(U({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"deleteList",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));oe(this,"getLanguageConfig",()=>k(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:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"updateLanguageConfig",n=>k(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:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));oe(this,"createBracketGame",n=>k(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));oe(this,"updateBracketGame",(n,r)=>k(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:X(U({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));oe(this,"resolvePredictions",n=>k(this,null,function*(){const i=yield this.getToken();return yield fetch(this.customResolverUrl+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:X(U({},this.headers),{Authorization:"Bearer "+i}),signal:AbortSignal.timeout(6e5)})}));oe(this,"exportLeadsPerEntity",n=>k(this,null,function*(){const r="/leads/export?",i=X(U({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:X(U({},this.headers),{Authorization:"Bearer "+o})})}));oe(this,"getLeadStatistics",n=>k(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(U(U({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:X(U({},this.headers),{Authorization:"Bearer "+i})})}));oe(this,"exportLeads",n=>k(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(U(U({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:X(U({},this.headers),{Authorization:"Bearer "+i})})}));this.loyaltyBaseUrl=iI(n.environment),this.predictionBaseUrl=oI(n.environment),this.miniGamesApiBaseUrl=aI(n.environment),this.reportingApiBaseUrl=sI(n.environment),this.votingApiBaseUrl=lI(n.environment),this.profileApiBaseUrl=uI(n.environment),this.customResolverUrl=cI(n.environment)}}const fI=(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"}`},Xo=C.createContext(null),hI=({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=fI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new dI(n,r);return u.jsx(Xo.Provider,{value:{sdk:i,https:o},children:t})},Bf=C.createContext(null),pI=({children:e,environment:t})=>{const[n,r]=C.useState(null),[i,o]=C.useState(!0);return C.useEffect(()=>zi(t).onAuthStateChanged(l=>{Oe.unstable_batchedUpdates(()=>{o(!1),r(l)})}),[t]),u.jsx(Bf.Provider,{value:n,children:!i&&e})};function D(){return D=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},D.apply(null,arguments)}function Ae(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 $f={exports:{}},gI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mI=gI,vI=mI;function Nf(){}function Ff(){}Ff.resetWarningCache=Nf;var bI=function(){function e(r,i,o,a,l,s){if(s!==vI){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}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:Ff,resetWarningCache:Nf};return n.PropTypes=n,n};$f.exports=bI();var yI=$f.exports;function xI(e){return typeof e=="string"}function CI(e,t,n){return e===void 0||xI(e)?t:D({},t,{ownerState:D({},t.ownerState,n)})}function zf(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Mn(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 wI(e,t,n){return typeof e=="function"?e(t,n):e}function II(e){const{rootElementName:t="",componentName:n}=e,[r,i]=j.useState(t.toUpperCase()),o=j.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function SI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return j.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{SI(n,t)})},e)}function jf(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=jf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ln(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jf(e))&&(r&&(r+=" "),r+=t);return r}function Vf(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 AI(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=Ln(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=D({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=D({},n,i,r);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=Mn(D({},i,r)),l=Vf(r),s=Vf(i),c=t(a),d=Ln(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=D({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=D({},c,n,s,l);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function Xn(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 Uf(e){if(j.isValidElement(e)||!Xn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Uf(e[n])}),t}function Bn(e,t,n={clone:!0}){const r=n.clone?D({},e):e;return Xn(e)&&Xn(t)&&Object.keys(t).forEach(i=>{j.isValidElement(t[i])?r[i]=t[i]:Xn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Xn(e[i])?r[i]=Bn(e[i],t[i],n):n.clone?r[i]=Xn(t[i])?Uf(t[i]):t[i]:r[i]=t[i]}),r}function Zo(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 Hf={exports:{}},$e={};/**
|
|
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 El=Symbol.for("react.transitional.element"),_l=Symbol.for("react.portal"),ea=Symbol.for("react.fragment"),ta=Symbol.for("react.strict_mode"),na=Symbol.for("react.profiler"),ra=Symbol.for("react.consumer"),ia=Symbol.for("react.context"),oa=Symbol.for("react.forward_ref"),aa=Symbol.for("react.suspense"),sa=Symbol.for("react.suspense_list"),la=Symbol.for("react.memo"),ca=Symbol.for("react.lazy"),TI=Symbol.for("react.offscreen"),EI=Symbol.for("react.client.reference");function Xt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case El:switch(e=e.type,e){case ea:case na:case ta:case aa:case sa:return e;default:switch(e=e&&e.$$typeof,e){case ia:case oa:case ca:case la:return e;case ra:return e;default:return t}}case _l:return t}}}$e.ContextConsumer=ra,$e.ContextProvider=ia,$e.Element=El,$e.ForwardRef=oa,$e.Fragment=ea,$e.Lazy=ca,$e.Memo=la,$e.Portal=_l,$e.Profiler=na,$e.StrictMode=ta,$e.Suspense=aa,$e.SuspenseList=sa,$e.isContextConsumer=function(e){return Xt(e)===ra},$e.isContextProvider=function(e){return Xt(e)===ia},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===El},$e.isForwardRef=function(e){return Xt(e)===oa},$e.isFragment=function(e){return Xt(e)===ea},$e.isLazy=function(e){return Xt(e)===ca},$e.isMemo=function(e){return Xt(e)===la},$e.isPortal=function(e){return Xt(e)===_l},$e.isProfiler=function(e){return Xt(e)===na},$e.isStrictMode=function(e){return Xt(e)===ta},$e.isSuspense=function(e){return Xt(e)===aa},$e.isSuspenseList=function(e){return Xt(e)===sa},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ea||e===na||e===ta||e===aa||e===sa||e===TI||typeof e=="object"&&e!==null&&(e.$$typeof===ca||e.$$typeof===la||e.$$typeof===ia||e.$$typeof===ra||e.$$typeof===oa||e.$$typeof===EI||e.getModuleId!==void 0)},$e.typeOf=Xt,Hf.exports=$e;var Wf=Hf.exports;function ye(e){if(typeof e!="string")throw new Error(Zo(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Gf(e,t){var n,r;return z.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 _I=typeof window!="undefined"?z.useLayoutEffect:z.useEffect;let Yf=0;function kI(e){const[t,n]=z.useState(e),r=e||t;return z.useEffect(()=>{t==null&&(Yf+=1,n(`mui-${Yf}`))},[t]),r}const Kf=z.useId;function ji(e){if(Kf!==void 0){const t=Kf();return e!=null?e:t}return kI(e)}function kl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=z.useRef(e!==void 0),[o,a]=z.useState(t),l=i?e:o,s=z.useCallback(c=>{i||a(c)},[]);return[l,s]}class Pl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Pl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let ua=!0,Dl=!1;const PI=new Pl,DI={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 OI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&DI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function RI(e){e.metaKey||e.altKey||e.ctrlKey||(ua=!0)}function Ol(){ua=!1}function MI(){this.visibilityState==="hidden"&&Dl&&(ua=!0)}function LI(e){e.addEventListener("keydown",RI,!0),e.addEventListener("mousedown",Ol,!0),e.addEventListener("pointerdown",Ol,!0),e.addEventListener("touchstart",Ol,!0),e.addEventListener("visibilitychange",MI,!0)}function BI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return ua||OI(t)}function qf(){const e=z.useCallback(i=>{i!=null&&LI(i.ownerDocument)},[]),t=z.useRef(!1);function n(){return t.current?(Dl=!0,PI.start(100,()=>{Dl=!1}),t.current=!1,!0):!1}function r(i){return BI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Qf(e,t){const n=D({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=D({},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]=D({},o),Object.keys(i).forEach(a=>{n[r][a]=Qf(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function lt(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const l=t(a);l!==""&&o.push(l),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const Jf=e=>e,$I=(()=>{let e=Jf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Jf}}})(),NI={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 Xf(e,t,n="Mui"){const r=NI[t];return r?`${n}-${r}`:`${$I.generate(e)}-${t}`}function FI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Xf(e,i,n)}),r}function Rl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:l,rootElementName:s}=e,c=z.useRef(null),[d,f]=z.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:g,ref:m}=qf(),[v,A]=z.useState(!1);t&&!n&&v&&A(!1),z.useEffect(()=>{h.current=v},[v,h]);const[x,b]=II({rootElementName:s!=null?s:r||a?"a":void 0,componentName:"Button"}),S=$=>B=>{var L;v&&B.preventDefault(),(L=$.onMouseLeave)==null||L.call($,B)},y=$=>B=>{var L;g(B),h.current===!1&&A(!1),(L=$.onBlur)==null||L.call($,B)},w=$=>B=>{var L;if(c.current||(c.current=B.currentTarget),p(B),h.current===!0){var U;A(!0),(U=$.onFocusVisible)==null||U.call($,B)}(L=$.onFocus)==null||L.call($,B)},E=()=>{const $=c.current;return x==="BUTTON"||x==="INPUT"&&["button","submit","reset"].includes($==null?void 0:$.type)||x==="A"&&($==null?void 0:$.href)},k=$=>B=>{if(!t){var L;(L=$.onClick)==null||L.call($,B)}},N=$=>B=>{var L;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(L=$.onMouseDown)==null||L.call($,B)},Y=$=>B=>{var L;if((L=$.onKeyDown)==null||L.call($,B),!B.defaultMuiPrevented&&(B.target===B.currentTarget&&!E()&&B.key===" "&&B.preventDefault(),B.target===B.currentTarget&&B.key===" "&&!t&&f(!0),B.target===B.currentTarget&&!E()&&B.key==="Enter"&&!t)){var U;(U=$.onClick)==null||U.call($,B),B.preventDefault()}},W=$=>B=>{var L;if(B.target===B.currentTarget&&f(!1),(L=$.onKeyUp)==null||L.call($,B),B.target===B.currentTarget&&!E()&&!t&&B.key===" "&&!B.defaultMuiPrevented){var U;(U=$.onClick)==null||U.call($,B)}},T=sn(b,i,m,c),H={};return o!==void 0&&(H.tabIndex=o),x==="BUTTON"?(H.type=l!=null?l:"button",n?H["aria-disabled"]=t:H.disabled=t):x==="INPUT"?l&&["button","submit","reset"].includes(l)&&(n?H["aria-disabled"]=t:H.disabled=t):x!==""&&(!r&&!a&&(H.role="button",H.tabIndex=o!=null?o:0),t&&(H["aria-disabled"]=t,H.tabIndex=n?o!=null?o:0:-1)),{getRootProps:($={})=>{const B=D({},Mn(e),Mn($)),L=D({type:l},B,H,$,{onBlur:y(B),onClick:k(B),onFocus:w(B),onKeyDown:Y(B),onKeyUp:W(B),onMouseDown:N(B),onMouseLeave:S(B),ref:T});return delete L.onFocusVisible,L},focusVisible:v,setFocusVisible:A,active:d,rootRef:T}}function zI(e,t){return e===t}const Ml={},Zf=()=>{};function Ll(e,t){const n=D({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function jI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,l=z.useRef(n);z.useEffect(()=>{if(a.current===null)return;const s=Ll(l.current,o);Object.keys(t).forEach(c=>{var d;const f=(d=r[c])!=null?d:zI,h=t[c],p=s[c];if(p==null&&h!=null||p!=null&&h==null||p!=null&&h!=null&&!f(h,p)){var g,m;i==null||i((g=a.current.event)!=null?g:null,c,h,(m=a.current.type)!=null?m:"",t)}}),l.current=t,a.current=null},[l,t,a,i,r,o])}function VI(e){const t=z.useRef(null),{reducer:n,initialState:r,controlledProps:i=Ml,stateComparers:o=Ml,onStateChange:a=Zf,actionContext:l,componentName:s=""}=e;z.useRef(i);const c=z.useCallback((p,g)=>{t.current=g;const m=Ll(p,i);return n(m,g)},[i,n]),[d,f]=z.useReducer(c,r),h=z.useCallback(p=>{f(D({},p,{context:l}))},[l]);return jI({nextState:d,initialState:r,stateComparers:o!=null?o:Ml,onStateChange:a!=null?a:Zf,controlledProps:i,lastActionRef:t}),[Ll(d,i),h]}const UI=z.createContext(void 0);function HI(){return z.useContext(UI)}function WI(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:l=!1,value:s,inputRef:c}=e,d=HI();let f,h,p,g,m;if(d){var v,A,x;f=void 0,h=(v=d.disabled)!=null?v:!1,p=(A=d.error)!=null?A:!1,g=(x=d.required)!=null?x:!1,m=d.value}else f=t,h=n,p=r,g=l,m=s;const{current:b}=z.useRef(m!=null),S=z.useCallback($=>{},[]),y=z.useRef(null),w=sn(y,c,S),[E,k]=z.useState(!1);z.useEffect(()=>{!d&&h&&E&&(k(!1),i==null||i())},[d,h,E,i]);const N=$=>B=>{var L;if(d!=null&&d.disabled){B.stopPropagation();return}if((L=$.onFocus)==null||L.call($,B),d&&d.onFocus){var U;d==null||(U=d.onFocus)==null||U.call(d)}else k(!0)},Y=$=>B=>{var L;(L=$.onBlur)==null||L.call($,B),d&&d.onBlur?d.onBlur():k(!1)},W=$=>(B,...L)=>{var U,q;if(!b&&(B.target||y.current)==null)throw new Error(Zo(17));d==null||(U=d.onChange)==null||U.call(d,B),(q=$.onChange)==null||q.call($,B,...L)},T=$=>B=>{var L;y.current&&B.currentTarget===B.target&&y.current.focus(),(L=$.onClick)==null||L.call($,B)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:($={})=>{const L=D({},{onBlur:i,onChange:o,onFocus:a},Mn($)),U=D({},L,{onBlur:Y(L),onChange:W(L),onFocus:N(L)});return D({},U,{"aria-invalid":p||void 0,defaultValue:f,value:m,required:g,disabled:h},$,{ref:w},U)},getRootProps:($={})=>{const B=Mn(e,["onBlur","onChange","onFocus"]),L=D({},B,Mn($));return D({},$,L,{onClick:T(L)})},inputRef:w,required:g,value:m}}const yt={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 GI(e,t,n,r,i,o){if(n.length===0||!r&&n.every((l,s)=>i(l,s)))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 Dt(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:l,itemComparer:s,focusManagement:c}=n,d=c==="DOM"?0:-1,f=i.length-1,h=e==null?-1:i.findIndex(A=>s(A,e));let p,g,m=!a;switch(t){case"reset":if(d===-1)return null;p=0,g="next",m=!1;break;case"start":p=0,g="next",m=!1;break;case"end":p=f,g="previous",m=!1;break;default:{const A=h+t;A<0?!m&&h!==-1||Math.abs(t)>1?(p=0,g="next"):(p=f,g="previous"):A>f?!m||Math.abs(t)>1?(p=f,g="previous"):(p=0,g="next"):(p=A,g=t>=0?"next":"previous")}}const v=GI(p,g,i,l,o,m);return v===-1&&e!==null&&!o(e,h)?e:(r=i[v])!=null?r:null}function YI(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 eh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:l}=t,s=a.findIndex(d=>r(e,d));if(i(e,s))return t;const c=YI(e,l,o,r);return D({},t,{selectedValues:c,highlightedValue:e})}function KI(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return D({},t,{highlightedValue:Dt(r,"start",n)});case"End":return D({},t,{highlightedValue:Dt(r,"end",n)});case"PageUp":return D({},t,{highlightedValue:Dt(r,-o,n)});case"PageDown":return D({},t,{highlightedValue:Dt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return D({},t,{highlightedValue:Dt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return D({},t,{highlightedValue:Dt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return D({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return D({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:eh(t.highlightedValue,t,n)}return t}function qI(e,t){return t.focusManagement==="DOM"?e:D({},e,{highlightedValue:null})}function QI(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 JI(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,l=t.length>1;let s=l?e.highlightedValue:Dt(e.highlightedValue,1,n);for(let c=0;c<r.length;c+=1){if(!s||!l&&e.highlightedValue===s)return e;if(QI(s,t,a)&&(!i(s,r.indexOf(s))||o))return D({},e,{highlightedValue:s});s=Dt(s,1,n)}return e}function XI(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let l=null;if(n.highlightedValue!=null){var s;l=(s=e.find(f=>o(f,n.highlightedValue)))!=null?s:null}else a==="DOM"&&t.length===0&&(l=Dt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return D({},n,{highlightedValue:l,selectedValues:d})}function ZI(e,t){return D({},e,{highlightedValue:Dt(null,"reset",t)})}function eS(e,t){return D({},e,{highlightedValue:Dt(null,"end",t)})}function tS(e,t){return D({},e,{selectedValues:[],highlightedValue:Dt(null,"reset",t)})}function th(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return KI(t.key,e,r);case yt.itemClick:return eh(t.item,e,r);case yt.blur:return qI(e,r);case yt.textNavigation:return JI(e,t.searchString,r);case yt.itemsChange:return XI(t.items,t.previousItems,e,r);case yt.resetHighlight:return ZI(e,r);case yt.highlightLast:return eS(e,r);case yt.clearSelection:return tS(e,r);default:return e}}const nS=500;function rS(e){const t=z.useRef({searchString:"",lastTime:null});return z.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>nS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const nh={},iS=()=>{},oS=(e,t)=>e===t,aS=()=>!1,sS=e=>typeof e=="string"?e:String(e),lS=()=>({highlightedValue:null,selectedValues:[]});function cS(e){const{controlledProps:t=nh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=lS,getItemDomElement:a,getItemId:l,isItemDisabled:s=aS,rootRef:c,onStateChange:d=iS,items:f,itemComparer:h=oS,getItemAsString:p=sS,onChange:g,onHighlightChange:m,onItemsChange:v,orientation:A="vertical",pageSize:x=5,reducerActionContext:b=nh,selectionMode:S="single",stateReducer:y,componentName:w="useList"}=e,E=z.useRef(null),k=sn(c,E),N=z.useCallback((ae,J,le)=>{if(m==null||m(ae,J,le),i==="DOM"&&J!=null&&(le===yt.itemClick||le===yt.keyDown||le===yt.textNavigation)){var ne;a==null||(ne=a(J))==null||ne.focus()}},[a,m,i]),Y=z.useMemo(()=>({highlightedValue:h,selectedValues:(ae,J)=>zf(ae,J,h)}),[h]),W=z.useCallback((ae,J,le,ne,ge)=>{switch(d==null||d(ae,J,le,ne,ge),J){case"highlightedValue":N(ae,le,ne);break;case"selectedValues":g==null||g(ae,le,ne);break}},[N,g,d]),T=z.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:s,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:N,orientation:A,pageSize:x,selectionMode:S,stateComparers:Y}),[n,r,i,s,h,f,p,N,A,x,S,Y]),H=o(),G=y!=null?y:th,$=z.useMemo(()=>D({},b,T),[b,T]),[B,L]=VI({reducer:G,actionContext:$,initialState:H,controlledProps:t,stateComparers:Y,onStateChange:W,componentName:w}),{highlightedValue:U,selectedValues:q}=B,ee=rS((ae,J)=>L({type:yt.textNavigation,event:J,searchString:ae})),O=z.useRef([]);z.useEffect(()=>{zf(O.current,f,h)||(L({type:yt.itemsChange,event:null,items:f,previousItems:O.current}),O.current=f,v==null||v(f))},[f,h,L,v]);const M=ae=>J=>{var le;if((le=ae.onKeyDown)==null||le.call(ae,J),J.defaultMuiPrevented)return;const ne=["Home","End","PageUp","PageDown"];A==="vertical"?ne.push("ArrowUp","ArrowDown"):ne.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&ne.push(" ","Enter"),ne.includes(J.key)&&J.preventDefault(),L({type:yt.keyDown,key:J.key,event:J}),ee(J)},F=ae=>J=>{var le,ne;(le=ae.onBlur)==null||le.call(ae,J),!J.defaultMuiPrevented&&((ne=E.current)!=null&&ne.contains(J.relatedTarget)||L({type:yt.blur,event:J}))},j=(ae={})=>{const J=Mn(ae);return D({},ae,{"aria-activedescendant":i==="activeDescendant"&&U!=null?l(U):void 0,tabIndex:i==="DOM"?-1:0,ref:k},J,{onBlur:F(J),onKeyDown:M(J)})},te=z.useCallback(ae=>{const J=(q!=null?q:[]).some(ge=>ge!=null&&h(ae,ge)),le=U!=null&&h(ae,U);return{focusable:i==="DOM",highlighted:le,selected:J}},[h,q,U,i]),se=z.useMemo(()=>({dispatch:L,getItemState:te}),[L,te]);return z.useDebugValue({state:B}),{contextValue:se,dispatch:L,getRootProps:j,rootRef:k,state:B}}const rh=z.createContext(null);function uS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=z.useContext(rh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:l,focusable:s}=o(n),c=z.useCallback(p=>g=>{var m;(m=p.onClick)==null||m.call(p,g),!g.defaultPrevented&&i({type:yt.itemClick,item:n,event:g})},[i,n]),d=z.useCallback(p=>g=>{var m;(m=p.onMouseOver)==null||m.call(p,g),!g.defaultPrevented&&i({type:yt.itemHover,item:n,event:g})},[i,n]);let f;return s&&(f=a?0:-1),{getRootProps:(p={})=>{const g=Mn(p);return D({},p,{onClick:c(g),onPointerOver:t?d(g):void 0,tabIndex:f})},highlighted:a,selected:l}}const Bl=z.createContext(null);function dS(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 ih(){const[e,t]=z.useState(new Map),n=z.useRef(new Set),r=z.useCallback(function(c){n.current.delete(c),t(d=>{const f=new Map(d);return f.delete(c),f})},[]),i=z.useCallback(function(c,d){let f;return typeof c=="function"?f=c(n.current):f=c,n.current.add(f),t(h=>{const p=new Map(h);return p.set(f,d),p}),{id:f,deregister:()=>r(f)}},[r]),o=z.useMemo(()=>dS(e),[e]),a=z.useCallback(function(c){return Array.from(o.keys()).indexOf(c)},[o]);return{contextValue:z.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function oh(e,t){const n=z.useContext(Bl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=z.useState(typeof e=="function"?void 0:e);return _I(()=>{const{id:a,deregister:l}=r(e,t);return o(a),l},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function fS(e,t){return function(r={}){const i=D({},r,e(r));return D({},i,t(i))}}const hS=Math.min,pS=Math.max,da=Math.round,fa=Math.floor,ha=e=>({x:e,y:e});function gS(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 ah(e){return lh(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sh(e){var t;return(t=(lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lh(e){return e instanceof Node||e instanceof $n(e).Node}function mS(e){return e instanceof Element||e instanceof $n(e).Element}function $l(e){return e instanceof HTMLElement||e instanceof $n(e).HTMLElement}function ch(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function uh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Nl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function vS(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bS(e){return["html","body","#document"].includes(ah(e))}function Nl(e){return $n(e).getComputedStyle(e)}function yS(e){if(ah(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ch(e)&&e.host||sh(e);return ch(t)?t.host:t}function dh(e){const t=yS(e);return bS(t)?e.ownerDocument?e.ownerDocument.body:e.body:$l(t)&&uh(t)?t:dh(t)}function pa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=dh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=$n(i);if(o){const l=Fl(a);return t.concat(a,a.visualViewport||[],uh(i)?i:[],l&&n?pa(l):[])}return t.concat(i,pa(i,[],n))}function Fl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xS(e){const t=Nl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=$l(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=da(n)!==o||da(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function zl(e){return mS(e)?e:e.contextElement}function fh(e){const t=zl(e);if(!$l(t))return ha(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=xS(t);let a=(o?da(n.width):n.width)/r,l=(o?da(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const CS=ha(0);function wS(e){const t=$n(e);return!vS()||!t.visualViewport?CS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IS(e,t,n){return!1}function hh(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=zl(e);let a=ha(1);t&&(a=fh(e));const l=IS()?wS(o):ha(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const h=$n(o),p=r;let g=h,m=Fl(g);for(;m&&r&&p!==g;){const v=fh(m),A=m.getBoundingClientRect(),x=Nl(m),b=A.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,S=A.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;s*=v.x,c*=v.y,d*=v.x,f*=v.y,s+=b,c+=S,g=$n(m),m=Fl(g)}}return gS({width:d,height:f,x:s,y:c})}function SS(e,t){let n=null,r;const i=sh(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),o();const{left:c,top:d,width:f,height:h}=e.getBoundingClientRect();if(l||t(),!f||!h)return;const p=fa(d),g=fa(i.clientWidth-(c+f)),m=fa(i.clientHeight-(d+h)),v=fa(c),x={rootMargin:-p+"px "+-g+"px "+-m+"px "+-v+"px",threshold:pS(0,hS(1,s))||1};let b=!0;function S(y){const w=y[0].intersectionRatio;if(w!==s){if(!b)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,X(V({},x),{root:i.ownerDocument}))}catch(y){n=new IntersectionObserver(S,x)}n.observe(e)}return a(!0),o}function AS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,c=zl(e),d=i||o?[...c?pa(c):[],...pa(t)]:[];d.forEach(A=>{i&&A.addEventListener("scroll",n,{passive:!0}),o&&A.addEventListener("resize",n)});const f=c&&l?SS(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(A=>{let[x]=A;x&&x.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),c&&!s&&p.observe(c),p.observe(t));let g,m=s?hh(e):null;s&&v();function v(){const A=hh(e);m&&(A.x!==m.x||A.y!==m.y||A.width!==m.width||A.height!==m.height)&&n(),m=A,g=requestAnimationFrame(v)}return n(),()=>{var A;d.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f==null||f(),(A=p)==null||A.disconnect(),p=null,s&&cancelAnimationFrame(g)}}function TS(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:l,readOnly:s,required:c}=e,[d,f]=kl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=k=>N=>{var Y;N.nativeEvent.defaultPrevented||(f(N.target.checked),o==null||o(N),(Y=k.onChange)==null||Y.call(k,N))},{isFocusVisibleRef:p,onBlur:g,onFocus:m,ref:v}=qf(),[A,x]=z.useState(!1);r&&A&&x(!1),z.useEffect(()=>{p.current=A},[A,p]);const b=z.useRef(null),S=k=>N=>{var Y;b.current||(b.current=N.currentTarget),m(N),p.current===!0&&(x(!0),l==null||l(N)),a==null||a(N),(Y=k.onFocus)==null||Y.call(k,N)},y=k=>N=>{var Y;g(N),p.current===!1&&x(!1),i==null||i(N),(Y=k.onBlur)==null||Y.call(k,N)},w=sn(v,b);return{checked:d,disabled:!!r,focusVisible:A,getInputProps:(k={})=>D({checked:t,defaultChecked:n,disabled:r,readOnly:s,ref:w,required:c,type:"checkbox",role:"switch","aria-checked":t},k,{onChange:h(k),onFocus:S(k),onBlur:y(k)}),inputRef:w,readOnly:!!s}}function ES(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[l,s]=kl({controlled:t,default:n,name:"Tabs",state:"value"}),c=z.useCallback((v,A)=>{s(A),r==null||r(v,A)},[r,s]),{subitems:d,contextValue:f}=ih(),h=z.useRef(()=>{}),p=z.useCallback(v=>{var A;return(A=d.get(v))==null?void 0:A.id},[d]),g=z.useCallback(v=>h.current(v),[]),m=z.useCallback(v=>{h.current=v},[]);return{contextValue:D({direction:o,getTabId:g,getTabPanelId:p,onSelected:c,orientation:i,registerTabIdLookup:m,selectionFollowsFocus:a,value:l},f)}}const ph=z.createContext(null);function ga(){const e=z.useContext(ph);if(e==null)throw new Error("No TabsContext provided");return e}function _S(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:l,registerTabIdLookup:s,selectionFollowsFocus:c,totalSubitemCount:d,value:f,getTabId:h,getTabPanelId:p}=t,g=z.useMemo(()=>({getItemIndex:i,registerItem:l,totalSubitemCount:d}),[l,i,d]),m=z.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:p,onSelected:o,orientation:a,registerTabIdLookup:s,selectionFollowsFocus:c,value:f}),[r,h,p,o,a,s,c,f]);return u.jsx(Bl.Provider,{value:g,children:u.jsx(ph.Provider,{value:m,children:n})})}function kS(e){return e.size}function PS(e){const{value:t,id:n,rootRef:r}=e,i=ga();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,l=ji(n),s=z.useRef(null),c=sn(s,r),d=z.useMemo(()=>({id:l,ref:s}),[l]),{id:f}=oh(t!=null?t:kS,d),h=f!==o,p=f!==void 0?a(f):void 0;return{hidden:h,getRootProps:(m={})=>D({"aria-labelledby":p!=null?p:void 0,hidden:h,id:l!=null?l:void 0},m,{ref:c}),rootRef:c}}const gh={valueChange:"valueChange"};function DS(e,t){if(t.type===gh.valueChange)return D({},e,{highlightedValue:t.value});const n=th(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===yt.itemsChange){if(n.selectedValues.length>0)return D({},n,{highlightedValue:n.selectedValues[0]});Dt(null,"reset",t.context)}return r&&n.highlightedValue!=null?D({},n,{selectedValues:[n.highlightedValue]}):n}function OS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:l,selectionFollowsFocus:s}=ga(),{subitems:c,contextValue:d}=ih(),f=z.useCallback(W=>{var T;return(T=c.get(W))==null?void 0:T.id},[c]);l(f);const h=z.useMemo(()=>Array.from(c.keys()),[c]),p=z.useCallback(W=>{var T,H;return W==null?null:(T=(H=c.get(W))==null?void 0:H.ref.current)!=null?T:null},[c]),g=r==="rtl";let m;o==="vertical"?m="vertical":m=g?"horizontal-rtl":"horizontal-ltr";const v=z.useCallback((W,T)=>{var H;i(W,(H=T[0])!=null?H:null)},[i]),A=z.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),x=z.useCallback(W=>{var T,H;return(T=(H=c.get(W))==null?void 0:H.disabled)!=null?T:!1},[c]),{contextValue:b,dispatch:S,getRootProps:y,state:{highlightedValue:w,selectedValues:E},rootRef:k}=cS({controlledProps:A,disabledItemsFocusable:!s,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:x,items:h,rootRef:n,onChange:v,orientation:m,reducerActionContext:z.useMemo(()=>({selectionFollowsFocus:s||!1}),[s]),selectionMode:"single",stateReducer:DS});z.useEffect(()=>{a!==void 0&&a!=null&&S({type:gh.valueChange,value:a})},[S,a]);const N=(W={})=>D({},W,y(W),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:z.useMemo(()=>D({},d,b),[d,b]),dispatch:S,getRootProps:N,highlightedValue:w,isRtl:g,orientation:o,rootRef:k,selectedValue:(t=E[0])!=null?t:null}}function RS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:l}=t,s=z.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),c=z.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:l}),[a,i,l]);return u.jsx(Bl.Provider,{value:c,children:u.jsx(rh.Provider,{value:s,children:n})})}function MS(e){return e.size}function LS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=z.useRef(null),a=ji(i),{value:l,selectionFollowsFocus:s,getTabPanelId:c}=ga(),d=z.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=oh(t!=null?t:MS,d),{getRootProps:g,highlighted:m,selected:v}=uS({item:f}),{getRootProps:A,rootRef:x,active:b,focusVisible:S,setFocusVisible:y}=Rl({disabled:r,focusableWhenDisabled:!s,type:"button"}),w=sn(o,n,x),E=f!==void 0?c(f):void 0;return{getRootProps:(N={})=>{const Y=Mn(N),W=fS(g,A);return D({},N,W(Y),{role:"tab","aria-controls":E,"aria-selected":v,id:a,ref:w})},active:b,focusVisible:S,highlighted:m,index:h,rootRef:w,selected:v||f===l,setFocusVisible:y,totalTabsCount:p}}const mh="$$joy";function BS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function $S(e,t){return Lt(e,t)}const NS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},FS=["values","unit","step"],zS=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)=>D({},n,{[r.key]:r.val}),{})};function vh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ae(e,FS),o=zS(t),a=Object.keys(o);function l(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function s(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(h,p){const g=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:p)-r/100}${n})`}function d(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):l(h)}function f(h){const p=a.indexOf(h);return p===0?l(a[1]):p===a.length-1?s(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return D({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const jS={borderRadius:4};function Vi(e,t){return t?Bn(e,t,{clone:!1}):e}const jl={xs:0,sm:600,md:900,lg:1200,xl:1536},bh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${jl[e]}px)`};function Nn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||bh;return t.reduce((a,l,s)=>(a[o.up(o.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const o=r.breakpoints||bh;return Object.keys(t).reduce((a,l)=>{if(Object.keys(o.values||jl).indexOf(l)!==-1){const s=o.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function VS(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function US(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Zn(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 ma(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Zn(e,n)||r,t&&(i=t(i,r,e)),i}function rt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const l=a[t],s=a.theme,c=Zn(s,r)||{};return Nn(a,l,f=>{let h=ma(c,i,f);return f===h&&typeof f=="string"&&(h=ma(c,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function HS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const WS={m:"margin",p:"padding"},GS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},yh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},YS=HS(e=>{if(e.length>2)if(yh[e])e=yh[e];else return[e];const[t,n]=e.split(""),r=WS[t],i=GS[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Vl=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ul=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Vl,...Ul];function Ui(e,t,n,r){var i;const o=(i=Zn(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 xh(e){return Ui(e,"spacing",8)}function Hi(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 KS(e,t){return n=>e.reduce((r,i)=>(r[i]=Hi(t,n),r),{})}function qS(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=YS(n),o=KS(i,r),a=e[n];return Nn(e,a,o)}function Ch(e,t){const n=xh(e.theme);return Object.keys(e).map(r=>qS(e,t,r,n)).reduce(Vi,{})}function Qe(e){return Ch(e,Vl)}Qe.propTypes={},Qe.filterProps=Vl;function Je(e){return Ch(e,Ul)}Je.propTypes={},Je.filterProps=Ul;function wh(e=8){if(e.mui)return e;const t=xh({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 va(...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]?Vi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Zt(e){return typeof e!="number"?e:`${e}px solid`}function en(e,t){return rt({prop:e,themeKey:"borders",transform:t})}const QS=en("border",Zt),JS=en("borderTop",Zt),XS=en("borderRight",Zt),ZS=en("borderBottom",Zt),eA=en("borderLeft",Zt),tA=en("borderColor"),nA=en("borderTopColor"),rA=en("borderRightColor"),iA=en("borderBottomColor"),oA=en("borderLeftColor"),aA=en("outline",Zt),sA=en("outlineColor"),ba=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ui(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Hi(t,r)});return Nn(e,e.borderRadius,n)}return null};ba.propTypes={},ba.filterProps=["borderRadius"],va(QS,JS,XS,ZS,eA,tA,nA,rA,iA,oA,ba,aA,sA);const ya=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({gap:Hi(t,r)});return Nn(e,e.gap,n)}return null};ya.propTypes={},ya.filterProps=["gap"];const xa=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({columnGap:Hi(t,r)});return Nn(e,e.columnGap,n)}return null};xa.propTypes={},xa.filterProps=["columnGap"];const Ca=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({rowGap:Hi(t,r)});return Nn(e,e.rowGap,n)}return null};Ca.propTypes={},Ca.filterProps=["rowGap"];const lA=rt({prop:"gridColumn"}),cA=rt({prop:"gridRow"}),uA=rt({prop:"gridAutoFlow"}),dA=rt({prop:"gridAutoColumns"}),fA=rt({prop:"gridAutoRows"}),hA=rt({prop:"gridTemplateColumns"}),pA=rt({prop:"gridTemplateRows"}),gA=rt({prop:"gridTemplateAreas"}),mA=rt({prop:"gridArea"});va(ya,xa,Ca,lA,cA,uA,dA,fA,hA,pA,gA,mA);function zr(e,t){return t==="grey"?t:e}const vA=rt({prop:"color",themeKey:"palette",transform:zr}),bA=rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:zr}),yA=rt({prop:"backgroundColor",themeKey:"palette",transform:zr});va(vA,bA,yA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const xA=rt({prop:"width",transform:Ht}),Hl=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])||jl[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:Ht(n)}};return Nn(e,e.maxWidth,t)}return null};Hl.filterProps=["maxWidth"];const CA=rt({prop:"minWidth",transform:Ht}),wA=rt({prop:"height",transform:Ht}),IA=rt({prop:"maxHeight",transform:Ht}),SA=rt({prop:"minHeight",transform:Ht});rt({prop:"size",cssProperty:"width",transform:Ht}),rt({prop:"size",cssProperty:"height",transform:Ht});const AA=rt({prop:"boxSizing"});va(xA,Hl,CA,wA,IA,SA,AA);const wa={border:{themeKey:"borders",transform:Zt},borderTop:{themeKey:"borders",transform:Zt},borderRight:{themeKey:"borders",transform:Zt},borderBottom:{themeKey:"borders",transform:Zt},borderLeft:{themeKey:"borders",transform:Zt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Zt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ba},color:{themeKey:"palette",transform:zr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:zr},backgroundColor:{themeKey:"palette",transform:zr},p:{style:Je},pt:{style:Je},pr:{style:Je},pb:{style:Je},pl:{style:Je},px:{style:Je},py:{style:Je},padding:{style:Je},paddingTop:{style:Je},paddingRight:{style:Je},paddingBottom:{style:Je},paddingLeft:{style:Je},paddingX:{style:Je},paddingY:{style:Je},paddingInline:{style:Je},paddingInlineStart:{style:Je},paddingInlineEnd:{style:Je},paddingBlock:{style:Je},paddingBlockStart:{style:Je},paddingBlockEnd:{style:Je},m:{style:Qe},mt:{style:Qe},mr:{style:Qe},mb:{style:Qe},ml:{style:Qe},mx:{style:Qe},my:{style:Qe},margin:{style:Qe},marginTop:{style:Qe},marginRight:{style:Qe},marginBottom:{style:Qe},marginLeft:{style:Qe},marginX:{style:Qe},marginY:{style:Qe},marginInline:{style:Qe},marginInlineStart:{style:Qe},marginInlineEnd:{style:Qe},marginBlock:{style:Qe},marginBlockStart:{style:Qe},marginBlockEnd:{style:Qe},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:ya},rowGap:{style:Ca},columnGap:{style:xa},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ht},maxWidth:{style:Hl},minWidth:{transform:Ht},height:{transform:Ht},maxHeight:{transform:Ht},minHeight:{transform:Ht},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function TA(...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 EA(e,t){return typeof e=="function"?e(t):e}function _A(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:s=n,themeKey:c,transform:d,style:f}=l;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Zn(i,c)||{};return f?f(a):Nn(a,r,g=>{let m=ma(h,d,g);return g===m&&typeof g=="string"&&(m=ma(h,d,`${n}${g==="default"?"":ye(g)}`,g)),s===!1?m:{[s]:m}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:wa;function l(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const d=VS(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const g=EA(c[p],o);if(g!=null)if(typeof g=="object")if(a[p])h=Vi(h,e(p,g,o,a));else{const m=Nn({theme:o},g,v=>({[p]:v}));TA(m,g)?h[p]=t({sx:g,theme:o}):h=Vi(h,m)}else h=Vi(h,e(p,g,o,a))}),US(f,h)}return Array.isArray(i)?i.map(l):l(i)}return t}const Ia=_A();Ia.filterProps=["sx"];function Ih(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 kA=["breakpoints","palette","spacing","shape"];function Sh(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,kA),l=vh(n),s=wh(i);let c=Bn({breakpoints:l,direction:"ltr",components:{},palette:D({mode:"light"},r),spacing:s,shape:D({},jS,o)},a);return c.applyStyles=Ih,c=t.reduce((d,f)=>Bn(d,f),c),c.unstable_sxConfig=D({},wa,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return Ia({sx:f,theme:this})},c}function PA(e){return Object.keys(e).length===0}function DA(e=null){const t=z.useContext(pe.ThemeContext);return!t||PA(t)?e:t}const OA=Sh();function RA(e=OA){return DA(e)}const MA=["sx"],LA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:wa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function BA(e){const{sx:t}=e,n=Ae(e,MA),{systemProps:r,otherProps:i}=LA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const l=t(...a);return Xn(l)?D({},r,l):r}:o=D({},r,t),D({},i,{sx:o})}const $A=["ownerState"],NA=["variants"],FA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function zA(e){return Object.keys(e).length===0}function jA(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const VA=Sh(),UA=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Sa({defaultTheme:e,theme:t,themeId:n}){return zA(t)?e:t[n]||t}function HA(e){return e?(t,n)=>n[e]:null}function Aa(e,t){let{ownerState:n}=t,r=Ae(t,$A);const i=typeof e=="function"?e(D({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Aa(o,D({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let l=Ae(i,NA);return o.forEach(s=>{let c=!0;typeof s.props=="function"?c=s.props(D({ownerState:n},r,n)):Object.keys(s.props).forEach(d=>{(n==null?void 0:n[d])!==s.props[d]&&r[d]!==s.props[d]&&(c=!1)}),c&&(Array.isArray(l)||(l=[l]),l.push(typeof s.style=="function"?s.style(D({ownerState:n},r,n)):s.style))}),l}return i}function WA(e={}){const{themeId:t,defaultTheme:n=VA,rootShouldForwardProp:r=Wl,slotShouldForwardProp:i=Wl}=e,o=a=>Ia(D({},a,{theme:Sa(D({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,l={})=>{NS(a,y=>y.filter(w=>!(w!=null&&w.__mui_systemSx)));const{name:s,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:h=HA(UA(c))}=l,p=Ae(l,FA),g=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,m=f||!1;let v,A=Wl;c==="Root"||c==="root"?A=r:c?A=i:jA(a)&&(A=void 0);const x=$S(a,D({shouldForwardProp:A,label:v},p)),b=y=>typeof y=="function"&&y.__emotion_real!==y||Xn(y)?w=>Aa(y,D({},w,{theme:Sa({theme:w.theme,defaultTheme:n,themeId:t})})):y,S=(y,...w)=>{let E=b(y);const k=w?w.map(b):[];s&&h&&k.push(W=>{const T=Sa(D({},W,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[s]||!T.components[s].styleOverrides)return null;const H=T.components[s].styleOverrides,G={};return Object.entries(H).forEach(([$,B])=>{G[$]=Aa(B,D({},W,{theme:T}))}),h(W,G)}),s&&!g&&k.push(W=>{var T;const H=Sa(D({},W,{defaultTheme:n,themeId:t})),G=H==null||(T=H.components)==null||(T=T[s])==null?void 0:T.variants;return Aa({variants:G},D({},W,{theme:H}))}),m||k.push(o);const N=k.length-w.length;if(Array.isArray(y)&&N>0){const W=new Array(N).fill("");E=[...y,...W],E.raw=[...y.raw,...W]}const Y=x(E,...k);return a.muiName&&(Y.muiName=a.muiName),Y};return x.withConfig&&(S.withConfig=x.withConfig),S}}function GA(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Qf(t.components[n].defaultProps,r)}function YA({props:e,name:t,defaultTheme:n,themeId:r}){let i=RA(n);return r&&(i=i[r]||i),GA({theme:i,name:t,props:e})}function KA(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 Ah(e){if(e.type)return e;if(e.charAt(0)==="#")return Ah(KA(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Zo(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(Zo(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const mr=e=>{const t=Ah(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function Gl(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 Th=(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])})},qA=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,s])=>{(!n||n&&!n([...o,l]))&&s!=null&&(typeof s=="object"&&Object.keys(s).length>0?r(s,[...o,l],Array.isArray(s)?[...a,l]:a):t([...o,l],s,a))})}r(e)},QA=(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 Yl(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return qA(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`;Object.assign(i,{[d]:QA(l,s)}),Th(o,l,`var(${d})`,c),Th(a,l,`var(${d}, ${s})`,c)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function vr(e){"@babel/helpers - typeof";return vr=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},vr(e)}function JA(e,t){if(vr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Kl(e){var t=JA(e,"string");return vr(t)=="symbol"?t:t+""}const XA=["colorSchemes","components","defaultColorScheme"];function ZA(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,XA),{vars:o,css:a,varsWithDefaults:l}=Yl(i,t);let s=l;const c={},{[r]:d}=n,f=Ae(n,[r].map(Kl));if(Object.entries(f||{}).forEach(([p,g])=>{const{vars:m,css:v,varsWithDefaults:A}=Yl(g,t);s=Bn(s,A),c[p]={css:v,vars:m}}),d){const{css:p,vars:g,varsWithDefaults:m}=Yl(d,t);s=Bn(s,m),c[r]={css:p,vars:g}}return{vars:s,generateCssVars:p=>{var g;if(!p){var m;const A=D({},a);return{css:A,vars:o,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,A))||":root"}}const v=D({},c[p].css);return{css:v,vars:c[p].vars,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,v))||":root"}}}}const e1=D({},wa,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),Wi={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 t1(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 it=(e,t)=>Xf(e,t,"Mui"),Xe=(e,t)=>FI(e,t,"Mui"),n1=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))$/)}),Eh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},_h=(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")),Eh(r,i,a)}}),r},Tt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,l]=o;n1(l)&&typeof l=="object"&&(n=D({},n,{[a]:_h(e,l,s=>`var(--variant-${s}, ${r(`palette-${a}-${s}`,i[a][s])})`)}))})}return n.context=_h(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},r1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],i1=["colorSchemes"],o1=(e="joy")=>Gl(e);function a1(e){var t,n,r,i,o,a,l,s,c,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:g,components:m,variants:v,shouldSkipGeneratingVar:A=t1}=f,x=Ae(f,r1),b=o1(h),S={primary:Wi.blue,neutral:Wi.grey,danger:Wi.red,success:Wi.green,warning:Wi.yellow,common:{white:"#FFF",black:"#000"}},y=J=>{var le;const ne=J.split("-"),ge=ne[1],Se=ne[2];return b(J,(le=S[ge])==null?void 0:le[Se])},w=J=>({plainColor:y(`palette-${J}-500`),plainHoverBg:y(`palette-${J}-100`),plainActiveBg:y(`palette-${J}-200`),plainDisabledColor:y("palette-neutral-400"),outlinedColor:y(`palette-${J}-500`),outlinedBorder:y(`palette-${J}-300`),outlinedHoverBg:y(`palette-${J}-100`),outlinedActiveBg:y(`palette-${J}-200`),outlinedDisabledColor:y("palette-neutral-400"),outlinedDisabledBorder:y("palette-neutral-200"),softColor:y(`palette-${J}-700`),softBg:y(`palette-${J}-100`),softHoverBg:y(`palette-${J}-200`),softActiveColor:y(`palette-${J}-800`),softActiveBg:y(`palette-${J}-300`),softDisabledColor:y("palette-neutral-400"),softDisabledBg:y("palette-neutral-50"),solidColor:y("palette-common-white"),solidBg:y(`palette-${J}-500`),solidHoverBg:y(`palette-${J}-600`),solidActiveBg:y(`palette-${J}-700`),solidDisabledColor:y("palette-neutral-400"),solidDisabledBg:y("palette-neutral-100")}),E=J=>({plainColor:y(`palette-${J}-300`),plainHoverBg:y(`palette-${J}-800`),plainActiveBg:y(`palette-${J}-700`),plainDisabledColor:y("palette-neutral-500"),outlinedColor:y(`palette-${J}-200`),outlinedBorder:y(`palette-${J}-700`),outlinedHoverBg:y(`palette-${J}-800`),outlinedActiveBg:y(`palette-${J}-700`),outlinedDisabledColor:y("palette-neutral-500"),outlinedDisabledBorder:y("palette-neutral-800"),softColor:y(`palette-${J}-200`),softBg:y(`palette-${J}-800`),softHoverBg:y(`palette-${J}-700`),softActiveColor:y(`palette-${J}-100`),softActiveBg:y(`palette-${J}-600`),softDisabledColor:y("palette-neutral-500"),softDisabledBg:y("palette-neutral-800"),solidColor:y("palette-common-white"),solidBg:y(`palette-${J}-500`),solidHoverBg:y(`palette-${J}-600`),solidActiveBg:y(`palette-${J}-700`),solidDisabledColor:y("palette-neutral-500"),solidDisabledBg:y("palette-neutral-800")}),k={palette:{mode:"light",primary:D({},S.primary,w("primary")),neutral:D({},S.neutral,w("neutral"),{plainColor:y("palette-neutral-700"),plainHoverColor:y("palette-neutral-900"),outlinedColor:y("palette-neutral-700")}),danger:D({},S.danger,w("danger")),success:D({},S.success,w("success")),warning:D({},S.warning,w("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-800"),secondary:y("palette-neutral-700"),tertiary:y("palette-neutral-600"),icon:y("palette-neutral-500")},background:{body:y("palette-common-white"),surface:y("palette-neutral-50"),popup:y("palette-common-white"),level1:y("palette-neutral-100"),level2:y("palette-neutral-200"),level3:y("palette-neutral-300"),tooltip:y("palette-neutral-500"),backdrop:`rgba(${b("palette-neutral-darkChannel",mr(S.neutral[900]))} / 0.25)`},divider:`rgba(${b("palette-neutral-mainChannel",mr(S.neutral[500]))} / 0.2)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},N={palette:{mode:"dark",primary:D({},S.primary,E("primary")),neutral:D({},S.neutral,E("neutral"),{plainColor:y("palette-neutral-300"),plainHoverColor:y("palette-neutral-300")}),danger:D({},S.danger,E("danger")),success:D({},S.success,E("success")),warning:D({},S.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-100"),secondary:y("palette-neutral-300"),tertiary:y("palette-neutral-400"),icon:y("palette-neutral-400")},background:{body:y("palette-common-black"),surface:y("palette-neutral-900"),popup:y("palette-common-black"),level1:y("palette-neutral-800"),level2:y("palette-neutral-700"),level3:y("palette-neutral-600"),tooltip:y("palette-neutral-600"),backdrop:`rgba(${b("palette-neutral-darkChannel",mr(S.neutral[50]))} / 0.25)`},divider:`rgba(${b("palette-neutral-mainChannel",mr(S.neutral[500]))} / 0.16)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},Y='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',W=D({body:`"Inter", ${b(`fontFamily-fallback, ${Y}`)}`,display:`"Inter", ${b(`fontFamily-fallback, ${Y}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:Y},x.fontFamily),T=D({sm:300,md:500,lg:600,xl:700},x.fontWeight),H=D({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},x.fontSize),G=D({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},x.lineHeight),$=(t=(n=x.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:k.shadowRing,B=(r=(i=x.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:k.shadowChannel,L=(o=(a=x.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:k.shadowOpacity,U={colorSchemes:{light:k,dark:N},fontSize:H,fontFamily:W,fontWeight:T,focus:{thickness:"2px",selector:`&.${it("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${b("focus-thickness",(l=(s=x.focus)==null?void 0:s.thickness)!=null?l:"2px")})`,outline:`${b("focus-thickness",(c=(d=x.focus)==null?void 0:d.thickness)!=null?c:"2px")} solid ${b("palette-focusVisible",S.primary[500])}`}},lineHeight:G,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${b("shadowRing",$)}, 0px 1px 2px 0px rgba(${b("shadowChannel",B)} / ${b("shadowOpacity",L)})`,sm:`${b("shadowRing",$)}, 0px 1px 2px 0px rgba(${b("shadowChannel",B)} / ${b("shadowOpacity",L)}), 0px 2px 4px 0px rgba(${b("shadowChannel",B)} / ${b("shadowOpacity",L)})`,md:`${b("shadowRing",$)}, 0px 2px 8px -2px rgba(${b("shadowChannel",B)} / ${b("shadowOpacity",L)}), 0px 6px 12px -2px rgba(${b("shadowChannel",B)} / ${b("shadowOpacity",L)})`,lg:`${b("shadowRing",$)}, 0px 2px 8px -2px rgba(${b("shadowChannel",B)} / ${b("shadowOpacity",L)}), 0px 12px 16px -4px rgba(${b("shadowChannel",B)} / ${b("shadowOpacity",L)})`,xl:`${b("shadowRing",$)}, 0px 2px 8px -2px rgba(${b("shadowChannel",B)} / ${b("shadowOpacity",L)}), 0px 20px 24px -4px rgba(${b("shadowChannel",B)} / ${b("shadowOpacity",L)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:b(`fontFamily-display, ${W.display}`),fontWeight:b(`fontWeight-xl, ${T.xl}`),fontSize:b(`fontSize-xl4, ${H.xl4}`),lineHeight:b(`lineHeight-xs, ${G.xs}`),letterSpacing:"-0.025em",color:b(`palette-text-primary, ${k.palette.text.primary}`)},h2:{fontFamily:b(`fontFamily-display, ${W.display}`),fontWeight:b(`fontWeight-xl, ${T.xl}`),fontSize:b(`fontSize-xl3, ${H.xl3}`),lineHeight:b(`lineHeight-xs, ${G.xs}`),letterSpacing:"-0.025em",color:b(`palette-text-primary, ${k.palette.text.primary}`)},h3:{fontFamily:b(`fontFamily-display, ${W.display}`),fontWeight:b(`fontWeight-lg, ${T.lg}`),fontSize:b(`fontSize-xl2, ${H.xl2}`),lineHeight:b(`lineHeight-xs, ${G.xs}`),letterSpacing:"-0.025em",color:b(`palette-text-primary, ${k.palette.text.primary}`)},h4:{fontFamily:b(`fontFamily-display, ${W.display}`),fontWeight:b(`fontWeight-lg, ${T.lg}`),fontSize:b(`fontSize-xl, ${H.xl}`),lineHeight:b(`lineHeight-md, ${G.md}`),letterSpacing:"-0.025em",color:b(`palette-text-primary, ${k.palette.text.primary}`)},"title-lg":{fontFamily:b(`fontFamily-body, ${W.body}`),fontWeight:b(`fontWeight-lg, ${T.lg}`),fontSize:b(`fontSize-lg, ${H.lg}`),lineHeight:b(`lineHeight-xs, ${G.xs}`),color:b(`palette-text-primary, ${k.palette.text.primary}`)},"title-md":{fontFamily:b(`fontFamily-body, ${W.body}`),fontWeight:b(`fontWeight-md, ${T.md}`),fontSize:b(`fontSize-md, ${H.md}`),lineHeight:b(`lineHeight-md, ${G.md}`),color:b(`palette-text-primary, ${k.palette.text.primary}`)},"title-sm":{fontFamily:b(`fontFamily-body, ${W.body}`),fontWeight:b(`fontWeight-md, ${T.md}`),fontSize:b(`fontSize-sm, ${H.sm}`),lineHeight:b(`lineHeight-sm, ${G.sm}`),color:b(`palette-text-primary, ${k.palette.text.primary}`)},"body-lg":{fontFamily:b(`fontFamily-body, ${W.body}`),fontSize:b(`fontSize-lg, ${H.lg}`),lineHeight:b(`lineHeight-md, ${G.md}`),color:b(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-md":{fontFamily:b(`fontFamily-body, ${W.body}`),fontSize:b(`fontSize-md, ${H.md}`),lineHeight:b(`lineHeight-md, ${G.md}`),color:b(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-sm":{fontFamily:b(`fontFamily-body, ${W.body}`),fontSize:b(`fontSize-sm, ${H.sm}`),lineHeight:b(`lineHeight-md, ${G.md}`),color:b(`palette-text-tertiary, ${k.palette.text.tertiary}`)},"body-xs":{fontFamily:b(`fontFamily-body, ${W.body}`),fontWeight:b(`fontWeight-md, ${T.md}`),fontSize:b(`fontSize-xs, ${H.xs}`),lineHeight:b(`lineHeight-md, ${G.md}`),color:b(`palette-text-tertiary, ${k.palette.text.tertiary}`)}}},q=x?Bn(U,x):U,{colorSchemes:ee}=q,O=Ae(q,i1),M=D({colorSchemes:ee},O,{breakpoints:vh(p!=null?p:{}),components:Bn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:J,theme:le})=>{var ne;const ge=J.instanceFontSize;return D({margin:"var(--Icon-margin)"},J.fontSize&&J.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${le.vars.fontSize[J.fontSize]})`},!J.htmlColor&&D({color:`var(--Icon-color, ${M.vars.palette.text.icon})`},J.color&&J.color!=="inherit"&&le.vars.palette[J.color]&&{color:`rgba(${(ne=le.vars.palette[J.color])==null?void 0:ne.mainChannel} / 1)`}),ge&&ge!=="inherit"&&{"--Icon-fontSize":le.vars.fontSize[ge]})}}}},m),cssVarPrefix:h,getCssVar:b,spacing:wh(g)});function F(J,le){Object.keys(le).forEach(ne=>{const ge={main:"500",light:"200",dark:"700"};J==="dark"&&(ge.main=400),!le[ne].mainChannel&&le[ne][ge.main]&&(le[ne].mainChannel=mr(le[ne][ge.main])),!le[ne].lightChannel&&le[ne][ge.light]&&(le[ne].lightChannel=mr(le[ne][ge.light])),!le[ne].darkChannel&&le[ne][ge.dark]&&(le[ne].darkChannel=mr(le[ne][ge.dark]))})}Object.entries(M.colorSchemes).forEach(([J,le])=>{F(J,le.palette)});const j={prefix:h,shouldSkipGeneratingVar:A},{vars:te,generateCssVars:se}=ZA(D({colorSchemes:ee},O),j);M.vars=te,M.generateCssVars=se,M.unstable_sxConfig=D({},e1,void 0),M.unstable_sx=function(le){return Ia({sx:le,theme:this})},M.getColorSchemeSelector=J=>J==="light"?"&":`&[data-joy-color-scheme="${J}"], [data-joy-color-scheme="${J}"] &`;const ae={getCssVar:b,palette:M.colorSchemes.light.palette};return M.variants=Bn({plain:Tt("plain",ae),plainHover:Tt("plainHover",ae),plainActive:Tt("plainActive",ae),plainDisabled:Tt("plainDisabled",ae),outlined:Tt("outlined",ae),outlinedHover:Tt("outlinedHover",ae),outlinedActive:Tt("outlinedActive",ae),outlinedDisabled:Tt("outlinedDisabled",ae),soft:Tt("soft",ae),softHover:Tt("softHover",ae),softActive:Tt("softActive",ae),softDisabled:Tt("softDisabled",ae),solid:Tt("solid",ae),solidHover:Tt("solidHover",ae),solidActive:Tt("solidActive",ae),solidDisabled:Tt("solidDisabled",ae)},v),M.palette=D({},M.colorSchemes.light.palette,{colorScheme:"light"}),M.shouldSkipGeneratingVar=A,M.applyStyles=Ih,M}const kh=a1(),be=WA({defaultTheme:kh,themeId:mh});function ct({props:e,name:t}){return YA({props:e,name:t,defaultTheme:D({},kh,{components:{}}),themeId:mh})}function s1(e){return it("MuiAccordion",e)}const l1=Xe("MuiAccordion",["root","expanded","disabled"]),c1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],u1=["component","slots","slotProps"],d1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:l}=t,s=Ae(t,c1),{component:c,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,u1),p=d[e]||r,g=wI(f[e],i),m=AI(D({className:n},s,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:g})),{props:{component:v},internalRef:A}=m,x=Ae(m.props,d1),b=sn(A,g==null?void 0:g.ref,t.ref),S=a?a(x):{},y=D({},i,S),w=e==="root"?v||c:v,E=CI(p,D({},e==="root"&&!c&&!d[e]&&l,e!=="root"&&!d[e]&&l,x,w&&{as:w},{ref:b}),y);return Object.keys(S).forEach(k=>{delete E[k]}),[p,E]}const ql=z.createContext({});function f1(e){return it("MuiListItem",e)}const Ph=Xe("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Ta=z.createContext(!1),Ql=z.createContext(!1),Dh=z.createContext(!1),Oh=z.createContext(void 0),h1=z.createContext(void 0),Rh=z.createContext(void 0),p1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],g1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${ye(o)}`,i&&`variant${ye(i)}`],startAction:["startAction"],endAction:["endAction"]};return lt(a,f1,{})},Jl=be("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"},D({"--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&&D({},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})`},{[`.${Ph.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),m1=be(Jl,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),v1=be("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})),b1=be("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%)"})),Mh=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyListItem"}),i=z.useContext(Rh),o=z.useContext(Oh),a=z.useContext(Ql),l=z.useContext(Dh),s=z.useContext(Ta),{component:c,className:d,children:f,nested:h=!1,sticky:p=!1,variant:g="plain",color:m="neutral",startAction:v,endAction:A,role:x,slots:b={},slotProps:S={}}=r,y=Ae(r,p1),[w,E]=z.useState(""),[k,N]=(o==null?void 0:o.split(":"))||["",""],Y=c||(k&&!k.match(/^(ul|ol|menu)$/)?"div":void 0);let W=i==="menu"?"none":void 0;o&&(W={menu:"none",menubar:"none",group:"presentation"}[N]),x&&(W=x);const T=D({},r,{sticky:p,startAction:v,endAction:A,row:a,wrap:l,variant:g,color:m,nesting:s,nested:h,component:Y,role:W}),H=g1(T),G=D({},y,{component:Y,slots:b,slotProps:S}),[$,B]=Ie("root",{additionalProps:{role:W},ref:n,className:Ln(H.root,d),elementType:m1,externalForwardedProps:G,ownerState:T}),[L,U]=Ie("startAction",{className:H.startAction,elementType:v1,externalForwardedProps:G,ownerState:T}),[q,ee]=Ie("endAction",{className:H.endAction,elementType:b1,externalForwardedProps:G,ownerState:T});return u.jsx(h1.Provider,{value:E,children:u.jsx(Ta.Provider,{value:h?w||!0:!1,children:u.jsxs($,D({},B,{children:[v&&u.jsx(L,D({},U,{children:v})),z.Children.map(f,(O,M)=>{var F;return z.isValidElement(O)?z.cloneElement(O,D({},M===0&&{"data-first-child":""},Gf(O,["ListItem"])&&{component:((F=O.props)==null?void 0:F.component)||"div"})):O}),A&&u.jsx(q,D({},ee,{children:A}))]}))})})});Mh.muiName="ListItem";const Lh=Mh;function y1(e){return it("MuiAccordionDetails",e)}const br=Xe("MuiAccordionDetails",["root","content","expanded"]),x1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],C1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${ye(n)}`,t&&`variant${ye(t)}`]};return lt(o,s1,{})},w1=be(Jl,{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"},[`& .${br.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),I1=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:l,defaultExpanded:s=!1,disabled:c=!1,expanded:d,onChange:f,variant:h="plain",slots:p={},slotProps:g={}}=r,m=Ae(r,x1),v=ji(i),[A,x]=kl({controlled:d,default:s,name:"Accordion",state:"expanded"}),b=z.useCallback(Y=>{x(!A),f&&f(Y,!A)},[A,f,x]),S=z.useMemo(()=>({accordionId:v,expanded:A,disabled:c,toggle:b}),[v,A,c,b]),y=D({},m,{component:o,slots:p,slotProps:g}),w=D({},r,{component:o,color:a,variant:h,expanded:A,disabled:c,nested:!0}),E=C1(w),[k,N]=Ie("root",{ref:n,className:E.root,elementType:w1,externalForwardedProps:y,ownerState:w});return u.jsx(ql.Provider,{value:S,children:u.jsx(k,D({},N,{children:z.Children.map(l,(Y,W)=>z.isValidElement(Y)&&W===0?z.cloneElement(Y,{"data-first-child":""}):Y)}))})});function S1(e){return it("MuiAccordionGroup",e)}Xe("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const A1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function Xl(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=u.jsx(Ql.Provider,{value:r,children:u.jsx(Dh.Provider,{value:i,children:z.Children.map(t,(a,l)=>z.isValidElement(a)?z.cloneElement(a,D({},l===0&&{"data-first-child":""},l===z.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:u.jsx(Ta.Provider,{value:n,children:o})}const Zl=({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=D({},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 l;r[o]=((l=e.vars)==null?void 0:l.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 T1(e){return it("MuiList",e)}Xe("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const E1=z.createContext(void 0),_1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],k1=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,l={root:["root",o,t&&`variant${ye(t)}`,n&&`color${ye(n)}`,!a&&!i&&r&&`size${ye(r)}`,a&&`size${ye(a)}`,i&&"nesting"]};return lt(l,T1,{})},ec=be("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=Zl({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(l){return l==="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}:l==="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}:l==="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&&D({},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&&D({},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"?D({},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"}),D({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})]}),P1=be(ec,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),D1=z.forwardRef(function(t,n){var r;const i=z.useContext(Ta),o=z.useContext(Rh),a=z.useContext(E1),l=ct({props:t,name:"JoyList"}),{component:s,className:c,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:g="plain",color:m="neutral",role:v,slots:A={},slotProps:x={}}=l,b=Ae(l,_1),S=f||((r=t.size)!=null?r:"md");let y;o&&(y="group"),a&&(y="presentation"),v&&(y=v);const w=D({},l,{instanceSize:t.size,size:S,nesting:i,orientation:h,wrap:p,variant:g,color:m,role:y}),E=k1(w),k=D({},b,{component:s,slots:A,slotProps:x}),[N,Y]=Ie("root",{ref:n,className:Ln(E.root,c),elementType:P1,externalForwardedProps:k,ownerState:w,additionalProps:{as:s,role:y,"aria-labelledby":typeof i=="string"?i:void 0}});return u.jsx(N,D({},Y,{children:u.jsx(Oh.Provider,{value:`${typeof s=="string"?s:""}:${y||""}`,children:u.jsx(Xl,{row:h==="horizontal",wrap:p,children:d})})}))}),O1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],R1=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`,r&&`size${ye(r)}`]};return lt(i,S1,{})},M1=be(ec,{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}`,[`& .${br.root}.${br.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),D({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${l1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),L1=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:l=!1,variant:s="plain",transition:c="0.2s ease",size:d="md",slots:f={},slotProps:h={}}=r,p=Ae(r,O1),g=D({},p,{component:i,slots:f,slotProps:h}),m=D({},r,{component:i,color:o,disableDivider:l,variant:s,transition:c,size:d}),v=R1(m),[A,x]=Ie("root",{ref:n,className:v.root,elementType:M1,externalForwardedProps:g,ownerState:m});return u.jsx(A,D({},x,{children:u.jsx(Xl,{children:a})}))}),B1=["component","children","color","variant","slots","slotProps"],$1=e=>{const{expanded:t}=e;return lt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},y1,{})},N1=be("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return D({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(.${br.expanded})`]:{gridTemplateRows:"0fr"}})}),F1=be("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(.${br.expanded})`]:{paddingBlock:0}}),z1=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:l="plain",slots:s={},slotProps:c={}}=r,d=Ae(r,B1),{accordionId:f,expanded:h=!1}=z.useContext(ql),p=z.useRef(null),g=sn(p,n);z.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const k=E.getAttribute("data-prev-tabindex"),N=E.getAttribute("tabindex");N&&k&&(E.setAttribute("tabindex",k),E.removeAttribute("data-prev-tabindex")),!k&&!N&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const m=D({},d,{component:i,slots:s,slotProps:c}),v=D({},r,{component:i,color:a,variant:l,expanded:h,nesting:!0}),A=$1(v),[x,b]=Ie("root",{ref:g,className:A.root,elementType:N1,externalForwardedProps:m,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:v}),[S,y]=Ie("content",{className:A.content,elementType:F1,externalForwardedProps:m,ownerState:v});return u.jsx(x,D({},b,{children:u.jsx(S,D({},y,{children:o}))}))});function j1(e){return it("MuiAccordionSummary",e)}const Ea=Xe("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),_a=Xe("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),V1=z.createContext("horizontal"),tc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;return D({"--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]:D({},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],[`.${Ph.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${_a.selected}`]:D({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${_a.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]},[`&.${_a.disabled}`]:D({},(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color])})});be(tc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>D({},!e.row&&{[`&.${_a.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function U1(e){return it("MuiSvgIcon",e)}Xe("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const H1=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],W1=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${ye(t)}`,n&&`size${ye(n)}`,r&&`fontSize${ye(r)}`]};return lt(i,U1,{})},Bh={sm:"xl",md:"xl2",lg:"xl3"},G1=be("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return D({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[Bh[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[Bh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&D({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)`}))}),$h=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:l="svg",fontSize:s,htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",size:p="md",slots:g={},slotProps:m={}}=r,v=Ae(r,H1),A=z.isValidElement(i)&&i.type==="svg",x=D({},r,{color:a,component:l,size:p,instanceSize:t.size,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:A}),b=W1(x),S=D({},v,{component:l,slots:g,slotProps:m}),[y,w]=Ie("root",{ref:n,className:Ln(b.root,o),elementType:G1,externalForwardedProps:S,ownerState:x,additionalProps:D({color:c,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},A&&i.props)});return u.jsxs(y,D({},w,{children:[A?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});function nc(e,t){function n(r,i){return u.jsx($h,D({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=$h.muiName,z.memo(z.forwardRef(n))}const Y1=nc(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Nh;const K1=["component","color","children","indicator","variant","slots","slotProps"],q1=e=>{const{disabled:t,expanded:n}=e;return lt({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},j1,{})},Q1=be(Jl,{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)",[`&.${Ea.expanded}`]:{"--Icon-color":"currentColor"}})),J1=be(tc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${Ea.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),X1=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${Ea.expanded}`]:{transform:"rotate(180deg)"}}),Z1=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:l=Nh||(Nh=u.jsx(Y1,{})),variant:s="plain",slots:c={},slotProps:d={}}=r,f=Ae(r,K1),{accordionId:h,disabled:p=!1,expanded:g=!1,toggle:m}=z.useContext(ql),v=D({},f,{component:i,slots:c,slotProps:d}),A=D({},r,{component:i,color:o,disabled:p,expanded:g,variant:s}),x=Y=>{if(m&&m(Y),typeof d.button=="function"){var W,T;(W=d.button(A))==null||(T=W.onClick)==null||T.call(W,Y)}else{var H,G;(H=d.button)==null||(G=H.onClick)==null||G.call(H,Y)}},b=q1(A),[S,y]=Ie("root",{ref:n,className:b.root,elementType:Q1,externalForwardedProps:v,ownerState:A}),[w,E]=Ie("button",{ref:n,className:b.button,elementType:J1,externalForwardedProps:v,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":g?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:x},ownerState:A}),[k,N]=Ie("indicator",{ref:n,className:b.indicator,elementType:X1,externalForwardedProps:v,ownerState:A});return u.jsx(S,D({},y,{children:u.jsxs(w,D({},E,{children:[a,l&&u.jsx(k,D({},N,{children:l}))]}))}))}),eT=({label:e,disabled:t,children:n})=>(t=t||!1,u.jsx(L1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${Ea.button}:hover`]:{backgroundColor:"#fff"},[`& .${br.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${br.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:u.jsxs(I1,{disabled:t,children:[u.jsx(Z1,{children:e}),u.jsx(z1,{variant:"soft",children:n})]})})),rc={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"]]},ic=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const l=(s,c,d,f)=>{d!=="api"&&(f.getText().trim()===""?a(""):a(s))};return t==="description"?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i,className:"ql-container ql-toolbar"}),u.jsx(I.FormHelperText,{children:o})]}):u.jsx(I.Box,{sx:()=>({marginBottom:"16px"}),children:u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i})})},tT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return u.jsxs(I.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(I.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[u.jsx(I.Tab,{children:e.labels.richText}),u.jsx(I.Tab,{children:e.labels.plainText})]}),u.jsx(I.TabPanel,{value:0,sx:{px:0},children:u.jsx(ic,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),u.jsx(I.TabPanel,{value:1,sx:{px:0},children:u.jsx(I.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},nT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,l)=>{i(l||"")};return u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(I.Select,{defaultValue:t,onChange:o,children:n.map((a,l)=>u.jsx(I.Option,{value:a,children:a},`basic-select-${a}-${l}`))}),r?u.jsx(I.FormHelperText,{children:r}):u.jsx(u.Fragment,{})]})},oc=z.createContext("md");function rT(e){return it("MuiTabs",e)}Xe("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const iT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],oT=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${ye(n)}`,r&&`color${ye(r)}`,i&&`size${ye(i)}`]};return lt(o,rT,{})},aT=be("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:l,p:s,padding:c}=Zl({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),d=Zn(t,`palette.${o}`)||o||Zn(t,`palette.${a}`)||a||l||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return D({},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":d==="transparent"?"initial":d,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],s!==void 0&&{"--Tabs-padding":s},c!==void 0&&{"--Tabs-padding":c})}),Fh=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:l="horizontal",direction:s="ltr",component:c,variant:d="plain",color:f="neutral",size:h="md",slots:p={},slotProps:g={}}=r,m=Ae(r,iT),v=a||(o===void 0?0:void 0),{contextValue:A}=ES(D({},r,{orientation:l,defaultValue:v})),x=D({},r,{orientation:l,direction:s,variant:d,color:f,size:h}),b=oT(x),S=D({},m,{component:c,slots:p,slotProps:g}),[y,w]=Ie("root",{ref:n,elementType:aT,externalForwardedProps:S,additionalProps:{ref:n,as:c},ownerState:x,className:b.root});return u.jsx(y,D({},w,{children:u.jsx(_S,{value:A,children:u.jsx(oc.Provider,{value:h,children:i})})}))});function sT(e){return it("MuiTabList",e)}Xe("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function lT(e){return it("MuiTab",e)}const ac=Xe("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),cT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],uT=e=>{const{orientation:t,size:n,variant:r,color:i}=e,o={root:["root",t,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return lt(o,sT,{})},dT=be(ec,{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 D({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},A1,{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&&D({},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&&{[`& .${ac.root}`]:{flex:t.tabFlex}})}),zh=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabList"}),i=z.useContext(oc),{isRtl:o,orientation:a,getRootProps:l,contextValue:s}=OS({rootRef:n}),{component:c="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:g=!1,underlinePlacement:m=a==="horizontal"?"bottom":"right",tabFlex:v,sticky:A,slots:x={},slotProps:b={}}=r,S=Ae(r,cT),y=p!=null?p:i,w=D({},r,{isRtl:o,orientation:a,variant:f,color:h,size:y,sticky:A,tabFlex:v,nesting:!1,disableUnderline:g,underlinePlacement:m}),E=uT(w),k=D({},S,{component:c,slots:x,slotProps:b}),[N,Y]=Ie("root",{ref:n,elementType:dT,getSlotProps:l,externalForwardedProps:k,ownerState:w,className:E.root});return u.jsx(N,D({},Y,{children:u.jsx(RS,{value:s,children:u.jsx(Xl,{row:a==="horizontal",nested:!0,children:d})})}))}),fT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],hT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,l={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${ye(i)}`,o&&`color${ye(o)}`]};return lt(l,lT,{})},pT=be(tc,{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))"}}]),jr=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTab"}),i=z.useContext(Ql),{action:o,children:a,disabled:l=!1,component:s="button",orientation:c="horizontal",variant:d="plain",color:f="neutral",disableIndicator:h=!1,indicatorPlacement:p=i?"bottom":"right",indicatorInset:g=!1,slots:m={},slotProps:v={}}=r,A=Ae(r,fT),x=z.useRef(null),b=sn(x,n),{active:S,focusVisible:y,setFocusVisible:w,selected:E,getRootProps:k}=LS(D({},r,{rootRef:b}));z.useImperativeHandle(o,()=>({focusVisible:()=>{w(!0),x.current.focus()}}),[w]);const N=D({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:g,orientation:c,row:i,active:S,focusVisible:y,disabled:l,selected:E,variant:d,color:f}),Y=hT(N),W=D({},A,{component:s,slots:m,slotProps:v}),[T,H]=Ie("root",{ref:n,elementType:pT,getSlotProps:k,externalForwardedProps:W,ownerState:N,className:Y.root});return u.jsx(V1.Provider,{value:c,children:u.jsx(T,D({},H,{children:a}))})});function Fn(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 jh(e){if(z.isValidElement(e)||Wf.isValidElementType(e)||!Fn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=jh(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?V({},e):e;return Fn(e)&&Fn(t)&&Object.keys(t).forEach(i=>{z.isValidElement(t[i])||Wf.isValidElementType(t[i])?r[i]=t[i]:Fn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Fn(e[i])?r[i]=Wt(e[i],t[i],n):n.clone?r[i]=Fn(t[i])?jh(t[i]):t[i]:r[i]=t[i]}),r}function yr(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 Vr(e){if(typeof e!="string")throw new Error(yr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sc(e,t){const n=V({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=V(V({},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]=V({},a);for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const s=l;n[i][s]=sc(o[s],a[s])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function gT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",l=!0;for(let s=0;s<o.length;s+=1){const c=o[s];c&&(a+=(l===!0?"":" ")+t(c),l=!1,n&&n[c]&&(a+=" "+n[c]))}r[i]=a}return r}const Vh=e=>e,mT=(()=>{let e=Vh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vh}}})(),vT={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 Uh(e,t,n="Mui"){const r=vT[t];return r?`${n}-${r}`:`${mT.generate(e)}-${t}`}function bT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Uh(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 Gi(e,t){return t?Wt(e,t,{clone:!1}):e}function xT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,l;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((l=i.match(o))==null?void 0:l[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},V({},t)):t}function CT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function wT(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 IT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...l)=>t(e.breakpoints.up(...l),a),o.down=(...l)=>t(e.breakpoints.down(...l),a),o.between=(...l)=>t(e.breakpoints.between(...l),a),o.only=(...l)=>t(e.breakpoints.only(...l),a),o.not=(...l)=>{const s=t(e.breakpoints.not(...l),a);return s.includes("not all and")?s.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):s}}const r={},i=o=>(n(r,o),r);return n(i),X(V({},e),{containerQueries:i})}const ka={xs:0,sm:600,md:900,lg:1200,xl:1536},Hh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ka[e]}px)`},ST={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ka[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function zn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Hh;return t.reduce((a,l,s)=>(a[o.up(o.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Hh;return Object.keys(t).reduce((a,l)=>{if(CT(o.keys,l)){const s=wT(r.containerQueries?r:ST,l);s&&(a[s]=n(t[l],l))}else if(Object.keys(o.values||ka).includes(l)){const s=o.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function AT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function TT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Pa(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 Da(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Pa(e,n)||r,t&&(i=t(i,r,e)),i}function ot(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const l=a[t],s=a.theme,c=Pa(s,r)||{};return zn(a,l,f=>{let h=Da(c,i,f);return f===h&&typeof f=="string"&&(h=Da(c,i,`${t}${f==="default"?"":Vr(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function ET(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const _T={m:"margin",p:"padding"},kT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Wh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},PT=ET(e=>{if(e.length>2)if(Wh[e])e=Wh[e];else return[e];const[t,n]=e.split(""),r=_T[t],i=kT[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),lc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...lc,...cc];function Yi(e,t,n,r){var o;const i=(o=Pa(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 l=Math.abs(a),s=i[l];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof i=="function"?i:()=>{}}function uc(e){return Yi(e,"spacing",8)}function Ki(e,t){return typeof t=="string"||t==null?t:e(t)}function DT(e,t){return n=>e.reduce((r,i)=>(r[i]=Ki(t,n),r),{})}function OT(e,t,n,r){if(!t.includes(n))return null;const i=PT(n),o=DT(i,r),a=e[n];return zn(e,a,o)}function Gh(e,t){const n=uc(e.theme);return Object.keys(e).map(r=>OT(e,t,r,n)).reduce(Gi,{})}function Ze(e){return Gh(e,lc)}Ze.propTypes={},Ze.filterProps=lc;function et(e){return Gh(e,cc)}et.propTypes={},et.filterProps=cc;function Oa(...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]?Gi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function tn(e){return typeof e!="number"?e:`${e}px solid`}function nn(e,t){return ot({prop:e,themeKey:"borders",transform:t})}const RT=nn("border",tn),MT=nn("borderTop",tn),LT=nn("borderRight",tn),BT=nn("borderBottom",tn),$T=nn("borderLeft",tn),NT=nn("borderColor"),FT=nn("borderTopColor"),zT=nn("borderRightColor"),jT=nn("borderBottomColor"),VT=nn("borderLeftColor"),UT=nn("outline",tn),HT=nn("outlineColor"),Ra=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Yi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ki(t,r)});return zn(e,e.borderRadius,n)}return null};Ra.propTypes={},Ra.filterProps=["borderRadius"],Oa(RT,MT,LT,BT,$T,NT,FT,zT,jT,VT,Ra,UT,HT);const Ma=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({gap:Ki(t,r)});return zn(e,e.gap,n)}return null};Ma.propTypes={},Ma.filterProps=["gap"];const La=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({columnGap:Ki(t,r)});return zn(e,e.columnGap,n)}return null};La.propTypes={},La.filterProps=["columnGap"];const Ba=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({rowGap:Ki(t,r)});return zn(e,e.rowGap,n)}return null};Ba.propTypes={},Ba.filterProps=["rowGap"];const WT=ot({prop:"gridColumn"}),GT=ot({prop:"gridRow"}),YT=ot({prop:"gridAutoFlow"}),KT=ot({prop:"gridAutoColumns"}),qT=ot({prop:"gridAutoRows"}),QT=ot({prop:"gridTemplateColumns"}),JT=ot({prop:"gridTemplateRows"}),XT=ot({prop:"gridTemplateAreas"}),ZT=ot({prop:"gridArea"});Oa(Ma,La,Ba,WT,GT,YT,KT,qT,QT,JT,XT,ZT);function Ur(e,t){return t==="grey"?t:e}const eE=ot({prop:"color",themeKey:"palette",transform:Ur}),tE=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ur}),nE=ot({prop:"backgroundColor",themeKey:"palette",transform:Ur});Oa(eE,tE,nE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const rE=ot({prop:"width",transform:Gt}),dc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,l,s;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||ka[n];return r?((s=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:s.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Gt(n)}};return zn(e,e.maxWidth,t)}return null};dc.filterProps=["maxWidth"];const iE=ot({prop:"minWidth",transform:Gt}),oE=ot({prop:"height",transform:Gt}),aE=ot({prop:"maxHeight",transform:Gt}),sE=ot({prop:"minHeight",transform:Gt});ot({prop:"size",cssProperty:"width",transform:Gt}),ot({prop:"size",cssProperty:"height",transform:Gt});const lE=ot({prop:"boxSizing"});Oa(rE,dc,iE,oE,aE,sE,lE);const $a={border:{themeKey:"borders",transform:tn},borderTop:{themeKey:"borders",transform:tn},borderRight:{themeKey:"borders",transform:tn},borderBottom:{themeKey:"borders",transform:tn},borderLeft:{themeKey:"borders",transform:tn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:tn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ra},color:{themeKey:"palette",transform:Ur},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ur},backgroundColor:{themeKey:"palette",transform:Ur},p:{style:et},pt:{style:et},pr:{style:et},pb:{style:et},pl:{style:et},px:{style:et},py:{style:et},padding:{style:et},paddingTop:{style:et},paddingRight:{style:et},paddingBottom:{style:et},paddingLeft:{style:et},paddingX:{style:et},paddingY:{style:et},paddingInline:{style:et},paddingInlineStart:{style:et},paddingInlineEnd:{style:et},paddingBlock:{style:et},paddingBlockStart:{style:et},paddingBlockEnd:{style:et},m:{style:Ze},mt:{style:Ze},mr:{style:Ze},mb:{style:Ze},ml:{style:Ze},mx:{style:Ze},my:{style:Ze},margin:{style:Ze},marginTop:{style:Ze},marginRight:{style:Ze},marginBottom:{style:Ze},marginLeft:{style:Ze},marginX:{style:Ze},marginY:{style:Ze},marginInline:{style:Ze},marginInlineStart:{style:Ze},marginInlineEnd:{style:Ze},marginBlock:{style:Ze},marginBlockStart:{style:Ze},marginBlockEnd:{style:Ze},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:Ma},rowGap:{style:Ba},columnGap:{style:La},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Gt},maxWidth:{style:dc},minWidth:{transform:Gt},height:{transform:Gt},maxHeight:{transform:Gt},minHeight:{transform:Gt},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 cE(...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 uE(e,t){return typeof e=="function"?e(t):e}function dE(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:s=n,themeKey:c,transform:d,style:f}=l;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Pa(i,c)||{};return f?f(a):zn(a,r,g=>{let m=Da(h,d,g);return g===m&&typeof g=="string"&&(m=Da(h,d,`${n}${g==="default"?"":Vr(g)}`,g)),s===!1?m:{[s]:m}})}function t(n){var l;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(l=i.unstable_sxConfig)!=null?l:$a;function a(s){let c=s;if(typeof s=="function")c=s(i);else if(typeof s!="object")return s;if(!c)return null;const d=AT(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const g=uE(c[p],i);if(g!=null)if(typeof g=="object")if(o[p])h=Gi(h,e(p,g,i,o));else{const m=zn({theme:i},g,v=>({[p]:v}));cE(m,g)?h[p]=t({sx:g,theme:i}):h=Gi(h,m)}else h=Gi(h,e(p,g,i,o))}),xT(i,TT(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Hr=dE();Hr.filterProps=["sx"];function fE(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 hE={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},pE=!1,gE=/[A-Z]|^ms/g,mE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yh=function(t){return t.charCodeAt(1)===45},Kh=function(t){return t!=null&&typeof t!="boolean"},fc=BS(function(e){return Yh(e)?e:e.replace(gE,"-$&").toLowerCase()}),qh=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(mE,function(r,i,o){return er={name:i,styles:o,next:er},i})}return hE[t]!==1&&!Yh(t)&&typeof n=="number"&&n!==0?n+"px":n},vE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Na(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 er={name:i.name,styles:i.styles,next:er},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)er={name:a.name,styles:a.styles,next:er},a=a.next;var l=o.styles+";";return l}return bE(e,t,n)}}var s=n;return s}function bE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Na(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var l=a;Kh(l)&&(r+=fc(o)+":"+qh(o,l)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&pE)throw new Error(vE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var s=0;s<a.length;s++)Kh(a[s])&&(r+=fc(o)+":"+qh(o,a[s])+";");else{var c=Na(e,t,a);switch(o){case"animation":case"animationName":{r+=fc(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}}return r}var Qh=/label:\s*([^\s;{]+)\s*(;|$)/g,er;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="";er=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Na(n,t,o);else{var a=o;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=Na(n,t,e[l]),r){var s=o;i+=s[l]}Qh.lastIndex=0;for(var c="",d;(d=Qh.exec(i))!==null;)c+="-"+d[1];var f=fE(i)+c;return{name:f,styles:i,next:er}}/**
|
|
2333
|
+
*/var El=Symbol.for("react.transitional.element"),_l=Symbol.for("react.portal"),ea=Symbol.for("react.fragment"),ta=Symbol.for("react.strict_mode"),na=Symbol.for("react.profiler"),ra=Symbol.for("react.consumer"),ia=Symbol.for("react.context"),oa=Symbol.for("react.forward_ref"),aa=Symbol.for("react.suspense"),sa=Symbol.for("react.suspense_list"),la=Symbol.for("react.memo"),ca=Symbol.for("react.lazy"),TI=Symbol.for("react.offscreen"),EI=Symbol.for("react.client.reference");function Xt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case El:switch(e=e.type,e){case ea:case na:case ta:case aa:case sa:return e;default:switch(e=e&&e.$$typeof,e){case ia:case oa:case ca:case la:return e;case ra:return e;default:return t}}case _l:return t}}}$e.ContextConsumer=ra,$e.ContextProvider=ia,$e.Element=El,$e.ForwardRef=oa,$e.Fragment=ea,$e.Lazy=ca,$e.Memo=la,$e.Portal=_l,$e.Profiler=na,$e.StrictMode=ta,$e.Suspense=aa,$e.SuspenseList=sa,$e.isContextConsumer=function(e){return Xt(e)===ra},$e.isContextProvider=function(e){return Xt(e)===ia},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===El},$e.isForwardRef=function(e){return Xt(e)===oa},$e.isFragment=function(e){return Xt(e)===ea},$e.isLazy=function(e){return Xt(e)===ca},$e.isMemo=function(e){return Xt(e)===la},$e.isPortal=function(e){return Xt(e)===_l},$e.isProfiler=function(e){return Xt(e)===na},$e.isStrictMode=function(e){return Xt(e)===ta},$e.isSuspense=function(e){return Xt(e)===aa},$e.isSuspenseList=function(e){return Xt(e)===sa},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ea||e===na||e===ta||e===aa||e===sa||e===TI||typeof e=="object"&&e!==null&&(e.$$typeof===ca||e.$$typeof===la||e.$$typeof===ia||e.$$typeof===ra||e.$$typeof===oa||e.$$typeof===EI||e.getModuleId!==void 0)},$e.typeOf=Xt,Hf.exports=$e;var Wf=Hf.exports;function ye(e){if(typeof e!="string")throw new Error(Zo(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Gf(e,t){var n,r;return j.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 _I=typeof window!="undefined"?j.useLayoutEffect:j.useEffect;let Yf=0;function kI(e){const[t,n]=j.useState(e),r=e||t;return j.useEffect(()=>{t==null&&(Yf+=1,n(`mui-${Yf}`))},[t]),r}const Kf=j.useId;function ji(e){if(Kf!==void 0){const t=Kf();return e!=null?e:t}return kI(e)}function kl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=j.useRef(e!==void 0),[o,a]=j.useState(t),l=i?e:o,s=j.useCallback(c=>{i||a(c)},[]);return[l,s]}class Pl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Pl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let ua=!0,Dl=!1;const PI=new Pl,DI={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 OI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&DI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function RI(e){e.metaKey||e.altKey||e.ctrlKey||(ua=!0)}function Ol(){ua=!1}function MI(){this.visibilityState==="hidden"&&Dl&&(ua=!0)}function LI(e){e.addEventListener("keydown",RI,!0),e.addEventListener("mousedown",Ol,!0),e.addEventListener("pointerdown",Ol,!0),e.addEventListener("touchstart",Ol,!0),e.addEventListener("visibilitychange",MI,!0)}function BI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return ua||OI(t)}function qf(){const e=j.useCallback(i=>{i!=null&&LI(i.ownerDocument)},[]),t=j.useRef(!1);function n(){return t.current?(Dl=!0,PI.start(100,()=>{Dl=!1}),t.current=!1,!0):!1}function r(i){return BI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Qf(e,t){const n=D({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=D({},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]=D({},o),Object.keys(i).forEach(a=>{n[r][a]=Qf(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function lt(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const l=t(a);l!==""&&o.push(l),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const Jf=e=>e,$I=(()=>{let e=Jf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Jf}}})(),NI={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 Xf(e,t,n="Mui"){const r=NI[t];return r?`${n}-${r}`:`${$I.generate(e)}-${t}`}function FI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Xf(e,i,n)}),r}function Rl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:l,rootElementName:s}=e,c=j.useRef(null),[d,f]=j.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:m,ref:g}=qf(),[v,S]=j.useState(!1);t&&!n&&v&&S(!1),j.useEffect(()=>{h.current=v},[v,h]);const[w,y]=II({rootElementName:s!=null?s:r||a?"a":void 0,componentName:"Button"}),x=N=>$=>{var B;v&&$.preventDefault(),(B=N.onMouseLeave)==null||B.call(N,$)},b=N=>$=>{var B;m($),h.current===!1&&S(!1),(B=N.onBlur)==null||B.call(N,$)},T=N=>$=>{var B;if(c.current||(c.current=$.currentTarget),p($),h.current===!0){var H;S(!0),(H=N.onFocusVisible)==null||H.call(N,$)}(B=N.onFocus)==null||B.call(N,$)},E=()=>{const N=c.current;return w==="BUTTON"||w==="INPUT"&&["button","submit","reset"].includes(N==null?void 0:N.type)||w==="A"&&(N==null?void 0:N.href)},P=N=>$=>{if(!t){var B;(B=N.onClick)==null||B.call(N,$)}},O=N=>$=>{var B;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(B=N.onMouseDown)==null||B.call(N,$)},G=N=>$=>{var B;if((B=N.onKeyDown)==null||B.call(N,$),!$.defaultMuiPrevented&&($.target===$.currentTarget&&!E()&&$.key===" "&&$.preventDefault(),$.target===$.currentTarget&&$.key===" "&&!t&&f(!0),$.target===$.currentTarget&&!E()&&$.key==="Enter"&&!t)){var H;(H=N.onClick)==null||H.call(N,$),$.preventDefault()}},z=N=>$=>{var B;if($.target===$.currentTarget&&f(!1),(B=N.onKeyUp)==null||B.call(N,$),$.target===$.currentTarget&&!E()&&!t&&$.key===" "&&!$.defaultMuiPrevented){var H;(H=N.onClick)==null||H.call(N,$)}},A=sn(y,i,g,c),W={};return o!==void 0&&(W.tabIndex=o),w==="BUTTON"?(W.type=l!=null?l:"button",n?W["aria-disabled"]=t:W.disabled=t):w==="INPUT"?l&&["button","submit","reset"].includes(l)&&(n?W["aria-disabled"]=t:W.disabled=t):w!==""&&(!r&&!a&&(W.role="button",W.tabIndex=o!=null?o:0),t&&(W["aria-disabled"]=t,W.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(N={})=>{const $=D({},Mn(e),Mn(N)),B=D({type:l},$,W,N,{onBlur:b($),onClick:P($),onFocus:T($),onKeyDown:G($),onKeyUp:z($),onMouseDown:O($),onMouseLeave:x($),ref:A});return delete B.onFocusVisible,B},focusVisible:v,setFocusVisible:S,active:d,rootRef:A}}function zI(e,t){return e===t}const Ml={},Zf=()=>{};function Ll(e,t){const n=D({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function jI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,l=j.useRef(n);j.useEffect(()=>{if(a.current===null)return;const s=Ll(l.current,o);Object.keys(t).forEach(c=>{var d;const f=(d=r[c])!=null?d:zI,h=t[c],p=s[c];if(p==null&&h!=null||p!=null&&h==null||p!=null&&h!=null&&!f(h,p)){var m,g;i==null||i((m=a.current.event)!=null?m:null,c,h,(g=a.current.type)!=null?g:"",t)}}),l.current=t,a.current=null},[l,t,a,i,r,o])}function VI(e){const t=j.useRef(null),{reducer:n,initialState:r,controlledProps:i=Ml,stateComparers:o=Ml,onStateChange:a=Zf,actionContext:l,componentName:s=""}=e;j.useRef(i);const c=j.useCallback((p,m)=>{t.current=m;const g=Ll(p,i);return n(g,m)},[i,n]),[d,f]=j.useReducer(c,r),h=j.useCallback(p=>{f(D({},p,{context:l}))},[l]);return jI({nextState:d,initialState:r,stateComparers:o!=null?o:Ml,onStateChange:a!=null?a:Zf,controlledProps:i,lastActionRef:t}),[Ll(d,i),h]}const UI=j.createContext(void 0);function HI(){return j.useContext(UI)}function WI(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:l=!1,value:s,inputRef:c}=e,d=HI();let f,h,p,m,g;if(d){var v,S,w;f=void 0,h=(v=d.disabled)!=null?v:!1,p=(S=d.error)!=null?S:!1,m=(w=d.required)!=null?w:!1,g=d.value}else f=t,h=n,p=r,m=l,g=s;const{current:y}=j.useRef(g!=null),x=j.useCallback(N=>{},[]),b=j.useRef(null),T=sn(b,c,x),[E,P]=j.useState(!1);j.useEffect(()=>{!d&&h&&E&&(P(!1),i==null||i())},[d,h,E,i]);const O=N=>$=>{var B;if(d!=null&&d.disabled){$.stopPropagation();return}if((B=N.onFocus)==null||B.call(N,$),d&&d.onFocus){var H;d==null||(H=d.onFocus)==null||H.call(d)}else P(!0)},G=N=>$=>{var B;(B=N.onBlur)==null||B.call(N,$),d&&d.onBlur?d.onBlur():P(!1)},z=N=>($,...B)=>{var H,q;if(!y&&($.target||b.current)==null)throw new Error(Zo(17));d==null||(H=d.onChange)==null||H.call(d,$),(q=N.onChange)==null||q.call(N,$,...B)},A=N=>$=>{var B;b.current&&$.currentTarget===$.target&&b.current.focus(),(B=N.onClick)==null||B.call(N,$)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:(N={})=>{const B=D({},{onBlur:i,onChange:o,onFocus:a},Mn(N)),H=D({},B,{onBlur:G(B),onChange:z(B),onFocus:O(B)});return D({},H,{"aria-invalid":p||void 0,defaultValue:f,value:g,required:m,disabled:h},N,{ref:T},H)},getRootProps:(N={})=>{const $=Mn(e,["onBlur","onChange","onFocus"]),B=D({},$,Mn(N));return D({},N,B,{onClick:A(B)})},inputRef:T,required:m,value:g}}const yt={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 GI(e,t,n,r,i,o){if(n.length===0||!r&&n.every((l,s)=>i(l,s)))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 Dt(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:l,itemComparer:s,focusManagement:c}=n,d=c==="DOM"?0:-1,f=i.length-1,h=e==null?-1:i.findIndex(S=>s(S,e));let p,m,g=!a;switch(t){case"reset":if(d===-1)return null;p=0,m="next",g=!1;break;case"start":p=0,m="next",g=!1;break;case"end":p=f,m="previous",g=!1;break;default:{const S=h+t;S<0?!g&&h!==-1||Math.abs(t)>1?(p=0,m="next"):(p=f,m="previous"):S>f?!g||Math.abs(t)>1?(p=f,m="previous"):(p=0,m="next"):(p=S,m=t>=0?"next":"previous")}}const v=GI(p,m,i,l,o,g);return v===-1&&e!==null&&!o(e,h)?e:(r=i[v])!=null?r:null}function YI(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 eh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:l}=t,s=a.findIndex(d=>r(e,d));if(i(e,s))return t;const c=YI(e,l,o,r);return D({},t,{selectedValues:c,highlightedValue:e})}function KI(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return D({},t,{highlightedValue:Dt(r,"start",n)});case"End":return D({},t,{highlightedValue:Dt(r,"end",n)});case"PageUp":return D({},t,{highlightedValue:Dt(r,-o,n)});case"PageDown":return D({},t,{highlightedValue:Dt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return D({},t,{highlightedValue:Dt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return D({},t,{highlightedValue:Dt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return D({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return D({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:eh(t.highlightedValue,t,n)}return t}function qI(e,t){return t.focusManagement==="DOM"?e:D({},e,{highlightedValue:null})}function QI(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 JI(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,l=t.length>1;let s=l?e.highlightedValue:Dt(e.highlightedValue,1,n);for(let c=0;c<r.length;c+=1){if(!s||!l&&e.highlightedValue===s)return e;if(QI(s,t,a)&&(!i(s,r.indexOf(s))||o))return D({},e,{highlightedValue:s});s=Dt(s,1,n)}return e}function XI(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let l=null;if(n.highlightedValue!=null){var s;l=(s=e.find(f=>o(f,n.highlightedValue)))!=null?s:null}else a==="DOM"&&t.length===0&&(l=Dt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return D({},n,{highlightedValue:l,selectedValues:d})}function ZI(e,t){return D({},e,{highlightedValue:Dt(null,"reset",t)})}function eS(e,t){return D({},e,{highlightedValue:Dt(null,"end",t)})}function tS(e,t){return D({},e,{selectedValues:[],highlightedValue:Dt(null,"reset",t)})}function th(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return KI(t.key,e,r);case yt.itemClick:return eh(t.item,e,r);case yt.blur:return qI(e,r);case yt.textNavigation:return JI(e,t.searchString,r);case yt.itemsChange:return XI(t.items,t.previousItems,e,r);case yt.resetHighlight:return ZI(e,r);case yt.highlightLast:return eS(e,r);case yt.clearSelection:return tS(e,r);default:return e}}const nS=500;function rS(e){const t=j.useRef({searchString:"",lastTime:null});return j.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>nS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const nh={},iS=()=>{},oS=(e,t)=>e===t,aS=()=>!1,sS=e=>typeof e=="string"?e:String(e),lS=()=>({highlightedValue:null,selectedValues:[]});function cS(e){const{controlledProps:t=nh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=lS,getItemDomElement:a,getItemId:l,isItemDisabled:s=aS,rootRef:c,onStateChange:d=iS,items:f,itemComparer:h=oS,getItemAsString:p=sS,onChange:m,onHighlightChange:g,onItemsChange:v,orientation:S="vertical",pageSize:w=5,reducerActionContext:y=nh,selectionMode:x="single",stateReducer:b,componentName:T="useList"}=e,E=j.useRef(null),P=sn(c,E),O=j.useCallback((ae,J,le)=>{if(g==null||g(ae,J,le),i==="DOM"&&J!=null&&(le===yt.itemClick||le===yt.keyDown||le===yt.textNavigation)){var ne;a==null||(ne=a(J))==null||ne.focus()}},[a,g,i]),G=j.useMemo(()=>({highlightedValue:h,selectedValues:(ae,J)=>zf(ae,J,h)}),[h]),z=j.useCallback((ae,J,le,ne,ge)=>{switch(d==null||d(ae,J,le,ne,ge),J){case"highlightedValue":O(ae,le,ne);break;case"selectedValues":m==null||m(ae,le,ne);break}},[O,m,d]),A=j.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:s,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:O,orientation:S,pageSize:w,selectionMode:x,stateComparers:G}),[n,r,i,s,h,f,p,O,S,w,x,G]),W=o(),Y=b!=null?b:th,N=j.useMemo(()=>D({},y,A),[y,A]),[$,B]=VI({reducer:Y,actionContext:N,initialState:W,controlledProps:t,stateComparers:G,onStateChange:z,componentName:T}),{highlightedValue:H,selectedValues:q}=$,ee=rS((ae,J)=>B({type:yt.textNavigation,event:J,searchString:ae})),R=j.useRef([]);j.useEffect(()=>{zf(R.current,f,h)||(B({type:yt.itemsChange,event:null,items:f,previousItems:R.current}),R.current=f,v==null||v(f))},[f,h,B,v]);const L=ae=>J=>{var le;if((le=ae.onKeyDown)==null||le.call(ae,J),J.defaultMuiPrevented)return;const ne=["Home","End","PageUp","PageDown"];S==="vertical"?ne.push("ArrowUp","ArrowDown"):ne.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&ne.push(" ","Enter"),ne.includes(J.key)&&J.preventDefault(),B({type:yt.keyDown,key:J.key,event:J}),ee(J)},F=ae=>J=>{var le,ne;(le=ae.onBlur)==null||le.call(ae,J),!J.defaultMuiPrevented&&((ne=E.current)!=null&&ne.contains(J.relatedTarget)||B({type:yt.blur,event:J}))},V=(ae={})=>{const J=Mn(ae);return D({},ae,{"aria-activedescendant":i==="activeDescendant"&&H!=null?l(H):void 0,tabIndex:i==="DOM"?-1:0,ref:P},J,{onBlur:F(J),onKeyDown:L(J)})},te=j.useCallback(ae=>{const J=(q!=null?q:[]).some(ge=>ge!=null&&h(ae,ge)),le=H!=null&&h(ae,H);return{focusable:i==="DOM",highlighted:le,selected:J}},[h,q,H,i]),se=j.useMemo(()=>({dispatch:B,getItemState:te}),[B,te]);return j.useDebugValue({state:$}),{contextValue:se,dispatch:B,getRootProps:V,rootRef:P,state:$}}const rh=j.createContext(null);function uS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=j.useContext(rh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:l,focusable:s}=o(n),c=j.useCallback(p=>m=>{var g;(g=p.onClick)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemClick,item:n,event:m})},[i,n]),d=j.useCallback(p=>m=>{var g;(g=p.onMouseOver)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemHover,item:n,event:m})},[i,n]);let f;return s&&(f=a?0:-1),{getRootProps:(p={})=>{const m=Mn(p);return D({},p,{onClick:c(m),onPointerOver:t?d(m):void 0,tabIndex:f})},highlighted:a,selected:l}}const Bl=j.createContext(null);function dS(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 ih(){const[e,t]=j.useState(new Map),n=j.useRef(new Set),r=j.useCallback(function(c){n.current.delete(c),t(d=>{const f=new Map(d);return f.delete(c),f})},[]),i=j.useCallback(function(c,d){let f;return typeof c=="function"?f=c(n.current):f=c,n.current.add(f),t(h=>{const p=new Map(h);return p.set(f,d),p}),{id:f,deregister:()=>r(f)}},[r]),o=j.useMemo(()=>dS(e),[e]),a=j.useCallback(function(c){return Array.from(o.keys()).indexOf(c)},[o]);return{contextValue:j.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function oh(e,t){const n=j.useContext(Bl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=j.useState(typeof e=="function"?void 0:e);return _I(()=>{const{id:a,deregister:l}=r(e,t);return o(a),l},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function fS(e,t){return function(r={}){const i=D({},r,e(r));return D({},i,t(i))}}const hS=Math.min,pS=Math.max,da=Math.round,fa=Math.floor,ha=e=>({x:e,y:e});function gS(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 ah(e){return lh(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sh(e){var t;return(t=(lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lh(e){return e instanceof Node||e instanceof $n(e).Node}function mS(e){return e instanceof Element||e instanceof $n(e).Element}function $l(e){return e instanceof HTMLElement||e instanceof $n(e).HTMLElement}function ch(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function uh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Nl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function vS(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bS(e){return["html","body","#document"].includes(ah(e))}function Nl(e){return $n(e).getComputedStyle(e)}function yS(e){if(ah(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ch(e)&&e.host||sh(e);return ch(t)?t.host:t}function dh(e){const t=yS(e);return bS(t)?e.ownerDocument?e.ownerDocument.body:e.body:$l(t)&&uh(t)?t:dh(t)}function pa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=dh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=$n(i);if(o){const l=Fl(a);return t.concat(a,a.visualViewport||[],uh(i)?i:[],l&&n?pa(l):[])}return t.concat(i,pa(i,[],n))}function Fl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xS(e){const t=Nl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=$l(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=da(n)!==o||da(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function zl(e){return mS(e)?e:e.contextElement}function fh(e){const t=zl(e);if(!$l(t))return ha(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=xS(t);let a=(o?da(n.width):n.width)/r,l=(o?da(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const CS=ha(0);function wS(e){const t=$n(e);return!vS()||!t.visualViewport?CS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IS(e,t,n){return!1}function hh(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=zl(e);let a=ha(1);t&&(a=fh(e));const l=IS()?wS(o):ha(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const h=$n(o),p=r;let m=h,g=Fl(m);for(;g&&r&&p!==m;){const v=fh(g),S=g.getBoundingClientRect(),w=Nl(g),y=S.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,x=S.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;s*=v.x,c*=v.y,d*=v.x,f*=v.y,s+=y,c+=x,m=$n(g),g=Fl(m)}}return gS({width:d,height:f,x:s,y:c})}function SS(e,t){let n=null,r;const i=sh(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),o();const{left:c,top:d,width:f,height:h}=e.getBoundingClientRect();if(l||t(),!f||!h)return;const p=fa(d),m=fa(i.clientWidth-(c+f)),g=fa(i.clientHeight-(d+h)),v=fa(c),w={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:pS(0,hS(1,s))||1};let y=!0;function x(b){const T=b[0].intersectionRatio;if(T!==s){if(!y)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(x,X(U({},w),{root:i.ownerDocument}))}catch(b){n=new IntersectionObserver(x,w)}n.observe(e)}return a(!0),o}function AS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,c=zl(e),d=i||o?[...c?pa(c):[],...pa(t)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const f=c&&l?SS(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(S=>{let[w]=S;w&&w.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),n()}),c&&!s&&p.observe(c),p.observe(t));let m,g=s?hh(e):null;s&&v();function v(){const S=hh(e);g&&(S.x!==g.x||S.y!==g.y||S.width!==g.width||S.height!==g.height)&&n(),g=S,m=requestAnimationFrame(v)}return n(),()=>{var S;d.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),f==null||f(),(S=p)==null||S.disconnect(),p=null,s&&cancelAnimationFrame(m)}}function TS(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:l,readOnly:s,required:c}=e,[d,f]=kl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=P=>O=>{var G;O.nativeEvent.defaultPrevented||(f(O.target.checked),o==null||o(O),(G=P.onChange)==null||G.call(P,O))},{isFocusVisibleRef:p,onBlur:m,onFocus:g,ref:v}=qf(),[S,w]=j.useState(!1);r&&S&&w(!1),j.useEffect(()=>{p.current=S},[S,p]);const y=j.useRef(null),x=P=>O=>{var G;y.current||(y.current=O.currentTarget),g(O),p.current===!0&&(w(!0),l==null||l(O)),a==null||a(O),(G=P.onFocus)==null||G.call(P,O)},b=P=>O=>{var G;m(O),p.current===!1&&w(!1),i==null||i(O),(G=P.onBlur)==null||G.call(P,O)},T=sn(v,y);return{checked:d,disabled:!!r,focusVisible:S,getInputProps:(P={})=>D({checked:t,defaultChecked:n,disabled:r,readOnly:s,ref:T,required:c,type:"checkbox",role:"switch","aria-checked":t},P,{onChange:h(P),onFocus:x(P),onBlur:b(P)}),inputRef:T,readOnly:!!s}}function ES(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[l,s]=kl({controlled:t,default:n,name:"Tabs",state:"value"}),c=j.useCallback((v,S)=>{s(S),r==null||r(v,S)},[r,s]),{subitems:d,contextValue:f}=ih(),h=j.useRef(()=>{}),p=j.useCallback(v=>{var S;return(S=d.get(v))==null?void 0:S.id},[d]),m=j.useCallback(v=>h.current(v),[]),g=j.useCallback(v=>{h.current=v},[]);return{contextValue:D({direction:o,getTabId:m,getTabPanelId:p,onSelected:c,orientation:i,registerTabIdLookup:g,selectionFollowsFocus:a,value:l},f)}}const ph=j.createContext(null);function ga(){const e=j.useContext(ph);if(e==null)throw new Error("No TabsContext provided");return e}function _S(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:l,registerTabIdLookup:s,selectionFollowsFocus:c,totalSubitemCount:d,value:f,getTabId:h,getTabPanelId:p}=t,m=j.useMemo(()=>({getItemIndex:i,registerItem:l,totalSubitemCount:d}),[l,i,d]),g=j.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:p,onSelected:o,orientation:a,registerTabIdLookup:s,selectionFollowsFocus:c,value:f}),[r,h,p,o,a,s,c,f]);return u.jsx(Bl.Provider,{value:m,children:u.jsx(ph.Provider,{value:g,children:n})})}function kS(e){return e.size}function PS(e){const{value:t,id:n,rootRef:r}=e,i=ga();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,l=ji(n),s=j.useRef(null),c=sn(s,r),d=j.useMemo(()=>({id:l,ref:s}),[l]),{id:f}=oh(t!=null?t:kS,d),h=f!==o,p=f!==void 0?a(f):void 0;return{hidden:h,getRootProps:(g={})=>D({"aria-labelledby":p!=null?p:void 0,hidden:h,id:l!=null?l:void 0},g,{ref:c}),rootRef:c}}const gh={valueChange:"valueChange"};function DS(e,t){if(t.type===gh.valueChange)return D({},e,{highlightedValue:t.value});const n=th(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===yt.itemsChange){if(n.selectedValues.length>0)return D({},n,{highlightedValue:n.selectedValues[0]});Dt(null,"reset",t.context)}return r&&n.highlightedValue!=null?D({},n,{selectedValues:[n.highlightedValue]}):n}function OS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:l,selectionFollowsFocus:s}=ga(),{subitems:c,contextValue:d}=ih(),f=j.useCallback(z=>{var A;return(A=c.get(z))==null?void 0:A.id},[c]);l(f);const h=j.useMemo(()=>Array.from(c.keys()),[c]),p=j.useCallback(z=>{var A,W;return z==null?null:(A=(W=c.get(z))==null?void 0:W.ref.current)!=null?A:null},[c]),m=r==="rtl";let g;o==="vertical"?g="vertical":g=m?"horizontal-rtl":"horizontal-ltr";const v=j.useCallback((z,A)=>{var W;i(z,(W=A[0])!=null?W:null)},[i]),S=j.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),w=j.useCallback(z=>{var A,W;return(A=(W=c.get(z))==null?void 0:W.disabled)!=null?A:!1},[c]),{contextValue:y,dispatch:x,getRootProps:b,state:{highlightedValue:T,selectedValues:E},rootRef:P}=cS({controlledProps:S,disabledItemsFocusable:!s,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:w,items:h,rootRef:n,onChange:v,orientation:g,reducerActionContext:j.useMemo(()=>({selectionFollowsFocus:s||!1}),[s]),selectionMode:"single",stateReducer:DS});j.useEffect(()=>{a!==void 0&&a!=null&&x({type:gh.valueChange,value:a})},[x,a]);const O=(z={})=>D({},z,b(z),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:j.useMemo(()=>D({},d,y),[d,y]),dispatch:x,getRootProps:O,highlightedValue:T,isRtl:m,orientation:o,rootRef:P,selectedValue:(t=E[0])!=null?t:null}}function RS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:l}=t,s=j.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),c=j.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:l}),[a,i,l]);return u.jsx(Bl.Provider,{value:c,children:u.jsx(rh.Provider,{value:s,children:n})})}function MS(e){return e.size}function LS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=j.useRef(null),a=ji(i),{value:l,selectionFollowsFocus:s,getTabPanelId:c}=ga(),d=j.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=oh(t!=null?t:MS,d),{getRootProps:m,highlighted:g,selected:v}=uS({item:f}),{getRootProps:S,rootRef:w,active:y,focusVisible:x,setFocusVisible:b}=Rl({disabled:r,focusableWhenDisabled:!s,type:"button"}),T=sn(o,n,w),E=f!==void 0?c(f):void 0;return{getRootProps:(O={})=>{const G=Mn(O),z=fS(m,S);return D({},O,z(G),{role:"tab","aria-controls":E,"aria-selected":v,id:a,ref:T})},active:y,focusVisible:x,highlighted:g,index:h,rootRef:T,selected:v||f===l,setFocusVisible:b,totalTabsCount:p}}const mh="$$joy";function BS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function $S(e,t){return Lt(e,t)}const NS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},FS=["values","unit","step"],zS=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)=>D({},n,{[r.key]:r.val}),{})};function vh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ae(e,FS),o=zS(t),a=Object.keys(o);function l(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function s(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(h,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function d(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):l(h)}function f(h){const p=a.indexOf(h);return p===0?l(a[1]):p===a.length-1?s(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return D({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const jS={borderRadius:4};function Vi(e,t){return t?Bn(e,t,{clone:!1}):e}const jl={xs:0,sm:600,md:900,lg:1200,xl:1536},bh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${jl[e]}px)`};function Nn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||bh;return t.reduce((a,l,s)=>(a[o.up(o.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const o=r.breakpoints||bh;return Object.keys(t).reduce((a,l)=>{if(Object.keys(o.values||jl).indexOf(l)!==-1){const s=o.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function VS(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function US(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Zn(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 ma(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Zn(e,n)||r,t&&(i=t(i,r,e)),i}function rt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const l=a[t],s=a.theme,c=Zn(s,r)||{};return Nn(a,l,f=>{let h=ma(c,i,f);return f===h&&typeof f=="string"&&(h=ma(c,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function HS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const WS={m:"margin",p:"padding"},GS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},yh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},YS=HS(e=>{if(e.length>2)if(yh[e])e=yh[e];else return[e];const[t,n]=e.split(""),r=WS[t],i=GS[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Vl=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ul=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Vl,...Ul];function Ui(e,t,n,r){var i;const o=(i=Zn(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 xh(e){return Ui(e,"spacing",8)}function Hi(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 KS(e,t){return n=>e.reduce((r,i)=>(r[i]=Hi(t,n),r),{})}function qS(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=YS(n),o=KS(i,r),a=e[n];return Nn(e,a,o)}function Ch(e,t){const n=xh(e.theme);return Object.keys(e).map(r=>qS(e,t,r,n)).reduce(Vi,{})}function Qe(e){return Ch(e,Vl)}Qe.propTypes={},Qe.filterProps=Vl;function Je(e){return Ch(e,Ul)}Je.propTypes={},Je.filterProps=Ul;function wh(e=8){if(e.mui)return e;const t=xh({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 va(...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]?Vi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Zt(e){return typeof e!="number"?e:`${e}px solid`}function en(e,t){return rt({prop:e,themeKey:"borders",transform:t})}const QS=en("border",Zt),JS=en("borderTop",Zt),XS=en("borderRight",Zt),ZS=en("borderBottom",Zt),eA=en("borderLeft",Zt),tA=en("borderColor"),nA=en("borderTopColor"),rA=en("borderRightColor"),iA=en("borderBottomColor"),oA=en("borderLeftColor"),aA=en("outline",Zt),sA=en("outlineColor"),ba=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ui(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Hi(t,r)});return Nn(e,e.borderRadius,n)}return null};ba.propTypes={},ba.filterProps=["borderRadius"],va(QS,JS,XS,ZS,eA,tA,nA,rA,iA,oA,ba,aA,sA);const ya=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({gap:Hi(t,r)});return Nn(e,e.gap,n)}return null};ya.propTypes={},ya.filterProps=["gap"];const xa=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({columnGap:Hi(t,r)});return Nn(e,e.columnGap,n)}return null};xa.propTypes={},xa.filterProps=["columnGap"];const Ca=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({rowGap:Hi(t,r)});return Nn(e,e.rowGap,n)}return null};Ca.propTypes={},Ca.filterProps=["rowGap"];const lA=rt({prop:"gridColumn"}),cA=rt({prop:"gridRow"}),uA=rt({prop:"gridAutoFlow"}),dA=rt({prop:"gridAutoColumns"}),fA=rt({prop:"gridAutoRows"}),hA=rt({prop:"gridTemplateColumns"}),pA=rt({prop:"gridTemplateRows"}),gA=rt({prop:"gridTemplateAreas"}),mA=rt({prop:"gridArea"});va(ya,xa,Ca,lA,cA,uA,dA,fA,hA,pA,gA,mA);function zr(e,t){return t==="grey"?t:e}const vA=rt({prop:"color",themeKey:"palette",transform:zr}),bA=rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:zr}),yA=rt({prop:"backgroundColor",themeKey:"palette",transform:zr});va(vA,bA,yA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const xA=rt({prop:"width",transform:Ht}),Hl=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])||jl[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:Ht(n)}};return Nn(e,e.maxWidth,t)}return null};Hl.filterProps=["maxWidth"];const CA=rt({prop:"minWidth",transform:Ht}),wA=rt({prop:"height",transform:Ht}),IA=rt({prop:"maxHeight",transform:Ht}),SA=rt({prop:"minHeight",transform:Ht});rt({prop:"size",cssProperty:"width",transform:Ht}),rt({prop:"size",cssProperty:"height",transform:Ht});const AA=rt({prop:"boxSizing"});va(xA,Hl,CA,wA,IA,SA,AA);const wa={border:{themeKey:"borders",transform:Zt},borderTop:{themeKey:"borders",transform:Zt},borderRight:{themeKey:"borders",transform:Zt},borderBottom:{themeKey:"borders",transform:Zt},borderLeft:{themeKey:"borders",transform:Zt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Zt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ba},color:{themeKey:"palette",transform:zr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:zr},backgroundColor:{themeKey:"palette",transform:zr},p:{style:Je},pt:{style:Je},pr:{style:Je},pb:{style:Je},pl:{style:Je},px:{style:Je},py:{style:Je},padding:{style:Je},paddingTop:{style:Je},paddingRight:{style:Je},paddingBottom:{style:Je},paddingLeft:{style:Je},paddingX:{style:Je},paddingY:{style:Je},paddingInline:{style:Je},paddingInlineStart:{style:Je},paddingInlineEnd:{style:Je},paddingBlock:{style:Je},paddingBlockStart:{style:Je},paddingBlockEnd:{style:Je},m:{style:Qe},mt:{style:Qe},mr:{style:Qe},mb:{style:Qe},ml:{style:Qe},mx:{style:Qe},my:{style:Qe},margin:{style:Qe},marginTop:{style:Qe},marginRight:{style:Qe},marginBottom:{style:Qe},marginLeft:{style:Qe},marginX:{style:Qe},marginY:{style:Qe},marginInline:{style:Qe},marginInlineStart:{style:Qe},marginInlineEnd:{style:Qe},marginBlock:{style:Qe},marginBlockStart:{style:Qe},marginBlockEnd:{style:Qe},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:ya},rowGap:{style:Ca},columnGap:{style:xa},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ht},maxWidth:{style:Hl},minWidth:{transform:Ht},height:{transform:Ht},maxHeight:{transform:Ht},minHeight:{transform:Ht},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function TA(...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 EA(e,t){return typeof e=="function"?e(t):e}function _A(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:s=n,themeKey:c,transform:d,style:f}=l;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Zn(i,c)||{};return f?f(a):Nn(a,r,m=>{let g=ma(h,d,m);return m===g&&typeof m=="string"&&(g=ma(h,d,`${n}${m==="default"?"":ye(m)}`,m)),s===!1?g:{[s]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:wa;function l(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const d=VS(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=EA(c[p],o);if(m!=null)if(typeof m=="object")if(a[p])h=Vi(h,e(p,m,o,a));else{const g=Nn({theme:o},m,v=>({[p]:v}));TA(g,m)?h[p]=t({sx:m,theme:o}):h=Vi(h,g)}else h=Vi(h,e(p,m,o,a))}),US(f,h)}return Array.isArray(i)?i.map(l):l(i)}return t}const Ia=_A();Ia.filterProps=["sx"];function Ih(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 kA=["breakpoints","palette","spacing","shape"];function Sh(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,kA),l=vh(n),s=wh(i);let c=Bn({breakpoints:l,direction:"ltr",components:{},palette:D({mode:"light"},r),spacing:s,shape:D({},jS,o)},a);return c.applyStyles=Ih,c=t.reduce((d,f)=>Bn(d,f),c),c.unstable_sxConfig=D({},wa,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return Ia({sx:f,theme:this})},c}function PA(e){return Object.keys(e).length===0}function DA(e=null){const t=j.useContext(pe.ThemeContext);return!t||PA(t)?e:t}const OA=Sh();function RA(e=OA){return DA(e)}const MA=["sx"],LA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:wa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function BA(e){const{sx:t}=e,n=Ae(e,MA),{systemProps:r,otherProps:i}=LA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const l=t(...a);return Xn(l)?D({},r,l):r}:o=D({},r,t),D({},i,{sx:o})}const $A=["ownerState"],NA=["variants"],FA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function zA(e){return Object.keys(e).length===0}function jA(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const VA=Sh(),UA=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Sa({defaultTheme:e,theme:t,themeId:n}){return zA(t)?e:t[n]||t}function HA(e){return e?(t,n)=>n[e]:null}function Aa(e,t){let{ownerState:n}=t,r=Ae(t,$A);const i=typeof e=="function"?e(D({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Aa(o,D({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let l=Ae(i,NA);return o.forEach(s=>{let c=!0;typeof s.props=="function"?c=s.props(D({ownerState:n},r,n)):Object.keys(s.props).forEach(d=>{(n==null?void 0:n[d])!==s.props[d]&&r[d]!==s.props[d]&&(c=!1)}),c&&(Array.isArray(l)||(l=[l]),l.push(typeof s.style=="function"?s.style(D({ownerState:n},r,n)):s.style))}),l}return i}function WA(e={}){const{themeId:t,defaultTheme:n=VA,rootShouldForwardProp:r=Wl,slotShouldForwardProp:i=Wl}=e,o=a=>Ia(D({},a,{theme:Sa(D({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,l={})=>{NS(a,b=>b.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:s,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:h=HA(UA(c))}=l,p=Ae(l,FA),m=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,g=f||!1;let v,S=Wl;c==="Root"||c==="root"?S=r:c?S=i:jA(a)&&(S=void 0);const w=$S(a,D({shouldForwardProp:S,label:v},p)),y=b=>typeof b=="function"&&b.__emotion_real!==b||Xn(b)?T=>Aa(b,D({},T,{theme:Sa({theme:T.theme,defaultTheme:n,themeId:t})})):b,x=(b,...T)=>{let E=y(b);const P=T?T.map(y):[];s&&h&&P.push(z=>{const A=Sa(D({},z,{defaultTheme:n,themeId:t}));if(!A.components||!A.components[s]||!A.components[s].styleOverrides)return null;const W=A.components[s].styleOverrides,Y={};return Object.entries(W).forEach(([N,$])=>{Y[N]=Aa($,D({},z,{theme:A}))}),h(z,Y)}),s&&!m&&P.push(z=>{var A;const W=Sa(D({},z,{defaultTheme:n,themeId:t})),Y=W==null||(A=W.components)==null||(A=A[s])==null?void 0:A.variants;return Aa({variants:Y},D({},z,{theme:W}))}),g||P.push(o);const O=P.length-T.length;if(Array.isArray(b)&&O>0){const z=new Array(O).fill("");E=[...b,...z],E.raw=[...b.raw,...z]}const G=w(E,...P);return a.muiName&&(G.muiName=a.muiName),G};return w.withConfig&&(x.withConfig=w.withConfig),x}}function GA(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Qf(t.components[n].defaultProps,r)}function YA({props:e,name:t,defaultTheme:n,themeId:r}){let i=RA(n);return r&&(i=i[r]||i),GA({theme:i,name:t,props:e})}function KA(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 Ah(e){if(e.type)return e;if(e.charAt(0)==="#")return Ah(KA(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Zo(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(Zo(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const mr=e=>{const t=Ah(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function Gl(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 Th=(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])})},qA=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,s])=>{(!n||n&&!n([...o,l]))&&s!=null&&(typeof s=="object"&&Object.keys(s).length>0?r(s,[...o,l],Array.isArray(s)?[...a,l]:a):t([...o,l],s,a))})}r(e)},QA=(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 Yl(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return qA(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`;Object.assign(i,{[d]:QA(l,s)}),Th(o,l,`var(${d})`,c),Th(a,l,`var(${d}, ${s})`,c)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function vr(e){"@babel/helpers - typeof";return vr=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},vr(e)}function JA(e,t){if(vr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Kl(e){var t=JA(e,"string");return vr(t)=="symbol"?t:t+""}const XA=["colorSchemes","components","defaultColorScheme"];function ZA(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,XA),{vars:o,css:a,varsWithDefaults:l}=Yl(i,t);let s=l;const c={},{[r]:d}=n,f=Ae(n,[r].map(Kl));if(Object.entries(f||{}).forEach(([p,m])=>{const{vars:g,css:v,varsWithDefaults:S}=Yl(m,t);s=Bn(s,S),c[p]={css:v,vars:g}}),d){const{css:p,vars:m,varsWithDefaults:g}=Yl(d,t);s=Bn(s,g),c[r]={css:p,vars:m}}return{vars:s,generateCssVars:p=>{var m;if(!p){var g;const S=D({},a);return{css:S,vars:o,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,S))||":root"}}const v=D({},c[p].css);return{css:v,vars:c[p].vars,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,v))||":root"}}}}const e1=D({},wa,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),Wi={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 t1(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 it=(e,t)=>Xf(e,t,"Mui"),Xe=(e,t)=>FI(e,t,"Mui"),n1=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))$/)}),Eh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},_h=(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")),Eh(r,i,a)}}),r},Tt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,l]=o;n1(l)&&typeof l=="object"&&(n=D({},n,{[a]:_h(e,l,s=>`var(--variant-${s}, ${r(`palette-${a}-${s}`,i[a][s])})`)}))})}return n.context=_h(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},r1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],i1=["colorSchemes"],o1=(e="joy")=>Gl(e);function a1(e){var t,n,r,i,o,a,l,s,c,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:m,components:g,variants:v,shouldSkipGeneratingVar:S=t1}=f,w=Ae(f,r1),y=o1(h),x={primary:Wi.blue,neutral:Wi.grey,danger:Wi.red,success:Wi.green,warning:Wi.yellow,common:{white:"#FFF",black:"#000"}},b=J=>{var le;const ne=J.split("-"),ge=ne[1],Se=ne[2];return y(J,(le=x[ge])==null?void 0:le[Se])},T=J=>({plainColor:b(`palette-${J}-500`),plainHoverBg:b(`palette-${J}-100`),plainActiveBg:b(`palette-${J}-200`),plainDisabledColor:b("palette-neutral-400"),outlinedColor:b(`palette-${J}-500`),outlinedBorder:b(`palette-${J}-300`),outlinedHoverBg:b(`palette-${J}-100`),outlinedActiveBg:b(`palette-${J}-200`),outlinedDisabledColor:b("palette-neutral-400"),outlinedDisabledBorder:b("palette-neutral-200"),softColor:b(`palette-${J}-700`),softBg:b(`palette-${J}-100`),softHoverBg:b(`palette-${J}-200`),softActiveColor:b(`palette-${J}-800`),softActiveBg:b(`palette-${J}-300`),softDisabledColor:b("palette-neutral-400"),softDisabledBg:b("palette-neutral-50"),solidColor:b("palette-common-white"),solidBg:b(`palette-${J}-500`),solidHoverBg:b(`palette-${J}-600`),solidActiveBg:b(`palette-${J}-700`),solidDisabledColor:b("palette-neutral-400"),solidDisabledBg:b("palette-neutral-100")}),E=J=>({plainColor:b(`palette-${J}-300`),plainHoverBg:b(`palette-${J}-800`),plainActiveBg:b(`palette-${J}-700`),plainDisabledColor:b("palette-neutral-500"),outlinedColor:b(`palette-${J}-200`),outlinedBorder:b(`palette-${J}-700`),outlinedHoverBg:b(`palette-${J}-800`),outlinedActiveBg:b(`palette-${J}-700`),outlinedDisabledColor:b("palette-neutral-500"),outlinedDisabledBorder:b("palette-neutral-800"),softColor:b(`palette-${J}-200`),softBg:b(`palette-${J}-800`),softHoverBg:b(`palette-${J}-700`),softActiveColor:b(`palette-${J}-100`),softActiveBg:b(`palette-${J}-600`),softDisabledColor:b("palette-neutral-500"),softDisabledBg:b("palette-neutral-800"),solidColor:b("palette-common-white"),solidBg:b(`palette-${J}-500`),solidHoverBg:b(`palette-${J}-600`),solidActiveBg:b(`palette-${J}-700`),solidDisabledColor:b("palette-neutral-500"),solidDisabledBg:b("palette-neutral-800")}),P={palette:{mode:"light",primary:D({},x.primary,T("primary")),neutral:D({},x.neutral,T("neutral"),{plainColor:b("palette-neutral-700"),plainHoverColor:b("palette-neutral-900"),outlinedColor:b("palette-neutral-700")}),danger:D({},x.danger,T("danger")),success:D({},x.success,T("success")),warning:D({},x.warning,T("warning")),common:{white:"#FFF",black:"#000"},text:{primary:b("palette-neutral-800"),secondary:b("palette-neutral-700"),tertiary:b("palette-neutral-600"),icon:b("palette-neutral-500")},background:{body:b("palette-common-white"),surface:b("palette-neutral-50"),popup:b("palette-common-white"),level1:b("palette-neutral-100"),level2:b("palette-neutral-200"),level3:b("palette-neutral-300"),tooltip:b("palette-neutral-500"),backdrop:`rgba(${y("palette-neutral-darkChannel",mr(x.neutral[900]))} / 0.25)`},divider:`rgba(${y("palette-neutral-mainChannel",mr(x.neutral[500]))} / 0.2)`,focusVisible:b("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},O={palette:{mode:"dark",primary:D({},x.primary,E("primary")),neutral:D({},x.neutral,E("neutral"),{plainColor:b("palette-neutral-300"),plainHoverColor:b("palette-neutral-300")}),danger:D({},x.danger,E("danger")),success:D({},x.success,E("success")),warning:D({},x.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:b("palette-neutral-100"),secondary:b("palette-neutral-300"),tertiary:b("palette-neutral-400"),icon:b("palette-neutral-400")},background:{body:b("palette-common-black"),surface:b("palette-neutral-900"),popup:b("palette-common-black"),level1:b("palette-neutral-800"),level2:b("palette-neutral-700"),level3:b("palette-neutral-600"),tooltip:b("palette-neutral-600"),backdrop:`rgba(${y("palette-neutral-darkChannel",mr(x.neutral[50]))} / 0.25)`},divider:`rgba(${y("palette-neutral-mainChannel",mr(x.neutral[500]))} / 0.16)`,focusVisible:b("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"',z=D({body:`"Inter", ${y(`fontFamily-fallback, ${G}`)}`,display:`"Inter", ${y(`fontFamily-fallback, ${G}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:G},w.fontFamily),A=D({sm:300,md:500,lg:600,xl:700},w.fontWeight),W=D({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},w.fontSize),Y=D({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},w.lineHeight),N=(t=(n=w.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:P.shadowRing,$=(r=(i=w.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:P.shadowChannel,B=(o=(a=w.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:P.shadowOpacity,H={colorSchemes:{light:P,dark:O},fontSize:W,fontFamily:z,fontWeight:A,focus:{thickness:"2px",selector:`&.${it("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${y("focus-thickness",(l=(s=w.focus)==null?void 0:s.thickness)!=null?l:"2px")})`,outline:`${y("focus-thickness",(c=(d=w.focus)==null?void 0:d.thickness)!=null?c:"2px")} solid ${y("palette-focusVisible",x.primary[500])}`}},lineHeight:Y,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${y("shadowRing",N)}, 0px 1px 2px 0px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,sm:`${y("shadowRing",N)}, 0px 1px 2px 0px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 2px 4px 0px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,md:`${y("shadowRing",N)}, 0px 2px 8px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 6px 12px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,lg:`${y("shadowRing",N)}, 0px 2px 8px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 12px 16px -4px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`,xl:`${y("shadowRing",N)}, 0px 2px 8px -2px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)}), 0px 20px 24px -4px rgba(${y("shadowChannel",$)} / ${y("shadowOpacity",B)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-xl, ${A.xl}`),fontSize:y(`fontSize-xl4, ${W.xl4}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},h2:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-xl, ${A.xl}`),fontSize:y(`fontSize-xl3, ${W.xl3}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},h3:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-lg, ${A.lg}`),fontSize:y(`fontSize-xl2, ${W.xl2}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},h4:{fontFamily:y(`fontFamily-display, ${z.display}`),fontWeight:y(`fontWeight-lg, ${A.lg}`),fontSize:y(`fontSize-xl, ${W.xl}`),lineHeight:y(`lineHeight-md, ${Y.md}`),letterSpacing:"-0.025em",color:y(`palette-text-primary, ${P.palette.text.primary}`)},"title-lg":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-lg, ${A.lg}`),fontSize:y(`fontSize-lg, ${W.lg}`),lineHeight:y(`lineHeight-xs, ${Y.xs}`),color:y(`palette-text-primary, ${P.palette.text.primary}`)},"title-md":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-md, ${A.md}`),fontSize:y(`fontSize-md, ${W.md}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-primary, ${P.palette.text.primary}`)},"title-sm":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-md, ${A.md}`),fontSize:y(`fontSize-sm, ${W.sm}`),lineHeight:y(`lineHeight-sm, ${Y.sm}`),color:y(`palette-text-primary, ${P.palette.text.primary}`)},"body-lg":{fontFamily:y(`fontFamily-body, ${z.body}`),fontSize:y(`fontSize-lg, ${W.lg}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-secondary, ${P.palette.text.secondary}`)},"body-md":{fontFamily:y(`fontFamily-body, ${z.body}`),fontSize:y(`fontSize-md, ${W.md}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-secondary, ${P.palette.text.secondary}`)},"body-sm":{fontFamily:y(`fontFamily-body, ${z.body}`),fontSize:y(`fontSize-sm, ${W.sm}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-tertiary, ${P.palette.text.tertiary}`)},"body-xs":{fontFamily:y(`fontFamily-body, ${z.body}`),fontWeight:y(`fontWeight-md, ${A.md}`),fontSize:y(`fontSize-xs, ${W.xs}`),lineHeight:y(`lineHeight-md, ${Y.md}`),color:y(`palette-text-tertiary, ${P.palette.text.tertiary}`)}}},q=w?Bn(H,w):H,{colorSchemes:ee}=q,R=Ae(q,i1),L=D({colorSchemes:ee},R,{breakpoints:vh(p!=null?p:{}),components:Bn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:J,theme:le})=>{var ne;const ge=J.instanceFontSize;return D({margin:"var(--Icon-margin)"},J.fontSize&&J.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${le.vars.fontSize[J.fontSize]})`},!J.htmlColor&&D({color:`var(--Icon-color, ${L.vars.palette.text.icon})`},J.color&&J.color!=="inherit"&&le.vars.palette[J.color]&&{color:`rgba(${(ne=le.vars.palette[J.color])==null?void 0:ne.mainChannel} / 1)`}),ge&&ge!=="inherit"&&{"--Icon-fontSize":le.vars.fontSize[ge]})}}}},g),cssVarPrefix:h,getCssVar:y,spacing:wh(m)});function F(J,le){Object.keys(le).forEach(ne=>{const ge={main:"500",light:"200",dark:"700"};J==="dark"&&(ge.main=400),!le[ne].mainChannel&&le[ne][ge.main]&&(le[ne].mainChannel=mr(le[ne][ge.main])),!le[ne].lightChannel&&le[ne][ge.light]&&(le[ne].lightChannel=mr(le[ne][ge.light])),!le[ne].darkChannel&&le[ne][ge.dark]&&(le[ne].darkChannel=mr(le[ne][ge.dark]))})}Object.entries(L.colorSchemes).forEach(([J,le])=>{F(J,le.palette)});const V={prefix:h,shouldSkipGeneratingVar:S},{vars:te,generateCssVars:se}=ZA(D({colorSchemes:ee},R),V);L.vars=te,L.generateCssVars=se,L.unstable_sxConfig=D({},e1,void 0),L.unstable_sx=function(le){return Ia({sx:le,theme:this})},L.getColorSchemeSelector=J=>J==="light"?"&":`&[data-joy-color-scheme="${J}"], [data-joy-color-scheme="${J}"] &`;const ae={getCssVar:y,palette:L.colorSchemes.light.palette};return L.variants=Bn({plain:Tt("plain",ae),plainHover:Tt("plainHover",ae),plainActive:Tt("plainActive",ae),plainDisabled:Tt("plainDisabled",ae),outlined:Tt("outlined",ae),outlinedHover:Tt("outlinedHover",ae),outlinedActive:Tt("outlinedActive",ae),outlinedDisabled:Tt("outlinedDisabled",ae),soft:Tt("soft",ae),softHover:Tt("softHover",ae),softActive:Tt("softActive",ae),softDisabled:Tt("softDisabled",ae),solid:Tt("solid",ae),solidHover:Tt("solidHover",ae),solidActive:Tt("solidActive",ae),solidDisabled:Tt("solidDisabled",ae)},v),L.palette=D({},L.colorSchemes.light.palette,{colorScheme:"light"}),L.shouldSkipGeneratingVar=S,L.applyStyles=Ih,L}const kh=a1(),be=WA({defaultTheme:kh,themeId:mh});function ct({props:e,name:t}){return YA({props:e,name:t,defaultTheme:D({},kh,{components:{}}),themeId:mh})}function s1(e){return it("MuiAccordion",e)}const l1=Xe("MuiAccordion",["root","expanded","disabled"]),c1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],u1=["component","slots","slotProps"],d1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:l}=t,s=Ae(t,c1),{component:c,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,u1),p=d[e]||r,m=wI(f[e],i),g=AI(D({className:n},s,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m})),{props:{component:v},internalRef:S}=g,w=Ae(g.props,d1),y=sn(S,m==null?void 0:m.ref,t.ref),x=a?a(w):{},b=D({},i,x),T=e==="root"?v||c:v,E=CI(p,D({},e==="root"&&!c&&!d[e]&&l,e!=="root"&&!d[e]&&l,w,T&&{as:T},{ref:y}),b);return Object.keys(x).forEach(P=>{delete E[P]}),[p,E]}const ql=j.createContext({});function f1(e){return it("MuiListItem",e)}const Ph=Xe("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Ta=j.createContext(!1),Ql=j.createContext(!1),Dh=j.createContext(!1),Oh=j.createContext(void 0),h1=j.createContext(void 0),Rh=j.createContext(void 0),p1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],g1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${ye(o)}`,i&&`variant${ye(i)}`],startAction:["startAction"],endAction:["endAction"]};return lt(a,f1,{})},Jl=be("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"},D({"--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&&D({},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})`},{[`.${Ph.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),m1=be(Jl,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),v1=be("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})),b1=be("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%)"})),Mh=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyListItem"}),i=j.useContext(Rh),o=j.useContext(Oh),a=j.useContext(Ql),l=j.useContext(Dh),s=j.useContext(Ta),{component:c,className:d,children:f,nested:h=!1,sticky:p=!1,variant:m="plain",color:g="neutral",startAction:v,endAction:S,role:w,slots:y={},slotProps:x={}}=r,b=Ae(r,p1),[T,E]=j.useState(""),[P,O]=(o==null?void 0:o.split(":"))||["",""],G=c||(P&&!P.match(/^(ul|ol|menu)$/)?"div":void 0);let z=i==="menu"?"none":void 0;o&&(z={menu:"none",menubar:"none",group:"presentation"}[O]),w&&(z=w);const A=D({},r,{sticky:p,startAction:v,endAction:S,row:a,wrap:l,variant:m,color:g,nesting:s,nested:h,component:G,role:z}),W=g1(A),Y=D({},b,{component:G,slots:y,slotProps:x}),[N,$]=Ie("root",{additionalProps:{role:z},ref:n,className:Ln(W.root,d),elementType:m1,externalForwardedProps:Y,ownerState:A}),[B,H]=Ie("startAction",{className:W.startAction,elementType:v1,externalForwardedProps:Y,ownerState:A}),[q,ee]=Ie("endAction",{className:W.endAction,elementType:b1,externalForwardedProps:Y,ownerState:A});return u.jsx(h1.Provider,{value:E,children:u.jsx(Ta.Provider,{value:h?T||!0:!1,children:u.jsxs(N,D({},$,{children:[v&&u.jsx(B,D({},H,{children:v})),j.Children.map(f,(R,L)=>{var F;return j.isValidElement(R)?j.cloneElement(R,D({},L===0&&{"data-first-child":""},Gf(R,["ListItem"])&&{component:((F=R.props)==null?void 0:F.component)||"div"})):R}),S&&u.jsx(q,D({},ee,{children:S}))]}))})})});Mh.muiName="ListItem";const Lh=Mh;function y1(e){return it("MuiAccordionDetails",e)}const br=Xe("MuiAccordionDetails",["root","content","expanded"]),x1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],C1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${ye(n)}`,t&&`variant${ye(t)}`]};return lt(o,s1,{})},w1=be(Jl,{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"},[`& .${br.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),I1=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:l,defaultExpanded:s=!1,disabled:c=!1,expanded:d,onChange:f,variant:h="plain",slots:p={},slotProps:m={}}=r,g=Ae(r,x1),v=ji(i),[S,w]=kl({controlled:d,default:s,name:"Accordion",state:"expanded"}),y=j.useCallback(G=>{w(!S),f&&f(G,!S)},[S,f,w]),x=j.useMemo(()=>({accordionId:v,expanded:S,disabled:c,toggle:y}),[v,S,c,y]),b=D({},g,{component:o,slots:p,slotProps:m}),T=D({},r,{component:o,color:a,variant:h,expanded:S,disabled:c,nested:!0}),E=C1(T),[P,O]=Ie("root",{ref:n,className:E.root,elementType:w1,externalForwardedProps:b,ownerState:T});return u.jsx(ql.Provider,{value:x,children:u.jsx(P,D({},O,{children:j.Children.map(l,(G,z)=>j.isValidElement(G)&&z===0?j.cloneElement(G,{"data-first-child":""}):G)}))})});function S1(e){return it("MuiAccordionGroup",e)}Xe("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const A1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function Xl(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=u.jsx(Ql.Provider,{value:r,children:u.jsx(Dh.Provider,{value:i,children:j.Children.map(t,(a,l)=>j.isValidElement(a)?j.cloneElement(a,D({},l===0&&{"data-first-child":""},l===j.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:u.jsx(Ta.Provider,{value:n,children:o})}const Zl=({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=D({},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 l;r[o]=((l=e.vars)==null?void 0:l.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 T1(e){return it("MuiList",e)}Xe("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const E1=j.createContext(void 0),_1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],k1=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,l={root:["root",o,t&&`variant${ye(t)}`,n&&`color${ye(n)}`,!a&&!i&&r&&`size${ye(r)}`,a&&`size${ye(a)}`,i&&"nesting"]};return lt(l,T1,{})},ec=be("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=Zl({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(l){return l==="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}:l==="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}:l==="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&&D({},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&&D({},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"?D({},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"}),D({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})]}),P1=be(ec,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),D1=j.forwardRef(function(t,n){var r;const i=j.useContext(Ta),o=j.useContext(Rh),a=j.useContext(E1),l=ct({props:t,name:"JoyList"}),{component:s,className:c,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:m="plain",color:g="neutral",role:v,slots:S={},slotProps:w={}}=l,y=Ae(l,_1),x=f||((r=t.size)!=null?r:"md");let b;o&&(b="group"),a&&(b="presentation"),v&&(b=v);const T=D({},l,{instanceSize:t.size,size:x,nesting:i,orientation:h,wrap:p,variant:m,color:g,role:b}),E=k1(T),P=D({},y,{component:s,slots:S,slotProps:w}),[O,G]=Ie("root",{ref:n,className:Ln(E.root,c),elementType:P1,externalForwardedProps:P,ownerState:T,additionalProps:{as:s,role:b,"aria-labelledby":typeof i=="string"?i:void 0}});return u.jsx(O,D({},G,{children:u.jsx(Oh.Provider,{value:`${typeof s=="string"?s:""}:${b||""}`,children:u.jsx(Xl,{row:h==="horizontal",wrap:p,children:d})})}))}),O1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],R1=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`,r&&`size${ye(r)}`]};return lt(i,S1,{})},M1=be(ec,{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}`,[`& .${br.root}.${br.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),D({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${l1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),L1=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:l=!1,variant:s="plain",transition:c="0.2s ease",size:d="md",slots:f={},slotProps:h={}}=r,p=Ae(r,O1),m=D({},p,{component:i,slots:f,slotProps:h}),g=D({},r,{component:i,color:o,disableDivider:l,variant:s,transition:c,size:d}),v=R1(g),[S,w]=Ie("root",{ref:n,className:v.root,elementType:M1,externalForwardedProps:m,ownerState:g});return u.jsx(S,D({},w,{children:u.jsx(Xl,{children:a})}))}),B1=["component","children","color","variant","slots","slotProps"],$1=e=>{const{expanded:t}=e;return lt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},y1,{})},N1=be("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return D({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(.${br.expanded})`]:{gridTemplateRows:"0fr"}})}),F1=be("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(.${br.expanded})`]:{paddingBlock:0}}),z1=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:l="plain",slots:s={},slotProps:c={}}=r,d=Ae(r,B1),{accordionId:f,expanded:h=!1}=j.useContext(ql),p=j.useRef(null),m=sn(p,n);j.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const P=E.getAttribute("data-prev-tabindex"),O=E.getAttribute("tabindex");O&&P&&(E.setAttribute("tabindex",P),E.removeAttribute("data-prev-tabindex")),!P&&!O&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const g=D({},d,{component:i,slots:s,slotProps:c}),v=D({},r,{component:i,color:a,variant:l,expanded:h,nesting:!0}),S=$1(v),[w,y]=Ie("root",{ref:m,className:S.root,elementType:N1,externalForwardedProps:g,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:v}),[x,b]=Ie("content",{className:S.content,elementType:F1,externalForwardedProps:g,ownerState:v});return u.jsx(w,D({},y,{children:u.jsx(x,D({},b,{children:o}))}))});function j1(e){return it("MuiAccordionSummary",e)}const Ea=Xe("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),_a=Xe("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),V1=j.createContext("horizontal"),tc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;return D({"--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]:D({},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],[`.${Ph.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${_a.selected}`]:D({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${_a.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]},[`&.${_a.disabled}`]:D({},(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color])})});be(tc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>D({},!e.row&&{[`&.${_a.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function U1(e){return it("MuiSvgIcon",e)}Xe("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const H1=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],W1=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${ye(t)}`,n&&`size${ye(n)}`,r&&`fontSize${ye(r)}`]};return lt(i,U1,{})},Bh={sm:"xl",md:"xl2",lg:"xl3"},G1=be("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return D({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[Bh[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[Bh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&D({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)`}))}),$h=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:l="svg",fontSize:s,htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",size:p="md",slots:m={},slotProps:g={}}=r,v=Ae(r,H1),S=j.isValidElement(i)&&i.type==="svg",w=D({},r,{color:a,component:l,size:p,instanceSize:t.size,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:S}),y=W1(w),x=D({},v,{component:l,slots:m,slotProps:g}),[b,T]=Ie("root",{ref:n,className:Ln(y.root,o),elementType:G1,externalForwardedProps:x,ownerState:w,additionalProps:D({color:c,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},S&&i.props)});return u.jsxs(b,D({},T,{children:[S?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});function nc(e,t){function n(r,i){return u.jsx($h,D({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=$h.muiName,j.memo(j.forwardRef(n))}const Y1=nc(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Nh;const K1=["component","color","children","indicator","variant","slots","slotProps"],q1=e=>{const{disabled:t,expanded:n}=e;return lt({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},j1,{})},Q1=be(Jl,{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)",[`&.${Ea.expanded}`]:{"--Icon-color":"currentColor"}})),J1=be(tc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${Ea.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),X1=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${Ea.expanded}`]:{transform:"rotate(180deg)"}}),Z1=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:l=Nh||(Nh=u.jsx(Y1,{})),variant:s="plain",slots:c={},slotProps:d={}}=r,f=Ae(r,K1),{accordionId:h,disabled:p=!1,expanded:m=!1,toggle:g}=j.useContext(ql),v=D({},f,{component:i,slots:c,slotProps:d}),S=D({},r,{component:i,color:o,disabled:p,expanded:m,variant:s}),w=G=>{if(g&&g(G),typeof d.button=="function"){var z,A;(z=d.button(S))==null||(A=z.onClick)==null||A.call(z,G)}else{var W,Y;(W=d.button)==null||(Y=W.onClick)==null||Y.call(W,G)}},y=q1(S),[x,b]=Ie("root",{ref:n,className:y.root,elementType:Q1,externalForwardedProps:v,ownerState:S}),[T,E]=Ie("button",{ref:n,className:y.button,elementType:J1,externalForwardedProps:v,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":m?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:w},ownerState:S}),[P,O]=Ie("indicator",{ref:n,className:y.indicator,elementType:X1,externalForwardedProps:v,ownerState:S});return u.jsx(x,D({},b,{children:u.jsxs(T,D({},E,{children:[a,l&&u.jsx(P,D({},O,{children:l}))]}))}))}),eT=({label:e,disabled:t,children:n})=>(t=t||!1,u.jsx(L1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${Ea.button}:hover`]:{backgroundColor:"#fff"},[`& .${br.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${br.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:u.jsxs(I1,{disabled:t,children:[u.jsx(Z1,{children:e}),u.jsx(z1,{variant:"soft",children:n})]})})),rc={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"]]},ic=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const l=(s,c,d,f)=>{d!=="api"&&(f.getText().trim()===""?a(""):a(s))};return t==="description"?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i,className:"ql-container ql-toolbar"}),u.jsx(I.FormHelperText,{children:o})]}):u.jsx(I.Box,{sx:()=>({marginBottom:"16px"}),children:u.jsx(vi,{value:n||r,defaultValue:r,onChange:l,modules:rc,placeholder:i})})},tT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return u.jsxs(I.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(I.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[u.jsx(I.Tab,{children:e.labels.richText}),u.jsx(I.Tab,{children:e.labels.plainText})]}),u.jsx(I.TabPanel,{value:0,sx:{px:0},children:u.jsx(ic,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),u.jsx(I.TabPanel,{value:1,sx:{px:0},children:u.jsx(I.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},nT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,l)=>{i(l||"")};return u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e}),u.jsx(I.Select,{defaultValue:t,onChange:o,children:n.map((a,l)=>u.jsx(I.Option,{value:a,children:a},`basic-select-${a}-${l}`))}),r?u.jsx(I.FormHelperText,{children:r}):u.jsx(u.Fragment,{})]})},oc=j.createContext("md");function rT(e){return it("MuiTabs",e)}Xe("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const iT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],oT=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${ye(n)}`,r&&`color${ye(r)}`,i&&`size${ye(i)}`]};return lt(o,rT,{})},aT=be("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:l,p:s,padding:c}=Zl({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),d=Zn(t,`palette.${o}`)||o||Zn(t,`palette.${a}`)||a||l||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return D({},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":d==="transparent"?"initial":d,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],s!==void 0&&{"--Tabs-padding":s},c!==void 0&&{"--Tabs-padding":c})}),Fh=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:l="horizontal",direction:s="ltr",component:c,variant:d="plain",color:f="neutral",size:h="md",slots:p={},slotProps:m={}}=r,g=Ae(r,iT),v=a||(o===void 0?0:void 0),{contextValue:S}=ES(D({},r,{orientation:l,defaultValue:v})),w=D({},r,{orientation:l,direction:s,variant:d,color:f,size:h}),y=oT(w),x=D({},g,{component:c,slots:p,slotProps:m}),[b,T]=Ie("root",{ref:n,elementType:aT,externalForwardedProps:x,additionalProps:{ref:n,as:c},ownerState:w,className:y.root});return u.jsx(b,D({},T,{children:u.jsx(_S,{value:S,children:u.jsx(oc.Provider,{value:h,children:i})})}))});function sT(e){return it("MuiTabList",e)}Xe("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function lT(e){return it("MuiTab",e)}const ac=Xe("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),cT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],uT=e=>{const{orientation:t,size:n,variant:r,color:i}=e,o={root:["root",t,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return lt(o,sT,{})},dT=be(ec,{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 D({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},A1,{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&&D({},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&&{[`& .${ac.root}`]:{flex:t.tabFlex}})}),zh=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabList"}),i=j.useContext(oc),{isRtl:o,orientation:a,getRootProps:l,contextValue:s}=OS({rootRef:n}),{component:c="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:m=!1,underlinePlacement:g=a==="horizontal"?"bottom":"right",tabFlex:v,sticky:S,slots:w={},slotProps:y={}}=r,x=Ae(r,cT),b=p!=null?p:i,T=D({},r,{isRtl:o,orientation:a,variant:f,color:h,size:b,sticky:S,tabFlex:v,nesting:!1,disableUnderline:m,underlinePlacement:g}),E=uT(T),P=D({},x,{component:c,slots:w,slotProps:y}),[O,G]=Ie("root",{ref:n,elementType:dT,getSlotProps:l,externalForwardedProps:P,ownerState:T,className:E.root});return u.jsx(O,D({},G,{children:u.jsx(RS,{value:s,children:u.jsx(Xl,{row:a==="horizontal",nested:!0,children:d})})}))}),fT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],hT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,l={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${ye(i)}`,o&&`color${ye(o)}`]};return lt(l,lT,{})},pT=be(tc,{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))"}}]),jr=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTab"}),i=j.useContext(Ql),{action:o,children:a,disabled:l=!1,component:s="button",orientation:c="horizontal",variant:d="plain",color:f="neutral",disableIndicator:h=!1,indicatorPlacement:p=i?"bottom":"right",indicatorInset:m=!1,slots:g={},slotProps:v={}}=r,S=Ae(r,fT),w=j.useRef(null),y=sn(w,n),{active:x,focusVisible:b,setFocusVisible:T,selected:E,getRootProps:P}=LS(D({},r,{rootRef:y}));j.useImperativeHandle(o,()=>({focusVisible:()=>{T(!0),w.current.focus()}}),[T]);const O=D({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:m,orientation:c,row:i,active:x,focusVisible:b,disabled:l,selected:E,variant:d,color:f}),G=hT(O),z=D({},S,{component:s,slots:g,slotProps:v}),[A,W]=Ie("root",{ref:n,elementType:pT,getSlotProps:P,externalForwardedProps:z,ownerState:O,className:G.root});return u.jsx(V1.Provider,{value:c,children:u.jsx(A,D({},W,{children:a}))})});function Fn(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 jh(e){if(j.isValidElement(e)||Wf.isValidElementType(e)||!Fn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=jh(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?U({},e):e;return Fn(e)&&Fn(t)&&Object.keys(t).forEach(i=>{j.isValidElement(t[i])||Wf.isValidElementType(t[i])?r[i]=t[i]:Fn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Fn(e[i])?r[i]=Wt(e[i],t[i],n):n.clone?r[i]=Fn(t[i])?jh(t[i]):t[i]:r[i]=t[i]}),r}function yr(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 Vr(e){if(typeof e!="string")throw new Error(yr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sc(e,t){const n=U({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=U(U({},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]=U({},a);for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const s=l;n[i][s]=sc(o[s],a[s])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function gT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",l=!0;for(let s=0;s<o.length;s+=1){const c=o[s];c&&(a+=(l===!0?"":" ")+t(c),l=!1,n&&n[c]&&(a+=" "+n[c]))}r[i]=a}return r}const Vh=e=>e,mT=(()=>{let e=Vh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vh}}})(),vT={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 Uh(e,t,n="Mui"){const r=vT[t];return r?`${n}-${r}`:`${mT.generate(e)}-${t}`}function bT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Uh(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 Gi(e,t){return t?Wt(e,t,{clone:!1}):e}function xT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,l;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((l=i.match(o))==null?void 0:l[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},U({},t)):t}function CT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function wT(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 IT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...l)=>t(e.breakpoints.up(...l),a),o.down=(...l)=>t(e.breakpoints.down(...l),a),o.between=(...l)=>t(e.breakpoints.between(...l),a),o.only=(...l)=>t(e.breakpoints.only(...l),a),o.not=(...l)=>{const s=t(e.breakpoints.not(...l),a);return s.includes("not all and")?s.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):s}}const r={},i=o=>(n(r,o),r);return n(i),X(U({},e),{containerQueries:i})}const ka={xs:0,sm:600,md:900,lg:1200,xl:1536},Hh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ka[e]}px)`},ST={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ka[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function zn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Hh;return t.reduce((a,l,s)=>(a[o.up(o.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Hh;return Object.keys(t).reduce((a,l)=>{if(CT(o.keys,l)){const s=wT(r.containerQueries?r:ST,l);s&&(a[s]=n(t[l],l))}else if(Object.keys(o.values||ka).includes(l)){const s=o.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function AT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function TT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Pa(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 Da(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Pa(e,n)||r,t&&(i=t(i,r,e)),i}function ot(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const l=a[t],s=a.theme,c=Pa(s,r)||{};return zn(a,l,f=>{let h=Da(c,i,f);return f===h&&typeof f=="string"&&(h=Da(c,i,`${t}${f==="default"?"":Vr(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function ET(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const _T={m:"margin",p:"padding"},kT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Wh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},PT=ET(e=>{if(e.length>2)if(Wh[e])e=Wh[e];else return[e];const[t,n]=e.split(""),r=_T[t],i=kT[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),lc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...lc,...cc];function Yi(e,t,n,r){var o;const i=(o=Pa(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 l=Math.abs(a),s=i[l];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof i=="function"?i:()=>{}}function uc(e){return Yi(e,"spacing",8)}function Ki(e,t){return typeof t=="string"||t==null?t:e(t)}function DT(e,t){return n=>e.reduce((r,i)=>(r[i]=Ki(t,n),r),{})}function OT(e,t,n,r){if(!t.includes(n))return null;const i=PT(n),o=DT(i,r),a=e[n];return zn(e,a,o)}function Gh(e,t){const n=uc(e.theme);return Object.keys(e).map(r=>OT(e,t,r,n)).reduce(Gi,{})}function Ze(e){return Gh(e,lc)}Ze.propTypes={},Ze.filterProps=lc;function et(e){return Gh(e,cc)}et.propTypes={},et.filterProps=cc;function Oa(...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]?Gi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function tn(e){return typeof e!="number"?e:`${e}px solid`}function nn(e,t){return ot({prop:e,themeKey:"borders",transform:t})}const RT=nn("border",tn),MT=nn("borderTop",tn),LT=nn("borderRight",tn),BT=nn("borderBottom",tn),$T=nn("borderLeft",tn),NT=nn("borderColor"),FT=nn("borderTopColor"),zT=nn("borderRightColor"),jT=nn("borderBottomColor"),VT=nn("borderLeftColor"),UT=nn("outline",tn),HT=nn("outlineColor"),Ra=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Yi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ki(t,r)});return zn(e,e.borderRadius,n)}return null};Ra.propTypes={},Ra.filterProps=["borderRadius"],Oa(RT,MT,LT,BT,$T,NT,FT,zT,jT,VT,Ra,UT,HT);const Ma=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({gap:Ki(t,r)});return zn(e,e.gap,n)}return null};Ma.propTypes={},Ma.filterProps=["gap"];const La=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({columnGap:Ki(t,r)});return zn(e,e.columnGap,n)}return null};La.propTypes={},La.filterProps=["columnGap"];const Ba=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Yi(e.theme,"spacing",8),n=r=>({rowGap:Ki(t,r)});return zn(e,e.rowGap,n)}return null};Ba.propTypes={},Ba.filterProps=["rowGap"];const WT=ot({prop:"gridColumn"}),GT=ot({prop:"gridRow"}),YT=ot({prop:"gridAutoFlow"}),KT=ot({prop:"gridAutoColumns"}),qT=ot({prop:"gridAutoRows"}),QT=ot({prop:"gridTemplateColumns"}),JT=ot({prop:"gridTemplateRows"}),XT=ot({prop:"gridTemplateAreas"}),ZT=ot({prop:"gridArea"});Oa(Ma,La,Ba,WT,GT,YT,KT,qT,QT,JT,XT,ZT);function Ur(e,t){return t==="grey"?t:e}const eE=ot({prop:"color",themeKey:"palette",transform:Ur}),tE=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ur}),nE=ot({prop:"backgroundColor",themeKey:"palette",transform:Ur});Oa(eE,tE,nE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const rE=ot({prop:"width",transform:Gt}),dc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,l,s;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||ka[n];return r?((s=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:s.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Gt(n)}};return zn(e,e.maxWidth,t)}return null};dc.filterProps=["maxWidth"];const iE=ot({prop:"minWidth",transform:Gt}),oE=ot({prop:"height",transform:Gt}),aE=ot({prop:"maxHeight",transform:Gt}),sE=ot({prop:"minHeight",transform:Gt});ot({prop:"size",cssProperty:"width",transform:Gt}),ot({prop:"size",cssProperty:"height",transform:Gt});const lE=ot({prop:"boxSizing"});Oa(rE,dc,iE,oE,aE,sE,lE);const $a={border:{themeKey:"borders",transform:tn},borderTop:{themeKey:"borders",transform:tn},borderRight:{themeKey:"borders",transform:tn},borderBottom:{themeKey:"borders",transform:tn},borderLeft:{themeKey:"borders",transform:tn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:tn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ra},color:{themeKey:"palette",transform:Ur},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ur},backgroundColor:{themeKey:"palette",transform:Ur},p:{style:et},pt:{style:et},pr:{style:et},pb:{style:et},pl:{style:et},px:{style:et},py:{style:et},padding:{style:et},paddingTop:{style:et},paddingRight:{style:et},paddingBottom:{style:et},paddingLeft:{style:et},paddingX:{style:et},paddingY:{style:et},paddingInline:{style:et},paddingInlineStart:{style:et},paddingInlineEnd:{style:et},paddingBlock:{style:et},paddingBlockStart:{style:et},paddingBlockEnd:{style:et},m:{style:Ze},mt:{style:Ze},mr:{style:Ze},mb:{style:Ze},ml:{style:Ze},mx:{style:Ze},my:{style:Ze},margin:{style:Ze},marginTop:{style:Ze},marginRight:{style:Ze},marginBottom:{style:Ze},marginLeft:{style:Ze},marginX:{style:Ze},marginY:{style:Ze},marginInline:{style:Ze},marginInlineStart:{style:Ze},marginInlineEnd:{style:Ze},marginBlock:{style:Ze},marginBlockStart:{style:Ze},marginBlockEnd:{style:Ze},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:Ma},rowGap:{style:Ba},columnGap:{style:La},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Gt},maxWidth:{style:dc},minWidth:{transform:Gt},height:{transform:Gt},maxHeight:{transform:Gt},minHeight:{transform:Gt},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 cE(...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 uE(e,t){return typeof e=="function"?e(t):e}function dE(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:s=n,themeKey:c,transform:d,style:f}=l;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Pa(i,c)||{};return f?f(a):zn(a,r,m=>{let g=Da(h,d,m);return m===g&&typeof m=="string"&&(g=Da(h,d,`${n}${m==="default"?"":Vr(m)}`,m)),s===!1?g:{[s]:g}})}function t(n){var l;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(l=i.unstable_sxConfig)!=null?l:$a;function a(s){let c=s;if(typeof s=="function")c=s(i);else if(typeof s!="object")return s;if(!c)return null;const d=AT(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=uE(c[p],i);if(m!=null)if(typeof m=="object")if(o[p])h=Gi(h,e(p,m,i,o));else{const g=zn({theme:i},m,v=>({[p]:v}));cE(g,m)?h[p]=t({sx:m,theme:i}):h=Gi(h,g)}else h=Gi(h,e(p,m,i,o))}),xT(i,TT(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Hr=dE();Hr.filterProps=["sx"];function fE(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 hE={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},pE=!1,gE=/[A-Z]|^ms/g,mE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yh=function(t){return t.charCodeAt(1)===45},Kh=function(t){return t!=null&&typeof t!="boolean"},fc=BS(function(e){return Yh(e)?e:e.replace(gE,"-$&").toLowerCase()}),qh=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(mE,function(r,i,o){return er={name:i,styles:o,next:er},i})}return hE[t]!==1&&!Yh(t)&&typeof n=="number"&&n!==0?n+"px":n},vE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Na(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 er={name:i.name,styles:i.styles,next:er},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)er={name:a.name,styles:a.styles,next:er},a=a.next;var l=o.styles+";";return l}return bE(e,t,n)}}var s=n;return s}function bE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Na(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var l=a;Kh(l)&&(r+=fc(o)+":"+qh(o,l)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&pE)throw new Error(vE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var s=0;s<a.length;s++)Kh(a[s])&&(r+=fc(o)+":"+qh(o,a[s])+";");else{var c=Na(e,t,a);switch(o){case"animation":case"animationName":{r+=fc(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}}return r}var Qh=/label:\s*([^\s;{]+)\s*(;|$)/g,er;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="";er=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Na(n,t,o);else{var a=o;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=Na(n,t,e[l]),r){var s=o;i+=s[l]}Qh.lastIndex=0;for(var c="",d;(d=Qh.exec(i))!==null;)c+="-"+d[1];var f=fE(i)+c;return{name:f,styles:i,next:er}}/**
|
|
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 xE(e,t){return Lt(e,t)}function CE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Jh=[];function Xh(e){return Jh[0]=e,yE(Jh)}const wE=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)=>X(V({},n),{[r.key]:r.val}),{})};function IE(e){const h=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=h,i=We(h,["values","unit","step"]),o=wE(t),a=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function s(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,g){const m=a.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:g)-r/100}${n})`}function d(p){return a.indexOf(p)+1<a.length?c(p,a[a.indexOf(p)+1]):l(p)}function f(p){const g=a.indexOf(p);return g===0?l(a[1]):g===a.length-1?s(a[g]):c(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return V({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const SE={borderRadius:4};function Zh(e=8,t=uc({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 AE(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 ep(e={},...t){const d=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=d,a=We(d,["breakpoints","palette","spacing","shape"]),l=IE(n),s=Zh(i);let c=Wt({breakpoints:l,direction:"ltr",components:{},palette:V({mode:"light"},r),spacing:s,shape:V(V({},SE),o)},a);return c=IT(c),c.applyStyles=AE,c=t.reduce((f,h)=>Wt(f,h),c),c.unstable_sxConfig=V(V({},$a),a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(h){return Hr({sx:h,theme:this})},c}function tp(e){const i=e,{variants:t}=i,n=We(i,["variants"]),r={variants:t,style:Xh(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Xh(o.style))}),r}const TE=ep();function hc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function EE(e){return e?(t,n)=>n[e]:null}function _E(e,t,n){e.theme=DE(e.theme)?n:e.theme[t]||e.theme}function Fa(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Fa(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=We(r,["variants"])}return np(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function np(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=X(V(V({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&((i=e.ownerState)==null?void 0:i[l])!==a.props[l])continue e;typeof a.style=="function"?(r!=null||(r=X(V(V({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function kE(e={}){const{themeId:t,defaultTheme:n=TE,rootShouldForwardProp:r=hc,slotShouldForwardProp:i=hc}=e;function o(l){_E(l,t,n)}return(l,s={})=>{CE(l,w=>w.filter(E=>E!==Hr));const y=s,{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=EE(RE(d))}=y,g=We(y,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),m=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let A=hc;d==="Root"||d==="root"?A=r:d?A=i:OE(l)&&(A=void 0);const x=xE(l,V({shouldForwardProp:A,label:PE()},g)),b=w=>{if(typeof w=="function"&&w.__emotion_real!==w)return function(k){return Fa(k,w)};if(Fn(w)){const E=tp(w);return E.variants?function(N){return Fa(N,E)}:E.style}return w},S=(...w)=>{const E=[],k=w.map(b),N=[];if(E.push(o),c&&p&&N.push(function(H){var L,U;const $=(U=(L=H.theme.components)==null?void 0:L[c])==null?void 0:U.styleOverrides;if(!$)return null;const B={};for(const q in $)B[q]=Fa(H,$[q]);return p(H,B)}),c&&!m&&N.push(function(H){var B,L;const G=H.theme,$=(L=(B=G==null?void 0:G.components)==null?void 0:B[c])==null?void 0:L.variants;return $?np(H,$):null}),v||N.push(Hr),Array.isArray(k[0])){const T=k.shift(),H=new Array(E.length).fill(""),G=new Array(N.length).fill("");let $;$=[...H,...T,...G],$.raw=[...H,...T.raw,...G],E.unshift($)}const Y=[...E,...k,...N],W=x(...Y);return l.muiName&&(W.muiName=l.muiName),W};return x.withConfig&&(S.withConfig=x.withConfig),S}}function PE(e,t){return void 0}function DE(e){for(const t in e)return!1;return!0}function OE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function RE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function pc(e,t=0,n=1){return yT(e,t,n)}function ME(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 tr(e){if(e.type)return e;if(e.charAt(0)==="#")return tr(ME(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(yr(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(yr(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const LE=e=>{const t=tr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},qi=(e,t)=>{try{return LE(e)}catch(n){return e}};function za(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 rp(e){e=tr(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(c,d=(c+n/30)%12)=>i-o*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const s=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",s.push(t[3])),za({type:l,values:s})}function gc(e){e=tr(e);let t=e.type==="hsl"||e.type==="hsla"?tr(rp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:mi((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function BE(e,t){const n=gc(e),r=gc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function $E(e,t){return e=tr(e),t=pc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,za(e)}function ja(e,t,n){try{return $E(e,t)}catch(r){return e}}function mc(e,t){if(e=tr(e),t=pc(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 za(e)}function Ne(e,t,n){try{return mc(e,t)}catch(r){return e}}function vc(e,t){if(e=tr(e),t=pc(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 za(e)}function Fe(e,t,n){try{return vc(e,t)}catch(r){return e}}function NE(e,t=.15){return gc(e)>.5?mc(e,t):vc(e,t)}function Va(e,t,n){try{return NE(e,t)}catch(r){return e}}const FE=z.createContext(void 0);function zE(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?sc(i.defaultProps,r):!i.styleOverrides&&!i.variants?sc(i,r):r}function jE({props:e,name:t}){const n=z.useContext(FE);return zE({props:e,name:t,theme:{components:n}})}const ip={theme:void 0};function VE(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(ip.theme=i.theme,o=tp(e(ip)),t=o,n=i.theme),o}}function UE(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 op=(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])})},HE=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,s])=>{(!n||n&&!n([...o,l]))&&s!=null&&(typeof s=="object"&&Object.keys(s).length>0?r(s,[...o,l],Array.isArray(s)?[...a,l]:a):t([...o,l],s,a))})}r(e)},WE=(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 bc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return HE(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=WE(l,s);Object.assign(i,{[d]:f}),op(o,l,`var(${d})`,c),op(a,l,`var(${d}, ${f})`,c)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function GE(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:i}=t,b=e,{colorSchemes:o={},components:a,defaultColorScheme:l="light"}=b,s=We(b,["colorSchemes","components","defaultColorScheme"]),{vars:c,css:d,varsWithDefaults:f}=bc(s,t);let h=f;const p={},S=o,{[l]:g}=S,m=We(S,[Ps(l)]);if(Object.entries(m||{}).forEach(([y,w])=>{const{vars:E,css:k,varsWithDefaults:N}=bc(w,t);h=Wt(h,N),p[y]={css:k,vars:E}}),g){const{css:y,vars:w,varsWithDefaults:E}=bc(g,t);h=Wt(h,E),p[l]={css:y,vars:w}}function v(y,w){var k,N;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),y){if(E==="media")return e.defaultColorScheme===y?":root":{[`@media (prefers-color-scheme: ${((N=(k=o[y])==null?void 0:k.palette)==null?void 0:N.mode)||y})`]:{":root":w}};if(E)return e.defaultColorScheme===y?`:root, ${E.replace("%s",String(y))}`:E.replace("%s",String(y))}return":root"}return{vars:h,generateThemeVars:()=>{let y=V({},c);return Object.entries(p).forEach(([,{vars:w}])=>{y=Wt(y,w)}),y},generateStyleSheets:()=>{var W,T;const y=[],w=e.defaultColorScheme||"light";function E(H,G){Object.keys(G).length&&y.push(typeof H=="string"?{[H]:V({},G)}:H)}E(n(void 0,V({},d)),d);const Y=p,{[w]:k}=Y,N=We(Y,[Ps(w)]);if(k){const{css:H}=k,G=(T=(W=o[w])==null?void 0:W.palette)==null?void 0:T.mode,$=V(!r&&G?{colorScheme:G}:{},H);E(n(w,V({},$)),$)}return Object.entries(N).forEach(([H,{css:G}])=>{var L,U;const $=(U=(L=o[H])==null?void 0:L.palette)==null?void 0:U.mode,B=V(!r&&$?{colorScheme:$}:{},G);E(n(H,V({},B)),B)}),y}}}function YE(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 Qi={black:"#000",white:"#fff"},KE={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"},Wr={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"},Gr={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"},Ji={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"},Yr={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"},Kr={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"},qr={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 ap(){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:Qi.white,default:Qi.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 qE=ap();function sp(){return{text:{primary:Qi.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:Qi.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 lp=sp();function cp(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=vc(e.main,i):t==="dark"&&(e.dark=mc(e.main,o)))}function QE(e="light"){return e==="dark"?{main:Yr[200],light:Yr[50],dark:Yr[400]}:{main:Yr[700],light:Yr[400],dark:Yr[800]}}function JE(e="light"){return e==="dark"?{main:Wr[200],light:Wr[50],dark:Wr[400]}:{main:Wr[500],light:Wr[300],dark:Wr[700]}}function XE(e="light"){return e==="dark"?{main:Gr[500],light:Gr[300],dark:Gr[700]}:{main:Gr[700],light:Gr[400],dark:Gr[800]}}function ZE(e="light"){return e==="dark"?{main:Kr[400],light:Kr[300],dark:Kr[700]}:{main:Kr[700],light:Kr[500],dark:Kr[900]}}function e_(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function t_(e="light"){return e==="dark"?{main:Ji[400],light:Ji[300],dark:Ji[700]}:{main:"#ed6c02",light:Ji[500],dark:Ji[900]}}function yc(e){const m=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=m,i=We(m,["mode","contrastThreshold","tonalOffset"]),o=e.primary||QE(t),a=e.secondary||JE(t),l=e.error||XE(t),s=e.info||ZE(t),c=e.success||e_(t),d=e.warning||t_(t);function f(v){return BE(v,lp.text.primary)>=n?lp.text.primary:qE.text.primary}const h=({color:v,name:A,mainShade:x=500,lightShade:b=300,darkShade:S=700})=>{if(v=V({},v),!v.main&&v[x]&&(v.main=v[x]),!v.hasOwnProperty("main"))throw new Error(yr(11,A?` (${A})`:"",x));if(typeof v.main!="string")throw new Error(yr(12,A?` (${A})`:"",JSON.stringify(v.main)));return cp(v,"light",b,r),cp(v,"dark",S,r),v.contrastText||(v.contrastText=f(v.main)),v};let p;return t==="light"?p=ap():t==="dark"&&(p=sp()),Wt(V({common:V({},Qi),mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:s,name:"info"}),success:h({color:c,name:"success"}),grey:KE,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},p),i)}function n_(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 r_(e,t){return V({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function i_(e){return Math.round(e*1e5)/1e5}const up={textTransform:"uppercase"},dp='"Roboto", "Helvetica", "Arial", sans-serif';function o_(e,t){const v=typeof t=="function"?t(e):t,{fontFamily:n=dp,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:s=16,allVariants:c,pxToRem:d}=v,f=We(v,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),h=r/14,p=d||(A=>`${A/s*h}rem`),g=(A,x,b,S,y)=>V(V(V({fontFamily:n,fontWeight:A,fontSize:p(x),lineHeight:b},n===dp?{letterSpacing:`${i_(S/x)}em`}:{}),y),c),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(o,48,1.167,0),h4:g(o,34,1.235,.25),h5:g(o,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(o,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(o,16,1.5,.15),body2:g(o,14,1.43,.15),button:g(a,14,1.75,.4,up),caption:g(o,12,1.66,.4),overline:g(o,12,2.66,1,up),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wt(V({htmlFontSize:s,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},m),f,{clone:!1})}const a_=.2,s_=.14,l_=.12;function je(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${a_})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${s_})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${l_})`].join(",")}const c_=["none",je(0,2,1,-1,0,1,1,0,0,1,3,0),je(0,3,1,-2,0,2,2,0,0,1,5,0),je(0,3,3,-2,0,3,4,0,0,1,8,0),je(0,2,4,-1,0,4,5,0,0,1,10,0),je(0,3,5,-1,0,5,8,0,0,1,14,0),je(0,3,5,-1,0,6,10,0,0,1,18,0),je(0,4,5,-2,0,7,10,1,0,2,16,1),je(0,5,5,-3,0,8,10,1,0,3,14,2),je(0,5,6,-3,0,9,12,1,0,3,16,2),je(0,6,6,-3,0,10,14,1,0,4,18,3),je(0,6,7,-4,0,11,15,1,0,4,20,3),je(0,7,8,-4,0,12,17,2,0,5,22,4),je(0,7,8,-4,0,13,19,2,0,5,24,4),je(0,7,9,-4,0,14,21,2,0,5,26,4),je(0,8,9,-5,0,15,22,2,0,6,28,5),je(0,8,10,-5,0,16,24,2,0,6,30,5),je(0,8,11,-5,0,17,26,2,0,6,32,5),je(0,9,11,-5,0,18,28,2,0,7,34,6),je(0,9,12,-6,0,19,29,2,0,7,36,6),je(0,10,13,-6,0,20,31,3,0,8,38,7),je(0,10,13,-6,0,21,33,3,0,8,40,7),je(0,10,14,-6,0,22,35,3,0,8,42,7),je(0,11,14,-7,0,23,36,3,0,9,44,8),je(0,11,15,-7,0,24,38,3,0,9,46,8)],u_={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)"},d_={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function fp(e){return`${Math.round(e)}ms`}function f_(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*mi(t,.25)+t/5)*10),3e3)}function h_(e){const t=V(V({},u_),e.easing),n=V(V({},d_),e.duration);return X(V({getAutoHeightDuration:f_,create:(i=["all"],o={})=>{const d=o,{duration:a=n.standard,easing:l=t.easeInOut,delay:s=0}=d,c=We(d,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof a=="string"?a:fp(a)} ${l} ${typeof s=="string"?s:fp(s)}`).join(",")}},e),{easing:t,duration:n})}const p_={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function g_(e){return Fn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function hp(e={}){const t=V({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,l]=i[o];!g_(l)||a.startsWith("unstable_")?delete r[a]:Fn(l)&&(r[a]=V({},l),n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
2339
|
+
*/function xE(e,t){return Lt(e,t)}function CE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Jh=[];function Xh(e){return Jh[0]=e,yE(Jh)}const wE=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)=>X(U({},n),{[r.key]:r.val}),{})};function IE(e){const h=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=h,i=We(h,["values","unit","step"]),o=wE(t),a=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function s(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,m){const g=a.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:m)-r/100}${n})`}function d(p){return a.indexOf(p)+1<a.length?c(p,a[a.indexOf(p)+1]):l(p)}function f(p){const m=a.indexOf(p);return m===0?l(a[1]):m===a.length-1?s(a[m]):c(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return U({keys:a,values:o,up:l,down:s,between:c,only:d,not:f,unit:n},i)}const SE={borderRadius:4};function Zh(e=8,t=uc({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 AE(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 ep(e={},...t){const d=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=d,a=We(d,["breakpoints","palette","spacing","shape"]),l=IE(n),s=Zh(i);let c=Wt({breakpoints:l,direction:"ltr",components:{},palette:U({mode:"light"},r),spacing:s,shape:U(U({},SE),o)},a);return c=IT(c),c.applyStyles=AE,c=t.reduce((f,h)=>Wt(f,h),c),c.unstable_sxConfig=U(U({},$a),a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(h){return Hr({sx:h,theme:this})},c}function tp(e){const i=e,{variants:t}=i,n=We(i,["variants"]),r={variants:t,style:Xh(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Xh(o.style))}),r}const TE=ep();function hc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function EE(e){return e?(t,n)=>n[e]:null}function _E(e,t,n){e.theme=DE(e.theme)?n:e.theme[t]||e.theme}function Fa(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Fa(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=We(r,["variants"])}return np(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function np(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=X(U(U({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&((i=e.ownerState)==null?void 0:i[l])!==a.props[l])continue e;typeof a.style=="function"?(r!=null||(r=X(U(U({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function kE(e={}){const{themeId:t,defaultTheme:n=TE,rootShouldForwardProp:r=hc,slotShouldForwardProp:i=hc}=e;function o(l){_E(l,t,n)}return(l,s={})=>{CE(l,T=>T.filter(E=>E!==Hr));const b=s,{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=EE(RE(d))}=b,m=We(b,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),g=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let S=hc;d==="Root"||d==="root"?S=r:d?S=i:OE(l)&&(S=void 0);const w=xE(l,U({shouldForwardProp:S,label:PE()},m)),y=T=>{if(typeof T=="function"&&T.__emotion_real!==T)return function(P){return Fa(P,T)};if(Fn(T)){const E=tp(T);return E.variants?function(O){return Fa(O,E)}:E.style}return T},x=(...T)=>{const E=[],P=T.map(y),O=[];if(E.push(o),c&&p&&O.push(function(W){var B,H;const N=(H=(B=W.theme.components)==null?void 0:B[c])==null?void 0:H.styleOverrides;if(!N)return null;const $={};for(const q in N)$[q]=Fa(W,N[q]);return p(W,$)}),c&&!g&&O.push(function(W){var $,B;const Y=W.theme,N=(B=($=Y==null?void 0:Y.components)==null?void 0:$[c])==null?void 0:B.variants;return N?np(W,N):null}),v||O.push(Hr),Array.isArray(P[0])){const A=P.shift(),W=new Array(E.length).fill(""),Y=new Array(O.length).fill("");let N;N=[...W,...A,...Y],N.raw=[...W,...A.raw,...Y],E.unshift(N)}const G=[...E,...P,...O],z=w(...G);return l.muiName&&(z.muiName=l.muiName),z};return w.withConfig&&(x.withConfig=w.withConfig),x}}function PE(e,t){return void 0}function DE(e){for(const t in e)return!1;return!0}function OE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function RE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function pc(e,t=0,n=1){return yT(e,t,n)}function ME(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 tr(e){if(e.type)return e;if(e.charAt(0)==="#")return tr(ME(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(yr(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(yr(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const LE=e=>{const t=tr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},qi=(e,t)=>{try{return LE(e)}catch(n){return e}};function za(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 rp(e){e=tr(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(c,d=(c+n/30)%12)=>i-o*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const s=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",s.push(t[3])),za({type:l,values:s})}function gc(e){e=tr(e);let t=e.type==="hsl"||e.type==="hsla"?tr(rp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:mi((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function BE(e,t){const n=gc(e),r=gc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function $E(e,t){return e=tr(e),t=pc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,za(e)}function ja(e,t,n){try{return $E(e,t)}catch(r){return e}}function mc(e,t){if(e=tr(e),t=pc(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 za(e)}function Ne(e,t,n){try{return mc(e,t)}catch(r){return e}}function vc(e,t){if(e=tr(e),t=pc(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 za(e)}function Fe(e,t,n){try{return vc(e,t)}catch(r){return e}}function NE(e,t=.15){return gc(e)>.5?mc(e,t):vc(e,t)}function Va(e,t,n){try{return NE(e,t)}catch(r){return e}}const FE=j.createContext(void 0);function zE(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?sc(i.defaultProps,r):!i.styleOverrides&&!i.variants?sc(i,r):r}function jE({props:e,name:t}){const n=j.useContext(FE);return zE({props:e,name:t,theme:{components:n}})}const ip={theme:void 0};function VE(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(ip.theme=i.theme,o=tp(e(ip)),t=o,n=i.theme),o}}function UE(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 op=(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])})},HE=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,s])=>{(!n||n&&!n([...o,l]))&&s!=null&&(typeof s=="object"&&Object.keys(s).length>0?r(s,[...o,l],Array.isArray(s)?[...a,l]:a):t([...o,l],s,a))})}r(e)},WE=(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 bc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return HE(e,(l,s,c)=>{if((typeof s=="string"||typeof s=="number")&&(!r||!r(l,s))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=WE(l,s);Object.assign(i,{[d]:f}),op(o,l,`var(${d})`,c),op(a,l,`var(${d}, ${f})`,c)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function GE(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:i}=t,y=e,{colorSchemes:o={},components:a,defaultColorScheme:l="light"}=y,s=We(y,["colorSchemes","components","defaultColorScheme"]),{vars:c,css:d,varsWithDefaults:f}=bc(s,t);let h=f;const p={},x=o,{[l]:m}=x,g=We(x,[Ps(l)]);if(Object.entries(g||{}).forEach(([b,T])=>{const{vars:E,css:P,varsWithDefaults:O}=bc(T,t);h=Wt(h,O),p[b]={css:P,vars:E}}),m){const{css:b,vars:T,varsWithDefaults:E}=bc(m,t);h=Wt(h,E),p[l]={css:b,vars:T}}function v(b,T){var P,O;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),b){if(E==="media")return e.defaultColorScheme===b?":root":{[`@media (prefers-color-scheme: ${((O=(P=o[b])==null?void 0:P.palette)==null?void 0:O.mode)||b})`]:{":root":T}};if(E)return e.defaultColorScheme===b?`:root, ${E.replace("%s",String(b))}`:E.replace("%s",String(b))}return":root"}return{vars:h,generateThemeVars:()=>{let b=U({},c);return Object.entries(p).forEach(([,{vars:T}])=>{b=Wt(b,T)}),b},generateStyleSheets:()=>{var z,A;const b=[],T=e.defaultColorScheme||"light";function E(W,Y){Object.keys(Y).length&&b.push(typeof W=="string"?{[W]:U({},Y)}:W)}E(n(void 0,U({},d)),d);const G=p,{[T]:P}=G,O=We(G,[Ps(T)]);if(P){const{css:W}=P,Y=(A=(z=o[T])==null?void 0:z.palette)==null?void 0:A.mode,N=U(!r&&Y?{colorScheme:Y}:{},W);E(n(T,U({},N)),N)}return Object.entries(O).forEach(([W,{css:Y}])=>{var B,H;const N=(H=(B=o[W])==null?void 0:B.palette)==null?void 0:H.mode,$=U(!r&&N?{colorScheme:N}:{},Y);E(n(W,U({},$)),$)}),b}}}function YE(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 Qi={black:"#000",white:"#fff"},KE={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"},Wr={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"},Gr={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"},Ji={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"},Yr={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"},Kr={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"},qr={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 ap(){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:Qi.white,default:Qi.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 qE=ap();function sp(){return{text:{primary:Qi.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:Qi.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 lp=sp();function cp(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=vc(e.main,i):t==="dark"&&(e.dark=mc(e.main,o)))}function QE(e="light"){return e==="dark"?{main:Yr[200],light:Yr[50],dark:Yr[400]}:{main:Yr[700],light:Yr[400],dark:Yr[800]}}function JE(e="light"){return e==="dark"?{main:Wr[200],light:Wr[50],dark:Wr[400]}:{main:Wr[500],light:Wr[300],dark:Wr[700]}}function XE(e="light"){return e==="dark"?{main:Gr[500],light:Gr[300],dark:Gr[700]}:{main:Gr[700],light:Gr[400],dark:Gr[800]}}function ZE(e="light"){return e==="dark"?{main:Kr[400],light:Kr[300],dark:Kr[700]}:{main:Kr[700],light:Kr[500],dark:Kr[900]}}function e_(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function t_(e="light"){return e==="dark"?{main:Ji[400],light:Ji[300],dark:Ji[700]}:{main:"#ed6c02",light:Ji[500],dark:Ji[900]}}function yc(e){const g=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=g,i=We(g,["mode","contrastThreshold","tonalOffset"]),o=e.primary||QE(t),a=e.secondary||JE(t),l=e.error||XE(t),s=e.info||ZE(t),c=e.success||e_(t),d=e.warning||t_(t);function f(v){return BE(v,lp.text.primary)>=n?lp.text.primary:qE.text.primary}const h=({color:v,name:S,mainShade:w=500,lightShade:y=300,darkShade:x=700})=>{if(v=U({},v),!v.main&&v[w]&&(v.main=v[w]),!v.hasOwnProperty("main"))throw new Error(yr(11,S?` (${S})`:"",w));if(typeof v.main!="string")throw new Error(yr(12,S?` (${S})`:"",JSON.stringify(v.main)));return cp(v,"light",y,r),cp(v,"dark",x,r),v.contrastText||(v.contrastText=f(v.main)),v};let p;return t==="light"?p=ap():t==="dark"&&(p=sp()),Wt(U({common:U({},Qi),mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:s,name:"info"}),success:h({color:c,name:"success"}),grey:KE,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},p),i)}function n_(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 r_(e,t){return U({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function i_(e){return Math.round(e*1e5)/1e5}const up={textTransform:"uppercase"},dp='"Roboto", "Helvetica", "Arial", sans-serif';function o_(e,t){const v=typeof t=="function"?t(e):t,{fontFamily:n=dp,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:s=16,allVariants:c,pxToRem:d}=v,f=We(v,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),h=r/14,p=d||(S=>`${S/s*h}rem`),m=(S,w,y,x,b)=>U(U(U({fontFamily:n,fontWeight:S,fontSize:p(w),lineHeight:y},n===dp?{letterSpacing:`${i_(x/w)}em`}:{}),b),c),g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(o,48,1.167,0),h4:m(o,34,1.235,.25),h5:m(o,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(o,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(o,16,1.5,.15),body2:m(o,14,1.43,.15),button:m(a,14,1.75,.4,up),caption:m(o,12,1.66,.4),overline:m(o,12,2.66,1,up),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wt(U({htmlFontSize:s,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},g),f,{clone:!1})}const a_=.2,s_=.14,l_=.12;function je(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${a_})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${s_})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${l_})`].join(",")}const c_=["none",je(0,2,1,-1,0,1,1,0,0,1,3,0),je(0,3,1,-2,0,2,2,0,0,1,5,0),je(0,3,3,-2,0,3,4,0,0,1,8,0),je(0,2,4,-1,0,4,5,0,0,1,10,0),je(0,3,5,-1,0,5,8,0,0,1,14,0),je(0,3,5,-1,0,6,10,0,0,1,18,0),je(0,4,5,-2,0,7,10,1,0,2,16,1),je(0,5,5,-3,0,8,10,1,0,3,14,2),je(0,5,6,-3,0,9,12,1,0,3,16,2),je(0,6,6,-3,0,10,14,1,0,4,18,3),je(0,6,7,-4,0,11,15,1,0,4,20,3),je(0,7,8,-4,0,12,17,2,0,5,22,4),je(0,7,8,-4,0,13,19,2,0,5,24,4),je(0,7,9,-4,0,14,21,2,0,5,26,4),je(0,8,9,-5,0,15,22,2,0,6,28,5),je(0,8,10,-5,0,16,24,2,0,6,30,5),je(0,8,11,-5,0,17,26,2,0,6,32,5),je(0,9,11,-5,0,18,28,2,0,7,34,6),je(0,9,12,-6,0,19,29,2,0,7,36,6),je(0,10,13,-6,0,20,31,3,0,8,38,7),je(0,10,13,-6,0,21,33,3,0,8,40,7),je(0,10,14,-6,0,22,35,3,0,8,42,7),je(0,11,14,-7,0,23,36,3,0,9,44,8),je(0,11,15,-7,0,24,38,3,0,9,46,8)],u_={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)"},d_={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function fp(e){return`${Math.round(e)}ms`}function f_(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*mi(t,.25)+t/5)*10),3e3)}function h_(e){const t=U(U({},u_),e.easing),n=U(U({},d_),e.duration);return X(U({getAutoHeightDuration:f_,create:(i=["all"],o={})=>{const d=o,{duration:a=n.standard,easing:l=t.easeInOut,delay:s=0}=d,c=We(d,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof a=="string"?a:fp(a)} ${l} ${typeof s=="string"?s:fp(s)}`).join(",")}},e),{easing:t,duration:n})}const p_={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function g_(e){return Fn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function hp(e={}){const t=U({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,l]=i[o];!g_(l)||a.startsWith("unstable_")?delete r[a]:Fn(l)&&(r[a]=U({},l),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 xc(e={},...t){const p=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:l={},shape:s}=p,c=We(p,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(yr(20));const d=yc(o),f=ep(e);let h=Wt(f,{mixins:r_(f.breakpoints,r),palette:d,shadows:c_.slice(),typography:o_(d,l),transitions:h_(a),zIndex:
|
|
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 I_(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const yn=e=>{try{return e()}catch(t){}},S_=(e="mui")=>UE(e);function Cc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=b_(X(V({},t),{palette:V({mode:i},t==null?void 0:t.palette)}));return}const l=xc(X(V({},n),{palette:V({mode:i},t==null?void 0:t.palette)})),{palette:o}=l,a=We(l,["palette"]);return e[r]=X(V({},t),{palette:o,opacity:V(V({},pp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||gp(i)}),a}function A_(e={},...t){const N=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=y_,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:s=":root"}=N,c=We(N,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=S_(o),Y=n,{[f]:p,light:g,dark:m}=Y,v=We(Y,[Ps(f),"light","dark"]),A=V({},v);let x=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(x=!0),!x)throw new Error(yr(21,f));const b=Cc(A,x,c,f);g&&!A.light&&Cc(A,g,void 0,"light"),m&&!A.dark&&Cc(A,m,void 0,"dark");let S=X(V({defaultColorScheme:f},b),{cssVarPrefix:o,colorSchemeSelector:l,rootSelector:s,getCssVar:h,colorSchemes:A,font:V(V({},n_(b.typography)),b.font),spacing:I_(c.spacing)});Object.keys(S.colorSchemes).forEach(W=>{const T=S.colorSchemes[W].palette,H=G=>{const $=G.split("-"),B=$[1],L=$[2];return h(G,T[B][L])};if(T.mode==="light"&&(Z(T.common,"background","#fff"),Z(T.common,"onBackground","#000")),T.mode==="dark"&&(Z(T.common,"background","#000"),Z(T.common,"onBackground","#fff")),w_(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){Z(T.Alert,"errorColor",Ne(T.error.light,.6)),Z(T.Alert,"infoColor",Ne(T.info.light,.6)),Z(T.Alert,"successColor",Ne(T.success.light,.6)),Z(T.Alert,"warningColor",Ne(T.warning.light,.6)),Z(T.Alert,"errorFilledBg",H("palette-error-main")),Z(T.Alert,"infoFilledBg",H("palette-info-main")),Z(T.Alert,"successFilledBg",H("palette-success-main")),Z(T.Alert,"warningFilledBg",H("palette-warning-main")),Z(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.main))),Z(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.main))),Z(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.main))),Z(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.main))),Z(T.Alert,"errorStandardBg",Fe(T.error.light,.9)),Z(T.Alert,"infoStandardBg",Fe(T.info.light,.9)),Z(T.Alert,"successStandardBg",Fe(T.success.light,.9)),Z(T.Alert,"warningStandardBg",Fe(T.warning.light,.9)),Z(T.Alert,"errorIconColor",H("palette-error-main")),Z(T.Alert,"infoIconColor",H("palette-info-main")),Z(T.Alert,"successIconColor",H("palette-success-main")),Z(T.Alert,"warningIconColor",H("palette-warning-main")),Z(T.AppBar,"defaultBg",H("palette-grey-100")),Z(T.Avatar,"defaultBg",H("palette-grey-400")),Z(T.Button,"inheritContainedBg",H("palette-grey-300")),Z(T.Button,"inheritContainedHoverBg",H("palette-grey-A100")),Z(T.Chip,"defaultBorder",H("palette-grey-400")),Z(T.Chip,"defaultAvatarColor",H("palette-grey-700")),Z(T.Chip,"defaultIconColor",H("palette-grey-700")),Z(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Z(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Z(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Z(T.LinearProgress,"primaryBg",Fe(T.primary.main,.62)),Z(T.LinearProgress,"secondaryBg",Fe(T.secondary.main,.62)),Z(T.LinearProgress,"errorBg",Fe(T.error.main,.62)),Z(T.LinearProgress,"infoBg",Fe(T.info.main,.62)),Z(T.LinearProgress,"successBg",Fe(T.success.main,.62)),Z(T.LinearProgress,"warningBg",Fe(T.warning.main,.62)),Z(T.Skeleton,"bg",`rgba(${H("palette-text-primaryChannel")} / 0.11)`),Z(T.Slider,"primaryTrack",Fe(T.primary.main,.62)),Z(T.Slider,"secondaryTrack",Fe(T.secondary.main,.62)),Z(T.Slider,"errorTrack",Fe(T.error.main,.62)),Z(T.Slider,"infoTrack",Fe(T.info.main,.62)),Z(T.Slider,"successTrack",Fe(T.success.main,.62)),Z(T.Slider,"warningTrack",Fe(T.warning.main,.62));const G=Va(T.background.default,.8);Z(T.SnackbarContent,"bg",G),Z(T.SnackbarContent,"color",yn(()=>T.getContrastText(G))),Z(T.SpeedDialAction,"fabHoverBg",Va(T.background.paper,.15)),Z(T.StepConnector,"border",H("palette-grey-400")),Z(T.StepContent,"border",H("palette-grey-400")),Z(T.Switch,"defaultColor",H("palette-common-white")),Z(T.Switch,"defaultDisabledColor",H("palette-grey-100")),Z(T.Switch,"primaryDisabledColor",Fe(T.primary.main,.62)),Z(T.Switch,"secondaryDisabledColor",Fe(T.secondary.main,.62)),Z(T.Switch,"errorDisabledColor",Fe(T.error.main,.62)),Z(T.Switch,"infoDisabledColor",Fe(T.info.main,.62)),Z(T.Switch,"successDisabledColor",Fe(T.success.main,.62)),Z(T.Switch,"warningDisabledColor",Fe(T.warning.main,.62)),Z(T.TableCell,"border",Fe(ja(T.divider,1),.88)),Z(T.Tooltip,"bg",ja(T.grey[700],.92))}if(T.mode==="dark"){Z(T.Alert,"errorColor",Fe(T.error.light,.6)),Z(T.Alert,"infoColor",Fe(T.info.light,.6)),Z(T.Alert,"successColor",Fe(T.success.light,.6)),Z(T.Alert,"warningColor",Fe(T.warning.light,.6)),Z(T.Alert,"errorFilledBg",H("palette-error-dark")),Z(T.Alert,"infoFilledBg",H("palette-info-dark")),Z(T.Alert,"successFilledBg",H("palette-success-dark")),Z(T.Alert,"warningFilledBg",H("palette-warning-dark")),Z(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.dark))),Z(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.dark))),Z(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.dark))),Z(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.dark))),Z(T.Alert,"errorStandardBg",Ne(T.error.light,.9)),Z(T.Alert,"infoStandardBg",Ne(T.info.light,.9)),Z(T.Alert,"successStandardBg",Ne(T.success.light,.9)),Z(T.Alert,"warningStandardBg",Ne(T.warning.light,.9)),Z(T.Alert,"errorIconColor",H("palette-error-main")),Z(T.Alert,"infoIconColor",H("palette-info-main")),Z(T.Alert,"successIconColor",H("palette-success-main")),Z(T.Alert,"warningIconColor",H("palette-warning-main")),Z(T.AppBar,"defaultBg",H("palette-grey-900")),Z(T.AppBar,"darkBg",H("palette-background-paper")),Z(T.AppBar,"darkColor",H("palette-text-primary")),Z(T.Avatar,"defaultBg",H("palette-grey-600")),Z(T.Button,"inheritContainedBg",H("palette-grey-800")),Z(T.Button,"inheritContainedHoverBg",H("palette-grey-700")),Z(T.Chip,"defaultBorder",H("palette-grey-700")),Z(T.Chip,"defaultAvatarColor",H("palette-grey-300")),Z(T.Chip,"defaultIconColor",H("palette-grey-300")),Z(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Z(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Z(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Z(T.LinearProgress,"primaryBg",Ne(T.primary.main,.5)),Z(T.LinearProgress,"secondaryBg",Ne(T.secondary.main,.5)),Z(T.LinearProgress,"errorBg",Ne(T.error.main,.5)),Z(T.LinearProgress,"infoBg",Ne(T.info.main,.5)),Z(T.LinearProgress,"successBg",Ne(T.success.main,.5)),Z(T.LinearProgress,"warningBg",Ne(T.warning.main,.5)),Z(T.Skeleton,"bg",`rgba(${H("palette-text-primaryChannel")} / 0.13)`),Z(T.Slider,"primaryTrack",Ne(T.primary.main,.5)),Z(T.Slider,"secondaryTrack",Ne(T.secondary.main,.5)),Z(T.Slider,"errorTrack",Ne(T.error.main,.5)),Z(T.Slider,"infoTrack",Ne(T.info.main,.5)),Z(T.Slider,"successTrack",Ne(T.success.main,.5)),Z(T.Slider,"warningTrack",Ne(T.warning.main,.5));const G=Va(T.background.default,.98);Z(T.SnackbarContent,"bg",G),Z(T.SnackbarContent,"color",yn(()=>T.getContrastText(G))),Z(T.SpeedDialAction,"fabHoverBg",Va(T.background.paper,.15)),Z(T.StepConnector,"border",H("palette-grey-600")),Z(T.StepContent,"border",H("palette-grey-600")),Z(T.Switch,"defaultColor",H("palette-grey-300")),Z(T.Switch,"defaultDisabledColor",H("palette-grey-600")),Z(T.Switch,"primaryDisabledColor",Ne(T.primary.main,.55)),Z(T.Switch,"secondaryDisabledColor",Ne(T.secondary.main,.55)),Z(T.Switch,"errorDisabledColor",Ne(T.error.main,.55)),Z(T.Switch,"infoDisabledColor",Ne(T.info.main,.55)),Z(T.Switch,"successDisabledColor",Ne(T.success.main,.55)),Z(T.Switch,"warningDisabledColor",Ne(T.warning.main,.55)),Z(T.TableCell,"border",Ne(ja(T.divider,1),.68)),Z(T.Tooltip,"bg",ja(T.grey[700],.92))}jn(T.background,"default"),jn(T.background,"paper"),jn(T.common,"background"),jn(T.common,"onBackground"),jn(T,"divider"),Object.keys(T).forEach(G=>{const $=T[G];G!=="tonalOffset"&&$&&typeof $=="object"&&($.main&&Z(T[G],"mainChannel",qi(Xi($.main))),$.light&&Z(T[G],"lightChannel",qi(Xi($.light))),$.dark&&Z(T[G],"darkChannel",qi(Xi($.dark))),$.contrastText&&Z(T[G],"contrastTextChannel",qi(Xi($.contrastText))),G==="text"&&(jn(T[G],"primary"),jn(T[G],"secondary")),G==="action"&&($.active&&jn(T[G],"active"),$.selected&&jn(T[G],"selected")))})}),S=t.reduce((W,T)=>Wt(W,T),S);const y={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:C_(S)},{vars:w,generateThemeVars:E,generateStyleSheets:k}=GE(S,y);return S.vars=w,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([W,T])=>{S[W]=T}),S.generateThemeVars=E,S.generateStyleSheets=k,S.generateSpacing=function(){return Zh(c.spacing,uc(this))},S.getColorSchemeSelector=YE(l),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=a,S.unstable_sxConfig=V(V({},$a),c==null?void 0:c.unstable_sxConfig),S.unstable_sx=function(T){return Hr({sx:T,theme:this})},S.toRuntimeSource=hp,S}function mp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=X(V({},n!==!0&&n),{palette:yc(X(V({},n===!0?{}:n.palette),{mode:t}))}))}function T_(e={},...t){const d=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=d,a=We(d,["palette","cssVariables","colorSchemes","defaultColorScheme"]),l=o||"light",s=i==null?void 0:i[l],c=V(V({},i),n?{[l]:X(V({},typeof s!="boolean"&&s),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return xc(e,...t);let f=n;"palette"in e||c[l]&&(c[l]!==!0?f=c[l].palette:l==="dark"&&(f={mode:"dark"}));const h=xc(X(V({},e),{palette:f}),...t);return h.defaultColorScheme=l,h.colorSchemes=c,h.palette.mode==="light"&&(h.colorSchemes.light=X(V({},c.light!==!0&&c.light),{palette:h.palette}),mp(h,"dark",c.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=X(V({},c.dark!==!0&&c.dark),{palette:h.palette}),mp(h,"light",c.light)),h}return!n&&!("light"in c)&&l==="light"&&(c.light=!0),A_(V(X(V({},a),{colorSchemes:c,defaultColorScheme:l}),typeof r!="boolean"&&r),...t)}const E_=T_(),__="$$material";function k_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const P_=kE({themeId:__,defaultTheme:E_,rootShouldForwardProp:e=>k_(e)&&e!=="classes"}),D_=VE;function O_(e){return jE(e)}function R_(e){return Uh("MuiSvgIcon",e)}bT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const M_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Vr(t)}`,`fontSize${Vr(n)}`]};return gT(i,R_,r)},L_=P_("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Vr(n.color)}`],t[`fontSize${Vr(n.fontSize)}`]]}})(D_(({theme:e})=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,g,m,v,A,x;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:b=>!b.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((l=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:c.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}},...Object.entries(((h=e.vars)!=null?h:e).palette).filter(([,b])=>b&&b.main).map(([b])=>{var S,y,w;return{props:{color:b},style:{color:(w=(y=((S=e.vars)!=null?S:e).palette)==null?void 0:y[b])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(m=(g=((p=e.vars)!=null?p:e).palette)==null?void 0:g.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(x=(A=((v=e.vars)!=null?v:e).palette)==null?void 0:A.action)==null?void 0:x.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),wc=z.forwardRef(function(t,n){const r=O_({props:t,name:"MuiSvgIcon"}),x=r,{children:i,className:o,color:a="inherit",component:l="svg",fontSize:s="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=x,p=We(x,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),g=z.isValidElement(i)&&i.type==="svg",m=X(V({},r),{color:a,component:l,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:g}),v={};d||(v.viewBox=h);const A=M_(m);return u.jsxs(L_,X(V(V(V({as:l,className:Ln(A.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v),p),g&&i.props),{ownerState:m,children:[g?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});wc.muiName="SvgIcon";function Ve(e,t){function n(r,i){return u.jsx(wc,X(V({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=wc.muiName,z.memo(z.forwardRef(n))}const Ic=Ve(u.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"),B_=Ve(u.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"),$_=Ve(u.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 N_(e){return it("MuiTabPanel",e)}Xe("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const F_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],z_=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${ye(n)}`,o,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return lt(a,N_,{})},j_=be("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return D({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])}),Qr=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabPanel"}),{orientation:i}=ga()||{orientation:"horizontal"},o=z.useContext(oc),{children:a,value:l=0,component:s,color:c="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:g=!1}=r,m=Ae(r,F_),{hidden:v,getRootProps:A}=PS(D({},r,{value:l})),x=f!=null?f:o,b=D({},r,{orientation:i,hidden:v,size:x,color:c,variant:d}),S=z_(b),y=D({},m,{component:s,slots:h,slotProps:p}),[w,E]=Ie("root",{ref:n,elementType:j_,getSlotProps:A,externalForwardedProps:y,additionalProps:{role:"tabpanel",ref:n,as:s},ownerState:b,className:S.root});return g?u.jsx(w,D({},E,{children:a})):u.jsx(w,D({},E,{children:!v&&a}))});function V_(e){return it("MuiInput",e)}const vp=Xe("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"]),Ua=z.createContext(void 0),U_=["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 H_(e,t){var n;const r=z.useContext(Ua),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,className:c,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:g,name:m,onClick:v,onChange:A,onKeyDown:x,onKeyUp:b,onFocus:S,onBlur:y,placeholder:w,readOnly:E,required:k,type:N,value:Y}=e,W=Ae(e,U_),{getRootProps:T,getInputProps:H,focused:G,error:$,disabled:B}=WI({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:y,onClick:v,onChange:A,onFocus:S,required:k!=null?k:r==null?void 0:r.required,value:Y}),L={[t.disabled]:B,[t.error]:$,[t.focused]:G,[t.formControl]:!!r,[c]:c},U={[t.disabled]:B};return D({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,disabled:B,id:g,onKeyDown:x,onKeyUp:b,name:m,placeholder:w,readOnly:E,type:N},rootStateClasses:L,inputStateClasses:U,getRootProps:T,getInputProps:H,focused:G,error:$,disabled:B},W)}const Sc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,Zi="data-skip-inverted-colors",bp=`& :not([${Zi}], [${Zi}] *)`,yp=e=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,g,m,v,A,x,b,S,y,w;const E=Sc(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")]:`${(l=e.colorSchemes.light)==null?void 0:l.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(c=e.colorSchemes.light)==null?void 0:c.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(h=e.colorSchemes.dark)==null?void 0:h.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(p=e.colorSchemes.dark)==null?void 0:p.palette.background.body} !important`,[E("--palette-background-surface")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(x=e.colorSchemes.dark)==null?void 0:x.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(y=e.colorSchemes.dark)==null?void 0:y.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.divider} !important`}}};function W_(e){return e.theme!==void 0}const G_=e=>t=>{const n=W_(t)?t.theme:t,r=Gl(n.cssVarPrefix),i=Sc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[bp]:{"--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)`}},[`&, & [${Zi}]`]:yp(n)}},Y_=e=>t=>{const{theme:n=t}=t,r=Gl(n.cssVarPrefix),i=Sc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[bp]:{"--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)`}},[`&, & [${Zi}]`]:yp(n)}},K_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],q_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${ye(r)}`,i&&`color${ye(i)}`,o&&`size${ye(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return lt(a,V_,{})},Q_=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;const s=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[D({"--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([${Zi}])`]:D({},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}`],s,{backgroundColor:(o=s==null?void 0:s.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":D({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${vp.disabled}`]:(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),J_=be("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":D({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)"}})),X_=be("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"}),Z_=be("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"}),ek=be(Q_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),tk=be(J_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),nk=be(X_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),rk=be(Z_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Ha=z.forwardRef(function(t,n){var r,i,o,a,l,s;const c=ct({props:t,name:"JoyInput"}),d=H_(D({},c,{disabledInProp:t.disabled}),vp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:g,getInputProps:m,formControl:v,focused:A,error:x=!1,disabled:b,fullWidth:S=!1,size:y="md",color:w="neutral",variant:E="outlined",startDecorator:k,endDecorator:N,component:Y,slots:W={},slotProps:T={}}=d,H=Ae(d,K_),G=(r=(i=t.error)!=null?i:v==null?void 0:v.error)!=null?r:x,$=(o=(a=t.size)!=null?a:v==null?void 0:v.size)!=null?o:y,B=(l=t.color)!=null?l:G?"danger":(s=v==null?void 0:v.color)!=null?s:w,L=D({instanceColor:G?"danger":t.color},c,{fullWidth:S,color:B,disabled:b,error:G,focused:A,size:$,variant:E}),U=q_(L),q=D({},H,{component:Y,slots:W,slotProps:T}),[ee,O]=Ie("root",{ref:n,className:[U.root,h],elementType:ek,getSlotProps:g,externalForwardedProps:q,ownerState:L}),[M,F]=Ie("input",D({},v&&{additionalProps:{id:v.htmlFor,"aria-describedby":v["aria-describedby"]}},{className:[U.input,p],elementType:tk,getSlotProps:m,internalForwardedProps:f,externalForwardedProps:q,ownerState:L})),[j,te]=Ie("startDecorator",{className:U.startDecorator,elementType:nk,externalForwardedProps:q,ownerState:L}),[se,ae]=Ie("endDecorator",{className:U.endDecorator,elementType:rk,externalForwardedProps:q,ownerState:L});return u.jsxs(ee,D({},O,{children:[k&&u.jsx(j,D({},te,{children:k})),u.jsx(M,D({},F)),N&&u.jsx(se,D({},ae,{children:N}))]}))}),eo=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,onChange:l})=>u.jsxs(I.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{required:i,color:"primary",children:e}),u.jsx(Ha,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,onChange:l,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),xp=Ve(u.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 ik(e){return it("MuiCircularProgress",e)}Xe("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let ok=e=>e,Cp;const ak=["color","backgroundColor"],sk=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],lk=pe.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),ck=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${ye(n)}`,r&&`variant${ye(r)}`,i&&`size${ye(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return lt(o,ik,{})};function Jr(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const uk=be("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:l,backgroundColor:s}=a,c=Ae(a,ak);return D({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":s,"--CircularProgress-progressColor":l,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":Jr("track","3px"),"--_progress-thickness":Jr("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":Jr("track","6px"),"--_progress-thickness":Jr("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":Jr("track","8px"),"--_progress-thickness":Jr("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:l},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},c,e.variant==="outlined"&&{"&::before":D({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},c)},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})}),dk=be("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))"}),fk=be("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)"}),hk=be("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&&pe.css(Cp||(Cp=ok`
|
|
2346
|
+
export default theme;`}function xc(e={},...t){const p=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:l={},shape:s}=p,c=We(p,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(yr(20));const d=yc(o),f=ep(e);let h=Wt(f,{mixins:r_(f.breakpoints,r),palette:d,shadows:c_.slice(),typography:o_(d,l),transitions:h_(a),zIndex:U({},p_)});return h=Wt(h,c),h=t.reduce((m,g)=>Wt(m,g),h),h.unstable_sxConfig=U(U({},$a),c==null?void 0:c.unstable_sxConfig),h.unstable_sx=function(g){return Hr({sx:g,theme:this})},h.toRuntimeSource=hp,h}function m_(e){let t;return e<1?t=5.11916*mi(e,2):t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const v_=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=m_(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function pp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function gp(e){return e==="dark"?v_:[]}function b_(e){const a=e,{palette:t={mode:"light"},opacity:n,overlays:r}=a,i=We(a,["palette","opacity","overlays"]),o=yc(t);return U({palette:o,opacity:U(U({},pp(o.mode)),n),overlays:r||gp(o.mode)},i)}function y_(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 x_=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],C_=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 x_(e.cssVarPrefix).forEach(l=>{a[l]=n[l],delete n[l]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:o?{[o.replace("%s",t)]:a,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:U(U({},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 w_(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Z(e,t,n){!e[t]&&n&&(e[t]=n)}function Xi(e){return typeof e!="string"||!e.startsWith("hsl")?e:rp(e)}function jn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=qi(Xi(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 I_(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const yn=e=>{try{return e()}catch(t){}},S_=(e="mui")=>UE(e);function Cc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=b_(X(U({},t),{palette:U({mode:i},t==null?void 0:t.palette)}));return}const l=xc(X(U({},n),{palette:U({mode:i},t==null?void 0:t.palette)})),{palette:o}=l,a=We(l,["palette"]);return e[r]=X(U({},t),{palette:o,opacity:U(U({},pp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||gp(i)}),a}function A_(e={},...t){const O=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=y_,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:s=":root"}=O,c=We(O,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=S_(o),G=n,{[f]:p,light:m,dark:g}=G,v=We(G,[Ps(f),"light","dark"]),S=U({},v);let w=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(w=!0),!w)throw new Error(yr(21,f));const y=Cc(S,w,c,f);m&&!S.light&&Cc(S,m,void 0,"light"),g&&!S.dark&&Cc(S,g,void 0,"dark");let x=X(U({defaultColorScheme:f},y),{cssVarPrefix:o,colorSchemeSelector:l,rootSelector:s,getCssVar:h,colorSchemes:S,font:U(U({},n_(y.typography)),y.font),spacing:I_(c.spacing)});Object.keys(x.colorSchemes).forEach(z=>{const A=x.colorSchemes[z].palette,W=Y=>{const N=Y.split("-"),$=N[1],B=N[2];return h(Y,A[$][B])};if(A.mode==="light"&&(Z(A.common,"background","#fff"),Z(A.common,"onBackground","#000")),A.mode==="dark"&&(Z(A.common,"background","#000"),Z(A.common,"onBackground","#fff")),w_(A,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),A.mode==="light"){Z(A.Alert,"errorColor",Ne(A.error.light,.6)),Z(A.Alert,"infoColor",Ne(A.info.light,.6)),Z(A.Alert,"successColor",Ne(A.success.light,.6)),Z(A.Alert,"warningColor",Ne(A.warning.light,.6)),Z(A.Alert,"errorFilledBg",W("palette-error-main")),Z(A.Alert,"infoFilledBg",W("palette-info-main")),Z(A.Alert,"successFilledBg",W("palette-success-main")),Z(A.Alert,"warningFilledBg",W("palette-warning-main")),Z(A.Alert,"errorFilledColor",yn(()=>A.getContrastText(A.error.main))),Z(A.Alert,"infoFilledColor",yn(()=>A.getContrastText(A.info.main))),Z(A.Alert,"successFilledColor",yn(()=>A.getContrastText(A.success.main))),Z(A.Alert,"warningFilledColor",yn(()=>A.getContrastText(A.warning.main))),Z(A.Alert,"errorStandardBg",Fe(A.error.light,.9)),Z(A.Alert,"infoStandardBg",Fe(A.info.light,.9)),Z(A.Alert,"successStandardBg",Fe(A.success.light,.9)),Z(A.Alert,"warningStandardBg",Fe(A.warning.light,.9)),Z(A.Alert,"errorIconColor",W("palette-error-main")),Z(A.Alert,"infoIconColor",W("palette-info-main")),Z(A.Alert,"successIconColor",W("palette-success-main")),Z(A.Alert,"warningIconColor",W("palette-warning-main")),Z(A.AppBar,"defaultBg",W("palette-grey-100")),Z(A.Avatar,"defaultBg",W("palette-grey-400")),Z(A.Button,"inheritContainedBg",W("palette-grey-300")),Z(A.Button,"inheritContainedHoverBg",W("palette-grey-A100")),Z(A.Chip,"defaultBorder",W("palette-grey-400")),Z(A.Chip,"defaultAvatarColor",W("palette-grey-700")),Z(A.Chip,"defaultIconColor",W("palette-grey-700")),Z(A.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Z(A.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Z(A.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Z(A.LinearProgress,"primaryBg",Fe(A.primary.main,.62)),Z(A.LinearProgress,"secondaryBg",Fe(A.secondary.main,.62)),Z(A.LinearProgress,"errorBg",Fe(A.error.main,.62)),Z(A.LinearProgress,"infoBg",Fe(A.info.main,.62)),Z(A.LinearProgress,"successBg",Fe(A.success.main,.62)),Z(A.LinearProgress,"warningBg",Fe(A.warning.main,.62)),Z(A.Skeleton,"bg",`rgba(${W("palette-text-primaryChannel")} / 0.11)`),Z(A.Slider,"primaryTrack",Fe(A.primary.main,.62)),Z(A.Slider,"secondaryTrack",Fe(A.secondary.main,.62)),Z(A.Slider,"errorTrack",Fe(A.error.main,.62)),Z(A.Slider,"infoTrack",Fe(A.info.main,.62)),Z(A.Slider,"successTrack",Fe(A.success.main,.62)),Z(A.Slider,"warningTrack",Fe(A.warning.main,.62));const Y=Va(A.background.default,.8);Z(A.SnackbarContent,"bg",Y),Z(A.SnackbarContent,"color",yn(()=>A.getContrastText(Y))),Z(A.SpeedDialAction,"fabHoverBg",Va(A.background.paper,.15)),Z(A.StepConnector,"border",W("palette-grey-400")),Z(A.StepContent,"border",W("palette-grey-400")),Z(A.Switch,"defaultColor",W("palette-common-white")),Z(A.Switch,"defaultDisabledColor",W("palette-grey-100")),Z(A.Switch,"primaryDisabledColor",Fe(A.primary.main,.62)),Z(A.Switch,"secondaryDisabledColor",Fe(A.secondary.main,.62)),Z(A.Switch,"errorDisabledColor",Fe(A.error.main,.62)),Z(A.Switch,"infoDisabledColor",Fe(A.info.main,.62)),Z(A.Switch,"successDisabledColor",Fe(A.success.main,.62)),Z(A.Switch,"warningDisabledColor",Fe(A.warning.main,.62)),Z(A.TableCell,"border",Fe(ja(A.divider,1),.88)),Z(A.Tooltip,"bg",ja(A.grey[700],.92))}if(A.mode==="dark"){Z(A.Alert,"errorColor",Fe(A.error.light,.6)),Z(A.Alert,"infoColor",Fe(A.info.light,.6)),Z(A.Alert,"successColor",Fe(A.success.light,.6)),Z(A.Alert,"warningColor",Fe(A.warning.light,.6)),Z(A.Alert,"errorFilledBg",W("palette-error-dark")),Z(A.Alert,"infoFilledBg",W("palette-info-dark")),Z(A.Alert,"successFilledBg",W("palette-success-dark")),Z(A.Alert,"warningFilledBg",W("palette-warning-dark")),Z(A.Alert,"errorFilledColor",yn(()=>A.getContrastText(A.error.dark))),Z(A.Alert,"infoFilledColor",yn(()=>A.getContrastText(A.info.dark))),Z(A.Alert,"successFilledColor",yn(()=>A.getContrastText(A.success.dark))),Z(A.Alert,"warningFilledColor",yn(()=>A.getContrastText(A.warning.dark))),Z(A.Alert,"errorStandardBg",Ne(A.error.light,.9)),Z(A.Alert,"infoStandardBg",Ne(A.info.light,.9)),Z(A.Alert,"successStandardBg",Ne(A.success.light,.9)),Z(A.Alert,"warningStandardBg",Ne(A.warning.light,.9)),Z(A.Alert,"errorIconColor",W("palette-error-main")),Z(A.Alert,"infoIconColor",W("palette-info-main")),Z(A.Alert,"successIconColor",W("palette-success-main")),Z(A.Alert,"warningIconColor",W("palette-warning-main")),Z(A.AppBar,"defaultBg",W("palette-grey-900")),Z(A.AppBar,"darkBg",W("palette-background-paper")),Z(A.AppBar,"darkColor",W("palette-text-primary")),Z(A.Avatar,"defaultBg",W("palette-grey-600")),Z(A.Button,"inheritContainedBg",W("palette-grey-800")),Z(A.Button,"inheritContainedHoverBg",W("palette-grey-700")),Z(A.Chip,"defaultBorder",W("palette-grey-700")),Z(A.Chip,"defaultAvatarColor",W("palette-grey-300")),Z(A.Chip,"defaultIconColor",W("palette-grey-300")),Z(A.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Z(A.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Z(A.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Z(A.LinearProgress,"primaryBg",Ne(A.primary.main,.5)),Z(A.LinearProgress,"secondaryBg",Ne(A.secondary.main,.5)),Z(A.LinearProgress,"errorBg",Ne(A.error.main,.5)),Z(A.LinearProgress,"infoBg",Ne(A.info.main,.5)),Z(A.LinearProgress,"successBg",Ne(A.success.main,.5)),Z(A.LinearProgress,"warningBg",Ne(A.warning.main,.5)),Z(A.Skeleton,"bg",`rgba(${W("palette-text-primaryChannel")} / 0.13)`),Z(A.Slider,"primaryTrack",Ne(A.primary.main,.5)),Z(A.Slider,"secondaryTrack",Ne(A.secondary.main,.5)),Z(A.Slider,"errorTrack",Ne(A.error.main,.5)),Z(A.Slider,"infoTrack",Ne(A.info.main,.5)),Z(A.Slider,"successTrack",Ne(A.success.main,.5)),Z(A.Slider,"warningTrack",Ne(A.warning.main,.5));const Y=Va(A.background.default,.98);Z(A.SnackbarContent,"bg",Y),Z(A.SnackbarContent,"color",yn(()=>A.getContrastText(Y))),Z(A.SpeedDialAction,"fabHoverBg",Va(A.background.paper,.15)),Z(A.StepConnector,"border",W("palette-grey-600")),Z(A.StepContent,"border",W("palette-grey-600")),Z(A.Switch,"defaultColor",W("palette-grey-300")),Z(A.Switch,"defaultDisabledColor",W("palette-grey-600")),Z(A.Switch,"primaryDisabledColor",Ne(A.primary.main,.55)),Z(A.Switch,"secondaryDisabledColor",Ne(A.secondary.main,.55)),Z(A.Switch,"errorDisabledColor",Ne(A.error.main,.55)),Z(A.Switch,"infoDisabledColor",Ne(A.info.main,.55)),Z(A.Switch,"successDisabledColor",Ne(A.success.main,.55)),Z(A.Switch,"warningDisabledColor",Ne(A.warning.main,.55)),Z(A.TableCell,"border",Ne(ja(A.divider,1),.68)),Z(A.Tooltip,"bg",ja(A.grey[700],.92))}jn(A.background,"default"),jn(A.background,"paper"),jn(A.common,"background"),jn(A.common,"onBackground"),jn(A,"divider"),Object.keys(A).forEach(Y=>{const N=A[Y];Y!=="tonalOffset"&&N&&typeof N=="object"&&(N.main&&Z(A[Y],"mainChannel",qi(Xi(N.main))),N.light&&Z(A[Y],"lightChannel",qi(Xi(N.light))),N.dark&&Z(A[Y],"darkChannel",qi(Xi(N.dark))),N.contrastText&&Z(A[Y],"contrastTextChannel",qi(Xi(N.contrastText))),Y==="text"&&(jn(A[Y],"primary"),jn(A[Y],"secondary")),Y==="action"&&(N.active&&jn(A[Y],"active"),N.selected&&jn(A[Y],"selected")))})}),x=t.reduce((z,A)=>Wt(z,A),x);const b={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:C_(x)},{vars:T,generateThemeVars:E,generateStyleSheets:P}=GE(x,b);return x.vars=T,Object.entries(x.colorSchemes[x.defaultColorScheme]).forEach(([z,A])=>{x[z]=A}),x.generateThemeVars=E,x.generateStyleSheets=P,x.generateSpacing=function(){return Zh(c.spacing,uc(this))},x.getColorSchemeSelector=YE(l),x.spacing=x.generateSpacing(),x.shouldSkipGeneratingVar=a,x.unstable_sxConfig=U(U({},$a),c==null?void 0:c.unstable_sxConfig),x.unstable_sx=function(A){return Hr({sx:A,theme:this})},x.toRuntimeSource=hp,x}function mp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=X(U({},n!==!0&&n),{palette:yc(X(U({},n===!0?{}:n.palette),{mode:t}))}))}function T_(e={},...t){const d=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=d,a=We(d,["palette","cssVariables","colorSchemes","defaultColorScheme"]),l=o||"light",s=i==null?void 0:i[l],c=U(U({},i),n?{[l]:X(U({},typeof s!="boolean"&&s),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return xc(e,...t);let f=n;"palette"in e||c[l]&&(c[l]!==!0?f=c[l].palette:l==="dark"&&(f={mode:"dark"}));const h=xc(X(U({},e),{palette:f}),...t);return h.defaultColorScheme=l,h.colorSchemes=c,h.palette.mode==="light"&&(h.colorSchemes.light=X(U({},c.light!==!0&&c.light),{palette:h.palette}),mp(h,"dark",c.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=X(U({},c.dark!==!0&&c.dark),{palette:h.palette}),mp(h,"light",c.light)),h}return!n&&!("light"in c)&&l==="light"&&(c.light=!0),A_(U(X(U({},a),{colorSchemes:c,defaultColorScheme:l}),typeof r!="boolean"&&r),...t)}const E_=T_(),__="$$material";function k_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const P_=kE({themeId:__,defaultTheme:E_,rootShouldForwardProp:e=>k_(e)&&e!=="classes"}),D_=VE;function O_(e){return jE(e)}function R_(e){return Uh("MuiSvgIcon",e)}bT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const M_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Vr(t)}`,`fontSize${Vr(n)}`]};return gT(i,R_,r)},L_=P_("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Vr(n.color)}`],t[`fontSize${Vr(n.fontSize)}`]]}})(D_(({theme:e})=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,m,g,v,S,w;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:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((l=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:c.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}},...Object.entries(((h=e.vars)!=null?h:e).palette).filter(([,y])=>y&&y.main).map(([y])=>{var x,b,T;return{props:{color:y},style:{color:(T=(b=((x=e.vars)!=null?x:e).palette)==null?void 0:b[y])==null?void 0:T.main}}}),{props:{color:"action"},style:{color:(g=(m=((p=e.vars)!=null?p:e).palette)==null?void 0:m.action)==null?void 0:g.active}},{props:{color:"disabled"},style:{color:(w=(S=((v=e.vars)!=null?v:e).palette)==null?void 0:S.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),wc=j.forwardRef(function(t,n){const r=O_({props:t,name:"MuiSvgIcon"}),w=r,{children:i,className:o,color:a="inherit",component:l="svg",fontSize:s="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=w,p=We(w,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),m=j.isValidElement(i)&&i.type==="svg",g=X(U({},r),{color:a,component:l,fontSize:s,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m}),v={};d||(v.viewBox=h);const S=M_(g);return u.jsxs(L_,X(U(U(U({as:l,className:Ln(S.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v),p),m&&i.props),{ownerState:g,children:[m?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});wc.muiName="SvgIcon";function Ve(e,t){function n(r,i){return u.jsx(wc,X(U({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=wc.muiName,j.memo(j.forwardRef(n))}const Ic=Ve(u.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"),B_=Ve(u.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"),$_=Ve(u.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 N_(e){return it("MuiTabPanel",e)}Xe("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const F_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],z_=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${ye(n)}`,o,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return lt(a,N_,{})},j_=be("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return D({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])}),Qr=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyTabPanel"}),{orientation:i}=ga()||{orientation:"horizontal"},o=j.useContext(oc),{children:a,value:l=0,component:s,color:c="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:m=!1}=r,g=Ae(r,F_),{hidden:v,getRootProps:S}=PS(D({},r,{value:l})),w=f!=null?f:o,y=D({},r,{orientation:i,hidden:v,size:w,color:c,variant:d}),x=z_(y),b=D({},g,{component:s,slots:h,slotProps:p}),[T,E]=Ie("root",{ref:n,elementType:j_,getSlotProps:S,externalForwardedProps:b,additionalProps:{role:"tabpanel",ref:n,as:s},ownerState:y,className:x.root});return m?u.jsx(T,D({},E,{children:a})):u.jsx(T,D({},E,{children:!v&&a}))});function V_(e){return it("MuiInput",e)}const vp=Xe("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"]),Ua=j.createContext(void 0),U_=["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 H_(e,t){var n;const r=j.useContext(Ua),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,className:c,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:m,name:g,onClick:v,onChange:S,onKeyDown:w,onKeyUp:y,onFocus:x,onBlur:b,placeholder:T,readOnly:E,required:P,type:O,value:G}=e,z=Ae(e,U_),{getRootProps:A,getInputProps:W,focused:Y,error:N,disabled:$}=WI({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:b,onClick:v,onChange:S,onFocus:x,required:P!=null?P:r==null?void 0:r.required,value:G}),B={[t.disabled]:$,[t.error]:N,[t.focused]:Y,[t.formControl]:!!r,[c]:c},H={[t.disabled]:$};return D({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:s,disabled:$,id:m,onKeyDown:w,onKeyUp:y,name:g,placeholder:T,readOnly:E,type:O},rootStateClasses:B,inputStateClasses:H,getRootProps:A,getInputProps:W,focused:Y,error:N,disabled:$},z)}const Sc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,Zi="data-skip-inverted-colors",bp=`& :not([${Zi}], [${Zi}] *)`,yp=e=>{var t,n,r,i,o,a,l,s,c,d,f,h,p,m,g,v,S,w,y,x,b,T;const E=Sc(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")]:`${(l=e.colorSchemes.light)==null?void 0:l.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(c=e.colorSchemes.light)==null?void 0:c.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(h=e.colorSchemes.dark)==null?void 0:h.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(p=e.colorSchemes.dark)==null?void 0:p.palette.background.body} !important`,[E("--palette-background-surface")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(y=e.colorSchemes.dark)==null?void 0:y.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(x=e.colorSchemes.dark)==null?void 0:x.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(T=e.colorSchemes.dark)==null?void 0:T.palette.divider} !important`}}};function W_(e){return e.theme!==void 0}const G_=e=>t=>{const n=W_(t)?t.theme:t,r=Gl(n.cssVarPrefix),i=Sc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[bp]:{"--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)`}},[`&, & [${Zi}]`]:yp(n)}},Y_=e=>t=>{const{theme:n=t}=t,r=Gl(n.cssVarPrefix),i=Sc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[bp]:{"--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)`}},[`&, & [${Zi}]`]:yp(n)}},K_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],q_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${ye(r)}`,i&&`color${ye(i)}`,o&&`size${ye(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return lt(a,V_,{})},Q_=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;const s=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[D({"--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([${Zi}])`]:D({},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}`],s,{backgroundColor:(o=s==null?void 0:s.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":D({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${vp.disabled}`]:(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),J_=be("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":D({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)"}})),X_=be("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"}),Z_=be("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"}),ek=be(Q_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),tk=be(J_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),nk=be(X_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),rk=be(Z_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Ha=j.forwardRef(function(t,n){var r,i,o,a,l,s;const c=ct({props:t,name:"JoyInput"}),d=H_(D({},c,{disabledInProp:t.disabled}),vp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:m,getInputProps:g,formControl:v,focused:S,error:w=!1,disabled:y,fullWidth:x=!1,size:b="md",color:T="neutral",variant:E="outlined",startDecorator:P,endDecorator:O,component:G,slots:z={},slotProps:A={}}=d,W=Ae(d,K_),Y=(r=(i=t.error)!=null?i:v==null?void 0:v.error)!=null?r:w,N=(o=(a=t.size)!=null?a:v==null?void 0:v.size)!=null?o:b,$=(l=t.color)!=null?l:Y?"danger":(s=v==null?void 0:v.color)!=null?s:T,B=D({instanceColor:Y?"danger":t.color},c,{fullWidth:x,color:$,disabled:y,error:Y,focused:S,size:N,variant:E}),H=q_(B),q=D({},W,{component:G,slots:z,slotProps:A}),[ee,R]=Ie("root",{ref:n,className:[H.root,h],elementType:ek,getSlotProps:m,externalForwardedProps:q,ownerState:B}),[L,F]=Ie("input",D({},v&&{additionalProps:{id:v.htmlFor,"aria-describedby":v["aria-describedby"]}},{className:[H.input,p],elementType:tk,getSlotProps:g,internalForwardedProps:f,externalForwardedProps:q,ownerState:B})),[V,te]=Ie("startDecorator",{className:H.startDecorator,elementType:nk,externalForwardedProps:q,ownerState:B}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:rk,externalForwardedProps:q,ownerState:B});return u.jsxs(ee,D({},R,{children:[P&&u.jsx(V,D({},te,{children:P})),u.jsx(L,D({},F)),O&&u.jsx(se,D({},ae,{children:O}))]}))}),eo=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,onChange:l})=>u.jsxs(I.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{required:i,color:"primary",children:e}),u.jsx(Ha,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,onChange:l,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),xp=Ve(u.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 ik(e){return it("MuiCircularProgress",e)}Xe("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let ok=e=>e,Cp;const ak=["color","backgroundColor"],sk=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],lk=pe.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),ck=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${ye(n)}`,r&&`variant${ye(r)}`,i&&`size${ye(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return lt(o,ik,{})};function Jr(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const uk=be("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:l,backgroundColor:s}=a,c=Ae(a,ak);return D({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":s,"--CircularProgress-progressColor":l,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":Jr("track","3px"),"--_progress-thickness":Jr("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":Jr("track","6px"),"--_progress-thickness":Jr("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":Jr("track","8px"),"--_progress-thickness":Jr("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:l},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},c,e.variant==="outlined"&&{"&::before":D({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},c)},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})}),dk=be("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))"}),fk=be("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)"}),hk=be("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&&pe.css(Cp||(Cp=ok`
|
|
2348
2348
|
animation: var(--CircularProgress-circulation, 0.8s linear 0s infinite normal none running)
|
|
2349
2349
|
${0};
|
|
2350
|
-
`),lk)),wp=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:l="md",variant:s="soft",thickness:c,determinate:d=!1,value:f=d?0:25,component:h,slots:p={},slotProps:g={}}=r,m=Ae(r,sk),v=D({},r,{color:a,size:l,variant:s,thickness:c,value:f,determinate:d,instanceSize:t.size}),A=ck(v),x=D({},m,{component:h,slots:p,slotProps:g}),[b,S]=Ie("root",{ref:n,className:Ln(A.root,o),elementType:uk,externalForwardedProps:x,ownerState:v,additionalProps:D({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[y,w]=Ie("svg",{className:A.svg,elementType:dk,externalForwardedProps:x,ownerState:v}),[E,k]=Ie("track",{className:A.track,elementType:fk,externalForwardedProps:x,ownerState:v}),[N,Y]=Ie("progress",{className:A.progress,elementType:hk,externalForwardedProps:x,ownerState:v});return u.jsxs(b,D({},S,{children:[u.jsxs(y,D({},w,{children:[u.jsx(E,D({},k)),u.jsx(N,D({},Y))]})),i]}))});function pk(e){return it("MuiButton",e)}const Ip=Xe("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),Sp=z.createContext({}),Ap=z.createContext(void 0),gk=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],mk=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:l,loading:s}=e,c={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",l&&`variant${ye(l)}`,t&&`color${ye(t)}`,a&&`size${ye(a)}`,s&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},d=lt(c,pk,{});return r&&i&&(d.root+=` ${i}`),d},vk=be("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)"}),bk=be("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)"}),yk=be("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return D({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})}),xk=({theme:e,ownerState:t})=>{var n,r,i,o;return[D({"--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}),D({},(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],[`&.${Ip.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${Ip.loading}`]:{color:"transparent"}})]},Ck=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(xk),Xr=z.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyButton"}),{children:o,action:a,color:l="primary",variant:s="solid",size:c="md",fullWidth:d=!1,startDecorator:f,endDecorator:h,loading:p=!1,loadingPosition:g="center",loadingIndicator:m,disabled:v,component:A,slots:x={},slotProps:b={}}=i,S=Ae(i,gk),y=z.useContext(Sp),w=z.useContext(Ap),E=t.variant||y.variant||s,k=t.size||y.size||c,N=t.color||y.color||l,Y=(r=t.loading||t.disabled)!=null?r:y.disabled||p||v,W=z.useRef(null),T=sn(W,n),{focusVisible:H,setFocusVisible:G,getRootProps:$}=Rl(D({},i,{disabled:Y,rootRef:T})),B=m!=null?m:u.jsx(wp,{color:N,thickness:{sm:2,md:3,lg:4}[k]||3});z.useImperativeHandle(a,()=>({focusVisible:()=>{var ne;G(!0),(ne=W.current)==null||ne.focus()}}),[G]);const L=D({},i,{color:N,fullWidth:d,variant:E,size:k,focusVisible:H,loading:p,loadingPosition:g,disabled:Y}),U=mk(L),q=ne=>{var ge;let Se=i.onClick;if(typeof b.root=="function"?Se=b.root(L).onClick:b.root&&(Se=b.root.onClick),(ge=Se)==null||ge(ne),w){var Ue;(Ue=w.onClick)==null||Ue.call(w,ne,i.value)}};let ee=i["aria-pressed"];typeof b.root=="function"?ee=b.root(L)["aria-pressed"]:b.root&&(ee=b.root["aria-pressed"]),w!=null&&w.value&&(Array.isArray(w.value)?ee=w.value.indexOf(i.value)!==-1:ee=w.value===i.value);const O=D({},S,{component:A,slots:x,slotProps:b}),[M,F]=Ie("root",{ref:n,className:U.root,elementType:Ck,externalForwardedProps:O,getSlotProps:$,ownerState:L,additionalProps:{onClick:q,"aria-pressed":ee}}),[j,te]=Ie("startDecorator",{className:U.startDecorator,elementType:vk,externalForwardedProps:O,ownerState:L}),[se,ae]=Ie("endDecorator",{className:U.endDecorator,elementType:bk,externalForwardedProps:O,ownerState:L}),[J,le]=Ie("loadingIndicatorCenter",{className:U.loadingIndicatorCenter,elementType:yk,externalForwardedProps:O,ownerState:L});return u.jsxs(M,D({},F,{children:[(f||p&&g==="start")&&u.jsx(j,D({},te,{children:p&&g==="start"?B:f})),o,p&&g==="center"&&u.jsx(J,D({},le,{children:B})),(h||p&&g==="end")&&u.jsx(se,D({},ae,{children:p&&g==="end"?B:h}))]}))});Xr.muiName="Button";var Tp={exports:{}};function wk(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 Ac={exports:{}};const Ik=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ep;function Tc(){return Ep||(Ep=1,function(e,t){(function(n,r){e.exports=r()})(Bt,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 Bt!="undefined"&&Bt.crypto&&(o=Bt.crypto),!o&&typeof wk=="function")try{o=Ik}catch(x){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(x){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(x){}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function x(){}return function(b){var S;return x.prototype=b,S=new x,x.prototype=null,S}}(),s={},c=s.lib={},d=c.Base=function(){return{extend:function(x){var b=l(this);return x&&b.mixIn(x),(!b.hasOwnProperty("init")||this.init===b.init)&&(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var x=this.extend();return x.init.apply(x,arguments),x},init:function(){},mixIn:function(x){for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);x.hasOwnProperty("toString")&&(this.toString=x.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=d.extend({init:function(x,b){x=this.words=x||[],b!=i?this.sigBytes=b:this.sigBytes=x.length*4},toString:function(x){return(x||p).stringify(this)},concat:function(x){var b=this.words,S=x.words,y=this.sigBytes,w=x.sigBytes;if(this.clamp(),y%4)for(var E=0;E<w;E++){var k=S[E>>>2]>>>24-E%4*8&255;b[y+E>>>2]|=k<<24-(y+E)%4*8}else for(var N=0;N<w;N+=4)b[y+N>>>2]=S[N>>>2];return this.sigBytes+=w,this},clamp:function(){var x=this.words,b=this.sigBytes;x[b>>>2]&=4294967295<<32-b%4*8,x.length=r.ceil(b/4)},clone:function(){var x=d.clone.call(this);return x.words=this.words.slice(0),x},random:function(x){for(var b=[],S=0;S<x;S+=4)b.push(a());return new f.init(b,x)}}),h=s.enc={},p=h.Hex={stringify:function(x){for(var b=x.words,S=x.sigBytes,y=[],w=0;w<S;w++){var E=b[w>>>2]>>>24-w%4*8&255;y.push((E>>>4).toString(16)),y.push((E&15).toString(16))}return y.join("")},parse:function(x){for(var b=x.length,S=[],y=0;y<b;y+=2)S[y>>>3]|=parseInt(x.substr(y,2),16)<<24-y%8*4;return new f.init(S,b/2)}},g=h.Latin1={stringify:function(x){for(var b=x.words,S=x.sigBytes,y=[],w=0;w<S;w++){var E=b[w>>>2]>>>24-w%4*8&255;y.push(String.fromCharCode(E))}return y.join("")},parse:function(x){for(var b=x.length,S=[],y=0;y<b;y++)S[y>>>2]|=(x.charCodeAt(y)&255)<<24-y%4*8;return new f.init(S,b)}},m=h.Utf8={stringify:function(x){try{return decodeURIComponent(escape(g.stringify(x)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(x){return g.parse(unescape(encodeURIComponent(x)))}},v=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(x){typeof x=="string"&&(x=m.parse(x)),this._data.concat(x),this._nDataBytes+=x.sigBytes},_process:function(x){var b,S=this._data,y=S.words,w=S.sigBytes,E=this.blockSize,k=E*4,N=w/k;x?N=r.ceil(N):N=r.max((N|0)-this._minBufferSize,0);var Y=N*E,W=r.min(Y*4,w);if(Y){for(var T=0;T<Y;T+=E)this._doProcessBlock(y,T);b=y.splice(0,Y),S.sigBytes-=W}return new f.init(b,W)},clone:function(){var x=d.clone.call(this);return x._data=this._data.clone(),x},_minBufferSize:0});c.Hasher=v.extend({cfg:d.extend(),init:function(x){this.cfg=this.cfg.extend(x),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(x){return this._append(x),this._process(),this},finalize:function(x){x&&this._append(x);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(x){return function(b,S){return new x.init(S).finalize(b)}},_createHmacHelper:function(x){return function(b,S){return new A.HMAC.init(x,S).finalize(b)}}});var A=s.algo={};return s}(Math);return n})}(Ac)),Ac.exports}(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,l=o.Hasher,s=i.algo,c=[];(function(){for(var m=0;m<64;m++)c[m]=r.abs(r.sin(m+1))*4294967296|0})();var d=s.MD5=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,v){for(var A=0;A<16;A++){var x=v+A,b=m[x];m[x]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}var S=this._hash.words,y=m[v+0],w=m[v+1],E=m[v+2],k=m[v+3],N=m[v+4],Y=m[v+5],W=m[v+6],T=m[v+7],H=m[v+8],G=m[v+9],$=m[v+10],B=m[v+11],L=m[v+12],U=m[v+13],q=m[v+14],ee=m[v+15],O=S[0],M=S[1],F=S[2],j=S[3];O=f(O,M,F,j,y,7,c[0]),j=f(j,O,M,F,w,12,c[1]),F=f(F,j,O,M,E,17,c[2]),M=f(M,F,j,O,k,22,c[3]),O=f(O,M,F,j,N,7,c[4]),j=f(j,O,M,F,Y,12,c[5]),F=f(F,j,O,M,W,17,c[6]),M=f(M,F,j,O,T,22,c[7]),O=f(O,M,F,j,H,7,c[8]),j=f(j,O,M,F,G,12,c[9]),F=f(F,j,O,M,$,17,c[10]),M=f(M,F,j,O,B,22,c[11]),O=f(O,M,F,j,L,7,c[12]),j=f(j,O,M,F,U,12,c[13]),F=f(F,j,O,M,q,17,c[14]),M=f(M,F,j,O,ee,22,c[15]),O=h(O,M,F,j,w,5,c[16]),j=h(j,O,M,F,W,9,c[17]),F=h(F,j,O,M,B,14,c[18]),M=h(M,F,j,O,y,20,c[19]),O=h(O,M,F,j,Y,5,c[20]),j=h(j,O,M,F,$,9,c[21]),F=h(F,j,O,M,ee,14,c[22]),M=h(M,F,j,O,N,20,c[23]),O=h(O,M,F,j,G,5,c[24]),j=h(j,O,M,F,q,9,c[25]),F=h(F,j,O,M,k,14,c[26]),M=h(M,F,j,O,H,20,c[27]),O=h(O,M,F,j,U,5,c[28]),j=h(j,O,M,F,E,9,c[29]),F=h(F,j,O,M,T,14,c[30]),M=h(M,F,j,O,L,20,c[31]),O=p(O,M,F,j,Y,4,c[32]),j=p(j,O,M,F,H,11,c[33]),F=p(F,j,O,M,B,16,c[34]),M=p(M,F,j,O,q,23,c[35]),O=p(O,M,F,j,w,4,c[36]),j=p(j,O,M,F,N,11,c[37]),F=p(F,j,O,M,T,16,c[38]),M=p(M,F,j,O,$,23,c[39]),O=p(O,M,F,j,U,4,c[40]),j=p(j,O,M,F,y,11,c[41]),F=p(F,j,O,M,k,16,c[42]),M=p(M,F,j,O,W,23,c[43]),O=p(O,M,F,j,G,4,c[44]),j=p(j,O,M,F,L,11,c[45]),F=p(F,j,O,M,ee,16,c[46]),M=p(M,F,j,O,E,23,c[47]),O=g(O,M,F,j,y,6,c[48]),j=g(j,O,M,F,T,10,c[49]),F=g(F,j,O,M,q,15,c[50]),M=g(M,F,j,O,Y,21,c[51]),O=g(O,M,F,j,L,6,c[52]),j=g(j,O,M,F,k,10,c[53]),F=g(F,j,O,M,$,15,c[54]),M=g(M,F,j,O,w,21,c[55]),O=g(O,M,F,j,H,6,c[56]),j=g(j,O,M,F,ee,10,c[57]),F=g(F,j,O,M,W,15,c[58]),M=g(M,F,j,O,U,21,c[59]),O=g(O,M,F,j,N,6,c[60]),j=g(j,O,M,F,B,10,c[61]),F=g(F,j,O,M,E,15,c[62]),M=g(M,F,j,O,G,21,c[63]),S[0]=S[0]+O|0,S[1]=S[1]+M|0,S[2]=S[2]+F|0,S[3]=S[3]+j|0},_doFinalize:function(){var m=this._data,v=m.words,A=this._nDataBytes*8,x=m.sigBytes*8;v[x>>>5]|=128<<24-x%32;var b=r.floor(A/4294967296),S=A;v[(x+64>>>9<<4)+15]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,v[(x+64>>>9<<4)+14]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,m.sigBytes=(v.length+1)*4,this._process();for(var y=this._hash,w=y.words,E=0;E<4;E++){var k=w[E];w[E]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return y},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});function f(m,v,A,x,b,S,y){var w=m+(v&A|~v&x)+b+y;return(w<<S|w>>>32-S)+v}function h(m,v,A,x,b,S,y){var w=m+(v&x|A&~x)+b+y;return(w<<S|w>>>32-S)+v}function p(m,v,A,x,b,S,y){var w=m+(v^A^x)+b+y;return(w<<S|w>>>32-S)+v}function g(m,v,A,x,b,S,y){var w=m+(A^(v|~x))+b+y;return(w<<S|w>>>32-S)+v}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),n.MD5})})(Tp);var Sk=Tp.exports;const _p=fn(Sk);var kp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,l=o.init=function(s){if(s instanceof ArrayBuffer&&(s=new Uint8Array(s)),(s instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&s instanceof Uint8ClampedArray||s instanceof Int16Array||s instanceof Uint16Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Float32Array||s instanceof Float64Array)&&(s=new Uint8Array(s.buffer,s.byteOffset,s.byteLength)),s instanceof Uint8Array){for(var c=s.byteLength,d=[],f=0;f<c;f++)d[f>>>2]|=s[f]<<24-f%4*8;a.call(this,d,c)}else a.apply(this,arguments)};l.prototype=o}}(),n.lib.WordArray})})(kp);var Ak=kp.exports;const Pp=fn(Ak);var Dp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(s){var c=s.words,d=s.sigBytes,f=this._map;s.clamp();for(var h=[],p=0;p<d;p+=3)for(var g=c[p>>>2]>>>24-p%4*8&255,m=c[p+1>>>2]>>>24-(p+1)%4*8&255,v=c[p+2>>>2]>>>24-(p+2)%4*8&255,A=g<<16|m<<8|v,x=0;x<4&&p+x*.75<d;x++)h.push(f.charAt(A>>>6*(3-x)&63));var b=f.charAt(64);if(b)for(;h.length%4;)h.push(b);return h.join("")},parse:function(s){var c=s.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var h=0;h<d.length;h++)f[d.charCodeAt(h)]=h}var p=d.charAt(64);if(p){var g=s.indexOf(p);g!==-1&&(c=g)}return l(s,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(s,c,d){for(var f=[],h=0,p=0;p<c;p++)if(p%4){var g=d[s.charCodeAt(p-1)]<<p%4*2,m=d[s.charCodeAt(p)]>>>6-p%4*2,v=g|m;f[h>>>2]|=v<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Dp);var Tk=Dp.exports;const Ek=fn(Tk);class Op{constructor(){oe(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Pp.create(new Uint8Array(a)),c=_p(l).toString(Ek);n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));oe(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Pp.create(new Uint8Array(a)),s=_p(l).toString();n(s)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Rp=({title:e,open:t,imageSrc:n,toggleModal:r})=>u.jsx(I.Modal,{open:t,onClose:r,children:u.jsxs(I.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(I.ModalClose,{}),u.jsx(I.DialogTitle,{sx:{marginBottom:"10px"},children:e}),u.jsx(I.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Mp=Ve(u.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),pt=()=>{const e=C.useContext(Xo);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},_k=Ve(u.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),kk=({isLoading:e,images:t,onClick:n})=>u.jsxs(u.Fragment,{children:[u.jsx(I.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return u.jsx(I.Grid,{xs:5,sm:4,md:3,children:u.jsxs(I.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,l;return n(((l=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:l.embed)||"")},children:[u.jsx(I.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"}}),u.jsx(I.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:u.jsx(I.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?u.jsx(I.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx(I.CircularProgress,{variant:"solid",color:"neutral"})}):u.jsx(u.Fragment,{})]}),Pk=Ve(u.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),Dk=Ve(u.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Ok=e=>u.jsx(I.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:u.jsxs(I.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&u.jsx(I.Button,{variant:"outlined",color:"neutral",startDecorator:u.jsx(Pk,{}),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&&u.jsx(I.Button,{variant:"outlined",color:"neutral",endDecorator:u.jsx(Dk,{}),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})]})}),Rk=Ve(u.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"),Mk=Ve(u.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Lk=({color:e})=>e==="warning"?u.jsx(Mk,{}):u.jsx(Rk,{}),ut=e=>u.jsx(I.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:u.jsx(Lk,{color:e.color}),children:e.message},e.message),to=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:n,color:"primary",children:e}),u.jsx(I.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},Bk=({labels:e,showFilters:t,onClick:n})=>u.jsx(I.Tooltip,{title:t?e.hideFilters:e.showFilters,children:u.jsx(I.IconButton,{"aria-label":"Filters",onClick:n,children:u.jsx(_k,{})})}),Lp=({labels:e,onChangeImages:t})=>{const[n,r]=C.useState(!1),[i,o]=C.useState(!1),[a,l]=C.useState(!1),[s,c]=C.useState(!1),[d,f]=C.useState(1),[h,p]=C.useState(""),[g,m]=C.useState(null),[v,A]=C.useState([]),{https:x}=pt();C.useEffect(()=>{E()},[d]);const b=()=>c(!s),S=()=>f(N=>N-1),y=()=>f(N=>N+1),w=()=>P(this,null,function*(){if(h){o(!0);const N=g?V({},g):null,Y=yield x.fetchImagesFromSportal365(h,N,d);if(Y){const W=yield Y.json();Y.ok?(A(W.data),f(W.meta.pagination.current_page)):(console.error(W),b())}o(!1)}else A([])}),E=()=>P(this,null,function*(){if(h){l(!0),A([]);const N=g&&g.from&&g.to?V({},g):null,Y=yield x.fetchImagesFromSportal365(h,N,d);if(Y){const W=yield Y.json();Y.ok?(A(W.data),f(W.meta.pagination.current_page)):(console.error(W),b())}l(!1)}}),k=(N,Y)=>{m(W=>W?X(V({},W),{[Y]:N}):{[Y]:N})};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(I.Input,{value:h,onChange:N=>p(N.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:u.jsx(Bk,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?u.jsxs(I.Grid,{container:!0,spacing:2,children:[u.jsx(I.Grid,{xs:6,children:u.jsx(to,{label:e.fromDate,defaultValue:g==null?void 0:g.from,required:!1,onChange:N=>k(N,"from")})}),u.jsx(I.Grid,{xs:6,children:u.jsx(to,{label:e.toDate,defaultValue:g==null?void 0:g.to,required:!1,onChange:N=>k(N,"to")})})]}):u.jsx(u.Fragment,{}),u.jsx(I.Button,{onClick:w,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),u.jsx(kk,{images:v,isLoading:a,onClick:t}),u.jsx(Ok,{labels:e,pageCount:d,images:v,getPreviousPage:S,getNextPage:y})]}),u.jsx(ut,{showToast:s,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:b})]})},Bp=Ve(u.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"),$p=I.styled("input")`
|
|
2350
|
+
`),lk)),wp=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:l="md",variant:s="soft",thickness:c,determinate:d=!1,value:f=d?0:25,component:h,slots:p={},slotProps:m={}}=r,g=Ae(r,sk),v=D({},r,{color:a,size:l,variant:s,thickness:c,value:f,determinate:d,instanceSize:t.size}),S=ck(v),w=D({},g,{component:h,slots:p,slotProps:m}),[y,x]=Ie("root",{ref:n,className:Ln(S.root,o),elementType:uk,externalForwardedProps:w,ownerState:v,additionalProps:D({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[b,T]=Ie("svg",{className:S.svg,elementType:dk,externalForwardedProps:w,ownerState:v}),[E,P]=Ie("track",{className:S.track,elementType:fk,externalForwardedProps:w,ownerState:v}),[O,G]=Ie("progress",{className:S.progress,elementType:hk,externalForwardedProps:w,ownerState:v});return u.jsxs(y,D({},x,{children:[u.jsxs(b,D({},T,{children:[u.jsx(E,D({},P)),u.jsx(O,D({},G))]})),i]}))});function pk(e){return it("MuiButton",e)}const Ip=Xe("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),Sp=j.createContext({}),Ap=j.createContext(void 0),gk=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],mk=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:l,loading:s}=e,c={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",l&&`variant${ye(l)}`,t&&`color${ye(t)}`,a&&`size${ye(a)}`,s&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},d=lt(c,pk,{});return r&&i&&(d.root+=` ${i}`),d},vk=be("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)"}),bk=be("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)"}),yk=be("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return D({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})}),xk=({theme:e,ownerState:t})=>{var n,r,i,o;return[D({"--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}),D({},(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],[`&.${Ip.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${Ip.loading}`]:{color:"transparent"}})]},Ck=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(xk),Xr=j.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyButton"}),{children:o,action:a,color:l="primary",variant:s="solid",size:c="md",fullWidth:d=!1,startDecorator:f,endDecorator:h,loading:p=!1,loadingPosition:m="center",loadingIndicator:g,disabled:v,component:S,slots:w={},slotProps:y={}}=i,x=Ae(i,gk),b=j.useContext(Sp),T=j.useContext(Ap),E=t.variant||b.variant||s,P=t.size||b.size||c,O=t.color||b.color||l,G=(r=t.loading||t.disabled)!=null?r:b.disabled||p||v,z=j.useRef(null),A=sn(z,n),{focusVisible:W,setFocusVisible:Y,getRootProps:N}=Rl(D({},i,{disabled:G,rootRef:A})),$=g!=null?g:u.jsx(wp,{color:O,thickness:{sm:2,md:3,lg:4}[P]||3});j.useImperativeHandle(a,()=>({focusVisible:()=>{var ne;Y(!0),(ne=z.current)==null||ne.focus()}}),[Y]);const B=D({},i,{color:O,fullWidth:d,variant:E,size:P,focusVisible:W,loading:p,loadingPosition:m,disabled:G}),H=mk(B),q=ne=>{var ge;let Se=i.onClick;if(typeof y.root=="function"?Se=y.root(B).onClick:y.root&&(Se=y.root.onClick),(ge=Se)==null||ge(ne),T){var Ue;(Ue=T.onClick)==null||Ue.call(T,ne,i.value)}};let ee=i["aria-pressed"];typeof y.root=="function"?ee=y.root(B)["aria-pressed"]:y.root&&(ee=y.root["aria-pressed"]),T!=null&&T.value&&(Array.isArray(T.value)?ee=T.value.indexOf(i.value)!==-1:ee=T.value===i.value);const R=D({},x,{component:S,slots:w,slotProps:y}),[L,F]=Ie("root",{ref:n,className:H.root,elementType:Ck,externalForwardedProps:R,getSlotProps:N,ownerState:B,additionalProps:{onClick:q,"aria-pressed":ee}}),[V,te]=Ie("startDecorator",{className:H.startDecorator,elementType:vk,externalForwardedProps:R,ownerState:B}),[se,ae]=Ie("endDecorator",{className:H.endDecorator,elementType:bk,externalForwardedProps:R,ownerState:B}),[J,le]=Ie("loadingIndicatorCenter",{className:H.loadingIndicatorCenter,elementType:yk,externalForwardedProps:R,ownerState:B});return u.jsxs(L,D({},F,{children:[(f||p&&m==="start")&&u.jsx(V,D({},te,{children:p&&m==="start"?$:f})),o,p&&m==="center"&&u.jsx(J,D({},le,{children:$})),(h||p&&m==="end")&&u.jsx(se,D({},ae,{children:p&&m==="end"?$:h}))]}))});Xr.muiName="Button";var Tp={exports:{}};function wk(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 Ac={exports:{}};const Ik=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ep;function Tc(){return Ep||(Ep=1,function(e,t){(function(n,r){e.exports=r()})(Bt,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 Bt!="undefined"&&Bt.crypto&&(o=Bt.crypto),!o&&typeof wk=="function")try{o=Ik}catch(w){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(w){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(w){}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function w(){}return function(y){var x;return w.prototype=y,x=new w,w.prototype=null,x}}(),s={},c=s.lib={},d=c.Base=function(){return{extend:function(w){var y=l(this);return w&&y.mixIn(w),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var y in w)w.hasOwnProperty(y)&&(this[y]=w[y]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=d.extend({init:function(w,y){w=this.words=w||[],y!=i?this.sigBytes=y:this.sigBytes=w.length*4},toString:function(w){return(w||p).stringify(this)},concat:function(w){var y=this.words,x=w.words,b=this.sigBytes,T=w.sigBytes;if(this.clamp(),b%4)for(var E=0;E<T;E++){var P=x[E>>>2]>>>24-E%4*8&255;y[b+E>>>2]|=P<<24-(b+E)%4*8}else for(var O=0;O<T;O+=4)y[b+O>>>2]=x[O>>>2];return this.sigBytes+=T,this},clamp:function(){var w=this.words,y=this.sigBytes;w[y>>>2]&=4294967295<<32-y%4*8,w.length=r.ceil(y/4)},clone:function(){var w=d.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var y=[],x=0;x<w;x+=4)y.push(a());return new f.init(y,w)}}),h=s.enc={},p=h.Hex={stringify:function(w){for(var y=w.words,x=w.sigBytes,b=[],T=0;T<x;T++){var E=y[T>>>2]>>>24-T%4*8&255;b.push((E>>>4).toString(16)),b.push((E&15).toString(16))}return b.join("")},parse:function(w){for(var y=w.length,x=[],b=0;b<y;b+=2)x[b>>>3]|=parseInt(w.substr(b,2),16)<<24-b%8*4;return new f.init(x,y/2)}},m=h.Latin1={stringify:function(w){for(var y=w.words,x=w.sigBytes,b=[],T=0;T<x;T++){var E=y[T>>>2]>>>24-T%4*8&255;b.push(String.fromCharCode(E))}return b.join("")},parse:function(w){for(var y=w.length,x=[],b=0;b<y;b++)x[b>>>2]|=(w.charCodeAt(b)&255)<<24-b%4*8;return new f.init(x,y)}},g=h.Utf8={stringify:function(w){try{return decodeURIComponent(escape(m.stringify(w)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(w){return m.parse(unescape(encodeURIComponent(w)))}},v=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=g.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var y,x=this._data,b=x.words,T=x.sigBytes,E=this.blockSize,P=E*4,O=T/P;w?O=r.ceil(O):O=r.max((O|0)-this._minBufferSize,0);var G=O*E,z=r.min(G*4,T);if(G){for(var A=0;A<G;A+=E)this._doProcessBlock(b,A);y=b.splice(0,G),x.sigBytes-=z}return new f.init(y,z)},clone:function(){var w=d.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0});c.Hasher=v.extend({cfg:d.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(w){return function(y,x){return new w.init(x).finalize(y)}},_createHmacHelper:function(w){return function(y,x){return new S.HMAC.init(w,x).finalize(y)}}});var S=s.algo={};return s}(Math);return n})}(Ac)),Ac.exports}(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,l=o.Hasher,s=i.algo,c=[];(function(){for(var g=0;g<64;g++)c[g]=r.abs(r.sin(g+1))*4294967296|0})();var d=s.MD5=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,v){for(var S=0;S<16;S++){var w=v+S,y=g[w];g[w]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var x=this._hash.words,b=g[v+0],T=g[v+1],E=g[v+2],P=g[v+3],O=g[v+4],G=g[v+5],z=g[v+6],A=g[v+7],W=g[v+8],Y=g[v+9],N=g[v+10],$=g[v+11],B=g[v+12],H=g[v+13],q=g[v+14],ee=g[v+15],R=x[0],L=x[1],F=x[2],V=x[3];R=f(R,L,F,V,b,7,c[0]),V=f(V,R,L,F,T,12,c[1]),F=f(F,V,R,L,E,17,c[2]),L=f(L,F,V,R,P,22,c[3]),R=f(R,L,F,V,O,7,c[4]),V=f(V,R,L,F,G,12,c[5]),F=f(F,V,R,L,z,17,c[6]),L=f(L,F,V,R,A,22,c[7]),R=f(R,L,F,V,W,7,c[8]),V=f(V,R,L,F,Y,12,c[9]),F=f(F,V,R,L,N,17,c[10]),L=f(L,F,V,R,$,22,c[11]),R=f(R,L,F,V,B,7,c[12]),V=f(V,R,L,F,H,12,c[13]),F=f(F,V,R,L,q,17,c[14]),L=f(L,F,V,R,ee,22,c[15]),R=h(R,L,F,V,T,5,c[16]),V=h(V,R,L,F,z,9,c[17]),F=h(F,V,R,L,$,14,c[18]),L=h(L,F,V,R,b,20,c[19]),R=h(R,L,F,V,G,5,c[20]),V=h(V,R,L,F,N,9,c[21]),F=h(F,V,R,L,ee,14,c[22]),L=h(L,F,V,R,O,20,c[23]),R=h(R,L,F,V,Y,5,c[24]),V=h(V,R,L,F,q,9,c[25]),F=h(F,V,R,L,P,14,c[26]),L=h(L,F,V,R,W,20,c[27]),R=h(R,L,F,V,H,5,c[28]),V=h(V,R,L,F,E,9,c[29]),F=h(F,V,R,L,A,14,c[30]),L=h(L,F,V,R,B,20,c[31]),R=p(R,L,F,V,G,4,c[32]),V=p(V,R,L,F,W,11,c[33]),F=p(F,V,R,L,$,16,c[34]),L=p(L,F,V,R,q,23,c[35]),R=p(R,L,F,V,T,4,c[36]),V=p(V,R,L,F,O,11,c[37]),F=p(F,V,R,L,A,16,c[38]),L=p(L,F,V,R,N,23,c[39]),R=p(R,L,F,V,H,4,c[40]),V=p(V,R,L,F,b,11,c[41]),F=p(F,V,R,L,P,16,c[42]),L=p(L,F,V,R,z,23,c[43]),R=p(R,L,F,V,Y,4,c[44]),V=p(V,R,L,F,B,11,c[45]),F=p(F,V,R,L,ee,16,c[46]),L=p(L,F,V,R,E,23,c[47]),R=m(R,L,F,V,b,6,c[48]),V=m(V,R,L,F,A,10,c[49]),F=m(F,V,R,L,q,15,c[50]),L=m(L,F,V,R,G,21,c[51]),R=m(R,L,F,V,B,6,c[52]),V=m(V,R,L,F,P,10,c[53]),F=m(F,V,R,L,N,15,c[54]),L=m(L,F,V,R,T,21,c[55]),R=m(R,L,F,V,W,6,c[56]),V=m(V,R,L,F,ee,10,c[57]),F=m(F,V,R,L,z,15,c[58]),L=m(L,F,V,R,H,21,c[59]),R=m(R,L,F,V,O,6,c[60]),V=m(V,R,L,F,$,10,c[61]),F=m(F,V,R,L,E,15,c[62]),L=m(L,F,V,R,Y,21,c[63]),x[0]=x[0]+R|0,x[1]=x[1]+L|0,x[2]=x[2]+F|0,x[3]=x[3]+V|0},_doFinalize:function(){var g=this._data,v=g.words,S=this._nDataBytes*8,w=g.sigBytes*8;v[w>>>5]|=128<<24-w%32;var y=r.floor(S/4294967296),x=S;v[(w+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,v[(w+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,g.sigBytes=(v.length+1)*4,this._process();for(var b=this._hash,T=b.words,E=0;E<4;E++){var P=T[E];T[E]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}return b},clone:function(){var g=l.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,v,S,w,y,x,b){var T=g+(v&S|~v&w)+y+b;return(T<<x|T>>>32-x)+v}function h(g,v,S,w,y,x,b){var T=g+(v&w|S&~w)+y+b;return(T<<x|T>>>32-x)+v}function p(g,v,S,w,y,x,b){var T=g+(v^S^w)+y+b;return(T<<x|T>>>32-x)+v}function m(g,v,S,w,y,x,b){var T=g+(S^(v|~w))+y+b;return(T<<x|T>>>32-x)+v}i.MD5=l._createHelper(d),i.HmacMD5=l._createHmacHelper(d)}(Math),n.MD5})})(Tp);var Sk=Tp.exports;const _p=fn(Sk);var kp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,l=o.init=function(s){if(s instanceof ArrayBuffer&&(s=new Uint8Array(s)),(s instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&s instanceof Uint8ClampedArray||s instanceof Int16Array||s instanceof Uint16Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Float32Array||s instanceof Float64Array)&&(s=new Uint8Array(s.buffer,s.byteOffset,s.byteLength)),s instanceof Uint8Array){for(var c=s.byteLength,d=[],f=0;f<c;f++)d[f>>>2]|=s[f]<<24-f%4*8;a.call(this,d,c)}else a.apply(this,arguments)};l.prototype=o}}(),n.lib.WordArray})})(kp);var Ak=kp.exports;const Pp=fn(Ak);var Dp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Tc())})(Bt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(s){var c=s.words,d=s.sigBytes,f=this._map;s.clamp();for(var h=[],p=0;p<d;p+=3)for(var m=c[p>>>2]>>>24-p%4*8&255,g=c[p+1>>>2]>>>24-(p+1)%4*8&255,v=c[p+2>>>2]>>>24-(p+2)%4*8&255,S=m<<16|g<<8|v,w=0;w<4&&p+w*.75<d;w++)h.push(f.charAt(S>>>6*(3-w)&63));var y=f.charAt(64);if(y)for(;h.length%4;)h.push(y);return h.join("")},parse:function(s){var c=s.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var h=0;h<d.length;h++)f[d.charCodeAt(h)]=h}var p=d.charAt(64);if(p){var m=s.indexOf(p);m!==-1&&(c=m)}return l(s,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(s,c,d){for(var f=[],h=0,p=0;p<c;p++)if(p%4){var m=d[s.charCodeAt(p-1)]<<p%4*2,g=d[s.charCodeAt(p)]>>>6-p%4*2,v=m|g;f[h>>>2]|=v<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Dp);var Tk=Dp.exports;const Ek=fn(Tk);class Op{constructor(){oe(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Pp.create(new Uint8Array(a)),c=_p(l).toString(Ek);n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));oe(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Pp.create(new Uint8Array(a)),s=_p(l).toString();n(s)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Rp=({title:e,open:t,imageSrc:n,toggleModal:r})=>u.jsx(I.Modal,{open:t,onClose:r,children:u.jsxs(I.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(I.ModalClose,{}),u.jsx(I.DialogTitle,{sx:{marginBottom:"10px"},children:e}),u.jsx(I.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Mp=Ve(u.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),pt=()=>{const e=C.useContext(Xo);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},_k=Ve(u.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),kk=({isLoading:e,images:t,onClick:n})=>u.jsxs(u.Fragment,{children:[u.jsx(I.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return u.jsx(I.Grid,{xs:5,sm:4,md:3,children:u.jsxs(I.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,l;return n(((l=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:l.embed)||"")},children:[u.jsx(I.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"}}),u.jsx(I.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:u.jsx(I.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?u.jsx(I.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx(I.CircularProgress,{variant:"solid",color:"neutral"})}):u.jsx(u.Fragment,{})]}),Pk=Ve(u.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),Dk=Ve(u.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Ok=e=>u.jsx(I.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:u.jsxs(I.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&u.jsx(I.Button,{variant:"outlined",color:"neutral",startDecorator:u.jsx(Pk,{}),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&&u.jsx(I.Button,{variant:"outlined",color:"neutral",endDecorator:u.jsx(Dk,{}),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})]})}),Rk=Ve(u.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"),Mk=Ve(u.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),Lk=({color:e})=>e==="warning"?u.jsx(Mk,{}):u.jsx(Rk,{}),ut=e=>u.jsx(I.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:u.jsx(Lk,{color:e.color}),children:e.message},e.message),to=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:n,color:"primary",children:e}),u.jsx(I.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},Bk=({labels:e,showFilters:t,onClick:n})=>u.jsx(I.Tooltip,{title:t?e.hideFilters:e.showFilters,children:u.jsx(I.IconButton,{"aria-label":"Filters",onClick:n,children:u.jsx(_k,{})})}),Lp=({labels:e,onChangeImages:t})=>{const[n,r]=C.useState(!1),[i,o]=C.useState(!1),[a,l]=C.useState(!1),[s,c]=C.useState(!1),[d,f]=C.useState(1),[h,p]=C.useState(""),[m,g]=C.useState(null),[v,S]=C.useState([]),{https:w}=pt();C.useEffect(()=>{E()},[d]);const y=()=>c(!s),x=()=>f(O=>O-1),b=()=>f(O=>O+1),T=()=>k(this,null,function*(){if(h){o(!0);const O=m?U({},m):null,G=yield w.fetchImagesFromSportal365(h,O,d);if(G){const z=yield G.json();G.ok?(S(z.data),f(z.meta.pagination.current_page)):(console.error(z),y())}o(!1)}else S([])}),E=()=>k(this,null,function*(){if(h){l(!0),S([]);const O=m&&m.from&&m.to?U({},m):null,G=yield w.fetchImagesFromSportal365(h,O,d);if(G){const z=yield G.json();G.ok?(S(z.data),f(z.meta.pagination.current_page)):(console.error(z),y())}l(!1)}}),P=(O,G)=>{g(z=>z?X(U({},z),{[G]:O}):{[G]:O})};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(I.Input,{value:h,onChange:O=>p(O.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:u.jsx(Bk,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?u.jsxs(I.Grid,{container:!0,spacing:2,children:[u.jsx(I.Grid,{xs:6,children:u.jsx(to,{label:e.fromDate,defaultValue:m==null?void 0:m.from,required:!1,onChange:O=>P(O,"from")})}),u.jsx(I.Grid,{xs:6,children:u.jsx(to,{label:e.toDate,defaultValue:m==null?void 0:m.to,required:!1,onChange:O=>P(O,"to")})})]}):u.jsx(u.Fragment,{}),u.jsx(I.Button,{onClick:T,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),u.jsx(kk,{images:v,isLoading:a,onClick:t}),u.jsx(Ok,{labels:e,pageCount:d,images:v,getPreviousPage:x,getNextPage:b})]}),u.jsx(ut,{showToast:s,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:y})]})},Bp=Ve(u.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"),$p=I.styled("input")`
|
|
2351
2351
|
clip: rect(0 0 0 0);
|
|
2352
2352
|
clip-path: inset(50%);
|
|
2353
2353
|
height: 1px;
|
|
@@ -2370,7 +2370,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
2370
2370
|
* @return {boolean} True if the event is supported.
|
|
2371
2371
|
* @internal
|
|
2372
2372
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
2373
|
-
*/function zk(e,t){if(!Up.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&Hp&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var jk=zk,Vk=$k,Uk=jk,Wp=10,Gp=40,Yp=800;function Kp(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*Wp,i=n*Wp,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(e.deltaMode==1?(r*=Gp,i*=Gp):(r*=Yp,i*=Yp)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}Kp.getEventType=function(){return Vk.firefox()?"DOMMouseScroll":Uk("wheel")?"wheel":"mousewheel"};var Hk=Kp,Wk=Hk;const Gk=fn(Wk);function Yk(e,t,n,r,i,o){o===void 0&&(o=0);var a=Zr(e,t,o),l=a.width,s=a.height,c=Math.min(l,n),d=Math.min(s,r);return c>d*i?{width:d*i,height:d}:{width:c,height:c/i}}function Kk(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function qa(e,t,n,r,i){i===void 0&&(i=0);var o=Zr(t.width,t.height,i),a=o.width,l=o.height;return{x:qp(e.x,a,n.width,r),y:qp(e.y,l,n.height,r)}}function qp(e,t,n,r){var i=t*r/2-n/2;return Qa(e,-i,i)}function Qp(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Jp(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function qk(e,t,n,r,i,o,a){o===void 0&&(o=0),a===void 0&&(a=!0);var l=a?Qk:Jk,s=Zr(t.width,t.height,o),c=Zr(t.naturalWidth,t.naturalHeight,o),d={x:l(100,((s.width-n.width/i)/2-e.x/i)/s.width*100),y:l(100,((s.height-n.height/i)/2-e.y/i)/s.height*100),width:l(100,n.width/s.width*100/i),height:l(100,n.height/s.height*100/i)},f=Math.round(l(c.width,d.width*c.width/100)),h=Math.round(l(c.height,d.height*c.height/100)),p=c.width>=c.height*r,
|
|
2373
|
+
*/function zk(e,t){if(!Up.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&Hp&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var jk=zk,Vk=$k,Uk=jk,Wp=10,Gp=40,Yp=800;function Kp(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*Wp,i=n*Wp,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(e.deltaMode==1?(r*=Gp,i*=Gp):(r*=Yp,i*=Yp)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}Kp.getEventType=function(){return Vk.firefox()?"DOMMouseScroll":Uk("wheel")?"wheel":"mousewheel"};var Hk=Kp,Wk=Hk;const Gk=fn(Wk);function Yk(e,t,n,r,i,o){o===void 0&&(o=0);var a=Zr(e,t,o),l=a.width,s=a.height,c=Math.min(l,n),d=Math.min(s,r);return c>d*i?{width:d*i,height:d}:{width:c,height:c/i}}function Kk(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function qa(e,t,n,r,i){i===void 0&&(i=0);var o=Zr(t.width,t.height,i),a=o.width,l=o.height;return{x:qp(e.x,a,n.width,r),y:qp(e.y,l,n.height,r)}}function qp(e,t,n,r){var i=t*r/2-n/2;return Qa(e,-i,i)}function Qp(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Jp(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function qk(e,t,n,r,i,o,a){o===void 0&&(o=0),a===void 0&&(a=!0);var l=a?Qk:Jk,s=Zr(t.width,t.height,o),c=Zr(t.naturalWidth,t.naturalHeight,o),d={x:l(100,((s.width-n.width/i)/2-e.x/i)/s.width*100),y:l(100,((s.height-n.height/i)/2-e.y/i)/s.height*100),width:l(100,n.width/s.width*100/i),height:l(100,n.height/s.height*100/i)},f=Math.round(l(c.width,d.width*c.width/100)),h=Math.round(l(c.height,d.height*c.height/100)),p=c.width>=c.height*r,m=p?{width:Math.round(h*r),height:h}:{width:f,height:Math.round(f/r)},g=At(At({},m),{x:Math.round(l(c.width-m.width,d.x*c.width/100)),y:Math.round(l(c.height-m.height,d.y*c.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function Qk(e,t){return Math.min(e,Math.max(0,t))}function Jk(e,t){return t}function Xk(e,t,n,r,i,o){var a=Zr(t.width,t.height,n),l=Qa(r.width/a.width*(100/e.width),i,o),s={x:l*a.width/2-r.width/2-a.width*l*(e.x/100),y:l*a.height/2-r.height/2-a.height*l*(e.y/100)};return{crop:s,zoom:l}}function Zk(e,t,n){var r=Kk(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}function eP(e,t,n,r,i,o){n===void 0&&(n=0);var a=Zr(t.naturalWidth,t.naturalHeight,n),l=Qa(Zk(e,t,r),i,o),s=r.height>r.width?r.height/e.height:r.width/e.width,c={x:((a.width-e.width)/2-e.x)*s,y:((a.height-e.height)/2-e.y)*s};return{crop:c,zoom:l}}function Xp(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function tP(e){return e*Math.PI/180}function Zr(e,t,n){var r=tP(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function Qa(e,t,n){return Math.min(Math.max(e,t),n)}function Ja(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(n){return typeof n=="string"&&n.length>0}).join(" ").trim()}var nP=`.reactEasyCrop_Container {
|
|
2374
2374
|
position: absolute;
|
|
2375
2375
|
top: 0;
|
|
2376
2376
|
left: 0;
|
|
@@ -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
|
-
`,rP=1,iP=3,oP=function(e){q0(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=z.createRef(),n.videoRef=z.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=Xk(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 l=eP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=l.crop,a=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,l,s,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var d=n.containerRect.width/n.containerRect.height,f=((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,p=c.offsetWidth<f||c.offsetHeight<h,g=f/h,m=void 0;if(p)switch(n.state.mediaObjectFit){default:case"contain":m=d>g?{width:n.containerRect.height*g,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/g};break;case"horizontal-cover":m={width:n.containerRect.width,height:n.containerRect.width/g};break;case"vertical-cover":m={width:n.containerRect.height*g,height:n.containerRect.height};break}else m={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=At(At({},m),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var v=n.props.cropSize?n.props.cropSize:Yk(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((l=n.state.cropSize)===null||l===void 0?void 0:l.height)!==v.height||((s=n.state.cropSize)===null||s===void 0?void 0:s.width)!==v.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(v),n.setState({cropSize:v},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(v),v}},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,l=r.y;n.dragStartPosition={x:a,y:l},n.dragStartCrop=At({},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,l=o-n.dragStartPosition.y,s={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+l},c=n.props.restrictPosition?qa(s,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):s;n.props.onCropChange(c)}}))},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=Gk(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 l,s;return(s=(l=n.props).onInteractionStart)===null||s===void 0?void 0:s.call(l)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var l,s;return(s=(l=n.props).onInteractionEnd)===null||s===void 0?void 0:s.call(l)})},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,l=a.crop,s=a.zoom;return{x:(i+l.x)/s,y:(o+l.y)/s}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,l=a.shouldUpdatePosition,s=l===void 0?!0:l;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=Qa(r,n.props.minZoom,n.props.maxZoom);if(s){var d=n.getPointOnContainer(i,n.containerPosition),f=n.getPointOnMedia(d),h={x:f.x*c-d.x,y:f.y*c-d.y},p=n.props.restrictPosition?qa(h,n.mediaSize,n.state.cropSize,c,n.props.rotation):h;n.props.onCropChange(p)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?qa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return qk(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?qa(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=nP,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,l,s,c,d,f;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():(((l=n.crop)===null||l===void 0?void 0:l.x)!==((s=this.props.crop)===null||s===void 0?void 0:s.x)||((c=n.crop)===null||c===void 0?void 0:c.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.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&&((f=this.videoRef.current)===null||f===void 0||f.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 l=this.containerRect.width/this.containerRect.height,s=((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,c=((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,d=s/c;return d<l?"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=Qp(r,i),this.lastPinchRotation=Jp(r,i),this.onDragStart(Xp(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=Xp(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var l=Qp(i,o),s=r.props.zoom*(l/r.lastPinchDistance);r.setNewZoom(s,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=l;var c=Jp(i,o),d=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=c})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,l=i.mediaProps,s=i.transform,c=i.crop,d=c.x,f=c.y,h=i.rotation,p=i.zoom,g=i.cropShape,m=i.showGrid,v=i.style,A=v.containerStyle,x=v.cropAreaStyle,b=v.mediaStyle,S=i.classes,y=S.containerClassName,w=S.cropAreaClassName,E=S.mediaClassName,k=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return z.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(Y){return n.containerRef=Y},"data-testid":"container",style:A,className:Ja("reactEasyCrop_Container",y)},o?z.createElement("img",At({alt:"",className:Ja("reactEasyCrop_Image",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},l,{src:o,ref:this.imageRef,style:At(At({},b),{transform:s||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&z.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Ja("reactEasyCrop_Video",k==="contain"&&"reactEasyCrop_Contain",k==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",k==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},l,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:At(At({},b),{transform:s||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(N){return z.createElement("source",At({key:N.src},N))})),this.state.cropSize&&z.createElement("div",{style:At(At({},x),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Ja("reactEasyCrop_CropArea",g==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",w)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:iP,minZoom:rP,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}(z.Component);const aP=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 sP(e){return e*Math.PI/180}function lP(e,t,n=0){return P(this,null,function*(){const r=yield aP(e),i=document.createElement("canvas"),o=i.getContext("2d"),l=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=l,i.height=l,o.translate(l/2,l/2),o.rotate(sP(n)),o.translate(-l/2,-l/2),o.drawImage(r,l/2-r.width*.5,l/2-r.height*.5);const s=o.getImageData(0,0,l,l);return i.width=t.width,i.height=t.height,o.putImageData(s,Math.round(0-l/2+r.width*.5-t.x),Math.round(0-l/2+r.height*.5-t.y)),new Promise(c=>i.toBlob(d=>{const f=new File([d],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});c(f)},"image/jpeg"))})}const Zp=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,l]=C.useState({x:0,y:0}),[s,c]=C.useState(1),[d,f]=C.useState(16/9),[h,p]=C.useState(null),g=(b,S)=>{p(S)},m=(b,S)=>f(S),v=()=>P(this,null,function*(){const b=yield lP(n,h);x(),o(b)}),A=()=>{x(),r()},x=()=>{l({x:0,y:0}),c(1),f(16/9),p(null)};return u.jsx(I.Modal,{open:t,onClose:i,children:u.jsxs(I.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(I.ModalClose,{}),u.jsx(I.DialogTitle,{children:e.cropImage}),u.jsxs(I.DialogContent,{sx:{width:"100%"},children:[u.jsx(I.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:u.jsx(oP,{image:n,crop:a,zoom:s,aspect:d,onCropChange:l,onCropComplete:g,onZoomChange:c})}),u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.aspectRatio}),u.jsxs(I.Select,{value:d,onChange:m,children:[u.jsx(I.Option,{value:4/3,children:"4 / 3"}),u.jsx(I.Option,{value:16/9,children:"16 / 9"}),u.jsx(I.Option,{value:1,children:"1"})]})]}),u.jsx(I.Box,{mb:1,mx:2,children:u.jsx(I.Slider,{value:s,min:1,max:3,step:.1,onChange:(b,S)=>c(S)})}),u.jsxs(I.DialogActions,{children:[u.jsx(I.Button,{color:"primary",onClick:v,loading:!1,children:e.crop}),u.jsx(I.Button,{color:"primary",variant:"outlined",onClick:A,loading:!1,children:e.reset})]})]})]})})},eg=Ve(u.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),tg=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=C.useState(!1),[l,s]=C.useState(!1),[c,d]=C.useState(!1),[f,h]=C.useState(!1),[p,g]=C.useState(""),[m,v]=C.useState("primary"),[A,x]=C.useState(""),b=C.useRef(null),S=()=>h(!f),y=()=>{b.current&&b.current.click()},w=new Op,E=C.useContext(Xo),k=()=>{g(""),s(!1)},N=L=>{let U="",q="primary";switch(L){case"copy_url":U=e.urlCopiedToClipboardMessage,q="primary";break;case"image_deleted":U=e.imageDeletedMessage,q="primary";break;case"image_reset":U=e.imageResetMessage,q="primary";break;case"upload_success":U=e.uploadingImageMessage,q="success";break;case"upload_failed":U=e.uploadingImageErrorMessage,q="danger";break;case"sign_in_url_failed":U=e.generateSignedInUrlErrorMessage,q="danger";break;case"encrypting_file_failed":U=e.encryptingImageErrorMessage,q="danger";break}v(q),g(U),s(!0)},Y=()=>d(!c),W=()=>{i(),N("image_deleted")},T=L=>{navigator.clipboard.writeText(L),N("copy_url")},H=L=>P(this,null,function*(){L.persist();const U=L.target.files?L.target.files[0]:null;if(U){a(!0);try{const q=U.type.split("/")[1],ee=yield w.readFileAndHash(U),O=(yield w.generateHashFileName(U))+"."+q,M={image_type:q,image_file_name:O,image_size:U.size,base64_sum:ee},F=yield E==null?void 0:E.https.generateSignedInUrl(M);if(F!=null&&F.ok){const j=yield F.json(),te={"Content-Type":U.type,"Content-MD5":ee};try{const se=new File([U],O,{type:U.type}),ae=yield E==null?void 0:E.https.storeInBucket(j.data.signed_url,se,te);r(ae||""),x(ae),N("upload_success")}catch(se){console.error("There was a problem with uploading the file: ",se),N("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield F==null?void 0:F.json()),N("sign_in_url_failed")}catch(q){console.error("There was a problem with encrypting file...",q),N("encrypting_file_failed")}a(!1)}}),G=L=>P(this,null,function*(){if(L){a(!0);try{const U=L.type.split("/")[1],q=yield w.readFileAndHash(L),ee=(yield w.generateHashFileName(L))+"."+U,O={image_type:U,image_file_name:ee,image_size:L.size,base64_sum:q},M=yield E==null?void 0:E.https.generateSignedInUrl(O);if(M!=null&&M.ok){const F=yield M.json(),j={"Content-Type":L.type,"Content-MD5":q};try{const te=new File([L],ee,{type:L.type}),se=yield E==null?void 0:E.https.storeInBucket(F.data.signed_url,te,j);r(se||""),N("upload_success")}catch(te){console.error("There was a problem with uploading the file: ",te),N("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield M==null?void 0:M.json()),N("sign_in_url_failed")}catch(U){console.error("There was a problem with encrypting file...",U),N("encrypting_file_failed")}a(!1)}}),$=()=>{r(A),N("image_reset")},B=L=>{r(L),x(L)};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(I.Typography,{level:"title-lg",children:t}),u.jsx(I.Tooltip,{title:e.clearImage,children:u.jsx(I.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:W,children:u.jsx(xp,{})})})]}),u.jsxs(I.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(I.Skeleton,{loading:o,animation:"wave",children:[n?u.jsx(I.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)"}}}):u.jsx(Ic,{sx:{fontSize:"3rem",opacity:.2}}),n?u.jsx(I.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:u.jsx(Mp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(I.Tooltip,{title:e.copyUrl,children:u.jsx(Xr,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(I.Tooltip,{title:e.viewImage,children:u.jsx(Xr,{onClick:Y,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(I.Tooltip,{title:e.cropImage,children:u.jsx(Xr,{onClick:S,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(I.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(Xr,{sx:{width:"100%"},onClick:y,children:[u.jsx(Le.Upload,{})," ",e.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:H,ref:b})]})}),E!=null&&E.https.sportal365Config?u.jsx(I.AccordionGroup,{variant:"soft",children:u.jsxs(I.Accordion,{children:[u.jsx(I.AccordionSummary,{children:u.jsx(I.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),u.jsx(I.AccordionDetails,{children:u.jsx(Lp,{labels:e,onChangeImages:B})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(ut,{showToast:l,message:p,color:m,hideToast:k}),u.jsx(Rp,{title:e.viewImage,open:c,imageSrc:n,toggleModal:Y}),u.jsx(Zp,{labels:e,open:f,imageSrc:n,toggleModal:S,uploadImage:G,resetDefaultImageUrl:$})]})},cP=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),uP=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),dP=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),fP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=C.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],l=cP(e),s=uP(e),c=dP(e),d=(g,m)=>{const v=g.target.value;o.colors[m]=v,n(o)},f=(g,m)=>{const v=g.target.value;o.urls[m]=v,n(o)},h=(g,m)=>{o.images[m]=g,n(o)},p=g=>{o.images[g]="",n(o)};return u.jsx(I.Box,{children:u.jsxs(Fh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${ac.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:[u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(Ic,{sx:{width:"20px"}})}),e.images]}),u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(B_,{sx:{width:"20px"}})}),e.colors]}),u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx($_,{sx:{width:"20px"}})}),e.urls]})]}),u.jsxs(Qr,{value:0,sx:{px:0},children:[u.jsx(tg,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:g=>h(g,"main_logo"),clearImage:()=>p("main_logo")}),u.jsx(I.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?u.jsx(u.Fragment,{children:a.map(g=>u.jsx(tg,{labels:e,title:l.get(g),image:o.images[g],onChangeImages:m=>h(m,g),clearImage:()=>p(g)},`branding-image-${g}`))}):u.jsx(u.Fragment,{})]}),u.jsx(Qr,{value:1,sx:{px:0},children:u.jsx(I.Box,{children:Object.keys(o.colors).map(g=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:s.get(g),placeholder:"",defaultValue:o.colors[g],required:!1,onChange:m=>d(m,g)})},`branding-color-${g}`))})}),u.jsx(Qr,{value:2,sx:{px:0},children:u.jsx(I.Box,{children:Object.keys(o.urls).map(g=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:c.get(g),placeholder:"",defaultValue:o.urls[g],required:!1,onChange:m=>f(m,g)})},`branding-url-${g}`))})})]})})},Lc=Ve(u.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"),ng=e=>{const t=()=>P(this,null,function*(){yield zi(e.environment).signOut()});return u.jsx(I.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},hP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>u.jsx(u.Fragment,{children:u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?u.jsxs(I.Stack,{direction:"row",alignItems:"center",spacing:2,children:[u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?u.jsx(ng,{signOutLabel:n,environment:r}):u.jsx(u.Fragment,{})]})});var rg={},Bc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ei={_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},no={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},zt=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},rn=function(e){return e===!0?1:0};function ig(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var $c=function(e){return e instanceof Array?e:[e]};function Ot(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function Re(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 Xa(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function og(e,t){if(t(e))return e;if(e.parentNode)return og(e.parentNode,t)}function Za(e,t){var n=Re("div","numInputWrapper"),r=Re("input","numInput "+e),i=Re("span","arrowUp"),o=Re("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 Yt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var Nc=function(){},es=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},pP={D:Nc,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*rn(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:Nc,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:Nc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},Cr={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})"},ro={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[ro.w(e,t,n)]},F:function(e,t,n){return es(ro.n(e,t,n)-1,!1,t)},G:function(e,t,n){return zt(ro.h(e,t,n))},H:function(e){return zt(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[rn(e.getHours()>11)]},M:function(e,t){return es(e.getMonth(),!0,t)},S:function(e){return zt(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return zt(e.getFullYear(),4)},d:function(e){return zt(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return zt(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return zt(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)}},ag=function(e){var t=e.config,n=t===void 0?ei:t,r=e.l10n,i=r===void 0?no:r,o=e.isMobile,a=o===void 0?!1:o;return function(l,s,c){var d=c||i;return n.formatDate!==void 0&&!a?n.formatDate(l,s,d):s.split("").map(function(f,h,p){return ro[f]&&p[h-1]!=="\\"?ro[f](l,d,n):f!=="\\"?f:""}).join("")}},Fc=function(e){var t=e.config,n=t===void 0?ei:t,r=e.l10n,i=r===void 0?no:r;return function(o,a,l,s){if(!(o!==0&&!o)){var c=s||i,d,f=o;if(o instanceof Date)d=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)d=new Date(o);else if(typeof o=="string"){var h=a||(n||ei).dateFormat,p=String(o).trim();if(p==="today")d=new Date,l=!0;else if(n&&n.parseDate)d=n.parseDate(o,h);else if(/Z$/.test(p)||/GMT$/.test(p))d=new Date(o);else{for(var g=void 0,m=[],v=0,A=0,x="";v<h.length;v++){var b=h[v],S=b==="\\",y=h[v-1]==="\\"||S;if(Cr[b]&&!y){x+=Cr[b];var w=new RegExp(x).exec(o);w&&(g=!0)&&m[b!=="Y"?"push":"unshift"]({fn:pP[b],val:w[++A]})}else S||(x+=".")}d=!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,N=E.val;return d=k(d,N,c)||d}),d=g?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return l===!0&&d.setHours(0,0,0,0),d}}};function Kt(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 gP=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},mP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},vP={DAY:864e5};function jc(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 l=e.maxDate.getHours(),s=e.maxDate.getMinutes();t=Math.min(t,l),t===l&&(n=Math.min(s,n)),t===l&&n===s&&(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(l){l&&Object.keys(l).forEach(function(s){return e[s]=l[s]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var Et=function(){return Et=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},Et.apply(this,arguments)},sg=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,l=o.length;a<l;a++,i++)r[i]=o[a];return r},bP=300;function yP(e,t){var n={config:Et(Et({},ei),dt.defaultConfig),l10n:no};n.parseDate=Fc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=m,n._setHoursFromDate=h,n._positionCalendar=xe,n.changeMonth=O,n.changeYear=ae,n.clear=M,n.close=F,n.onMouseOver=Se,n._createElement=Re,n.createDay=w,n.destroy=j,n.isEnabled=J,n.jumpToDate=x,n.updateValue=un,n.open=wt,n.redraw=Pe,n.set=jt,n.setDate=qt,n.toggle=ku;function r(){n.utils={getDaysInMonth:function(_,R){return _===void 0&&(_=n.currentMonth),R===void 0&&(R=n.currentYear),_===1&&(R%4===0&&R%100!==0||R%400===0)?29:n.l10n.daysInMonth[_]}}}function i(){n.element=n.input=e,n.isOpen=!1,kt(),he(),wn(),Ts(),r(),n.isMobile||y(),A(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),un(!1)),l();var _=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&_&&xe(),ze("onReady")}function o(){var _;return((_=n.calendarContainer)===null||_===void 0?void 0:_.getRootNode()).activeElement||document.activeElement}function a(_){return _.bind(n)}function l(){var _=n.config;_.weekNumbers===!1&&_.showMonths===1||_.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 R=(n.days.offsetWidth+1)*_.showMonths;n.daysContainer.style.width=R+"px",n.calendarContainer.style.width=R+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function s(_){if(n.selectedDates.length===0){var R=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=jc(n.config);R.setHours(K.hours,K.minutes,K.seconds,R.getMilliseconds()),n.selectedDates=[R],n.latestSelectedDateObj=R}_!==void 0&&_.type!=="blur"&&Ct(_);var Q=n._input.value;f(),un(),n._input.value!==Q&&n._debouncedChange()}function c(_,R){return _%12+12*rn(R===n.l10n.amPM[1])}function d(_){switch(_%24){case 0:case 12:return 12;default:return _%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var _=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,R=(parseInt(n.minuteElement.value,10)||0)%60,K=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(_=c(_,n.amPM.textContent));var Q=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.minDate,!0)===0,re=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Kt(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 ce=zc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Ce=zc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ue=zc(_,R,K);if(ue>Ce&&ue<ce){var we=mP(ce);_=we[0],R=we[1],K=we[2]}}else{if(re){var fe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;_=Math.min(_,fe.getHours()),_===fe.getHours()&&(R=Math.min(R,fe.getMinutes())),R===fe.getMinutes()&&(K=Math.min(K,fe.getSeconds()))}if(Q){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;_=Math.max(_,me.getHours()),_===me.getHours()&&R<me.getMinutes()&&(R=me.getMinutes()),R===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(_,R,K)}}function h(_){var R=_||n.latestSelectedDateObj;R&&R instanceof Date&&p(R.getHours(),R.getMinutes(),R.getSeconds())}function p(_,R,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(_%24,R,K||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=zt(n.config.time_24hr?_:(12+_)%12+12*rn(_%12===0)),n.minuteElement.value=zt(R),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[rn(_>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function g(_){var R=Yt(_),K=parseInt(R.value)+(_.delta||0);(K/1e3>1||_.key==="Enter"&&!/[^\d]/.test(K.toString()))&&ae(K)}function m(_,R,K,Q){if(R instanceof Array)return R.forEach(function(re){return m(_,re,K,Q)});if(_ instanceof Array)return _.forEach(function(re){return m(re,R,K,Q)});_.addEventListener(R,K,Q),n._handlers.push({remove:function(){return _.removeEventListener(R,K,Q)}})}function v(){ze("onChange")}function A(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(Q){return m(Q,"click",n[K])})}),n.isMobile){_u();return}var _=ig(Ue,50);if(n._debouncedChange=ig(v,bP),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(n.daysContainer,"mouseover",function(K){n.config.mode==="range"&&Se(Yt(K))}),m(n._input,"keydown",ge),n.calendarContainer!==void 0&&m(n.calendarContainer,"keydown",ge),!n.config.inline&&!n.config.static&&m(window,"resize",_),window.ontouchstart!==void 0?m(window.document,"touchstart",se):m(window.document,"mousedown",se),m(window.document,"focus",se,{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",_s),m(n.monthNav,["keyup","increment"],g),m(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var R=function(K){return Yt(K).select()};m(n.timeContainer,["increment"],s),m(n.timeContainer,"blur",s,{capture:!0}),m(n.timeContainer,"click",b),m([n.hourElement,n.minuteElement],["focus","click"],R),n.secondElement!==void 0&&m(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&m(n.amPM,"click",function(K){s(K)})}n.config.allowInput&&m(n._input,"blur",ne)}function x(_,R){var K=_!==void 0?n.parseDate(_):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),Q=n.currentYear,re=n.currentMonth;try{K!==void 0&&(n.currentYear=K.getFullYear(),n.currentMonth=K.getMonth())}catch(ce){ce.message="Invalid date supplied: "+K,n.config.errorHandler(ce)}R&&n.currentYear!==Q&&(ze("onYearChange"),H()),R&&(n.currentYear!==Q||n.currentMonth!==re)&&ze("onMonthChange"),n.redraw()}function b(_){var R=Yt(_);~R.className.indexOf("arrow")&&S(_,R.classList.contains("arrowUp")?1:-1)}function S(_,R,K){var Q=_&&Yt(_),re=K||Q&&Q.parentNode&&Q.parentNode.firstChild,ce=pi("increment");ce.delta=R,re&&re.dispatchEvent(ce)}function y(){var _=window.document.createDocumentFragment();if(n.calendarContainer=Re("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(_.appendChild(B()),n.innerContainer=Re("div","flatpickr-innerContainer"),n.config.weekNumbers){var R=ee(),K=R.weekWrapper,Q=R.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=Q,n.weekWrapper=K}n.rContainer=Re("div","flatpickr-rContainer"),n.rContainer.appendChild(U()),n.daysContainer||(n.daysContainer=Re("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),_.appendChild(n.innerContainer)}n.config.enableTime&&_.appendChild(L()),Ot(n.calendarContainer,"rangeMode",n.config.mode==="range"),Ot(n.calendarContainer,"animate",n.config.animate===!0),Ot(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(_);var re=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&&(!re&&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 ce=Re("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ce,n.element),ce.appendChild(n.element),n.altInput&&ce.appendChild(n.altInput),ce.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function w(_,R,K,Q){var re=J(R,!0),ce=Re("span",_,R.getDate().toString());return ce.dateObj=R,ce.$i=Q,ce.setAttribute("aria-label",n.formatDate(R,n.config.ariaDateFormat)),_.indexOf("hidden")===-1&&Kt(R,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),re?(ce.tabIndex=-1,Io(R)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(R,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(R,n.selectedDates[1],!0)===0),_==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Es(R)&&!Io(R)&&ce.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&_!=="prevMonthDay"&&Q%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(R)+"</span>"),ze("onDayCreate",ce),ce}function E(_){_.focus(),n.config.mode==="range"&&Se(_)}function k(_){for(var R=_>0?0:n.config.showMonths-1,K=_>0?n.config.showMonths:-1,Q=R;Q!=K;Q+=_)for(var re=n.daysContainer.children[Q],ce=_>0?0:re.children.length-1,Ce=_>0?re.children.length:-1,ue=ce;ue!=Ce;ue+=_){var we=re.children[ue];if(we.className.indexOf("hidden")===-1&&J(we.dateObj))return we}}function N(_,R){for(var K=_.className.indexOf("Month")===-1?_.dateObj.getMonth():n.currentMonth,Q=R>0?n.config.showMonths:-1,re=R>0?1:-1,ce=K-n.currentMonth;ce!=Q;ce+=re)for(var Ce=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?_.$i+R:R<0?Ce.children.length-1:0,we=Ce.children.length,fe=ue;fe>=0&&fe<we&&fe!=(R>0?we:-1);fe+=re){var me=Ce.children[fe];if(me.className.indexOf("hidden")===-1&&J(me.dateObj)&&Math.abs(_.$i-fe)>=Math.abs(R))return E(me)}n.changeMonth(re),Y(k(re),0)}function Y(_,R){var K=o(),Q=le(K||document.body),re=_!==void 0?_:Q?K:n.selectedDateElem!==void 0&&le(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&le(n.todayDateElem)?n.todayDateElem:k(R>0?1:-1);re===void 0?n._input.focus():Q?N(re,R):E(re)}function W(_,R){for(var K=(new Date(_,R,1).getDay()-n.l10n.firstDayOfWeek+7)%7,Q=n.utils.getDaysInMonth((R-1+12)%12,_),re=n.utils.getDaysInMonth(R,_),ce=window.document.createDocumentFragment(),Ce=n.config.showMonths>1,ue=Ce?"prevMonthDay hidden":"prevMonthDay",we=Ce?"nextMonthDay hidden":"nextMonthDay",fe=Q+1-K,me=0;fe<=Q;fe++,me++)ce.appendChild(w("flatpickr-day "+ue,new Date(_,R-1,fe),fe,me));for(fe=1;fe<=re;fe++,me++)ce.appendChild(w("flatpickr-day",new Date(_,R,fe),fe,me));for(var De=re+1;De<=42-K&&(n.config.showMonths===1||me%7!==0);De++,me++)ce.appendChild(w("flatpickr-day "+we,new Date(_,R+1,De%re),De,me));var Pt=Re("div","dayContainer");return Pt.appendChild(ce),Pt}function T(){if(n.daysContainer!==void 0){Xa(n.daysContainer),n.weekNumbers&&Xa(n.weekNumbers);for(var _=document.createDocumentFragment(),R=0;R<n.config.showMonths;R++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+R),_.appendChild(W(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(_),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function H(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var _=function(Q){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&Q<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&Q>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var R=0;R<12;R++)if(_(R)){var K=Re("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,R).getMonth().toString(),K.textContent=es(R,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===R&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function G(){var _=Re("div","flatpickr-month"),R=window.document.createDocumentFragment(),K;n.config.showMonths>1||n.config.monthSelectorType==="static"?K=Re("span","cur-month"):(n.monthsDropdownContainer=Re("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),m(n.monthsDropdownContainer,"change",function(Ce){var ue=Yt(Ce),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),ze("onMonthChange")}),H(),K=n.monthsDropdownContainer);var Q=Za("cur-year",{tabindex:"-1"}),re=Q.getElementsByTagName("input")[0];re.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&re.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(re.setAttribute("max",n.config.maxDate.getFullYear().toString()),re.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ce=Re("div","flatpickr-current-month");return ce.appendChild(K),ce.appendChild(Q),R.appendChild(ce),_.appendChild(R),{container:_,yearElement:re,monthElement:K}}function $(){Xa(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var _=n.config.showMonths;_--;){var R=G();n.yearElements.push(R.yearElement),n.monthElements.push(R.monthElement),n.monthNav.appendChild(R.container)}n.monthNav.appendChild(n.nextMonthNav)}function B(){return n.monthNav=Re("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Re("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Re("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,$(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(_){n.__hidePrevMonthArrow!==_&&(Ot(n.prevMonthNav,"flatpickr-disabled",_),n.__hidePrevMonthArrow=_)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(_){n.__hideNextMonthArrow!==_&&(Ot(n.nextMonthNav,"flatpickr-disabled",_),n.__hideNextMonthArrow=_)}}),n.currentYearElement=n.yearElements[0],gi(),n.monthNav}function L(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var _=jc(n.config);n.timeContainer=Re("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var R=Re("span","flatpickr-time-separator",":"),K=Za("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var Q=Za("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=Q.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?_.hours:d(_.hours)),n.minuteElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():_.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(K),n.timeContainer.appendChild(R),n.timeContainer.appendChild(Q),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var re=Za("flatpickr-second");n.secondElement=re.getElementsByTagName("input")[0],n.secondElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():_.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(Re("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(re)}return n.config.time_24hr||(n.amPM=Re("span","flatpickr-am-pm",n.l10n.amPM[rn((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 U(){n.weekdayContainer?Xa(n.weekdayContainer):n.weekdayContainer=Re("div","flatpickr-weekdays");for(var _=n.config.showMonths;_--;){var R=Re("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(R)}return q(),n.weekdayContainer}function q(){if(n.weekdayContainer){var _=n.l10n.firstDayOfWeek,R=sg(n.l10n.weekdays.shorthand);_>0&&_<R.length&&(R=sg(R.splice(_,R.length),R.splice(0,_)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2453
|
+
`,rP=1,iP=3,oP=function(e){q0(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=j.createRef(),n.videoRef=j.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=Xk(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 l=eP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=l.crop,a=l.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,l,s,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var d=n.containerRect.width/n.containerRect.height,f=((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,p=c.offsetWidth<f||c.offsetHeight<h,m=f/h,g=void 0;if(p)switch(n.state.mediaObjectFit){default:case"contain":g=d>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":g={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":g={width:n.containerRect.height*m,height:n.containerRect.height};break}else g={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=At(At({},g),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var v=n.props.cropSize?n.props.cropSize:Yk(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((l=n.state.cropSize)===null||l===void 0?void 0:l.height)!==v.height||((s=n.state.cropSize)===null||s===void 0?void 0:s.width)!==v.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(v),n.setState({cropSize:v},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(v),v}},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,l=r.y;n.dragStartPosition={x:a,y:l},n.dragStartCrop=At({},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,l=o-n.dragStartPosition.y,s={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+l},c=n.props.restrictPosition?qa(s,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):s;n.props.onCropChange(c)}}))},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=Gk(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 l,s;return(s=(l=n.props).onInteractionStart)===null||s===void 0?void 0:s.call(l)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var l,s;return(s=(l=n.props).onInteractionEnd)===null||s===void 0?void 0:s.call(l)})},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,l=a.crop,s=a.zoom;return{x:(i+l.x)/s,y:(o+l.y)/s}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,l=a.shouldUpdatePosition,s=l===void 0?!0:l;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=Qa(r,n.props.minZoom,n.props.maxZoom);if(s){var d=n.getPointOnContainer(i,n.containerPosition),f=n.getPointOnMedia(d),h={x:f.x*c-d.x,y:f.y*c-d.y},p=n.props.restrictPosition?qa(h,n.mediaSize,n.state.cropSize,c,n.props.rotation):h;n.props.onCropChange(p)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?qa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return qk(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?qa(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=nP,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,l,s,c,d,f;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():(((l=n.crop)===null||l===void 0?void 0:l.x)!==((s=this.props.crop)===null||s===void 0?void 0:s.x)||((c=n.crop)===null||c===void 0?void 0:c.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.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&&((f=this.videoRef.current)===null||f===void 0||f.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 l=this.containerRect.width/this.containerRect.height,s=((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,c=((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,d=s/c;return d<l?"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=Qp(r,i),this.lastPinchRotation=Jp(r,i),this.onDragStart(Xp(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=Xp(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var l=Qp(i,o),s=r.props.zoom*(l/r.lastPinchDistance);r.setNewZoom(s,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=l;var c=Jp(i,o),d=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=c})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,l=i.mediaProps,s=i.transform,c=i.crop,d=c.x,f=c.y,h=i.rotation,p=i.zoom,m=i.cropShape,g=i.showGrid,v=i.style,S=v.containerStyle,w=v.cropAreaStyle,y=v.mediaStyle,x=i.classes,b=x.containerClassName,T=x.cropAreaClassName,E=x.mediaClassName,P=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return j.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(G){return n.containerRef=G},"data-testid":"container",style:S,className:Ja("reactEasyCrop_Container",b)},o?j.createElement("img",At({alt:"",className:Ja("reactEasyCrop_Image",P==="contain"&&"reactEasyCrop_Contain",P==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",P==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},l,{src:o,ref:this.imageRef,style:At(At({},y),{transform:s||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&j.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Ja("reactEasyCrop_Video",P==="contain"&&"reactEasyCrop_Contain",P==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",P==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},l,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:At(At({},y),{transform:s||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(O){return j.createElement("source",At({key:O.src},O))})),this.state.cropSize&&j.createElement("div",{style:At(At({},w),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Ja("reactEasyCrop_CropArea",m==="round"&&"reactEasyCrop_CropAreaRound",g&&"reactEasyCrop_CropAreaGrid",T)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:iP,minZoom:rP,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}(j.Component);const aP=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 sP(e){return e*Math.PI/180}function lP(e,t,n=0){return k(this,null,function*(){const r=yield aP(e),i=document.createElement("canvas"),o=i.getContext("2d"),l=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=l,i.height=l,o.translate(l/2,l/2),o.rotate(sP(n)),o.translate(-l/2,-l/2),o.drawImage(r,l/2-r.width*.5,l/2-r.height*.5);const s=o.getImageData(0,0,l,l);return i.width=t.width,i.height=t.height,o.putImageData(s,Math.round(0-l/2+r.width*.5-t.x),Math.round(0-l/2+r.height*.5-t.y)),new Promise(c=>i.toBlob(d=>{const f=new File([d],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});c(f)},"image/jpeg"))})}const Zp=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,l]=C.useState({x:0,y:0}),[s,c]=C.useState(1),[d,f]=C.useState(16/9),[h,p]=C.useState(null),m=(y,x)=>{p(x)},g=(y,x)=>f(x),v=()=>k(this,null,function*(){const y=yield lP(n,h);w(),o(y)}),S=()=>{w(),r()},w=()=>{l({x:0,y:0}),c(1),f(16/9),p(null)};return u.jsx(I.Modal,{open:t,onClose:i,children:u.jsxs(I.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(I.ModalClose,{}),u.jsx(I.DialogTitle,{children:e.cropImage}),u.jsxs(I.DialogContent,{sx:{width:"100%"},children:[u.jsx(I.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:u.jsx(oP,{image:n,crop:a,zoom:s,aspect:d,onCropChange:l,onCropComplete:m,onZoomChange:c})}),u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.aspectRatio}),u.jsxs(I.Select,{value:d,onChange:g,children:[u.jsx(I.Option,{value:4/3,children:"4 / 3"}),u.jsx(I.Option,{value:16/9,children:"16 / 9"}),u.jsx(I.Option,{value:1,children:"1"})]})]}),u.jsx(I.Box,{mb:1,mx:2,children:u.jsx(I.Slider,{value:s,min:1,max:3,step:.1,onChange:(y,x)=>c(x)})}),u.jsxs(I.DialogActions,{children:[u.jsx(I.Button,{color:"primary",onClick:v,loading:!1,children:e.crop}),u.jsx(I.Button,{color:"primary",variant:"outlined",onClick:S,loading:!1,children:e.reset})]})]})]})})},eg=Ve(u.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),tg=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=C.useState(!1),[l,s]=C.useState(!1),[c,d]=C.useState(!1),[f,h]=C.useState(!1),[p,m]=C.useState(""),[g,v]=C.useState("primary"),[S,w]=C.useState(""),y=C.useRef(null),x=()=>h(!f),b=()=>{y.current&&y.current.click()},T=new Op,E=C.useContext(Xo),P=()=>{m(""),s(!1)},O=B=>{let H="",q="primary";switch(B){case"copy_url":H=e.urlCopiedToClipboardMessage,q="primary";break;case"image_deleted":H=e.imageDeletedMessage,q="primary";break;case"image_reset":H=e.imageResetMessage,q="primary";break;case"upload_success":H=e.uploadingImageMessage,q="success";break;case"upload_failed":H=e.uploadingImageErrorMessage,q="danger";break;case"sign_in_url_failed":H=e.generateSignedInUrlErrorMessage,q="danger";break;case"encrypting_file_failed":H=e.encryptingImageErrorMessage,q="danger";break}v(q),m(H),s(!0)},G=()=>d(!c),z=()=>{i(),O("image_deleted")},A=B=>{navigator.clipboard.writeText(B),O("copy_url")},W=B=>k(this,null,function*(){B.persist();const H=B.target.files?B.target.files[0]:null;if(H){a(!0);try{const q=H.type.split("/")[1],ee=yield T.readFileAndHash(H),R=(yield T.generateHashFileName(H))+"."+q,L={image_type:q,image_file_name:R,image_size:H.size,base64_sum:ee},F=yield E==null?void 0:E.https.generateSignedInUrl(L);if(F!=null&&F.ok){const V=yield F.json(),te={"Content-Type":H.type,"Content-MD5":ee};try{const se=new File([H],R,{type:H.type}),ae=yield E==null?void 0:E.https.storeInBucket(V.data.signed_url,se,te);r(ae||""),w(ae),O("upload_success")}catch(se){console.error("There was a problem with uploading the file: ",se),O("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield F==null?void 0:F.json()),O("sign_in_url_failed")}catch(q){console.error("There was a problem with encrypting file...",q),O("encrypting_file_failed")}a(!1)}}),Y=B=>k(this,null,function*(){if(B){a(!0);try{const H=B.type.split("/")[1],q=yield T.readFileAndHash(B),ee=(yield T.generateHashFileName(B))+"."+H,R={image_type:H,image_file_name:ee,image_size:B.size,base64_sum:q},L=yield E==null?void 0:E.https.generateSignedInUrl(R);if(L!=null&&L.ok){const F=yield L.json(),V={"Content-Type":B.type,"Content-MD5":q};try{const te=new File([B],ee,{type:B.type}),se=yield E==null?void 0:E.https.storeInBucket(F.data.signed_url,te,V);r(se||""),O("upload_success")}catch(te){console.error("There was a problem with uploading the file: ",te),O("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield L==null?void 0:L.json()),O("sign_in_url_failed")}catch(H){console.error("There was a problem with encrypting file...",H),O("encrypting_file_failed")}a(!1)}}),N=()=>{r(S),O("image_reset")},$=B=>{r(B),w(B)};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(I.Typography,{level:"title-lg",children:t}),u.jsx(I.Tooltip,{title:e.clearImage,children:u.jsx(I.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:z,children:u.jsx(xp,{})})})]}),u.jsxs(I.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(I.Skeleton,{loading:o,animation:"wave",children:[n?u.jsx(I.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)"}}}):u.jsx(Ic,{sx:{fontSize:"3rem",opacity:.2}}),n?u.jsx(I.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:u.jsx(Mp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(I.Tooltip,{title:e.copyUrl,children:u.jsx(Xr,{onClick:()=>A(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(I.Tooltip,{title:e.viewImage,children:u.jsx(Xr,{onClick:G,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(I.Tooltip,{title:e.cropImage,children:u.jsx(Xr,{onClick:x,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(I.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(Xr,{sx:{width:"100%"},onClick:b,children:[u.jsx(Le.Upload,{})," ",e.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:W,ref:y})]})}),E!=null&&E.https.sportal365Config?u.jsx(I.AccordionGroup,{variant:"soft",children:u.jsxs(I.Accordion,{children:[u.jsx(I.AccordionSummary,{children:u.jsx(I.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),u.jsx(I.AccordionDetails,{children:u.jsx(Lp,{labels:e,onChangeImages:$})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(ut,{showToast:l,message:p,color:g,hideToast:P}),u.jsx(Rp,{title:e.viewImage,open:c,imageSrc:n,toggleModal:G}),u.jsx(Zp,{labels:e,open:f,imageSrc:n,toggleModal:x,uploadImage:Y,resetDefaultImageUrl:N})]})},cP=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),uP=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),dP=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),fP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=C.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],l=cP(e),s=uP(e),c=dP(e),d=(m,g)=>{const v=m.target.value;o.colors[g]=v,n(o)},f=(m,g)=>{const v=m.target.value;o.urls[g]=v,n(o)},h=(m,g)=>{o.images[g]=m,n(o)},p=m=>{o.images[m]="",n(o)};return u.jsx(I.Box,{children:u.jsxs(Fh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${ac.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:[u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(Ic,{sx:{width:"20px"}})}),e.images]}),u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(B_,{sx:{width:"20px"}})}),e.colors]}),u.jsxs(jr,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx($_,{sx:{width:"20px"}})}),e.urls]})]}),u.jsxs(Qr,{value:0,sx:{px:0},children:[u.jsx(tg,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:m=>h(m,"main_logo"),clearImage:()=>p("main_logo")}),u.jsx(I.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?u.jsx(u.Fragment,{children:a.map(m=>u.jsx(tg,{labels:e,title:l.get(m),image:o.images[m],onChangeImages:g=>h(g,m),clearImage:()=>p(m)},`branding-image-${m}`))}):u.jsx(u.Fragment,{})]}),u.jsx(Qr,{value:1,sx:{px:0},children:u.jsx(I.Box,{children:Object.keys(o.colors).map(m=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:s.get(m),placeholder:"",defaultValue:o.colors[m],required:!1,onChange:g=>d(g,m)})},`branding-color-${m}`))})}),u.jsx(Qr,{value:2,sx:{px:0},children:u.jsx(I.Box,{children:Object.keys(o.urls).map(m=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{size:"sm",label:c.get(m),placeholder:"",defaultValue:o.urls[m],required:!1,onChange:g=>f(g,m)})},`branding-url-${m}`))})})]})})},Lc=Ve(u.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"),ng=e=>{const t=()=>k(this,null,function*(){yield zi(e.environment).signOut()});return u.jsx(I.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},hP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>u.jsx(u.Fragment,{children:u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?u.jsxs(I.Stack,{direction:"row",alignItems:"center",spacing:2,children:[u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):u.jsx(I.Button,{startDecorator:u.jsx(Lc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?u.jsx(ng,{signOutLabel:n,environment:r}):u.jsx(u.Fragment,{})]})});var rg={},Bc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ei={_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},no={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},zt=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},rn=function(e){return e===!0?1:0};function ig(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var $c=function(e){return e instanceof Array?e:[e]};function Ot(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function Re(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 Xa(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function og(e,t){if(t(e))return e;if(e.parentNode)return og(e.parentNode,t)}function Za(e,t){var n=Re("div","numInputWrapper"),r=Re("input","numInput "+e),i=Re("span","arrowUp"),o=Re("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 Yt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var Nc=function(){},es=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},pP={D:Nc,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*rn(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:Nc,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:Nc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},Cr={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})"},ro={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[ro.w(e,t,n)]},F:function(e,t,n){return es(ro.n(e,t,n)-1,!1,t)},G:function(e,t,n){return zt(ro.h(e,t,n))},H:function(e){return zt(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[rn(e.getHours()>11)]},M:function(e,t){return es(e.getMonth(),!0,t)},S:function(e){return zt(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return zt(e.getFullYear(),4)},d:function(e){return zt(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return zt(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return zt(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)}},ag=function(e){var t=e.config,n=t===void 0?ei:t,r=e.l10n,i=r===void 0?no:r,o=e.isMobile,a=o===void 0?!1:o;return function(l,s,c){var d=c||i;return n.formatDate!==void 0&&!a?n.formatDate(l,s,d):s.split("").map(function(f,h,p){return ro[f]&&p[h-1]!=="\\"?ro[f](l,d,n):f!=="\\"?f:""}).join("")}},Fc=function(e){var t=e.config,n=t===void 0?ei:t,r=e.l10n,i=r===void 0?no:r;return function(o,a,l,s){if(!(o!==0&&!o)){var c=s||i,d,f=o;if(o instanceof Date)d=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)d=new Date(o);else if(typeof o=="string"){var h=a||(n||ei).dateFormat,p=String(o).trim();if(p==="today")d=new Date,l=!0;else if(n&&n.parseDate)d=n.parseDate(o,h);else if(/Z$/.test(p)||/GMT$/.test(p))d=new Date(o);else{for(var m=void 0,g=[],v=0,S=0,w="";v<h.length;v++){var y=h[v],x=y==="\\",b=h[v-1]==="\\"||x;if(Cr[y]&&!b){w+=Cr[y];var T=new RegExp(w).exec(o);T&&(m=!0)&&g[y!=="Y"?"push":"unshift"]({fn:pP[y],val:T[++S]})}else x||(w+=".")}d=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),g.forEach(function(E){var P=E.fn,O=E.val;return d=P(d,O,c)||d}),d=m?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return l===!0&&d.setHours(0,0,0,0),d}}};function Kt(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 gP=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},mP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},vP={DAY:864e5};function jc(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 l=e.maxDate.getHours(),s=e.maxDate.getMinutes();t=Math.min(t,l),t===l&&(n=Math.min(s,n)),t===l&&n===s&&(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(l){l&&Object.keys(l).forEach(function(s){return e[s]=l[s]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var Et=function(){return Et=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},Et.apply(this,arguments)},sg=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,l=o.length;a<l;a++,i++)r[i]=o[a];return r},bP=300;function yP(e,t){var n={config:Et(Et({},ei),dt.defaultConfig),l10n:no};n.parseDate=Fc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=g,n._setHoursFromDate=h,n._positionCalendar=xe,n.changeMonth=R,n.changeYear=ae,n.clear=L,n.close=F,n.onMouseOver=Se,n._createElement=Re,n.createDay=T,n.destroy=V,n.isEnabled=J,n.jumpToDate=w,n.updateValue=un,n.open=wt,n.redraw=Pe,n.set=jt,n.setDate=qt,n.toggle=ku;function r(){n.utils={getDaysInMonth:function(_,M){return _===void 0&&(_=n.currentMonth),M===void 0&&(M=n.currentYear),_===1&&(M%4===0&&M%100!==0||M%400===0)?29:n.l10n.daysInMonth[_]}}}function i(){n.element=n.input=e,n.isOpen=!1,kt(),he(),wn(),Ts(),r(),n.isMobile||b(),S(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),un(!1)),l();var _=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&_&&xe(),ze("onReady")}function o(){var _;return((_=n.calendarContainer)===null||_===void 0?void 0:_.getRootNode()).activeElement||document.activeElement}function a(_){return _.bind(n)}function l(){var _=n.config;_.weekNumbers===!1&&_.showMonths===1||_.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 M=(n.days.offsetWidth+1)*_.showMonths;n.daysContainer.style.width=M+"px",n.calendarContainer.style.width=M+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function s(_){if(n.selectedDates.length===0){var M=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=jc(n.config);M.setHours(K.hours,K.minutes,K.seconds,M.getMilliseconds()),n.selectedDates=[M],n.latestSelectedDateObj=M}_!==void 0&&_.type!=="blur"&&Ct(_);var Q=n._input.value;f(),un(),n._input.value!==Q&&n._debouncedChange()}function c(_,M){return _%12+12*rn(M===n.l10n.amPM[1])}function d(_){switch(_%24){case 0:case 12:return 12;default:return _%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var _=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,M=(parseInt(n.minuteElement.value,10)||0)%60,K=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(_=c(_,n.amPM.textContent));var Q=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.minDate,!0)===0,re=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Kt(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 ce=zc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Ce=zc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ue=zc(_,M,K);if(ue>Ce&&ue<ce){var we=mP(ce);_=we[0],M=we[1],K=we[2]}}else{if(re){var fe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;_=Math.min(_,fe.getHours()),_===fe.getHours()&&(M=Math.min(M,fe.getMinutes())),M===fe.getMinutes()&&(K=Math.min(K,fe.getSeconds()))}if(Q){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;_=Math.max(_,me.getHours()),_===me.getHours()&&M<me.getMinutes()&&(M=me.getMinutes()),M===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(_,M,K)}}function h(_){var M=_||n.latestSelectedDateObj;M&&M instanceof Date&&p(M.getHours(),M.getMinutes(),M.getSeconds())}function p(_,M,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(_%24,M,K||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=zt(n.config.time_24hr?_:(12+_)%12+12*rn(_%12===0)),n.minuteElement.value=zt(M),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[rn(_>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function m(_){var M=Yt(_),K=parseInt(M.value)+(_.delta||0);(K/1e3>1||_.key==="Enter"&&!/[^\d]/.test(K.toString()))&&ae(K)}function g(_,M,K,Q){if(M instanceof Array)return M.forEach(function(re){return g(_,re,K,Q)});if(_ instanceof Array)return _.forEach(function(re){return g(re,M,K,Q)});_.addEventListener(M,K,Q),n._handlers.push({remove:function(){return _.removeEventListener(M,K,Q)}})}function v(){ze("onChange")}function S(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(Q){return g(Q,"click",n[K])})}),n.isMobile){_u();return}var _=ig(Ue,50);if(n._debouncedChange=ig(v,bP),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(n.daysContainer,"mouseover",function(K){n.config.mode==="range"&&Se(Yt(K))}),g(n._input,"keydown",ge),n.calendarContainer!==void 0&&g(n.calendarContainer,"keydown",ge),!n.config.inline&&!n.config.static&&g(window,"resize",_),window.ontouchstart!==void 0?g(window.document,"touchstart",se):g(window.document,"mousedown",se),g(window.document,"focus",se,{capture:!0}),n.config.clickOpens===!0&&(g(n._input,"focus",n.open),g(n._input,"click",n.open)),n.daysContainer!==void 0&&(g(n.monthNav,"click",_s),g(n.monthNav,["keyup","increment"],m),g(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var M=function(K){return Yt(K).select()};g(n.timeContainer,["increment"],s),g(n.timeContainer,"blur",s,{capture:!0}),g(n.timeContainer,"click",y),g([n.hourElement,n.minuteElement],["focus","click"],M),n.secondElement!==void 0&&g(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&g(n.amPM,"click",function(K){s(K)})}n.config.allowInput&&g(n._input,"blur",ne)}function w(_,M){var K=_!==void 0?n.parseDate(_):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),Q=n.currentYear,re=n.currentMonth;try{K!==void 0&&(n.currentYear=K.getFullYear(),n.currentMonth=K.getMonth())}catch(ce){ce.message="Invalid date supplied: "+K,n.config.errorHandler(ce)}M&&n.currentYear!==Q&&(ze("onYearChange"),W()),M&&(n.currentYear!==Q||n.currentMonth!==re)&&ze("onMonthChange"),n.redraw()}function y(_){var M=Yt(_);~M.className.indexOf("arrow")&&x(_,M.classList.contains("arrowUp")?1:-1)}function x(_,M,K){var Q=_&&Yt(_),re=K||Q&&Q.parentNode&&Q.parentNode.firstChild,ce=pi("increment");ce.delta=M,re&&re.dispatchEvent(ce)}function b(){var _=window.document.createDocumentFragment();if(n.calendarContainer=Re("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(_.appendChild($()),n.innerContainer=Re("div","flatpickr-innerContainer"),n.config.weekNumbers){var M=ee(),K=M.weekWrapper,Q=M.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=Q,n.weekWrapper=K}n.rContainer=Re("div","flatpickr-rContainer"),n.rContainer.appendChild(H()),n.daysContainer||(n.daysContainer=Re("div","flatpickr-days"),n.daysContainer.tabIndex=-1),A(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),_.appendChild(n.innerContainer)}n.config.enableTime&&_.appendChild(B()),Ot(n.calendarContainer,"rangeMode",n.config.mode==="range"),Ot(n.calendarContainer,"animate",n.config.animate===!0),Ot(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(_);var re=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&&(!re&&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 ce=Re("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ce,n.element),ce.appendChild(n.element),n.altInput&&ce.appendChild(n.altInput),ce.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function T(_,M,K,Q){var re=J(M,!0),ce=Re("span",_,M.getDate().toString());return ce.dateObj=M,ce.$i=Q,ce.setAttribute("aria-label",n.formatDate(M,n.config.ariaDateFormat)),_.indexOf("hidden")===-1&&Kt(M,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),re?(ce.tabIndex=-1,Io(M)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(M,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(M,n.selectedDates[1],!0)===0),_==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Es(M)&&!Io(M)&&ce.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&_!=="prevMonthDay"&&Q%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(M)+"</span>"),ze("onDayCreate",ce),ce}function E(_){_.focus(),n.config.mode==="range"&&Se(_)}function P(_){for(var M=_>0?0:n.config.showMonths-1,K=_>0?n.config.showMonths:-1,Q=M;Q!=K;Q+=_)for(var re=n.daysContainer.children[Q],ce=_>0?0:re.children.length-1,Ce=_>0?re.children.length:-1,ue=ce;ue!=Ce;ue+=_){var we=re.children[ue];if(we.className.indexOf("hidden")===-1&&J(we.dateObj))return we}}function O(_,M){for(var K=_.className.indexOf("Month")===-1?_.dateObj.getMonth():n.currentMonth,Q=M>0?n.config.showMonths:-1,re=M>0?1:-1,ce=K-n.currentMonth;ce!=Q;ce+=re)for(var Ce=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?_.$i+M:M<0?Ce.children.length-1:0,we=Ce.children.length,fe=ue;fe>=0&&fe<we&&fe!=(M>0?we:-1);fe+=re){var me=Ce.children[fe];if(me.className.indexOf("hidden")===-1&&J(me.dateObj)&&Math.abs(_.$i-fe)>=Math.abs(M))return E(me)}n.changeMonth(re),G(P(re),0)}function G(_,M){var K=o(),Q=le(K||document.body),re=_!==void 0?_:Q?K:n.selectedDateElem!==void 0&&le(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&le(n.todayDateElem)?n.todayDateElem:P(M>0?1:-1);re===void 0?n._input.focus():Q?O(re,M):E(re)}function z(_,M){for(var K=(new Date(_,M,1).getDay()-n.l10n.firstDayOfWeek+7)%7,Q=n.utils.getDaysInMonth((M-1+12)%12,_),re=n.utils.getDaysInMonth(M,_),ce=window.document.createDocumentFragment(),Ce=n.config.showMonths>1,ue=Ce?"prevMonthDay hidden":"prevMonthDay",we=Ce?"nextMonthDay hidden":"nextMonthDay",fe=Q+1-K,me=0;fe<=Q;fe++,me++)ce.appendChild(T("flatpickr-day "+ue,new Date(_,M-1,fe),fe,me));for(fe=1;fe<=re;fe++,me++)ce.appendChild(T("flatpickr-day",new Date(_,M,fe),fe,me));for(var De=re+1;De<=42-K&&(n.config.showMonths===1||me%7!==0);De++,me++)ce.appendChild(T("flatpickr-day "+we,new Date(_,M+1,De%re),De,me));var Pt=Re("div","dayContainer");return Pt.appendChild(ce),Pt}function A(){if(n.daysContainer!==void 0){Xa(n.daysContainer),n.weekNumbers&&Xa(n.weekNumbers);for(var _=document.createDocumentFragment(),M=0;M<n.config.showMonths;M++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+M),_.appendChild(z(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(_),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function W(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var _=function(Q){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&Q<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&Q>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var M=0;M<12;M++)if(_(M)){var K=Re("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,M).getMonth().toString(),K.textContent=es(M,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===M&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function Y(){var _=Re("div","flatpickr-month"),M=window.document.createDocumentFragment(),K;n.config.showMonths>1||n.config.monthSelectorType==="static"?K=Re("span","cur-month"):(n.monthsDropdownContainer=Re("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),g(n.monthsDropdownContainer,"change",function(Ce){var ue=Yt(Ce),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),ze("onMonthChange")}),W(),K=n.monthsDropdownContainer);var Q=Za("cur-year",{tabindex:"-1"}),re=Q.getElementsByTagName("input")[0];re.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&re.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(re.setAttribute("max",n.config.maxDate.getFullYear().toString()),re.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ce=Re("div","flatpickr-current-month");return ce.appendChild(K),ce.appendChild(Q),M.appendChild(ce),_.appendChild(M),{container:_,yearElement:re,monthElement:K}}function N(){Xa(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var _=n.config.showMonths;_--;){var M=Y();n.yearElements.push(M.yearElement),n.monthElements.push(M.monthElement),n.monthNav.appendChild(M.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){return n.monthNav=Re("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Re("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Re("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,N(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(_){n.__hidePrevMonthArrow!==_&&(Ot(n.prevMonthNav,"flatpickr-disabled",_),n.__hidePrevMonthArrow=_)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(_){n.__hideNextMonthArrow!==_&&(Ot(n.nextMonthNav,"flatpickr-disabled",_),n.__hideNextMonthArrow=_)}}),n.currentYearElement=n.yearElements[0],gi(),n.monthNav}function B(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var _=jc(n.config);n.timeContainer=Re("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var M=Re("span","flatpickr-time-separator",":"),K=Za("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var Q=Za("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=Q.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?_.hours:d(_.hours)),n.minuteElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():_.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(K),n.timeContainer.appendChild(M),n.timeContainer.appendChild(Q),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var re=Za("flatpickr-second");n.secondElement=re.getElementsByTagName("input")[0],n.secondElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():_.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(Re("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(re)}return n.config.time_24hr||(n.amPM=Re("span","flatpickr-am-pm",n.l10n.amPM[rn((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 H(){n.weekdayContainer?Xa(n.weekdayContainer):n.weekdayContainer=Re("div","flatpickr-weekdays");for(var _=n.config.showMonths;_--;){var M=Re("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(M)}return q(),n.weekdayContainer}function q(){if(n.weekdayContainer){var _=n.l10n.firstDayOfWeek,M=sg(n.l10n.weekdays.shorthand);_>0&&_<M.length&&(M=sg(M.splice(_,M.length),M.splice(0,_)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2454
2454
|
<span class='flatpickr-weekday'>
|
|
2455
|
-
`+
|
|
2455
|
+
`+M.join("</span><span class='flatpickr-weekday'>")+`
|
|
2456
2456
|
</span>
|
|
2457
|
-
`}}function ee(){n.calendarContainer.classList.add("hasWeeks");var _=Re("div","flatpickr-weekwrapper");_.appendChild(Re("span","flatpickr-weekday",n.l10n.weekAbbreviation));var R=Re("div","flatpickr-weeks");return _.appendChild(R),{weekWrapper:_,weekNumbers:R}}function O(_,R){R===void 0&&(R=!0);var K=R?_:_-n.currentMonth;K<0&&n._hidePrevMonthArrow===!0||K>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=K,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ze("onYearChange"),H()),T(),ze("onMonthChange"),gi())}function M(_,R){if(_===void 0&&(_=!0),R===void 0&&(R=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,R===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var K=jc(n.config),Q=K.hours,re=K.minutes,ce=K.seconds;p(Q,re,ce)}n.redraw(),_&&ze("onChange")}function F(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),ze("onClose")}function j(){n.config!==void 0&&ze("onDestroy");for(var _=n._handlers.length;_--;)n._handlers[_].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 R=n.calendarContainer.parentNode;if(R.lastChild&&R.removeChild(R.lastChild),R.parentNode){for(;R.firstChild;)R.parentNode.insertBefore(R.firstChild,R);R.parentNode.removeChild(R)}}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(K){try{delete n[K]}catch(Q){}})}function te(_){return n.calendarContainer.contains(_)}function se(_){if(n.isOpen&&!n.config.inline){var R=Yt(_),K=te(R),Q=R===n.input||R===n.altInput||n.element.contains(R)||_.path&&_.path.indexOf&&(~_.path.indexOf(n.input)||~_.path.indexOf(n.altInput)),re=!Q&&!K&&!te(_.relatedTarget),ce=!n.config.ignoredFocusElements.some(function(Ce){return Ce.contains(R)});re&&ce&&(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&&s(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(_){if(!(!_||n.config.minDate&&_<n.config.minDate.getFullYear()||n.config.maxDate&&_>n.config.maxDate.getFullYear())){var R=_,K=n.currentYear!==R;n.currentYear=R||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)),K&&(n.redraw(),ze("onYearChange"),H())}}function J(_,R){var K;R===void 0&&(R=!0);var Q=n.parseDate(_,void 0,R);if(n.config.minDate&&Q&&Kt(Q,n.config.minDate,R!==void 0?R:!n.minDateHasTime)<0||n.config.maxDate&&Q&&Kt(Q,n.config.maxDate,R!==void 0?R:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(Q===void 0)return!1;for(var re=!!n.config.enable,ce=(K=n.config.enable)!==null&&K!==void 0?K:n.config.disable,Ce=0,ue=void 0;Ce<ce.length;Ce++){if(ue=ce[Ce],typeof ue=="function"&&ue(Q))return re;if(ue instanceof Date&&Q!==void 0&&ue.getTime()===Q.getTime())return re;if(typeof ue=="string"){var we=n.parseDate(ue,void 0,!0);return we&&we.getTime()===Q.getTime()?re:!re}else if(typeof ue=="object"&&Q!==void 0&&ue.from&&ue.to&&Q.getTime()>=ue.from.getTime()&&Q.getTime()<=ue.to.getTime())return re}return!re}function le(_){return n.daysContainer!==void 0?_.className.indexOf("hidden")===-1&&_.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(_):!1}function ne(_){var R=_.target===n._input,K=n._input.value.trimEnd()!==So();R&&K&&!(_.relatedTarget&&te(_.relatedTarget))&&n.setDate(n._input.value,!0,_.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ge(_){var R=Yt(_),K=n.config.wrap?e.contains(R):R===n._input,Q=n.config.allowInput,re=n.isOpen&&(!Q||!K),ce=n.config.inline&&K&&!Q;if(_.keyCode===13&&K){if(Q)return n.setDate(n._input.value,!0,R===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),R.blur();n.open()}else if(te(R)||re||ce){var Ce=!!n.timeContainer&&n.timeContainer.contains(R);switch(_.keyCode){case 13:Ce?(_.preventDefault(),s(),Ee()):It(_);break;case 27:_.preventDefault(),Ee();break;case 8:case 46:K&&!n.config.allowInput&&(_.preventDefault(),n.clear());break;case 37:case 39:if(!Ce&&!K){_.preventDefault();var ue=o();if(n.daysContainer!==void 0&&(Q===!1||ue&&le(ue))){var we=_.keyCode===39?1:-1;_.ctrlKey?(_.stopPropagation(),O(we),Y(k(1),0)):Y(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:_.preventDefault();var fe=_.keyCode===40?1:-1;n.daysContainer&&R.$i!==void 0||R===n.input||R===n.altInput?_.ctrlKey?(_.stopPropagation(),ae(n.currentYear-fe),Y(k(1),0)):Ce||Y(void 0,fe*7):R===n.currentYearElement?ae(n.currentYear-fe):n.config.enableTime&&(!Ce&&n.hourElement&&n.hourElement.focus(),s(_),n._debouncedChange());break;case 9:if(Ce){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(nt){return nt}),De=me.indexOf(R);if(De!==-1){var Pt=me[De+(_.shiftKey?-1:1)];_.preventDefault(),(Pt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(R)&&_.shiftKey&&(_.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&R===n.amPM)switch(_.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],f(),un();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],f(),un();break}(K||te(R))&&ze("onKeyDown",_)}function Se(_,R){if(R===void 0&&(R="flatpickr-day"),!(n.selectedDates.length!==1||_&&(!_.classList.contains(R)||_.classList.contains("flatpickr-disabled")))){for(var K=_?_.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),Q=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),re=Math.min(K,n.selectedDates[0].getTime()),ce=Math.max(K,n.selectedDates[0].getTime()),Ce=!1,ue=0,we=0,fe=re;fe<ce;fe+=vP.DAY)J(new Date(fe),!0)||(Ce=Ce||fe>re&&fe<ce,fe<Q&&(!ue||fe>ue)?ue=fe:fe>Q&&(!we||fe<we)&&(we=fe));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+R));me.forEach(function(De){var Pt=De.dateObj,nt=Pt.getTime(),dn=ue>0&&nt<ue||we>0&&nt>we;if(dn){De.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(In){De.classList.remove(In)});return}else if(Ce&&!dn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(In){De.classList.remove(In)}),_!==void 0&&(_.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),Q<K&&nt===Q?De.classList.add("startRange"):Q>K&&nt===Q&&De.classList.add("endRange"),nt>=ue&&(we===0||nt<=we)&&gP(nt,Q,K)&&De.classList.add("inRange"))})}}function Ue(){n.isOpen&&!n.config.static&&!n.config.inline&&xe()}function wt(_,R){if(R===void 0&&(R=n._positionElement),n.isMobile===!0){if(_){_.preventDefault();var K=Yt(_);K&&K.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),ze("onOpen");return}else if(n._input.disabled||n.config.inline)return;var Q=n.isOpen;n.isOpen=!0,Q||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),ze("onOpen"),xe(R)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(_===void 0||!n.timeContainer.contains(_.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function at(_){return function(R){var K=n.config["_"+_+"Date"]=n.parseDate(R,n.config.dateFormat),Q=n.config["_"+(_==="min"?"max":"min")+"Date"];K!==void 0&&(n[_==="min"?"minDateHasTime":"maxDateHasTime"]=K.getHours()>0||K.getMinutes()>0||K.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(re){return J(re)}),!n.selectedDates.length&&_==="min"&&h(K),un()),n.daysContainer&&(Pe(),K!==void 0?n.currentYearElement[_]=K.getFullYear().toString():n.currentYearElement.removeAttribute(_),n.currentYearElement.disabled=!!Q&&K!==void 0&&Q.getFullYear()===K.getFullYear())}}function kt(){var _=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],R=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=R.parseDate,n.config.formatDate=R.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=or(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=or(me)}});var Q=R.mode==="time";if(!R.dateFormat&&(R.enableTime||Q)){var re=dt.defaultConfig.dateFormat||ei.dateFormat;K.dateFormat=R.noCalendar||Q?"H:i"+(R.enableSeconds?":S":""):re+" H:i"+(R.enableSeconds?":S":"")}if(R.altInput&&(R.enableTime||Q)&&!R.altFormat){var ce=dt.defaultConfig.altFormat||ei.altFormat;K.altFormat=R.noCalendar||Q?"h:i"+(R.enableSeconds?":S K":" K"):ce+(" h:i"+(R.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:at("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:at("max")});var Ce=function(me){return function(De){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(De,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:Ce("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:Ce("max")}),R.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,R);for(var ue=0;ue<_.length;ue++)n.config[_[ue]]=n.config[_[ue]]===!0||n.config[_[ue]]==="true";Bc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=$c(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 ue=0;ue<n.config.plugins.length;ue++){var we=n.config.plugins[ue](n)||{};for(var fe in we)Bc.indexOf(fe)>-1?n.config[fe]=$c(we[fe]).map(a).concat(n.config[fe]):typeof R[fe]=="undefined"&&(n.config[fe]=we[fe])}R.altInputClass||(n.config.altInputClass=de().className+" "+n.config.altInputClass),ze("onParseConfig")}function de(){return n.config.wrap?e.querySelector("[data-input]"):e}function he(){typeof n.config.locale!="object"&&typeof dt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},dt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?dt.l10ns[n.config.locale]:void 0),Cr.D="("+n.l10n.weekdays.shorthand.join("|")+")",Cr.l="("+n.l10n.weekdays.longhand.join("|")+")",Cr.M="("+n.l10n.months.shorthand.join("|")+")",Cr.F="("+n.l10n.months.longhand.join("|")+")",Cr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var _=Et(Et({},t),JSON.parse(JSON.stringify(e.dataset||{})));_.time_24hr===void 0&&dt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=ag(n),n.parseDate=Fc({config:n.config,l10n:n.l10n})}function xe(_){if(typeof n.config.position=="function")return void n.config.position(n,_);if(n.calendarContainer!==void 0){ze("onPreCalendarPosition");var R=_||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(gF,mF){return gF+mF.offsetHeight},0),Q=n.calendarContainer.offsetWidth,re=n.config.position.split(" "),ce=re[0],Ce=re.length>1?re[1]:null,ue=R.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:R.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var De=window.pageXOffset+ue.left,Pt=!1,nt=!1;Ce==="center"?(De-=(Q-ue.width)/2,Pt=!0):Ce==="right"&&(De-=Q-ue.width,nt=!0),Ot(n.calendarContainer,"arrowLeft",!Pt&&!nt),Ot(n.calendarContainer,"arrowCenter",Pt),Ot(n.calendarContainer,"arrowRight",nt);var dn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),In=De+Q>window.document.body.offsetWidth,lF=dn+Q>window.document.body.offsetWidth;if(Ot(n.calendarContainer,"rightMost",In),!n.config.static)if(n.calendarContainer.style.top=me+"px",!In)n.calendarContainer.style.left=De+"px",n.calendarContainer.style.right="auto";else if(!lF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=dn+"px";else{var Pu=Te();if(Pu===void 0)return;var cF=window.document.body.offsetWidth,uF=Math.max(0,cF/2-Q/2),dF=".flatpickr-calendar.centerMost:before",fF=".flatpickr-calendar.centerMost:after",hF=Pu.cssRules.length,pF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Pu.insertRule(dF+","+fF+pF,hF),n.calendarContainer.style.left=uF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var _=null,R=0;R<document.styleSheets.length;R++){var K=document.styleSheets[R];if(K.cssRules){try{K.cssRules}catch(Q){continue}_=K;break}}return _!=null?_:He()}function He(){var _=document.createElement("style");return document.head.appendChild(_),_.sheet}function Pe(){n.config.noCalendar||n.isMobile||(H(),gi(),T())}function Ee(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function It(_){_.preventDefault(),_.stopPropagation();var R=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=og(Yt(_),R);if(K!==void 0){var Q=K,re=n.latestSelectedDateObj=new Date(Q.dateObj.getTime()),ce=(re.getMonth()<n.currentMonth||re.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=Q,n.config.mode==="single")n.selectedDates=[re];else if(n.config.mode==="multiple"){var Ce=Io(re);Ce?n.selectedDates.splice(parseInt(Ce),1):n.selectedDates.push(re)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=re,n.selectedDates.push(re),Kt(re,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,De){return me.getTime()-De.getTime()}));if(f(),ce){var ue=n.currentYear!==re.getFullYear();n.currentYear=re.getFullYear(),n.currentMonth=re.getMonth(),ue&&(ze("onYearChange"),H()),ze("onMonthChange")}if(gi(),T(),un(),!ce&&n.config.mode!=="range"&&n.config.showMonths===1?E(Q):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 we=n.config.mode==="single"&&!n.config.enableTime,fe=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(we||fe)&&Ee()}v()}}var St={locale:[he,q],showMonths:[$,l,U],minDate:[x],maxDate:[x],positionElement:[wo],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 jt(_,R){if(_!==null&&typeof _=="object"){Object.assign(n.config,_);for(var K in _)St[K]!==void 0&&St[K].forEach(function(Q){return Q()})}else n.config[_]=R,St[_]!==void 0?St[_].forEach(function(Q){return Q()}):Bc.indexOf(_)>-1&&(n.config[_]=$c(R));n.redraw(),un(!0)}function Mt(_,R){var K=[];if(_ instanceof Array)K=_.map(function(Q){return n.parseDate(Q,R)});else if(_ instanceof Date||typeof _=="number")K=[n.parseDate(_,R)];else if(typeof _=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(_,R)];break;case"multiple":K=_.split(n.config.conjunction).map(function(Q){return n.parseDate(Q,R)});break;case"range":K=_.split(n.l10n.rangeSeparator).map(function(Q){return n.parseDate(Q,R)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(_)));n.selectedDates=n.config.allowInvalidPreload?K:K.filter(function(Q){return Q instanceof Date&&J(Q,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(Q,re){return Q.getTime()-re.getTime()})}function qt(_,R,K){if(R===void 0&&(R=!1),K===void 0&&(K=n.config.dateFormat),_!==0&&!_||_ instanceof Array&&_.length===0)return n.clear(R);Mt(_,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),x(void 0,R),h(),n.selectedDates.length===0&&n.clear(!1),un(R),R&&ze("onChange")}function or(_){return _.slice().map(function(R){return typeof R=="string"||typeof R=="number"||R instanceof Date?n.parseDate(R,void 0,!0):R&&typeof R=="object"&&R.from&&R.to?{from:n.parseDate(R.from,void 0),to:n.parseDate(R.to,void 0)}:R}).filter(function(R){return R})}function Ts(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var _=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);_&&Mt(_,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 wn(){if(n.input=de(),!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=Re(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"),wo()}function wo(){n._positionElement=n.config.positionElement||n._input}function _u(){var _=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=Re("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=_,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=_==="datetime-local"?"Y-m-d\\TH:i:S":_==="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(R){}m(n.mobileInput,"change",function(R){n.setDate(Yt(R).value,!1,n.mobileFormatStr),ze("onChange"),ze("onClose")})}function ku(_){if(n.isOpen===!0)return n.close();n.open(_)}function ze(_,R){if(n.config!==void 0){var K=n.config[_];if(K!==void 0&&K.length>0)for(var Q=0;K[Q]&&Q<K.length;Q++)K[Q](n.selectedDates,n.input.value,n,R);_==="onChange"&&(n.input.dispatchEvent(pi("change")),n.input.dispatchEvent(pi("input")))}}function pi(_){var R=document.createEvent("Event");return R.initEvent(_,!0,!0),R}function Io(_){for(var R=0;R<n.selectedDates.length;R++){var K=n.selectedDates[R];if(K instanceof Date&&Kt(K,_)===0)return""+R}return!1}function Es(_){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Kt(_,n.selectedDates[0])>=0&&Kt(_,n.selectedDates[1])<=0}function gi(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(_,R){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+R),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[R].textContent=es(K.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=K.getMonth().toString(),_.value=K.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 So(_){var R=_||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,R)}).filter(function(K,Q,re){return n.config.mode!=="range"||n.config.enableTime||re.indexOf(K)===Q}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function un(_){_===void 0&&(_=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=So(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=So(n.config.altFormat)),_!==!1&&ze("onValueUpdate")}function _s(_){var R=Yt(_),K=n.prevMonthNav.contains(R),Q=n.nextMonthNav.contains(R);K||Q?O(K?-1:1):n.yearElements.indexOf(R)>=0?R.select():R.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):R.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function Ct(_){_.preventDefault();var R=_.type==="keydown",K=Yt(_),Q=K;n.amPM!==void 0&&K===n.amPM&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]);var re=parseFloat(Q.getAttribute("min")),ce=parseFloat(Q.getAttribute("max")),Ce=parseFloat(Q.getAttribute("step")),ue=parseInt(Q.value,10),we=_.delta||(R?_.which===38?1:-1:0),fe=ue+Ce*we;if(typeof Q.value!="undefined"&&Q.value.length===2){var me=Q===n.hourElement,De=Q===n.minuteElement;fe<re?(fe=ce+fe+rn(!me)+(rn(me)&&rn(!n.amPM)),De&&S(void 0,-1,n.hourElement)):fe>ce&&(fe=Q===n.hourElement?fe-ce-rn(!n.amPM):re,De&&S(void 0,1,n.hourElement)),n.amPM&&me&&(Ce===1?fe+ue===23:Math.abs(fe-ue)>Ce)&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]),Q.value=zt(fe)}}return i(),n}function ti(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=yP(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 ti(this,e)},HTMLElement.prototype.flatpickr=function(e){return ti([this],e)});var dt=function(e,t){return typeof e=="string"?ti(window.document.querySelectorAll(e),t):e instanceof Node?ti([e],t):ti(e,t)};dt.defaultConfig={},dt.l10ns={en:Et({},no),default:Et({},no)},dt.localize=function(e){dt.l10ns.default=Et(Et({},dt.l10ns.default),e)},dt.setDefaults=function(e){dt.defaultConfig=Et(Et({},dt.defaultConfig),e)},dt.parseDate=Fc({}),dt.formatDate=ag({}),dt.compareDates=Kt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return ti(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=dt);const xP=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})));(function(e){function t(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(F){return typeof F}:t=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},t(O)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(C),r=o(yI),i=o(xP);function o(O){return O&&O.__esModule?O:{default:O}}function a(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return a=function(){return O},O}function l(O){if(O&&O.__esModule)return O;if(O===null||t(O)!=="object"&&typeof O!="function")return{default:O};var M=a();if(M&&M.has(O))return M.get(O);var F={},j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var te in O)if(Object.prototype.hasOwnProperty.call(O,te)){var se=j?Object.getOwnPropertyDescriptor(O,te):null;se&&(se.get||se.set)?Object.defineProperty(F,te,se):F[te]=O[te]}return F.default=O,M&&M.set(O,F),F}function s(O){return h(O)||f(O)||d(O)||c()}function c(){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 d(O,M){if(O){if(typeof O=="string")return p(O,M);var F=Object.prototype.toString.call(O).slice(8,-1);if(F==="Object"&&O.constructor&&(F=O.constructor.name),F==="Map"||F==="Set")return Array.from(O);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return p(O,M)}}function f(O){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(O))return Array.from(O)}function h(O){if(Array.isArray(O))return p(O)}function p(O,M){(M==null||M>O.length)&&(M=O.length);for(var F=0,j=new Array(M);F<M;F++)j[F]=O[F];return j}function g(){return g=Object.assign||function(O){for(var M=1;M<arguments.length;M++){var F=arguments[M];for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&(O[j]=F[j])}return O},g.apply(this,arguments)}function m(O,M){if(O==null)return{};var F=v(O,M),j,te;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(O);for(te=0;te<se.length;te++)j=se[te],!(M.indexOf(j)>=0)&&Object.prototype.propertyIsEnumerable.call(O,j)&&(F[j]=O[j])}return F}function v(O,M){if(O==null)return{};var F={},j=Object.keys(O),te,se;for(se=0;se<j.length;se++)te=j[se],!(M.indexOf(te)>=0)&&(F[te]=O[te]);return F}function A(O,M){var F=Object.keys(O);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(O);M&&(j=j.filter(function(te){return Object.getOwnPropertyDescriptor(O,te).enumerable})),F.push.apply(F,j)}return F}function x(O){for(var M=1;M<arguments.length;M++){var F=arguments[M]!=null?arguments[M]:{};M%2?A(Object(F),!0).forEach(function(j){H(O,j,F[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(F)):A(Object(F)).forEach(function(j){Object.defineProperty(O,j,Object.getOwnPropertyDescriptor(F,j))})}return O}function b(O,M){if(!(O instanceof M))throw new TypeError("Cannot call a class as a function")}function S(O,M){for(var F=0;F<M.length;F++){var j=M[F];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(O,j.key,j)}}function y(O,M,F){return M&&S(O.prototype,M),O}function w(O,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(M&&M.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),M&&E(O,M)}function E(O,M){return E=Object.setPrototypeOf||function(j,te){return j.__proto__=te,j},E(O,M)}function k(O){var M=W();return function(){var j=T(O),te;if(M){var se=T(this).constructor;te=Reflect.construct(j,arguments,se)}else te=j.apply(this,arguments);return N(this,te)}}function N(O,M){return M&&(t(M)==="object"||typeof M=="function")?M:Y(O)}function Y(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function W(){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(O){return!1}}function T(O){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},T(O)}function H(O,M,F){return M in O?Object.defineProperty(O,M,{value:F,enumerable:!0,configurable:!0,writable:!0}):O[M]=F,O}var G=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],$=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),B=["onCreate","onDestroy"],L=r.default.func,U=function(O){w(F,O);var M=k(F);function F(){var j;b(this,F);for(var te=arguments.length,se=new Array(te),ae=0;ae<te;ae++)se[ae]=arguments[ae];return j=M.call.apply(M,[this].concat(se)),H(Y(j),"createFlatpickrInstance",function(){var J=x({onClose:function(){j.node.blur&&j.node.blur()}},j.props.options);J=q(J,j.props),j.flatpickr=(0,i.default)(j.node,J),j.props.hasOwnProperty("value")&&j.flatpickr.setDate(j.props.value,!1);var le=j.props.onCreate;le&&le(j.flatpickr)}),H(Y(j),"destroyFlatpickrInstance",function(){var J=j.props.onDestroy;J&&J(j.flatpickr),j.flatpickr.destroy(),j.flatpickr=null}),H(Y(j),"handleNodeChange",function(J){j.node=J,j.flatpickr&&(j.destroyFlatpickrInstance(),j.createFlatpickrInstance())}),j}return y(F,[{key:"componentDidUpdate",value:function(te){var se=this.props.options,ae=te.options;se=q(se,this.props),ae=q(ae,te);for(var J=Object.getOwnPropertyNames(se),le=J.length-1;le>=0;le--){var ne=J[le],ge=se[ne];ge!==ae[ne]&&(G.indexOf(ne)!==-1&&!Array.isArray(ge)&&(ge=[ge]),this.flatpickr.set(ne,ge))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&te.value&&Array.isArray(te.value)&&this.props.value.every(function(Se,Ue){te[Ue]}))&&this.props.value!==te.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 te=this.props,se=te.options,ae=te.defaultValue,J=te.value,le=te.children,ne=te.render,ge=m(te,["options","defaultValue","value","children","render"]);return G.forEach(function(Se){delete ge[Se]}),B.forEach(function(Se){delete ge[Se]}),ne?ne(x(x({},ge),{},{defaultValue:ae,value:J}),this.handleNodeChange):se.wrap?n.default.createElement("div",g({},ge,{ref:this.handleNodeChange}),le):n.default.createElement("input",g({},ge,{defaultValue:ae,ref:this.handleNodeChange}))}}]),F}(n.Component);H(U,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:$,onOpen:$,onClose:$,onMonthChange:$,onYearChange:$,onReady:$,onValueUpdate:$,onDayCreate:$,onCreate:L,onDestroy:L,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}),H(U,"defaultProps",{options:{}});function q(O,M){var F=x({},O);return G.forEach(function(j){if(M.hasOwnProperty(j)){var te;F[j]&&!Array.isArray(F[j])?F[j]=[F[j]]:F[j]||(F[j]=[]);var se=Array.isArray(M[j])?M[j]:[M[j]];(te=F[j]).push.apply(te,s(se))}}),F}var ee=U;e.default=ee})(rg);const lg=fn(rg);var cg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",l="minute",s="hour",c="day",d="week",f="month",h="quarter",p="year",g="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|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,x={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(G){var $=["th","st","nd","rd"],B=G%100;return"["+G+($[(B-20)%10]||$[B]||$[0])+"]"}},b=function(G,$,B){var L=String(G);return!L||L.length>=$?G:""+Array($+1-L.length).join(B)+G},S={s:b,z:function(G){var $=-G.utcOffset(),B=Math.abs($),L=Math.floor(B/60),U=B%60;return($<=0?"+":"-")+b(L,2,"0")+":"+b(U,2,"0")},m:function G($,B){if($.date()<B.date())return-G(B,$);var L=12*(B.year()-$.year())+(B.month()-$.month()),U=$.clone().add(L,f),q=B-U<0,ee=$.clone().add(L+(q?-1:1),f);return+(-(L+(B-U)/(q?U-ee:ee-U))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:f,y:p,w:d,d:c,D:g,h:s,m:l,s:a,ms:o,Q:h}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},y="en",w={};w[y]=x;var E="$isDayjsObject",k=function(G){return G instanceof T||!(!G||!G[E])},N=function G($,B,L){var U;if(!$)return y;if(typeof $=="string"){var q=$.toLowerCase();w[q]&&(U=q),B&&(w[q]=B,U=q);var ee=$.split("-");if(!U&&ee.length>1)return G(ee[0])}else{var O=$.name;w[O]=$,U=O}return!L&&U&&(y=U),U||!L&&y},Y=function(G,$){if(k(G))return G.clone();var B=typeof $=="object"?$:{};return B.date=G,B.args=arguments,new T(B)},W=S;W.l=N,W.i=k,W.w=function(G,$){return Y(G,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var T=function(){function G(B){this.$L=N(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[E]=!0}var $=G.prototype;return $.parse=function(B){this.$d=function(L){var U=L.date,q=L.utc;if(U===null)return new Date(NaN);if(W.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var ee=U.match(v);if(ee){var O=ee[2]-1||0,M=(ee[7]||"0").substring(0,3);return q?new Date(Date.UTC(ee[1],O,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,M)):new Date(ee[1],O,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,M)}}return new Date(U)}(B),this.init()},$.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},$.$utils=function(){return W},$.isValid=function(){return this.$d.toString()!==m},$.isSame=function(B,L){var U=Y(B);return this.startOf(L)<=U&&U<=this.endOf(L)},$.isAfter=function(B,L){return Y(B)<this.startOf(L)},$.isBefore=function(B,L){return this.endOf(L)<Y(B)},$.$g=function(B,L,U){return W.u(B)?this[L]:this.set(U,B)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(B,L){var U=this,q=!!W.u(L)||L,ee=W.p(B),O=function(le,ne){var ge=W.w(U.$u?Date.UTC(U.$y,ne,le):new Date(U.$y,ne,le),U);return q?ge:ge.endOf(c)},M=function(le,ne){return W.w(U.toDate()[le].apply(U.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(ne)),U)},F=this.$W,j=this.$M,te=this.$D,se="set"+(this.$u?"UTC":"");switch(ee){case p:return q?O(1,0):O(31,11);case f:return q?O(1,j):O(0,j+1);case d:var ae=this.$locale().weekStart||0,J=(F<ae?F+7:F)-ae;return O(q?te-J:te+(6-J),j);case c:case g:return M(se+"Hours",0);case s:return M(se+"Minutes",1);case l:return M(se+"Seconds",2);case a:return M(se+"Milliseconds",3);default:return this.clone()}},$.endOf=function(B){return this.startOf(B,!1)},$.$set=function(B,L){var U,q=W.p(B),ee="set"+(this.$u?"UTC":""),O=(U={},U[c]=ee+"Date",U[g]=ee+"Date",U[f]=ee+"Month",U[p]=ee+"FullYear",U[s]=ee+"Hours",U[l]=ee+"Minutes",U[a]=ee+"Seconds",U[o]=ee+"Milliseconds",U)[q],M=q===c?this.$D+(L-this.$W):L;if(q===f||q===p){var F=this.clone().set(g,1);F.$d[O](M),F.init(),this.$d=F.set(g,Math.min(this.$D,F.daysInMonth())).$d}else O&&this.$d[O](M);return this.init(),this},$.set=function(B,L){return this.clone().$set(B,L)},$.get=function(B){return this[W.p(B)]()},$.add=function(B,L){var U,q=this;B=Number(B);var ee=W.p(L),O=function(j){var te=Y(q);return W.w(te.date(te.date()+Math.round(j*B)),q)};if(ee===f)return this.set(f,this.$M+B);if(ee===p)return this.set(p,this.$y+B);if(ee===c)return O(1);if(ee===d)return O(7);var M=(U={},U[l]=r,U[s]=i,U[a]=n,U)[ee]||1,F=this.$d.getTime()+B*M;return W.w(F,this)},$.subtract=function(B,L){return this.add(-1*B,L)},$.format=function(B){var L=this,U=this.$locale();if(!this.isValid())return U.invalidDate||m;var q=B||"YYYY-MM-DDTHH:mm:ssZ",ee=W.z(this),O=this.$H,M=this.$m,F=this.$M,j=U.weekdays,te=U.months,se=U.meridiem,ae=function(ne,ge,Se,Ue){return ne&&(ne[ge]||ne(L,q))||Se[ge].slice(0,Ue)},J=function(ne){return W.s(O%12||12,ne,"0")},le=se||function(ne,ge,Se){var Ue=ne<12?"AM":"PM";return Se?Ue.toLowerCase():Ue};return q.replace(A,function(ne,ge){return ge||function(Se){switch(Se){case"YY":return String(L.$y).slice(-2);case"YYYY":return W.s(L.$y,4,"0");case"M":return F+1;case"MM":return W.s(F+1,2,"0");case"MMM":return ae(U.monthsShort,F,te,3);case"MMMM":return ae(te,F);case"D":return L.$D;case"DD":return W.s(L.$D,2,"0");case"d":return String(L.$W);case"dd":return ae(U.weekdaysMin,L.$W,j,2);case"ddd":return ae(U.weekdaysShort,L.$W,j,3);case"dddd":return j[L.$W];case"H":return String(O);case"HH":return W.s(O,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return le(O,M,!0);case"A":return le(O,M,!1);case"m":return String(M);case"mm":return W.s(M,2,"0");case"s":return String(L.$s);case"ss":return W.s(L.$s,2,"0");case"SSS":return W.s(L.$ms,3,"0");case"Z":return ee}return null}(ne)||ee.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(B,L,U){var q,ee=this,O=W.p(L),M=Y(B),F=(M.utcOffset()-this.utcOffset())*r,j=this-M,te=function(){return W.m(ee,M)};switch(O){case p:q=te()/12;break;case f:q=te();break;case h:q=te()/3;break;case d:q=(j-F)/6048e5;break;case c:q=(j-F)/864e5;break;case s:q=j/i;break;case l:q=j/r;break;case a:q=j/n;break;default:q=j}return U?q:W.a(q)},$.daysInMonth=function(){return this.endOf(f).$D},$.$locale=function(){return w[this.$L]},$.locale=function(B,L){if(!B)return this.$L;var U=this.clone(),q=N(B,L,!0);return q&&(U.$L=q),U},$.clone=function(){return W.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},G}(),H=T.prototype;return Y.prototype=H,[["$ms",o],["$s",a],["$m",l],["$H",s],["$W",c],["$M",f],["$y",p],["$D",g]].forEach(function(G){H[G[1]]=function($){return this.$g($,G[0],G[1])}}),Y.extend=function(G,$){return G.$i||(G($,T,Y),G.$i=!0),Y},Y.locale=N,Y.isDayjs=k,Y.unix=function(G){return Y(1e3*G)},Y.en=w[y],Y.Ls=w,Y.p={},Y})})(cg);var CP=cg.exports;const _t=fn(CP);var ug={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,a){var l,s=function(h,p,g){g===void 0&&(g={});var m=new Date(h),v=function(A,x){x===void 0&&(x={});var b=x.timeZoneName||"short",S=A+"|"+b,y=r[S];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:A,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:b}),r[S]=y),y}(p,g);return v.formatToParts(m)},c=function(h,p){for(var g=s(h,p),m=[],v=0;v<g.length;v+=1){var A=g[v],x=A.type,b=A.value,S=n[x];S>=0&&(m[S]=parseInt(b,10))}var y=m[3],w=y===24?0:y,E=m[0]+"-"+m[1]+"-"+m[2]+" "+w+":"+m[4]+":"+m[5]+":000",k=+h;return(a.utc(E).valueOf()-(k-=k%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=l);var g,m=this.utcOffset(),v=this.toDate(),A=v.toLocaleString("en-US",{timeZone:h}),x=Math.round((v-new Date(A))/1e3/60),b=15*-Math.round(v.getTimezoneOffset()/15)-x;if(!Number(b))g=this.utcOffset(0,p);else if(g=a(A,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(b,!0),p){var S=g.utcOffset();g=g.add(m-S,"minute")}return g.$x.$timezone=h,g},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),g=s(this.valueOf(),p,{timeZoneName:h}).find(function(m){return m.type.toLowerCase()==="timezonename"});return g&&g.value};var f=d.startOf;d.startOf=function(h,p){if(!this.$x||!this.$x.$timezone)return f.call(this,h,p);var g=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(g,h,p).tz(this.$x.$timezone,!0)},a.tz=function(h,p,g){var m=g&&p,v=g||p||l,A=c(+a(),v);if(typeof h!="string")return a(h).tz(v);var x=function(w,E,k){var N=w-60*E*1e3,Y=c(N,k);if(E===Y)return[N,E];var W=c(N-=60*(Y-E)*1e3,k);return Y===W?[N,Y]:[w-60*Math.min(Y,W)*1e3,Math.max(Y,W)]}(a.utc(h,m).valueOf(),A,v),b=x[0],S=x[1],y=a(b).utcOffset(S);return y.$x.$timezone=v,y},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){l=h}}})})(ug);var wP=ug.exports;const IP=fn(wP);var dg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,l){var s=a.prototype;l.utc=function(m){var v={date:m,utc:!0,args:arguments};return new a(v)},s.utc=function(m){var v=l(this.toDate(),{locale:this.$L,utc:!0});return m?v.add(this.utcOffset(),n):v},s.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var c=s.parse;s.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var d=s.init;s.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 d.call(this)};var f=s.utcOffset;s.utcOffset=function(m,v){var A=this.$utils().u;if(A(m))return this.$u?0:A(this.$offset)?f.call(this):this.$offset;if(typeof m=="string"&&(m=function(y){y===void 0&&(y="");var w=y.match(r);if(!w)return null;var E=(""+w[0]).match(i)||["-",0,0],k=E[0],N=60*+E[1]+ +E[2];return N===0?0:k==="+"?N:-N}(m),m===null))return this;var x=Math.abs(m)<=16?60*m:m,b=this;if(v)return b.$offset=x,b.$u=m===0,b;if(m!==0){var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(x+S,n)).$offset=x,b.$x.$localOffset=S}else b=this.utc();return b};var h=s.format;s.format=function(m){var v=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},s.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var p=s.toDate;s.toDate=function(m){return m==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var g=s.diff;s.diff=function(m,v,A){if(m&&this.$u===m.$u)return g.call(this,m,v,A);var x=this.local(),b=l(m).local();return g.call(x,b,v,A)}}})})(dg);var SP=dg.exports;const AP=fn(SP);_t.extend(IP),_t.extend(AP);const TP=e=>{if(!_t(e).isAfter(_t(Date.now()).subtract(15,"minute")))return _t(Date.now()).add(15,"minute").toDate()},Vc=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const l=_t.utc(a[0]).toISOString();i(l)}else i("")};return u.jsx(I.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:u.jsx(lg,{value:e&&_t(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||TP(e),maxDate:n,parseDate:(a,l)=>_t(a,l).toDate(),formatDate:(a,l)=>_t(a).format(l),time_24hr:!0,minuteIncrement:1}})})},EP=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return u.jsxs(I.Box,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormControl,{children:u.jsx(I.FormLabel,{required:e,color:"primary",children:"Duration"})}),u.jsxs(I.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[u.jsx(to,{label:"From date",defaultValue:i,required:e,onChange:n}),u.jsx(to,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},fg=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(_t(t).toDate()),n&&r.push(_t(n).toDate()),r},_P=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=C.useState(fg(t)),[a,l]=C.useState(!1),s=()=>l(!a),c=d=>{if(d&&d.length>0){const f="YYYY-MM-DD",h=_t(d[0]).format(f),p=_t(d[1]).format(f);r({from:h,to:p})}else d&&d.length===0&&(r({from:"",to:""}),s());o(d)};return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:n,color:"primary",children:e}),u.jsx(I.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:u.jsx(lg,{value:i,onChange:c,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(d,f)=>_t(d,f).toDate(),formatDate:(d,f)=>_t(d).format(f),defaultDate:fg(t)||void 0}})}),u.jsx(ut,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:s})]})},kP=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{zi(e).signOut().then(()=>n(null)).catch(l=>{console.error("There was a problem logging out the user:",l)})};return u.jsx(I.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:u.jsx(I.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:u.jsxs(I.CardContent,{children:[u.jsx(I.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),u.jsx(I.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),u.jsx(I.Box,{display:"flex",justifyContent:"center",children:u.jsx(I.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},hg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],Uc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),PP=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=C.useState(hg(n)),[a,l]=C.useState(null),[s,c]=C.useState(""),[d,f]=C.useState(""),[h,p]=C.useState(""),[g,m]=C.useState("");C.useEffect(()=>o(hg(n)),[n]);const v=()=>{const S=[...i];S.push({key:s,value:h}),o(S),c(""),p(""),r(Uc(S))},A=S=>{const y=i.filter((w,E)=>E!==S);o(y),r(Uc(y))},x=(S,y)=>{f(y.key),m(y.value),l(S)},b=S=>{const y=[...i];y[S]={key:d,value:g},o(y),l(null),f(""),m(""),r(Uc(y))};return u.jsxs(I.Box,{children:[i.map((S,y)=>u.jsx(I.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(I.CardContent,{style:{flex:1},children:a===y?u.jsxs(I.Box,{display:"flex",alignItems:"center",children:[u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:w=>f(w.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:g,onChange:w=>m(w.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Tooltip,{title:e.save,children:d&&g?u.jsx(I.IconButton,{onClick:()=>b(y),children:u.jsx(Le.Check,{})}):u.jsx("span",{children:u.jsx(I.IconButton,{disabled:!0,children:u.jsx(Le.Check,{})})})})]}):u.jsxs(I.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:S.key})]}),u.jsxs(I.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:S.value})]})]}),u.jsxs(I.Box,{children:[u.jsx(I.Tooltip,{title:e.edit,children:u.jsx(I.IconButton,{onClick:()=>x(y,S),children:u.jsx(Le.Edit,{})})}),u.jsx(I.Tooltip,{title:e.delete,children:u.jsx(I.IconButton,{onClick:()=>A(y),children:u.jsx(Le.Delete,{})})})]})]})})},`dynamic-fields-${t}-${y}`)),u.jsxs(I.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",value:s,placeholder:e.keyDynamicFields,onChange:S=>c(S.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:S=>p(S.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Tooltip,{title:e.add,children:s&&h?u.jsx(I.Button,{onClick:v,children:u.jsx(Le.Add,{})}):u.jsx("span",{children:u.jsx(I.Button,{disabled:!0,children:u.jsx(Le.Add,{})})})})]})]})};function io(e,t,n){return(t=Kl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pg(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 ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pg(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gg(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,Kl(r.key),r)}}function OP(e,t,n){return t&&gg(e.prototype,t),n&&gg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hc(e,t){return Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hc(e,t)}function RP(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&&Hc(e,t)}function ts(e){return ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ts(e)}function mg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mg=function(){return!!e})()}function MP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LP(e,t){if(t&&(vr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MP(e)}function BP(e){var t=mg();return function(){var n,r=ts(e);if(t){var i=ts(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LP(this,n)}}function Wc(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 $P(e){if(Array.isArray(e))return Wc(e)}function NP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vg(e,t){if(e){if(typeof e=="string")return Wc(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)?Wc(e,t):void 0}}function FP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2457
|
+
`}}function ee(){n.calendarContainer.classList.add("hasWeeks");var _=Re("div","flatpickr-weekwrapper");_.appendChild(Re("span","flatpickr-weekday",n.l10n.weekAbbreviation));var M=Re("div","flatpickr-weeks");return _.appendChild(M),{weekWrapper:_,weekNumbers:M}}function R(_,M){M===void 0&&(M=!0);var K=M?_:_-n.currentMonth;K<0&&n._hidePrevMonthArrow===!0||K>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=K,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ze("onYearChange"),W()),A(),ze("onMonthChange"),gi())}function L(_,M){if(_===void 0&&(_=!0),M===void 0&&(M=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,M===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var K=jc(n.config),Q=K.hours,re=K.minutes,ce=K.seconds;p(Q,re,ce)}n.redraw(),_&&ze("onChange")}function F(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),ze("onClose")}function V(){n.config!==void 0&&ze("onDestroy");for(var _=n._handlers.length;_--;)n._handlers[_].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 M=n.calendarContainer.parentNode;if(M.lastChild&&M.removeChild(M.lastChild),M.parentNode){for(;M.firstChild;)M.parentNode.insertBefore(M.firstChild,M);M.parentNode.removeChild(M)}}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(K){try{delete n[K]}catch(Q){}})}function te(_){return n.calendarContainer.contains(_)}function se(_){if(n.isOpen&&!n.config.inline){var M=Yt(_),K=te(M),Q=M===n.input||M===n.altInput||n.element.contains(M)||_.path&&_.path.indexOf&&(~_.path.indexOf(n.input)||~_.path.indexOf(n.altInput)),re=!Q&&!K&&!te(_.relatedTarget),ce=!n.config.ignoredFocusElements.some(function(Ce){return Ce.contains(M)});re&&ce&&(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&&s(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(_){if(!(!_||n.config.minDate&&_<n.config.minDate.getFullYear()||n.config.maxDate&&_>n.config.maxDate.getFullYear())){var M=_,K=n.currentYear!==M;n.currentYear=M||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)),K&&(n.redraw(),ze("onYearChange"),W())}}function J(_,M){var K;M===void 0&&(M=!0);var Q=n.parseDate(_,void 0,M);if(n.config.minDate&&Q&&Kt(Q,n.config.minDate,M!==void 0?M:!n.minDateHasTime)<0||n.config.maxDate&&Q&&Kt(Q,n.config.maxDate,M!==void 0?M:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(Q===void 0)return!1;for(var re=!!n.config.enable,ce=(K=n.config.enable)!==null&&K!==void 0?K:n.config.disable,Ce=0,ue=void 0;Ce<ce.length;Ce++){if(ue=ce[Ce],typeof ue=="function"&&ue(Q))return re;if(ue instanceof Date&&Q!==void 0&&ue.getTime()===Q.getTime())return re;if(typeof ue=="string"){var we=n.parseDate(ue,void 0,!0);return we&&we.getTime()===Q.getTime()?re:!re}else if(typeof ue=="object"&&Q!==void 0&&ue.from&&ue.to&&Q.getTime()>=ue.from.getTime()&&Q.getTime()<=ue.to.getTime())return re}return!re}function le(_){return n.daysContainer!==void 0?_.className.indexOf("hidden")===-1&&_.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(_):!1}function ne(_){var M=_.target===n._input,K=n._input.value.trimEnd()!==So();M&&K&&!(_.relatedTarget&&te(_.relatedTarget))&&n.setDate(n._input.value,!0,_.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ge(_){var M=Yt(_),K=n.config.wrap?e.contains(M):M===n._input,Q=n.config.allowInput,re=n.isOpen&&(!Q||!K),ce=n.config.inline&&K&&!Q;if(_.keyCode===13&&K){if(Q)return n.setDate(n._input.value,!0,M===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),M.blur();n.open()}else if(te(M)||re||ce){var Ce=!!n.timeContainer&&n.timeContainer.contains(M);switch(_.keyCode){case 13:Ce?(_.preventDefault(),s(),Ee()):It(_);break;case 27:_.preventDefault(),Ee();break;case 8:case 46:K&&!n.config.allowInput&&(_.preventDefault(),n.clear());break;case 37:case 39:if(!Ce&&!K){_.preventDefault();var ue=o();if(n.daysContainer!==void 0&&(Q===!1||ue&&le(ue))){var we=_.keyCode===39?1:-1;_.ctrlKey?(_.stopPropagation(),R(we),G(P(1),0)):G(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:_.preventDefault();var fe=_.keyCode===40?1:-1;n.daysContainer&&M.$i!==void 0||M===n.input||M===n.altInput?_.ctrlKey?(_.stopPropagation(),ae(n.currentYear-fe),G(P(1),0)):Ce||G(void 0,fe*7):M===n.currentYearElement?ae(n.currentYear-fe):n.config.enableTime&&(!Ce&&n.hourElement&&n.hourElement.focus(),s(_),n._debouncedChange());break;case 9:if(Ce){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(nt){return nt}),De=me.indexOf(M);if(De!==-1){var Pt=me[De+(_.shiftKey?-1:1)];_.preventDefault(),(Pt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(M)&&_.shiftKey&&(_.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&M===n.amPM)switch(_.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],f(),un();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],f(),un();break}(K||te(M))&&ze("onKeyDown",_)}function Se(_,M){if(M===void 0&&(M="flatpickr-day"),!(n.selectedDates.length!==1||_&&(!_.classList.contains(M)||_.classList.contains("flatpickr-disabled")))){for(var K=_?_.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),Q=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),re=Math.min(K,n.selectedDates[0].getTime()),ce=Math.max(K,n.selectedDates[0].getTime()),Ce=!1,ue=0,we=0,fe=re;fe<ce;fe+=vP.DAY)J(new Date(fe),!0)||(Ce=Ce||fe>re&&fe<ce,fe<Q&&(!ue||fe>ue)?ue=fe:fe>Q&&(!we||fe<we)&&(we=fe));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+M));me.forEach(function(De){var Pt=De.dateObj,nt=Pt.getTime(),dn=ue>0&&nt<ue||we>0&&nt>we;if(dn){De.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(In){De.classList.remove(In)});return}else if(Ce&&!dn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(In){De.classList.remove(In)}),_!==void 0&&(_.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),Q<K&&nt===Q?De.classList.add("startRange"):Q>K&&nt===Q&&De.classList.add("endRange"),nt>=ue&&(we===0||nt<=we)&&gP(nt,Q,K)&&De.classList.add("inRange"))})}}function Ue(){n.isOpen&&!n.config.static&&!n.config.inline&&xe()}function wt(_,M){if(M===void 0&&(M=n._positionElement),n.isMobile===!0){if(_){_.preventDefault();var K=Yt(_);K&&K.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),ze("onOpen");return}else if(n._input.disabled||n.config.inline)return;var Q=n.isOpen;n.isOpen=!0,Q||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),ze("onOpen"),xe(M)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(_===void 0||!n.timeContainer.contains(_.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function at(_){return function(M){var K=n.config["_"+_+"Date"]=n.parseDate(M,n.config.dateFormat),Q=n.config["_"+(_==="min"?"max":"min")+"Date"];K!==void 0&&(n[_==="min"?"minDateHasTime":"maxDateHasTime"]=K.getHours()>0||K.getMinutes()>0||K.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(re){return J(re)}),!n.selectedDates.length&&_==="min"&&h(K),un()),n.daysContainer&&(Pe(),K!==void 0?n.currentYearElement[_]=K.getFullYear().toString():n.currentYearElement.removeAttribute(_),n.currentYearElement.disabled=!!Q&&K!==void 0&&Q.getFullYear()===K.getFullYear())}}function kt(){var _=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],M=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=M.parseDate,n.config.formatDate=M.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=or(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=or(me)}});var Q=M.mode==="time";if(!M.dateFormat&&(M.enableTime||Q)){var re=dt.defaultConfig.dateFormat||ei.dateFormat;K.dateFormat=M.noCalendar||Q?"H:i"+(M.enableSeconds?":S":""):re+" H:i"+(M.enableSeconds?":S":"")}if(M.altInput&&(M.enableTime||Q)&&!M.altFormat){var ce=dt.defaultConfig.altFormat||ei.altFormat;K.altFormat=M.noCalendar||Q?"h:i"+(M.enableSeconds?":S K":" K"):ce+(" h:i"+(M.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:at("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:at("max")});var Ce=function(me){return function(De){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(De,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:Ce("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:Ce("max")}),M.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,M);for(var ue=0;ue<_.length;ue++)n.config[_[ue]]=n.config[_[ue]]===!0||n.config[_[ue]]==="true";Bc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=$c(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 ue=0;ue<n.config.plugins.length;ue++){var we=n.config.plugins[ue](n)||{};for(var fe in we)Bc.indexOf(fe)>-1?n.config[fe]=$c(we[fe]).map(a).concat(n.config[fe]):typeof M[fe]=="undefined"&&(n.config[fe]=we[fe])}M.altInputClass||(n.config.altInputClass=de().className+" "+n.config.altInputClass),ze("onParseConfig")}function de(){return n.config.wrap?e.querySelector("[data-input]"):e}function he(){typeof n.config.locale!="object"&&typeof dt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},dt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?dt.l10ns[n.config.locale]:void 0),Cr.D="("+n.l10n.weekdays.shorthand.join("|")+")",Cr.l="("+n.l10n.weekdays.longhand.join("|")+")",Cr.M="("+n.l10n.months.shorthand.join("|")+")",Cr.F="("+n.l10n.months.longhand.join("|")+")",Cr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var _=Et(Et({},t),JSON.parse(JSON.stringify(e.dataset||{})));_.time_24hr===void 0&&dt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=ag(n),n.parseDate=Fc({config:n.config,l10n:n.l10n})}function xe(_){if(typeof n.config.position=="function")return void n.config.position(n,_);if(n.calendarContainer!==void 0){ze("onPreCalendarPosition");var M=_||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(gF,mF){return gF+mF.offsetHeight},0),Q=n.calendarContainer.offsetWidth,re=n.config.position.split(" "),ce=re[0],Ce=re.length>1?re[1]:null,ue=M.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:M.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var De=window.pageXOffset+ue.left,Pt=!1,nt=!1;Ce==="center"?(De-=(Q-ue.width)/2,Pt=!0):Ce==="right"&&(De-=Q-ue.width,nt=!0),Ot(n.calendarContainer,"arrowLeft",!Pt&&!nt),Ot(n.calendarContainer,"arrowCenter",Pt),Ot(n.calendarContainer,"arrowRight",nt);var dn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),In=De+Q>window.document.body.offsetWidth,lF=dn+Q>window.document.body.offsetWidth;if(Ot(n.calendarContainer,"rightMost",In),!n.config.static)if(n.calendarContainer.style.top=me+"px",!In)n.calendarContainer.style.left=De+"px",n.calendarContainer.style.right="auto";else if(!lF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=dn+"px";else{var Pu=Te();if(Pu===void 0)return;var cF=window.document.body.offsetWidth,uF=Math.max(0,cF/2-Q/2),dF=".flatpickr-calendar.centerMost:before",fF=".flatpickr-calendar.centerMost:after",hF=Pu.cssRules.length,pF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Pu.insertRule(dF+","+fF+pF,hF),n.calendarContainer.style.left=uF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var _=null,M=0;M<document.styleSheets.length;M++){var K=document.styleSheets[M];if(K.cssRules){try{K.cssRules}catch(Q){continue}_=K;break}}return _!=null?_:He()}function He(){var _=document.createElement("style");return document.head.appendChild(_),_.sheet}function Pe(){n.config.noCalendar||n.isMobile||(W(),gi(),A())}function Ee(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function It(_){_.preventDefault(),_.stopPropagation();var M=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=og(Yt(_),M);if(K!==void 0){var Q=K,re=n.latestSelectedDateObj=new Date(Q.dateObj.getTime()),ce=(re.getMonth()<n.currentMonth||re.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=Q,n.config.mode==="single")n.selectedDates=[re];else if(n.config.mode==="multiple"){var Ce=Io(re);Ce?n.selectedDates.splice(parseInt(Ce),1):n.selectedDates.push(re)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=re,n.selectedDates.push(re),Kt(re,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,De){return me.getTime()-De.getTime()}));if(f(),ce){var ue=n.currentYear!==re.getFullYear();n.currentYear=re.getFullYear(),n.currentMonth=re.getMonth(),ue&&(ze("onYearChange"),W()),ze("onMonthChange")}if(gi(),A(),un(),!ce&&n.config.mode!=="range"&&n.config.showMonths===1?E(Q):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 we=n.config.mode==="single"&&!n.config.enableTime,fe=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(we||fe)&&Ee()}v()}}var St={locale:[he,q],showMonths:[N,l,H],minDate:[w],maxDate:[w],positionElement:[wo],clickOpens:[function(){n.config.clickOpens===!0?(g(n._input,"focus",n.open),g(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function jt(_,M){if(_!==null&&typeof _=="object"){Object.assign(n.config,_);for(var K in _)St[K]!==void 0&&St[K].forEach(function(Q){return Q()})}else n.config[_]=M,St[_]!==void 0?St[_].forEach(function(Q){return Q()}):Bc.indexOf(_)>-1&&(n.config[_]=$c(M));n.redraw(),un(!0)}function Mt(_,M){var K=[];if(_ instanceof Array)K=_.map(function(Q){return n.parseDate(Q,M)});else if(_ instanceof Date||typeof _=="number")K=[n.parseDate(_,M)];else if(typeof _=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(_,M)];break;case"multiple":K=_.split(n.config.conjunction).map(function(Q){return n.parseDate(Q,M)});break;case"range":K=_.split(n.l10n.rangeSeparator).map(function(Q){return n.parseDate(Q,M)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(_)));n.selectedDates=n.config.allowInvalidPreload?K:K.filter(function(Q){return Q instanceof Date&&J(Q,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(Q,re){return Q.getTime()-re.getTime()})}function qt(_,M,K){if(M===void 0&&(M=!1),K===void 0&&(K=n.config.dateFormat),_!==0&&!_||_ instanceof Array&&_.length===0)return n.clear(M);Mt(_,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,M),h(),n.selectedDates.length===0&&n.clear(!1),un(M),M&&ze("onChange")}function or(_){return _.slice().map(function(M){return typeof M=="string"||typeof M=="number"||M instanceof Date?n.parseDate(M,void 0,!0):M&&typeof M=="object"&&M.from&&M.to?{from:n.parseDate(M.from,void 0),to:n.parseDate(M.to,void 0)}:M}).filter(function(M){return M})}function Ts(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var _=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);_&&Mt(_,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 wn(){if(n.input=de(),!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=Re(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"),wo()}function wo(){n._positionElement=n.config.positionElement||n._input}function _u(){var _=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=Re("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=_,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=_==="datetime-local"?"Y-m-d\\TH:i:S":_==="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(M){}g(n.mobileInput,"change",function(M){n.setDate(Yt(M).value,!1,n.mobileFormatStr),ze("onChange"),ze("onClose")})}function ku(_){if(n.isOpen===!0)return n.close();n.open(_)}function ze(_,M){if(n.config!==void 0){var K=n.config[_];if(K!==void 0&&K.length>0)for(var Q=0;K[Q]&&Q<K.length;Q++)K[Q](n.selectedDates,n.input.value,n,M);_==="onChange"&&(n.input.dispatchEvent(pi("change")),n.input.dispatchEvent(pi("input")))}}function pi(_){var M=document.createEvent("Event");return M.initEvent(_,!0,!0),M}function Io(_){for(var M=0;M<n.selectedDates.length;M++){var K=n.selectedDates[M];if(K instanceof Date&&Kt(K,_)===0)return""+M}return!1}function Es(_){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Kt(_,n.selectedDates[0])>=0&&Kt(_,n.selectedDates[1])<=0}function gi(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(_,M){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+M),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[M].textContent=es(K.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=K.getMonth().toString(),_.value=K.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 So(_){var M=_||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,M)}).filter(function(K,Q,re){return n.config.mode!=="range"||n.config.enableTime||re.indexOf(K)===Q}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function un(_){_===void 0&&(_=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=So(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=So(n.config.altFormat)),_!==!1&&ze("onValueUpdate")}function _s(_){var M=Yt(_),K=n.prevMonthNav.contains(M),Q=n.nextMonthNav.contains(M);K||Q?R(K?-1:1):n.yearElements.indexOf(M)>=0?M.select():M.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):M.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function Ct(_){_.preventDefault();var M=_.type==="keydown",K=Yt(_),Q=K;n.amPM!==void 0&&K===n.amPM&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]);var re=parseFloat(Q.getAttribute("min")),ce=parseFloat(Q.getAttribute("max")),Ce=parseFloat(Q.getAttribute("step")),ue=parseInt(Q.value,10),we=_.delta||(M?_.which===38?1:-1:0),fe=ue+Ce*we;if(typeof Q.value!="undefined"&&Q.value.length===2){var me=Q===n.hourElement,De=Q===n.minuteElement;fe<re?(fe=ce+fe+rn(!me)+(rn(me)&&rn(!n.amPM)),De&&x(void 0,-1,n.hourElement)):fe>ce&&(fe=Q===n.hourElement?fe-ce-rn(!n.amPM):re,De&&x(void 0,1,n.hourElement)),n.amPM&&me&&(Ce===1?fe+ue===23:Math.abs(fe-ue)>Ce)&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]),Q.value=zt(fe)}}return i(),n}function ti(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=yP(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 ti(this,e)},HTMLElement.prototype.flatpickr=function(e){return ti([this],e)});var dt=function(e,t){return typeof e=="string"?ti(window.document.querySelectorAll(e),t):e instanceof Node?ti([e],t):ti(e,t)};dt.defaultConfig={},dt.l10ns={en:Et({},no),default:Et({},no)},dt.localize=function(e){dt.l10ns.default=Et(Et({},dt.l10ns.default),e)},dt.setDefaults=function(e){dt.defaultConfig=Et(Et({},dt.defaultConfig),e)},dt.parseDate=Fc({}),dt.formatDate=ag({}),dt.compareDates=Kt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return ti(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=dt);const xP=Ou(Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})));(function(e){function t(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(F){return typeof F}:t=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},t(R)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(C),r=o(yI),i=o(xP);function o(R){return R&&R.__esModule?R:{default:R}}function a(){if(typeof WeakMap!="function")return null;var R=new WeakMap;return a=function(){return R},R}function l(R){if(R&&R.__esModule)return R;if(R===null||t(R)!=="object"&&typeof R!="function")return{default:R};var L=a();if(L&&L.has(R))return L.get(R);var F={},V=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var te in R)if(Object.prototype.hasOwnProperty.call(R,te)){var se=V?Object.getOwnPropertyDescriptor(R,te):null;se&&(se.get||se.set)?Object.defineProperty(F,te,se):F[te]=R[te]}return F.default=R,L&&L.set(R,F),F}function s(R){return h(R)||f(R)||d(R)||c()}function c(){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 d(R,L){if(R){if(typeof R=="string")return p(R,L);var F=Object.prototype.toString.call(R).slice(8,-1);if(F==="Object"&&R.constructor&&(F=R.constructor.name),F==="Map"||F==="Set")return Array.from(R);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return p(R,L)}}function f(R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(R))return Array.from(R)}function h(R){if(Array.isArray(R))return p(R)}function p(R,L){(L==null||L>R.length)&&(L=R.length);for(var F=0,V=new Array(L);F<L;F++)V[F]=R[F];return V}function m(){return m=Object.assign||function(R){for(var L=1;L<arguments.length;L++){var F=arguments[L];for(var V in F)Object.prototype.hasOwnProperty.call(F,V)&&(R[V]=F[V])}return R},m.apply(this,arguments)}function g(R,L){if(R==null)return{};var F=v(R,L),V,te;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(R);for(te=0;te<se.length;te++)V=se[te],!(L.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(R,V)&&(F[V]=R[V])}return F}function v(R,L){if(R==null)return{};var F={},V=Object.keys(R),te,se;for(se=0;se<V.length;se++)te=V[se],!(L.indexOf(te)>=0)&&(F[te]=R[te]);return F}function S(R,L){var F=Object.keys(R);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(R);L&&(V=V.filter(function(te){return Object.getOwnPropertyDescriptor(R,te).enumerable})),F.push.apply(F,V)}return F}function w(R){for(var L=1;L<arguments.length;L++){var F=arguments[L]!=null?arguments[L]:{};L%2?S(Object(F),!0).forEach(function(V){W(R,V,F[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(F)):S(Object(F)).forEach(function(V){Object.defineProperty(R,V,Object.getOwnPropertyDescriptor(F,V))})}return R}function y(R,L){if(!(R instanceof L))throw new TypeError("Cannot call a class as a function")}function x(R,L){for(var F=0;F<L.length;F++){var V=L[F];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(R,V.key,V)}}function b(R,L,F){return L&&x(R.prototype,L),R}function T(R,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(L&&L.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),L&&E(R,L)}function E(R,L){return E=Object.setPrototypeOf||function(V,te){return V.__proto__=te,V},E(R,L)}function P(R){var L=z();return function(){var V=A(R),te;if(L){var se=A(this).constructor;te=Reflect.construct(V,arguments,se)}else te=V.apply(this,arguments);return O(this,te)}}function O(R,L){return L&&(t(L)==="object"||typeof L=="function")?L:G(R)}function G(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function z(){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(R){return!1}}function A(R){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},A(R)}function W(R,L,F){return L in R?Object.defineProperty(R,L,{value:F,enumerable:!0,configurable:!0,writable:!0}):R[L]=F,R}var Y=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],N=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),$=["onCreate","onDestroy"],B=r.default.func,H=function(R){T(F,R);var L=P(F);function F(){var V;y(this,F);for(var te=arguments.length,se=new Array(te),ae=0;ae<te;ae++)se[ae]=arguments[ae];return V=L.call.apply(L,[this].concat(se)),W(G(V),"createFlatpickrInstance",function(){var J=w({onClose:function(){V.node.blur&&V.node.blur()}},V.props.options);J=q(J,V.props),V.flatpickr=(0,i.default)(V.node,J),V.props.hasOwnProperty("value")&&V.flatpickr.setDate(V.props.value,!1);var le=V.props.onCreate;le&&le(V.flatpickr)}),W(G(V),"destroyFlatpickrInstance",function(){var J=V.props.onDestroy;J&&J(V.flatpickr),V.flatpickr.destroy(),V.flatpickr=null}),W(G(V),"handleNodeChange",function(J){V.node=J,V.flatpickr&&(V.destroyFlatpickrInstance(),V.createFlatpickrInstance())}),V}return b(F,[{key:"componentDidUpdate",value:function(te){var se=this.props.options,ae=te.options;se=q(se,this.props),ae=q(ae,te);for(var J=Object.getOwnPropertyNames(se),le=J.length-1;le>=0;le--){var ne=J[le],ge=se[ne];ge!==ae[ne]&&(Y.indexOf(ne)!==-1&&!Array.isArray(ge)&&(ge=[ge]),this.flatpickr.set(ne,ge))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&te.value&&Array.isArray(te.value)&&this.props.value.every(function(Se,Ue){te[Ue]}))&&this.props.value!==te.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 te=this.props,se=te.options,ae=te.defaultValue,J=te.value,le=te.children,ne=te.render,ge=g(te,["options","defaultValue","value","children","render"]);return Y.forEach(function(Se){delete ge[Se]}),$.forEach(function(Se){delete ge[Se]}),ne?ne(w(w({},ge),{},{defaultValue:ae,value:J}),this.handleNodeChange):se.wrap?n.default.createElement("div",m({},ge,{ref:this.handleNodeChange}),le):n.default.createElement("input",m({},ge,{defaultValue:ae,ref:this.handleNodeChange}))}}]),F}(n.Component);W(H,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:N,onOpen:N,onClose:N,onMonthChange:N,onYearChange:N,onReady:N,onValueUpdate:N,onDayCreate:N,onCreate:B,onDestroy:B,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}),W(H,"defaultProps",{options:{}});function q(R,L){var F=w({},R);return Y.forEach(function(V){if(L.hasOwnProperty(V)){var te;F[V]&&!Array.isArray(F[V])?F[V]=[F[V]]:F[V]||(F[V]=[]);var se=Array.isArray(L[V])?L[V]:[L[V]];(te=F[V]).push.apply(te,s(se))}}),F}var ee=H;e.default=ee})(rg);const lg=fn(rg);var cg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",l="minute",s="hour",c="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,w={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(Y){var N=["th","st","nd","rd"],$=Y%100;return"["+Y+(N[($-20)%10]||N[$]||N[0])+"]"}},y=function(Y,N,$){var B=String(Y);return!B||B.length>=N?Y:""+Array(N+1-B.length).join($)+Y},x={s:y,z:function(Y){var N=-Y.utcOffset(),$=Math.abs(N),B=Math.floor($/60),H=$%60;return(N<=0?"+":"-")+y(B,2,"0")+":"+y(H,2,"0")},m:function Y(N,$){if(N.date()<$.date())return-Y($,N);var B=12*($.year()-N.year())+($.month()-N.month()),H=N.clone().add(B,f),q=$-H<0,ee=N.clone().add(B+(q?-1:1),f);return+(-(B+($-H)/(q?H-ee:ee-H))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:f,y:p,w:d,d:c,D:m,h:s,m:l,s:a,ms:o,Q:h}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},b="en",T={};T[b]=w;var E="$isDayjsObject",P=function(Y){return Y instanceof A||!(!Y||!Y[E])},O=function Y(N,$,B){var H;if(!N)return b;if(typeof N=="string"){var q=N.toLowerCase();T[q]&&(H=q),$&&(T[q]=$,H=q);var ee=N.split("-");if(!H&&ee.length>1)return Y(ee[0])}else{var R=N.name;T[R]=N,H=R}return!B&&H&&(b=H),H||!B&&b},G=function(Y,N){if(P(Y))return Y.clone();var $=typeof N=="object"?N:{};return $.date=Y,$.args=arguments,new A($)},z=x;z.l=O,z.i=P,z.w=function(Y,N){return G(Y,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var A=function(){function Y($){this.$L=O($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[E]=!0}var N=Y.prototype;return N.parse=function($){this.$d=function(B){var H=B.date,q=B.utc;if(H===null)return new Date(NaN);if(z.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var ee=H.match(v);if(ee){var R=ee[2]-1||0,L=(ee[7]||"0").substring(0,3);return q?new Date(Date.UTC(ee[1],R,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,L)):new Date(ee[1],R,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,L)}}return new Date(H)}($),this.init()},N.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},N.$utils=function(){return z},N.isValid=function(){return this.$d.toString()!==g},N.isSame=function($,B){var H=G($);return this.startOf(B)<=H&&H<=this.endOf(B)},N.isAfter=function($,B){return G($)<this.startOf(B)},N.isBefore=function($,B){return this.endOf(B)<G($)},N.$g=function($,B,H){return z.u($)?this[B]:this.set(H,$)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function($,B){var H=this,q=!!z.u(B)||B,ee=z.p($),R=function(le,ne){var ge=z.w(H.$u?Date.UTC(H.$y,ne,le):new Date(H.$y,ne,le),H);return q?ge:ge.endOf(c)},L=function(le,ne){return z.w(H.toDate()[le].apply(H.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(ne)),H)},F=this.$W,V=this.$M,te=this.$D,se="set"+(this.$u?"UTC":"");switch(ee){case p:return q?R(1,0):R(31,11);case f:return q?R(1,V):R(0,V+1);case d:var ae=this.$locale().weekStart||0,J=(F<ae?F+7:F)-ae;return R(q?te-J:te+(6-J),V);case c:case m:return L(se+"Hours",0);case s:return L(se+"Minutes",1);case l:return L(se+"Seconds",2);case a:return L(se+"Milliseconds",3);default:return this.clone()}},N.endOf=function($){return this.startOf($,!1)},N.$set=function($,B){var H,q=z.p($),ee="set"+(this.$u?"UTC":""),R=(H={},H[c]=ee+"Date",H[m]=ee+"Date",H[f]=ee+"Month",H[p]=ee+"FullYear",H[s]=ee+"Hours",H[l]=ee+"Minutes",H[a]=ee+"Seconds",H[o]=ee+"Milliseconds",H)[q],L=q===c?this.$D+(B-this.$W):B;if(q===f||q===p){var F=this.clone().set(m,1);F.$d[R](L),F.init(),this.$d=F.set(m,Math.min(this.$D,F.daysInMonth())).$d}else R&&this.$d[R](L);return this.init(),this},N.set=function($,B){return this.clone().$set($,B)},N.get=function($){return this[z.p($)]()},N.add=function($,B){var H,q=this;$=Number($);var ee=z.p(B),R=function(V){var te=G(q);return z.w(te.date(te.date()+Math.round(V*$)),q)};if(ee===f)return this.set(f,this.$M+$);if(ee===p)return this.set(p,this.$y+$);if(ee===c)return R(1);if(ee===d)return R(7);var L=(H={},H[l]=r,H[s]=i,H[a]=n,H)[ee]||1,F=this.$d.getTime()+$*L;return z.w(F,this)},N.subtract=function($,B){return this.add(-1*$,B)},N.format=function($){var B=this,H=this.$locale();if(!this.isValid())return H.invalidDate||g;var q=$||"YYYY-MM-DDTHH:mm:ssZ",ee=z.z(this),R=this.$H,L=this.$m,F=this.$M,V=H.weekdays,te=H.months,se=H.meridiem,ae=function(ne,ge,Se,Ue){return ne&&(ne[ge]||ne(B,q))||Se[ge].slice(0,Ue)},J=function(ne){return z.s(R%12||12,ne,"0")},le=se||function(ne,ge,Se){var Ue=ne<12?"AM":"PM";return Se?Ue.toLowerCase():Ue};return q.replace(S,function(ne,ge){return ge||function(Se){switch(Se){case"YY":return String(B.$y).slice(-2);case"YYYY":return z.s(B.$y,4,"0");case"M":return F+1;case"MM":return z.s(F+1,2,"0");case"MMM":return ae(H.monthsShort,F,te,3);case"MMMM":return ae(te,F);case"D":return B.$D;case"DD":return z.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return ae(H.weekdaysMin,B.$W,V,2);case"ddd":return ae(H.weekdaysShort,B.$W,V,3);case"dddd":return V[B.$W];case"H":return String(R);case"HH":return z.s(R,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return le(R,L,!0);case"A":return le(R,L,!1);case"m":return String(L);case"mm":return z.s(L,2,"0");case"s":return String(B.$s);case"ss":return z.s(B.$s,2,"0");case"SSS":return z.s(B.$ms,3,"0");case"Z":return ee}return null}(ne)||ee.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function($,B,H){var q,ee=this,R=z.p(B),L=G($),F=(L.utcOffset()-this.utcOffset())*r,V=this-L,te=function(){return z.m(ee,L)};switch(R){case p:q=te()/12;break;case f:q=te();break;case h:q=te()/3;break;case d:q=(V-F)/6048e5;break;case c:q=(V-F)/864e5;break;case s:q=V/i;break;case l:q=V/r;break;case a:q=V/n;break;default:q=V}return H?q:z.a(q)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return T[this.$L]},N.locale=function($,B){if(!$)return this.$L;var H=this.clone(),q=O($,B,!0);return q&&(H.$L=q),H},N.clone=function(){return z.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},Y}(),W=A.prototype;return G.prototype=W,[["$ms",o],["$s",a],["$m",l],["$H",s],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(Y){W[Y[1]]=function(N){return this.$g(N,Y[0],Y[1])}}),G.extend=function(Y,N){return Y.$i||(Y(N,A,G),Y.$i=!0),G},G.locale=O,G.isDayjs=P,G.unix=function(Y){return G(1e3*Y)},G.en=T[b],G.Ls=T,G.p={},G})})(cg);var CP=cg.exports;const _t=fn(CP);var ug={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,a){var l,s=function(h,p,m){m===void 0&&(m={});var g=new Date(h),v=function(S,w){w===void 0&&(w={});var y=w.timeZoneName||"short",x=S+"|"+y,b=r[x];return b||(b=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:y}),r[x]=b),b}(p,m);return v.formatToParts(g)},c=function(h,p){for(var m=s(h,p),g=[],v=0;v<m.length;v+=1){var S=m[v],w=S.type,y=S.value,x=n[w];x>=0&&(g[x]=parseInt(y,10))}var b=g[3],T=b===24?0:b,E=g[0]+"-"+g[1]+"-"+g[2]+" "+T+":"+g[4]+":"+g[5]+":000",P=+h;return(a.utc(E).valueOf()-(P-=P%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=l);var m,g=this.utcOffset(),v=this.toDate(),S=v.toLocaleString("en-US",{timeZone:h}),w=Math.round((v-new Date(S))/1e3/60),y=15*-Math.round(v.getTimezoneOffset()/15)-w;if(!Number(y))m=this.utcOffset(0,p);else if(m=a(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(y,!0),p){var x=m.utcOffset();m=m.add(g-x,"minute")}return m.$x.$timezone=h,m},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),m=s(this.valueOf(),p,{timeZoneName:h}).find(function(g){return g.type.toLowerCase()==="timezonename"});return m&&m.value};var f=d.startOf;d.startOf=function(h,p){if(!this.$x||!this.$x.$timezone)return f.call(this,h,p);var m=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(m,h,p).tz(this.$x.$timezone,!0)},a.tz=function(h,p,m){var g=m&&p,v=m||p||l,S=c(+a(),v);if(typeof h!="string")return a(h).tz(v);var w=function(T,E,P){var O=T-60*E*1e3,G=c(O,P);if(E===G)return[O,E];var z=c(O-=60*(G-E)*1e3,P);return G===z?[O,G]:[T-60*Math.min(G,z)*1e3,Math.max(G,z)]}(a.utc(h,g).valueOf(),S,v),y=w[0],x=w[1],b=a(y).utcOffset(x);return b.$x.$timezone=v,b},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){l=h}}})})(ug);var wP=ug.exports;const IP=fn(wP);var dg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,l){var s=a.prototype;l.utc=function(g){var v={date:g,utc:!0,args:arguments};return new a(v)},s.utc=function(g){var v=l(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),n):v},s.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var c=s.parse;s.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),c.call(this,g)};var d=s.init;s.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else d.call(this)};var f=s.utcOffset;s.utcOffset=function(g,v){var S=this.$utils().u;if(S(g))return this.$u?0:S(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=function(b){b===void 0&&(b="");var T=b.match(r);if(!T)return null;var E=(""+T[0]).match(i)||["-",0,0],P=E[0],O=60*+E[1]+ +E[2];return O===0?0:P==="+"?O:-O}(g),g===null))return this;var w=Math.abs(g)<=16?60*g:g,y=this;if(v)return y.$offset=w,y.$u=g===0,y;if(g!==0){var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(y=this.local().add(w+x,n)).$offset=w,y.$x.$localOffset=x}else y=this.utc();return y};var h=s.format;s.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},s.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var p=s.toDate;s.toDate=function(g){return g==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=s.diff;s.diff=function(g,v,S){if(g&&this.$u===g.$u)return m.call(this,g,v,S);var w=this.local(),y=l(g).local();return m.call(w,y,v,S)}}})})(dg);var SP=dg.exports;const AP=fn(SP);_t.extend(IP),_t.extend(AP);const TP=e=>{if(!_t(e).isAfter(_t(Date.now()).subtract(15,"minute")))return _t(Date.now()).add(15,"minute").toDate()},Vc=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const l=_t.utc(a[0]).toISOString();i(l)}else i("")};return u.jsx(I.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:u.jsx(lg,{value:e&&_t(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||TP(e),maxDate:n,parseDate:(a,l)=>_t(a,l).toDate(),formatDate:(a,l)=>_t(a).format(l),time_24hr:!0,minuteIncrement:1}})})},EP=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return u.jsxs(I.Box,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormControl,{children:u.jsx(I.FormLabel,{required:e,color:"primary",children:"Duration"})}),u.jsxs(I.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[u.jsx(to,{label:"From date",defaultValue:i,required:e,onChange:n}),u.jsx(to,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},fg=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(_t(t).toDate()),n&&r.push(_t(n).toDate()),r},_P=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=C.useState(fg(t)),[a,l]=C.useState(!1),s=()=>l(!a),c=d=>{if(d&&d.length>0){const f="YYYY-MM-DD",h=_t(d[0]).format(f),p=_t(d[1]).format(f);r({from:h,to:p})}else d&&d.length===0&&(r({from:"",to:""}),s());o(d)};return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:n,color:"primary",children:e}),u.jsx(I.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:u.jsx(lg,{value:i,onChange:c,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(d,f)=>_t(d,f).toDate(),formatDate:(d,f)=>_t(d).format(f),defaultDate:fg(t)||void 0}})}),u.jsx(ut,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:s})]})},kP=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{zi(e).signOut().then(()=>n(null)).catch(l=>{console.error("There was a problem logging out the user:",l)})};return u.jsx(I.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:u.jsx(I.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:u.jsxs(I.CardContent,{children:[u.jsx(I.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),u.jsx(I.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),u.jsx(I.Box,{display:"flex",justifyContent:"center",children:u.jsx(I.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},hg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],Uc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),PP=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=C.useState(hg(n)),[a,l]=C.useState(null),[s,c]=C.useState(""),[d,f]=C.useState(""),[h,p]=C.useState(""),[m,g]=C.useState("");C.useEffect(()=>o(hg(n)),[n]);const v=()=>{const x=[...i];x.push({key:s,value:h}),o(x),c(""),p(""),r(Uc(x))},S=x=>{const b=i.filter((T,E)=>E!==x);o(b),r(Uc(b))},w=(x,b)=>{f(b.key),g(b.value),l(x)},y=x=>{const b=[...i];b[x]={key:d,value:m},o(b),l(null),f(""),g(""),r(Uc(b))};return u.jsxs(I.Box,{children:[i.map((x,b)=>u.jsx(I.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(I.CardContent,{style:{flex:1},children:a===b?u.jsxs(I.Box,{display:"flex",alignItems:"center",children:[u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:T=>f(T.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:m,onChange:T=>g(T.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Tooltip,{title:e.save,children:d&&m?u.jsx(I.IconButton,{onClick:()=>y(b),children:u.jsx(Le.Check,{})}):u.jsx("span",{children:u.jsx(I.IconButton,{disabled:!0,children:u.jsx(Le.Check,{})})})})]}):u.jsxs(I.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:x.key})]}),u.jsxs(I.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:x.value})]})]}),u.jsxs(I.Box,{children:[u.jsx(I.Tooltip,{title:e.edit,children:u.jsx(I.IconButton,{onClick:()=>w(b,x),children:u.jsx(Le.Edit,{})})}),u.jsx(I.Tooltip,{title:e.delete,children:u.jsx(I.IconButton,{onClick:()=>S(b),children:u.jsx(Le.Delete,{})})})]})]})})},`dynamic-fields-${t}-${b}`)),u.jsxs(I.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",value:s,placeholder:e.keyDynamicFields,onChange:x=>c(x.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:x=>p(x.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(I.Tooltip,{title:e.add,children:s&&h?u.jsx(I.Button,{onClick:v,children:u.jsx(Le.Add,{})}):u.jsx("span",{children:u.jsx(I.Button,{disabled:!0,children:u.jsx(Le.Add,{})})})})]})]})};function io(e,t,n){return(t=Kl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pg(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 ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pg(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gg(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,Kl(r.key),r)}}function OP(e,t,n){return t&&gg(e.prototype,t),n&&gg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hc(e,t){return Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hc(e,t)}function RP(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&&Hc(e,t)}function ts(e){return ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ts(e)}function mg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mg=function(){return!!e})()}function MP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LP(e,t){if(t&&(vr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MP(e)}function BP(e){var t=mg();return function(){var n,r=ts(e);if(t){var i=ts(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LP(this,n)}}function Wc(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 $P(e){if(Array.isArray(e))return Wc(e)}function NP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vg(e,t){if(e){if(typeof e=="string")return Wc(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)?Wc(e,t):void 0}}function FP(){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 ni(e){return $P(e)||NP(e)||vg(e)||FP()}function zP(e){if(Array.isArray(e))return e}function jP(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(d){c=!0,i=d}finally{try{if(!s&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}function VP(){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 Vn(e,t){return zP(e)||jP(e,t)||vg(e,t)||VP()}function xn(e,t){if(e==null)return{};var n,r,i=Ae(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 UP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Gc=C.useLayoutEffect,HP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ns=function(){};function WP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function GP(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(WP(e,a)));return o.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var rs=function(t){return tD(t)?t.filter(Boolean):vr(t)==="object"&&t!==null?[t]:[]},bg=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=xn(t,HP);return ve({},n)},tt=function(t,n,r){var i=t.cx,o=t.getStyles,a=t.getClassNames,l=t.className;return{css:o(n,t),className:i(r!=null?r:{},a(n,t),l)}};function is(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function YP(e){return is(e)?window.innerHeight:e.clientHeight}function yg(e){return is(e)?window.pageYOffset:e.scrollTop}function os(e,t){if(is(e)){window.scrollTo(0,t);return}e.scrollTop=t}function KP(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 qP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function as(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ns,i=yg(e),o=t-i,a=10,l=0;function s(){l+=a;var c=qP(l,i,o,n);os(e,c),l<n?window.requestAnimationFrame(s):r(e)}s()}function xg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?os(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&os(e,Math.max(t.offsetTop-i,0))}function QP(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 Cg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function JP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var wg=!1,XP={get passive(){return wg=!0}},ss=typeof window!="undefined"?window:{};ss.addEventListener&&ss.removeEventListener&&(ss.addEventListener("p",ns,XP),ss.removeEventListener("p",ns,!1));var ZP=wg;function eD(e){return e!=null}function tD(e){return Array.isArray(e)}function oo(e,t,n){return e?t:n}function PF(e){return e}function DF(e){return e}var nD=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 l=Vn(a,1),s=l[0];return!r.includes(s)});return o.reduce(function(a,l){var s=Vn(l,2),c=s[0],d=s[1];return a[c]=d,a},{})},rD=["children","innerProps"],iD=["children","innerProps"];function oD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=KP(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var d=s.getBoundingClientRect(),f=d.height,h=n.getBoundingClientRect(),p=h.bottom,g=h.height,m=h.top,v=n.offsetParent.getBoundingClientRect(),A=v.top,x=a?window.innerHeight:YP(s),b=yg(s),S=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),w=A-y,E=x-m,k=w+b,N=f-b-m,Y=p-x+b+S,W=b+m-y,T=160;switch(i){case"auto":case"bottom":if(E>=g)return{placement:"bottom",maxHeight:t};if(N>=g&&!a)return o&&as(s,Y,T),{placement:"bottom",maxHeight:t};if(!a&&N>=r||a&&E>=r){o&&as(s,Y,T);var H=a?E-S:N-S;return{placement:"bottom",maxHeight:H}}if(i==="auto"||a){var G=t,$=a?w:k;return $>=r&&(G=Math.min($-S-l,t)),{placement:"top",maxHeight:G}}if(i==="bottom")return o&&os(s,Y),{placement:"bottom",maxHeight:t};break;case"top":if(w>=g)return{placement:"top",maxHeight:t};if(k>=g&&!a)return o&&as(s,W,T),{placement:"top",maxHeight:t};if(!a&&k>=r||a&&w>=r){var B=t;return(!a&&k>=r||a&&w>=r)&&(B=a?w-y:k-y),o&&as(s,W,T),{placement:"top",maxHeight:B}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function aD(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Ig=function(t){return t==="auto"?"bottom":t},sD=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,l=o.spacing,s=o.colors;return ve((r={label:"menu"},io(r,aD(i),"100%"),io(r,"position","absolute"),io(r,"width","100%"),io(r,"zIndex",1),r),n?{}:{backgroundColor:s.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},Sg=C.createContext(null),lD=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,s=t.theme,c=C.useContext(Sg)||{},d=c.setPortalPlacement,f=C.useRef(null),h=C.useState(i),p=Vn(h,2),g=p[0],m=p[1],v=C.useState(null),A=Vn(v,2),x=A[0],b=A[1],S=s.spacing.controlHeight;return Gc(function(){var y=f.current;if(y){var w=a==="fixed",E=l&&!w,k=oD({maxHeight:i,menuEl:y,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:w,controlHeight:S});m(k.maxHeight),b(k.placement),d==null||d(k.placement)}},[i,o,a,l,r,d,S]),n({ref:f,placerProps:ve(ve({},t),{},{placement:x||Ig(o),maxHeight:g})})},cD=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return pe.jsx("div",D({},tt(t,"menu",{menu:!0}),{ref:r},i),n)},uD=cD,dD=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return ve({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},fD=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return pe.jsx("div",D({},tt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Ag=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return ve({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},hD=Ag,pD=Ag,gD=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=xn(t,rD);return pe.jsx("div",D({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},mD=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=xn(t,iD);return pe.jsx("div",D({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},vD=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}},bD=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,l=t.menuPosition,s=C.useRef(null),c=C.useRef(null),d=C.useState(Ig(a)),f=Vn(d,2),h=f[0],p=f[1],g=C.useMemo(function(){return{setPortalPlacement:p}},[]),m=C.useState(null),v=Vn(m,2),A=v[0],x=v[1],b=C.useCallback(function(){if(i){var E=QP(i),k=l==="fixed"?0:window.pageYOffset,N=E[h]+k;(N!==(A==null?void 0:A.offset)||E.left!==(A==null?void 0:A.rect.left)||E.width!==(A==null?void 0:A.rect.width))&&x({offset:N,rect:E})}},[i,l,h,A==null?void 0:A.offset,A==null?void 0:A.rect.left,A==null?void 0:A.rect.width]);Gc(function(){b()},[b]);var S=C.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&s.current&&(c.current=AS(i,s.current,b,{elementResize:"ResizeObserver"in window}))},[i,b]);Gc(function(){S()},[S]);var y=C.useCallback(function(E){s.current=E,S()},[S]);if(!n&&l!=="fixed"||!A)return null;var w=pe.jsx("div",D({ref:y},tt(ve(ve({},t),{},{offset:A.offset,position:l,rect:A.rect}),"menuPortal",{"menu-portal":!0}),o),r);return pe.jsx(Sg.Provider,{value:g},n?Oe.createPortal(w,n):w)},yD=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},xD=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return pe.jsx("div",D({},tt(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},CD=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ve({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")})},wD=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return pe.jsx("div",D({},tt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},ID=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},SD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"indicatorsContainer",{indicators:!0}),r),n)},Tg,AD=["size"],TD=["innerProps","isRtl","size"],ED={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Eg=function(t){var n=t.size,r=xn(t,AD);return pe.jsx("svg",D({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ED},r))},Yc=function(t){return pe.jsx(Eg,D({size:20},t),pe.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"}))},_g=function(t){return pe.jsx(Eg,D({size:20},t),pe.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"}))},kg=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return ve({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},_D=kg,kD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||pe.jsx(_g,null))},PD=kg,DD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||pe.jsx(Yc,null))},OD=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return ve({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},RD=function(t){var n=t.innerProps;return pe.jsx("span",D({},n,tt(t,"indicatorSeparator",{"indicator-separator":!0})))},MD=pe.keyframes(Tg||(Tg=UP([`
|
|
2460
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vn(e,t){return zP(e)||jP(e,t)||vg(e,t)||VP()}function xn(e,t){if(e==null)return{};var n,r,i=Ae(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 UP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Gc=C.useLayoutEffect,HP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ns=function(){};function WP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function GP(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(WP(e,a)));return o.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var rs=function(t){return tD(t)?t.filter(Boolean):vr(t)==="object"&&t!==null?[t]:[]},bg=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=xn(t,HP);return ve({},n)},tt=function(t,n,r){var i=t.cx,o=t.getStyles,a=t.getClassNames,l=t.className;return{css:o(n,t),className:i(r!=null?r:{},a(n,t),l)}};function is(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function YP(e){return is(e)?window.innerHeight:e.clientHeight}function yg(e){return is(e)?window.pageYOffset:e.scrollTop}function os(e,t){if(is(e)){window.scrollTo(0,t);return}e.scrollTop=t}function KP(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 qP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function as(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ns,i=yg(e),o=t-i,a=10,l=0;function s(){l+=a;var c=qP(l,i,o,n);os(e,c),l<n?window.requestAnimationFrame(s):r(e)}s()}function xg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?os(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&os(e,Math.max(t.offsetTop-i,0))}function QP(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 Cg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function JP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var wg=!1,XP={get passive(){return wg=!0}},ss=typeof window!="undefined"?window:{};ss.addEventListener&&ss.removeEventListener&&(ss.addEventListener("p",ns,XP),ss.removeEventListener("p",ns,!1));var ZP=wg;function eD(e){return e!=null}function tD(e){return Array.isArray(e)}function oo(e,t,n){return e?t:n}function PF(e){return e}function DF(e){return e}var nD=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 l=Vn(a,1),s=l[0];return!r.includes(s)});return o.reduce(function(a,l){var s=Vn(l,2),c=s[0],d=s[1];return a[c]=d,a},{})},rD=["children","innerProps"],iD=["children","innerProps"];function oD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,s=KP(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var d=s.getBoundingClientRect(),f=d.height,h=n.getBoundingClientRect(),p=h.bottom,m=h.height,g=h.top,v=n.offsetParent.getBoundingClientRect(),S=v.top,w=a?window.innerHeight:YP(s),y=yg(s),x=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),T=S-b,E=w-g,P=T+y,O=f-y-g,G=p-w+y+x,z=y+g-b,A=160;switch(i){case"auto":case"bottom":if(E>=m)return{placement:"bottom",maxHeight:t};if(O>=m&&!a)return o&&as(s,G,A),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&E>=r){o&&as(s,G,A);var W=a?E-x:O-x;return{placement:"bottom",maxHeight:W}}if(i==="auto"||a){var Y=t,N=a?T:P;return N>=r&&(Y=Math.min(N-x-l,t)),{placement:"top",maxHeight:Y}}if(i==="bottom")return o&&os(s,G),{placement:"bottom",maxHeight:t};break;case"top":if(T>=m)return{placement:"top",maxHeight:t};if(P>=m&&!a)return o&&as(s,z,A),{placement:"top",maxHeight:t};if(!a&&P>=r||a&&T>=r){var $=t;return(!a&&P>=r||a&&T>=r)&&($=a?T-b:P-b),o&&as(s,z,A),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function aD(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Ig=function(t){return t==="auto"?"bottom":t},sD=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,l=o.spacing,s=o.colors;return ve((r={label:"menu"},io(r,aD(i),"100%"),io(r,"position","absolute"),io(r,"width","100%"),io(r,"zIndex",1),r),n?{}:{backgroundColor:s.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},Sg=C.createContext(null),lD=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,s=t.theme,c=C.useContext(Sg)||{},d=c.setPortalPlacement,f=C.useRef(null),h=C.useState(i),p=Vn(h,2),m=p[0],g=p[1],v=C.useState(null),S=Vn(v,2),w=S[0],y=S[1],x=s.spacing.controlHeight;return Gc(function(){var b=f.current;if(b){var T=a==="fixed",E=l&&!T,P=oD({maxHeight:i,menuEl:b,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:T,controlHeight:x});g(P.maxHeight),y(P.placement),d==null||d(P.placement)}},[i,o,a,l,r,d,x]),n({ref:f,placerProps:ve(ve({},t),{},{placement:w||Ig(o),maxHeight:m})})},cD=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return pe.jsx("div",D({},tt(t,"menu",{menu:!0}),{ref:r},i),n)},uD=cD,dD=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return ve({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},fD=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return pe.jsx("div",D({},tt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Ag=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return ve({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},hD=Ag,pD=Ag,gD=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=xn(t,rD);return pe.jsx("div",D({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},mD=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=xn(t,iD);return pe.jsx("div",D({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},vD=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}},bD=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,l=t.menuPosition,s=C.useRef(null),c=C.useRef(null),d=C.useState(Ig(a)),f=Vn(d,2),h=f[0],p=f[1],m=C.useMemo(function(){return{setPortalPlacement:p}},[]),g=C.useState(null),v=Vn(g,2),S=v[0],w=v[1],y=C.useCallback(function(){if(i){var E=QP(i),P=l==="fixed"?0:window.pageYOffset,O=E[h]+P;(O!==(S==null?void 0:S.offset)||E.left!==(S==null?void 0:S.rect.left)||E.width!==(S==null?void 0:S.rect.width))&&w({offset:O,rect:E})}},[i,l,h,S==null?void 0:S.offset,S==null?void 0:S.rect.left,S==null?void 0:S.rect.width]);Gc(function(){y()},[y]);var x=C.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&s.current&&(c.current=AS(i,s.current,y,{elementResize:"ResizeObserver"in window}))},[i,y]);Gc(function(){x()},[x]);var b=C.useCallback(function(E){s.current=E,x()},[x]);if(!n&&l!=="fixed"||!S)return null;var T=pe.jsx("div",D({ref:b},tt(ve(ve({},t),{},{offset:S.offset,position:l,rect:S.rect}),"menuPortal",{"menu-portal":!0}),o),r);return pe.jsx(Sg.Provider,{value:m},n?Oe.createPortal(T,n):T)},yD=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},xD=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return pe.jsx("div",D({},tt(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},CD=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ve({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")})},wD=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return pe.jsx("div",D({},tt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},ID=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},SD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"indicatorsContainer",{indicators:!0}),r),n)},Tg,AD=["size"],TD=["innerProps","isRtl","size"],ED={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Eg=function(t){var n=t.size,r=xn(t,AD);return pe.jsx("svg",D({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ED},r))},Yc=function(t){return pe.jsx(Eg,D({size:20},t),pe.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"}))},_g=function(t){return pe.jsx(Eg,D({size:20},t),pe.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"}))},kg=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return ve({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},_D=kg,kD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||pe.jsx(_g,null))},PD=kg,DD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||pe.jsx(Yc,null))},OD=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return ve({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},RD=function(t){var n=t.innerProps;return pe.jsx("span",D({},n,tt(t,"indicatorSeparator",{"indicator-separator":!0})))},MD=pe.keyframes(Tg||(Tg=UP([`
|
|
2461
2461
|
0%, 80%, 100% { opacity: 0; }
|
|
2462
2462
|
40% { opacity: 1; }
|
|
2463
|
-
`]))),LD=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,l=o.spacing.baseUnit;return ve({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:l*2})},Kc=function(t){var n=t.delay,r=t.offset;return pe.jsx("span",{css:pe.css({animation:"".concat(MD," 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"},"","")})},BD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=xn(t,TD);return pe.jsx("div",D({},tt(ve(ve({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),pe.jsx(Kc,{delay:0,offset:r}),pe.jsx(Kc,{delay:160,offset:!0}),pe.jsx(Kc,{delay:320,offset:!r}))},$D=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,l=o.borderRadius,s=o.spacing;return ve({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.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:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},ND=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,l=t.menuIsOpen;return pe.jsx("div",D({ref:o},tt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),a,{"aria-disabled":r||void 0}),n)},FD=ND,zD=["data"],jD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},VD=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,l=t.headingProps,s=t.innerProps,c=t.label,d=t.theme,f=t.selectProps;return pe.jsx("div",D({},tt(t,"group",{group:!0}),s),pe.jsx(a,D({},l,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),c),pe.jsx("div",null,n))},UD=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return ve({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"})},HD=function(t){var n=bg(t);n.data;var r=xn(n,zD);return pe.jsx("div",D({},tt(t,"groupHeading",{"group-heading":!0}),r))},WD=VD,GD=["innerRef","isDisabled","isHidden","inputClassName"],YD=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,l=o.colors;return ve(ve({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},KD),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:l.neutral80})},Pg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},KD={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ve({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Pg)},qD=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Pg)},QD=function(t){var n=t.cx,r=t.value,i=bg(t),o=i.innerRef,a=i.isDisabled,l=i.isHidden,s=i.inputClassName,c=xn(i,GD);return pe.jsx("div",D({},tt(t,"input",{"input-container":!0}),{"data-value":r||""}),pe.jsx("input",D({className:n({input:!0},s),ref:o,style:qD(l),disabled:a},c)))},JD=QD,XD=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return ve({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},ZD=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return ve({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})},eO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,l=t.isFocused;return ve({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:l?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Dg=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",r,n)},tO=Dg,nO=Dg;function rO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",D({role:"button"},n),t||pe.jsx(Yc,{size:14}))}var iO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,l=t.removeProps,s=t.selectProps,c=r.Container,d=r.Label,f=r.Remove;return pe.jsx(c,{data:i,innerProps:ve(ve({},tt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:s},pe.jsx(d,{data:i,innerProps:ve({},tt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},n),pe.jsx(f,{data:i,innerProps:ve(ve({},tt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:s}))},oO=iO,aO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,l=a.spacing,s=a.colors;return ve({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?s.primary:i?s.primary25:"transparent",color:r?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?s.primary:s.primary50}})},sO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,l=t.innerProps;return pe.jsx("div",D({},tt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},l),n)},lO=sO,cO=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return ve({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},uO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"placeholder",{placeholder:!0}),r),n)},dO=uO,fO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return ve({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})},hO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return pe.jsx("div",D({},tt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},pO=hO,gO={ClearIndicator:DD,Control:FD,DropdownIndicator:kD,DownChevron:_g,CrossIcon:Yc,Group:WD,GroupHeading:HD,IndicatorsContainer:SD,IndicatorSeparator:RD,Input:JD,LoadingIndicator:BD,Menu:uD,MenuList:fD,MenuPortal:bD,LoadingMessage:mD,NoOptionsMessage:gD,MultiValue:oO,MultiValueContainer:tO,MultiValueLabel:nO,MultiValueRemove:rO,Option:lO,Placeholder:dO,SelectContainer:xD,SingleValue:pO,ValueContainer:wD},mO=function(t){return ve(ve({},gO),t.components)},Og=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function vO(e,t){return!!(e===t||Og(e)&&Og(t))}function bO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!vO(e[n],t[n]))return!1;return!0}function yO(e,t){t===void 0&&(t=bO);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 xO={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"},CO=function(t){return pe.jsx("span",D({css:xO},t))},Rg=CO,wO={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,l=t.selectValue,s=t.isDisabled,c=t.isSelected,d=t.isAppleDevice,f=function(m,v){return m&&m.length?"".concat(m.indexOf(v)+1," of ").concat(m.length):""};if(n==="value"&&l)return"value ".concat(a," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var h=s?" disabled":"",p="".concat(c?" selected":"").concat(h);return"".concat(a).concat(p,", ").concat(f(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},IO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,l=t.selectValue,s=t.selectProps,c=t.id,d=t.isAppleDevice,f=s.ariaLiveMessages,h=s.getOptionLabel,p=s.inputValue,g=s.isMulti,m=s.isOptionDisabled,v=s.isSearchable,A=s.menuIsOpen,x=s.options,b=s.screenReaderStatus,S=s.tabSelectsValue,y=s.isLoading,w=s["aria-label"],E=s["aria-live"],k=C.useMemo(function(){return ve(ve({},wO),f||{})},[f]),N=C.useMemo(function(){var $="";if(n&&k.onChange){var B=n.option,L=n.options,U=n.removedValue,q=n.removedValues,ee=n.value,O=function(J){return Array.isArray(J)?null:J},M=U||B||O(ee),F=M?h(M):"",j=L||q||void 0,te=j?j.map(h):[],se=ve({isDisabled:M&&m(M,l),label:F,labels:te},n);$=k.onChange(se)}return $},[n,k,m,l,h]),Y=C.useMemo(function(){var $="",B=r||i,L=!!(r&&l&&l.includes(r));if(B&&k.onFocus){var U={focused:B,label:h(B),isDisabled:m(B,l),isSelected:L,options:o,context:B===r?"menu":"value",selectValue:l,isAppleDevice:d};$=k.onFocus(U)}return $},[r,i,h,m,k,o,l,d]),W=C.useMemo(function(){var $="";if(A&&x.length&&!y&&k.onFilter){var B=b({count:o.length});$=k.onFilter({inputValue:p,resultsMessage:B})}return $},[o,p,A,k,x,b,y]),T=(n==null?void 0:n.action)==="initial-input-focus",H=C.useMemo(function(){var $="";if(k.guidance){var B=i?"value":A?"menu":"input";$=k.guidance({"aria-label":w,context:B,isDisabled:r&&m(r,l),isMulti:g,isSearchable:v,tabSelectsValue:S,isInitialFocus:T})}return $},[w,r,i,g,m,v,A,k,l,S,T]),G=pe.jsx(C.Fragment,null,pe.jsx("span",{id:"aria-selection"},N),pe.jsx("span",{id:"aria-focused"},Y),pe.jsx("span",{id:"aria-results"},W),pe.jsx("span",{id:"aria-guidance"},H));return pe.jsx(C.Fragment,null,pe.jsx(Rg,{id:c},T&&G),pe.jsx(Rg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&G))},SO=IO,qc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],AO=new RegExp("["+qc.map(function(e){return e.letters}).join("")+"]","g"),Mg={},Qc=0;Qc<qc.length;Qc++)for(var Jc=qc[Qc],Xc=0;Xc<Jc.letters.length;Xc++)Mg[Jc.letters[Xc]]=Jc.base;var Lg=function(t){return t.replace(AO,function(n){return Mg[n]})},TO=yO(Lg),Bg=function(t){return t.replace(/^\s+|\s+$/g,"")},EO=function(t){return"".concat(t.label," ").concat(t.value)},_O=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:EO,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,l=i.stringify,s=i.trim,c=i.matchFrom,d=s?Bg(r):r,f=s?Bg(l(n)):l(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=TO(d),f=Lg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},kO=["innerRef"];function PO(e){var t=e.innerRef,n=xn(e,kO),r=nD(n,"onExited","in","enter","exit","appear");return pe.jsx("input",D({ref:t},r,{css:pe.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 DO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function OO(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=C.useRef(!1),l=C.useRef(!1),s=C.useRef(0),c=C.useRef(null),d=C.useCallback(function(v,A){if(c.current!==null){var x=c.current,b=x.scrollTop,S=x.scrollHeight,y=x.clientHeight,w=c.current,E=A>0,k=S-y-b,N=!1;k>A&&a.current&&(r&&r(v),a.current=!1),E&&l.current&&(o&&o(v),l.current=!1),E&&A>k?(n&&!a.current&&n(v),w.scrollTop=S,N=!0,a.current=!0):!E&&-A>b&&(i&&!l.current&&i(v),w.scrollTop=0,N=!0,l.current=!0),N&&DO(v)}},[n,r,i,o]),f=C.useCallback(function(v){d(v,v.deltaY)},[d]),h=C.useCallback(function(v){s.current=v.changedTouches[0].clientY},[]),p=C.useCallback(function(v){var A=s.current-v.changedTouches[0].clientY;d(v,A)},[d]),g=C.useCallback(function(v){if(v){var A=ZP?{passive:!1}:!1;v.addEventListener("wheel",f,A),v.addEventListener("touchstart",h,A),v.addEventListener("touchmove",p,A)}},[p,h,f]),m=C.useCallback(function(v){v&&(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",h,!1),v.removeEventListener("touchmove",p,!1))},[p,h,f]);return C.useEffect(function(){if(t){var v=c.current;return g(v),function(){m(v)}}},[t,g,m]),function(v){c.current=v}}var $g=["boxSizing","height","overflow","paddingRight","position"],Ng={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Fg(e){e.preventDefault()}function zg(e){e.stopPropagation()}function jg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Vg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ug=!!(typeof window!="undefined"&&window.document&&window.document.createElement),ao=0,ri={capture:!1,passive:!1};function RO(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=C.useRef({}),o=C.useRef(null),a=C.useCallback(function(s){if(Ug){var c=document.body,d=c&&c.style;if(r&&$g.forEach(function(g){var m=d&&d[g];i.current[g]=m}),r&&ao<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Ng).forEach(function(g){var m=Ng[g];d&&(d[g]=m)}),d&&(d.paddingRight="".concat(p,"px"))}c&&Vg()&&(c.addEventListener("touchmove",Fg,ri),s&&(s.addEventListener("touchstart",jg,ri),s.addEventListener("touchmove",zg,ri))),ao+=1}},[r]),l=C.useCallback(function(s){if(Ug){var c=document.body,d=c&&c.style;ao=Math.max(ao-1,0),r&&ao<1&&$g.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&Vg()&&(c.removeEventListener("touchmove",Fg,ri),s&&(s.removeEventListener("touchstart",jg,ri),s.removeEventListener("touchmove",zg,ri)))}},[r]);return C.useEffect(function(){if(t){var s=o.current;return a(s),function(){l(s)}}},[t,a,l]),function(s){o.current=s}}var MO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},LO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function BO(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,l=e.onTopArrive,s=e.onTopLeave,c=OO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:l,onTopLeave:s}),d=RO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(C.Fragment,null,n&&pe.jsx("div",{onClick:MO,css:LO}),t(f))}var $O={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},NO=function(t){var n=t.name,r=t.onFocus;return pe.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:$O,value:"",onChange:function(){}})},FO=NO;function Zc(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 zO(){return Zc(/^iPhone/i)}function Hg(){return Zc(/^Mac/i)}function jO(){return Zc(/^iPad/i)||Hg()&&navigator.maxTouchPoints>1}function VO(){return zO()||jO()}function UO(){return Hg()||VO()}var HO=function(t){return t.label},Wg=function(t){return t.label},Gg=function(t){return t.value},WO=function(t){return!!t.isDisabled},GO={clearIndicator:PD,container:yD,control:$D,dropdownIndicator:_D,group:jD,groupHeading:UD,indicatorsContainer:ID,indicatorSeparator:OD,input:YD,loadingIndicator:LD,loadingMessage:pD,menu:sD,menuList:dD,menuPortal:vD,multiValue:XD,multiValueLabel:ZD,multiValueRemove:eO,noOptionsMessage:hD,option:aO,placeholder:cO,singleValue:fO,valueContainer:CD},YO={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%)"},KO=4,Yg=4,qO=38,QO=Yg*2,JO={baseUnit:Yg,controlHeight:qO,menuGutter:QO},eu={borderRadius:KO,colors:YO,spacing:JO},XO={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Cg(),captureMenuScroll:!Cg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:_O(),formatGroupLabel:HO,getOptionLabel:Wg,getOptionValue:Gg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:WO,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!JP(),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 Kg(e,t,n,r){var i=Zg(e,t,n),o=em(e,t,n),a=Xg(e,t),l=cs(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:l,index:r}}function ls(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,l){return Kg(e,a,t,l)}).filter(function(a){return Jg(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Kg(e,n,t,r);return Jg(e,o)?o:void 0}).filter(eD)}function qg(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ni(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Qg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ni(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 ZO(e,t){return qg(ls(e,t))}function Jg(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,l=t.value;return(!nm(e)||!o)&&tm(e,{label:a,value:l,data:i},r)}function eR(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 tR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var tu=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},Xg=function(t,n){return t.getOptionLabel(n)},cs=function(t,n){return t.getOptionValue(n)};function Zg(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function em(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=cs(e,t);return n.some(function(i){return cs(e,i)===r})}function tm(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var nm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},nR=1,rm=function(e){RP(n,e);var t=BP(n);function n(r){var i;if(DP(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=UO(),i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,c){var d=i.props,f=d.onChange,h=d.name;c.name=h,i.ariaOnChange(s,c),f(s,c)},i.setValue=function(s,c,d){var f=i.props,h=f.closeMenuOnSelect,p=f.isMulti,g=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:g}),h&&(i.setState({inputIsHiddenAfterUpdate:!p}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:c,option:d})},i.selectOption=function(s){var c=i.props,d=c.blurInputOnSelect,f=c.isMulti,h=c.name,p=i.state.selectValue,g=f&&i.isOptionSelected(s,p),m=i.isOptionDisabled(s,p);if(g){var v=i.getOptionValue(s);i.setValue(p.filter(function(A){return i.getOptionValue(A)!==v}),"deselect-option",s)}else if(!m)f?i.setValue([].concat(ni(p),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:h});return}d&&i.blurInput()},i.removeValue=function(s){var c=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(s),h=d.filter(function(g){return i.getOptionValue(g)!==f}),p=oo(c,h,h[0]||null);i.onChange(p,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(oo(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),h=oo(s,f,f[0]||null);i.onChange(h,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(s){return tu(i.state.focusableOptionsWithIds,s)},i.getFocusableOptionsWithIds=function(){return Qg(ls(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,c=new Array(s),d=0;d<s;d++)c[d]=arguments[d];return GP.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(s){return Xg(i.props,s)},i.getOptionValue=function(s){return cs(i.props,s)},i.getStyles=function(s,c){var d=i.props.unstyled,f=GO[s](c,d);f.boxSizing="border-box";var h=i.props.styles[s];return h?h(f,c):f},i.getClassNames=function(s,c){var d,f;return(d=(f=i.props.classNames)[s])===null||d===void 0?void 0:d.call(f,c)},i.getElementId=function(s){return"".concat(i.state.instancePrefix,"-").concat(s)},i.getComponents=function(){return mO(i.props)},i.buildCategorizedOptions=function(){return ls(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return qg(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(s,c){i.setState({ariaSelection:ve({value:s},c)})},i.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(s){i.blockOptionHover=!1},i.onControlMouseDown=function(s){if(!s.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},i.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),s.preventDefault()}},i.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(i.clearValue(),s.preventDefault(),i.openAfterFocus=!1,s.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(s){typeof i.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&is(s.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(s)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(s){var c=s.touches,d=c&&c.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(s){var c=s.touches,d=c&&c.item(0);if(d){var f=Math.abs(d.clientX-i.initialTouchX),h=Math.abs(d.clientY-i.initialTouchY),p=5;i.userIsDragging=f>p||h>p}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var c=i.props.inputValue,d=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){if(!(i.blockOptionHover||i.state.focusedOption===s)){var c=i.getFocusableOptions(),d=c.indexOf(s);i.setState({focusedOption:s,focusedOptionId:d>-1?i.getFocusedOptionId(s):null})}},i.shouldHideSelectedOptions=function(){return nm(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var c=i.props,d=c.isMulti,f=c.backspaceRemovesValue,h=c.escapeClearsValue,p=c.inputValue,g=c.isClearable,m=c.isDisabled,v=c.menuIsOpen,A=c.onKeyDown,x=c.tabSelectsValue,b=c.openMenuOnFocus,S=i.state,y=S.focusedOption,w=S.focusedValue,E=S.selectValue;if(!m&&!(typeof A=="function"&&(A(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!d||p)return;i.focusValue("previous");break;case"ArrowRight":if(!d||p)return;i.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(w)i.removeValue(w);else{if(!f)return;d?i.popValue():g&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!v||!x||!y||b&&i.isOptionSelected(y,E))return;i.selectOption(y);break;case"Enter":if(s.keyCode===229)break;if(v){if(!y||i.isComposing)return;i.selectOption(y);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:p}),i.onMenuClose()):g&&h&&i.clearValue();break;case" ":if(p)return;if(!v){i.openMenu("first");break}if(!y)return;i.selectOption(y);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++nR),i.state.selectValue=rs(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),l=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[l],i.state.focusedOptionId=tu(o,a[l])}return i}return OP(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&&xg(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,l=o.menuIsOpen,s=this.state.isFocused;(s&&!a&&i.isDisabled||s&&l&&!i.menuIsOpen)&&this.focusInput(),s&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(xg(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,l=a.selectValue,s=a.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,l=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=a.indexOf(l);l||(s=-1);var c=a.length-1,d=-1;if(a.length){switch(i){case"previous":s===0?d=0:s===-1?d=c:d=s-1;break;case"next":s>-1&&s<c&&(d=s+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:a[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var s=0,c=l.indexOf(a);a||(c=-1),i==="up"?s=c>0?c-1:l.length-1:i==="down"?s=(c+1)%l.length:i==="pageup"?(s=c-o,s<0&&(s=0)):i==="pagedown"?(s=c+o,s>l.length-1&&(s=l.length-1)):i==="last"&&(s=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(eu):ve(ve({},eu),this.props.theme):eu}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,l=this.getClassNames,s=this.getValue,c=this.selectOption,d=this.setValue,f=this.props,h=f.isMulti,p=f.isRtl,g=f.options,m=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:l,getValue:s,hasValue:m,isMulti:h,isRtl:p,options:g,selectOption:c,selectProps:f,setValue:d,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 Zg(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return em(this.props,i,o)}},{key:"filterOption",value:function(i,o){return tm(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:l})}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,l=i.inputId,s=i.inputValue,c=i.tabIndex,d=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),g=p.Input,m=this.state,v=m.inputIsHidden,A=m.ariaSelection,x=this.commonProps,b=l||this.getElementId("input"),S=ve(ve(ve({"aria-autocomplete":"list","aria-expanded":f,"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||""},f&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(A==null?void 0:A.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?z.createElement(g,D({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:o,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:s},S)):z.createElement(PO,D({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ns,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:d,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,l=o.MultiValueContainer,s=o.MultiValueLabel,c=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,h=this.commonProps,p=this.props,g=p.controlShouldRenderValue,m=p.isDisabled,v=p.isMulti,A=p.inputValue,x=p.placeholder,b=this.state,S=b.selectValue,y=b.focusedValue,w=b.isFocused;if(!this.hasValue()||!g)return A?null:z.createElement(f,D({},h,{key:"placeholder",isDisabled:m,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),x);if(v)return S.map(function(k,N){var Y=k===y,W="".concat(i.getOptionLabel(k),"-").concat(i.getOptionValue(k));return z.createElement(a,D({},h,{components:{Container:l,Label:s,Remove:c},isFocused:Y,isDisabled:m,key:W,index:N,removeProps:{onClick:function(){return i.removeValue(k)},onTouchEnd:function(){return i.removeValue(k)},onMouseDown:function(H){H.preventDefault()}},data:k}),i.formatOptionLabel(k,"value"))});if(A)return null;var E=S[0];return z.createElement(d,D({},h,{data:E,isDisabled:m}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,l=this.props,s=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||s||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return z.createElement(o,D({},a,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,l=this.props,s=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!o||!c)return null;var f={"aria-hidden":"true"};return z.createElement(o,D({},a,{innerProps:f,isDisabled:s,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var l=this.commonProps,s=this.props.isDisabled,c=this.state.isFocused;return z.createElement(a,D({},l,{isDisabled:s,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return z.createElement(o,D({},a,{innerProps:c,isDisabled:l,isFocused:s}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,l=o.GroupHeading,s=o.Menu,c=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,p=o.Option,g=this.commonProps,m=this.state.focusedOption,v=this.props,A=v.captureMenuScroll,x=v.inputValue,b=v.isLoading,S=v.loadingMessage,y=v.minMenuHeight,w=v.maxMenuHeight,E=v.menuIsOpen,k=v.menuPlacement,N=v.menuPosition,Y=v.menuPortalTarget,W=v.menuShouldBlockScroll,T=v.menuShouldScrollIntoView,H=v.noOptionsMessage,G=v.onMenuScrollToTop,$=v.onMenuScrollToBottom;if(!E)return null;var B=function(F,j){var te=F.type,se=F.data,ae=F.isDisabled,J=F.isSelected,le=F.label,ne=F.value,ge=m===se,Se=ae?void 0:function(){return i.onOptionHover(se)},Ue=ae?void 0:function(){return i.selectOption(se)},wt="".concat(i.getElementId("option"),"-").concat(j),at={id:wt,onClick:Ue,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:J};return z.createElement(p,D({},g,{innerProps:at,data:se,isDisabled:ae,isSelected:J,key:wt,label:le,type:te,value:ne,isFocused:ge,innerRef:ge?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(F.data,"menu"))},L;if(this.hasOptions())L=this.getCategorizedOptions().map(function(M){if(M.type==="group"){var F=M.data,j=M.options,te=M.index,se="".concat(i.getElementId("group"),"-").concat(te),ae="".concat(se,"-heading");return z.createElement(a,D({},g,{key:se,data:F,options:j,Heading:l,headingProps:{id:ae,data:M.data},label:i.formatGroupLabel(M.data)}),M.options.map(function(J){return B(J,"".concat(te,"-").concat(J.index))}))}else if(M.type==="option")return B(M,"".concat(M.index))});else if(b){var U=S({inputValue:x});if(U===null)return null;L=z.createElement(f,g,U)}else{var q=H({inputValue:x});if(q===null)return null;L=z.createElement(h,g,q)}var ee={minMenuHeight:y,maxMenuHeight:w,menuPlacement:k,menuPosition:N,menuShouldScrollIntoView:T},O=z.createElement(lD,D({},g,ee),function(M){var F=M.ref,j=M.placerProps,te=j.placement,se=j.maxHeight;return z.createElement(s,D({},g,ee,{innerRef:F,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:b,placement:te}),z.createElement(BO,{captureEnabled:A,onTopArrive:G,onBottomArrive:$,lockEnabled:W},function(ae){return z.createElement(c,D({},g,{innerRef:function(le){i.getMenuListRef(le),ae(le)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:i.getElementId("listbox")},isLoading:b,maxHeight:se,focusedOption:m}),L)}))});return Y||N==="fixed"?z.createElement(d,D({},g,{appendTo:Y,controlElement:this.controlRef,menuPlacement:k,menuPosition:N}),O):O}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,l=o.isDisabled,s=o.isMulti,c=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return z.createElement(FO,{name:c,onFocus:this.onValueInputFocus});if(!(!c||l))if(s)if(a){var h=f.map(function(m){return i.getOptionValue(m)}).join(a);return z.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(m,v){return z.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(m)})}):z.createElement("input",{name:c,type:"hidden",value:""});return z.createElement("div",null,p)}else{var g=f[0]?this.getOptionValue(f[0]):"";return z.createElement("input",{name:c,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,l=o.focusedOption,s=o.focusedValue,c=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return z.createElement(SO,D({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:l,focusedValue:s,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,l=i.SelectContainer,s=i.ValueContainer,c=this.props,d=c.className,f=c.id,h=c.isDisabled,p=c.menuIsOpen,g=this.state.isFocused,m=this.commonProps=this.getCommonProps();return z.createElement(l,D({},m,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:g}),this.renderLiveRegion(),z.createElement(o,D({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:g,menuIsOpen:p}),z.createElement(s,D({},m,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),z.createElement(a,D({},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,l=o.clearFocusValueOnUpdate,s=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,h=o.instancePrefix,p=i.options,g=i.value,m=i.menuIsOpen,v=i.inputValue,A=i.isMulti,x=rs(g),b={};if(a&&(g!==a.value||p!==a.options||m!==a.menuIsOpen||v!==a.inputValue)){var S=m?ZO(i,x):[],y=m?Qg(ls(i,x),"".concat(h,"-option")):[],w=l?eR(o,x):null,E=tR(o,S),k=tu(y,E);b={selectValue:x,focusedOption:E,focusedOptionId:k,focusableOptionsWithIds:y,focusedValue:w,clearFocusValueOnUpdate:!1}}var N=s!=null&&i!==a?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},Y=c,W=d&&f;return d&&!W&&(Y={value:oo(A,x,x[0]||null),options:x,action:"initial-input-focus"},W=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(Y=null),ve(ve(ve({},b),N),{},{prevProps:i,ariaSelection:Y,prevWasFocused:W})}}]),n}(C.Component);rm.defaultProps=XO;var rR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function iR(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,l=e.inputValue,s=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,p=e.value,g=xn(e,rR),m=C.useState(l!==void 0?l:n),v=Vn(m,2),A=v[0],x=v[1],b=C.useState(s!==void 0?s:i),S=Vn(b,2),y=S[0],w=S[1],E=C.useState(p!==void 0?p:a),k=Vn(E,2),N=k[0],Y=k[1],W=C.useCallback(function(U,q){typeof c=="function"&&c(U,q),Y(U)},[c]),T=C.useCallback(function(U,q){var ee;typeof d=="function"&&(ee=d(U,q)),x(ee!==void 0?ee:U)},[d]),H=C.useCallback(function(){typeof h=="function"&&h(),w(!0)},[h]),G=C.useCallback(function(){typeof f=="function"&&f(),w(!1)},[f]),$=l!==void 0?l:A,B=s!==void 0?s:y,L=p!==void 0?p:N;return ve(ve({},g),{},{inputValue:$,menuIsOpen:B,onChange:W,onInputChange:T,onMenuClose:G,onMenuOpen:H,value:L})}var oR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],im=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},nu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return im(t,o,i)})||r.some(function(o){return im(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function aR(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?nu.formatCreateLabel:o,l=e.isValidNewOption,s=l===void 0?nu.isValidNewOption:l,c=e.getNewOptionData,d=c===void 0?nu.getNewOptionData:c,f=e.onCreateOption,h=e.options,p=h===void 0?[]:h,g=e.onChange,m=xn(e,oR),v=m.getOptionValue,A=v===void 0?Gg:v,x=m.getOptionLabel,b=x===void 0?Wg:x,S=m.inputValue,y=m.isLoading,w=m.isMulti,E=m.value,k=m.name,N=C.useMemo(function(){return s(S,rs(E),p,{getOptionValue:A,getOptionLabel:b})?d(S,a(S)):void 0},[a,d,b,A,S,s,p,E]),Y=C.useMemo(function(){return(n||!y)&&N?i==="first"?[N].concat(ni(p)):[].concat(ni(p),[N]):p},[n,i,y,N,p]),W=C.useCallback(function(T,H){if(H.action!=="select-option")return g(T,H);var G=Array.isArray(T)?T:[T];if(G[G.length-1]===N){if(f)f(S);else{var $=d(S,S),B={action:"create-option",name:k,option:$};g(oo(w,[].concat(ni(rs(E)),[$]),$),B)}return}g(T,H)},[d,S,w,k,N,f,g,E]);return ve(ve({},m),{},{options:Y,onChange:W})}var sR=C.forwardRef(function(e,t){var n=iR(e),r=aR(n);return z.createElement(rm,D({ref:t},r))}),om=sR;const lR={control:(e,t)=>X(V({},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=>X(V({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(V({},e),{minHeight:"36px"}),menu:e=>X(V({},e),{position:"relative"}),clearIndicator:e=>X(V({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(V({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(V({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(V({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>X(V({},e),{color:"#333"})},cR=e=>e.map(t=>({label:t,value:t})),uR=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=cR(e.flags),a=()=>i(!r),l=f=>{e.onChange(f.map(h=>h.value))},s=f=>{n(f)},c=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const p=[...e.flags,t];e.onChange(p)}if(e.flags&&e.flags.length>0&&d()){const p=[...e.flags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.flags.length&&e.flags.includes(t)?(a(),f):(f=!0,f)};return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(om,{styles:lR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:s,onKeyDown:c,placeholder:e.labels.flagsPlaceholder,value:o})}),u.jsx(ut,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},so=e=>{const[t,n]=C.useState(!1),[r,i]=C.useState(!1),[o,a]=C.useState(!1),[l,s]=C.useState(!1),[c,d]=C.useState(""),[f,h]=C.useState("primary"),[p,g]=C.useState(""),m=C.useRef(null),v=()=>{m.current&&m.current.click()},A=new Op,x=pt(),b=()=>{d(""),i(!1)},S=H=>{let G="",$="primary";switch(H){case"copy_url":G=e.labels.urlCopiedToClipboardMessage,$="primary";break;case"image_deleted":G=e.labels.imageDeletedMessage,$="primary";break;case"image_reset":G=e.labels.imageResetMessage,$="primary";break;case"upload_success":G=e.labels.uploadingImageMessage,$="success";break;case"upload_failed":G=e.labels.uploadingImageErrorMessage,$="danger";break;case"sign_in_url_failed":G=e.labels.generateSignedInUrlErrorMessage,$="danger";break;case"encrypting_file_failed":G=e.labels.encryptingImageErrorMessage,$="danger";break}h($),d(G),i(!0)},y=()=>a(!o),w=()=>s(!l),E=()=>{e.clearImage(),S("image_deleted")},k=H=>{navigator.clipboard.writeText(H),S("copy_url")},N=H=>P(this,null,function*(){H.persist();const G=H.target.files?H.target.files[0]:null;if(G){n(!0);try{const $=G.type.split("/")[1],B=yield A.readFileAndHash(G),L=(yield A.generateHashFileName(G))+"."+$,U={image_type:$,image_file_name:L,image_size:G.size,base64_sum:B},q=yield x==null?void 0:x.https.generateSignedInUrl(U);if(q!=null&&q.ok){const ee=yield q.json(),O={"Content-Type":G.type,"Content-MD5":B};try{const M=new File([G],L,{type:G.type}),F=yield x==null?void 0:x.https.storeInBucket(ee.data.signed_url,M,O);e.onChangeImages(F||""),g(F),S("upload_success")}catch(M){console.error("There was a problem with uploading the file: ",M),S("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield q==null?void 0:q.json()),S("sign_in_url_failed")}catch($){console.error("There was a problem with encrypting file...",$),S("encrypting_file_failed")}n(!1)}}),Y=H=>P(this,null,function*(){if(H){n(!0);try{const G=H.type.split("/")[1],$=yield A.readFileAndHash(H),B=(yield A.generateHashFileName(H))+"."+G,L={image_type:G,image_file_name:B,image_size:H.size,base64_sum:$},U=yield x==null?void 0:x.https.generateSignedInUrl(L);if(U!=null&&U.ok){const q=yield U.json(),ee={"Content-Type":H.type,"Content-MD5":$};try{const O=new File([H],B,{type:H.type}),M=yield x==null?void 0:x.https.storeInBucket(q.data.signed_url,O,ee);e.onChangeImages(M||""),S("upload_success")}catch(O){console.error("There was a problem with uploading the file: ",O),S("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield U==null?void 0:U.json()),S("sign_in_url_failed")}catch(G){console.error("There was a problem with encrypting file...",G),S("encrypting_file_failed")}n(!1)}}),W=()=>{e.onChangeImages(p),S("image_reset")},T=H=>{e.onChangeImages(H),g(H)};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(I.Typography,{level:"title-lg",children:e.title}),u.jsx(I.Tooltip,{title:e.labels.clearImage,children:u.jsx(I.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:u.jsx(xp,{})})})]}),u.jsxs(I.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(I.Skeleton,{loading:t,animation:"wave",children:[e.image?u.jsx(I.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)"}}}):u.jsx(Ic,{sx:{fontSize:"3rem",opacity:.2}}),e.image?u.jsx(I.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:u.jsx(Mp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(I.Tooltip,{title:e.labels.copyUrl,children:u.jsx(I.Button,{onClick:()=>k(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(I.Tooltip,{title:e.labels.viewImage,children:u.jsx(I.Button,{onClick:y,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(I.Tooltip,{title:e.labels.cropImage,children:u.jsx(I.Button,{onClick:w,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(I.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(I.Button,{sx:{width:"100%"},onClick:v,children:[u.jsx(Le.Upload,{})," ",e.labels.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:N,ref:m})]})}),x.https.sportal365Config?u.jsx(I.AccordionGroup,{variant:"soft",children:u.jsxs(I.Accordion,{children:[u.jsx(I.AccordionSummary,{children:u.jsx(I.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),u.jsx(I.AccordionDetails,{children:u.jsx(Lp,{labels:e.labels,onChangeImages:T})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(ut,{showToast:r,message:c,color:f,hideToast:b}),u.jsx(Rp,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:y}),u.jsx(Zp,{labels:e.labels,open:l,imageSrc:e.image,toggleModal:w,uploadImage:Y,resetDefaultImageUrl:W})]})},dR=["cover","mobile"],fR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),hR=e=>e?V({},e):{main:"",mobile:"",cover:""},pR=e=>{const[t,n]=C.useState(!1),r=hR(e.defaultValue),i=fR(e.labels),o=(l,s)=>{r[s]=l,e.onChange(r)},a=l=>{r[l]="",e.onChange(r)};return u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(so,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:l=>o(l,"main"),clearImage:()=>a("main")}),u.jsx(I.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(u.Fragment,{children:dR.map(l=>u.jsx(so,{labels:e.labels,title:i.get(l),image:r[l],onChangeImages:s=>o(s,l),clearImage:()=>a(l)},`images-${l}`))}):u.jsx(u.Fragment,{})]})};function gR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const mR=["className","color","component","variant","invertedColors","slots","slotProps"],vR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return lt(r,gR,{})},bR=be("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:l,background:s}=Zl({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),c=Zn(e,`palette.${a}`)||a||Zn(e,`palette.${l}`)||l||s||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||e.vars.palette.background.surface;return[D({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":c==="transparent"?"initial":c,"--Sheet-background":c==="transparent"?"initial":c},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"}),D({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&G_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&Y_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),yR=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:l="plain",invertedColors:s=!1,slots:c={},slotProps:d={}}=r,f=Ae(r,mR),h=D({},r,{color:o,component:a,invertedColors:s,variant:l}),p=vR(h),g=D({},f,{component:a,slots:c,slotProps:d}),[m,v]=Ie("root",{ref:n,className:Ln(p.root,i),elementType:bR,externalForwardedProps:g,ownerState:h});return u.jsx(m,D({},v))});function xR(e){return it("MuiTypography",e)}Xe("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 CR=["color","textColor"],wR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],ru=z.createContext(!1),IR=z.createContext(!1),SR=e=>{const{gutterBottom:t,noWrap:n,level:r,color:i,variant:o}=e,a={root:["root",r,t&&"gutterBottom",n&&"noWrap",i&&`color${ye(i)}`,o&&`variant${ye(o)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return lt(a,xR,{})},AR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),TR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),ER=be("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const l=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return D({"--Icon-fontSize":`calc(1em * ${l})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:D({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&D({display:"flex",alignItems:"center"},t.nesting&&D({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&&D({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]))}),am={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"},iu=z.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,l=Ae(i,CR),s=z.useContext(ru),c=z.useContext(IR),d=BA(D({},l,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:g="body-md",levelMapping:m=am,children:v,endDecorator:A,startDecorator:x,variant:b,slots:S={},slotProps:y={}}=d,w=Ae(d,wR),E=(r=t.color)!=null?r:b?o!=null?o:"neutral":o,k=s||c?t.level||"inherit":g,N=Gf(v,["Skeleton"]),Y=f||(s?"span":m[k]||am[k]||"span"),W=D({},d,{level:k,component:Y,color:E,gutterBottom:h,noWrap:p,nesting:s,variant:b,unstable_hasSkeleton:N}),T=SR(W),H=D({},w,{component:Y,slots:S,slotProps:y}),[G,$]=Ie("root",{ref:n,className:T.root,elementType:ER,externalForwardedProps:H,ownerState:W}),[B,L]=Ie("startDecorator",{className:T.startDecorator,elementType:AR,externalForwardedProps:H,ownerState:W}),[U,q]=Ie("endDecorator",{className:T.endDecorator,elementType:TR,externalForwardedProps:H,ownerState:W});return u.jsx(ru.Provider,{value:!0,children:u.jsxs(G,D({},$,{children:[x&&u.jsx(B,D({},L,{children:x})),N?z.cloneElement(v,{variant:v.props.variant||"inline"}):v,A&&u.jsx(U,D({},q,{children:A}))]}))})});iu.muiName="Typography";function _R(e){return it("MuiFormControl",e)}const sm=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),kR=Xe("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),PR=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],DR=e=>{const{disabled:t,error:n,size:r,color:i,orientation:o}=e,a={root:["root",o,t&&"disabled",n&&"error",i&&`color${ye(i)}`,r&&`size${ye(r)}`]};return lt(a,_R,{})},OR=be("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return D({"--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",[`&.${sm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${sm.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 ~ .${kR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),ou=z.forwardRef(function(t,n){const r=ct({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:l=!1,required:s=!1,error:c=!1,color:d,size:f="md",orientation:h="vertical",slots:p={},slotProps:g={}}=r,m=Ae(r,PR),v=ji(i),[A,x]=z.useState(null),b=D({},r,{id:v,component:a,color:d,disabled:l,error:c,required:s,size:f,orientation:h});let S;const y=DR(b),[w,E]=Ie("root",{ref:n,className:Ln(y.root,o),elementType:OR,externalForwardedProps:D({},m,{component:a,slots:p,slotProps:g}),ownerState:b}),k=z.useMemo(()=>({disabled:l,required:s,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":A?`${v}-helper-text`:void 0,setHelperText:x,registerEffect:S}),[d,l,c,A,v,S,s,f]);return u.jsx(Ua.Provider,{value:k,children:u.jsx(w,D({},E))})});function RR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const MR=["children","component","htmlFor","id","slots","slotProps"],LR=()=>lt({root:["root"],asterisk:["asterisk"]},RR,{}),BR=be("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)"})),$R=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),au=z.forwardRef(function(t,n){var r,i;const o=ct({props:t,name:"JoyFormLabel"}),{children:a,component:l="label",htmlFor:s,id:c,slots:d={},slotProps:f={}}=o,h=Ae(o,MR),p=z.useContext(Ua),g=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,m=D({},o,{required:g}),v=LR(),A=D({},h,{component:l,slots:d,slotProps:f}),[x,b]=Ie("root",{additionalProps:{htmlFor:s!=null?s:p==null?void 0:p.htmlFor,id:c!=null?c:p==null?void 0:p.labelId},ref:n,className:v.root,elementType:BR,externalForwardedProps:A,ownerState:m}),[S,y]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:$R,externalForwardedProps:A,ownerState:m});return u.jsxs(x,D({},b,{children:[a,g&&u.jsxs(S,D({},y,{children:[" ","*"]}))]}))}),NR=({environment:e,userNotFound:t})=>{const[n,r]=C.useState(""),[i,o]=C.useState(""),[a,l]=C.useState(!1),s=()=>{l(!a)},c=h=>{h.persist(),r(h.target.value)},d=h=>{h.persist(),o(h.target.value)},f=()=>P(this,null,function*(){try{yield zi(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),s()}});return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:u.jsxs(yR,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[u.jsxs("div",{children:[u.jsx(iu,{level:"h4",component:"h1",children:u.jsx("b",{children:"Sign in"})}),u.jsx(iu,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Email"}),u.jsx(Ha,{name:"email",type:"email",onChange:c})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Password"}),u.jsx(Ha,{name:"password",type:"password",onChange:d})]}),u.jsx(Xr,{sx:{mt:1},onClick:f,children:"Log in"})]})}),u.jsx(ut,{showToast:a,message:t,color:"danger",hideToast:s})]})};function FR(e){return it("MuiCheckbox",e)}const ii=Xe("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),zR=nc(u.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"),jR=nc(u.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"),VR=["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"],UR=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:l,indeterminate:s}=e,c={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${ye(a)}`,o&&`color${ye(o)}`,l&&`size${ye(l)}`],checkbox:["checkbox",t&&"checked",s&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return lt(c,FR,{})},HR=be("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return D({"--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,[`&.${ii.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,[`&.${ii.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),WR=be("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const l=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[D({"--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"},{[`&.${ii.checked}, &.${ii.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[D({},l,{backgroundColor:(r=l==null?void 0:l.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]},{[`&.${ii.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),GR=be("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]},{[`&.${ii.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),YR=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),KR=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>D({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),qR=u.jsx(zR,{}),QR=u.jsx(jR,{}),JR=z.forwardRef(function(t,n){var r,i,o,a,l;const s=ct({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=qR,label:h,defaultChecked:p,disabled:g,disableIcon:m=!1,overlay:v,id:A,indeterminate:x=!1,indeterminateIcon:b=QR,name:S,onBlur:y,onChange:w,onFocus:E,onFocusVisible:k,readOnly:N,required:Y,value:W,color:T,variant:H,size:G="md",component:$,slots:B={},slotProps:L={}}=s,U=Ae(s,VR),q=z.useContext(Ua),ee=(r=(i=t.disabled)!=null?i:q==null?void 0:q.disabled)!=null?r:g,O=(o=(a=t.size)!=null?a:q==null?void 0:q.size)!=null?o:G,M=ji(A!=null?A:q==null?void 0:q.htmlFor),F={checked:c,defaultChecked:p,disabled:ee,onBlur:y,onChange:w,onFocus:E,onFocusVisible:k},{getInputProps:j,checked:te,disabled:se,focusVisible:ae}=TS(F),J=te||x,ge=J?H||"solid":H||"outlined",Se=t.color||(q!=null&&q.error?"danger":(l=q==null?void 0:q.color)!=null?l:T),at=D({},s,{checked:te,disabled:se,disableIcon:m,overlay:v,focusVisible:ae,color:J?Se||"primary":Se||"neutral",variant:ge,size:O}),kt=UR(at),de=D({},U,{component:$,slots:B,slotProps:L}),[he,xe]=Ie("root",{ref:n,className:kt.root,elementType:HR,externalForwardedProps:de,ownerState:at}),[Te,He]=Ie("checkbox",{className:kt.checkbox,elementType:WR,externalForwardedProps:de,ownerState:at}),[Pe,Ee]=Ie("action",{className:kt.action,elementType:GR,externalForwardedProps:de,ownerState:at}),[It,St]=Ie("input",{additionalProps:D({id:M,name:S,value:W,readOnly:N,role:void 0,required:Y!=null?Y:q==null?void 0:q.required,"aria-describedby":q==null?void 0:q["aria-describedby"]},x&&{"aria-checked":"mixed"}),className:kt.input,elementType:YR,externalForwardedProps:de,getSlotProps:j,ownerState:at}),[jt,Mt]=Ie("label",{additionalProps:{htmlFor:M},className:kt.label,elementType:KR,externalForwardedProps:de,ownerState:at});let qt=d;return m?qt=null:x?qt=b:te&&(qt=f),u.jsxs(he,D({},xe,{children:[u.jsxs(Te,D({},He,{children:[u.jsx(Pe,D({},Ee,{children:u.jsx(It,D({},St))})),qt]})),h&&u.jsx(ru.Provider,{value:!0,children:u.jsx(jt,D({},Mt,{children:h}))})]}))}),XR=Ve(u.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),oi=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:l})=>{const s=(c,d)=>{c.persist();let f=[...t];if(c.target.checked){f.push(d),a(f);return}f=t.filter(h=>h!==d),a(f)};return u.jsxs(I.Box,{sx:{mb:2},children:[u.jsx(I.Typography,{level:"body-sm",mb:1,children:e}),u.jsxs(D1,{orientation:"horizontal",wrap:!0,sx:{"--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(c=>u.jsxs(Lh,{children:[t.includes(c)&&u.jsx(XR,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(JR,{checked:t.includes(c),variant:t.includes(c)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[c]||"N/A",onChange:d=>s(d,c),slotProps:{action:({checked:d})=>({sx:d?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${c}`)),i===!1?u.jsx(Lh,{children:u.jsx(I.Link,{onClick:l,children:o})}):u.jsx(u.Fragment,{})]})]})},ai={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"]},ZR=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=C.useState(!1);return u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.marketSelection}),u.jsx(I.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),u.jsx(oi,{label:"Popular",values:t,allValues:ai.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?u.jsxs(u.Fragment,{children:[u.jsx(oi,{label:e.playerRelated,values:t,allValues:ai.playerRelated,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.goals,values:t,allValues:ai.goals,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.corners,values:t,allValues:ai.corners,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.correctScores,values:t,allValues:ai.correctScores,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.misc,values:t,allValues:ai.misc,valuesMap:n,onChange:r})]}):u.jsx(u.Fragment,{})]})},gt={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="},eM=({match:e,timeFormat:t})=>{var n,r,i,o;return u.jsxs(I.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[u.jsxs(I.Typography,{mr:1,children:["[",_t(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?u.jsx(I.Tooltip,{title:e.homeTeam.name,children:u.jsxs(I.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[u.jsx(I.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(I.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||gt.team,sx:{width:"20px",height:"20px"}})]})}):u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(I.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||gt.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?u.jsx(I.Tooltip,{title:e.awayTeam.name,children:u.jsxs(I.Box,{display:"flex",gap:.5,alignItems:"center",children:[u.jsx(I.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||gt.team,sx:{width:"20px",height:"20px"}})," ",u.jsx(I.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):u.jsxs(u.Fragment,{children:[u.jsx(I.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||gt.team,sx:{width:"20px",height:"20px"}}),u.jsx(I.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},lm=Ve(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),tM=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),{sdk:l}=pt(),s=()=>P(this,null,function*(){try{const h=yield l.topX.getGames({limit:50},!0),p=yield l.matchQuiz.getGames({limit:50},!0),g=[...h.data,...p.data];if(e.related&&e.related.length>0){const m=g.filter(v=>{var A;return(A=e.related)==null?void 0:A.some(x=>x.entity_id===v.id)}).map(v=>v.id);n(m)}i(g)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(g=>({entity_id:g,entity_type:"GAME",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return C.useEffect(()=>{s()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.label}),u.jsx(I.Select,{multiple:!0,indicator:u.jsx(lm,{}),defaultValue:t,renderValue:f=>u.jsx(I.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(I.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${I.selectClasses.indicator}`]:{transition:"0.2s",[`&.${I.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(I.Option,{value:f.id,children:f.title?f.title+` (${f.type})`:`Game with no title (${f.type}). ID: ${f.id}`},`related-game-title-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(ut,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},nM=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),{sdk:l}=pt(),s=()=>P(this,null,function*(){try{const h=yield l.loyalty.getTemplates(void 0,!0);if(e.related&&e.related.length>0){const p=h.data.filter(g=>{var m;return(m=e.related)==null?void 0:m.some(v=>v.entity_id===g.id)}).map(g=>g.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(g=>({entity_id:g,entity_type:"TEMPLATE",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return C.useEffect(()=>{s()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.label}),u.jsx(I.Select,{multiple:!0,indicator:u.jsx(lm,{}),defaultValue:t,renderValue:f=>u.jsx(I.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(I.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${I.selectClasses.indicator}`]:{transition:"0.2s",[`&.${I.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(I.Option,{value:f.id,children:f.name||`Template with no name. ID: ${f.id}`},`related-template-name-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(ut,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},cm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),um=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),rM=e=>{const t=(n,r)=>{if(r==="games"){const i=um(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=cm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(tM,{label:e.labels.games,related:cm(e.related),onChange:n=>t(n,"games")}),u.jsx(nM,{label:e.labels.templates,related:um(e.related),onChange:n=>t(n,"templates")})]})},iM=(e,t)=>{const[n,r]=C.useState(null),{https:i}=pt(),o=()=>P(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const l=yield a.json();r(l.data);return}r([])});return C.useEffect(()=>(o(),()=>r(null)),[e,t]),n},us=({my:e})=>u.jsx(I.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:u.jsx(I.CircularProgress,{variant:"solid",color:"neutral"})}),oM=["PENDING","LIVE","SETTLED"],aM=["CANCELED","LIVE","OPEN","PENDING"],sM=["ACTIVE","INACTIVE","EXPIRED"],lM=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"),dm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(sM):e.entityType==="TEMPLATE"?t=Array.from(oM):t=Array.from(aM),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(I.Option,{value:n,children:lM.get(n)},`${e.entityType}-${n}-status`))})};class cM{constructor(){oe(this,"name","");oe(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});oe(this,"trigger",{trigger_type:"DATETIME",date:""})}}const uM=Ve(u.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"),dM=e=>{const[t,n]=C.useState(!1),{https:r}=pt(),i=o=>P(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 u.jsx(u.Fragment,{children:u.jsx(I.Modal,{open:e.isOpen,onClose:e.toggleModal,children:u.jsxs(I.ModalDialog,{children:[u.jsxs(I.DialogTitle,{children:[u.jsx(uM,{}),e.labels.deleteScheduledTaskModalTitle]}),u.jsx(I.Divider,{}),u.jsx(I.DialogContent,{children:u.jsxs(I.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,u.jsx(I.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),u.jsxs(I.DialogActions,{children:[u.jsx(I.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),u.jsx(I.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},fM=e=>{const[t,n]=C.useState(null),[r,i]=C.useState(""),[o,a]=C.useState(""),[l,s]=C.useState(""),[c,d]=C.useState(""),[f,h]=C.useState(!1),[p,g]=C.useState(!1),[m,v]=C.useState(!1),[A,x]=C.useState("success"),[b,S]=C.useState(""),[y,w]=C.useState(!1),E=C.useRef(!1),k=iM(e.entityId,E.current),{https:N}=pt();if(!k)return u.jsx(us,{my:10});const Y=()=>w(!y),W=(L,U)=>{v(!0),x(L),S(U)},T=(L,U)=>{i(U.scheduled_task_config.change.status),s(U.trigger.date),n(L)},H=()=>P(this,null,function*(){h(!0);const L=B("CREATE","");if((yield N.setSchedulers(L,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,W("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),W("danger",e.labels.createScheduledTaskErrorMessage)}),G=(L,U)=>P(this,null,function*(){g(!0);const q=B("UPDATE",U);if((yield N.setSchedulers(q,"UPDATE",L)).ok){g(!1),n(null),i(""),s(""),E.current=!E.current,W("success",e.labels.updateScheduledTaskMessage);return}g(!1),W("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),s("")}),$=()=>{E.current=!E.current},B=(L,U)=>{const q=new cM,ee=L==="CREATE"?o:r,O=L==="CREATE"?null:U,M=L==="CREATE"?c:l;return q.scheduled_task_config.entity_id=e.entityId,q.scheduled_task_config.entity_type=e.entityType,q.scheduled_task_config.change.status=ee,q.trigger.date=M,q.name=O,q};return u.jsxs(u.Fragment,{children:[k.map((L,U)=>u.jsx(I.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(I.CardContent,{children:t===U?u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(I.Select,{value:r,size:"sm",name:"status",onChange:(q,ee)=>i(ee),sx:{minHeight:"36px"},children:u.jsx(dm,{entityType:e.entityType})})]}),u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:l,onChange:q=>s(q)})]}),r&&l?u.jsx(I.Button,{onClick:()=>G(L.id,L.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):u.jsx(I.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:L.name})]}),u.jsxs(I.Typography,{style:{color:"gray"},children:[e.labels.status,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:L.status})]})]}),u.jsxs(I.Box,{children:[u.jsx(I.Tooltip,{title:e.labels.edit,children:u.jsx(I.IconButton,{onClick:()=>T(U,L),children:u.jsx(Le.Edit,{})})}),u.jsx(I.Tooltip,{title:e.labels.delete,children:u.jsx(I.IconButton,{onClick:Y,children:u.jsx(Le.Delete,{})})})]}),u.jsx(dM,{labels:e.labels,isOpen:y,taskId:L.id,taskName:L.name,toggleModal:Y,refetchTasks:$,toggleToast:W})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${L.id}`)),u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:k&&k.length?2:0},children:[u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(I.Select,{value:o,size:"sm",name:"status",onChange:(L,U)=>a(U),sx:{minHeight:"37px"},children:u.jsx(dm,{entityType:e.entityType})})]}),u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:c,onChange:L=>d(L)})]}),o&&c?u.jsx(I.Button,{onClick:H,loading:f,sx:{mt:"auto"},children:e.labels.create}):u.jsx(I.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),u.jsx(ut,{showToast:m,message:b,color:A,hideToast:()=>v(!1)})]})};function hM(e){return it("MuiIconButton",e)}Xe("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const pM=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],gM=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:l}=e,s={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${ye(a)}`,t&&`color${ye(t)}`,o&&`size${ye(o)}`,l&&"loading"],loadingIndicator:["loadingIndicator"]},c=lt(s,hM,{});return r&&i&&(c.root+=` ${i}`),c},mM=be("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[D({"--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]:D({"--Icon-color":"currentColor"},e.focus.default)}),D({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":D({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':D({"--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]})]}),vM=be(mM,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bM=be("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return D({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})}),fm=z.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyIconButton"}),{children:o,action:a,component:l="button",color:s="neutral",disabled:c,variant:d="plain",loading:f=!1,loadingIndicator:h,size:p="md",slots:g={},slotProps:m={}}=i,v=Ae(i,pM),A=z.useContext(Sp),x=z.useContext(Ap),b=t.variant||A.variant||d,S=t.size||A.size||p,y=t.color||A.color||s,w=(r=t.loading||t.disabled)!=null?r:A.disabled||f||c,E=z.useRef(null),k=sn(E,n),{focusVisible:N,setFocusVisible:Y,getRootProps:W}=Rl(D({},i,{disabled:w,rootRef:k})),T=h!=null?h:u.jsx(wp,{color:y,thickness:{sm:2,md:3,lg:4}[S]||3});z.useImperativeHandle(a,()=>({focusVisible:()=>{var M;Y(!0),(M=E.current)==null||M.focus()}}),[Y]);const H=D({},i,{component:l,color:y,disabled:w,variant:b,loading:f,size:S,focusVisible:N,instanceSize:t.size}),G=gM(H),$=M=>{var F;let j=i.onClick;if(typeof m.root=="function"?j=m.root(H).onClick:m.root&&(j=m.root.onClick),(F=j)==null||F(M),x){var te;(te=x.onClick)==null||te.call(x,M,i.value)}};let B=i["aria-pressed"];typeof m.root=="function"?B=m.root(H)["aria-pressed"]:m.root&&(B=m.root["aria-pressed"]),x!=null&&x.value&&(Array.isArray(x.value)?B=x.value.indexOf(i.value)!==-1:B=x.value===i.value);const L=D({},v,{component:l,slots:g,slotProps:m}),[U,q]=Ie("root",{ref:n,className:G.root,elementType:vM,getSlotProps:W,externalForwardedProps:L,ownerState:H,additionalProps:{onClick:$,"aria-pressed":B}}),[ee,O]=Ie("loadingIndicator",{className:G.loadingIndicator,elementType:bM,externalForwardedProps:L,ownerState:H});return u.jsx(U,D({},q,{children:f?u.jsx(ee,D({},O,{children:T})):o}))});fm.muiName="IconButton";const hm=Ve(u.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"),yM=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(s){var c,d;return s?u.jsxs(u.Fragment,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(I.Avatar,{size:"sm",src:((d=(c=n.find(f=>f.id===s.value))==null?void 0:c.assets)==null?void 0:d.logo)||gt.competition})}),s.label]}):null}const a=C.useRef(null),l=(s,c)=>{i(c)};return u.jsxs(I.FormControl,{sx:{mb:1},children:[u.jsx(I.FormLabel,{required:r,color:"primary",children:e}),u.jsx(I.Select,X(V({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:l},t&&{endDecorator:u.jsx(fm,{variant:"plain",color:"neutral",onMouseDown:s=>{s.stopPropagation()},onClick:()=>{var s;i(""),(s=a.current)==null||s.focusVisible()},sx:{width:"18px",height:"18px"},children:u.jsx(hm,{})}),indicator:null}),{children:n.map((s,c)=>{var d;return u.jsxs(C.Fragment,{children:[c!==0?u.jsx(I.ListDivider,{role:"none"}):null,u.jsxs(I.Option,{value:s.id,label:s.name,children:[u.jsx(I.ListItemDecorator,{children:u.jsx(I.Avatar,{size:"sm",src:((d=s.assets)==null?void 0:d.logo)||gt.competition})}),s.name]})]},`${s.id}-${c}`)})}))]})};function xM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pm=xM,CM=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,wM=CM,IM=wM,SM=typeof self=="object"&&self&&self.Object===Object&&self,AM=IM||SM||Function("return this")(),gm=AM,TM=gm,EM=function(){return TM.Date.now()},_M=EM,kM=/\s/;function PM(e){for(var t=e.length;t--&&kM.test(e.charAt(t)););return t}var DM=PM,OM=DM,RM=/^\s+/;function MM(e){return e&&e.slice(0,OM(e)+1).replace(RM,"")}var LM=MM,BM=gm,$M=BM.Symbol,su=$M,mm=su,vm=Object.prototype,NM=vm.hasOwnProperty,FM=vm.toString,lo=mm?mm.toStringTag:void 0;function zM(e){var t=NM.call(e,lo),n=e[lo];try{e[lo]=void 0;var r=!0}catch(o){}var i=FM.call(e);return r&&(t?e[lo]=n:delete e[lo]),i}var jM=zM,VM=Object.prototype,UM=VM.toString;function HM(e){return UM.call(e)}var WM=HM,bm=su,GM=jM,YM=WM,KM="[object Null]",qM="[object Undefined]",ym=bm?bm.toStringTag:void 0;function QM(e){return e==null?e===void 0?qM:KM:ym&&ym in Object(e)?GM(e):YM(e)}var JM=QM;function XM(e){return e!=null&&typeof e=="object"}var ZM=XM,eL=JM,tL=ZM,nL="[object Symbol]";function rL(e){return typeof e=="symbol"||tL(e)&&eL(e)==nL}var xm=rL,iL=LM,Cm=pm,oL=xm,wm=NaN,aL=/^[-+]0x[0-9a-f]+$/i,sL=/^0b[01]+$/i,lL=/^0o[0-7]+$/i,cL=parseInt;function uL(e){if(typeof e=="number")return e;if(oL(e))return wm;if(Cm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=iL(e);var n=sL.test(e);return n||lL.test(e)?cL(e.slice(2),n?2:8):aL.test(e)?wm:+e}var dL=uL,fL=pm,lu=_M,Im=dL,hL="Expected a function",pL=Math.max,gL=Math.min;function mL(e,t,n){var r,i,o,a,l,s,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(hL);t=Im(t)||0,fL(n)&&(d=!!n.leading,f="maxWait"in n,o=f?pL(Im(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(w){var E=r,k=i;return r=i=void 0,c=w,a=e.apply(k,E),a}function g(w){return c=w,l=setTimeout(A,t),d?p(w):a}function m(w){var E=w-s,k=w-c,N=t-E;return f?gL(N,o-k):N}function v(w){var E=w-s,k=w-c;return s===void 0||E>=t||E<0||f&&k>=o}function A(){var w=lu();if(v(w))return x(w);l=setTimeout(A,m(w))}function x(w){return l=void 0,h&&r?p(w):(r=i=void 0,a)}function b(){l!==void 0&&clearTimeout(l),c=0,r=s=i=l=void 0}function S(){return l===void 0?a:x(lu())}function y(){var w=lu(),E=v(w);if(r=arguments,i=this,s=w,E){if(l===void 0)return g(s);if(f)return clearTimeout(l),l=setTimeout(A,t),p(s)}return l===void 0&&(l=setTimeout(A,t)),a}return y.cancel=b,y.flush=S,y}var vL=mL;const si=fn(vL),Cn=({option:e})=>u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),u.jsx(I.Typography,{children:e.label}),u.jsx(I.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),Sm=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)||gt.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)||gt.flag}}))||[],bL=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=C.useState([]),[l,s]=C.useState([]),[c,d]=C.useState(!1),[f,h]=C.useState(""),[p,g]=C.useState(!1),{sdk:m}=pt(),v=()=>g(!p),A=(y,w)=>{a(w),i(w[0]?[w[0].id]:[])},x=3;C.useEffect(()=>{!f&&n&&n.length&&m.football.getCompetitions({competitionIds:n}).then(y=>{a(Sm(y))}).catch(y=>{console.error(y),v(),a([])})},[]);const b=C.useMemo(()=>si(y=>{d(!0),m.football.getCompetitions({name:y}).then(w=>{s([...Sm(w)]),d(!1)}).catch(w=>{console.error(w),v(),s([]),d(!1)})},300),[]);C.useEffect(()=>{if(!f||f.length<x){s([]);return}return b(f),()=>b.cancel()},[f,b]);const S=(y,w)=>y.map((E,k)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:N=>w({index:k}).onClick(N),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:E},`option_${E.id}`)},E.id));return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:r,color:"primary",children:t}),u.jsx(I.Box,{children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(y,w)=>y.id===w.id,endDecorator:c?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:l,disabled:o.length===1,filterOptions:y=>y.filter(w=>!o.some(E=>E.value===w.value)),onInputChange:(y,w)=>{h(w)},onChange:A,getOptionKey:y=>y.id,value:o,renderTags:S,renderOption:(y,w)=>u.jsx(I.AutocompleteOption,X(V({},y),{children:u.jsx(Cn,{option:w})}))})}),u.jsx(ut,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:v})]})},Am=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)||gt.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)||gt.flag}}))||[],yL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=C.useState([]),[a,l]=C.useState([]),[s,c]=C.useState(!1),[d,f]=C.useState(""),[h,p]=C.useState(!1),{sdk:g}=pt(),m=()=>p(!h),v=(S,y)=>{o(y);const w=y.map(E=>E.id);r(w&&w.length?w:null)},A=3;C.useEffect(()=>{!d&&t&&t.length&&g.football.getCompetitions({competitionIds:t}).then(S=>{o(Am(S))}).catch(S=>{console.error(S),m(),o([])})},[]);const x=C.useMemo(()=>si(S=>{c(!0);const y={name:S,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?y.competitionIds=Array.from(n):delete y.competitionIds,g.football.getCompetitions(y).then(w=>{l([...Am(w)]),c(!1)}).catch(w=>{console.error(w),m(),l([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<A){l([]);return}return x(d),()=>x.cancel()},[d,x]);const b=(S,y)=>S.map((w,E)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>y({index:E}).onClick(k),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:w},`option_${w.id}`)},w.id));return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(S,y)=>S.id===y.id,endDecorator:s?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:S=>S.filter(y=>!i.some(w=>w.value===y.value)),onInputChange:(S,y)=>{f(y)},onChange:v,getOptionKey:S=>S.id,value:i,renderTags:b,renderOption:(S,y)=>u.jsx(I.AutocompleteOption,X(V({},S),{children:u.jsx(Cn,{option:y})}))})}),u.jsx(ut,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:m})]})},Tm=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})))||[],xL=({labels:e,ids:t,onChange:n})=>{const[r,i]=C.useState([]),[o,a]=C.useState([]),[l,s]=C.useState(!1),[c,d]=C.useState(""),[f,h]=C.useState(!1),{sdk:p}=pt(),g=()=>h(!f),m=(b,S)=>{i(S);const y=S.map(w=>w.id);n(y&&y.length?y:null)},v=3;C.useEffect(()=>{!c&&t&&t.length&&p.profile.getByIds(t).then(b=>{i(Tm(b))}).catch(b=>{g(),console.error(b),i([])})},[]);const A=C.useMemo(()=>si(b=>{s(!0),p.profile.getByIds([],b).then(S=>{a([...Tm(S)]),s(!1)}).catch(S=>{console.error(S),g(),a([]),s(!1)})},300),[]);C.useEffect(()=>{if(!c||c.length<v){a([]);return}return A(c),()=>A.cancel()},[c,A]);const x=(b,S)=>b.map((y,w)=>{var E;return u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>S({index:w}).onClick(k),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=y.avatar)!=null?E:gt.avatar}),u.jsx(I.Typography,{children:y.label})]})},y.id)});return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,S)=>b.id===S.id,endDecorator:l?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:b=>b.filter(S=>!r.some(y=>y.value===S.value)),onInputChange:(b,S)=>{d(S)},onChange:m,getOptionKey:b=>b.id,value:r,renderTags:x,renderOption:(b,S)=>{var y;return u.jsx(I.AutocompleteOption,X(V({},b),{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(y=S.avatar)!=null?y:gt.avatar}),u.jsx(I.Typography,{children:S.label})]})}))}})}),u.jsx(ut,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:g})]})},Em=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)||gt.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)||gt.flag}}))||[],CL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=C.useState([]),[a,l]=C.useState([]),[s,c]=C.useState(!1),[d,f]=C.useState(""),[h,p]=C.useState(!1),{sdk:g}=pt(),m=()=>p(!h),v=(S,y)=>{o(y);const w=y.map(E=>E.id);r(w&&w.length?w:null)},A=3;C.useEffect(()=>{!d&&t&&t.length&&g.football.getTeams({teamIds:t,scope:n}).then(S=>{const y=S.data.filter(w=>!w.name.includes("/"));o(Em(y))}).catch(S=>{console.error(S),m(),o([])})},[]);const x=C.useMemo(()=>si(S=>{c(!0),g.football.getTeams({name:S,scope:n}).then(y=>{const w=y.data.filter(E=>!E.name.includes("/"));l([...Em(w)]),c(!1)}).catch(y=>{console.error(y),m(),l([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<A){l([]);return}return x(d),()=>x.cancel()},[d,x]);const b=(S,y)=>S.map((w,E)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:k=>y({index:E}).onClick(k),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:w},`option_${w.id}`)},w.id));return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(S,y)=>S.id===y.id,endDecorator:s?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:S=>S.filter(y=>!i.some(w=>w.value===y.value)),onInputChange:(S,y)=>{f(y)},onChange:v,getOptionKey:S=>S.id,value:i,renderTags:b,renderOption:(S,y)=>u.jsx(I.AutocompleteOption,X(V({},S),{children:u.jsx(Cn,{option:y})}))})}),u.jsx(ut,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:m})]})},_m=({checked:e,disabled:t,onChange:n})=>u.jsx(I.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:r=>n(r.target.checked),sx:{ml:1,"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${I.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}}}),wL=({label:e,defaultValue:t,description:n,disabled:r,descriptionColor:i,onChange:o})=>n?u.jsxs(I.Box,{mb:2,children:[u.jsx(I.Typography,{component:"label",endDecorator:u.jsx(_m,{checked:t,disabled:r,onChange:o}),children:e}),u.jsx(I.Typography,{level:"body-sm",color:i||"neutral",children:n})]}):u.jsx(I.Typography,{sx:()=>({marginBottom:"16px"}),component:"label",endDecorator:u.jsx(_m,{checked:t,disabled:r,onChange:o}),children:e}),IL={control:(e,t)=>X(V({},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=>X(V({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(V({},e),{minHeight:"36px"}),menu:e=>X(V({},e),{position:"relative"}),clearIndicator:e=>X(V({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(V({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(V({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(V({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>X(V({},e),{color:"#333"})},SL=e=>e.map(t=>({label:t,value:t})),km=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=SL(e.tags),a=()=>i(!r),l=f=>{e.onChange(f.map(h=>h.value))},s=f=>{n(f)},c=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.tags&&e.tags.length===0){const p=[...e.tags,t];e.onChange(p)}if(e.tags&&e.tags.length>0&&d()){const p=[...e.tags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.tags&&e.tags.length&&e.tags.includes(t)?(a(),f):(f=!0,f)};return u.jsxs(u.Fragment,{children:[u.jsx(om,{styles:IL,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:s,onKeyDown:c,placeholder:e.labels.tagsPlaceholder,value:o}),u.jsx(ut,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},AL=Ve(u.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class Pm{constructor(){oe(this,"contestId","");oe(this,"contestType","");oe(this,"description","");oe(this,"userList",[])}}const TL=(e,t,n)=>{const[r,i]=C.useState(null),{sdk:o}=pt(),a=()=>P(this,null,function*(){try{let l;switch(t){case"top_x":l=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":l=yield o.matchQuiz.getGameWinners(e,!0);break;default:l=yield o.loyalty.getTemplateWinners(e,!0)}l.userList&&l.userList.forEach(s=>{s.tags||(s.tags=[])}),i(l)}catch(l){const s=l;console.error(l),s.error.code!==404&&s.error.status!=="code_unknown_contest"&&n(),i(new Pm)}});return C.useEffect(()=>{a()},[]),r};class EL{constructor(){oe(this,"position","");oe(this,"profileId","");oe(this,"note","");oe(this,"tags",[])}}function _L(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 kL=_L,PL=Array.isArray,DL=PL,Dm=su,OL=kL,RL=DL,ML=xm,LL=1/0,Om=Dm?Dm.prototype:void 0,Rm=Om?Om.toString:void 0;function Mm(e){if(typeof e=="string")return e;if(RL(e))return OL(e,Mm)+"";if(ML(e))return Rm?Rm.call(e):"";var t=e+"";return t=="0"&&1/e==-LL?"-0":t}var BL=Mm,$L=BL;function NL(e){return e==null?"":$L(e)}var Lm=NL;function FL(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 zL=FL;function jL(e){return function(t){return e==null?void 0:e[t]}}var VL=jL,UL=VL,HL={À:"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"},WL=UL(HL),GL=WL,YL=GL,KL=Lm,qL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,QL="\\u0300-\\u036f",JL="\\ufe20-\\ufe2f",XL="\\u20d0-\\u20ff",ZL=QL+JL+XL,e2="["+ZL+"]",t2=RegExp(e2,"g");function n2(e){return e=KL(e),e&&e.replace(qL,YL).replace(t2,"")}var r2=n2,i2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function o2(e){return e.match(i2)||[]}var a2=o2,s2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function l2(e){return s2.test(e)}var c2=l2,Bm="\\ud800-\\udfff",u2="\\u0300-\\u036f",d2="\\ufe20-\\ufe2f",f2="\\u20d0-\\u20ff",h2=u2+d2+f2,$m="\\u2700-\\u27bf",Nm="a-z\\xdf-\\xf6\\xf8-\\xff",p2="\\xac\\xb1\\xd7\\xf7",g2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",m2="\\u2000-\\u206f",v2=" \\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",Fm="A-Z\\xc0-\\xd6\\xd8-\\xde",b2="\\ufe0e\\ufe0f",zm=p2+g2+m2+v2,jm="['’]",Vm="["+zm+"]",y2="["+h2+"]",Um="\\d+",x2="["+$m+"]",Hm="["+Nm+"]",Wm="[^"+Bm+zm+Um+$m+Nm+Fm+"]",C2="\\ud83c[\\udffb-\\udfff]",w2="(?:"+y2+"|"+C2+")",I2="[^"+Bm+"]",Gm="(?:\\ud83c[\\udde6-\\uddff]){2}",Ym="[\\ud800-\\udbff][\\udc00-\\udfff]",li="["+Fm+"]",S2="\\u200d",Km="(?:"+Hm+"|"+Wm+")",A2="(?:"+li+"|"+Wm+")",qm="(?:"+jm+"(?:d|ll|m|re|s|t|ve))?",Qm="(?:"+jm+"(?:D|LL|M|RE|S|T|VE))?",Jm=w2+"?",Xm="["+b2+"]?",T2="(?:"+S2+"(?:"+[I2,Gm,Ym].join("|")+")"+Xm+Jm+")*",E2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",k2=Xm+Jm+T2,P2="(?:"+[x2,Gm,Ym].join("|")+")"+k2,D2=RegExp([li+"?"+Hm+"+"+qm+"(?="+[Vm,li,"$"].join("|")+")",A2+"+"+Qm+"(?="+[Vm,li+Km,"$"].join("|")+")",li+"?"+Km+"+"+qm,li+"+"+Qm,_2,E2,Um,P2].join("|"),"g");function O2(e){return e.match(D2)||[]}var R2=O2,M2=a2,L2=c2,B2=Lm,$2=R2;function N2(e,t,n){return e=B2(e),t=n?void 0:t,t===void 0?L2(e)?$2(e):M2(e):e.match(t)||[]}var F2=N2,z2=zL,j2=r2,V2=F2,U2="['’]",H2=RegExp(U2,"g");function W2(e){return function(t){return z2(V2(j2(t).replace(H2,"")),e,"")}}var G2=W2,Y2=G2,K2=Y2(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),q2=K2;const Q2=fn(q2);class J2{constructor(){oe(this,"id","");oe(this,"value","");oe(this,"label","")}}class X2 extends J2{constructor(){super(...arguments);oe(this,"logo","");oe(this,"countryFlag","");oe(this,"countryName","")}}class Zm extends X2{constructor(){super(...arguments);oe(this,"group","")}}const Z2=(e,t)=>t||e||"-------------",cu=(e,t)=>Array.isArray(e)?e.map(n=>cu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>X(V({},n),{[Q2(r)]:cu(e[r])}),{}):e,ev=e=>{const t=[];return e.competitions.forEach(n=>{t.push(uu(n,"competition"))}),e.teams.forEach(n=>{t.push(uu(n,"team"))}),e.players.forEach(n=>{t.push(uu(n,"player"))}),t},uu=(e,t)=>{var r,i,o,a,l;const n=new Zm;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)||gt.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||gt.team:n.logo=((o=e.assets)==null?void 0:o.logo)||gt.competition,n.countryName=e.country.name,n.countryFlag=((l=(a=e.country)==null?void 0:a.assets)==null?void 0:l.flag)||gt.country,n},eB=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"}},tB=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"}},nB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,A,x,b,S,y;const[o,a]=C.useState(t.position),[l,s]=C.useState(t.note),[c,d]=C.useState(t.tags),f=o||l||c.length>0,h=w=>{w.persist();const{value:E}=w.target;a(E),r("position",E)},p=w=>{w.persist();const{value:E}=w.target;s(E),r("note",E)},g=w=>{d(w),r("tags",w)},m=()=>{a(""),s(""),d([]),i()};return u.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[u.jsx("td",{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",children:[u.jsx(I.Avatar,{src:((v=e.profileModel)==null?void 0:v.avatar)||"",alt:((A=e.profileModel)==null?void 0:A.name)||"Unknown",sx:{mr:1}}),u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{fontWeight:"md",children:[Z2((x=e.profileModel)==null?void 0:x.name,(b=e.profileModel)==null?void 0:b.nickname)," ",(S=e.profileModel)!=null&&S.name?u.jsxs(I.Typography,{children:["(",(y=e.profileModel)==null?void 0:y.name,")"]}):u.jsx(u.Fragment,{})]}),u.jsx(I.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),u.jsx("td",{style:{textAlign:"center"},children:e.points}),u.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),u.jsx("td",{children:u.jsx(I.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(I.Input,{name:"note",value:l,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(km,{labels:n,tags:c,onChange:g})}),u.jsx("td",{children:u.jsx(I.Tooltip,{title:n.clearWinner,children:u.jsx(I.IconButton,{onClick:m,variant:"outlined",color:"danger",disabled:!f,children:u.jsx(Le.Remove,{})})})})]})},rB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?X(V({},f),{[o]:a}):f);r(d);return}const s=new EL;s.profileId=i,s[o]=a;const c=[...e.winners,s];r(c)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>X(V({},o),{userList:i}))};return e.leaderboard?u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?u.jsx(I.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):u.jsx(u.Fragment,{}),u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.nicknameAndName}),u.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),u.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),u.jsx("th",{style:{width:"100px"},children:e.labels.position}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags}),u.jsx("th",{children:e.labels.actions})]})}),u.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>u.jsx(nB,{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}`)):u.jsx(u.Fragment,{}),u.jsx("tr",{children:u.jsx("td",{colSpan:7,children:e.hasMoreParticipants?u.jsx(I.Box,{textAlign:"center",my:1,children:u.jsx(I.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):u.jsx(u.Fragment,{})})})]})]})]}):u.jsx(us,{my:40})},iB=(e,t,n,r,i)=>{const[o,a]=C.useState(null),[l,s]=C.useState(!1),[c,d]=C.useState(!1),{sdk:f}=pt(),h=()=>P(this,null,function*(){d(!0);const p={limit:10,page:r},g=!0;try{let m;t==="template"?m=yield f.loyalty.getLeaderboard(e,p,g):m=yield f.loyalty.getLeaderboardForGame(e,p,g),m.meta.pagination.numberOfPages>r?s(!0):s(!1),o&&o.length?a(v=>[...v,...m.data]):a(m.data)}catch(m){console.error(m),i("danger",n),a([])}d(!1)});return C.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:l,isLeaderboardLoading:c}};class oB{constructor(){oe(this,"isValid",!0);oe(this,"message","");oe(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));oe(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});oe(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 aB=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 u.jsx(I.Card,{variant:"plain",children:t?u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),u.jsx(I.Sheet,{children:u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{style:{width:"3%"},children:"#"}),u.jsx("th",{children:e.labels.name}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags})]})}),u.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return u.jsxs("tr",{children:[u.jsx("td",{children:n.position}),u.jsx("td",{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[u.jsx(I.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),u.jsxs(I.Box,{textAlign:"left",children:[u.jsxs(I.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",u.jsxs(I.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),u.jsx(I.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),u.jsx("td",{children:n.note}),u.jsx("td",{children:n.tags.map(o=>u.jsx(I.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):u.jsx(I.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},sB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Pm,lB=e=>{var y;const[t,n]=C.useState(sB(e.winners)),[r,i]=C.useState(((y=e.winners)==null?void 0:y.description)||""),[o,a]=C.useState(!1),[l,s]=C.useState(1),[c,d]=C.useState(!1),[f,h]=C.useState("danger"),[p,g]=C.useState(""),m=(w,E)=>{h(w),g(E),d(!0)},{leaderboard:v,hasMoreParticipants:A,isLeaderboardLoading:x}=iB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,l,m),{https:b}=pt(),S=()=>P(this,null,function*(){a(!0);const w=JSON.parse(JSON.stringify(t));if(w.contestId=e.entityId,w.contestType=e.entityType==="template"?"TEMPLATE":"GAME",w.description=r,delete w.contestModel,w.userList.length>0){const k=new oB().validate(w.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!k.isValid){m("danger",k.message),a(!1);return}}else delete w.userList;const E=cu(w);try{yield b.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 u.jsxs(u.Fragment,{children:[u.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:u.jsx(I.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:u.jsxs(I.Box,{width:"100%",sx:{overflowX:"auto"},children:[u.jsxs(I.Card,{variant:"plain",children:[u.jsx(ic,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:w=>{i(w)}}),u.jsx(rB,{winners:t.userList,leaderboard:v,hasMoreParticipants:A,isLoading:x,setPage:s,setWinnersRequestBody:n,labels:e.labels}),u.jsx(I.Box,{textAlign:"center",my:3,children:u.jsx(I.Button,{variant:"solid",color:"primary",onClick:S,loading:o,children:e.labels.save})}),u.jsx(I.Divider,{sx:{my:4}})]}),v?u.jsx(aB,{winners:t,profiles:v.map(w=>w.profileModel),labels:e.labels}):u.jsx(u.Fragment,{})]})})}),u.jsx(ut,{showToast:c,color:f,message:p,hideToast:()=>d(!1)})]})},cB=e=>{const[t,n]=C.useState(!1),r=()=>n(!0),i=TL(e.entityId,e.entityType,r);return i?u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{p:2,children:[u.jsx(I.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:u.jsx(AL,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),u.jsxs(I.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",u.jsx(I.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),u.jsx(lB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),u.jsx(ut,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):u.jsx(us,{my:50})},uB=10,dB=e=>{var f;const[t,n]=C.useState([]),[r,i]=C.useState(!1),[o,a]=C.useState(""),{sdk:l}=pt(),s=C.useMemo(()=>si(h=>{if(!h){n([]),i(!1);return}i(!0),l.football.search({query:h}).then(p=>{n([...ev(p)]),i(!1)}).catch(p=>{console.error(p),n([]),i(!1)})},300),[]);C.useEffect(()=>(s(o),()=>s.cancel()),[o,s]);const c=(h,p)=>{const g=p.map(m=>m.id);e.setOptions(p),e.handleResetData(),e.setFilters(m=>X(V({},m),{entityIds:g}))},d=(h,p)=>h.map((g,m)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:v=>p({index:m}).onClick(v),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:g},`option_${g.id}`)},g.id));return u.jsxs(I.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),u.jsx(I.Autocomplete,{getOptionDisabled:()=>e.options.length===uB,forcePopupIcon:!1,multiple:!0,loading:r,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(h,p)=>h.id===p.id,endDecorator:r?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.options.length>0?"":e.labels.typeContextTagNamePlaceholder,options:t,filterOptions:h=>h.filter(p=>!e.options.some(g=>g.value===p.value)),onInputChange:(h,p)=>{a(p)},onChange:c,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(f=e.options)!=null?f:[],renderTags:d,renderOption:(h,p)=>u.jsx(I.AutocompleteOption,X(V({},h),{children:u.jsx(Cn,{option:p})}))})]})};function tv(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 co;(function(e){e.event="event",e.props="prop"})(co||(co={}));function nr(){}function fB(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 uo(e){return!!(e||"").match(/\d/)}function ci(e){return e==null}function hB(e){return typeof e=="number"&&isNaN(e)}function nv(e){return ci(e)||hB(e)||typeof e=="number"&&!isFinite(e)}function rv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function pB(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 gB(e,t,n){var r=pB(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 mB(e){var t=C.useRef(e);t.current=e;var n=C.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function du(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 vB(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 iv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function ov(e,t){return Array(t+1).join(e)}function av(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,l=i.length;return a<0?i="0."+ov("0",Math.abs(a))+i:a>=l?i=i+ov("0",a-l):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function sv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=du(e),o=i.beforeDecimal,a=i.afterDecimal,l=i.hasNegation,s=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:s.toFixed(t),d=c.split("."),f=o;o&&Number(d[0])&&(f=o.split("").reverse().reduce(function(m,v,A){return m.length>A?(Number(m[0])+Number(v)).toString()+m.substring(1,m.length):v+m},d[0]));var h=iv(d[1]||"",t,n),p=l?"-":"",g=r?".":"";return""+p+f+g+h}function wr(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 lv=fB(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}}}),bB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function yB(e,t,n){return Math.min(Math.max(e,t),n)}function fu(e){return Math.max(e.selectionStart,e.selectionEnd)}function xB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function CB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function wB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function IB(e,t,n,r,i,o,a){a===void 0&&(a=wB);var l=i.findIndex(function(S){return S}),s=e.slice(0,l);!t&&!n.startsWith(s)&&(t=s,n=s+n,r=r+s.length);for(var c=n.length,d=e.length,f={},h=new Array(c),p=0;p<c;p++){h[p]=-1;for(var g=0,m=d;g<m;g++){var v=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:g});if(v&&f[g]!==!0){h[p]=g,f[g]=!0;break}}}for(var A=r;A<c&&(h[A]===-1||!o(n[A]));)A++;var x=A===c||h[A]===-1?d:h[A];for(A=r-1;A>0&&h[A]===-1;)A--;var b=A===-1||h[A]===-1?0:h[A]+1;return b>x?x:r-b<x-r?b:x}function cv(e,t,n,r){var i=e.length;if(t=yB(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 SB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(uo(e[n])||uo(e[n-1]));return t}function uv(e,t,n,r,i,o){o===void 0&&(o=nr);var a=mB(function(g,m){var v,A;return nv(g)?(A="",v=""):typeof g=="number"||m?(A=typeof g=="number"?av(g):g,v=r(A)):(A=i(g,void 0),v=r(A)),{formattedValue:v,numAsString:A}}),l=C.useState(function(){return a(ci(e)?t:e,n)}),s=l[0],c=l[1],d=function(g,m){g.formattedValue!==s.formattedValue&&c({formattedValue:g.formattedValue,numAsString:g.value}),o(g,m)},f=e,h=n;ci(e)&&(f=s.numAsString,h=!0);var p=a(f,h);return C.useMemo(function(){c(p)},[p.formattedValue]),[s,d]}function AB(e){return e.replace(/[^0-9]/g,"")}function TB(e){return e}function EB(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=TB);var l=e.removeFormatting;l===void 0&&(l=AB);var s=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,h=e.onChange;h===void 0&&(h=nr);var p=e.onKeyDown;p===void 0&&(p=nr);var g=e.onMouseUp;g===void 0&&(g=nr);var m=e.onFocus;m===void 0&&(m=nr);var v=e.onBlur;v===void 0&&(v=nr);var A=e.value,x=e.getCaretBoundary;x===void 0&&(x=SB);var b=e.isValidInputCharacter;b===void 0&&(b=uo);var S=e.isCharacterSame,y=tv(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),w=uv(A,s,!!c,a,l,d),E=w[0],k=E.formattedValue,N=E.numAsString,Y=w[1],W=C.useRef(),T=C.useRef({formattedValue:k,numAsString:N}),H=function(de,he){T.current={formattedValue:de.formattedValue,numAsString:de.value},Y(de,he)},G=C.useState(!1),$=G[0],B=G[1],L=C.useRef(null),U=C.useRef({setCaretTimeout:null,focusTimeout:null});C.useEffect(function(){return B(!0),function(){clearTimeout(U.current.setCaretTimeout),clearTimeout(U.current.focusTimeout)}},[]);var q=a,ee=function(de,he){var xe=parseFloat(he);return{formattedValue:de,value:he,floatValue:isNaN(xe)?void 0:xe}},O=function(de,he,xe){de.selectionStart===0&&de.selectionEnd===de.value.length||(wr(de,he),U.current.setCaretTimeout=setTimeout(function(){de.value===xe&&de.selectionStart!==he&&wr(de,he)},0))},M=function(de,he,xe){return cv(de,he,x(de),xe)},F=function(de,he,xe){var Te=x(he),He=IB(he,k,de,xe,Te,b,S);return He=cv(he,He,Te),He},j=function(de){var he=de.formattedValue;he===void 0&&(he="");var xe=de.input,Te=de.source,He=de.event,Pe=de.numAsString,Ee;if(xe){var It=de.inputValue||xe.value,St=fu(xe);xe.value=he,Ee=F(It,he,St),Ee!==void 0&&O(xe,Ee,he)}he!==k&&H(ee(he,Pe),{event:He,source:Te})};C.useEffect(function(){var de=T.current,he=de.formattedValue,xe=de.numAsString;(k!==he||N!==xe)&&H(ee(k,N),{event:void 0,source:co.props})},[k,N]);var te=L.current?fu(L.current):void 0,se=typeof window!="undefined"?C.useLayoutEffect:C.useEffect;se(function(){var de=L.current;if(k!==T.current.formattedValue&&de){var he=F(T.current.formattedValue,k,te);de.value=k,O(de,he,k)}},[k]);var ae=function(de,he,xe){var Te=he.target,He=W.current?bB(W.current,Te.selectionEnd):lv(k,de),Pe=Object.assign(Object.assign({},He),{lastValue:k}),Ee=l(de,Pe),It=q(Ee);if(Ee=l(It,void 0),f&&!f(ee(It,Ee))){var St=he.target,jt=fu(St),Mt=F(de,k,jt);return St.value=k,O(St,Mt,k),!1}return j({formattedValue:It,numAsString:Ee,inputValue:de,event:he,source:xe,input:he.target}),!0},J=function(de,he){he===void 0&&(he=0);var xe=de.selectionStart,Te=de.selectionEnd;W.current={selectionStart:xe,selectionEnd:Te+he}},le=function(de){var he=de.target,xe=he.value,Te=ae(xe,de,co.event);Te&&h(de),W.current=void 0},ne=function(de){var he=de.target,xe=de.key,Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee;xe==="ArrowLeft"||xe==="Backspace"?Ee=Math.max(Te-1,0):xe==="ArrowRight"?Ee=Math.min(Te+1,Pe.length):xe==="Delete"&&(Ee=Te);var It=0;xe==="Delete"&&Te===He&&(It=1);var St=xe==="ArrowLeft"||xe==="ArrowRight";if(Ee===void 0||Te!==He&&!St){p(de),J(he,It);return}var jt=Ee;if(St){var Mt=xe==="ArrowLeft"?"left":"right";jt=M(Pe,Ee,Mt),jt!==Ee&&de.preventDefault()}else xe==="Delete"&&!b(Pe[Ee])?jt=M(Pe,Ee,"right"):xe==="Backspace"&&!b(Pe[Ee])&&(jt=M(Pe,Ee,"left"));jt!==Ee&&O(he,jt,Pe),p(de),J(he,It)},ge=function(de){var he=de.target,xe=function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;if(Pe===void 0&&(Pe=""),Te===He){var Ee=M(Pe,Te);Ee!==Te&&O(he,Ee,Pe)}};xe(),requestAnimationFrame(function(){xe()}),g(de),J(he)},Se=function(de){de.persist&&de.persist();var he=de.target,xe=de.currentTarget;L.current=he,U.current.focusTimeout=setTimeout(function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee=M(Pe,Te);Ee!==Te&&!(Te===0&&He===Pe.length)&&O(he,Ee,Pe),m(Object.assign(Object.assign({},de),{currentTarget:xe}))},0)},Ue=function(de){L.current=null,clearTimeout(U.current.focusTimeout),clearTimeout(U.current.setCaretTimeout),v(de)},wt=$&&xB()?"numeric":void 0,at=Object.assign({inputMode:wt},y,{type:t,value:k,onChange:le,onKeyDown:ne,onMouseUp:ge,onFocus:Se,onBlur:Ue});if(n==="text")return i?C.createElement(C.Fragment,null,i(k,y)||null):C.createElement("span",Object.assign({},y,{ref:o}),k);if(r){var kt=r;return C.createElement(kt,Object.assign({},at,{ref:o}))}return C.createElement("input",Object.assign({},at,{ref:o}))}function dv(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,l=t.thousandsGroupStyle;if(l===void 0&&(l="thousand"),e===""||e==="-")return e;var s=ds(t),c=s.thousandSeparator,d=s.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=du(e,a),p=h.beforeDecimal,g=h.afterDecimal,m=h.addNegation;return n!==void 0&&(g=iv(g,n,!!r)),c&&(p=gB(p,c,l)),i&&(p=i+p),o&&(g=g+o),m&&(p="-"+p),e=p+(f&&d||"")+g,e}function ds(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 _B(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 kB(e,t){return new RegExp("(^-)|[0-9]|"+rv(e),"g")}function PB(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function DB(e,t,n){var r;t===void 0&&(t=CB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var l=n.decimalScale,s=t.from,c=t.to,d=c.start,f=c.end,h=ds(n),p=h.allowedDecimalSeparators,g=h.decimalSeparator,m=e[f]===g;if(uo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var v=l===0?"":g;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var A=function(L,U,q){var ee=!1,O=!1;o.startsWith("-")?ee=!1:L.startsWith("--")?(ee=!1,O=!0):a.startsWith("-")&&L.length===a.length?ee=!1:L[0]==="-"&&(ee=!0);var M=ee?1:0;return O&&(M=2),M&&(L=L.substring(M),U-=M,q-=M),{value:L,start:U,end:q,hasNegation:ee}},x=A(e,d,f),b=x.hasNegation;r=x,e=r.value,d=r.start,f=r.end;var S=A(t.lastValue,s.start,s.end),y=S.start,w=S.end,E=S.value,k=e.substring(d,f);e.length&&E.length&&(y>E.length-a.length||w<o.length)&&!(k&&a.startsWith(k))&&(e=E);var N=0;e.startsWith(o)?N+=o.length:d<o.length&&(N=d),e=e.substring(N),f-=N;var Y=e.length,W=e.length-a.length;e.endsWith(a)?Y=W:(f>W||f>e.length-a.length)&&(Y=f),e=e.substring(0,Y),e=_B(b?"-"+e:e,i),e=(e.match(kB(g))||[]).join("");var T=e.indexOf(g);e=e.replace(new RegExp(rv(g),"g"),function(L,U){return U===T?".":""});var H=du(e,i),G=H.beforeDecimal,$=H.afterDecimal,B=H.addNegation;return c.end-c.start<s.end-s.start&&G===""&&m&&!parseFloat($)&&(e=B?"-":""),e}function OB(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 RB(e){var t=ds(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
|
+
`]))),LD=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,l=o.spacing.baseUnit;return ve({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:l*2})},Kc=function(t){var n=t.delay,r=t.offset;return pe.jsx("span",{css:pe.css({animation:"".concat(MD," 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"},"","")})},BD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=xn(t,TD);return pe.jsx("div",D({},tt(ve(ve({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),pe.jsx(Kc,{delay:0,offset:r}),pe.jsx(Kc,{delay:160,offset:!0}),pe.jsx(Kc,{delay:320,offset:!r}))},$D=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,l=o.borderRadius,s=o.spacing;return ve({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.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:l,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},ND=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,l=t.menuIsOpen;return pe.jsx("div",D({ref:o},tt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":l}),a,{"aria-disabled":r||void 0}),n)},FD=ND,zD=["data"],jD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},VD=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,l=t.headingProps,s=t.innerProps,c=t.label,d=t.theme,f=t.selectProps;return pe.jsx("div",D({},tt(t,"group",{group:!0}),s),pe.jsx(a,D({},l,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),c),pe.jsx("div",null,n))},UD=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return ve({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"})},HD=function(t){var n=bg(t);n.data;var r=xn(n,zD);return pe.jsx("div",D({},tt(t,"groupHeading",{"group-heading":!0}),r))},WD=VD,GD=["innerRef","isDisabled","isHidden","inputClassName"],YD=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,l=o.colors;return ve(ve({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},KD),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:l.neutral80})},Pg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},KD={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ve({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Pg)},qD=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Pg)},QD=function(t){var n=t.cx,r=t.value,i=bg(t),o=i.innerRef,a=i.isDisabled,l=i.isHidden,s=i.inputClassName,c=xn(i,GD);return pe.jsx("div",D({},tt(t,"input",{"input-container":!0}),{"data-value":r||""}),pe.jsx("input",D({className:n({input:!0},s),ref:o,style:qD(l),disabled:a},c)))},JD=QD,XD=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return ve({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},ZD=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return ve({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})},eO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,l=t.isFocused;return ve({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:l?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Dg=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",r,n)},tO=Dg,nO=Dg;function rO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",D({role:"button"},n),t||pe.jsx(Yc,{size:14}))}var iO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,l=t.removeProps,s=t.selectProps,c=r.Container,d=r.Label,f=r.Remove;return pe.jsx(c,{data:i,innerProps:ve(ve({},tt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:s},pe.jsx(d,{data:i,innerProps:ve({},tt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},n),pe.jsx(f,{data:i,innerProps:ve(ve({},tt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:s}))},oO=iO,aO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,l=a.spacing,s=a.colors;return ve({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?s.primary:i?s.primary25:"transparent",color:r?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?s.primary:s.primary50}})},sO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,l=t.innerProps;return pe.jsx("div",D({},tt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},l),n)},lO=sO,cO=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return ve({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},uO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",D({},tt(t,"placeholder",{placeholder:!0}),r),n)},dO=uO,fO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return ve({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})},hO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return pe.jsx("div",D({},tt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},pO=hO,gO={ClearIndicator:DD,Control:FD,DropdownIndicator:kD,DownChevron:_g,CrossIcon:Yc,Group:WD,GroupHeading:HD,IndicatorsContainer:SD,IndicatorSeparator:RD,Input:JD,LoadingIndicator:BD,Menu:uD,MenuList:fD,MenuPortal:bD,LoadingMessage:mD,NoOptionsMessage:gD,MultiValue:oO,MultiValueContainer:tO,MultiValueLabel:nO,MultiValueRemove:rO,Option:lO,Placeholder:dO,SelectContainer:xD,SingleValue:pO,ValueContainer:wD},mO=function(t){return ve(ve({},gO),t.components)},Og=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function vO(e,t){return!!(e===t||Og(e)&&Og(t))}function bO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!vO(e[n],t[n]))return!1;return!0}function yO(e,t){t===void 0&&(t=bO);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 xO={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"},CO=function(t){return pe.jsx("span",D({css:xO},t))},Rg=CO,wO={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,l=t.selectValue,s=t.isDisabled,c=t.isSelected,d=t.isAppleDevice,f=function(g,v){return g&&g.length?"".concat(g.indexOf(v)+1," of ").concat(g.length):""};if(n==="value"&&l)return"value ".concat(a," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var h=s?" disabled":"",p="".concat(c?" selected":"").concat(h);return"".concat(a).concat(p,", ").concat(f(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},IO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,l=t.selectValue,s=t.selectProps,c=t.id,d=t.isAppleDevice,f=s.ariaLiveMessages,h=s.getOptionLabel,p=s.inputValue,m=s.isMulti,g=s.isOptionDisabled,v=s.isSearchable,S=s.menuIsOpen,w=s.options,y=s.screenReaderStatus,x=s.tabSelectsValue,b=s.isLoading,T=s["aria-label"],E=s["aria-live"],P=C.useMemo(function(){return ve(ve({},wO),f||{})},[f]),O=C.useMemo(function(){var N="";if(n&&P.onChange){var $=n.option,B=n.options,H=n.removedValue,q=n.removedValues,ee=n.value,R=function(J){return Array.isArray(J)?null:J},L=H||$||R(ee),F=L?h(L):"",V=B||q||void 0,te=V?V.map(h):[],se=ve({isDisabled:L&&g(L,l),label:F,labels:te},n);N=P.onChange(se)}return N},[n,P,g,l,h]),G=C.useMemo(function(){var N="",$=r||i,B=!!(r&&l&&l.includes(r));if($&&P.onFocus){var H={focused:$,label:h($),isDisabled:g($,l),isSelected:B,options:o,context:$===r?"menu":"value",selectValue:l,isAppleDevice:d};N=P.onFocus(H)}return N},[r,i,h,g,P,o,l,d]),z=C.useMemo(function(){var N="";if(S&&w.length&&!b&&P.onFilter){var $=y({count:o.length});N=P.onFilter({inputValue:p,resultsMessage:$})}return N},[o,p,S,P,w,y,b]),A=(n==null?void 0:n.action)==="initial-input-focus",W=C.useMemo(function(){var N="";if(P.guidance){var $=i?"value":S?"menu":"input";N=P.guidance({"aria-label":T,context:$,isDisabled:r&&g(r,l),isMulti:m,isSearchable:v,tabSelectsValue:x,isInitialFocus:A})}return N},[T,r,i,m,g,v,S,P,l,x,A]),Y=pe.jsx(C.Fragment,null,pe.jsx("span",{id:"aria-selection"},O),pe.jsx("span",{id:"aria-focused"},G),pe.jsx("span",{id:"aria-results"},z),pe.jsx("span",{id:"aria-guidance"},W));return pe.jsx(C.Fragment,null,pe.jsx(Rg,{id:c},A&&Y),pe.jsx(Rg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!A&&Y))},SO=IO,qc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],AO=new RegExp("["+qc.map(function(e){return e.letters}).join("")+"]","g"),Mg={},Qc=0;Qc<qc.length;Qc++)for(var Jc=qc[Qc],Xc=0;Xc<Jc.letters.length;Xc++)Mg[Jc.letters[Xc]]=Jc.base;var Lg=function(t){return t.replace(AO,function(n){return Mg[n]})},TO=yO(Lg),Bg=function(t){return t.replace(/^\s+|\s+$/g,"")},EO=function(t){return"".concat(t.label," ").concat(t.value)},_O=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:EO,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,l=i.stringify,s=i.trim,c=i.matchFrom,d=s?Bg(r):r,f=s?Bg(l(n)):l(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=TO(d),f=Lg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},kO=["innerRef"];function PO(e){var t=e.innerRef,n=xn(e,kO),r=nD(n,"onExited","in","enter","exit","appear");return pe.jsx("input",D({ref:t},r,{css:pe.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 DO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function OO(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=C.useRef(!1),l=C.useRef(!1),s=C.useRef(0),c=C.useRef(null),d=C.useCallback(function(v,S){if(c.current!==null){var w=c.current,y=w.scrollTop,x=w.scrollHeight,b=w.clientHeight,T=c.current,E=S>0,P=x-b-y,O=!1;P>S&&a.current&&(r&&r(v),a.current=!1),E&&l.current&&(o&&o(v),l.current=!1),E&&S>P?(n&&!a.current&&n(v),T.scrollTop=x,O=!0,a.current=!0):!E&&-S>y&&(i&&!l.current&&i(v),T.scrollTop=0,O=!0,l.current=!0),O&&DO(v)}},[n,r,i,o]),f=C.useCallback(function(v){d(v,v.deltaY)},[d]),h=C.useCallback(function(v){s.current=v.changedTouches[0].clientY},[]),p=C.useCallback(function(v){var S=s.current-v.changedTouches[0].clientY;d(v,S)},[d]),m=C.useCallback(function(v){if(v){var S=ZP?{passive:!1}:!1;v.addEventListener("wheel",f,S),v.addEventListener("touchstart",h,S),v.addEventListener("touchmove",p,S)}},[p,h,f]),g=C.useCallback(function(v){v&&(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",h,!1),v.removeEventListener("touchmove",p,!1))},[p,h,f]);return C.useEffect(function(){if(t){var v=c.current;return m(v),function(){g(v)}}},[t,m,g]),function(v){c.current=v}}var $g=["boxSizing","height","overflow","paddingRight","position"],Ng={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Fg(e){e.preventDefault()}function zg(e){e.stopPropagation()}function jg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Vg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ug=!!(typeof window!="undefined"&&window.document&&window.document.createElement),ao=0,ri={capture:!1,passive:!1};function RO(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=C.useRef({}),o=C.useRef(null),a=C.useCallback(function(s){if(Ug){var c=document.body,d=c&&c.style;if(r&&$g.forEach(function(m){var g=d&&d[m];i.current[m]=g}),r&&ao<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Ng).forEach(function(m){var g=Ng[m];d&&(d[m]=g)}),d&&(d.paddingRight="".concat(p,"px"))}c&&Vg()&&(c.addEventListener("touchmove",Fg,ri),s&&(s.addEventListener("touchstart",jg,ri),s.addEventListener("touchmove",zg,ri))),ao+=1}},[r]),l=C.useCallback(function(s){if(Ug){var c=document.body,d=c&&c.style;ao=Math.max(ao-1,0),r&&ao<1&&$g.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&Vg()&&(c.removeEventListener("touchmove",Fg,ri),s&&(s.removeEventListener("touchstart",jg,ri),s.removeEventListener("touchmove",zg,ri)))}},[r]);return C.useEffect(function(){if(t){var s=o.current;return a(s),function(){l(s)}}},[t,a,l]),function(s){o.current=s}}var MO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},LO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function BO(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,l=e.onTopArrive,s=e.onTopLeave,c=OO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:l,onTopLeave:s}),d=RO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(C.Fragment,null,n&&pe.jsx("div",{onClick:MO,css:LO}),t(f))}var $O={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},NO=function(t){var n=t.name,r=t.onFocus;return pe.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:$O,value:"",onChange:function(){}})},FO=NO;function Zc(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 zO(){return Zc(/^iPhone/i)}function Hg(){return Zc(/^Mac/i)}function jO(){return Zc(/^iPad/i)||Hg()&&navigator.maxTouchPoints>1}function VO(){return zO()||jO()}function UO(){return Hg()||VO()}var HO=function(t){return t.label},Wg=function(t){return t.label},Gg=function(t){return t.value},WO=function(t){return!!t.isDisabled},GO={clearIndicator:PD,container:yD,control:$D,dropdownIndicator:_D,group:jD,groupHeading:UD,indicatorsContainer:ID,indicatorSeparator:OD,input:YD,loadingIndicator:LD,loadingMessage:pD,menu:sD,menuList:dD,menuPortal:vD,multiValue:XD,multiValueLabel:ZD,multiValueRemove:eO,noOptionsMessage:hD,option:aO,placeholder:cO,singleValue:fO,valueContainer:CD},YO={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%)"},KO=4,Yg=4,qO=38,QO=Yg*2,JO={baseUnit:Yg,controlHeight:qO,menuGutter:QO},eu={borderRadius:KO,colors:YO,spacing:JO},XO={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Cg(),captureMenuScroll:!Cg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:_O(),formatGroupLabel:HO,getOptionLabel:Wg,getOptionValue:Gg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:WO,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!JP(),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 Kg(e,t,n,r){var i=Zg(e,t,n),o=em(e,t,n),a=Xg(e,t),l=cs(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:l,index:r}}function ls(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,l){return Kg(e,a,t,l)}).filter(function(a){return Jg(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Kg(e,n,t,r);return Jg(e,o)?o:void 0}).filter(eD)}function qg(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ni(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Qg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ni(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 ZO(e,t){return qg(ls(e,t))}function Jg(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,l=t.value;return(!nm(e)||!o)&&tm(e,{label:a,value:l,data:i},r)}function eR(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 tR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var tu=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},Xg=function(t,n){return t.getOptionLabel(n)},cs=function(t,n){return t.getOptionValue(n)};function Zg(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function em(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=cs(e,t);return n.some(function(i){return cs(e,i)===r})}function tm(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var nm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},nR=1,rm=function(e){RP(n,e);var t=BP(n);function n(r){var i;if(DP(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=UO(),i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,c){var d=i.props,f=d.onChange,h=d.name;c.name=h,i.ariaOnChange(s,c),f(s,c)},i.setValue=function(s,c,d){var f=i.props,h=f.closeMenuOnSelect,p=f.isMulti,m=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:m}),h&&(i.setState({inputIsHiddenAfterUpdate:!p}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:c,option:d})},i.selectOption=function(s){var c=i.props,d=c.blurInputOnSelect,f=c.isMulti,h=c.name,p=i.state.selectValue,m=f&&i.isOptionSelected(s,p),g=i.isOptionDisabled(s,p);if(m){var v=i.getOptionValue(s);i.setValue(p.filter(function(S){return i.getOptionValue(S)!==v}),"deselect-option",s)}else if(!g)f?i.setValue([].concat(ni(p),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:h});return}d&&i.blurInput()},i.removeValue=function(s){var c=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(s),h=d.filter(function(m){return i.getOptionValue(m)!==f}),p=oo(c,h,h[0]||null);i.onChange(p,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(oo(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),h=oo(s,f,f[0]||null);i.onChange(h,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(s){return tu(i.state.focusableOptionsWithIds,s)},i.getFocusableOptionsWithIds=function(){return Qg(ls(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,c=new Array(s),d=0;d<s;d++)c[d]=arguments[d];return GP.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(s){return Xg(i.props,s)},i.getOptionValue=function(s){return cs(i.props,s)},i.getStyles=function(s,c){var d=i.props.unstyled,f=GO[s](c,d);f.boxSizing="border-box";var h=i.props.styles[s];return h?h(f,c):f},i.getClassNames=function(s,c){var d,f;return(d=(f=i.props.classNames)[s])===null||d===void 0?void 0:d.call(f,c)},i.getElementId=function(s){return"".concat(i.state.instancePrefix,"-").concat(s)},i.getComponents=function(){return mO(i.props)},i.buildCategorizedOptions=function(){return ls(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return qg(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(s,c){i.setState({ariaSelection:ve({value:s},c)})},i.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(s){i.blockOptionHover=!1},i.onControlMouseDown=function(s){if(!s.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},i.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),s.preventDefault()}},i.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(i.clearValue(),s.preventDefault(),i.openAfterFocus=!1,s.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(s){typeof i.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&is(s.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(s)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(s){var c=s.touches,d=c&&c.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(s){var c=s.touches,d=c&&c.item(0);if(d){var f=Math.abs(d.clientX-i.initialTouchX),h=Math.abs(d.clientY-i.initialTouchY),p=5;i.userIsDragging=f>p||h>p}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var c=i.props.inputValue,d=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){if(!(i.blockOptionHover||i.state.focusedOption===s)){var c=i.getFocusableOptions(),d=c.indexOf(s);i.setState({focusedOption:s,focusedOptionId:d>-1?i.getFocusedOptionId(s):null})}},i.shouldHideSelectedOptions=function(){return nm(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var c=i.props,d=c.isMulti,f=c.backspaceRemovesValue,h=c.escapeClearsValue,p=c.inputValue,m=c.isClearable,g=c.isDisabled,v=c.menuIsOpen,S=c.onKeyDown,w=c.tabSelectsValue,y=c.openMenuOnFocus,x=i.state,b=x.focusedOption,T=x.focusedValue,E=x.selectValue;if(!g&&!(typeof S=="function"&&(S(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!d||p)return;i.focusValue("previous");break;case"ArrowRight":if(!d||p)return;i.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(T)i.removeValue(T);else{if(!f)return;d?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!v||!w||!b||y&&i.isOptionSelected(b,E))return;i.selectOption(b);break;case"Enter":if(s.keyCode===229)break;if(v){if(!b||i.isComposing)return;i.selectOption(b);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:p}),i.onMenuClose()):m&&h&&i.clearValue();break;case" ":if(p)return;if(!v){i.openMenu("first");break}if(!b)return;i.selectOption(b);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++nR),i.state.selectValue=rs(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),l=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[l],i.state.focusedOptionId=tu(o,a[l])}return i}return OP(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&&xg(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,l=o.menuIsOpen,s=this.state.isFocused;(s&&!a&&i.isDisabled||s&&l&&!i.menuIsOpen)&&this.focusInput(),s&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(xg(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,l=a.selectValue,s=a.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,l=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=a.indexOf(l);l||(s=-1);var c=a.length-1,d=-1;if(a.length){switch(i){case"previous":s===0?d=0:s===-1?d=c:d=s-1;break;case"next":s>-1&&s<c&&(d=s+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:a[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var s=0,c=l.indexOf(a);a||(c=-1),i==="up"?s=c>0?c-1:l.length-1:i==="down"?s=(c+1)%l.length:i==="pageup"?(s=c-o,s<0&&(s=0)):i==="pagedown"?(s=c+o,s>l.length-1&&(s=l.length-1)):i==="last"&&(s=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(eu):ve(ve({},eu),this.props.theme):eu}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,l=this.getClassNames,s=this.getValue,c=this.selectOption,d=this.setValue,f=this.props,h=f.isMulti,p=f.isRtl,m=f.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:l,getValue:s,hasValue:g,isMulti:h,isRtl:p,options:m,selectOption:c,selectProps:f,setValue:d,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 Zg(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return em(this.props,i,o)}},{key:"filterOption",value:function(i,o){return tm(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:l})}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,l=i.inputId,s=i.inputValue,c=i.tabIndex,d=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),m=p.Input,g=this.state,v=g.inputIsHidden,S=g.ariaSelection,w=this.commonProps,y=l||this.getElementId("input"),x=ve(ve(ve({"aria-autocomplete":"list","aria-expanded":f,"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||""},f&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(S==null?void 0:S.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?j.createElement(m,D({},w,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:y,innerRef:this.getInputRef,isDisabled:o,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:s},x)):j.createElement(PO,D({id:y,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ns,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:d,value:""},x))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,l=o.MultiValueContainer,s=o.MultiValueLabel,c=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,h=this.commonProps,p=this.props,m=p.controlShouldRenderValue,g=p.isDisabled,v=p.isMulti,S=p.inputValue,w=p.placeholder,y=this.state,x=y.selectValue,b=y.focusedValue,T=y.isFocused;if(!this.hasValue()||!m)return S?null:j.createElement(f,D({},h,{key:"placeholder",isDisabled:g,isFocused:T,innerProps:{id:this.getElementId("placeholder")}}),w);if(v)return x.map(function(P,O){var G=P===b,z="".concat(i.getOptionLabel(P),"-").concat(i.getOptionValue(P));return j.createElement(a,D({},h,{components:{Container:l,Label:s,Remove:c},isFocused:G,isDisabled:g,key:z,index:O,removeProps:{onClick:function(){return i.removeValue(P)},onTouchEnd:function(){return i.removeValue(P)},onMouseDown:function(W){W.preventDefault()}},data:P}),i.formatOptionLabel(P,"value"))});if(S)return null;var E=x[0];return j.createElement(d,D({},h,{data:E,isDisabled:g}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,l=this.props,s=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||s||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return j.createElement(o,D({},a,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,l=this.props,s=l.isDisabled,c=l.isLoading,d=this.state.isFocused;if(!o||!c)return null;var f={"aria-hidden":"true"};return j.createElement(o,D({},a,{innerProps:f,isDisabled:s,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var l=this.commonProps,s=this.props.isDisabled,c=this.state.isFocused;return j.createElement(a,D({},l,{isDisabled:s,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return j.createElement(o,D({},a,{innerProps:c,isDisabled:l,isFocused:s}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,l=o.GroupHeading,s=o.Menu,c=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,p=o.Option,m=this.commonProps,g=this.state.focusedOption,v=this.props,S=v.captureMenuScroll,w=v.inputValue,y=v.isLoading,x=v.loadingMessage,b=v.minMenuHeight,T=v.maxMenuHeight,E=v.menuIsOpen,P=v.menuPlacement,O=v.menuPosition,G=v.menuPortalTarget,z=v.menuShouldBlockScroll,A=v.menuShouldScrollIntoView,W=v.noOptionsMessage,Y=v.onMenuScrollToTop,N=v.onMenuScrollToBottom;if(!E)return null;var $=function(F,V){var te=F.type,se=F.data,ae=F.isDisabled,J=F.isSelected,le=F.label,ne=F.value,ge=g===se,Se=ae?void 0:function(){return i.onOptionHover(se)},Ue=ae?void 0:function(){return i.selectOption(se)},wt="".concat(i.getElementId("option"),"-").concat(V),at={id:wt,onClick:Ue,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:J};return j.createElement(p,D({},m,{innerProps:at,data:se,isDisabled:ae,isSelected:J,key:wt,label:le,type:te,value:ne,isFocused:ge,innerRef:ge?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(F.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(L){if(L.type==="group"){var F=L.data,V=L.options,te=L.index,se="".concat(i.getElementId("group"),"-").concat(te),ae="".concat(se,"-heading");return j.createElement(a,D({},m,{key:se,data:F,options:V,Heading:l,headingProps:{id:ae,data:L.data},label:i.formatGroupLabel(L.data)}),L.options.map(function(J){return $(J,"".concat(te,"-").concat(J.index))}))}else if(L.type==="option")return $(L,"".concat(L.index))});else if(y){var H=x({inputValue:w});if(H===null)return null;B=j.createElement(f,m,H)}else{var q=W({inputValue:w});if(q===null)return null;B=j.createElement(h,m,q)}var ee={minMenuHeight:b,maxMenuHeight:T,menuPlacement:P,menuPosition:O,menuShouldScrollIntoView:A},R=j.createElement(lD,D({},m,ee),function(L){var F=L.ref,V=L.placerProps,te=V.placement,se=V.maxHeight;return j.createElement(s,D({},m,ee,{innerRef:F,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:y,placement:te}),j.createElement(BO,{captureEnabled:S,onTopArrive:Y,onBottomArrive:N,lockEnabled:z},function(ae){return j.createElement(c,D({},m,{innerRef:function(le){i.getMenuListRef(le),ae(le)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:i.getElementId("listbox")},isLoading:y,maxHeight:se,focusedOption:g}),B)}))});return G||O==="fixed"?j.createElement(d,D({},m,{appendTo:G,controlElement:this.controlRef,menuPlacement:P,menuPosition:O}),R):R}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,l=o.isDisabled,s=o.isMulti,c=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return j.createElement(FO,{name:c,onFocus:this.onValueInputFocus});if(!(!c||l))if(s)if(a){var h=f.map(function(g){return i.getOptionValue(g)}).join(a);return j.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,v){return j.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(g)})}):j.createElement("input",{name:c,type:"hidden",value:""});return j.createElement("div",null,p)}else{var m=f[0]?this.getOptionValue(f[0]):"";return j.createElement("input",{name:c,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,l=o.focusedOption,s=o.focusedValue,c=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return j.createElement(SO,D({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:l,focusedValue:s,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,l=i.SelectContainer,s=i.ValueContainer,c=this.props,d=c.className,f=c.id,h=c.isDisabled,p=c.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return j.createElement(l,D({},g,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),j.createElement(o,D({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p}),j.createElement(s,D({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),j.createElement(a,D({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,l=o.clearFocusValueOnUpdate,s=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,h=o.instancePrefix,p=i.options,m=i.value,g=i.menuIsOpen,v=i.inputValue,S=i.isMulti,w=rs(m),y={};if(a&&(m!==a.value||p!==a.options||g!==a.menuIsOpen||v!==a.inputValue)){var x=g?ZO(i,w):[],b=g?Qg(ls(i,w),"".concat(h,"-option")):[],T=l?eR(o,w):null,E=tR(o,x),P=tu(b,E);y={selectValue:w,focusedOption:E,focusedOptionId:P,focusableOptionsWithIds:b,focusedValue:T,clearFocusValueOnUpdate:!1}}var O=s!=null&&i!==a?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},G=c,z=d&&f;return d&&!z&&(G={value:oo(S,w,w[0]||null),options:w,action:"initial-input-focus"},z=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(G=null),ve(ve(ve({},y),O),{},{prevProps:i,ariaSelection:G,prevWasFocused:z})}}]),n}(C.Component);rm.defaultProps=XO;var rR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function iR(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,l=e.inputValue,s=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,p=e.value,m=xn(e,rR),g=C.useState(l!==void 0?l:n),v=Vn(g,2),S=v[0],w=v[1],y=C.useState(s!==void 0?s:i),x=Vn(y,2),b=x[0],T=x[1],E=C.useState(p!==void 0?p:a),P=Vn(E,2),O=P[0],G=P[1],z=C.useCallback(function(H,q){typeof c=="function"&&c(H,q),G(H)},[c]),A=C.useCallback(function(H,q){var ee;typeof d=="function"&&(ee=d(H,q)),w(ee!==void 0?ee:H)},[d]),W=C.useCallback(function(){typeof h=="function"&&h(),T(!0)},[h]),Y=C.useCallback(function(){typeof f=="function"&&f(),T(!1)},[f]),N=l!==void 0?l:S,$=s!==void 0?s:b,B=p!==void 0?p:O;return ve(ve({},m),{},{inputValue:N,menuIsOpen:$,onChange:z,onInputChange:A,onMenuClose:Y,onMenuOpen:W,value:B})}var oR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],im=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},nu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return im(t,o,i)})||r.some(function(o){return im(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function aR(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?nu.formatCreateLabel:o,l=e.isValidNewOption,s=l===void 0?nu.isValidNewOption:l,c=e.getNewOptionData,d=c===void 0?nu.getNewOptionData:c,f=e.onCreateOption,h=e.options,p=h===void 0?[]:h,m=e.onChange,g=xn(e,oR),v=g.getOptionValue,S=v===void 0?Gg:v,w=g.getOptionLabel,y=w===void 0?Wg:w,x=g.inputValue,b=g.isLoading,T=g.isMulti,E=g.value,P=g.name,O=C.useMemo(function(){return s(x,rs(E),p,{getOptionValue:S,getOptionLabel:y})?d(x,a(x)):void 0},[a,d,y,S,x,s,p,E]),G=C.useMemo(function(){return(n||!b)&&O?i==="first"?[O].concat(ni(p)):[].concat(ni(p),[O]):p},[n,i,b,O,p]),z=C.useCallback(function(A,W){if(W.action!=="select-option")return m(A,W);var Y=Array.isArray(A)?A:[A];if(Y[Y.length-1]===O){if(f)f(x);else{var N=d(x,x),$={action:"create-option",name:P,option:N};m(oo(T,[].concat(ni(rs(E)),[N]),N),$)}return}m(A,W)},[d,x,T,P,O,f,m,E]);return ve(ve({},g),{},{options:G,onChange:z})}var sR=C.forwardRef(function(e,t){var n=iR(e),r=aR(n);return j.createElement(rm,D({ref:t},r))}),om=sR;const lR={control:(e,t)=>X(U({},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=>X(U({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(U({},e),{minHeight:"36px"}),menu:e=>X(U({},e),{position:"relative"}),clearIndicator:e=>X(U({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(U({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(U({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(U({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>X(U({},e),{color:"#333"})},cR=e=>e.map(t=>({label:t,value:t})),uR=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=cR(e.flags),a=()=>i(!r),l=f=>{e.onChange(f.map(h=>h.value))},s=f=>{n(f)},c=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const p=[...e.flags,t];e.onChange(p)}if(e.flags&&e.flags.length>0&&d()){const p=[...e.flags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.flags.length&&e.flags.includes(t)?(a(),f):(f=!0,f)};return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(om,{styles:lR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:s,onKeyDown:c,placeholder:e.labels.flagsPlaceholder,value:o})}),u.jsx(ut,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},so=e=>{const[t,n]=C.useState(!1),[r,i]=C.useState(!1),[o,a]=C.useState(!1),[l,s]=C.useState(!1),[c,d]=C.useState(""),[f,h]=C.useState("primary"),[p,m]=C.useState(""),g=C.useRef(null),v=()=>{g.current&&g.current.click()},S=new Op,w=pt(),y=()=>{d(""),i(!1)},x=W=>{let Y="",N="primary";switch(W){case"copy_url":Y=e.labels.urlCopiedToClipboardMessage,N="primary";break;case"image_deleted":Y=e.labels.imageDeletedMessage,N="primary";break;case"image_reset":Y=e.labels.imageResetMessage,N="primary";break;case"upload_success":Y=e.labels.uploadingImageMessage,N="success";break;case"upload_failed":Y=e.labels.uploadingImageErrorMessage,N="danger";break;case"sign_in_url_failed":Y=e.labels.generateSignedInUrlErrorMessage,N="danger";break;case"encrypting_file_failed":Y=e.labels.encryptingImageErrorMessage,N="danger";break}h(N),d(Y),i(!0)},b=()=>a(!o),T=()=>s(!l),E=()=>{e.clearImage(),x("image_deleted")},P=W=>{navigator.clipboard.writeText(W),x("copy_url")},O=W=>k(this,null,function*(){W.persist();const Y=W.target.files?W.target.files[0]:null;if(Y){n(!0);try{const N=Y.type.split("/")[1],$=yield S.readFileAndHash(Y),B=(yield S.generateHashFileName(Y))+"."+N,H={image_type:N,image_file_name:B,image_size:Y.size,base64_sum:$},q=yield w==null?void 0:w.https.generateSignedInUrl(H);if(q!=null&&q.ok){const ee=yield q.json(),R={"Content-Type":Y.type,"Content-MD5":$};try{const L=new File([Y],B,{type:Y.type}),F=yield w==null?void 0:w.https.storeInBucket(ee.data.signed_url,L,R);e.onChangeImages(F||""),m(F),x("upload_success")}catch(L){console.error("There was a problem with uploading the file: ",L),x("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield q==null?void 0:q.json()),x("sign_in_url_failed")}catch(N){console.error("There was a problem with encrypting file...",N),x("encrypting_file_failed")}n(!1)}}),G=W=>k(this,null,function*(){if(W){n(!0);try{const Y=W.type.split("/")[1],N=yield S.readFileAndHash(W),$=(yield S.generateHashFileName(W))+"."+Y,B={image_type:Y,image_file_name:$,image_size:W.size,base64_sum:N},H=yield w==null?void 0:w.https.generateSignedInUrl(B);if(H!=null&&H.ok){const q=yield H.json(),ee={"Content-Type":W.type,"Content-MD5":N};try{const R=new File([W],$,{type:W.type}),L=yield w==null?void 0:w.https.storeInBucket(q.data.signed_url,R,ee);e.onChangeImages(L||""),x("upload_success")}catch(R){console.error("There was a problem with uploading the file: ",R),x("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield H==null?void 0:H.json()),x("sign_in_url_failed")}catch(Y){console.error("There was a problem with encrypting file...",Y),x("encrypting_file_failed")}n(!1)}}),z=()=>{e.onChangeImages(p),x("image_reset")},A=W=>{e.onChangeImages(W),m(W)};return u.jsxs(u.Fragment,{children:[u.jsxs(I.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(I.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(I.Typography,{level:"title-lg",children:e.title}),u.jsx(I.Tooltip,{title:e.labels.clearImage,children:u.jsx(I.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:u.jsx(xp,{})})})]}),u.jsxs(I.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(I.Skeleton,{loading:t,animation:"wave",children:[e.image?u.jsx(I.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)"}}}):u.jsx(Ic,{sx:{fontSize:"3rem",opacity:.2}}),e.image?u.jsx(I.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:u.jsx(Mp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(I.Tooltip,{title:e.labels.copyUrl,children:u.jsx(I.Button,{onClick:()=>P(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Le.ContentCopy,{})})}),u.jsx(I.Tooltip,{title:e.labels.viewImage,children:u.jsx(I.Button,{onClick:b,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(Bp,{})})}),u.jsx(I.Tooltip,{title:e.labels.cropImage,children:u.jsx(I.Button,{onClick:T,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(eg,{})})})]}),u.jsx(I.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(I.Button,{sx:{width:"100%"},onClick:v,children:[u.jsx(Le.Upload,{})," ",e.labels.uploadImage,u.jsx($p,{type:"file",accept:"image/*",onChange:O,ref:g})]})}),w.https.sportal365Config?u.jsx(I.AccordionGroup,{variant:"soft",children:u.jsxs(I.Accordion,{children:[u.jsx(I.AccordionSummary,{children:u.jsx(I.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),u.jsx(I.AccordionDetails,{children:u.jsx(Lp,{labels:e.labels,onChangeImages:A})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(ut,{showToast:r,message:c,color:f,hideToast:y}),u.jsx(Rp,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:b}),u.jsx(Zp,{labels:e.labels,open:l,imageSrc:e.image,toggleModal:T,uploadImage:G,resetDefaultImageUrl:z})]})},dR=["cover","mobile"],fR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),hR=e=>e?U({},e):{main:"",mobile:"",cover:""},pR=e=>{const[t,n]=C.useState(!1),r=hR(e.defaultValue),i=fR(e.labels),o=(l,s)=>{r[s]=l,e.onChange(r)},a=l=>{r[l]="",e.onChange(r)};return u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(so,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:l=>o(l,"main"),clearImage:()=>a("main")}),u.jsx(I.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(u.Fragment,{children:dR.map(l=>u.jsx(so,{labels:e.labels,title:i.get(l),image:r[l],onChangeImages:s=>o(s,l),clearImage:()=>a(l)},`images-${l}`))}):u.jsx(u.Fragment,{})]})};function gR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const mR=["className","color","component","variant","invertedColors","slots","slotProps"],vR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return lt(r,gR,{})},bR=be("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:l,background:s}=Zl({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),c=Zn(e,`palette.${a}`)||a||Zn(e,`palette.${l}`)||l||s||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||e.vars.palette.background.surface;return[D({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":c==="transparent"?"initial":c,"--Sheet-background":c==="transparent"?"initial":c},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"}),D({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&G_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&Y_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),yR=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:l="plain",invertedColors:s=!1,slots:c={},slotProps:d={}}=r,f=Ae(r,mR),h=D({},r,{color:o,component:a,invertedColors:s,variant:l}),p=vR(h),m=D({},f,{component:a,slots:c,slotProps:d}),[g,v]=Ie("root",{ref:n,className:Ln(p.root,i),elementType:bR,externalForwardedProps:m,ownerState:h});return u.jsx(g,D({},v))});function xR(e){return it("MuiTypography",e)}Xe("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 CR=["color","textColor"],wR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],ru=j.createContext(!1),IR=j.createContext(!1),SR=e=>{const{gutterBottom:t,noWrap:n,level:r,color:i,variant:o}=e,a={root:["root",r,t&&"gutterBottom",n&&"noWrap",i&&`color${ye(i)}`,o&&`variant${ye(o)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return lt(a,xR,{})},AR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),TR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),ER=be("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const l=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return D({"--Icon-fontSize":`calc(1em * ${l})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:D({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&D({display:"flex",alignItems:"center"},t.nesting&&D({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&&D({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]))}),am={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"},iu=j.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,l=Ae(i,CR),s=j.useContext(ru),c=j.useContext(IR),d=BA(D({},l,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:m="body-md",levelMapping:g=am,children:v,endDecorator:S,startDecorator:w,variant:y,slots:x={},slotProps:b={}}=d,T=Ae(d,wR),E=(r=t.color)!=null?r:y?o!=null?o:"neutral":o,P=s||c?t.level||"inherit":m,O=Gf(v,["Skeleton"]),G=f||(s?"span":g[P]||am[P]||"span"),z=D({},d,{level:P,component:G,color:E,gutterBottom:h,noWrap:p,nesting:s,variant:y,unstable_hasSkeleton:O}),A=SR(z),W=D({},T,{component:G,slots:x,slotProps:b}),[Y,N]=Ie("root",{ref:n,className:A.root,elementType:ER,externalForwardedProps:W,ownerState:z}),[$,B]=Ie("startDecorator",{className:A.startDecorator,elementType:AR,externalForwardedProps:W,ownerState:z}),[H,q]=Ie("endDecorator",{className:A.endDecorator,elementType:TR,externalForwardedProps:W,ownerState:z});return u.jsx(ru.Provider,{value:!0,children:u.jsxs(Y,D({},N,{children:[w&&u.jsx($,D({},B,{children:w})),O?j.cloneElement(v,{variant:v.props.variant||"inline"}):v,S&&u.jsx(H,D({},q,{children:S}))]}))})});iu.muiName="Typography";function _R(e){return it("MuiFormControl",e)}const sm=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),kR=Xe("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),PR=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],DR=e=>{const{disabled:t,error:n,size:r,color:i,orientation:o}=e,a={root:["root",o,t&&"disabled",n&&"error",i&&`color${ye(i)}`,r&&`size${ye(r)}`]};return lt(a,_R,{})},OR=be("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return D({"--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",[`&.${sm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${sm.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 ~ .${kR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),ou=j.forwardRef(function(t,n){const r=ct({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:l=!1,required:s=!1,error:c=!1,color:d,size:f="md",orientation:h="vertical",slots:p={},slotProps:m={}}=r,g=Ae(r,PR),v=ji(i),[S,w]=j.useState(null),y=D({},r,{id:v,component:a,color:d,disabled:l,error:c,required:s,size:f,orientation:h});let x;const b=DR(y),[T,E]=Ie("root",{ref:n,className:Ln(b.root,o),elementType:OR,externalForwardedProps:D({},g,{component:a,slots:p,slotProps:m}),ownerState:y}),P=j.useMemo(()=>({disabled:l,required:s,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":S?`${v}-helper-text`:void 0,setHelperText:w,registerEffect:x}),[d,l,c,S,v,x,s,f]);return u.jsx(Ua.Provider,{value:P,children:u.jsx(T,D({},E))})});function RR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const MR=["children","component","htmlFor","id","slots","slotProps"],LR=()=>lt({root:["root"],asterisk:["asterisk"]},RR,{}),BR=be("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)"})),$R=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),au=j.forwardRef(function(t,n){var r,i;const o=ct({props:t,name:"JoyFormLabel"}),{children:a,component:l="label",htmlFor:s,id:c,slots:d={},slotProps:f={}}=o,h=Ae(o,MR),p=j.useContext(Ua),m=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,g=D({},o,{required:m}),v=LR(),S=D({},h,{component:l,slots:d,slotProps:f}),[w,y]=Ie("root",{additionalProps:{htmlFor:s!=null?s:p==null?void 0:p.htmlFor,id:c!=null?c:p==null?void 0:p.labelId},ref:n,className:v.root,elementType:BR,externalForwardedProps:S,ownerState:g}),[x,b]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:$R,externalForwardedProps:S,ownerState:g});return u.jsxs(w,D({},y,{children:[a,m&&u.jsxs(x,D({},b,{children:[" ","*"]}))]}))}),NR=({environment:e,userNotFound:t})=>{const[n,r]=C.useState(""),[i,o]=C.useState(""),[a,l]=C.useState(!1),s=()=>{l(!a)},c=h=>{h.persist(),r(h.target.value)},d=h=>{h.persist(),o(h.target.value)},f=()=>k(this,null,function*(){try{yield zi(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),s()}});return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:u.jsxs(yR,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[u.jsxs("div",{children:[u.jsx(iu,{level:"h4",component:"h1",children:u.jsx("b",{children:"Sign in"})}),u.jsx(iu,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Email"}),u.jsx(Ha,{name:"email",type:"email",onChange:c})]}),u.jsxs(ou,{children:[u.jsx(au,{children:"Password"}),u.jsx(Ha,{name:"password",type:"password",onChange:d})]}),u.jsx(Xr,{sx:{mt:1},onClick:f,children:"Log in"})]})}),u.jsx(ut,{showToast:a,message:t,color:"danger",hideToast:s})]})};function FR(e){return it("MuiCheckbox",e)}const ii=Xe("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),zR=nc(u.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"),jR=nc(u.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"),VR=["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"],UR=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:l,indeterminate:s}=e,c={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${ye(a)}`,o&&`color${ye(o)}`,l&&`size${ye(l)}`],checkbox:["checkbox",t&&"checked",s&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return lt(c,FR,{})},HR=be("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return D({"--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,[`&.${ii.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,[`&.${ii.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),WR=be("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const l=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[D({"--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"},{[`&.${ii.checked}, &.${ii.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[D({},l,{backgroundColor:(r=l==null?void 0:l.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]},{[`&.${ii.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),GR=be("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]},{[`&.${ii.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),YR=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),KR=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>D({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),qR=u.jsx(zR,{}),QR=u.jsx(jR,{}),JR=j.forwardRef(function(t,n){var r,i,o,a,l;const s=ct({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=qR,label:h,defaultChecked:p,disabled:m,disableIcon:g=!1,overlay:v,id:S,indeterminate:w=!1,indeterminateIcon:y=QR,name:x,onBlur:b,onChange:T,onFocus:E,onFocusVisible:P,readOnly:O,required:G,value:z,color:A,variant:W,size:Y="md",component:N,slots:$={},slotProps:B={}}=s,H=Ae(s,VR),q=j.useContext(Ua),ee=(r=(i=t.disabled)!=null?i:q==null?void 0:q.disabled)!=null?r:m,R=(o=(a=t.size)!=null?a:q==null?void 0:q.size)!=null?o:Y,L=ji(S!=null?S:q==null?void 0:q.htmlFor),F={checked:c,defaultChecked:p,disabled:ee,onBlur:b,onChange:T,onFocus:E,onFocusVisible:P},{getInputProps:V,checked:te,disabled:se,focusVisible:ae}=TS(F),J=te||w,ge=J?W||"solid":W||"outlined",Se=t.color||(q!=null&&q.error?"danger":(l=q==null?void 0:q.color)!=null?l:A),at=D({},s,{checked:te,disabled:se,disableIcon:g,overlay:v,focusVisible:ae,color:J?Se||"primary":Se||"neutral",variant:ge,size:R}),kt=UR(at),de=D({},H,{component:N,slots:$,slotProps:B}),[he,xe]=Ie("root",{ref:n,className:kt.root,elementType:HR,externalForwardedProps:de,ownerState:at}),[Te,He]=Ie("checkbox",{className:kt.checkbox,elementType:WR,externalForwardedProps:de,ownerState:at}),[Pe,Ee]=Ie("action",{className:kt.action,elementType:GR,externalForwardedProps:de,ownerState:at}),[It,St]=Ie("input",{additionalProps:D({id:L,name:x,value:z,readOnly:O,role:void 0,required:G!=null?G:q==null?void 0:q.required,"aria-describedby":q==null?void 0:q["aria-describedby"]},w&&{"aria-checked":"mixed"}),className:kt.input,elementType:YR,externalForwardedProps:de,getSlotProps:V,ownerState:at}),[jt,Mt]=Ie("label",{additionalProps:{htmlFor:L},className:kt.label,elementType:KR,externalForwardedProps:de,ownerState:at});let qt=d;return g?qt=null:w?qt=y:te&&(qt=f),u.jsxs(he,D({},xe,{children:[u.jsxs(Te,D({},He,{children:[u.jsx(Pe,D({},Ee,{children:u.jsx(It,D({},St))})),qt]})),h&&u.jsx(ru.Provider,{value:!0,children:u.jsx(jt,D({},Mt,{children:h}))})]}))}),XR=Ve(u.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),oi=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:l})=>{const s=(c,d)=>{c.persist();let f=[...t];if(c.target.checked){f.push(d),a(f);return}f=t.filter(h=>h!==d),a(f)};return u.jsxs(I.Box,{sx:{mb:2},children:[u.jsx(I.Typography,{level:"body-sm",mb:1,children:e}),u.jsxs(D1,{orientation:"horizontal",wrap:!0,sx:{"--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(c=>u.jsxs(Lh,{children:[t.includes(c)&&u.jsx(XR,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(JR,{checked:t.includes(c),variant:t.includes(c)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[c]||"N/A",onChange:d=>s(d,c),slotProps:{action:({checked:d})=>({sx:d?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${c}`)),i===!1?u.jsx(Lh,{children:u.jsx(I.Link,{onClick:l,children:o})}):u.jsx(u.Fragment,{})]})]})},ai={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"]},ZR=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=C.useState(!1);return u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.marketSelection}),u.jsx(I.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),u.jsx(oi,{label:"Popular",values:t,allValues:ai.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?u.jsxs(u.Fragment,{children:[u.jsx(oi,{label:e.playerRelated,values:t,allValues:ai.playerRelated,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.goals,values:t,allValues:ai.goals,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.corners,values:t,allValues:ai.corners,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.correctScores,values:t,allValues:ai.correctScores,valuesMap:n,onChange:r}),u.jsx(oi,{label:e.misc,values:t,allValues:ai.misc,valuesMap:n,onChange:r})]}):u.jsx(u.Fragment,{})]})},gt={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="},eM=({match:e,timeFormat:t})=>{var n,r,i,o;return u.jsxs(I.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[u.jsxs(I.Typography,{mr:1,children:["[",_t(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?u.jsx(I.Tooltip,{title:e.homeTeam.name,children:u.jsxs(I.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[u.jsx(I.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(I.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||gt.team,sx:{width:"20px",height:"20px"}})]})}):u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(I.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||gt.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?u.jsx(I.Tooltip,{title:e.awayTeam.name,children:u.jsxs(I.Box,{display:"flex",gap:.5,alignItems:"center",children:[u.jsx(I.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||gt.team,sx:{width:"20px",height:"20px"}})," ",u.jsx(I.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):u.jsxs(u.Fragment,{children:[u.jsx(I.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||gt.team,sx:{width:"20px",height:"20px"}}),u.jsx(I.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},lm=Ve(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),tM=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),{sdk:l}=pt(),s=()=>k(this,null,function*(){try{const h=yield l.topX.getGames({limit:50},!0),p=yield l.matchQuiz.getGames({limit:50},!0),m=[...h.data,...p.data];if(e.related&&e.related.length>0){const g=m.filter(v=>{var S;return(S=e.related)==null?void 0:S.some(w=>w.entity_id===v.id)}).map(v=>v.id);n(g)}i(m)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"GAME",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return C.useEffect(()=>{s()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.label}),u.jsx(I.Select,{multiple:!0,indicator:u.jsx(lm,{}),defaultValue:t,renderValue:f=>u.jsx(I.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(I.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${I.selectClasses.indicator}`]:{transition:"0.2s",[`&.${I.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(I.Option,{value:f.id,children:f.title?f.title+` (${f.type})`:`Game with no title (${f.type}). ID: ${f.id}`},`related-game-title-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(ut,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},nM=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),{sdk:l}=pt(),s=()=>k(this,null,function*(){try{const h=yield l.loyalty.getTemplates(void 0,!0);if(e.related&&e.related.length>0){const p=h.data.filter(m=>{var g;return(g=e.related)==null?void 0:g.some(v=>v.entity_id===m.id)}).map(m=>m.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"TEMPLATE",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return C.useEffect(()=>{s()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(I.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(I.FormLabel,{color:"primary",children:e.label}),u.jsx(I.Select,{multiple:!0,indicator:u.jsx(lm,{}),defaultValue:t,renderValue:f=>u.jsx(I.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(I.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${I.selectClasses.indicator}`]:{transition:"0.2s",[`&.${I.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(I.Option,{value:f.id,children:f.name||`Template with no name. ID: ${f.id}`},`related-template-name-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(ut,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},cm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),um=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),rM=e=>{const t=(n,r)=>{if(r==="games"){const i=um(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=cm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(tM,{label:e.labels.games,related:cm(e.related),onChange:n=>t(n,"games")}),u.jsx(nM,{label:e.labels.templates,related:um(e.related),onChange:n=>t(n,"templates")})]})},iM=(e,t)=>{const[n,r]=C.useState(null),{https:i}=pt(),o=()=>k(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const l=yield a.json();r(l.data);return}r([])});return C.useEffect(()=>(o(),()=>r(null)),[e,t]),n},us=({my:e})=>u.jsx(I.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:u.jsx(I.CircularProgress,{variant:"solid",color:"neutral"})}),oM=["PENDING","LIVE","SETTLED"],aM=["CANCELED","LIVE","OPEN","PENDING"],sM=["ACTIVE","INACTIVE","EXPIRED"],lM=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"),dm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(sM):e.entityType==="TEMPLATE"?t=Array.from(oM):t=Array.from(aM),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(I.Option,{value:n,children:lM.get(n)},`${e.entityType}-${n}-status`))})};class cM{constructor(){oe(this,"name","");oe(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});oe(this,"trigger",{trigger_type:"DATETIME",date:""})}}const uM=Ve(u.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"),dM=e=>{const[t,n]=C.useState(!1),{https:r}=pt(),i=o=>k(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 u.jsx(u.Fragment,{children:u.jsx(I.Modal,{open:e.isOpen,onClose:e.toggleModal,children:u.jsxs(I.ModalDialog,{children:[u.jsxs(I.DialogTitle,{children:[u.jsx(uM,{}),e.labels.deleteScheduledTaskModalTitle]}),u.jsx(I.Divider,{}),u.jsx(I.DialogContent,{children:u.jsxs(I.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,u.jsx(I.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),u.jsxs(I.DialogActions,{children:[u.jsx(I.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),u.jsx(I.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},fM=e=>{const[t,n]=C.useState(null),[r,i]=C.useState(""),[o,a]=C.useState(""),[l,s]=C.useState(""),[c,d]=C.useState(""),[f,h]=C.useState(!1),[p,m]=C.useState(!1),[g,v]=C.useState(!1),[S,w]=C.useState("success"),[y,x]=C.useState(""),[b,T]=C.useState(!1),E=C.useRef(!1),P=iM(e.entityId,E.current),{https:O}=pt();if(!P)return u.jsx(us,{my:10});const G=()=>T(!b),z=(B,H)=>{v(!0),w(B),x(H)},A=(B,H)=>{i(H.scheduled_task_config.change.status),s(H.trigger.date),n(B)},W=()=>k(this,null,function*(){h(!0);const B=$("CREATE","");if((yield O.setSchedulers(B,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,z("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),z("danger",e.labels.createScheduledTaskErrorMessage)}),Y=(B,H)=>k(this,null,function*(){m(!0);const q=$("UPDATE",H);if((yield O.setSchedulers(q,"UPDATE",B)).ok){m(!1),n(null),i(""),s(""),E.current=!E.current,z("success",e.labels.updateScheduledTaskMessage);return}m(!1),z("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),s("")}),N=()=>{E.current=!E.current},$=(B,H)=>{const q=new cM,ee=B==="CREATE"?o:r,R=B==="CREATE"?null:H,L=B==="CREATE"?c:l;return q.scheduled_task_config.entity_id=e.entityId,q.scheduled_task_config.entity_type=e.entityType,q.scheduled_task_config.change.status=ee,q.trigger.date=L,q.name=R,q};return u.jsxs(u.Fragment,{children:[P.map((B,H)=>u.jsx(I.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(I.CardContent,{children:t===H?u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(I.Select,{value:r,size:"sm",name:"status",onChange:(q,ee)=>i(ee),sx:{minHeight:"36px"},children:u.jsx(dm,{entityType:e.entityType})})]}),u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:l,onChange:q=>s(q)})]}),r&&l?u.jsx(I.Button,{onClick:()=>Y(B.id,B.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):u.jsx(I.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:B.name})]}),u.jsxs(I.Typography,{style:{color:"gray"},children:[e.labels.status,": ",u.jsx(I.Typography,{whiteSpace:"wrap",children:B.status})]})]}),u.jsxs(I.Box,{children:[u.jsx(I.Tooltip,{title:e.labels.edit,children:u.jsx(I.IconButton,{onClick:()=>A(H,B),children:u.jsx(Le.Edit,{})})}),u.jsx(I.Tooltip,{title:e.labels.delete,children:u.jsx(I.IconButton,{onClick:G,children:u.jsx(Le.Delete,{})})})]}),u.jsx(dM,{labels:e.labels,isOpen:b,taskId:B.id,taskName:B.name,toggleModal:G,refetchTasks:N,toggleToast:z})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${B.id}`)),u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:P&&P.length?2:0},children:[u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(I.Select,{value:o,size:"sm",name:"status",onChange:(B,H)=>a(H),sx:{minHeight:"37px"},children:u.jsx(dm,{entityType:e.entityType})})]}),u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Vc,{defaultDate:c,onChange:B=>d(B)})]}),o&&c?u.jsx(I.Button,{onClick:W,loading:f,sx:{mt:"auto"},children:e.labels.create}):u.jsx(I.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),u.jsx(ut,{showToast:g,message:y,color:S,hideToast:()=>v(!1)})]})};function hM(e){return it("MuiIconButton",e)}Xe("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const pM=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],gM=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:l}=e,s={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${ye(a)}`,t&&`color${ye(t)}`,o&&`size${ye(o)}`,l&&"loading"],loadingIndicator:["loadingIndicator"]},c=lt(s,hM,{});return r&&i&&(c.root+=` ${i}`),c},mM=be("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[D({"--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]:D({"--Icon-color":"currentColor"},e.focus.default)}),D({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":D({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':D({"--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]})]}),vM=be(mM,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),bM=be("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return D({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})}),fm=j.forwardRef(function(t,n){var r;const i=ct({props:t,name:"JoyIconButton"}),{children:o,action:a,component:l="button",color:s="neutral",disabled:c,variant:d="plain",loading:f=!1,loadingIndicator:h,size:p="md",slots:m={},slotProps:g={}}=i,v=Ae(i,pM),S=j.useContext(Sp),w=j.useContext(Ap),y=t.variant||S.variant||d,x=t.size||S.size||p,b=t.color||S.color||s,T=(r=t.loading||t.disabled)!=null?r:S.disabled||f||c,E=j.useRef(null),P=sn(E,n),{focusVisible:O,setFocusVisible:G,getRootProps:z}=Rl(D({},i,{disabled:T,rootRef:P})),A=h!=null?h:u.jsx(wp,{color:b,thickness:{sm:2,md:3,lg:4}[x]||3});j.useImperativeHandle(a,()=>({focusVisible:()=>{var L;G(!0),(L=E.current)==null||L.focus()}}),[G]);const W=D({},i,{component:l,color:b,disabled:T,variant:y,loading:f,size:x,focusVisible:O,instanceSize:t.size}),Y=gM(W),N=L=>{var F;let V=i.onClick;if(typeof g.root=="function"?V=g.root(W).onClick:g.root&&(V=g.root.onClick),(F=V)==null||F(L),w){var te;(te=w.onClick)==null||te.call(w,L,i.value)}};let $=i["aria-pressed"];typeof g.root=="function"?$=g.root(W)["aria-pressed"]:g.root&&($=g.root["aria-pressed"]),w!=null&&w.value&&(Array.isArray(w.value)?$=w.value.indexOf(i.value)!==-1:$=w.value===i.value);const B=D({},v,{component:l,slots:m,slotProps:g}),[H,q]=Ie("root",{ref:n,className:Y.root,elementType:vM,getSlotProps:z,externalForwardedProps:B,ownerState:W,additionalProps:{onClick:N,"aria-pressed":$}}),[ee,R]=Ie("loadingIndicator",{className:Y.loadingIndicator,elementType:bM,externalForwardedProps:B,ownerState:W});return u.jsx(H,D({},q,{children:f?u.jsx(ee,D({},R,{children:A})):o}))});fm.muiName="IconButton";const hm=Ve(u.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"),yM=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(s){var c,d;return s?u.jsxs(u.Fragment,{children:[u.jsx(I.ListItemDecorator,{children:u.jsx(I.Avatar,{size:"sm",src:((d=(c=n.find(f=>f.id===s.value))==null?void 0:c.assets)==null?void 0:d.logo)||gt.competition})}),s.label]}):null}const a=C.useRef(null),l=(s,c)=>{i(c)};return u.jsxs(I.FormControl,{sx:{mb:1},children:[u.jsx(I.FormLabel,{required:r,color:"primary",children:e}),u.jsx(I.Select,X(U({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:l},t&&{endDecorator:u.jsx(fm,{variant:"plain",color:"neutral",onMouseDown:s=>{s.stopPropagation()},onClick:()=>{var s;i(""),(s=a.current)==null||s.focusVisible()},sx:{width:"18px",height:"18px"},children:u.jsx(hm,{})}),indicator:null}),{children:n.map((s,c)=>{var d;return u.jsxs(C.Fragment,{children:[c!==0?u.jsx(I.ListDivider,{role:"none"}):null,u.jsxs(I.Option,{value:s.id,label:s.name,children:[u.jsx(I.ListItemDecorator,{children:u.jsx(I.Avatar,{size:"sm",src:((d=s.assets)==null?void 0:d.logo)||gt.competition})}),s.name]})]},`${s.id}-${c}`)})}))]})};function xM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pm=xM,CM=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,wM=CM,IM=wM,SM=typeof self=="object"&&self&&self.Object===Object&&self,AM=IM||SM||Function("return this")(),gm=AM,TM=gm,EM=function(){return TM.Date.now()},_M=EM,kM=/\s/;function PM(e){for(var t=e.length;t--&&kM.test(e.charAt(t)););return t}var DM=PM,OM=DM,RM=/^\s+/;function MM(e){return e&&e.slice(0,OM(e)+1).replace(RM,"")}var LM=MM,BM=gm,$M=BM.Symbol,su=$M,mm=su,vm=Object.prototype,NM=vm.hasOwnProperty,FM=vm.toString,lo=mm?mm.toStringTag:void 0;function zM(e){var t=NM.call(e,lo),n=e[lo];try{e[lo]=void 0;var r=!0}catch(o){}var i=FM.call(e);return r&&(t?e[lo]=n:delete e[lo]),i}var jM=zM,VM=Object.prototype,UM=VM.toString;function HM(e){return UM.call(e)}var WM=HM,bm=su,GM=jM,YM=WM,KM="[object Null]",qM="[object Undefined]",ym=bm?bm.toStringTag:void 0;function QM(e){return e==null?e===void 0?qM:KM:ym&&ym in Object(e)?GM(e):YM(e)}var JM=QM;function XM(e){return e!=null&&typeof e=="object"}var ZM=XM,eL=JM,tL=ZM,nL="[object Symbol]";function rL(e){return typeof e=="symbol"||tL(e)&&eL(e)==nL}var xm=rL,iL=LM,Cm=pm,oL=xm,wm=NaN,aL=/^[-+]0x[0-9a-f]+$/i,sL=/^0b[01]+$/i,lL=/^0o[0-7]+$/i,cL=parseInt;function uL(e){if(typeof e=="number")return e;if(oL(e))return wm;if(Cm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=iL(e);var n=sL.test(e);return n||lL.test(e)?cL(e.slice(2),n?2:8):aL.test(e)?wm:+e}var dL=uL,fL=pm,lu=_M,Im=dL,hL="Expected a function",pL=Math.max,gL=Math.min;function mL(e,t,n){var r,i,o,a,l,s,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(hL);t=Im(t)||0,fL(n)&&(d=!!n.leading,f="maxWait"in n,o=f?pL(Im(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(T){var E=r,P=i;return r=i=void 0,c=T,a=e.apply(P,E),a}function m(T){return c=T,l=setTimeout(S,t),d?p(T):a}function g(T){var E=T-s,P=T-c,O=t-E;return f?gL(O,o-P):O}function v(T){var E=T-s,P=T-c;return s===void 0||E>=t||E<0||f&&P>=o}function S(){var T=lu();if(v(T))return w(T);l=setTimeout(S,g(T))}function w(T){return l=void 0,h&&r?p(T):(r=i=void 0,a)}function y(){l!==void 0&&clearTimeout(l),c=0,r=s=i=l=void 0}function x(){return l===void 0?a:w(lu())}function b(){var T=lu(),E=v(T);if(r=arguments,i=this,s=T,E){if(l===void 0)return m(s);if(f)return clearTimeout(l),l=setTimeout(S,t),p(s)}return l===void 0&&(l=setTimeout(S,t)),a}return b.cancel=y,b.flush=x,b}var vL=mL;const si=fn(vL),Cn=({option:e})=>u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),u.jsx(I.Typography,{children:e.label}),u.jsx(I.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),Sm=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)||gt.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)||gt.flag}}))||[],bL=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=C.useState([]),[l,s]=C.useState([]),[c,d]=C.useState(!1),[f,h]=C.useState(""),[p,m]=C.useState(!1),{sdk:g}=pt(),v=()=>m(!p),S=(b,T)=>{a(T),i(T[0]?[T[0].id]:[])},w=3;C.useEffect(()=>{!f&&n&&n.length&&g.football.getCompetitions({competitionIds:n}).then(b=>{a(Sm(b))}).catch(b=>{console.error(b),v(),a([])})},[]);const y=C.useMemo(()=>si(b=>{d(!0),g.football.getCompetitions({name:b}).then(T=>{s([...Sm(T)]),d(!1)}).catch(T=>{console.error(T),v(),s([]),d(!1)})},300),[]);C.useEffect(()=>{if(!f||f.length<w){s([]);return}return y(f),()=>y.cancel()},[f,y]);const x=(b,T)=>b.map((E,P)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:O=>T({index:P}).onClick(O),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:E},`option_${E.id}`)},E.id));return u.jsxs(I.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{required:r,color:"primary",children:t}),u.jsx(I.Box,{children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(b,T)=>b.id===T.id,endDecorator:c?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:l,disabled:o.length===1,filterOptions:b=>b.filter(T=>!o.some(E=>E.value===T.value)),onInputChange:(b,T)=>{h(T)},onChange:S,getOptionKey:b=>b.id,value:o,renderTags:x,renderOption:(b,T)=>u.jsx(I.AutocompleteOption,X(U({},b),{children:u.jsx(Cn,{option:T})}))})}),u.jsx(ut,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:v})]})},Am=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)||gt.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)||gt.flag}}))||[],yL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=C.useState([]),[a,l]=C.useState([]),[s,c]=C.useState(!1),[d,f]=C.useState(""),[h,p]=C.useState(!1),{sdk:m}=pt(),g=()=>p(!h),v=(x,b)=>{o(b);const T=b.map(E=>E.id);r(T&&T.length?T:null)},S=3;C.useEffect(()=>{!d&&t&&t.length&&m.football.getCompetitions({competitionIds:t}).then(x=>{o(Am(x))}).catch(x=>{console.error(x),g(),o([])})},[]);const w=C.useMemo(()=>si(x=>{c(!0);const b={name:x,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?b.competitionIds=Array.from(n):delete b.competitionIds,m.football.getCompetitions(b).then(T=>{l([...Am(T)]),c(!1)}).catch(T=>{console.error(T),g(),l([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<S){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(x,b)=>x.map((T,E)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:P=>b({index:E}).onClick(P),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:T},`option_${T.id}`)},T.id));return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(x,b)=>x.id===b.id,endDecorator:s?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:x=>x.filter(b=>!i.some(T=>T.value===b.value)),onInputChange:(x,b)=>{f(b)},onChange:v,getOptionKey:x=>x.id,value:i,renderTags:y,renderOption:(x,b)=>u.jsx(I.AutocompleteOption,X(U({},x),{children:u.jsx(Cn,{option:b})}))})}),u.jsx(ut,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:g})]})},Tm=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})))||[],xL=({labels:e,ids:t,onChange:n})=>{const[r,i]=C.useState([]),[o,a]=C.useState([]),[l,s]=C.useState(!1),[c,d]=C.useState(""),[f,h]=C.useState(!1),{sdk:p}=pt(),m=()=>h(!f),g=(y,x)=>{i(x);const b=x.map(T=>T.id);n(b&&b.length?b:null)},v=3;C.useEffect(()=>{!c&&t&&t.length&&p.profile.getByIds(t).then(y=>{i(Tm(y))}).catch(y=>{m(),console.error(y),i([])})},[]);const S=C.useMemo(()=>si(y=>{s(!0),p.profile.getByIds([],y).then(x=>{a([...Tm(x)]),s(!1)}).catch(x=>{console.error(x),m(),a([]),s(!1)})},300),[]);C.useEffect(()=>{if(!c||c.length<v){a([]);return}return S(c),()=>S.cancel()},[c,S]);const w=(y,x)=>y.map((b,T)=>{var E;return u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:P=>x({index:T}).onClick(P),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=b.avatar)!=null?E:gt.avatar}),u.jsx(I.Typography,{children:b.label})]})},b.id)});return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(y,x)=>y.id===x.id,endDecorator:l?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:y=>y.filter(x=>!r.some(b=>b.value===x.value)),onInputChange:(y,x)=>{d(x)},onChange:g,getOptionKey:y=>y.id,value:r,renderTags:w,renderOption:(y,x)=>{var b;return u.jsx(I.AutocompleteOption,X(U({},y),{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(I.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(b=x.avatar)!=null?b:gt.avatar}),u.jsx(I.Typography,{children:x.label})]})}))}})}),u.jsx(ut,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:m})]})},Em=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)||gt.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)||gt.flag}}))||[],CL=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=C.useState([]),[a,l]=C.useState([]),[s,c]=C.useState(!1),[d,f]=C.useState(""),[h,p]=C.useState(!1),{sdk:m}=pt(),g=()=>p(!h),v=(x,b)=>{o(b);const T=b.map(E=>E.id);r(T&&T.length?T:null)},S=3;C.useEffect(()=>{!d&&t&&t.length&&m.football.getTeams({teamIds:t,scope:n}).then(x=>{const b=x.data.filter(T=>!T.name.includes("/"));o(Em(b))}).catch(x=>{console.error(x),g(),o([])})},[]);const w=C.useMemo(()=>si(x=>{c(!0),m.football.getTeams({name:x,scope:n}).then(b=>{const T=b.data.filter(E=>!E.name.includes("/"));l([...Em(T)]),c(!1)}).catch(b=>{console.error(b),g(),l([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<S){l([]);return}return w(d),()=>w.cancel()},[d,w]);const y=(x,b)=>x.map((T,E)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:P=>b({index:E}).onClick(P),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:T},`option_${T.id}`)},T.id));return u.jsxs(u.Fragment,{children:[u.jsx(I.Box,{sx:{marginBottom:"16px"},children:u.jsx(I.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(x,b)=>x.id===b.id,endDecorator:s?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:x=>x.filter(b=>!i.some(T=>T.value===b.value)),onInputChange:(x,b)=>{f(b)},onChange:v,getOptionKey:x=>x.id,value:i,renderTags:y,renderOption:(x,b)=>u.jsx(I.AutocompleteOption,X(U({},x),{children:u.jsx(Cn,{option:b})}))})}),u.jsx(ut,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:g})]})},_m=({checked:e,disabled:t,onChange:n})=>u.jsx(I.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:r=>n(r.target.checked),sx:{ml:1,"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${I.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}}}),wL=({label:e,defaultValue:t,description:n,disabled:r,descriptionColor:i,onChange:o})=>n?u.jsxs(I.Box,{mb:2,children:[u.jsx(I.Typography,{component:"label",endDecorator:u.jsx(_m,{checked:t,disabled:r,onChange:o}),children:e}),u.jsx(I.Typography,{level:"body-sm",color:i||"neutral",children:n})]}):u.jsx(I.Typography,{sx:()=>({marginBottom:"16px"}),component:"label",endDecorator:u.jsx(_m,{checked:t,disabled:r,onChange:o}),children:e}),IL={control:(e,t)=>X(U({},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=>X(U({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>X(U({},e),{minHeight:"36px"}),menu:e=>X(U({},e),{position:"relative"}),clearIndicator:e=>X(U({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>X(U({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>X(U({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>X(U({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>X(U({},e),{color:"#333"})},SL=e=>e.map(t=>({label:t,value:t})),km=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=SL(e.tags),a=()=>i(!r),l=f=>{e.onChange(f.map(h=>h.value))},s=f=>{n(f)},c=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.tags&&e.tags.length===0){const p=[...e.tags,t];e.onChange(p)}if(e.tags&&e.tags.length>0&&d()){const p=[...e.tags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.tags&&e.tags.length&&e.tags.includes(t)?(a(),f):(f=!0,f)};return u.jsxs(u.Fragment,{children:[u.jsx(om,{styles:IL,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:s,onKeyDown:c,placeholder:e.labels.tagsPlaceholder,value:o}),u.jsx(ut,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},AL=Ve(u.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class Pm{constructor(){oe(this,"contestId","");oe(this,"contestType","");oe(this,"description","");oe(this,"userList",[])}}const TL=(e,t,n)=>{const[r,i]=C.useState(null),{sdk:o}=pt(),a=()=>k(this,null,function*(){try{let l;switch(t){case"top_x":l=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":l=yield o.matchQuiz.getGameWinners(e,!0);break;default:l=yield o.loyalty.getTemplateWinners(e,!0)}l.userList&&l.userList.forEach(s=>{s.tags||(s.tags=[])}),i(l)}catch(l){const s=l;console.error(l),s.error.code!==404&&s.error.status!=="code_unknown_contest"&&n(),i(new Pm)}});return C.useEffect(()=>{a()},[]),r};class EL{constructor(){oe(this,"position","");oe(this,"profileId","");oe(this,"note","");oe(this,"tags",[])}}function _L(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 kL=_L,PL=Array.isArray,DL=PL,Dm=su,OL=kL,RL=DL,ML=xm,LL=1/0,Om=Dm?Dm.prototype:void 0,Rm=Om?Om.toString:void 0;function Mm(e){if(typeof e=="string")return e;if(RL(e))return OL(e,Mm)+"";if(ML(e))return Rm?Rm.call(e):"";var t=e+"";return t=="0"&&1/e==-LL?"-0":t}var BL=Mm,$L=BL;function NL(e){return e==null?"":$L(e)}var Lm=NL;function FL(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 zL=FL;function jL(e){return function(t){return e==null?void 0:e[t]}}var VL=jL,UL=VL,HL={À:"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"},WL=UL(HL),GL=WL,YL=GL,KL=Lm,qL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,QL="\\u0300-\\u036f",JL="\\ufe20-\\ufe2f",XL="\\u20d0-\\u20ff",ZL=QL+JL+XL,e2="["+ZL+"]",t2=RegExp(e2,"g");function n2(e){return e=KL(e),e&&e.replace(qL,YL).replace(t2,"")}var r2=n2,i2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function o2(e){return e.match(i2)||[]}var a2=o2,s2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function l2(e){return s2.test(e)}var c2=l2,Bm="\\ud800-\\udfff",u2="\\u0300-\\u036f",d2="\\ufe20-\\ufe2f",f2="\\u20d0-\\u20ff",h2=u2+d2+f2,$m="\\u2700-\\u27bf",Nm="a-z\\xdf-\\xf6\\xf8-\\xff",p2="\\xac\\xb1\\xd7\\xf7",g2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",m2="\\u2000-\\u206f",v2=" \\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",Fm="A-Z\\xc0-\\xd6\\xd8-\\xde",b2="\\ufe0e\\ufe0f",zm=p2+g2+m2+v2,jm="['’]",Vm="["+zm+"]",y2="["+h2+"]",Um="\\d+",x2="["+$m+"]",Hm="["+Nm+"]",Wm="[^"+Bm+zm+Um+$m+Nm+Fm+"]",C2="\\ud83c[\\udffb-\\udfff]",w2="(?:"+y2+"|"+C2+")",I2="[^"+Bm+"]",Gm="(?:\\ud83c[\\udde6-\\uddff]){2}",Ym="[\\ud800-\\udbff][\\udc00-\\udfff]",li="["+Fm+"]",S2="\\u200d",Km="(?:"+Hm+"|"+Wm+")",A2="(?:"+li+"|"+Wm+")",qm="(?:"+jm+"(?:d|ll|m|re|s|t|ve))?",Qm="(?:"+jm+"(?:D|LL|M|RE|S|T|VE))?",Jm=w2+"?",Xm="["+b2+"]?",T2="(?:"+S2+"(?:"+[I2,Gm,Ym].join("|")+")"+Xm+Jm+")*",E2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",k2=Xm+Jm+T2,P2="(?:"+[x2,Gm,Ym].join("|")+")"+k2,D2=RegExp([li+"?"+Hm+"+"+qm+"(?="+[Vm,li,"$"].join("|")+")",A2+"+"+Qm+"(?="+[Vm,li+Km,"$"].join("|")+")",li+"?"+Km+"+"+qm,li+"+"+Qm,_2,E2,Um,P2].join("|"),"g");function O2(e){return e.match(D2)||[]}var R2=O2,M2=a2,L2=c2,B2=Lm,$2=R2;function N2(e,t,n){return e=B2(e),t=n?void 0:t,t===void 0?L2(e)?$2(e):M2(e):e.match(t)||[]}var F2=N2,z2=zL,j2=r2,V2=F2,U2="['’]",H2=RegExp(U2,"g");function W2(e){return function(t){return z2(V2(j2(t).replace(H2,"")),e,"")}}var G2=W2,Y2=G2,K2=Y2(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),q2=K2;const Q2=fn(q2);class J2{constructor(){oe(this,"id","");oe(this,"value","");oe(this,"label","")}}class X2 extends J2{constructor(){super(...arguments);oe(this,"logo","");oe(this,"countryFlag","");oe(this,"countryName","")}}class Zm extends X2{constructor(){super(...arguments);oe(this,"group","")}}const Z2=(e,t)=>t||e||"-------------",cu=(e,t)=>Array.isArray(e)?e.map(n=>cu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>X(U({},n),{[Q2(r)]:cu(e[r])}),{}):e,ev=e=>{const t=[];return e.competitions.forEach(n=>{t.push(uu(n,"competition"))}),e.teams.forEach(n=>{t.push(uu(n,"team"))}),e.players.forEach(n=>{t.push(uu(n,"player"))}),t},uu=(e,t)=>{var r,i,o,a,l;const n=new Zm;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)||gt.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||gt.team:n.logo=((o=e.assets)==null?void 0:o.logo)||gt.competition,n.countryName=e.country.name,n.countryFlag=((l=(a=e.country)==null?void 0:a.assets)==null?void 0:l.flag)||gt.country,n},eB=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"}},tB=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"}},nB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,S,w,y,x,b;const[o,a]=C.useState(t.position),[l,s]=C.useState(t.note),[c,d]=C.useState(t.tags),f=o||l||c.length>0,h=T=>{T.persist();const{value:E}=T.target;a(E),r("position",E)},p=T=>{T.persist();const{value:E}=T.target;s(E),r("note",E)},m=T=>{d(T),r("tags",T)},g=()=>{a(""),s(""),d([]),i()};return u.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[u.jsx("td",{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",children:[u.jsx(I.Avatar,{src:((v=e.profileModel)==null?void 0:v.avatar)||"",alt:((S=e.profileModel)==null?void 0:S.name)||"Unknown",sx:{mr:1}}),u.jsxs(I.Box,{children:[u.jsxs(I.Typography,{fontWeight:"md",children:[Z2((w=e.profileModel)==null?void 0:w.name,(y=e.profileModel)==null?void 0:y.nickname)," ",(x=e.profileModel)!=null&&x.name?u.jsxs(I.Typography,{children:["(",(b=e.profileModel)==null?void 0:b.name,")"]}):u.jsx(u.Fragment,{})]}),u.jsx(I.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),u.jsx("td",{style:{textAlign:"center"},children:e.points}),u.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),u.jsx("td",{children:u.jsx(I.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(I.Input,{name:"note",value:l,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(km,{labels:n,tags:c,onChange:m})}),u.jsx("td",{children:u.jsx(I.Tooltip,{title:n.clearWinner,children:u.jsx(I.IconButton,{onClick:g,variant:"outlined",color:"danger",disabled:!f,children:u.jsx(Le.Remove,{})})})})]})},rB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?X(U({},f),{[o]:a}):f);r(d);return}const s=new EL;s.profileId=i,s[o]=a;const c=[...e.winners,s];r(c)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>X(U({},o),{userList:i}))};return e.leaderboard?u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?u.jsx(I.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):u.jsx(u.Fragment,{}),u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.nicknameAndName}),u.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),u.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),u.jsx("th",{style:{width:"100px"},children:e.labels.position}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags}),u.jsx("th",{children:e.labels.actions})]})}),u.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>u.jsx(nB,{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}`)):u.jsx(u.Fragment,{}),u.jsx("tr",{children:u.jsx("td",{colSpan:7,children:e.hasMoreParticipants?u.jsx(I.Box,{textAlign:"center",my:1,children:u.jsx(I.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):u.jsx(u.Fragment,{})})})]})]})]}):u.jsx(us,{my:40})},iB=(e,t,n,r,i)=>{const[o,a]=C.useState(null),[l,s]=C.useState(!1),[c,d]=C.useState(!1),{sdk:f}=pt(),h=()=>k(this,null,function*(){d(!0);const p={limit:10,page:r},m=!0;try{let g;t==="template"?g=yield f.loyalty.getLeaderboard(e,p,m):g=yield f.loyalty.getLeaderboardForGame(e,p,m),g.meta.pagination.numberOfPages>r?s(!0):s(!1),o&&o.length?a(v=>[...v,...g.data]):a(g.data)}catch(g){console.error(g),i("danger",n),a([])}d(!1)});return C.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:l,isLeaderboardLoading:c}};class oB{constructor(){oe(this,"isValid",!0);oe(this,"message","");oe(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));oe(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});oe(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 aB=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 u.jsx(I.Card,{variant:"plain",children:t?u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),u.jsx(I.Sheet,{children:u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{style:{width:"3%"},children:"#"}),u.jsx("th",{children:e.labels.name}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags})]})}),u.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return u.jsxs("tr",{children:[u.jsx("td",{children:n.position}),u.jsx("td",{children:u.jsxs(I.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[u.jsx(I.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),u.jsxs(I.Box,{textAlign:"left",children:[u.jsxs(I.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",u.jsxs(I.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),u.jsx(I.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),u.jsx("td",{children:n.note}),u.jsx("td",{children:n.tags.map(o=>u.jsx(I.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):u.jsx(I.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},sB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Pm,lB=e=>{var b;const[t,n]=C.useState(sB(e.winners)),[r,i]=C.useState(((b=e.winners)==null?void 0:b.description)||""),[o,a]=C.useState(!1),[l,s]=C.useState(1),[c,d]=C.useState(!1),[f,h]=C.useState("danger"),[p,m]=C.useState(""),g=(T,E)=>{h(T),m(E),d(!0)},{leaderboard:v,hasMoreParticipants:S,isLeaderboardLoading:w}=iB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,l,g),{https:y}=pt(),x=()=>k(this,null,function*(){a(!0);const T=JSON.parse(JSON.stringify(t));if(T.contestId=e.entityId,T.contestType=e.entityType==="template"?"TEMPLATE":"GAME",T.description=r,delete T.contestModel,T.userList.length>0){const P=new oB().validate(T.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!P.isValid){g("danger",P.message),a(!1);return}}else delete T.userList;const E=cu(T);try{yield y.setWinners(E),g("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(P){console.error(P),g("danger",Object.keys(e.winners).length?e.labels.editWinnersErrorMessage:e.labels.createWinnersErrorMessage)}a(!1)});return u.jsxs(u.Fragment,{children:[u.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:u.jsx(I.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:u.jsxs(I.Box,{width:"100%",sx:{overflowX:"auto"},children:[u.jsxs(I.Card,{variant:"plain",children:[u.jsx(ic,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:T=>{i(T)}}),u.jsx(rB,{winners:t.userList,leaderboard:v,hasMoreParticipants:S,isLoading:w,setPage:s,setWinnersRequestBody:n,labels:e.labels}),u.jsx(I.Box,{textAlign:"center",my:3,children:u.jsx(I.Button,{variant:"solid",color:"primary",onClick:x,loading:o,children:e.labels.save})}),u.jsx(I.Divider,{sx:{my:4}})]}),v?u.jsx(aB,{winners:t,profiles:v.map(T=>T.profileModel),labels:e.labels}):u.jsx(u.Fragment,{})]})})}),u.jsx(ut,{showToast:c,color:f,message:p,hideToast:()=>d(!1)})]})},cB=e=>{const[t,n]=C.useState(!1),r=()=>n(!0),i=TL(e.entityId,e.entityType,r);return i?u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{p:2,children:[u.jsx(I.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:u.jsx(AL,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),u.jsxs(I.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",u.jsx(I.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),u.jsx(lB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),u.jsx(ut,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):u.jsx(us,{my:50})},uB=10,dB=e=>{var f;const[t,n]=C.useState([]),[r,i]=C.useState(!1),[o,a]=C.useState(""),{sdk:l}=pt(),s=C.useMemo(()=>si(h=>{if(!h){n([]),i(!1);return}i(!0),l.football.search({query:h}).then(p=>{n([...ev(p)]),i(!1)}).catch(p=>{console.error(p),n([]),i(!1)})},300),[]);C.useEffect(()=>(s(o),()=>s.cancel()),[o,s]);const c=(h,p)=>{const m=p.map(g=>g.id);e.setOptions(p),e.handleResetData(),e.setFilters(g=>X(U({},g),{entityIds:m}))},d=(h,p)=>h.map((m,g)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:v=>p({index:g}).onClick(v),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:m},`option_${m.id}`)},m.id));return u.jsxs(I.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),u.jsx(I.Autocomplete,{getOptionDisabled:()=>e.options.length===uB,forcePopupIcon:!1,multiple:!0,loading:r,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(h,p)=>h.id===p.id,endDecorator:r?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.options.length>0?"":e.labels.typeContextTagNamePlaceholder,options:t,filterOptions:h=>h.filter(p=>!e.options.some(m=>m.value===p.value)),onInputChange:(h,p)=>{a(p)},onChange:c,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(f=e.options)!=null?f:[],renderTags:d,renderOption:(h,p)=>u.jsx(I.AutocompleteOption,X(U({},h),{children:u.jsx(Cn,{option:p})}))})]})};function tv(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 co;(function(e){e.event="event",e.props="prop"})(co||(co={}));function nr(){}function fB(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 uo(e){return!!(e||"").match(/\d/)}function ci(e){return e==null}function hB(e){return typeof e=="number"&&isNaN(e)}function nv(e){return ci(e)||hB(e)||typeof e=="number"&&!isFinite(e)}function rv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function pB(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 gB(e,t,n){var r=pB(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 mB(e){var t=C.useRef(e);t.current=e;var n=C.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function du(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 vB(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 iv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function ov(e,t){return Array(t+1).join(e)}function av(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,l=i.length;return a<0?i="0."+ov("0",Math.abs(a))+i:a>=l?i=i+ov("0",a-l):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function sv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=du(e),o=i.beforeDecimal,a=i.afterDecimal,l=i.hasNegation,s=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:s.toFixed(t),d=c.split("."),f=o;o&&Number(d[0])&&(f=o.split("").reverse().reduce(function(g,v,S){return g.length>S?(Number(g[0])+Number(v)).toString()+g.substring(1,g.length):v+g},d[0]));var h=iv(d[1]||"",t,n),p=l?"-":"",m=r?".":"";return""+p+f+m+h}function wr(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 lv=fB(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}}}),bB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function yB(e,t,n){return Math.min(Math.max(e,t),n)}function fu(e){return Math.max(e.selectionStart,e.selectionEnd)}function xB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function CB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function wB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function IB(e,t,n,r,i,o,a){a===void 0&&(a=wB);var l=i.findIndex(function(x){return x}),s=e.slice(0,l);!t&&!n.startsWith(s)&&(t=s,n=s+n,r=r+s.length);for(var c=n.length,d=e.length,f={},h=new Array(c),p=0;p<c;p++){h[p]=-1;for(var m=0,g=d;m<g;m++){var v=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m});if(v&&f[m]!==!0){h[p]=m,f[m]=!0;break}}}for(var S=r;S<c&&(h[S]===-1||!o(n[S]));)S++;var w=S===c||h[S]===-1?d:h[S];for(S=r-1;S>0&&h[S]===-1;)S--;var y=S===-1||h[S]===-1?0:h[S]+1;return y>w?w:r-y<w-r?y:w}function cv(e,t,n,r){var i=e.length;if(t=yB(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 SB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(uo(e[n])||uo(e[n-1]));return t}function uv(e,t,n,r,i,o){o===void 0&&(o=nr);var a=mB(function(m,g){var v,S;return nv(m)?(S="",v=""):typeof m=="number"||g?(S=typeof m=="number"?av(m):m,v=r(S)):(S=i(m,void 0),v=r(S)),{formattedValue:v,numAsString:S}}),l=C.useState(function(){return a(ci(e)?t:e,n)}),s=l[0],c=l[1],d=function(m,g){m.formattedValue!==s.formattedValue&&c({formattedValue:m.formattedValue,numAsString:m.value}),o(m,g)},f=e,h=n;ci(e)&&(f=s.numAsString,h=!0);var p=a(f,h);return C.useMemo(function(){c(p)},[p.formattedValue]),[s,d]}function AB(e){return e.replace(/[^0-9]/g,"")}function TB(e){return e}function EB(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=TB);var l=e.removeFormatting;l===void 0&&(l=AB);var s=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,h=e.onChange;h===void 0&&(h=nr);var p=e.onKeyDown;p===void 0&&(p=nr);var m=e.onMouseUp;m===void 0&&(m=nr);var g=e.onFocus;g===void 0&&(g=nr);var v=e.onBlur;v===void 0&&(v=nr);var S=e.value,w=e.getCaretBoundary;w===void 0&&(w=SB);var y=e.isValidInputCharacter;y===void 0&&(y=uo);var x=e.isCharacterSame,b=tv(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),T=uv(S,s,!!c,a,l,d),E=T[0],P=E.formattedValue,O=E.numAsString,G=T[1],z=C.useRef(),A=C.useRef({formattedValue:P,numAsString:O}),W=function(de,he){A.current={formattedValue:de.formattedValue,numAsString:de.value},G(de,he)},Y=C.useState(!1),N=Y[0],$=Y[1],B=C.useRef(null),H=C.useRef({setCaretTimeout:null,focusTimeout:null});C.useEffect(function(){return $(!0),function(){clearTimeout(H.current.setCaretTimeout),clearTimeout(H.current.focusTimeout)}},[]);var q=a,ee=function(de,he){var xe=parseFloat(he);return{formattedValue:de,value:he,floatValue:isNaN(xe)?void 0:xe}},R=function(de,he,xe){de.selectionStart===0&&de.selectionEnd===de.value.length||(wr(de,he),H.current.setCaretTimeout=setTimeout(function(){de.value===xe&&de.selectionStart!==he&&wr(de,he)},0))},L=function(de,he,xe){return cv(de,he,w(de),xe)},F=function(de,he,xe){var Te=w(he),He=IB(he,P,de,xe,Te,y,x);return He=cv(he,He,Te),He},V=function(de){var he=de.formattedValue;he===void 0&&(he="");var xe=de.input,Te=de.source,He=de.event,Pe=de.numAsString,Ee;if(xe){var It=de.inputValue||xe.value,St=fu(xe);xe.value=he,Ee=F(It,he,St),Ee!==void 0&&R(xe,Ee,he)}he!==P&&W(ee(he,Pe),{event:He,source:Te})};C.useEffect(function(){var de=A.current,he=de.formattedValue,xe=de.numAsString;(P!==he||O!==xe)&&W(ee(P,O),{event:void 0,source:co.props})},[P,O]);var te=B.current?fu(B.current):void 0,se=typeof window!="undefined"?C.useLayoutEffect:C.useEffect;se(function(){var de=B.current;if(P!==A.current.formattedValue&&de){var he=F(A.current.formattedValue,P,te);de.value=P,R(de,he,P)}},[P]);var ae=function(de,he,xe){var Te=he.target,He=z.current?bB(z.current,Te.selectionEnd):lv(P,de),Pe=Object.assign(Object.assign({},He),{lastValue:P}),Ee=l(de,Pe),It=q(Ee);if(Ee=l(It,void 0),f&&!f(ee(It,Ee))){var St=he.target,jt=fu(St),Mt=F(de,P,jt);return St.value=P,R(St,Mt,P),!1}return V({formattedValue:It,numAsString:Ee,inputValue:de,event:he,source:xe,input:he.target}),!0},J=function(de,he){he===void 0&&(he=0);var xe=de.selectionStart,Te=de.selectionEnd;z.current={selectionStart:xe,selectionEnd:Te+he}},le=function(de){var he=de.target,xe=he.value,Te=ae(xe,de,co.event);Te&&h(de),z.current=void 0},ne=function(de){var he=de.target,xe=de.key,Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee;xe==="ArrowLeft"||xe==="Backspace"?Ee=Math.max(Te-1,0):xe==="ArrowRight"?Ee=Math.min(Te+1,Pe.length):xe==="Delete"&&(Ee=Te);var It=0;xe==="Delete"&&Te===He&&(It=1);var St=xe==="ArrowLeft"||xe==="ArrowRight";if(Ee===void 0||Te!==He&&!St){p(de),J(he,It);return}var jt=Ee;if(St){var Mt=xe==="ArrowLeft"?"left":"right";jt=L(Pe,Ee,Mt),jt!==Ee&&de.preventDefault()}else xe==="Delete"&&!y(Pe[Ee])?jt=L(Pe,Ee,"right"):xe==="Backspace"&&!y(Pe[Ee])&&(jt=L(Pe,Ee,"left"));jt!==Ee&&R(he,jt,Pe),p(de),J(he,It)},ge=function(de){var he=de.target,xe=function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;if(Pe===void 0&&(Pe=""),Te===He){var Ee=L(Pe,Te);Ee!==Te&&R(he,Ee,Pe)}};xe(),requestAnimationFrame(function(){xe()}),m(de),J(he)},Se=function(de){de.persist&&de.persist();var he=de.target,xe=de.currentTarget;B.current=he,H.current.focusTimeout=setTimeout(function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee=L(Pe,Te);Ee!==Te&&!(Te===0&&He===Pe.length)&&R(he,Ee,Pe),g(Object.assign(Object.assign({},de),{currentTarget:xe}))},0)},Ue=function(de){B.current=null,clearTimeout(H.current.focusTimeout),clearTimeout(H.current.setCaretTimeout),v(de)},wt=N&&xB()?"numeric":void 0,at=Object.assign({inputMode:wt},b,{type:t,value:P,onChange:le,onKeyDown:ne,onMouseUp:ge,onFocus:Se,onBlur:Ue});if(n==="text")return i?C.createElement(C.Fragment,null,i(P,b)||null):C.createElement("span",Object.assign({},b,{ref:o}),P);if(r){var kt=r;return C.createElement(kt,Object.assign({},at,{ref:o}))}return C.createElement("input",Object.assign({},at,{ref:o}))}function dv(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,l=t.thousandsGroupStyle;if(l===void 0&&(l="thousand"),e===""||e==="-")return e;var s=ds(t),c=s.thousandSeparator,d=s.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=du(e,a),p=h.beforeDecimal,m=h.afterDecimal,g=h.addNegation;return n!==void 0&&(m=iv(m,n,!!r)),c&&(p=gB(p,c,l)),i&&(p=i+p),o&&(m=m+o),g&&(p="-"+p),e=p+(f&&d||"")+m,e}function ds(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 _B(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 kB(e,t){return new RegExp("(^-)|[0-9]|"+rv(e),"g")}function PB(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function DB(e,t,n){var r;t===void 0&&(t=CB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var l=n.decimalScale,s=t.from,c=t.to,d=c.start,f=c.end,h=ds(n),p=h.allowedDecimalSeparators,m=h.decimalSeparator,g=e[f]===m;if(uo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var v=l===0?"":m;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var S=function(B,H,q){var ee=!1,R=!1;o.startsWith("-")?ee=!1:B.startsWith("--")?(ee=!1,R=!0):a.startsWith("-")&&B.length===a.length?ee=!1:B[0]==="-"&&(ee=!0);var L=ee?1:0;return R&&(L=2),L&&(B=B.substring(L),H-=L,q-=L),{value:B,start:H,end:q,hasNegation:ee}},w=S(e,d,f),y=w.hasNegation;r=w,e=r.value,d=r.start,f=r.end;var x=S(t.lastValue,s.start,s.end),b=x.start,T=x.end,E=x.value,P=e.substring(d,f);e.length&&E.length&&(b>E.length-a.length||T<o.length)&&!(P&&a.startsWith(P))&&(e=E);var O=0;e.startsWith(o)?O+=o.length:d<o.length&&(O=d),e=e.substring(O),f-=O;var G=e.length,z=e.length-a.length;e.endsWith(a)?G=z:(f>z||f>e.length-a.length)&&(G=f),e=e.substring(0,G),e=_B(y?"-"+e:e,i),e=(e.match(kB(m))||[]).join("");var A=e.indexOf(m);e=e.replace(new RegExp(rv(m),"g"),function(B,H){return H===A?".":""});var W=du(e,i),Y=W.beforeDecimal,N=W.afterDecimal,$=W.addNegation;return c.end-c.start<s.end-s.start&&Y===""&&g&&!parseFloat(N)&&(e=$?"-":""),e}function OB(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 RB(e){var t=ds(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,8 +2468,8 @@ 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 MB(e){e=RB(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=nr);var o=e.onBlur;o===void 0&&(o=nr);var a=e.thousandSeparator,l=e.decimalScale,s=e.fixedDecimalScale,c=e.prefix;c===void 0&&(c="");var d=e.defaultValue,f=e.value,h=e.valueIsNumericString,p=e.onValueChange,g=tv(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),m=ds(e),v=m.decimalSeparator,A=m.allowedDecimalSeparators,x=function(B){return dv(B,e)},b=function(B,L){return DB(B,L,e)},S=ci(f)?d:f,y=h!=null?h:PB(S,c,t);ci(f)?ci(d)||(y=y||typeof d=="number"):y=y||typeof f=="number";var w=function(B){return nv(B)?B:(typeof B=="number"&&(B=av(B)),y&&typeof l=="number"?sv(B,l,!!s):B)},E=uv(w(f),w(d),!!y,x,b,p),k=E[0],N=k.numAsString,Y=k.formattedValue,W=E[1],T=function(B){var L=B.target,U=B.key,q=L.selectionStart,ee=L.selectionEnd,O=L.value;if(O===void 0&&(O=""),(U==="Backspace"||U==="Delete")&&ee<c.length){B.preventDefault();return}if(q!==ee){i(B);return}U==="Backspace"&&O[0]==="-"&&q===c.length+1&&n&&wr(L,1),l&&s&&(U==="Backspace"&&O[q-1]===v?(wr(L,q-1),B.preventDefault()):U==="Delete"&&O[q]===v&&B.preventDefault()),A!=null&&A.includes(U)&&O[q]===v&&wr(L,q+1);var M=a===!0?",":a;U==="Backspace"&&O[q-1]===M&&wr(L,q-1),U==="Delete"&&O[q]===M&&wr(L,q+1),i(B)},H=function(B){var L=N;if(L.match(/\d/g)||(L=""),r||(L=vB(L)),s&&l&&(L=sv(L,l,s)),L!==N){var U=dv(L,e);W({formattedValue:U,value:L,floatValue:parseFloat(L)},{event:B,source:co.event})}o(B)},G=function(B){return B===v?!0:uo(B)},$=function(B){var L=B.currentValue,U=B.lastValue,q=B.formattedValue,ee=B.currentValueIndex,O=B.formattedValueIndex,M=L[ee],F=q[O],j=lv(U,L),te=j.to,se=function(ae){return b(ae).indexOf(".")+c.length};return f===0&&s&&l&&L[te.start]===v&&se(L)<ee&&se(q)>O?!1:ee>=te.start&&ee<te.end&&A&&A.includes(M)&&F===v?!0:M===F};return Object.assign(Object.assign({},g),{value:Y,valueIsNumericString:!1,isValidInputCharacter:G,isCharacterSame:$,onValueChange:W,format:x,removeFormatting:b,getCaretBoundary:function(B){return OB(B,e)},onKeyDown:T,onBlur:H})}function LB(e){var t=MB(e);return C.createElement(EB,Object.assign({},t))}const BB=z.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=We(a,["onChange","isAllowed"]);return u.jsx(LB,X(V({},o),{getInputRef:n,onValueChange:l=>{r({target:{name:t.name,value:l.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),$B=e=>{const t=n=>{e.onChange(Number(n.target.value))};return u.jsxs(ou,{size:e.size||"sm",children:[u.jsx(au,{children:e.label}),u.jsx(Ha,{sx:e.sx,value:e.defaultValue,onChange:t,slotProps:{input:{component:BB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?u.jsx(I.FormHelperText,{children:e.description}):u.jsx(u.Fragment,{})]})},NB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",FB=(e,t,n,r)=>{const i=e.filter(c=>c.type.toLocaleLowerCase()==="competition").map(c=>c.id),o=e.filter(c=>c.type.toLocaleLowerCase()==="team").map(c=>c.id),a=e.filter(c=>c.type.toLocaleLowerCase()==="player").map(c=>c.id),l=[],s=[];if(i.length>0){const c=t.football.getCompetitions({competitionIds:i}).then(d=>{s.push(d)}).catch(d=>{console.error(d),r()});l.push(c)}if(o.length>0){const c=t.football.getTeams({teamIds:o}).then(d=>{s.push(d.data)}).catch(d=>{console.error(d),r()});l.push(c)}if(a.length>0){const c=t.football.getPlayers({playerIds:a}).then(d=>{s.push(d.data)}).catch(d=>{console.error(d),r()});l.push(c)}Promise.all(l).then(()=>{const d=Array.prototype.concat.apply([],s).map(f=>zB(f));n(d)})},zB=e=>{const t=new Zm;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=NB(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:gt.country,t},jB=10,VB=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),[l,s]=C.useState(""),[c,d]=C.useState(!1),{sdk:f}=pt(),h=()=>d(!c),p=(v,A)=>{n(A),e.onChangeTags(A)};C.useEffect(()=>{FB(e.tags,f,n,h)},[e.tags]);const g=C.useMemo(()=>si(v=>{if(!v){i([]),a(!1);return}a(!0),f.football.search({query:v}).then(A=>{i([...ev(A)]),a(!1)}).catch(A=>{console.error(A),i([]),a(!1)})},300),[]);C.useEffect(()=>(g(l),()=>g.cancel()),[l,g]);const m=(v,A)=>v.map((x,b)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:S=>A({index:b}).onClick(S),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:x},`option_${x.id}`)},x.id));return u.jsxs(I.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),u.jsx(I.Autocomplete,{getOptionDisabled:()=>t.length===jB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(v,A)=>v.id===A.id,endDecorator:o?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:v=>v.filter(A=>!t.some(x=>x.value===A.value)),onInputChange:(v,A)=>{s(A)},onChange:p,getOptionKey:v=>v.id,groupBy:v=>v.group+"s",value:t!=null?t:[],renderTags:m,renderOption:(v,A)=>u.jsx(I.AutocompleteOption,X(V({},v),{children:u.jsx(Cn,{option:A})}))}),u.jsx(ut,{showToast:c,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},UB=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),HB=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=UB(e.labels),o=(s,c)=>{const d=s.target.value;t.content[c]=d,e.onChange(t)},a=(s,c)=>{const d=s.target.value;t.campaign[c]=d,e.onChange(t)},l=s=>{s.length?t.tags=s.map(c=>({id:c.id,type:c.group,source:"football"})):t.tags=[],e.onChange(t)};return u.jsx(u.Fragment,{children:u.jsxs(Fh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${ac.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:[u.jsx(jr,{children:e.labels.tags}),u.jsx(jr,{children:e.labels.content}),u.jsx(jr,{children:e.labels.campaign})]}),u.jsx(Qr,{value:0,sx:{px:0},children:u.jsx(VB,{labels:e.labels,tags:e.context.tags,onChangeTags:l})}),u.jsx(Qr,{value:1,sx:{px:0},children:Object.keys(n).map(s=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{label:i.get(s),placeholder:"",defaultValue:n[s],required:!1,size:"sm",onChange:c=>o(c,s)})},`context-content-${s}`))}),u.jsx(Qr,{value:2,sx:{px:0},children:Object.keys(r).map(s=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{label:i.get(s),placeholder:"",defaultValue:r[s],required:!1,size:"sm",onChange:c=>a(c,s)})},`context-campaign-${s}`))})]})})},WB=e=>e?V({},e):{main:"",mobile:""},GB=e=>{const[t,n]=C.useState(!1),r=WB(e.defaultValue),i=(a,l)=>{r[l]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(so,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:a=>i(a,"main"),clearImage:()=>o("main")}),u.jsx(I.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(so,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):u.jsx(u.Fragment,{})]})},YB=({defaultValue:e,isClearable:t=!0,labels:n,onChange:r})=>{const i=C.useRef(null),o=[{id:"FREE",label:n.free},{id:"LEAD",label:n.lead},{id:"REGISTERED",label:n.registered}];return u.jsxs(I.FormControl,{size:"sm",sx:{mb:2},children:[u.jsx(I.FormLabel,{children:n.authRequirement}),u.jsx(I.Select,X(V({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,l)=>r(l),sx:{minHeight:"37px"}},e&&t&&{endDecorator:u.jsx(I.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:u.jsx(hm,{})}),indicator:null}),{children:o.map(a=>u.jsx(I.Option,{value:a.id,children:a.label},a.id))})),u.jsx(I.FormHelperText,{children:n.authRequirementDescription})]})};function KB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const fs=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function ui(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function hu(e){return"nodeType"in e}function Rt(e){var t,n;return e?ui(e)?e:hu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function pu(e){const{Document:t}=Rt(e);return e instanceof t}function fo(e){return ui(e)?!1:e instanceof Rt(e).HTMLElement}function fv(e){return e instanceof Rt(e).SVGElement}function di(e){return e?ui(e)?e.document:hu(e)?pu(e)?e:fo(e)||fv(e)?e.ownerDocument:document:document:document}const ln=fs?C.useLayoutEffect:C.useEffect;function hs(e){const t=C.useRef(e);return ln(()=>{t.current=e}),C.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 qB(){const e=C.useRef(null),t=C.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=C.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ho(e,t){t===void 0&&(t=[e]);const n=C.useRef(e);return ln(()=>{n.current!==e&&(n.current=e)},t),n}function po(e,t){const n=C.useRef();return C.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ps(e){const t=hs(e),n=C.useRef(null),r=C.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function gs(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let gu={};function go(e,t){return C.useMemo(()=>{if(t)return t;const n=gu[e]==null?0:gu[e]+1;return gu[e]=n,e+"-"+n},[e,t])}function hv(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 l=Object.entries(a);for(const[s,c]of l){const d=o[s];d!=null&&(o[s]=d+e*c)}return o},V({},t))}}const fi=hv(1),mo=hv(-1);function QB(e){return"clientX"in e&&"clientY"in e}function ms(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function JB(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function vs(e){if(JB(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 QB(e)?{x:e.clientX,y:e.clientY}:null}const rr=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[rr.Translate.toString(e),rr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),pv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function XB(e){return e.matches(pv)?e:e.querySelector(pv)}const ZB={display:"none"};function e$(e){let{id:t,value:n}=e;return C.createElement("div",{id:t,style:ZB},n)}function t$(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 C.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function n$(){const[e,t]=C.useState("");return{announce:C.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const gv=C.createContext(null);function r$(e){const t=C.useContext(gv);C.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function i$(){const[e]=C.useState(()=>new Set),t=C.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[C.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var l;return(l=a[i])==null?void 0:l.call(a,o)})},[e]),t]}const o$={draggable:`
|
|
2471
|
+
`),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function MB(e){e=RB(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=nr);var o=e.onBlur;o===void 0&&(o=nr);var a=e.thousandSeparator,l=e.decimalScale,s=e.fixedDecimalScale,c=e.prefix;c===void 0&&(c="");var d=e.defaultValue,f=e.value,h=e.valueIsNumericString,p=e.onValueChange,m=tv(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=ds(e),v=g.decimalSeparator,S=g.allowedDecimalSeparators,w=function($){return dv($,e)},y=function($,B){return DB($,B,e)},x=ci(f)?d:f,b=h!=null?h:PB(x,c,t);ci(f)?ci(d)||(b=b||typeof d=="number"):b=b||typeof f=="number";var T=function($){return nv($)?$:(typeof $=="number"&&($=av($)),b&&typeof l=="number"?sv($,l,!!s):$)},E=uv(T(f),T(d),!!b,w,y,p),P=E[0],O=P.numAsString,G=P.formattedValue,z=E[1],A=function($){var B=$.target,H=$.key,q=B.selectionStart,ee=B.selectionEnd,R=B.value;if(R===void 0&&(R=""),(H==="Backspace"||H==="Delete")&&ee<c.length){$.preventDefault();return}if(q!==ee){i($);return}H==="Backspace"&&R[0]==="-"&&q===c.length+1&&n&&wr(B,1),l&&s&&(H==="Backspace"&&R[q-1]===v?(wr(B,q-1),$.preventDefault()):H==="Delete"&&R[q]===v&&$.preventDefault()),S!=null&&S.includes(H)&&R[q]===v&&wr(B,q+1);var L=a===!0?",":a;H==="Backspace"&&R[q-1]===L&&wr(B,q-1),H==="Delete"&&R[q]===L&&wr(B,q+1),i($)},W=function($){var B=O;if(B.match(/\d/g)||(B=""),r||(B=vB(B)),s&&l&&(B=sv(B,l,s)),B!==O){var H=dv(B,e);z({formattedValue:H,value:B,floatValue:parseFloat(B)},{event:$,source:co.event})}o($)},Y=function($){return $===v?!0:uo($)},N=function($){var B=$.currentValue,H=$.lastValue,q=$.formattedValue,ee=$.currentValueIndex,R=$.formattedValueIndex,L=B[ee],F=q[R],V=lv(H,B),te=V.to,se=function(ae){return y(ae).indexOf(".")+c.length};return f===0&&s&&l&&B[te.start]===v&&se(B)<ee&&se(q)>R?!1:ee>=te.start&&ee<te.end&&S&&S.includes(L)&&F===v?!0:L===F};return Object.assign(Object.assign({},m),{value:G,valueIsNumericString:!1,isValidInputCharacter:Y,isCharacterSame:N,onValueChange:z,format:w,removeFormatting:y,getCaretBoundary:function($){return OB($,e)},onKeyDown:A,onBlur:W})}function LB(e){var t=MB(e);return C.createElement(EB,Object.assign({},t))}const BB=j.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=We(a,["onChange","isAllowed"]);return u.jsx(LB,X(U({},o),{getInputRef:n,onValueChange:l=>{r({target:{name:t.name,value:l.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),$B=e=>{const t=n=>{e.onChange(Number(n.target.value))};return u.jsxs(ou,{size:e.size||"sm",children:[u.jsx(au,{children:e.label}),u.jsx(Ha,{sx:e.sx,value:e.defaultValue,onChange:t,slotProps:{input:{component:BB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?u.jsx(I.FormHelperText,{children:e.description}):u.jsx(u.Fragment,{})]})},NB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",FB=(e,t,n,r)=>{const i=e.filter(c=>c.type.toLocaleLowerCase()==="competition").map(c=>c.id),o=e.filter(c=>c.type.toLocaleLowerCase()==="team").map(c=>c.id),a=e.filter(c=>c.type.toLocaleLowerCase()==="player").map(c=>c.id),l=[],s=[];if(i.length>0){const c=t.football.getCompetitions({competitionIds:i}).then(d=>{s.push(d)}).catch(d=>{console.error(d),r()});l.push(c)}if(o.length>0){const c=t.football.getTeams({teamIds:o}).then(d=>{s.push(d.data)}).catch(d=>{console.error(d),r()});l.push(c)}if(a.length>0){const c=t.football.getPlayers({playerIds:a}).then(d=>{s.push(d.data)}).catch(d=>{console.error(d),r()});l.push(c)}Promise.all(l).then(()=>{const d=Array.prototype.concat.apply([],s).map(f=>zB(f));n(d)})},zB=e=>{const t=new Zm;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=NB(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:gt.country,t},jB=10,VB=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),[l,s]=C.useState(""),[c,d]=C.useState(!1),{sdk:f}=pt(),h=()=>d(!c),p=(v,S)=>{n(S),e.onChangeTags(S)};C.useEffect(()=>{FB(e.tags,f,n,h)},[e.tags]);const m=C.useMemo(()=>si(v=>{if(!v){i([]),a(!1);return}a(!0),f.football.search({query:v}).then(S=>{i([...ev(S)]),a(!1)}).catch(S=>{console.error(S),i([]),a(!1)})},300),[]);C.useEffect(()=>(m(l),()=>m.cancel()),[l,m]);const g=(v,S)=>v.map((w,y)=>u.jsx(I.Chip,{variant:"solid",endDecorator:u.jsx(I.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:x=>S({index:y}).onClick(x),children:u.jsx(Le.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(Cn,{option:w},`option_${w.id}`)},w.id));return u.jsxs(I.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(I.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),u.jsx(I.Autocomplete,{getOptionDisabled:()=>t.length===jB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(v,S)=>v.id===S.id,endDecorator:o?u.jsx(I.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:v=>v.filter(S=>!t.some(w=>w.value===S.value)),onInputChange:(v,S)=>{s(S)},onChange:p,getOptionKey:v=>v.id,groupBy:v=>v.group+"s",value:t!=null?t:[],renderTags:g,renderOption:(v,S)=>u.jsx(I.AutocompleteOption,X(U({},v),{children:u.jsx(Cn,{option:S})}))}),u.jsx(ut,{showToast:c,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},UB=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),HB=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=UB(e.labels),o=(s,c)=>{const d=s.target.value;t.content[c]=d,e.onChange(t)},a=(s,c)=>{const d=s.target.value;t.campaign[c]=d,e.onChange(t)},l=s=>{s.length?t.tags=s.map(c=>({id:c.id,type:c.group,source:"football"})):t.tags=[],e.onChange(t)};return u.jsx(u.Fragment,{children:u.jsxs(Fh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${ac.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:[u.jsx(jr,{children:e.labels.tags}),u.jsx(jr,{children:e.labels.content}),u.jsx(jr,{children:e.labels.campaign})]}),u.jsx(Qr,{value:0,sx:{px:0},children:u.jsx(VB,{labels:e.labels,tags:e.context.tags,onChangeTags:l})}),u.jsx(Qr,{value:1,sx:{px:0},children:Object.keys(n).map(s=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{label:i.get(s),placeholder:"",defaultValue:n[s],required:!1,size:"sm",onChange:c=>o(c,s)})},`context-content-${s}`))}),u.jsx(Qr,{value:2,sx:{px:0},children:Object.keys(r).map(s=>u.jsx(I.Box,{mb:2,children:u.jsx(eo,{label:i.get(s),placeholder:"",defaultValue:r[s],required:!1,size:"sm",onChange:c=>a(c,s)})},`context-campaign-${s}`))})]})})},WB=e=>e?U({},e):{main:"",mobile:""},GB=e=>{const[t,n]=C.useState(!1),r=WB(e.defaultValue),i=(a,l)=>{r[l]=a,e.onChange(r)},o=a=>{r[a]="",e.onChange(r)};return u.jsxs(I.Box,{sx:{marginBottom:"10px"},children:[u.jsx(so,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:a=>i(a,"main"),clearImage:()=>o("main")}),u.jsx(I.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(so,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):u.jsx(u.Fragment,{})]})},YB=({defaultValue:e,isClearable:t=!0,labels:n,onChange:r})=>{const i=C.useRef(null),o=[{id:"FREE",label:n.free},{id:"LEAD",label:n.lead},{id:"REGISTERED",label:n.registered}];return u.jsxs(I.FormControl,{size:"sm",sx:{mb:2},children:[u.jsx(I.FormLabel,{children:n.authRequirement}),u.jsx(I.Select,X(U({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,l)=>r(l),sx:{minHeight:"37px"}},e&&t&&{endDecorator:u.jsx(I.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:u.jsx(hm,{})}),indicator:null}),{children:o.map(a=>u.jsx(I.Option,{value:a.id,children:a.label},a.id))})),u.jsx(I.FormHelperText,{children:n.authRequirementDescription})]})};function KB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const fs=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function ui(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function hu(e){return"nodeType"in e}function Rt(e){var t,n;return e?ui(e)?e:hu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function pu(e){const{Document:t}=Rt(e);return e instanceof t}function fo(e){return ui(e)?!1:e instanceof Rt(e).HTMLElement}function fv(e){return e instanceof Rt(e).SVGElement}function di(e){return e?ui(e)?e.document:hu(e)?pu(e)?e:fo(e)||fv(e)?e.ownerDocument:document:document:document}const ln=fs?C.useLayoutEffect:C.useEffect;function hs(e){const t=C.useRef(e);return ln(()=>{t.current=e}),C.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 qB(){const e=C.useRef(null),t=C.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=C.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ho(e,t){t===void 0&&(t=[e]);const n=C.useRef(e);return ln(()=>{n.current!==e&&(n.current=e)},t),n}function po(e,t){const n=C.useRef();return C.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ps(e){const t=hs(e),n=C.useRef(null),r=C.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function gs(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let gu={};function go(e,t){return C.useMemo(()=>{if(t)return t;const n=gu[e]==null?0:gu[e]+1;return gu[e]=n,e+"-"+n},[e,t])}function hv(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 l=Object.entries(a);for(const[s,c]of l){const d=o[s];d!=null&&(o[s]=d+e*c)}return o},U({},t))}}const fi=hv(1),mo=hv(-1);function QB(e){return"clientX"in e&&"clientY"in e}function ms(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function JB(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function vs(e){if(JB(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 QB(e)?{x:e.clientX,y:e.clientY}:null}const rr=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[rr.Translate.toString(e),rr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),pv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function XB(e){return e.matches(pv)?e:e.querySelector(pv)}const ZB={display:"none"};function e$(e){let{id:t,value:n}=e;return C.createElement("div",{id:t,style:ZB},n)}function t$(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 C.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function n$(){const[e,t]=C.useState("");return{announce:C.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const gv=C.createContext(null);function r$(e){const t=C.useContext(gv);C.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function i$(){const[e]=C.useState(()=>new Set),t=C.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[C.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var l;return(l=a[i])==null?void 0:l.call(a,o)})},[e]),t]}const o$={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
|
-
`},a$={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 s$(e){let{announcements:t=a$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=o$}=e;const{announce:o,announcement:a}=n$(),l=go("DndLiveRegion"),[s,c]=C.useState(!1);if(C.useEffect(()=>{c(!0)},[]),r$(C.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!s)return null;const d=C.createElement(C.Fragment,null,C.createElement(e$,{id:r,value:i.draggable}),C.createElement(t$,{id:l,announcement:a}));return n?Oe.createPortal(d,n):d}var mt;(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"})(mt||(mt={}));function bs(){}function mv(e,t){return C.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function l$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const cn=Object.freeze({x:0,y:0});function c$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function u$(e,t){const n=vs(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 d$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function f$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function vv(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 bv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const h$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=vv(t),o=[];for(const a of r){const{id:l}=a,s=n.get(l);if(s){const c=vv(s),d=i.reduce((h,p,g)=>h+c$(c[g],p),0),f=Number((d/4).toFixed(4));o.push({id:l,data:{droppableContainer:a,value:f}})}}return o.sort(d$)};function p$(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,l=o-n;if(r<i&&n<o){const s=t.width*t.height,c=e.width*e.height,d=a*l,f=d/(s+c-d);return Number(f.toFixed(4))}return 0}const g$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,l=n.get(a);if(l){const s=p$(l,t);s>0&&i.push({id:a,data:{droppableContainer:o,value:s}})}}return i.sort(f$)};function m$(e,t,n){return X(V({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function yv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cn}function v$(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,l)=>X(V({},a),{top:a.top+e*l.y,bottom:a.bottom+e*l.y,left:a.left+e*l.x,right:a.right+e*l.x}),V({},n))}}const b$=v$(1);function xv(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 y$(e,t,n){const r=xv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:l}=r,s=e.left-a-(1-i)*parseFloat(n),c=e.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:c,right:s+d,bottom:c+f,left:s}}const x$={ignoreTransform:!1};function hi(e,t){t===void 0&&(t=x$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Rt(e).getComputedStyle(e);c&&(n=y$(n,c,d))}const{top:r,left:i,width:o,height:a,bottom:l,right:s}=n;return{top:r,left:i,width:o,height:a,bottom:l,right:s}}function Cv(e){return hi(e,{ignoreTransform:!0})}function C$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function w$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function I$(e,t){t===void 0&&(t=Rt(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 ys(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(pu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!fo(i)||fv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&I$(i,o)&&n.push(i),w$(i,o)?n:r(i.parentNode)}return e?r(e):n}function wv(e){const[t]=ys(e,1);return t!=null?t:null}function mu(e){return!fs||!e?null:ui(e)?e:hu(e)?pu(e)||e===di(e).scrollingElement?window:fo(e)?e:null:null}function Iv(e){return ui(e)?e.scrollX:e.scrollLeft}function Sv(e){return ui(e)?e.scrollY:e.scrollTop}function vu(e){return{x:Iv(e),y:Sv(e)}}var xt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(xt||(xt={}));function Av(e){return!fs||!e?!1:e===document.scrollingElement}function Tv(e){const t={x:0,y:0},n=Av(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,l=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:l,maxScroll:r,minScroll:t}}const S$={x:.2,y:.2};function A$(e,t,n,r,i){let{top:o,left:a,right:l,bottom:s}=n;r===void 0&&(r=10),i===void 0&&(i=S$);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=Tv(e),p={x:0,y:0},g={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+m.height?(p.y=xt.Backward,g.y=r*Math.abs((t.top+m.height-o)/m.height)):!d&&s>=t.bottom-m.height&&(p.y=xt.Forward,g.y=r*Math.abs((t.bottom-m.height-s)/m.height)),!h&&l>=t.right-m.width?(p.x=xt.Forward,g.x=r*Math.abs((t.right-m.width-l)/m.width)):!f&&a<=t.left+m.width&&(p.x=xt.Backward,g.x=r*Math.abs((t.left+m.width-a)/m.width)),{direction:p,speed:g}}function T$(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 Ev(e){return e.reduce((t,n)=>fi(t,vu(n)),cn)}function E$(e){return e.reduce((t,n)=>t+Iv(n),0)}function _$(e){return e.reduce((t,n)=>t+Sv(n),0)}function _v(e,t){if(t===void 0&&(t=hi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);wv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const k$=[["x",["left","right"],E$],["y",["top","bottom"],_$]];class bu{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=ys(n),i=Ev(r);this.rect=V({},t),this.width=t.width,this.height=t.height;for(const[o,a,l]of k$)for(const s of a)Object.defineProperty(this,s,{get:()=>{const c=l(r),d=i[o]-c;return this.rect[s]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vo{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 P$(e){const{EventTarget:t}=Rt(e);return e instanceof t?e:di(e)}function yu(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(mi(n,2)+mi(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 on;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(on||(on={}));function kv(e){e.preventDefault()}function D$(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 Pv={start:[_e.Space,_e.Enter],cancel:[_e.Esc],end:[_e.Space,_e.Enter,_e.Tab]},O$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case _e.Right:return X(V({},n),{x:n.x+25});case _e.Left:return X(V({},n),{x:n.x-25});case _e.Down:return X(V({},n),{y:n.y+25});case _e.Up:return X(V({},n),{y:n.y-25})}};class xu{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 vo(di(n)),this.windowListeners=new vo(Rt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(on.Resize,this.handleCancel),this.windowListeners.add(on.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(on.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&_v(r),n(cn)}handleKeyDown(t){if(ms(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Pv,coordinateGetter:a=O$,scrollBehavior:l="smooth"}=i,{code:s}=t;if(o.end.includes(s)){this.handleEnd(t);return}if(o.cancel.includes(s)){this.handleCancel(t);return}const{collisionRect:c}=r.current,d=c?{x:c.left,y:c.top}:cn;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const h=mo(f,d),p={x:0,y:0},{scrollableAncestors:g}=r.current;for(const m of g){const v=t.code,{isTop:A,isRight:x,isLeft:b,isBottom:S,maxScroll:y,minScroll:w}=Tv(m),E=T$(m),k={x:Math.min(v===_e.Right?E.right-E.width/2:E.right,Math.max(v===_e.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(v===_e.Down?E.bottom-E.height/2:E.bottom,Math.max(v===_e.Down?E.top:E.top+E.height/2,f.y))},N=v===_e.Right&&!x||v===_e.Left&&!b,Y=v===_e.Down&&!S||v===_e.Up&&!A;if(N&&k.x!==f.x){const W=m.scrollLeft+h.x,T=v===_e.Right&&W<=y.x||v===_e.Left&&W>=w.x;if(T&&!h.y){m.scrollTo({left:W,behavior:l});return}T?p.x=m.scrollLeft-W:p.x=v===_e.Right?m.scrollLeft-y.x:m.scrollLeft-w.x,p.x&&m.scrollBy({left:-p.x,behavior:l});break}else if(Y&&k.y!==f.y){const W=m.scrollTop+h.y,T=v===_e.Down&&W<=y.y||v===_e.Up&&W>=w.y;if(T&&!h.x){m.scrollTo({top:W,behavior:l});return}T?p.y=m.scrollTop-W:p.y=v===_e.Down?m.scrollTop-y.y:m.scrollTop-w.y,p.y&&m.scrollBy({top:-p.y,behavior:l});break}}this.handleMove(t,fi(mo(f,this.referenceCoordinates),p))}}}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()}}xu.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Pv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const l=o.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Dv(e){return!!(e&&"distance"in e)}function Ov(e){return!!(e&&"delay"in e)}class Cu{constructor(t,n,r){var i;r===void 0&&(r=P$(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=di(a),this.documentListeners=new vo(this.document),this.listeners=new vo(r),this.windowListeners=new vo(Rt(a)),this.initialCoordinates=(i=vs(o))!=null?i:cn,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(on.Resize,this.handleCancel),this.windowListeners.add(on.DragStart,kv),this.windowListeners.add(on.VisibilityChange,this.handleCancel),this.windowListeners.add(on.ContextMenu,kv),this.documentListeners.add(on.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ov(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Dv(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(on.Click,D$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(on.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:l}}=o;if(!i)return;const s=(n=vs(t))!=null?n:cn,c=mo(i,s);if(!r&&l){if(Dv(l)){if(l.tolerance!=null&&yu(c,l.tolerance))return this.handleCancel();if(yu(c,l.distance))return this.handleStart()}if(Ov(l)&&yu(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}t.cancelable&&t.preventDefault(),a(s)}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 R$={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wu extends Cu{constructor(t){const{event:n}=t,r=di(n.target);super(t,R$,r)}}wu.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 M$={move:{name:"mousemove"},end:{name:"mouseup"}};var Iu;(function(e){e[e.RightClick=2]="RightClick"})(Iu||(Iu={}));class L$ extends Cu{constructor(t){super(t,M$,di(t.event.target))}}L$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Iu.RightClick?!1:(r==null||r({event:n}),!0)}}];const Su={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class B$ extends Cu{constructor(t){super(t,Su)}static setup(){return window.addEventListener(Su.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Su.move.name,t)};function t(){}}}B$.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 bo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(bo||(bo={}));var xs;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(xs||(xs={}));function $$(e){let{acceleration:t,activator:n=bo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:l=xs.TreeOrder,pointerCoordinates:s,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=F$({delta:f,disabled:!o}),[g,m]=qB(),v=C.useRef({x:0,y:0}),A=C.useRef({x:0,y:0}),x=C.useMemo(()=>{switch(n){case bo.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case bo.DraggableRect:return i}},[n,i,s]),b=C.useRef(null),S=C.useCallback(()=>{const w=b.current;if(!w)return;const E=v.current.x*A.current.x,k=v.current.y*A.current.y;w.scrollBy(E,k)},[]),y=C.useMemo(()=>l===xs.TreeOrder?[...c].reverse():c,[l,c]);C.useEffect(()=>{if(!o||!c.length||!x){m();return}for(const w of y){if((r==null?void 0:r(w))===!1)continue;const E=c.indexOf(w),k=d[E];if(!k)continue;const{direction:N,speed:Y}=A$(w,k,x,t,h);for(const W of["x","y"])p[W][N[W]]||(Y[W]=0,N[W]=0);if(Y.x>0||Y.y>0){m(),b.current=w,g(S,a),v.current=Y,A.current=N;return}}v.current={x:0,y:0},A.current={x:0,y:0},m()},[t,S,r,m,o,a,JSON.stringify(x),JSON.stringify(p),g,c,y,d,JSON.stringify(h)])}const N$={x:{[xt.Backward]:!1,[xt.Forward]:!1},y:{[xt.Backward]:!1,[xt.Forward]:!1}};function F$(e){let{delta:t,disabled:n}=e;const r=gs(t);return po(i=>{if(n||!r||!i)return N$;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[xt.Backward]:i.x[xt.Backward]||o.x===-1,[xt.Forward]:i.x[xt.Forward]||o.x===1},y:{[xt.Backward]:i.y[xt.Backward]||o.y===-1,[xt.Forward]:i.y[xt.Forward]||o.y===1}}},[n,t,r])}function z$(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return po(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function j$(e,t){return C.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 yo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(yo||(yo={}));var Au;(function(e){e.Optimized="optimized"})(Au||(Au={}));const Rv=new Map;function V$(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=C.useState(null),{frequency:l,measure:s,strategy:c}=i,d=C.useRef(e),f=v(),h=ho(f),p=C.useCallback(function(A){A===void 0&&(A=[]),!h.current&&a(x=>x===null?A:x.concat(A.filter(b=>!x.includes(b))))},[h]),g=C.useRef(null),m=po(A=>{if(f&&!n)return Rv;if(!A||A===Rv||d.current!==e||o!=null){const x=new Map;for(let b of e){if(!b)continue;if(o&&o.length>0&&!o.includes(b.id)&&b.rect.current){x.set(b.id,b.rect.current);continue}const S=b.node.current,y=S?new bu(s(S),S):null;b.rect.current=y,y&&x.set(b.id,y)}return x}return A},[e,o,n,f,s]);return C.useEffect(()=>{d.current=e},[e]),C.useEffect(()=>{f||p()},[n,f]),C.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),C.useEffect(()=>{f||typeof l!="number"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},l))},[l,f,p,...r]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(c){case yo.Always:return!1;case yo.BeforeDragging:return n;default:return!n}}}function Tu(e,t){return po(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function U$(e,t){return Tu(e,t)}function H$(e){let{callback:t,disabled:n}=e;const r=hs(t),i=C.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Cs(e){let{callback:t,disabled:n}=e;const r=hs(t),i=C.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function W$(e){return new bu(hi(e),e)}function Mv(e,t,n){t===void 0&&(t=W$);const[r,i]=C.useState(null);function o(){i(s=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=s!=null?s:n)!=null?c:null}const d=t(e);return JSON.stringify(s)===JSON.stringify(d)?s:d})}const a=H$({callback(s){if(e)for(const c of s){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),l=Cs({callback:o});return ln(()=>{o(),e?(l==null||l.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),a==null||a.disconnect())},[e]),r}function G$(e){const t=Tu(e);return yv(e,t)}const Lv=[];function Y$(e){const t=C.useRef(e),n=po(r=>e?r&&r!==Lv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ys(e):Lv,[e]);return C.useEffect(()=>{t.current=e},[e]),n}function K$(e){const[t,n]=C.useState(null),r=C.useRef(e),i=C.useCallback(o=>{const a=mu(o.target);a&&n(l=>l?(l.set(a,vu(a)),new Map(l)):null)},[]);return C.useEffect(()=>{const o=r.current;if(e!==o){a(o);const l=e.map(s=>{const c=mu(s);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,vu(c)]):null}).filter(s=>s!=null);n(l.length?new Map(l):null),r.current=e}return()=>{a(e),a(o)};function a(l){l.forEach(s=>{const c=mu(s);c==null||c.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>fi(o,a),cn):Ev(e):cn,[e,t])}function Bv(e,t){t===void 0&&(t=[]);const n=C.useRef(null);return C.useEffect(()=>{n.current=null},t),C.useEffect(()=>{const r=e!==cn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?mo(e,n.current):cn}function q$(e){C.useEffect(()=>{if(!fs)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 Q$(e,t){return C.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function $v(e){return C.useMemo(()=>e?C$(e):null,[e])}const Nv=[];function J$(e,t){t===void 0&&(t=hi);const[n]=e,r=$v(n?Rt(n):null),[i,o]=C.useState(Nv);function a(){o(()=>e.length?e.map(s=>Av(s)?r:new bu(t(s),s)):Nv)}const l=Cs({callback:a});return ln(()=>{l==null||l.disconnect(),a(),e.forEach(s=>l==null?void 0:l.observe(s))},[e]),i}function Fv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fo(t)?t:e}function X$(e){let{measure:t}=e;const[n,r]=C.useState(null),i=C.useCallback(c=>{for(const{target:d}of c)if(fo(d)){r(f=>{const h=t(d);return f?X(V({},f),{width:h.width,height:h.height}):h});break}},[t]),o=Cs({callback:i}),a=C.useCallback(c=>{const d=Fv(c);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[l,s]=ps(a);return C.useMemo(()=>({nodeRef:l,rect:n,setRef:s}),[n,l,s])}const Z$=[{sensor:wu,options:{}},{sensor:xu,options:{}}],eN={current:{}},ws={draggable:{measure:Cv},droppable:{measure:Cv,strategy:yo.WhileDragging,frequency:Au.Optimized},dragOverlay:{measure:hi}};class xo 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 tN={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new xo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ws,measureDroppableContainers:bs,windowRect:null,measuringScheduled:!1},zv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bs,draggableNodes:new Map,over:null,measureDroppableContainers:bs},Co=C.createContext(zv),jv=C.createContext(tN);function nN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new xo}}}function rN(e,t){switch(t.type){case mt.DragStart:return X(V({},e),{draggable:X(V({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:X(V({},e),{draggable:X(V({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case mt.DragEnd:case mt.DragCancel:return X(V({},e),{draggable:X(V({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case mt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new xo(e.droppable.containers);return i.set(r,n),X(V({},e),{droppable:X(V({},e.droppable),{containers:i})})}case mt.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 xo(e.droppable.containers);return a.set(n,X(V({},o),{disabled:i})),X(V({},e),{droppable:X(V({},e.droppable),{containers:a})})}case mt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new xo(e.droppable.containers);return o.delete(n),X(V({},e),{droppable:X(V({},e.droppable),{containers:o})})}default:return e}}function iN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=C.useContext(Co),o=gs(r),a=gs(n==null?void 0:n.id);return C.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!ms(o)||document.activeElement===o.target)return;const l=i.get(a);if(!l)return;const{activatorNode:s,node:c}=l;if(!s.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[s.current,c.current]){if(!d)continue;const f=XB(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function Vv(e,t){let i=t,{transform:n}=i,r=We(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(V({transform:o},r)),n):n}function oN(e){return C.useMemo(()=>({draggable:V(V({},ws.draggable),e==null?void 0:e.draggable),droppable:V(V({},ws.droppable),e==null?void 0:e.droppable),dragOverlay:V(V({},ws.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 aN(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=C.useRef(!1),{x:a,y:l}=typeof i=="boolean"?{x:i,y:i}:i;ln(()=>{if(!a&&!l||!t){o.current=!1;return}if(o.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=n(c),f=yv(d,r);if(a||(f.x=0),l||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=wv(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,l,r,n])}const Is=C.createContext(X(V({},cn),{scaleX:1,scaleY:1}));var ir;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ir||(ir={}));const sN=C.memo(function(t){var n,r,i,o;let _s=t,{id:a,accessibility:l,autoScroll:s=!0,children:c,sensors:d=Z$,collisionDetection:f=g$,measuring:h,modifiers:p}=_s,g=We(_s,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const m=C.useReducer(rN,void 0,nN),[v,A]=m,[x,b]=i$(),[S,y]=C.useState(ir.Uninitialized),w=S===ir.Initialized,{draggable:{active:E,nodes:k,translate:N},droppable:{containers:Y}}=v,W=E!=null?k.get(E):null,T=C.useRef({initial:null,translated:null}),H=C.useMemo(()=>{var Ct;return E!=null?{id:E,data:(Ct=W==null?void 0:W.data)!=null?Ct:eN,rect:T}:null},[E,W]),G=C.useRef(null),[$,B]=C.useState(null),[L,U]=C.useState(null),q=ho(g,Object.values(g)),ee=go("DndDescribedBy",a),O=C.useMemo(()=>Y.getEnabled(),[Y]),M=oN(h),{droppableRects:F,measureDroppableContainers:j,measuringScheduled:te}=V$(O,{dragging:w,dependencies:[N.x,N.y],config:M.droppable}),se=z$(k,E),ae=C.useMemo(()=>L?vs(L):null,[L]),J=un(),le=U$(se,M.draggable.measure);aN({activeNode:E!=null?k.get(E):null,config:J.layoutShiftCompensation,initialRect:le,measure:M.draggable.measure});const ne=Mv(se,M.draggable.measure,le),ge=Mv(se?se.parentElement:null),Se=C.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:F,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:Y,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ue=Y.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=X$({measure:M.dragOverlay.measure}),at=(r=wt.nodeRef.current)!=null?r:se,kt=w?(i=wt.rect)!=null?i:ne:null,de=!!(wt.nodeRef.current&&wt.rect),he=G$(de?null:ne),xe=$v(at?Rt(at):null),Te=Y$(w?Ue!=null?Ue:se:null),He=J$(Te),Pe=Vv(p,{transform:{x:N.x-he.x,y:N.y-he.y,scaleX:1,scaleY:1},activatorEvent:L,active:H,activeNodeRect:ne,containerNodeRect:ge,draggingNodeRect:kt,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:He,windowRect:xe}),Ee=ae?fi(ae,N):null,It=K$(Te),St=Bv(It),jt=Bv(It,[ne]),Mt=fi(Pe,St),qt=kt?b$(kt,Pe):null,or=H&&qt?f({active:H,collisionRect:qt,droppableRects:F,droppableContainers:O,pointerCoordinates:Ee}):null,Ts=bv(or,"id"),[wn,wo]=C.useState(null),_u=de?Pe:fi(Pe,jt),ku=m$(_u,(o=wn==null?void 0:wn.rect)!=null?o:null,ne),ze=C.useRef(null),pi=C.useCallback((Ct,_)=>{let{sensor:R,options:K}=_;if(G.current==null)return;const Q=k.get(G.current);if(!Q)return;const re=Ct.nativeEvent,ce=new R({active:G.current,activeNode:Q,event:re,options:K,context:Se,onAbort(ue){if(!k.get(ue))return;const{onDragAbort:fe}=q.current,me={id:ue};fe==null||fe(me),x({type:"onDragAbort",event:me})},onPending(ue,we,fe,me){if(!k.get(ue))return;const{onDragPending:Pt}=q.current,nt={id:ue,constraint:we,initialCoordinates:fe,offset:me};Pt==null||Pt(nt),x({type:"onDragPending",event:nt})},onStart(ue){const we=G.current;if(we==null)return;const fe=k.get(we);if(!fe)return;const{onDragStart:me}=q.current,De={activatorEvent:re,active:{id:we,data:fe.data,rect:T}};Oe.unstable_batchedUpdates(()=>{me==null||me(De),y(ir.Initializing),A({type:mt.DragStart,initialCoordinates:ue,active:we}),x({type:"onDragStart",event:De}),B(ze.current),U(re)})},onMove(ue){A({type:mt.DragMove,coordinates:ue})},onEnd:Ce(mt.DragEnd),onCancel:Ce(mt.DragCancel)});ze.current=ce;function Ce(ue){return function(){return P(this,null,function*(){const{active:fe,collisions:me,over:De,scrollAdjustedTranslate:Pt}=Se.current;let nt=null;if(fe&&Pt){const{cancelDrop:dn}=q.current;nt={activatorEvent:re,active:fe,collisions:me,delta:Pt,over:De},ue===mt.DragEnd&&typeof dn=="function"&&(yield Promise.resolve(dn(nt)))&&(ue=mt.DragCancel)}G.current=null,Oe.unstable_batchedUpdates(()=>{A({type:ue}),y(ir.Uninitialized),wo(null),B(null),U(null),ze.current=null;const dn=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(nt){const In=q.current[dn];In==null||In(nt),x({type:dn,event:nt})}})})}}},[k]),Io=C.useCallback((Ct,_)=>(R,K)=>{const Q=R.nativeEvent,re=k.get(K);if(G.current!==null||!re||Q.dndKit||Q.defaultPrevented)return;const ce={active:re};Ct(R,_.options,ce)===!0&&(Q.dndKit={capturedBy:_.sensor},G.current=K,pi(R,_))},[k,pi]),Es=j$(d,Io);q$(d),ln(()=>{ne&&S===ir.Initializing&&y(ir.Initialized)},[ne,S]),C.useEffect(()=>{const{onDragMove:Ct}=q.current,{active:_,activatorEvent:R,collisions:K,over:Q}=Se.current;if(!_||!R)return;const re={active:_,activatorEvent:R,collisions:K,delta:{x:Mt.x,y:Mt.y},over:Q};Oe.unstable_batchedUpdates(()=>{Ct==null||Ct(re),x({type:"onDragMove",event:re})})},[Mt.x,Mt.y]),C.useEffect(()=>{const{active:Ct,activatorEvent:_,collisions:R,droppableContainers:K,scrollAdjustedTranslate:Q}=Se.current;if(!Ct||G.current==null||!_||!Q)return;const{onDragOver:re}=q.current,ce=K.get(Ts),Ce=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:Ct,activatorEvent:_,collisions:R,delta:{x:Q.x,y:Q.y},over:Ce};Oe.unstable_batchedUpdates(()=>{wo(Ce),re==null||re(ue),x({type:"onDragOver",event:ue})})},[Ts]),ln(()=>{Se.current={activatorEvent:L,active:H,activeNode:se,collisionRect:qt,collisions:or,droppableRects:F,draggableNodes:k,draggingNode:at,draggingNodeRect:kt,droppableContainers:Y,over:wn,scrollableAncestors:Te,scrollAdjustedTranslate:Mt},T.current={initial:kt,translated:qt}},[H,se,or,qt,k,at,kt,F,Y,wn,Te,Mt]),$$(X(V({},J),{delta:N,draggingRect:qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:He}));const gi=C.useMemo(()=>({active:H,activeNode:se,activeNodeRect:ne,activatorEvent:L,collisions:or,containerNodeRect:ge,dragOverlay:wt,draggableNodes:k,droppableContainers:Y,droppableRects:F,over:wn,measureDroppableContainers:j,scrollableAncestors:Te,scrollableAncestorRects:He,measuringConfiguration:M,measuringScheduled:te,windowRect:xe}),[H,se,ne,L,or,ge,wt,k,Y,F,wn,j,Te,He,M,te,xe]),So=C.useMemo(()=>({activatorEvent:L,activators:Es,active:H,activeNodeRect:ne,ariaDescribedById:{draggable:ee},dispatch:A,draggableNodes:k,over:wn,measureDroppableContainers:j}),[L,Es,H,ne,A,ee,k,wn,j]);return C.createElement(gv.Provider,{value:b},C.createElement(Co.Provider,{value:So},C.createElement(jv.Provider,{value:gi},C.createElement(Is.Provider,{value:ku},c)),C.createElement(iN,{disabled:(l==null?void 0:l.restoreFocus)===!1})),C.createElement(s$,X(V({},l),{hiddenTextDescribedById:ee})));function un(){const Ct=($==null?void 0:$.autoScrollEnabled)===!1,_=typeof s=="object"?s.enabled===!1:s===!1,R=w&&!Ct&&!_;return typeof s=="object"?X(V({},s),{enabled:R}):{enabled:R}}}),lN=C.createContext(null),Uv="button",cN="Draggable";function uN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=go(cN),{activators:a,activatorEvent:l,active:s,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=C.useContext(Co),{role:p=Uv,roleDescription:g="draggable",tabIndex:m=0}=i!=null?i:{},v=(s==null?void 0:s.id)===t,A=C.useContext(v?Is:lN),[x,b]=ps(),[S,y]=ps(),w=Q$(a,t),E=ho(n);ln(()=>(f.set(t,{id:t,key:o,node:x,activatorNode:S,data:E}),()=>{const N=f.get(t);N&&N.key===o&&f.delete(t)}),[f,t]);const k=C.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":v&&p===Uv?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[r,p,m,v,g,d.draggable]);return{active:s,activatorEvent:l,activeNodeRect:c,attributes:k,isDragging:v,listeners:r?void 0:w,node:x,over:h,setNodeRef:b,setActivatorNodeRef:y,transform:A}}function Hv(){return C.useContext(jv)}const dN="Droppable",fN={timeout:25};function hN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=go(dN),{active:a,dispatch:l,over:s,measureDroppableContainers:c}=C.useContext(Co),d=C.useRef({disabled:n}),f=C.useRef(!1),h=C.useRef(null),p=C.useRef(null),{disabled:g,updateMeasurementsFor:m,timeout:v}=V(V({},fN),i),A=ho(m!=null?m:r),x=C.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(A.current)?A.current:[A.current]),p.current=null},v)},[v]),b=Cs({callback:x,disabled:g||!a}),S=C.useCallback((k,N)=>{b&&(N&&(b.unobserve(N),f.current=!1),k&&b.observe(k))},[b]),[y,w]=ps(S),E=ho(t);return C.useEffect(()=>{!b||!y.current||(b.disconnect(),f.current=!1,b.observe(y.current))},[y,b]),C.useEffect(()=>(l({type:mt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:y,rect:h,data:E}}),()=>l({type:mt.UnregisterDroppable,key:o,id:r})),[r]),C.useEffect(()=>{n!==d.current.disabled&&(l({type:mt.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,l]),{active:a,rect:h,isOver:(s==null?void 0:s.id)===r,node:y,over:s,setNodeRef:w}}function pN(e){let{animation:t,children:n}=e;const[r,i]=C.useState(null),[o,a]=C.useState(null),l=gs(n);return!n&&!r&&l&&i(l),ln(()=>{if(!o)return;const s=r==null?void 0:r.key,c=r==null?void 0:r.props.id;if(s==null||c==null){i(null);return}Promise.resolve(t(c,o)).then(()=>{i(null)})},[t,r,o]),C.createElement(C.Fragment,null,n,r?C.cloneElement(r,{ref:a}):null)}const gN={x:0,y:0,scaleX:1,scaleY:1};function mN(e){let{children:t}=e;return C.createElement(Co.Provider,{value:zv},C.createElement(Is.Provider,{value:gN},t))}const vN={position:"fixed",touchAction:"none"},bN=e=>ms(e)?"transform 250ms ease":void 0,yN=C.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:l,style:s,transform:c,transition:d=bN}=e;if(!l)return null;const f=i?c:X(V({},c),{scaleX:1,scaleY:1}),h=V(X(V({},vN),{width:l.width,height:l.height,top:l.top,left:l.left,transform:rr.Transform.toString(f),transformOrigin:i&&r?u$(r,l):void 0,transition:typeof d=="function"?d(r):d}),s);return C.createElement(n,{className:a,style:h,ref:t},o)}),Wv=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[l,s]of Object.entries(o.active))s!==void 0&&(i[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,s));if(o!=null&&o.dragOverlay)for(const[l,s]of Object.entries(o.dragOverlay))s!==void 0&&r.node.style.setProperty(l,s);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[s,c]of Object.entries(i))n.node.style.setProperty(s,c);a!=null&&a.active&&n.node.classList.remove(a.active)}},xN={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:rr.Transform.toString(t)},{transform:rr.Transform.toString(n)}]},sideEffects:Wv({styles:{active:{opacity:"0"}}})};function CN(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return hs((o,a)=>{if(t===null)return;const l=n.get(o);if(!l)return;const s=l.node.current;if(!s)return;const c=Fv(a);if(!c)return;const{transform:d}=Rt(a).getComputedStyle(a),f=xv(d);if(!f)return;const h=typeof t=="function"?t:wN(t);return _v(s,i.draggable.measure),h({active:{id:o,data:l.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function wN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=V(V({},xN),e);return o=>{let x=o,{active:a,dragOverlay:l,transform:s}=x,c=We(x,["active","dragOverlay","transform"]);if(!t)return;const d={x:l.rect.left-a.rect.left,y:l.rect.top-a.rect.top},f={scaleX:s.scaleX!==1?a.rect.width*s.scaleX/l.rect.width:1,scaleY:s.scaleY!==1?a.rect.height*s.scaleY/l.rect.height:1},h=V({x:s.x-d.x,y:s.y-d.y},f),p=i(X(V({},c),{active:a,dragOverlay:l,transform:{initial:s,final:h}})),[g]=p,m=p[p.length-1];if(JSON.stringify(g)===JSON.stringify(m))return;const v=r==null?void 0:r(V({active:a,dragOverlay:l},c)),A=l.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(b=>{A.onfinish=()=>{v==null||v(),b()}})}}let Gv=0;function IN(e){return C.useMemo(()=>{if(e!=null)return Gv++,Gv},[e])}const SN=C.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:l="div",className:s,zIndex:c=999}=e;const{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:g,droppableContainers:m,dragOverlay:v,over:A,measuringConfiguration:x,scrollableAncestors:b,scrollableAncestorRects:S,windowRect:y}=Hv(),w=C.useContext(Is),E=IN(f==null?void 0:f.id),k=Vv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:A,overlayNodeRect:v.rect,scrollableAncestors:b,scrollableAncestorRects:S,transform:w,windowRect:y}),N=Tu(h),Y=CN({config:r,draggableNodes:g,droppableContainers:m,measuringConfiguration:x}),W=N?v.setRef:void 0;return C.createElement(mN,null,C.createElement(pN,{animation:Y},f&&E?C.createElement(yN,{key:E,id:f.id,ref:W,as:l,activatorEvent:d,adjustScale:t,className:s,transition:o,rect:N,style:V({zIndex:c},i),transform:k},n):null))});function Eu(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function AN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Ss(e){return e!==null&&e>=0}function TN(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 EN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Yv=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Eu(t,r,n),a=t[i],l=o[i];return!l||!a?null:{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}},Kv="Sortable",qv=C.createContext({activeIndex:-1,containerId:Kv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Yv,disabled:{draggable:!1,droppable:!1}});function _N(e){let{children:t,id:n,items:r,strategy:i=Yv,disabled:o=!1}=e;const{active:a,dragOverlay:l,droppableRects:s,over:c,measureDroppableContainers:d}=Hv(),f=go(Kv,n),h=l.rect!==null,p=C.useMemo(()=>r.map(w=>typeof w=="object"&&"id"in w?w.id:w),[r]),g=a!=null,m=a?p.indexOf(a.id):-1,v=c?p.indexOf(c.id):-1,A=C.useRef(p),x=!TN(p,A.current),b=v!==-1&&m===-1||x,S=EN(o);ln(()=>{x&&g&&d(p)},[x,p,g,d]),C.useEffect(()=>{A.current=p},[p]);const y=C.useMemo(()=>({activeIndex:m,containerId:f,disabled:S,disableTransforms:b,items:p,overIndex:v,useDragOverlay:h,sortedRects:AN(p,s),strategy:i}),[m,f,S.draggable,S.droppable,b,p,v,s,h,i]);return C.createElement(qv.Provider,{value:y},t)}const kN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Eu(n,r,i).indexOf(t)},PN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!c||!r||l!==o&&i===a?!1:n?!0:a!==i&&t===s},DN={duration:200,easing:"ease"},Qv="transform",ON=rr.Transition.toString({property:Qv,duration:0,easing:"linear"}),RN={roleDescription:"sortable"};function MN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=C.useState(null),l=C.useRef(n);return ln(()=>{if(!t&&n!==l.current&&r.current){const s=i.current;if(s){const c=hi(r.current,{ignoreTransform:!0}),d={x:s.left-c.left,y:s.top-c.top,scaleX:s.width/c.width,scaleY:s.height/c.height};(d.x||d.y)&&a(d)}}n!==l.current&&(l.current=n)},[t,n,r,i]),C.useEffect(()=>{o&&a(null)},[o]),o}function LN(e){let{animateLayoutChanges:t=PN,attributes:n,disabled:r,data:i,getNewIndex:o=kN,id:a,strategy:l,resizeObserverConfig:s,transition:c=DN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:g,sortedRects:m,overIndex:v,useDragOverlay:A,strategy:x}=C.useContext(qv),b=BN(r,p),S=d.indexOf(a),y=C.useMemo(()=>V({sortable:{containerId:f,index:S,items:d}},i),[f,i,S,d]),w=C.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:k,isOver:N,setNodeRef:Y}=hN({id:a,data:y,disabled:b.droppable,resizeObserverConfig:V({updateMeasurementsFor:w},s)}),{active:W,activatorEvent:T,activeNodeRect:H,attributes:G,setNodeRef:$,listeners:B,isDragging:L,over:U,setActivatorNodeRef:q,transform:ee}=uN({id:a,data:y,attributes:V(V({},RN),n),disabled:b.draggable}),O=KB(Y,$),M=!!W,F=M&&!g&&Ss(h)&&Ss(v),j=!A&&L,te=j&&F?ee:null,se=l!=null?l:x,ae=F?te!=null?te:se({rects:m,activeNodeRect:H,activeIndex:h,overIndex:v,index:S}):null,J=Ss(h)&&Ss(v)?o({id:a,items:d,activeIndex:h,overIndex:v}):S,le=W==null?void 0:W.id,ne=C.useRef({activeId:le,items:d,newIndex:J,containerId:f}),ge=d!==ne.current.items,Se=t({active:W,containerId:f,isDragging:L,isSorting:M,id:a,index:S,items:d,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:c,wasDragging:ne.current.activeId!=null}),Ue=MN({disabled:!Se,index:S,node:k,rect:E});return C.useEffect(()=>{M&&ne.current.newIndex!==J&&(ne.current.newIndex=J),f!==ne.current.containerId&&(ne.current.containerId=f),d!==ne.current.items&&(ne.current.items=d)},[M,J,f,d]),C.useEffect(()=>{if(le===ne.current.activeId)return;if(le!=null&&ne.current.activeId==null){ne.current.activeId=le;return}const at=setTimeout(()=>{ne.current.activeId=le},50);return()=>clearTimeout(at)},[le]),{active:W,activeIndex:h,attributes:G,data:y,rect:E,index:S,newIndex:J,items:d,isOver:N,isSorting:M,isDragging:L,listeners:B,node:k,overIndex:v,over:U,setNodeRef:O,setActivatorNodeRef:q,setDroppableNodeRef:Y,setDraggableNodeRef:$,transform:Ue!=null?Ue:ae,transition:wt()};function wt(){if(Ue||ge&&ne.current.newIndex===S)return ON;if(!(j&&!ms(T)||!c)&&(M||Se))return rr.Transition.toString(X(V({},c),{property:Qv}))}}function BN(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 As(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 $N=[_e.Down,_e.Right,_e.Up,_e.Left],NN=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:l}}=t;if($N.includes(e.code)){if(e.preventDefault(),!n||!r)return;const s=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case _e.Down:r.top<h.top&&s.push(f);break;case _e.Up:r.top>h.top&&s.push(f);break;case _e.Left:r.left>h.left&&s.push(f);break;case _e.Right:r.left<h.left&&s.push(f);break}});const c=h$({active:n,collisionRect:r,droppableRects:i,droppableContainers:s,pointerCoordinates:null});let d=bv(c,"id");if(d===(a==null?void 0:a.id)&&c.length>1&&(d=c[1].id),d!=null){const f=o.get(n.id),h=o.get(d),p=h?i.get(h.id):null,g=h==null?void 0:h.node.current;if(g&&p&&f&&h){const v=ys(g).some((w,E)=>l[E]!==w),A=Jv(f,h),x=FN(f,h),b=v||!A?{x:0,y:0}:{x:x?r.width-p.width:0,y:x?r.height-p.height:0},S={x:p.left,y:p.top};return b.x&&b.y?S:mo(S,b)}}}};function Jv(e,t){return!As(e)||!As(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function FN(e,t){return!As(e)||!As(t)||!Jv(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const zN=Ve(u.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"),Xv=C.createContext({attributes:{},listeners:void 0,ref(){}}),jN=()=>{const{attributes:e,listeners:t,ref:n}=C.useContext(Xv);return u.jsx(I.Button,X(V(V({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:u.jsx(zN,{})}))},Zv=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:l,listeners:s,setNodeRef:c,setActivatorNodeRef:d,transform:f,transition:h}=LN({id:t}),p=C.useMemo(()=>({attributes:a,listeners:s,ref:d}),[a,s,d]),g={opacity:l?.6:void 0,transform:rr.Translate.toString(f),transition:h};return u.jsx(Xv.Provider,{value:p,children:u.jsx(I.ListItem,{variant:o,ref:c,style:g,startAction:i?u.jsx(jN,{}):u.jsx(u.Fragment,{}),endAction:i?u.jsx(I.Tooltip,{title:n,children:u.jsx(I.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:u.jsx(Le.Remove,{})})}):u.jsx(u.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},VN={sideEffects:Wv({styles:{active:{opacity:"0.6"}}})},UN=({children:e})=>u.jsx(SN,{dropAnimation:VN,children:e}),HN=({entities:e=[],labels:t,setEntities:n,removeItem:r})=>{const[i,o]=C.useState(null),a=C.useMemo(()=>e.find(s=>s.id===(i==null?void 0:i.id)),[i,e]),l=l$(mv(wu),mv(xu,{coordinateGetter:NN}));return u.jsxs(sN,{sensors:l,onDragStart:({active:s})=>{o(s)},onDragEnd:({active:s,over:c})=>{if(c&&s.id!==(c==null?void 0:c.id)){const d=e.findIndex(({id:h})=>h===s.id),f=e.findIndex(({id:h})=>h===c.id);n(Eu(e,d,f))}o(null)},onDragCancel:()=>{o(null)},children:[u.jsx(_N,{items:e,children:u.jsx(I.List,{sx:{gap:"10px"},children:e.map(s=>u.jsxs(Zv,{id:s.id,variant:"outlined",removeItem:()=>r(s.id),tooltipTitle:t.removeEntity,children:[u.jsx(I.Typography,{ml:2,children:s.title||s.name}),s.type&&u.jsx(I.Chip,{color:eB(s.type),sx:{marginLeft:2},children:tB(s.type)})]},`sortable-item-${s.id}`))})}),u.jsx(UN,{children:a?u.jsx(u.Fragment,{children:e.map(s=>u.jsx(Zv,{id:s.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${s.id}`))}):u.jsx(u.Fragment,{})})]})},WN=e=>u.jsxs(I.FormControl,{size:"sm",children:[u.jsx(I.FormLabel,{children:e.labels.itemsPerPage}),u.jsx(I.Select,{value:e.value,size:"sm",onChange:e.onChange,sx:{minHeight:"37px"},children:e.options.map((t,n)=>u.jsx(I.Option,{value:t,children:t},`items-per-page-${t}-${n}`))})]}),GN=(e,t)=>{const[n,r]=C.useState(null),{sdk:i}=pt(),o=()=>P(this,null,function*(){let a=[];if(!e){r(a);return}try{switch(e){case"top_x":a=(yield i.topX.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":a=(yield i.matchQuiz.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"template":a=(yield i.loyalty.getTemplates()).data.map(g=>({id:g.id,name:g.name,status:g.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":a=(yield i.miniGames.getClassicQuizzes({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"either_or":a=(yield i.miniGames.getEitherOrs({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"poll":a=(yield i.voting.getPolls({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"bracket":a=(yield i.bracketGame.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"standing":break}}catch(l){console.error(l),r(a),t();return}r(a)});return C.useEffect(()=>(o(),()=>r(null)),[e]),n},YN=({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 u.jsx(I.Chip,{color:t,variant:"solid",size:"sm",children:e})},KN=Ve(u.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"),qN=Ve(u.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"),QN=Ve(u.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"),JN=Ve(u.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),XN=Ve(u.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"),ZN=e=>{switch(e.entityType){case"top_x":return u.jsx(I.Tooltip,{title:"Top X",children:u.jsx(KN,{})});case"match_quiz":return u.jsx(I.Tooltip,{title:"Match Quiz",children:u.jsx(qN,{})});case"template":return u.jsx(I.Tooltip,{title:"Leaderboard Templates",children:u.jsx(Le.EmojiEvents,{})});case"classic_quiz":return u.jsx(I.Tooltip,{title:"Classic Quiz",children:u.jsx(QN,{})});case"either_or":return u.jsx(I.Tooltip,{title:"Either/Or",children:u.jsx(JN,{})});case"poll":return u.jsx(I.Tooltip,{title:"Poll",children:u.jsx(XN,{})});case"bracket":return u.jsx(I.Tooltip,{title:"Custom Bracket Game",children:u.jsx(Le.EmojiEvents,{})});case"standing":return u.jsx(I.Tooltip,{title:"Custom Standings Game",children:u.jsx(Le.EmojiEvents,{})});default:return null}},eF=({entity:e,relationshipLabel:t,deleteLabel:n,onDelete:r})=>u.jsxs(u.Fragment,{children:[u.jsx(I.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:u.jsx(I.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:t})}),u.jsx(I.Card,{sx:{p:2,mb:2},children:u.jsx(I.CardContent,{children:u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[u.jsx(I.Typography,{fontSize:"sm",startDecorator:u.jsx(ZN,{entityType:e.type}),children:e.name}),u.jsx(I.Box,{display:{xs:"none",md:"block"},children:u.jsx(YN,{status:e.status})}),u.jsx(I.Box,{children:u.jsx(I.Tooltip,{title:n,children:u.jsx(I.IconButton,{onClick:()=>r(e.id,e.relationship),color:"danger",size:"sm",children:u.jsx(Le.Delete,{})})})})]})})})]}),tF=(e,t,n,r)=>P(this,null,function*(){let o=[];const a=new Map;t.forEach(l=>{if(a.has(l.entity_type)){const s=a.get(l.entity_type);a.set(l.entity_type,[...s,[l.entity_id,l.entity_relationship]])}else a.set(l.entity_type,[[l.entity_id,l.entity_relationship]])});try{for(const[l,s]of a)switch(l){case"top_x":const c=s.map(([w])=>w),d=yield e.topX.getGames({limit:c.length,gameIds:c},!0);o=[...o,...d.data.map(w=>{var k;const E=((k=s.find(([N])=>N===w.id))==null?void 0:k[1])||"relatedTo";return{id:w.id,name:w.title,status:w.status,type:l,relationship:E}})];break;case"match_quiz":const f=s.map(([w])=>w),h=yield e.matchQuiz.getGames({limit:f.length,gameIds:f},!0);o=[...o,...h.data.map(w=>{var k;const E=((k=s.find(([N])=>N===w.id))==null?void 0:k[1])||"relatedTo";return{id:w.id,name:w.title,status:w.status,type:l,relationship:E}})];break;case"template":const p=s.map(([w])=>w),g=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...g.data.filter(w=>p.includes(w.id)).map(w=>{var k;const E=((k=s.find(([N])=>N===w.id))==null?void 0:k[1])||"relatedTo";return{id:w.id,name:w.title,status:w.status,type:l,relationship:E}})];break;case"classic_quiz":const m=s.map(([w])=>w),v=yield e.miniGames.getClassicQuizzes({limit:m.length,classicQuizIds:m},!1,!0);o=[...o,...v.data.map(w=>{var k;const E=((k=s.find(([N])=>N===w.id))==null?void 0:k[1])||"relatedTo";return{id:w.id,name:w.title,status:w.status,type:l,relationship:E}})];break;case"either_or":const A=s.map(([w])=>w),x=yield e.miniGames.getEitherOrs({limit:A.length,eitherOrIds:A},!1,!0);o=[...o,...x.data.map(w=>{var k;const E=((k=s.find(([N])=>N===w.id))==null?void 0:k[1])||"relatedTo";return{id:w.id,name:w.title,status:w.status,type:l,relationship:E}})];break;case"poll":const b=s.map(([w])=>w),S=yield e.voting.getPolls({limit:b.length,pollIds:b},!0);o=[...o,...S.data.map(w=>{var k;const E=((k=s.find(([N])=>N===w.id))==null?void 0:k[1])||"relatedTo";return{id:w.id,name:w.title,status:w.status,type:l,relationship:E}})];break;case"bracket":const y=yield e.bracketGame.getGames({limit:50},!0);o=[...o,...y.data.filter(w=>f.includes(w.id)).map(w=>{var k;const E=((k=s.find(([N])=>N===w.id))==null?void 0:k[1])||"relatedTo";return{id:w.id,name:w.title,status:w.status,type:l,relationship:E}})];break;case"standing":break;default:}}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),nF=["top_x","match_quiz","template","classic_quiz","poll","either_or","bracket","standing"],rF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],iF=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic 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"),eb=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"),oF={Login:NR,InformationInput:eo,RichText:ic,HeaderButtons:hP,MarketSelection:ZR,Accordion:eT,DynamicFields:PP,BasicSelect:nT,BooleanSwitch:wL,Branding:fP,ProfileSearchSelect:xL,RangeCalendar:_P,CompetitionSearchSelect:bL,Related:rM,Images:pR,Duration:EP,DatePickerComponent:to,Flags:uR,Spinner:us,Tags:km,Toast:ut,AdContent:tT,Match:eM,Winners:cB,CompetitionsSearchSelect:yL,TeamsSearchSelect:CL,CustomSelect:yM,Schedule:fM,NoPermissionCard:kP,CustomFlatpickrCalendar:Vc,ContextSelectFilter:dB,NumberInput:$B,EntityContext:HB,MiniGamesImages:GB,AuthRequirement:YB,SortableList:HN,ItemsPerPageFilter:WN,ImageCard:so,RelatedRelationship:({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=C.useState([]),[o,a]=C.useState(""),[l,s]=C.useState(null),[c,d]=C.useState("relatedTo"),[f,h]=C.useState(!1),p=()=>h(!f),g=GN(l,p),{sdk:m}=pt();C.useEffect(()=>(e.length>0&&tF(m,e,i,p),()=>{i([]),a(""),s(null),d("relatedTo")}),[]);const v=()=>{if(e.some(y=>y.entity_id===o&&y.entity_relationship===c)){a("");return}const b=[...e,{entity_id:o,entity_type:l,entity_relationship:c}],S=(g==null?void 0:g.filter(y=>y.id===o).map(y=>({id:y.id,name:y.name,type:l,status:y.status,relationship:c})))||[];i([...r,...S]),t(b),a("")},A=(x,b)=>{const S=e.filter(w=>!(w.entity_id===x&&w.entity_relationship===b)),y=r.filter(w=>!(w.id===x&&w.relationship===b));i(y),t(S)};return u.jsxs(u.Fragment,{children:[r.map((x,b)=>u.jsx(eF,{entity:x,relationshipLabel:eb.get(x.relationship)||"Unknown relationship",deleteLabel:n.delete,onDelete:A},`related-entity-relationship-${x.id}-${b}`)),u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%",mt:r&&r.length?2:0},children:[u.jsxs(I.FormControl,{sx:{width:"100%",mb:1,mr:{xs:0,md:1}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.type}),u.jsx(I.Select,{value:l,size:"sm",name:"entity_type",onChange:(x,b)=>s(b),sx:{minHeight:"37px"},children:nF.map(x=>u.jsx(I.Option,{value:x,children:iF.get(x)},`entity-type-option-${x}`))})]}),u.jsxs(I.FormControl,{sx:{width:"100%",mb:{xs:1,md:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.relationship}),u.jsx(I.Select,{value:c,size:"sm",name:"entity_relationship",onChange:(x,b)=>d(b),sx:{minHeight:"37px"},children:rF.map(x=>u.jsx(I.Option,{value:x,children:eb.get(x)},`entity-relationship-option-${x}`))})]})]}),u.jsxs(I.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.entity}),u.jsxs(I.Box,{display:"flex",alignItems:"center",flexDirection:{xs:"column",md:"row"},children:[u.jsx(I.Select,{value:o,size:"sm",name:"entity_id",onChange:(x,b)=>a(b),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!g&&u.jsx(I.CircularProgress,{size:"sm"}),children:g&&g.map(x=>u.jsx(I.Option,{value:x.id,children:x.name},`entity--${x.id}`))}),u.jsx(I.Tooltip,{title:n.add,children:u.jsx(I.IconButton,{disabled:!o||!l,onClick:v,children:u.jsx(Le.Add,{})})})]})]}),u.jsx(ut,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})},ExportUsersLeads:e=>{const[t,n]=C.useState(!1),[r,i]=C.useState(!1),[o,a]=C.useState("success"),[l,s]=C.useState(""),c=C.useContext(Xo),d=(h,p)=>{a(h),s(p),i(!0)},f=()=>P(this,null,function*(){n(!0);const h=yield c==null?void 0:c.https.exportLeadsPerEntity(e.entityId);if(h!=null&&h.ok){const p=yield h.blob(),g=URL.createObjectURL(p),m=document.createElement("a");m.href=g,m.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(g),n(!1),d("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield h==null?void 0:h.json()),n(!1),d("danger",e.labels.usersLeadsExportErrorMessage)});return u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{mb:2,children:[u.jsx(I.Box,{display:"flex",alignItems:"center",mb:1,children:u.jsx(I.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),u.jsx(I.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.category}),u.jsx("th",{children:e.labels.action})]})}),u.jsx("tbody",{children:u.jsxs("tr",{children:[u.jsxs("td",{children:[u.jsx(I.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),u.jsx(I.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),u.jsx("td",{children:u.jsx(I.Button,{loading:t,onClick:f,children:e.labels.exportAllUsersLeads})})]})})]})})]}),u.jsx(ut,{showToast:r,color:o,message:l,hideToast:()=>i(!1)})]})},SignOutButton:ng},tb=C.createContext(null),aF=({children:e})=>u.jsx(tb.Provider,{value:oF,children:e}),sF=()=>{const e=C.useContext(tb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},nb=425,rb=1024;return{APIProvider:hI,AuthProvider:pI,AuthContext:Bf,ComponentProvider:aF,useComponentContext:sF,useAPIContext:pt,useIsMobile:()=>{const[e,t]=C.useState(window.innerWidth<=rb),[n,r]=C.useState(window.innerWidth<=nb);return C.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=rb),r(window.innerWidth<=nb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}}}});
|
|
2475
|
+
`},a$={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 s$(e){let{announcements:t=a$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=o$}=e;const{announce:o,announcement:a}=n$(),l=go("DndLiveRegion"),[s,c]=C.useState(!1);if(C.useEffect(()=>{c(!0)},[]),r$(C.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!s)return null;const d=C.createElement(C.Fragment,null,C.createElement(e$,{id:r,value:i.draggable}),C.createElement(t$,{id:l,announcement:a}));return n?Oe.createPortal(d,n):d}var mt;(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"})(mt||(mt={}));function bs(){}function mv(e,t){return C.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function l$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const cn=Object.freeze({x:0,y:0});function c$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function u$(e,t){const n=vs(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 d$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function f$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function vv(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 bv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const h$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=vv(t),o=[];for(const a of r){const{id:l}=a,s=n.get(l);if(s){const c=vv(s),d=i.reduce((h,p,m)=>h+c$(c[m],p),0),f=Number((d/4).toFixed(4));o.push({id:l,data:{droppableContainer:a,value:f}})}}return o.sort(d$)};function p$(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,l=o-n;if(r<i&&n<o){const s=t.width*t.height,c=e.width*e.height,d=a*l,f=d/(s+c-d);return Number(f.toFixed(4))}return 0}const g$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,l=n.get(a);if(l){const s=p$(l,t);s>0&&i.push({id:a,data:{droppableContainer:o,value:s}})}}return i.sort(f$)};function m$(e,t,n){return X(U({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function yv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cn}function v$(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,l)=>X(U({},a),{top:a.top+e*l.y,bottom:a.bottom+e*l.y,left:a.left+e*l.x,right:a.right+e*l.x}),U({},n))}}const b$=v$(1);function xv(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 y$(e,t,n){const r=xv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:l}=r,s=e.left-a-(1-i)*parseFloat(n),c=e.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:c,right:s+d,bottom:c+f,left:s}}const x$={ignoreTransform:!1};function hi(e,t){t===void 0&&(t=x$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Rt(e).getComputedStyle(e);c&&(n=y$(n,c,d))}const{top:r,left:i,width:o,height:a,bottom:l,right:s}=n;return{top:r,left:i,width:o,height:a,bottom:l,right:s}}function Cv(e){return hi(e,{ignoreTransform:!0})}function C$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function w$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function I$(e,t){t===void 0&&(t=Rt(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 ys(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(pu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!fo(i)||fv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&I$(i,o)&&n.push(i),w$(i,o)?n:r(i.parentNode)}return e?r(e):n}function wv(e){const[t]=ys(e,1);return t!=null?t:null}function mu(e){return!fs||!e?null:ui(e)?e:hu(e)?pu(e)||e===di(e).scrollingElement?window:fo(e)?e:null:null}function Iv(e){return ui(e)?e.scrollX:e.scrollLeft}function Sv(e){return ui(e)?e.scrollY:e.scrollTop}function vu(e){return{x:Iv(e),y:Sv(e)}}var xt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(xt||(xt={}));function Av(e){return!fs||!e?!1:e===document.scrollingElement}function Tv(e){const t={x:0,y:0},n=Av(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,l=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:l,maxScroll:r,minScroll:t}}const S$={x:.2,y:.2};function A$(e,t,n,r,i){let{top:o,left:a,right:l,bottom:s}=n;r===void 0&&(r=10),i===void 0&&(i=S$);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=Tv(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+g.height?(p.y=xt.Backward,m.y=r*Math.abs((t.top+g.height-o)/g.height)):!d&&s>=t.bottom-g.height&&(p.y=xt.Forward,m.y=r*Math.abs((t.bottom-g.height-s)/g.height)),!h&&l>=t.right-g.width?(p.x=xt.Forward,m.x=r*Math.abs((t.right-g.width-l)/g.width)):!f&&a<=t.left+g.width&&(p.x=xt.Backward,m.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function T$(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 Ev(e){return e.reduce((t,n)=>fi(t,vu(n)),cn)}function E$(e){return e.reduce((t,n)=>t+Iv(n),0)}function _$(e){return e.reduce((t,n)=>t+Sv(n),0)}function _v(e,t){if(t===void 0&&(t=hi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);wv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const k$=[["x",["left","right"],E$],["y",["top","bottom"],_$]];class bu{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=ys(n),i=Ev(r);this.rect=U({},t),this.width=t.width,this.height=t.height;for(const[o,a,l]of k$)for(const s of a)Object.defineProperty(this,s,{get:()=>{const c=l(r),d=i[o]-c;return this.rect[s]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vo{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 P$(e){const{EventTarget:t}=Rt(e);return e instanceof t?e:di(e)}function yu(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(mi(n,2)+mi(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 on;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(on||(on={}));function kv(e){e.preventDefault()}function D$(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 Pv={start:[_e.Space,_e.Enter],cancel:[_e.Esc],end:[_e.Space,_e.Enter,_e.Tab]},O$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case _e.Right:return X(U({},n),{x:n.x+25});case _e.Left:return X(U({},n),{x:n.x-25});case _e.Down:return X(U({},n),{y:n.y+25});case _e.Up:return X(U({},n),{y:n.y-25})}};class xu{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 vo(di(n)),this.windowListeners=new vo(Rt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(on.Resize,this.handleCancel),this.windowListeners.add(on.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(on.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&_v(r),n(cn)}handleKeyDown(t){if(ms(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Pv,coordinateGetter:a=O$,scrollBehavior:l="smooth"}=i,{code:s}=t;if(o.end.includes(s)){this.handleEnd(t);return}if(o.cancel.includes(s)){this.handleCancel(t);return}const{collisionRect:c}=r.current,d=c?{x:c.left,y:c.top}:cn;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const h=mo(f,d),p={x:0,y:0},{scrollableAncestors:m}=r.current;for(const g of m){const v=t.code,{isTop:S,isRight:w,isLeft:y,isBottom:x,maxScroll:b,minScroll:T}=Tv(g),E=T$(g),P={x:Math.min(v===_e.Right?E.right-E.width/2:E.right,Math.max(v===_e.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(v===_e.Down?E.bottom-E.height/2:E.bottom,Math.max(v===_e.Down?E.top:E.top+E.height/2,f.y))},O=v===_e.Right&&!w||v===_e.Left&&!y,G=v===_e.Down&&!x||v===_e.Up&&!S;if(O&&P.x!==f.x){const z=g.scrollLeft+h.x,A=v===_e.Right&&z<=b.x||v===_e.Left&&z>=T.x;if(A&&!h.y){g.scrollTo({left:z,behavior:l});return}A?p.x=g.scrollLeft-z:p.x=v===_e.Right?g.scrollLeft-b.x:g.scrollLeft-T.x,p.x&&g.scrollBy({left:-p.x,behavior:l});break}else if(G&&P.y!==f.y){const z=g.scrollTop+h.y,A=v===_e.Down&&z<=b.y||v===_e.Up&&z>=T.y;if(A&&!h.x){g.scrollTo({top:z,behavior:l});return}A?p.y=g.scrollTop-z:p.y=v===_e.Down?g.scrollTop-b.y:g.scrollTop-T.y,p.y&&g.scrollBy({top:-p.y,behavior:l});break}}this.handleMove(t,fi(mo(f,this.referenceCoordinates),p))}}}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()}}xu.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Pv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const l=o.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Dv(e){return!!(e&&"distance"in e)}function Ov(e){return!!(e&&"delay"in e)}class Cu{constructor(t,n,r){var i;r===void 0&&(r=P$(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=di(a),this.documentListeners=new vo(this.document),this.listeners=new vo(r),this.windowListeners=new vo(Rt(a)),this.initialCoordinates=(i=vs(o))!=null?i:cn,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(on.Resize,this.handleCancel),this.windowListeners.add(on.DragStart,kv),this.windowListeners.add(on.VisibilityChange,this.handleCancel),this.windowListeners.add(on.ContextMenu,kv),this.documentListeners.add(on.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ov(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Dv(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(on.Click,D$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(on.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:l}}=o;if(!i)return;const s=(n=vs(t))!=null?n:cn,c=mo(i,s);if(!r&&l){if(Dv(l)){if(l.tolerance!=null&&yu(c,l.tolerance))return this.handleCancel();if(yu(c,l.distance))return this.handleStart()}if(Ov(l)&&yu(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}t.cancelable&&t.preventDefault(),a(s)}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 R$={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wu extends Cu{constructor(t){const{event:n}=t,r=di(n.target);super(t,R$,r)}}wu.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 M$={move:{name:"mousemove"},end:{name:"mouseup"}};var Iu;(function(e){e[e.RightClick=2]="RightClick"})(Iu||(Iu={}));class L$ extends Cu{constructor(t){super(t,M$,di(t.event.target))}}L$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Iu.RightClick?!1:(r==null||r({event:n}),!0)}}];const Su={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class B$ extends Cu{constructor(t){super(t,Su)}static setup(){return window.addEventListener(Su.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Su.move.name,t)};function t(){}}}B$.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 bo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(bo||(bo={}));var xs;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(xs||(xs={}));function $$(e){let{acceleration:t,activator:n=bo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:l=xs.TreeOrder,pointerCoordinates:s,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=F$({delta:f,disabled:!o}),[m,g]=qB(),v=C.useRef({x:0,y:0}),S=C.useRef({x:0,y:0}),w=C.useMemo(()=>{switch(n){case bo.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case bo.DraggableRect:return i}},[n,i,s]),y=C.useRef(null),x=C.useCallback(()=>{const T=y.current;if(!T)return;const E=v.current.x*S.current.x,P=v.current.y*S.current.y;T.scrollBy(E,P)},[]),b=C.useMemo(()=>l===xs.TreeOrder?[...c].reverse():c,[l,c]);C.useEffect(()=>{if(!o||!c.length||!w){g();return}for(const T of b){if((r==null?void 0:r(T))===!1)continue;const E=c.indexOf(T),P=d[E];if(!P)continue;const{direction:O,speed:G}=A$(T,P,w,t,h);for(const z of["x","y"])p[z][O[z]]||(G[z]=0,O[z]=0);if(G.x>0||G.y>0){g(),y.current=T,m(x,a),v.current=G,S.current=O;return}}v.current={x:0,y:0},S.current={x:0,y:0},g()},[t,x,r,g,o,a,JSON.stringify(w),JSON.stringify(p),m,c,b,d,JSON.stringify(h)])}const N$={x:{[xt.Backward]:!1,[xt.Forward]:!1},y:{[xt.Backward]:!1,[xt.Forward]:!1}};function F$(e){let{delta:t,disabled:n}=e;const r=gs(t);return po(i=>{if(n||!r||!i)return N$;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[xt.Backward]:i.x[xt.Backward]||o.x===-1,[xt.Forward]:i.x[xt.Forward]||o.x===1},y:{[xt.Backward]:i.y[xt.Backward]||o.y===-1,[xt.Forward]:i.y[xt.Forward]||o.y===1}}},[n,t,r])}function z$(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return po(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function j$(e,t){return C.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 yo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(yo||(yo={}));var Au;(function(e){e.Optimized="optimized"})(Au||(Au={}));const Rv=new Map;function V$(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=C.useState(null),{frequency:l,measure:s,strategy:c}=i,d=C.useRef(e),f=v(),h=ho(f),p=C.useCallback(function(S){S===void 0&&(S=[]),!h.current&&a(w=>w===null?S:w.concat(S.filter(y=>!w.includes(y))))},[h]),m=C.useRef(null),g=po(S=>{if(f&&!n)return Rv;if(!S||S===Rv||d.current!==e||o!=null){const w=new Map;for(let y of e){if(!y)continue;if(o&&o.length>0&&!o.includes(y.id)&&y.rect.current){w.set(y.id,y.rect.current);continue}const x=y.node.current,b=x?new bu(s(x),x):null;y.rect.current=b,b&&w.set(y.id,b)}return w}return S},[e,o,n,f,s]);return C.useEffect(()=>{d.current=e},[e]),C.useEffect(()=>{f||p()},[n,f]),C.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),C.useEffect(()=>{f||typeof l!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},l))},[l,f,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(c){case yo.Always:return!1;case yo.BeforeDragging:return n;default:return!n}}}function Tu(e,t){return po(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function U$(e,t){return Tu(e,t)}function H$(e){let{callback:t,disabled:n}=e;const r=hs(t),i=C.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Cs(e){let{callback:t,disabled:n}=e;const r=hs(t),i=C.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function W$(e){return new bu(hi(e),e)}function Mv(e,t,n){t===void 0&&(t=W$);const[r,i]=C.useState(null);function o(){i(s=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=s!=null?s:n)!=null?c:null}const d=t(e);return JSON.stringify(s)===JSON.stringify(d)?s:d})}const a=H$({callback(s){if(e)for(const c of s){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),l=Cs({callback:o});return ln(()=>{o(),e?(l==null||l.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),a==null||a.disconnect())},[e]),r}function G$(e){const t=Tu(e);return yv(e,t)}const Lv=[];function Y$(e){const t=C.useRef(e),n=po(r=>e?r&&r!==Lv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ys(e):Lv,[e]);return C.useEffect(()=>{t.current=e},[e]),n}function K$(e){const[t,n]=C.useState(null),r=C.useRef(e),i=C.useCallback(o=>{const a=mu(o.target);a&&n(l=>l?(l.set(a,vu(a)),new Map(l)):null)},[]);return C.useEffect(()=>{const o=r.current;if(e!==o){a(o);const l=e.map(s=>{const c=mu(s);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,vu(c)]):null}).filter(s=>s!=null);n(l.length?new Map(l):null),r.current=e}return()=>{a(e),a(o)};function a(l){l.forEach(s=>{const c=mu(s);c==null||c.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>fi(o,a),cn):Ev(e):cn,[e,t])}function Bv(e,t){t===void 0&&(t=[]);const n=C.useRef(null);return C.useEffect(()=>{n.current=null},t),C.useEffect(()=>{const r=e!==cn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?mo(e,n.current):cn}function q$(e){C.useEffect(()=>{if(!fs)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 Q$(e,t){return C.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function $v(e){return C.useMemo(()=>e?C$(e):null,[e])}const Nv=[];function J$(e,t){t===void 0&&(t=hi);const[n]=e,r=$v(n?Rt(n):null),[i,o]=C.useState(Nv);function a(){o(()=>e.length?e.map(s=>Av(s)?r:new bu(t(s),s)):Nv)}const l=Cs({callback:a});return ln(()=>{l==null||l.disconnect(),a(),e.forEach(s=>l==null?void 0:l.observe(s))},[e]),i}function Fv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fo(t)?t:e}function X$(e){let{measure:t}=e;const[n,r]=C.useState(null),i=C.useCallback(c=>{for(const{target:d}of c)if(fo(d)){r(f=>{const h=t(d);return f?X(U({},f),{width:h.width,height:h.height}):h});break}},[t]),o=Cs({callback:i}),a=C.useCallback(c=>{const d=Fv(c);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[l,s]=ps(a);return C.useMemo(()=>({nodeRef:l,rect:n,setRef:s}),[n,l,s])}const Z$=[{sensor:wu,options:{}},{sensor:xu,options:{}}],eN={current:{}},ws={draggable:{measure:Cv},droppable:{measure:Cv,strategy:yo.WhileDragging,frequency:Au.Optimized},dragOverlay:{measure:hi}};class xo 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 tN={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new xo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ws,measureDroppableContainers:bs,windowRect:null,measuringScheduled:!1},zv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bs,draggableNodes:new Map,over:null,measureDroppableContainers:bs},Co=C.createContext(zv),jv=C.createContext(tN);function nN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new xo}}}function rN(e,t){switch(t.type){case mt.DragStart:return X(U({},e),{draggable:X(U({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:X(U({},e),{draggable:X(U({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case mt.DragEnd:case mt.DragCancel:return X(U({},e),{draggable:X(U({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case mt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new xo(e.droppable.containers);return i.set(r,n),X(U({},e),{droppable:X(U({},e.droppable),{containers:i})})}case mt.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 xo(e.droppable.containers);return a.set(n,X(U({},o),{disabled:i})),X(U({},e),{droppable:X(U({},e.droppable),{containers:a})})}case mt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new xo(e.droppable.containers);return o.delete(n),X(U({},e),{droppable:X(U({},e.droppable),{containers:o})})}default:return e}}function iN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=C.useContext(Co),o=gs(r),a=gs(n==null?void 0:n.id);return C.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!ms(o)||document.activeElement===o.target)return;const l=i.get(a);if(!l)return;const{activatorNode:s,node:c}=l;if(!s.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[s.current,c.current]){if(!d)continue;const f=XB(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function Vv(e,t){let i=t,{transform:n}=i,r=We(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(U({transform:o},r)),n):n}function oN(e){return C.useMemo(()=>({draggable:U(U({},ws.draggable),e==null?void 0:e.draggable),droppable:U(U({},ws.droppable),e==null?void 0:e.droppable),dragOverlay:U(U({},ws.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 aN(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=C.useRef(!1),{x:a,y:l}=typeof i=="boolean"?{x:i,y:i}:i;ln(()=>{if(!a&&!l||!t){o.current=!1;return}if(o.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=n(c),f=yv(d,r);if(a||(f.x=0),l||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=wv(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,l,r,n])}const Is=C.createContext(X(U({},cn),{scaleX:1,scaleY:1}));var ir;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ir||(ir={}));const sN=C.memo(function(t){var n,r,i,o;let _s=t,{id:a,accessibility:l,autoScroll:s=!0,children:c,sensors:d=Z$,collisionDetection:f=g$,measuring:h,modifiers:p}=_s,m=We(_s,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const g=C.useReducer(rN,void 0,nN),[v,S]=g,[w,y]=i$(),[x,b]=C.useState(ir.Uninitialized),T=x===ir.Initialized,{draggable:{active:E,nodes:P,translate:O},droppable:{containers:G}}=v,z=E!=null?P.get(E):null,A=C.useRef({initial:null,translated:null}),W=C.useMemo(()=>{var Ct;return E!=null?{id:E,data:(Ct=z==null?void 0:z.data)!=null?Ct:eN,rect:A}:null},[E,z]),Y=C.useRef(null),[N,$]=C.useState(null),[B,H]=C.useState(null),q=ho(m,Object.values(m)),ee=go("DndDescribedBy",a),R=C.useMemo(()=>G.getEnabled(),[G]),L=oN(h),{droppableRects:F,measureDroppableContainers:V,measuringScheduled:te}=V$(R,{dragging:T,dependencies:[O.x,O.y],config:L.droppable}),se=z$(P,E),ae=C.useMemo(()=>B?vs(B):null,[B]),J=un(),le=U$(se,L.draggable.measure);aN({activeNode:E!=null?P.get(E):null,config:J.layoutShiftCompensation,initialRect:le,measure:L.draggable.measure});const ne=Mv(se,L.draggable.measure,le),ge=Mv(se?se.parentElement:null),Se=C.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:F,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ue=G.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=X$({measure:L.dragOverlay.measure}),at=(r=wt.nodeRef.current)!=null?r:se,kt=T?(i=wt.rect)!=null?i:ne:null,de=!!(wt.nodeRef.current&&wt.rect),he=G$(de?null:ne),xe=$v(at?Rt(at):null),Te=Y$(T?Ue!=null?Ue:se:null),He=J$(Te),Pe=Vv(p,{transform:{x:O.x-he.x,y:O.y-he.y,scaleX:1,scaleY:1},activatorEvent:B,active:W,activeNodeRect:ne,containerNodeRect:ge,draggingNodeRect:kt,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:He,windowRect:xe}),Ee=ae?fi(ae,O):null,It=K$(Te),St=Bv(It),jt=Bv(It,[ne]),Mt=fi(Pe,St),qt=kt?b$(kt,Pe):null,or=W&&qt?f({active:W,collisionRect:qt,droppableRects:F,droppableContainers:R,pointerCoordinates:Ee}):null,Ts=bv(or,"id"),[wn,wo]=C.useState(null),_u=de?Pe:fi(Pe,jt),ku=m$(_u,(o=wn==null?void 0:wn.rect)!=null?o:null,ne),ze=C.useRef(null),pi=C.useCallback((Ct,_)=>{let{sensor:M,options:K}=_;if(Y.current==null)return;const Q=P.get(Y.current);if(!Q)return;const re=Ct.nativeEvent,ce=new M({active:Y.current,activeNode:Q,event:re,options:K,context:Se,onAbort(ue){if(!P.get(ue))return;const{onDragAbort:fe}=q.current,me={id:ue};fe==null||fe(me),w({type:"onDragAbort",event:me})},onPending(ue,we,fe,me){if(!P.get(ue))return;const{onDragPending:Pt}=q.current,nt={id:ue,constraint:we,initialCoordinates:fe,offset:me};Pt==null||Pt(nt),w({type:"onDragPending",event:nt})},onStart(ue){const we=Y.current;if(we==null)return;const fe=P.get(we);if(!fe)return;const{onDragStart:me}=q.current,De={activatorEvent:re,active:{id:we,data:fe.data,rect:A}};Oe.unstable_batchedUpdates(()=>{me==null||me(De),b(ir.Initializing),S({type:mt.DragStart,initialCoordinates:ue,active:we}),w({type:"onDragStart",event:De}),$(ze.current),H(re)})},onMove(ue){S({type:mt.DragMove,coordinates:ue})},onEnd:Ce(mt.DragEnd),onCancel:Ce(mt.DragCancel)});ze.current=ce;function Ce(ue){return function(){return k(this,null,function*(){const{active:fe,collisions:me,over:De,scrollAdjustedTranslate:Pt}=Se.current;let nt=null;if(fe&&Pt){const{cancelDrop:dn}=q.current;nt={activatorEvent:re,active:fe,collisions:me,delta:Pt,over:De},ue===mt.DragEnd&&typeof dn=="function"&&(yield Promise.resolve(dn(nt)))&&(ue=mt.DragCancel)}Y.current=null,Oe.unstable_batchedUpdates(()=>{S({type:ue}),b(ir.Uninitialized),wo(null),$(null),H(null),ze.current=null;const dn=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(nt){const In=q.current[dn];In==null||In(nt),w({type:dn,event:nt})}})})}}},[P]),Io=C.useCallback((Ct,_)=>(M,K)=>{const Q=M.nativeEvent,re=P.get(K);if(Y.current!==null||!re||Q.dndKit||Q.defaultPrevented)return;const ce={active:re};Ct(M,_.options,ce)===!0&&(Q.dndKit={capturedBy:_.sensor},Y.current=K,pi(M,_))},[P,pi]),Es=j$(d,Io);q$(d),ln(()=>{ne&&x===ir.Initializing&&b(ir.Initialized)},[ne,x]),C.useEffect(()=>{const{onDragMove:Ct}=q.current,{active:_,activatorEvent:M,collisions:K,over:Q}=Se.current;if(!_||!M)return;const re={active:_,activatorEvent:M,collisions:K,delta:{x:Mt.x,y:Mt.y},over:Q};Oe.unstable_batchedUpdates(()=>{Ct==null||Ct(re),w({type:"onDragMove",event:re})})},[Mt.x,Mt.y]),C.useEffect(()=>{const{active:Ct,activatorEvent:_,collisions:M,droppableContainers:K,scrollAdjustedTranslate:Q}=Se.current;if(!Ct||Y.current==null||!_||!Q)return;const{onDragOver:re}=q.current,ce=K.get(Ts),Ce=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:Ct,activatorEvent:_,collisions:M,delta:{x:Q.x,y:Q.y},over:Ce};Oe.unstable_batchedUpdates(()=>{wo(Ce),re==null||re(ue),w({type:"onDragOver",event:ue})})},[Ts]),ln(()=>{Se.current={activatorEvent:B,active:W,activeNode:se,collisionRect:qt,collisions:or,droppableRects:F,draggableNodes:P,draggingNode:at,draggingNodeRect:kt,droppableContainers:G,over:wn,scrollableAncestors:Te,scrollAdjustedTranslate:Mt},A.current={initial:kt,translated:qt}},[W,se,or,qt,P,at,kt,F,G,wn,Te,Mt]),$$(X(U({},J),{delta:O,draggingRect:qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:He}));const gi=C.useMemo(()=>({active:W,activeNode:se,activeNodeRect:ne,activatorEvent:B,collisions:or,containerNodeRect:ge,dragOverlay:wt,draggableNodes:P,droppableContainers:G,droppableRects:F,over:wn,measureDroppableContainers:V,scrollableAncestors:Te,scrollableAncestorRects:He,measuringConfiguration:L,measuringScheduled:te,windowRect:xe}),[W,se,ne,B,or,ge,wt,P,G,F,wn,V,Te,He,L,te,xe]),So=C.useMemo(()=>({activatorEvent:B,activators:Es,active:W,activeNodeRect:ne,ariaDescribedById:{draggable:ee},dispatch:S,draggableNodes:P,over:wn,measureDroppableContainers:V}),[B,Es,W,ne,S,ee,P,wn,V]);return C.createElement(gv.Provider,{value:y},C.createElement(Co.Provider,{value:So},C.createElement(jv.Provider,{value:gi},C.createElement(Is.Provider,{value:ku},c)),C.createElement(iN,{disabled:(l==null?void 0:l.restoreFocus)===!1})),C.createElement(s$,X(U({},l),{hiddenTextDescribedById:ee})));function un(){const Ct=(N==null?void 0:N.autoScrollEnabled)===!1,_=typeof s=="object"?s.enabled===!1:s===!1,M=T&&!Ct&&!_;return typeof s=="object"?X(U({},s),{enabled:M}):{enabled:M}}}),lN=C.createContext(null),Uv="button",cN="Draggable";function uN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=go(cN),{activators:a,activatorEvent:l,active:s,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=C.useContext(Co),{role:p=Uv,roleDescription:m="draggable",tabIndex:g=0}=i!=null?i:{},v=(s==null?void 0:s.id)===t,S=C.useContext(v?Is:lN),[w,y]=ps(),[x,b]=ps(),T=Q$(a,t),E=ho(n);ln(()=>(f.set(t,{id:t,key:o,node:w,activatorNode:x,data:E}),()=>{const O=f.get(t);O&&O.key===o&&f.delete(t)}),[f,t]);const P=C.useMemo(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":v&&p===Uv?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[r,p,g,v,m,d.draggable]);return{active:s,activatorEvent:l,activeNodeRect:c,attributes:P,isDragging:v,listeners:r?void 0:T,node:w,over:h,setNodeRef:y,setActivatorNodeRef:b,transform:S}}function Hv(){return C.useContext(jv)}const dN="Droppable",fN={timeout:25};function hN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=go(dN),{active:a,dispatch:l,over:s,measureDroppableContainers:c}=C.useContext(Co),d=C.useRef({disabled:n}),f=C.useRef(!1),h=C.useRef(null),p=C.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:v}=U(U({},fN),i),S=ho(g!=null?g:r),w=C.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),p.current=null},v)},[v]),y=Cs({callback:w,disabled:m||!a}),x=C.useCallback((P,O)=>{y&&(O&&(y.unobserve(O),f.current=!1),P&&y.observe(P))},[y]),[b,T]=ps(x),E=ho(t);return C.useEffect(()=>{!y||!b.current||(y.disconnect(),f.current=!1,y.observe(b.current))},[b,y]),C.useEffect(()=>(l({type:mt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:b,rect:h,data:E}}),()=>l({type:mt.UnregisterDroppable,key:o,id:r})),[r]),C.useEffect(()=>{n!==d.current.disabled&&(l({type:mt.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,l]),{active:a,rect:h,isOver:(s==null?void 0:s.id)===r,node:b,over:s,setNodeRef:T}}function pN(e){let{animation:t,children:n}=e;const[r,i]=C.useState(null),[o,a]=C.useState(null),l=gs(n);return!n&&!r&&l&&i(l),ln(()=>{if(!o)return;const s=r==null?void 0:r.key,c=r==null?void 0:r.props.id;if(s==null||c==null){i(null);return}Promise.resolve(t(c,o)).then(()=>{i(null)})},[t,r,o]),C.createElement(C.Fragment,null,n,r?C.cloneElement(r,{ref:a}):null)}const gN={x:0,y:0,scaleX:1,scaleY:1};function mN(e){let{children:t}=e;return C.createElement(Co.Provider,{value:zv},C.createElement(Is.Provider,{value:gN},t))}const vN={position:"fixed",touchAction:"none"},bN=e=>ms(e)?"transform 250ms ease":void 0,yN=C.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:l,style:s,transform:c,transition:d=bN}=e;if(!l)return null;const f=i?c:X(U({},c),{scaleX:1,scaleY:1}),h=U(X(U({},vN),{width:l.width,height:l.height,top:l.top,left:l.left,transform:rr.Transform.toString(f),transformOrigin:i&&r?u$(r,l):void 0,transition:typeof d=="function"?d(r):d}),s);return C.createElement(n,{className:a,style:h,ref:t},o)}),Wv=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[l,s]of Object.entries(o.active))s!==void 0&&(i[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,s));if(o!=null&&o.dragOverlay)for(const[l,s]of Object.entries(o.dragOverlay))s!==void 0&&r.node.style.setProperty(l,s);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[s,c]of Object.entries(i))n.node.style.setProperty(s,c);a!=null&&a.active&&n.node.classList.remove(a.active)}},xN={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:rr.Transform.toString(t)},{transform:rr.Transform.toString(n)}]},sideEffects:Wv({styles:{active:{opacity:"0"}}})};function CN(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return hs((o,a)=>{if(t===null)return;const l=n.get(o);if(!l)return;const s=l.node.current;if(!s)return;const c=Fv(a);if(!c)return;const{transform:d}=Rt(a).getComputedStyle(a),f=xv(d);if(!f)return;const h=typeof t=="function"?t:wN(t);return _v(s,i.draggable.measure),h({active:{id:o,data:l.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function wN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=U(U({},xN),e);return o=>{let w=o,{active:a,dragOverlay:l,transform:s}=w,c=We(w,["active","dragOverlay","transform"]);if(!t)return;const d={x:l.rect.left-a.rect.left,y:l.rect.top-a.rect.top},f={scaleX:s.scaleX!==1?a.rect.width*s.scaleX/l.rect.width:1,scaleY:s.scaleY!==1?a.rect.height*s.scaleY/l.rect.height:1},h=U({x:s.x-d.x,y:s.y-d.y},f),p=i(X(U({},c),{active:a,dragOverlay:l,transform:{initial:s,final:h}})),[m]=p,g=p[p.length-1];if(JSON.stringify(m)===JSON.stringify(g))return;const v=r==null?void 0:r(U({active:a,dragOverlay:l},c)),S=l.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(y=>{S.onfinish=()=>{v==null||v(),y()}})}}let Gv=0;function IN(e){return C.useMemo(()=>{if(e!=null)return Gv++,Gv},[e])}const SN=C.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:l="div",className:s,zIndex:c=999}=e;const{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:m,droppableContainers:g,dragOverlay:v,over:S,measuringConfiguration:w,scrollableAncestors:y,scrollableAncestorRects:x,windowRect:b}=Hv(),T=C.useContext(Is),E=IN(f==null?void 0:f.id),P=Vv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:S,overlayNodeRect:v.rect,scrollableAncestors:y,scrollableAncestorRects:x,transform:T,windowRect:b}),O=Tu(h),G=CN({config:r,draggableNodes:m,droppableContainers:g,measuringConfiguration:w}),z=O?v.setRef:void 0;return C.createElement(mN,null,C.createElement(pN,{animation:G},f&&E?C.createElement(yN,{key:E,id:f.id,ref:z,as:l,activatorEvent:d,adjustScale:t,className:s,transition:o,rect:O,style:U({zIndex:c},i),transform:P},n):null))});function Eu(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function AN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Ss(e){return e!==null&&e>=0}function TN(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 EN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Yv=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Eu(t,r,n),a=t[i],l=o[i];return!l||!a?null:{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}},Kv="Sortable",qv=C.createContext({activeIndex:-1,containerId:Kv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Yv,disabled:{draggable:!1,droppable:!1}});function _N(e){let{children:t,id:n,items:r,strategy:i=Yv,disabled:o=!1}=e;const{active:a,dragOverlay:l,droppableRects:s,over:c,measureDroppableContainers:d}=Hv(),f=go(Kv,n),h=l.rect!==null,p=C.useMemo(()=>r.map(T=>typeof T=="object"&&"id"in T?T.id:T),[r]),m=a!=null,g=a?p.indexOf(a.id):-1,v=c?p.indexOf(c.id):-1,S=C.useRef(p),w=!TN(p,S.current),y=v!==-1&&g===-1||w,x=EN(o);ln(()=>{w&&m&&d(p)},[w,p,m,d]),C.useEffect(()=>{S.current=p},[p]);const b=C.useMemo(()=>({activeIndex:g,containerId:f,disabled:x,disableTransforms:y,items:p,overIndex:v,useDragOverlay:h,sortedRects:AN(p,s),strategy:i}),[g,f,x.draggable,x.droppable,y,p,v,s,h,i]);return C.createElement(qv.Provider,{value:b},t)}const kN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Eu(n,r,i).indexOf(t)},PN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!c||!r||l!==o&&i===a?!1:n?!0:a!==i&&t===s},DN={duration:200,easing:"ease"},Qv="transform",ON=rr.Transition.toString({property:Qv,duration:0,easing:"linear"}),RN={roleDescription:"sortable"};function MN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=C.useState(null),l=C.useRef(n);return ln(()=>{if(!t&&n!==l.current&&r.current){const s=i.current;if(s){const c=hi(r.current,{ignoreTransform:!0}),d={x:s.left-c.left,y:s.top-c.top,scaleX:s.width/c.width,scaleY:s.height/c.height};(d.x||d.y)&&a(d)}}n!==l.current&&(l.current=n)},[t,n,r,i]),C.useEffect(()=>{o&&a(null)},[o]),o}function LN(e){let{animateLayoutChanges:t=PN,attributes:n,disabled:r,data:i,getNewIndex:o=kN,id:a,strategy:l,resizeObserverConfig:s,transition:c=DN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:m,sortedRects:g,overIndex:v,useDragOverlay:S,strategy:w}=C.useContext(qv),y=BN(r,p),x=d.indexOf(a),b=C.useMemo(()=>U({sortable:{containerId:f,index:x,items:d}},i),[f,i,x,d]),T=C.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:P,isOver:O,setNodeRef:G}=hN({id:a,data:b,disabled:y.droppable,resizeObserverConfig:U({updateMeasurementsFor:T},s)}),{active:z,activatorEvent:A,activeNodeRect:W,attributes:Y,setNodeRef:N,listeners:$,isDragging:B,over:H,setActivatorNodeRef:q,transform:ee}=uN({id:a,data:b,attributes:U(U({},RN),n),disabled:y.draggable}),R=KB(G,N),L=!!z,F=L&&!m&&Ss(h)&&Ss(v),V=!S&&B,te=V&&F?ee:null,se=l!=null?l:w,ae=F?te!=null?te:se({rects:g,activeNodeRect:W,activeIndex:h,overIndex:v,index:x}):null,J=Ss(h)&&Ss(v)?o({id:a,items:d,activeIndex:h,overIndex:v}):x,le=z==null?void 0:z.id,ne=C.useRef({activeId:le,items:d,newIndex:J,containerId:f}),ge=d!==ne.current.items,Se=t({active:z,containerId:f,isDragging:B,isSorting:L,id:a,index:x,items:d,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:c,wasDragging:ne.current.activeId!=null}),Ue=MN({disabled:!Se,index:x,node:P,rect:E});return C.useEffect(()=>{L&&ne.current.newIndex!==J&&(ne.current.newIndex=J),f!==ne.current.containerId&&(ne.current.containerId=f),d!==ne.current.items&&(ne.current.items=d)},[L,J,f,d]),C.useEffect(()=>{if(le===ne.current.activeId)return;if(le!=null&&ne.current.activeId==null){ne.current.activeId=le;return}const at=setTimeout(()=>{ne.current.activeId=le},50);return()=>clearTimeout(at)},[le]),{active:z,activeIndex:h,attributes:Y,data:b,rect:E,index:x,newIndex:J,items:d,isOver:O,isSorting:L,isDragging:B,listeners:$,node:P,overIndex:v,over:H,setNodeRef:R,setActivatorNodeRef:q,setDroppableNodeRef:G,setDraggableNodeRef:N,transform:Ue!=null?Ue:ae,transition:wt()};function wt(){if(Ue||ge&&ne.current.newIndex===x)return ON;if(!(V&&!ms(A)||!c)&&(L||Se))return rr.Transition.toString(X(U({},c),{property:Qv}))}}function BN(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 As(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 $N=[_e.Down,_e.Right,_e.Up,_e.Left],NN=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:l}}=t;if($N.includes(e.code)){if(e.preventDefault(),!n||!r)return;const s=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case _e.Down:r.top<h.top&&s.push(f);break;case _e.Up:r.top>h.top&&s.push(f);break;case _e.Left:r.left>h.left&&s.push(f);break;case _e.Right:r.left<h.left&&s.push(f);break}});const c=h$({active:n,collisionRect:r,droppableRects:i,droppableContainers:s,pointerCoordinates:null});let d=bv(c,"id");if(d===(a==null?void 0:a.id)&&c.length>1&&(d=c[1].id),d!=null){const f=o.get(n.id),h=o.get(d),p=h?i.get(h.id):null,m=h==null?void 0:h.node.current;if(m&&p&&f&&h){const v=ys(m).some((T,E)=>l[E]!==T),S=Jv(f,h),w=FN(f,h),y=v||!S?{x:0,y:0}:{x:w?r.width-p.width:0,y:w?r.height-p.height:0},x={x:p.left,y:p.top};return y.x&&y.y?x:mo(x,y)}}}};function Jv(e,t){return!As(e)||!As(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function FN(e,t){return!As(e)||!As(t)||!Jv(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const zN=Ve(u.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"),Xv=C.createContext({attributes:{},listeners:void 0,ref(){}}),jN=()=>{const{attributes:e,listeners:t,ref:n}=C.useContext(Xv);return u.jsx(I.Button,X(U(U({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:u.jsx(zN,{})}))},Zv=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:l,listeners:s,setNodeRef:c,setActivatorNodeRef:d,transform:f,transition:h}=LN({id:t}),p=C.useMemo(()=>({attributes:a,listeners:s,ref:d}),[a,s,d]),m={opacity:l?.6:void 0,transform:rr.Translate.toString(f),transition:h};return u.jsx(Xv.Provider,{value:p,children:u.jsx(I.ListItem,{variant:o,ref:c,style:m,startAction:i?u.jsx(jN,{}):u.jsx(u.Fragment,{}),endAction:i?u.jsx(I.Tooltip,{title:n,children:u.jsx(I.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:u.jsx(Le.Remove,{})})}):u.jsx(u.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},VN={sideEffects:Wv({styles:{active:{opacity:"0.6"}}})},UN=({children:e})=>u.jsx(SN,{dropAnimation:VN,children:e}),HN=({entities:e=[],labels:t,setEntities:n,removeItem:r})=>{const[i,o]=C.useState(null),a=C.useMemo(()=>e.find(s=>s.id===(i==null?void 0:i.id)),[i,e]),l=l$(mv(wu),mv(xu,{coordinateGetter:NN}));return u.jsxs(sN,{sensors:l,onDragStart:({active:s})=>{o(s)},onDragEnd:({active:s,over:c})=>{if(c&&s.id!==(c==null?void 0:c.id)){const d=e.findIndex(({id:h})=>h===s.id),f=e.findIndex(({id:h})=>h===c.id);n(Eu(e,d,f))}o(null)},onDragCancel:()=>{o(null)},children:[u.jsx(_N,{items:e,children:u.jsx(I.List,{sx:{gap:"10px"},children:e.map(s=>u.jsxs(Zv,{id:s.id,variant:"outlined",removeItem:()=>r(s.id),tooltipTitle:t.removeEntity,children:[u.jsx(I.Typography,{ml:2,children:s.title||s.name}),s.type&&u.jsx(I.Chip,{color:eB(s.type),sx:{marginLeft:2},children:tB(s.type)})]},`sortable-item-${s.id}`))})}),u.jsx(UN,{children:a?u.jsx(u.Fragment,{children:e.map(s=>u.jsx(Zv,{id:s.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${s.id}`))}):u.jsx(u.Fragment,{})})]})},WN=e=>u.jsxs(I.FormControl,{size:"sm",children:[u.jsx(I.FormLabel,{children:e.labels.itemsPerPage}),u.jsx(I.Select,{value:e.value,size:"sm",onChange:e.onChange,sx:{minHeight:"37px"},children:e.options.map((t,n)=>u.jsx(I.Option,{value:t,children:t},`items-per-page-${t}-${n}`))})]}),GN=(e,t)=>{const[n,r]=C.useState(null),{sdk:i}=pt(),o=()=>k(this,null,function*(){let a=[];if(!e){r(a);return}try{switch(e){case"top_x":a=(yield i.topX.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":a=(yield i.matchQuiz.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"template":a=(yield i.loyalty.getTemplates()).data.map(g=>({id:g.id,name:g.name,status:g.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":a=(yield i.miniGames.getClassicQuizzes({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"either_or":a=(yield i.miniGames.getEitherOrs({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"poll":a=(yield i.voting.getPolls({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"bracket":a=(yield i.bracketGame.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break;case"standing":a=(yield i.standingGame.getGames({limit:50})).data.map(g=>({id:g.id,name:g.title,status:g.status,type:e,relationship:"relatedTo"}));break}}catch(l){console.error(l),r(a),t();return}r(a)});return C.useEffect(()=>(o(),()=>r(null)),[e]),n},YN=({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 u.jsx(I.Chip,{color:t,variant:"solid",size:"sm",children:e})},KN=Ve(u.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"),qN=Ve(u.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"),QN=Ve(u.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"),JN=Ve(u.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),XN=Ve(u.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"),ZN=e=>{switch(e.entityType){case"top_x":return u.jsx(I.Tooltip,{title:"Top X",children:u.jsx(KN,{})});case"match_quiz":return u.jsx(I.Tooltip,{title:"Match Quiz",children:u.jsx(qN,{})});case"template":return u.jsx(I.Tooltip,{title:"Leaderboard Templates",children:u.jsx(Le.EmojiEvents,{})});case"classic_quiz":return u.jsx(I.Tooltip,{title:"Classic Quiz",children:u.jsx(QN,{})});case"either_or":return u.jsx(I.Tooltip,{title:"Either/Or",children:u.jsx(JN,{})});case"poll":return u.jsx(I.Tooltip,{title:"Poll",children:u.jsx(XN,{})});case"bracket":return u.jsx(I.Tooltip,{title:"Custom Bracket Game",children:u.jsx(Le.EmojiEvents,{})});case"standing":return u.jsx(I.Tooltip,{title:"Custom Standings Game",children:u.jsx(Le.EmojiEvents,{})});default:return null}},eF=({entity:e,deleteLabel:t,onDelete:n})=>u.jsx(u.Fragment,{children:u.jsx(I.Card,{sx:{p:2,mb:2},children:u.jsx(I.CardContent,{children:u.jsxs(I.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[u.jsx(I.Typography,{fontSize:"sm",startDecorator:u.jsx(ZN,{entityType:e.type}),children:e.name}),u.jsx(I.Box,{display:{xs:"none",md:"block"},children:u.jsx(YN,{status:e.status})}),u.jsx(I.Box,{children:u.jsx(I.Tooltip,{title:t,children:u.jsx(I.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:u.jsx(Le.Delete,{})})})})]})})})}),tF=(e,t,n,r)=>k(this,null,function*(){let o=[];const a=new Map;t.forEach(l=>{if(a.has(l.entity_type)){const s=a.get(l.entity_type);a.set(l.entity_type,[...s,[l.entity_id,l.entity_relationship]])}else a.set(l.entity_type,[[l.entity_id,l.entity_relationship]])});try{for(const[l,s]of a)switch(l){case"top_x":const c=s.map(([O])=>O),d=yield e.topX.getGames({limit:c.length,gameIds:c},!0);o=[...o,...d.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"match_quiz":const f=s.map(([O])=>O),h=yield e.matchQuiz.getGames({limit:f.length,gameIds:f},!0);o=[...o,...h.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"template":const p=s.map(([O])=>O),m=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...m.data.filter(O=>p.includes(O.id)).map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"classic_quiz":const g=s.map(([O])=>O),v=yield e.miniGames.getClassicQuizzes({limit:g.length,classicQuizIds:g},!1,!0);o=[...o,...v.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"either_or":const S=s.map(([O])=>O),w=yield e.miniGames.getEitherOrs({limit:S.length,eitherOrIds:S},!1,!0);o=[...o,...w.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"poll":const y=s.map(([O])=>O),x=yield e.voting.getPolls({limit:y.length,pollIds:y},!0);o=[...o,...x.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"bracket":const b=s.map(([O])=>O),T=yield e.bracketGame.getGames({limit:b.length,gameIds:b},!0);o=[...o,...T.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;case"standing":const E=s.map(([O])=>O),P=yield e.standingGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,...P.data.map(O=>{var z;const G=((z=s.find(([A])=>A===O.id))==null?void 0:z[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:G}})];break;default:}}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),nF=["top_x","match_quiz","template","classic_quiz","poll","either_or","bracket","standing"],rF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],iF=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic 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"),eb=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"),oF={Login:NR,InformationInput:eo,RichText:ic,HeaderButtons:hP,MarketSelection:ZR,Accordion:eT,DynamicFields:PP,BasicSelect:nT,BooleanSwitch:wL,Branding:fP,ProfileSearchSelect:xL,RangeCalendar:_P,CompetitionSearchSelect:bL,Related:rM,Images:pR,Duration:EP,DatePickerComponent:to,Flags:uR,Spinner:us,Tags:km,Toast:ut,AdContent:tT,Match:eM,Winners:cB,CompetitionsSearchSelect:yL,TeamsSearchSelect:CL,CustomSelect:yM,Schedule:fM,NoPermissionCard:kP,CustomFlatpickrCalendar:Vc,ContextSelectFilter:dB,NumberInput:$B,EntityContext:HB,MiniGamesImages:GB,AuthRequirement:YB,SortableList:HN,ItemsPerPageFilter:WN,ImageCard:so,RelatedRelationship:({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=C.useState([]),[o,a]=C.useState(""),[l,s]=C.useState(null),[c,d]=C.useState("relatedTo"),[f,h]=C.useState(!1),p=()=>h(!f),m=GN(l,p),{sdk:g}=pt();C.useEffect(()=>(e.length>0&&tF(g,e,i,p),()=>{i([]),a(""),s(null),d("relatedTo")}),[]);const v=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===c)){a("");return}const b=[...e,{entity_id:o,entity_type:l,entity_relationship:c}],T=(m==null?void 0:m.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:l,status:E.status,relationship:c})))||[];i([...r,...T]),t(b),a("")},S=(x,b)=>{const T=e.filter(P=>!(P.entity_id===x&&P.entity_relationship===b)),E=r.filter(P=>!(P.id===x&&P.relationship===b));i(E),t(T)},w=r.reduce((x,b)=>{const T=b.relationship;return x[T]||(x[T]=[]),x[T].push(b),x},{}),y=Object.keys(w).sort();return u.jsxs(u.Fragment,{children:[y.map(x=>u.jsxs(I.Box,{sx:{mb:2},children:[u.jsx(I.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:u.jsx(I.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:eb.get(x)||"Unknown relationship"})}),w[x].map((b,T)=>u.jsx(eF,{entity:b,deleteLabel:n.delete,onDelete:S},`related-entity-relationship-${b.id}-${T}`))]},`relationship-group-${x}`)),u.jsxs(I.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",mt:r&&r.length?2:0,gap:1},children:[u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.type}),u.jsx(I.Select,{value:l,size:"sm",name:"entity_type",onChange:(x,b)=>s(b),sx:{minHeight:"37px"},children:nF.map(x=>u.jsx(I.Option,{value:x,children:iF.get(x)},`entity-type-option-${x}`))})]}),u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.relationship}),u.jsx(I.Select,{value:c,size:"sm",name:"entity_relationship",onChange:(x,b)=>d(b),sx:{minHeight:"37px"},children:rF.map(x=>u.jsx(I.Option,{value:x,children:eb.get(x)},`entity-relationship-option-${x}`))})]}),u.jsxs(I.FormControl,{children:[u.jsx(I.FormLabel,{required:!0,color:"primary",children:n.entity}),u.jsx(I.Select,{value:o,size:"sm",name:"entity_id",onChange:(x,b)=>a(b),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!m&&u.jsx(I.CircularProgress,{size:"sm"}),children:m&&m.map(x=>u.jsx(I.Option,{value:x.id,children:x.name},`entity--${x.id}`))})]}),u.jsx(I.Button,{startDecorator:u.jsx(Le.Add,{}),disabled:!o||!l,onClick:v,sx:{mb:1},children:n.add})]}),u.jsx(ut,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})},ExportUsersLeads:e=>{const[t,n]=C.useState(!1),[r,i]=C.useState(!1),[o,a]=C.useState("success"),[l,s]=C.useState(""),c=C.useContext(Xo),d=(h,p)=>{a(h),s(p),i(!0)},f=()=>k(this,null,function*(){n(!0);const h=yield c==null?void 0:c.https.exportLeadsPerEntity(e.entityId);if(h!=null&&h.ok){const p=yield h.blob(),m=URL.createObjectURL(p),g=document.createElement("a");g.href=m,g.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(m),n(!1),d("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield h==null?void 0:h.json()),n(!1),d("danger",e.labels.usersLeadsExportErrorMessage)});return u.jsxs(u.Fragment,{children:[u.jsxs(I.Box,{mb:2,children:[u.jsx(I.Box,{display:"flex",alignItems:"center",mb:1,children:u.jsx(I.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),u.jsx(I.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:u.jsxs(I.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:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.category}),u.jsx("th",{children:e.labels.action})]})}),u.jsx("tbody",{children:u.jsxs("tr",{children:[u.jsxs("td",{children:[u.jsx(I.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),u.jsx(I.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),u.jsx("td",{children:u.jsx(I.Button,{loading:t,onClick:f,children:e.labels.exportAllUsersLeads})})]})})]})})]}),u.jsx(ut,{showToast:r,color:o,message:l,hideToast:()=>i(!1)})]})},SignOutButton:ng},tb=C.createContext(null),aF=({children:e})=>u.jsx(tb.Provider,{value:oF,children:e}),sF=()=>{const e=C.useContext(tb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},nb=425,rb=1024;return{APIProvider:hI,AuthProvider:pI,AuthContext:Bf,ComponentProvider:aF,useComponentContext:sF,useAPIContext:pt,useIsMobile:()=>{const[e,t]=C.useState(window.innerWidth<=rb),[n,r]=C.useState(window.innerWidth<=nb);return C.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=rb),r(window.innerWidth<=nb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}}}});
|