fansunited-management-components 1.59.0-RC2 → 1.59.0-RC3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.es.js +254 -257
- package/index.umd.js +20 -20
- package/package.json +1 -1
- package/src/components/WidgetEmbedCode/WidgetEmbedCode.d.ts +0 -1
- package/src/components/WidgetEmbedCode/WidgetEmbedCode.d.ts.map +1 -1
- package/src/constants/components.d.ts +0 -1
- package/src/constants/components.d.ts.map +1 -1
- package/src/context/ComponentContext.d.ts +0 -1
- package/src/context/ComponentContext.d.ts.map +1 -1
package/index.umd.js
CHANGED
|
@@ -837,7 +837,7 @@
|
|
|
837
837
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
838
838
|
* See the License for the specific language governing permissions and
|
|
839
839
|
* limitations under the License.
|
|
840
|
-
*/const zd=new Map;function
|
|
840
|
+
*/const zd=new Map;function Gt(e){fn(e instanceof Function,"Expected a class definition");let t=zd.get(e);return t?(fn(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,zd.set(e,t),t)}/**
|
|
841
841
|
* @license
|
|
842
842
|
* Copyright 2019 Google LLC
|
|
843
843
|
*
|
|
@@ -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 xr(e,t,n){return`firebase:${e}:${t}:${n}`}class Wr{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=xr(this.userKey,i.apiKey,o),this.fullPersistenceKey=xr("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 _(this,null,function*(){const t=yield this.persistence._get(this.fullUserKey);return t?Mn._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 _(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 _(this,null,function*(){if(!n.length)return new Wr(
|
|
870
|
+
*/function xr(e,t,n){return`firebase:${e}:${t}:${n}`}class Wr{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=xr(this.userKey,i.apiKey,o),this.fullPersistenceKey=xr("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 _(this,null,function*(){const t=yield this.persistence._get(this.fullUserKey);return t?Mn._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 _(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 _(this,null,function*(){if(!n.length)return new Wr(Gt(Hr),t,r);const i=(yield Promise.all(n.map(u=>_(this,null,function*(){if(yield u._isAvailable())return u})))).filter(u=>u);let o=i[0]||Gt(Hr);const a=xr(r,t.config.apiKey,t.name);let l=null;for(const u of n)try{const f=yield u._get(a);if(f){const d=Mn._fromJSON(t,f);u!==o&&(l=d),o=u;break}}catch(f){}const c=i.filter(u=>u._shouldAllowMigration);return!o._shouldAllowMigration||!c.length?new Wr(o,t,r):(o=c[0],l&&(yield o._set(a,l.toJSON())),yield Promise.all(n.map(u=>_(this,null,function*(){if(u!==o)try{yield u._remove(a)}catch(f){}}))),new Wr(o,t,r))})}}/**
|
|
871
871
|
* @license
|
|
872
872
|
* Copyright 2020 Google LLC
|
|
873
873
|
*
|
|
@@ -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 ex{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 Jd(this),this.idTokenSubscription=new Jd(this),this.beforeStateQueue=new Qy(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=Pd,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=Yt(n)),this._initializationPromise=this.queue(()=>_(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Wr.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(o){}yield this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return _(this,null,function*(){if(this._deleted)return;const t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return _(this,null,function*(){try{const n=yield $d(this,{idToken:t}),r=yield Mn._fromGetAccountInfoResponse(this,n,t);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return _(this,null,function*(){var n;if(Xe(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,c=yield this.tryRedirectSignIn(t);(!a||a===l)&&(c!=null&&c.user)&&(i=c.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(i)}catch(a){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return le(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return _(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch(r){yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(t){return _(this,null,function*(){try{yield Ui(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=Py()}_delete(){return _(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return _(this,null,function*(){if(Xe(this.app))return Promise.reject(Tt(this));const n=t?Me(t):null;return n&&le(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return _(this,null,function*(){if(!this._deleted)return t&&le(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>_(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return _(this,null,function*(){return Xe(this.app)?Promise.reject(Tt(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Xe(this.app)?Promise.reject(Tt(this)):this.queue(()=>_(this,null,function*(){yield this.assertedPersistence.setPersistence(Yt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return _(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return _(this,null,function*(){const t=yield Jy(this),n=new Zy(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new mr("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}revokeAccessToken(t){return _(this,null,function*(){if(this.currentUser){const n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield Gy(this,r)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,n){return _(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return _(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Yt(t)||this._popupRedirectResolver;le(n,this,"argument-error"),this.redirectPersistenceManager=yield Wr.create(this,[Yt(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return _(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>_(this,null,function*(){}))),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return _(this,null,function*(){if(t===this.currentUser)return this.queue(()=>_(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let a=!1;const l=this._isInitialized?Promise.resolve():this._initializationPromise;if(le(l,this,"internal-error"),l.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const c=t.addObserver(n,r,i);return()=>{a=!0,c()}}else{const c=t.addObserver(n);return()=>{a=!0,c()}}}directlySetCurrentUser(t){return _(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return le(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Qd(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return _(this,null,function*(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();r&&(n["X-Firebase-Client"]=r);const i=yield this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n})}_getAppCheckToken(){return _(this,null,function*(){var t;const n=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return n!=null&&n.error&&ky(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function tt(e){return Me(e)}class Jd{constructor(t){this.auth=t,this.observer=null,this.addObserver=sd(n=>this.observer=n)}get next(){return le(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
|
|
960
|
+
*/class ex{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 Jd(this),this.idTokenSubscription=new Jd(this),this.beforeStateQueue=new Qy(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=Pd,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=Gt(n)),this._initializationPromise=this.queue(()=>_(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Wr.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(o){}yield this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return _(this,null,function*(){if(this._deleted)return;const t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return _(this,null,function*(){try{const n=yield $d(this,{idToken:t}),r=yield Mn._fromGetAccountInfoResponse(this,n,t);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return _(this,null,function*(){var n;if(Xe(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,c=yield this.tryRedirectSignIn(t);(!a||a===l)&&(c!=null&&c.user)&&(i=c.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(i)}catch(a){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return le(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return _(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch(r){yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(t){return _(this,null,function*(){try{yield Ui(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=Py()}_delete(){return _(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return _(this,null,function*(){if(Xe(this.app))return Promise.reject(Tt(this));const n=t?Me(t):null;return n&&le(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return _(this,null,function*(){if(!this._deleted)return t&&le(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>_(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return _(this,null,function*(){return Xe(this.app)?Promise.reject(Tt(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Xe(this.app)?Promise.reject(Tt(this)):this.queue(()=>_(this,null,function*(){yield this.assertedPersistence.setPersistence(Gt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return _(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return _(this,null,function*(){const t=yield Jy(this),n=new Zy(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new mr("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}revokeAccessToken(t){return _(this,null,function*(){if(this.currentUser){const n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield Gy(this,r)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,n){return _(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return _(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Gt(t)||this._popupRedirectResolver;le(n,this,"argument-error"),this.redirectPersistenceManager=yield Wr.create(this,[Gt(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return _(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>_(this,null,function*(){}))),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return _(this,null,function*(){if(t===this.currentUser)return this.queue(()=>_(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let a=!1;const l=this._isInitialized?Promise.resolve():this._initializationPromise;if(le(l,this,"internal-error"),l.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const c=t.addObserver(n,r,i);return()=>{a=!0,c()}}else{const c=t.addObserver(n);return()=>{a=!0,c()}}}directlySetCurrentUser(t){return _(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return le(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Qd(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return _(this,null,function*(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();r&&(n["X-Firebase-Client"]=r);const i=yield this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n})}_getAppCheckToken(){return _(this,null,function*(){var t;const n=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return n!=null&&n.error&&ky(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function tt(e){return Me(e)}class Jd{constructor(t){this.auth=t,this.observer=null,this.addObserver=sd(n=>this.observer=n)}get next(){return le(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
|
|
961
961
|
* @license
|
|
962
962
|
* Copyright 2020 Google LLC
|
|
963
963
|
*
|
|
@@ -987,7 +987,7 @@
|
|
|
987
987
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
988
988
|
* See the License for the specific language governing permissions and
|
|
989
989
|
* limitations under the License.
|
|
990
|
-
*/function lx(e,t){const n=Wo(e,"auth");if(n.isInitialized()){const i=n.getImmediate(),o=n.getOptions();if(Vo(o,t!=null?t:{}))return i;At(i,"already-initialized")}return n.initialize({options:t})}function cx(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(
|
|
990
|
+
*/function lx(e,t){const n=Wo(e,"auth");if(n.isInitialized()){const i=n.getImmediate(),o=n.getOptions();if(Vo(o,t!=null?t:{}))return i;At(i,"already-initialized")}return n.initialize({options:t})}function cx(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Gt);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t==null?void 0:t.popupRedirectResolver)}function yl(e,t,n){const r=tt(e);le(r._canInitEmulator,r,"emulator-config-failed"),le(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(n!=null&&n.disableWarnings),o=ef(t),{host:a,port:l}=ux(t),c=l===null?"":`:${l}`;r.config.emulator={url:`${o}//${a}${c}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:a,port:l,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||dx()}function ef(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function ux(e){const t=ef(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const o=i[1];return{host:o,port:tf(r.substr(o.length+1))}}else{const[o,a]=r.split(":");return{host:o,port:tf(a)}}}function tf(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function dx(){function e(){const t=document.createElement("p"),n=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console!="undefined"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window!="undefined"&&typeof document!="undefined"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e())}/**
|
|
991
991
|
* @license
|
|
992
992
|
* Copyright 2020 Google LLC
|
|
993
993
|
*
|
|
@@ -1857,7 +1857,7 @@
|
|
|
1857
1857
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1858
1858
|
* See the License for the specific language governing permissions and
|
|
1859
1859
|
* limitations under the License.
|
|
1860
|
-
*/function Ir(e,t){return t?
|
|
1860
|
+
*/function Ir(e,t){return t?Gt(t):(le(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}/**
|
|
1861
1861
|
* @license
|
|
1862
1862
|
* Copyright 2019 Google LLC
|
|
1863
1863
|
*
|
|
@@ -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 QC="pendingRedirect",Ji=new Map;class Xi extends Sf{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}execute(){return _(this,null,function*(){let t=Ji.get(this.auth._key());if(!t){try{const r=(yield JC(this.resolver,this.auth))?yield Br(Xi.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(r)}catch(n){t=()=>Promise.reject(n)}Ji.set(this.auth._key(),t)}return this.bypassAuthState||Ji.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return _(this,null,function*(){if(t.type==="signInViaRedirect")return Br(Xi.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,Br(Xi.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return _(this,null,function*(){})}cleanUp(){}}function JC(e,t){return _(this,null,function*(){const n=Af(t),r=If(e);if(!(yield r._isAvailable()))return!1;const i=(yield r._get(n))==="true";return yield r._remove(n),i})}function Ol(e,t){return _(this,null,function*(){return If(e)._set(Af(t),"true")})}function XC(){Ji.clear()}function Rl(e,t){Ji.set(e._key(),t)}function If(e){return
|
|
1920
|
+
*/const QC="pendingRedirect",Ji=new Map;class Xi extends Sf{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}execute(){return _(this,null,function*(){let t=Ji.get(this.auth._key());if(!t){try{const r=(yield JC(this.resolver,this.auth))?yield Br(Xi.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(r)}catch(n){t=()=>Promise.reject(n)}Ji.set(this.auth._key(),t)}return this.bypassAuthState||Ji.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return _(this,null,function*(){if(t.type==="signInViaRedirect")return Br(Xi.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,Br(Xi.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return _(this,null,function*(){})}cleanUp(){}}function JC(e,t){return _(this,null,function*(){const n=Af(t),r=If(e);if(!(yield r._isAvailable()))return!1;const i=(yield r._get(n))==="true";return yield r._remove(n),i})}function Ol(e,t){return _(this,null,function*(){return If(e)._set(Af(t),"true")})}function XC(){Ji.clear()}function Rl(e,t){Ji.set(e._key(),t)}function If(e){return Gt(e._redirectPersistence)}function Af(e){return xr(QC,e.config.apiKey,e.name)}/**
|
|
1921
1921
|
* @license
|
|
1922
1922
|
* Copyright 2020 Google LLC
|
|
1923
1923
|
*
|
|
@@ -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 Jw=20;class Xw extends Ef{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(t=>{this.resolveInitialized=t})}addPassiveListener(t){this.passiveListeners.add(t)}removePassiveListener(t){this.passiveListeners.delete(t)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(t){return this.resolveInitialized(),this.passiveListeners.forEach(n=>n(t)),super.onEvent(t)}initialized(){return _(this,null,function*(){yield this.initPromise})}}function Zw(e,t,n=null){return{type:t,eventId:n,urlResponse:null,sessionId:nS(),postBody:null,tenantId:e.tenantId,error:Ct(e,"no-auth-event")}}function eS(e,t){return $l()._set(Fl(e),t)}function Ff(e){return _(this,null,function*(){const t=yield $l()._get(Fl(e));return t&&(yield $l()._remove(Fl(e))),t})}function tS(e,t){var n,r;const i=iS(t);if(i.includes("/__/auth/callback")){const o=da(i),a=o.firebaseError?rS(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],c=l?Ct(l):null;return c?{type:e.type,eventId:e.eventId,tenantId:e.tenantId,error:c,urlResponse:null,sessionId:null,postBody:null}:{type:e.type,eventId:e.eventId,tenantId:e.tenantId,sessionId:e.sessionId,urlResponse:i,postBody:null}}return null}function nS(){const e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<Jw;n++){const r=Math.floor(Math.random()*t.length);e.push(t.charAt(r))}return e.join("")}function $l(){return
|
|
2145
|
+
*/const Jw=20;class Xw extends Ef{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(t=>{this.resolveInitialized=t})}addPassiveListener(t){this.passiveListeners.add(t)}removePassiveListener(t){this.passiveListeners.delete(t)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(t){return this.resolveInitialized(),this.passiveListeners.forEach(n=>n(t)),super.onEvent(t)}initialized(){return _(this,null,function*(){yield this.initPromise})}}function Zw(e,t,n=null){return{type:t,eventId:n,urlResponse:null,sessionId:nS(),postBody:null,tenantId:e.tenantId,error:Ct(e,"no-auth-event")}}function eS(e,t){return $l()._set(Fl(e),t)}function Ff(e){return _(this,null,function*(){const t=yield $l()._get(Fl(e));return t&&(yield $l()._remove(Fl(e))),t})}function tS(e,t){var n,r;const i=iS(t);if(i.includes("/__/auth/callback")){const o=da(i),a=o.firebaseError?rS(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],c=l?Ct(l):null;return c?{type:e.type,eventId:e.eventId,tenantId:e.tenantId,error:c,urlResponse:null,sessionId:null,postBody:null}:{type:e.type,eventId:e.eventId,tenantId:e.tenantId,sessionId:e.sessionId,urlResponse:i,postBody:null}}return null}function nS(){const e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<Jw;n++){const r=Math.floor(Math.random()*t.length);e.push(t.charAt(r))}return e.join("")}function $l(){return Gt(ra)}function Fl(e){return xr("authEvent",e.config.apiKey,e.name)}function rS(e){try{return JSON.parse(e)}catch(t){return null}}function iS(e){const t=da(e),n=t.link?decodeURIComponent(t.link):void 0,r=da(n).link,i=t.deep_link_id?decodeURIComponent(t.deep_link_id):void 0;return da(i).link||i||r||n||e}function da(e){if(!(e!=null&&e.includes("?")))return{};const[t,...n]=e.split("?");return Fr(n.join("?"))}/**
|
|
2146
2146
|
* @license
|
|
2147
2147
|
* Copyright 2021 Google LLC
|
|
2148
2148
|
*
|
|
@@ -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
|
|
2205
|
+
*/const Yt={LOCAL:"local",NONE:"none",SESSION:"session"},eo=le,Vf="persistence";function yS(e,t){if(eo(Object.values(Yt).includes(t),e,"invalid-persistence-type"),Qs()){eo(t!==Yt.SESSION,e,"unsupported-persistence-type");return}if(td()){eo(t===Yt.NONE,e,"unsupported-persistence-type");return}if(Nl()){eo(t===Yt.NONE||t===Yt.LOCAL&&Uo(),e,"unsupported-persistence-type");return}eo(t===Yt.NONE||jf(),e,"unsupported-persistence-type")}function jl(e){return _(this,null,function*(){yield e._initializationPromise;const t=Hf(),n=xr(Vf,e.config.apiKey,e.name);t&&t.setItem(n,e._getPersistence())})}function xS(e,t){const n=Hf();if(!n)return[];const r=xr(Vf,e,t);switch(n.getItem(r)){case Yt.NONE:return[Hr];case Yt.LOCAL:return[Xr,rr];case Yt.SESSION:return[rr];default:return[]}}function Hf(){var e;try{return((e=bS())===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 CS=le;class ir{constructor(){this.browserResolver=
|
|
2220
|
+
*/const CS=le;class ir{constructor(){this.browserResolver=Gt(Rf),this.cordovaResolver=Gt(sS),this.underlyingResolver=null,this._redirectPersistence=rr,this._completeRedirectFn=ca,this._overrideRedirectResult=Rl}_initialize(t){return _(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._initialize(t)})}_openPopup(t,n,r,i){return _(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openPopup(t,n,r,i)})}_openRedirect(t,n,r,i){return _(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 Uf()||this.browserResolver._shouldInitProactively}get assertedUnderlyingResolver(){return CS(this.underlyingResolver,"internal-error"),this.underlyingResolver}selectUnderlyingResolver(){return _(this,null,function*(){if(this.underlyingResolver)return;const t=yield vS();this.underlyingResolver=t?this.cordovaResolver:this.browserResolver})}}/**
|
|
2221
2221
|
* @license
|
|
2222
2222
|
* Copyright 2020 Google LLC
|
|
2223
2223
|
*
|
|
@@ -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 to=le;class Vl{constructor(t,n){if(this.app=t,n.isInitialized()){this._delegate=n.getImmediate(),this.linkUnderlyingAuth();return}const{apiKey:r}=t.options;to(r,"invalid-api-key",{appName:t.name}),to(r,"invalid-api-key",{appName:t.name});const i=typeof window!="undefined"?ir:void 0;this._delegate=n.initialize({options:{persistence:TS(r,t.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(Ty),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Fn.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){yl(this._delegate,t,n)}applyActionCode(t){return Fx(this._delegate,t)}checkActionCode(t){return ff(this._delegate,t)}confirmPasswordReset(t,n){return $x(this._delegate,t,n)}createUserWithEmailAndPassword(t,n){return _(this,null,function*(){return Ut(this._delegate,zx(this._delegate,t,n))})}fetchProvidersForEmail(t){return this.fetchSignInMethodsForEmail(t)}fetchSignInMethodsForEmail(t){return Gx(this._delegate,t)}isSignInWithEmailLink(t){return Vx(this._delegate,t)}getRedirectResult(){return _(this,null,function*(){to(zl(),this._delegate,"operation-not-supported-in-this-environment");const t=yield ow(this._delegate,ir);return t?Ut(this._delegate,Promise.resolve(t)):{credential:null,user:null}})}addFrameworkForLogging(t){lS(this._delegate,t)}onAuthStateChanged(t,n,r){const{next:i,error:o,complete:a}=Yf(t,n,r);return this._delegate.onAuthStateChanged(i,o,a)}onIdTokenChanged(t,n,r){const{next:i,error:o,complete:a}=Yf(t,n,r);return this._delegate.onIdTokenChanged(i,o,a)}sendSignInLinkToEmail(t,n){return Ux(this._delegate,t,n)}sendPasswordResetEmail(t,n){return Bx(this._delegate,t,n||void 0)}setPersistence(t){return _(this,null,function*(){yS(this._delegate,t);let n;switch(t){case
|
|
2280
|
+
*/const to=le;class Vl{constructor(t,n){if(this.app=t,n.isInitialized()){this._delegate=n.getImmediate(),this.linkUnderlyingAuth();return}const{apiKey:r}=t.options;to(r,"invalid-api-key",{appName:t.name}),to(r,"invalid-api-key",{appName:t.name});const i=typeof window!="undefined"?ir:void 0;this._delegate=n.initialize({options:{persistence:TS(r,t.name),popupRedirectResolver:i}}),this._delegate._updateErrorMap(Ty),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?Fn.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){yl(this._delegate,t,n)}applyActionCode(t){return Fx(this._delegate,t)}checkActionCode(t){return ff(this._delegate,t)}confirmPasswordReset(t,n){return $x(this._delegate,t,n)}createUserWithEmailAndPassword(t,n){return _(this,null,function*(){return Ut(this._delegate,zx(this._delegate,t,n))})}fetchProvidersForEmail(t){return this.fetchSignInMethodsForEmail(t)}fetchSignInMethodsForEmail(t){return Gx(this._delegate,t)}isSignInWithEmailLink(t){return Vx(this._delegate,t)}getRedirectResult(){return _(this,null,function*(){to(zl(),this._delegate,"operation-not-supported-in-this-environment");const t=yield ow(this._delegate,ir);return t?Ut(this._delegate,Promise.resolve(t)):{credential:null,user:null}})}addFrameworkForLogging(t){lS(this._delegate,t)}onAuthStateChanged(t,n,r){const{next:i,error:o,complete:a}=Yf(t,n,r);return this._delegate.onAuthStateChanged(i,o,a)}onIdTokenChanged(t,n,r){const{next:i,error:o,complete:a}=Yf(t,n,r);return this._delegate.onIdTokenChanged(i,o,a)}sendSignInLinkToEmail(t,n){return Ux(this._delegate,t,n)}sendPasswordResetEmail(t,n){return Bx(this._delegate,t,n||void 0)}setPersistence(t){return _(this,null,function*(){yS(this._delegate,t);let n;switch(t){case Yt.SESSION:n=rr;break;case Yt.LOCAL:n=(yield Gt(Xr)._isAvailable())?Xr:ra;break;case Yt.NONE:n=Hr;break;default:return At("argument-error",{appName:this._delegate.name})}return this._delegate.setPersistence(n)})}signInAndRetrieveDataWithCredential(t){return this.signInWithCredential(t)}signInAnonymously(){return Ut(this._delegate,Ox(this._delegate))}signInWithCredential(t){return Ut(this._delegate,ea(this._delegate,t))}signInWithCustomToken(t){return Ut(this._delegate,Lx(this._delegate,t))}signInWithEmailAndPassword(t,n){return Ut(this._delegate,jx(this._delegate,t,n))}signInWithEmailLink(t,n){return Ut(this._delegate,Hx(this._delegate,t,n))}signInWithPhoneNumber(t,n){return Ul(this._delegate,NC(this._delegate,t,n))}signInWithPopup(t){return _(this,null,function*(){return to(zl(),this._delegate,"operation-not-supported-in-this-environment"),Ut(this._delegate,YC(this._delegate,t,ir))})}signInWithRedirect(t){return _(this,null,function*(){return to(zl(),this._delegate,"operation-not-supported-in-this-environment"),yield jl(this._delegate),ZC(this._delegate,t,ir)})}updateCurrentUser(t){return this._delegate.updateCurrentUser(t)}verifyPasswordResetCode(t){return Nx(this._delegate,t)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}Vl.Persistence=Yt;function Yf(e,t,n){let r=e;typeof e!="function"&&({next:r,error:t,complete:n}=e);const i=r;return{next:a=>i(a&&Fn.getOrCreate(a)),error:t,complete:n}}function TS(e,t){const n=xS(e,t);if(typeof self!="undefined"&&!n.includes(Xr)&&n.push(Xr),typeof window!="undefined")for(const r of[ra,rr])n.includes(r)||n.push(r);return n.includes(Hr)||n.push(Hr),n}/**
|
|
2281
2281
|
* @license
|
|
2282
2282
|
* Copyright 2020 Google LLC
|
|
2283
2283
|
*
|
|
@@ -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 Wl=Symbol.for("react.transitional.element"),Gl=Symbol.for("react.portal"),pa=Symbol.for("react.fragment"),ga=Symbol.for("react.strict_mode"),ma=Symbol.for("react.profiler"),va=Symbol.for("react.consumer"),ba=Symbol.for("react.context"),ya=Symbol.for("react.forward_ref"),xa=Symbol.for("react.suspense"),Ca=Symbol.for("react.suspense_list"),wa=Symbol.for("react.memo"),Sa=Symbol.for("react.lazy"),iI=Symbol.for("react.offscreen"),oI=Symbol.for("react.client.reference");function rn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Wl:switch(e=e.type,e){case pa:case ma:case ga:case xa:case Ca:return e;default:switch(e=e&&e.$$typeof,e){case ba:case ya:case Sa:case wa:return e;case va:return e;default:return t}}case Gl:return t}}}je.ContextConsumer=va,je.ContextProvider=ba,je.Element=Wl,je.ForwardRef=ya,je.Fragment=pa,je.Lazy=Sa,je.Memo=wa,je.Portal=Gl,je.Profiler=ma,je.StrictMode=ga,je.Suspense=xa,je.SuspenseList=Ca,je.isContextConsumer=function(e){return rn(e)===va},je.isContextProvider=function(e){return rn(e)===ba},je.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wl},je.isForwardRef=function(e){return rn(e)===ya},je.isFragment=function(e){return rn(e)===pa},je.isLazy=function(e){return rn(e)===Sa},je.isMemo=function(e){return rn(e)===wa},je.isPortal=function(e){return rn(e)===Gl},je.isProfiler=function(e){return rn(e)===ma},je.isStrictMode=function(e){return rn(e)===ga},je.isSuspense=function(e){return rn(e)===xa},je.isSuspenseList=function(e){return rn(e)===Ca},je.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===pa||e===ma||e===ga||e===xa||e===Ca||e===iI||typeof e=="object"&&e!==null&&(e.$$typeof===Sa||e.$$typeof===wa||e.$$typeof===ba||e.$$typeof===va||e.$$typeof===ya||e.$$typeof===oI||e.getModuleId!==void 0)},je.typeOf=rn,rh.exports=je;var ih=rh.exports;function we(e){if(typeof e!="string")throw new Error(ha(7));return e.charAt(0).toUpperCase()+e.slice(1)}function oh(e,t){var n,r;return K.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const aI=typeof window!="undefined"?K.useLayoutEffect:K.useEffect;let ah=0;function sI(e){const[t,n]=K.useState(e),r=e||t;return K.useEffect(()=>{t==null&&(ah+=1,n(`mui-${ah}`))},[t]),r}const sh=K.useId;function ro(e){if(sh!==void 0){const t=sh();return e!=null?e:t}return sI(e)}function Yl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=K.useRef(e!==void 0),[o,a]=K.useState(t),l=i?e:o,c=K.useCallback(u=>{i||a(u)},[]);return[l,c]}class Kl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Kl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let Ia=!0,ql=!1;const lI=new Kl,cI={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 uI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&cI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function dI(e){e.metaKey||e.altKey||e.ctrlKey||(Ia=!0)}function Ql(){Ia=!1}function fI(){this.visibilityState==="hidden"&&ql&&(Ia=!0)}function hI(e){e.addEventListener("keydown",dI,!0),e.addEventListener("mousedown",Ql,!0),e.addEventListener("pointerdown",Ql,!0),e.addEventListener("touchstart",Ql,!0),e.addEventListener("visibilitychange",fI,!0)}function pI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return Ia||uI(t)}function lh(){const e=K.useCallback(i=>{i!=null&&hI(i.ownerDocument)},[]),t=K.useRef(!1);function n(){return t.current?(ql=!0,lI.start(100,()=>{ql=!1}),t.current=!1,!0):!1}function r(i){return pI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function ch(e,t){const n=R({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=R({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=R({},o),Object.keys(i).forEach(a=>{n[r][a]=ch(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function pt(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 uh=e=>e,gI=(()=>{let e=uh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=uh}}})(),mI={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 dh(e,t,n="Mui"){const r=mI[t];return r?`${n}-${r}`:`${gI.generate(e)}-${t}`}function vI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=dh(e,i,n)}),r}function Jl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:l,rootElementName:c}=e,u=K.useRef(null),[f,d]=K.useState(!1),{isFocusVisibleRef:p,onFocus:g,onBlur:v,ref:m}=lh(),[b,C]=K.useState(!1);t&&!n&&b&&C(!1),K.useEffect(()=>{p.current=b},[b,p]);const[w,x]=tI({rootElementName:c!=null?c:r||a?"a":void 0,componentName:"Button"}),I=j=>$=>{var M;b&&$.preventDefault(),(M=j.onMouseLeave)==null||M.call(j,$)},S=j=>$=>{var M;v($),p.current===!1&&C(!1),(M=j.onBlur)==null||M.call(j,$)},A=j=>$=>{var M;if(u.current||(u.current=$.currentTarget),g($),p.current===!0){var V;C(!0),(V=j.onFocusVisible)==null||V.call(j,$)}(M=j.onFocus)==null||M.call(j,$)},E=()=>{const j=u.current;return w==="BUTTON"||w==="INPUT"&&["button","submit","reset"].includes(j==null?void 0:j.type)||w==="A"&&(j==null?void 0:j.href)},k=j=>$=>{if(!t){var M;(M=j.onClick)==null||M.call(j,$)}},F=j=>$=>{var M;t||(d(!0),document.addEventListener("mouseup",()=>{d(!1)},{once:!0})),(M=j.onMouseDown)==null||M.call(j,$)},W=j=>$=>{var M;if((M=j.onKeyDown)==null||M.call(j,$),!$.defaultMuiPrevented&&($.target===$.currentTarget&&!E()&&$.key===" "&&$.preventDefault(),$.target===$.currentTarget&&$.key===" "&&!t&&d(!0),$.target===$.currentTarget&&!E()&&$.key==="Enter"&&!t)){var V;(V=j.onClick)==null||V.call(j,$),$.preventDefault()}},O=j=>$=>{var M;if($.target===$.currentTarget&&d(!1),(M=j.onKeyUp)==null||M.call(j,$),$.target===$.currentTarget&&!E()&&!t&&$.key===" "&&!$.defaultMuiPrevented){var V;(V=j.onClick)==null||V.call(j,$)}},T=hn(x,i,m,u),N={};return o!==void 0&&(N.tabIndex=o),w==="BUTTON"?(N.type=l!=null?l:"button",n?N["aria-disabled"]=t:N.disabled=t):w==="INPUT"?l&&["button","submit","reset"].includes(l)&&(n?N["aria-disabled"]=t:N.disabled=t):w!==""&&(!r&&!a&&(N.role="button",N.tabIndex=o!=null?o:0),t&&(N["aria-disabled"]=t,N.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(j={})=>{const $=R({},Nn(e),Nn(j)),M=R({type:l},$,N,j,{onBlur:S($),onClick:k($),onFocus:A($),onKeyDown:W($),onKeyUp:O($),onMouseDown:F($),onMouseLeave:I($),ref:T});return delete M.onFocusVisible,M},focusVisible:b,setFocusVisible:C,active:f,rootRef:T}}function bI(e,t){return e===t}const Xl={},fh=()=>{};function Zl(e,t){const n=R({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function yI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,l=K.useRef(n);K.useEffect(()=>{if(a.current===null)return;const c=Zl(l.current,o);Object.keys(t).forEach(u=>{var f;const d=(f=r[u])!=null?f:bI,p=t[u],g=c[u];if(g==null&&p!=null||g!=null&&p==null||g!=null&&p!=null&&!d(p,g)){var v,m;i==null||i((v=a.current.event)!=null?v:null,u,p,(m=a.current.type)!=null?m:"",t)}}),l.current=t,a.current=null},[l,t,a,i,r,o])}function xI(e){const t=K.useRef(null),{reducer:n,initialState:r,controlledProps:i=Xl,stateComparers:o=Xl,onStateChange:a=fh,actionContext:l,componentName:c=""}=e;K.useRef(i);const u=K.useCallback((g,v)=>{t.current=v;const m=Zl(g,i);return n(m,v)},[i,n]),[f,d]=K.useReducer(u,r),p=K.useCallback(g=>{d(R({},g,{context:l}))},[l]);return yI({nextState:f,initialState:r,stateComparers:o!=null?o:Xl,onStateChange:a!=null?a:fh,controlledProps:i,lastActionRef:t}),[Zl(f,i),p]}const CI=K.createContext(void 0);function wI(){return K.useContext(CI)}function SI(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:l=!1,value:c,inputRef:u}=e,f=wI();let d,p,g,v,m;if(f){var b,C,w;d=void 0,p=(b=f.disabled)!=null?b:!1,g=(C=f.error)!=null?C:!1,v=(w=f.required)!=null?w:!1,m=f.value}else d=t,p=n,g=r,v=l,m=c;const{current:x}=K.useRef(m!=null),I=K.useCallback(j=>{},[]),S=K.useRef(null),A=hn(S,u,I),[E,k]=K.useState(!1);K.useEffect(()=>{!f&&p&&E&&(k(!1),i==null||i())},[f,p,E,i]);const F=j=>$=>{var M;if(f!=null&&f.disabled){$.stopPropagation();return}if((M=j.onFocus)==null||M.call(j,$),f&&f.onFocus){var V;f==null||(V=f.onFocus)==null||V.call(f)}else k(!0)},W=j=>$=>{var M;(M=j.onBlur)==null||M.call(j,$),f&&f.onBlur?f.onBlur():k(!1)},O=j=>($,...M)=>{var V,Y;if(!x&&($.target||S.current)==null)throw new Error(ha(17));f==null||(V=f.onChange)==null||V.call(f,$),(Y=j.onChange)==null||Y.call(j,$,...M)},T=j=>$=>{var M;S.current&&$.currentTarget===$.target&&S.current.focus(),(M=j.onClick)==null||M.call(j,$)};return{disabled:p,error:g,focused:E,formControlContext:f,getInputProps:(j={})=>{const M=R({},{onBlur:i,onChange:o,onFocus:a},Nn(j)),V=R({},M,{onBlur:W(M),onChange:O(M),onFocus:F(M)});return R({},V,{"aria-invalid":g||void 0,defaultValue:d,value:m,required:v,disabled:p},j,{ref:A},V)},getRootProps:(j={})=>{const $=Nn(e,["onBlur","onChange","onFocus"]),M=R({},$,Nn(j));return R({},j,M,{onClick:T(M)})},inputRef:A,required:v,value:m}}const Et={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 II(e,t,n,r,i,o){if(n.length===0||!r&&n.every((l,c)=>i(l,c)))return-1;let a=e;for(;;){if(!o&&t==="next"&&a===n.length||!o&&t==="previous"&&a===-1)return-1;if(r?!1:i(n[a],a))a+=t==="next"?1:-1,o&&(a=(a+n.length)%n.length);else return a}}function Bt(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:l,itemComparer:c,focusManagement:u}=n,f=u==="DOM"?0:-1,d=i.length-1,p=e==null?-1:i.findIndex(C=>c(C,e));let g,v,m=!a;switch(t){case"reset":if(f===-1)return null;g=0,v="next",m=!1;break;case"start":g=0,v="next",m=!1;break;case"end":g=d,v="previous",m=!1;break;default:{const C=p+t;C<0?!m&&p!==-1||Math.abs(t)>1?(g=0,v="next"):(g=d,v="previous"):C>d?!m||Math.abs(t)>1?(g=d,v="previous"):(g=0,v="next"):(g=C,v=t>=0?"next":"previous")}}const b=II(g,v,i,l,o,m);return b===-1&&e!==null&&!o(e,p)?e:(r=i[b])!=null?r:null}function AI(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 hh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:l}=t,c=a.findIndex(f=>r(e,f));if(i(e,c))return t;const u=AI(e,l,o,r);return R({},t,{selectedValues:u,highlightedValue:e})}function TI(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return R({},t,{highlightedValue:Bt(r,"start",n)});case"End":return R({},t,{highlightedValue:Bt(r,"end",n)});case"PageUp":return R({},t,{highlightedValue:Bt(r,-o,n)});case"PageDown":return R({},t,{highlightedValue:Bt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return R({},t,{highlightedValue:Bt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return R({},t,{highlightedValue:Bt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return R({},t,{highlightedValue:Bt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return R({},t,{highlightedValue:Bt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:hh(t.highlightedValue,t,n)}return t}function EI(e,t){return t.focusManagement==="DOM"?e:R({},e,{highlightedValue:null})}function kI(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 _I(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,l=t.length>1;let c=l?e.highlightedValue:Bt(e.highlightedValue,1,n);for(let u=0;u<r.length;u+=1){if(!c||!l&&e.highlightedValue===c)return e;if(kI(c,t,a)&&(!i(c,r.indexOf(c))||o))return R({},e,{highlightedValue:c});c=Bt(c,1,n)}return e}function PI(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let l=null;if(n.highlightedValue!=null){var c;l=(c=e.find(d=>o(d,n.highlightedValue)))!=null?c:null}else a==="DOM"&&t.length===0&&(l=Bt(null,"reset",r));const f=((i=n.selectedValues)!=null?i:[]).filter(d=>e.some(p=>o(p,d)));return R({},n,{highlightedValue:l,selectedValues:f})}function DI(e,t){return R({},e,{highlightedValue:Bt(null,"reset",t)})}function OI(e,t){return R({},e,{highlightedValue:Bt(null,"end",t)})}function RI(e,t){return R({},e,{selectedValues:[],highlightedValue:Bt(null,"reset",t)})}function ph(e,t){const{type:n,context:r}=t;switch(n){case Et.keyDown:return TI(t.key,e,r);case Et.itemClick:return hh(t.item,e,r);case Et.blur:return EI(e,r);case Et.textNavigation:return _I(e,t.searchString,r);case Et.itemsChange:return PI(t.items,t.previousItems,e,r);case Et.resetHighlight:return DI(e,r);case Et.highlightLast:return OI(e,r);case Et.clearSelection:return RI(e,r);default:return e}}const MI=500;function LI(e){const t=K.useRef({searchString:"",lastTime:null});return K.useCallback(n=>{if(n.key.length===1&&n.key!==" "){const r=t.current,i=n.key.toLowerCase(),o=performance.now();r.searchString.length>0&&r.lastTime&&o-r.lastTime>MI?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const gh={},BI=()=>{},$I=(e,t)=>e===t,FI=()=>!1,NI=e=>typeof e=="string"?e:String(e),zI=()=>({highlightedValue:null,selectedValues:[]});function jI(e){const{controlledProps:t=gh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=zI,getItemDomElement:a,getItemId:l,isItemDisabled:c=FI,rootRef:u,onStateChange:f=BI,items:d,itemComparer:p=$I,getItemAsString:g=NI,onChange:v,onHighlightChange:m,onItemsChange:b,orientation:C="vertical",pageSize:w=5,reducerActionContext:x=gh,selectionMode:I="single",stateReducer:S,componentName:A="useList"}=e,E=K.useRef(null),k=hn(u,E),F=K.useCallback((se,Z,te)=>{if(m==null||m(se,Z,te),i==="DOM"&&Z!=null&&(te===Et.itemClick||te===Et.keyDown||te===Et.textNavigation)){var ne;a==null||(ne=a(Z))==null||ne.focus()}},[a,m,i]),W=K.useMemo(()=>({highlightedValue:p,selectedValues:(se,Z)=>Zf(se,Z,p)}),[p]),O=K.useCallback((se,Z,te,ne,de)=>{switch(f==null||f(se,Z,te,ne,de),Z){case"highlightedValue":F(se,te,ne);break;case"selectedValues":v==null||v(se,te,ne);break}},[F,v,f]),T=K.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:c,itemComparer:p,items:d,getItemAsString:g,onHighlightChange:F,orientation:C,pageSize:w,selectionMode:I,stateComparers:W}),[n,r,i,c,p,d,g,F,C,w,I,W]),N=o(),H=S!=null?S:ph,j=K.useMemo(()=>R({},x,T),[x,T]),[$,M]=xI({reducer:H,actionContext:j,initialState:N,controlledProps:t,stateComparers:W,onStateChange:O,componentName:A}),{highlightedValue:V,selectedValues:Y}=$,X=LI((se,Z)=>M({type:Et.textNavigation,event:Z,searchString:se})),D=K.useRef([]);K.useEffect(()=>{Zf(D.current,d,p)||(M({type:Et.itemsChange,event:null,items:d,previousItems:D.current}),D.current=d,b==null||b(d))},[d,p,M,b]);const L=se=>Z=>{var te;if((te=se.onKeyDown)==null||te.call(se,Z),Z.defaultMuiPrevented)return;const ne=["Home","End","PageUp","PageDown"];C==="vertical"?ne.push("ArrowUp","ArrowDown"):ne.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&ne.push(" ","Enter"),ne.includes(Z.key)&&Z.preventDefault(),M({type:Et.keyDown,key:Z.key,event:Z}),X(Z)},U=se=>Z=>{var te,ne;(te=se.onBlur)==null||te.call(se,Z),!Z.defaultMuiPrevented&&((ne=E.current)!=null&&ne.contains(Z.relatedTarget)||M({type:Et.blur,event:Z}))},G=(se={})=>{const Z=Nn(se);return R({},se,{"aria-activedescendant":i==="activeDescendant"&&V!=null?l(V):void 0,tabIndex:i==="DOM"?-1:0,ref:k},Z,{onBlur:U(Z),onKeyDown:L(Z)})},oe=K.useCallback(se=>{const Z=(Y!=null?Y:[]).some(de=>de!=null&&p(se,de)),te=V!=null&&p(se,V);return{focusable:i==="DOM",highlighted:te,selected:Z}},[p,Y,V,i]),ce=K.useMemo(()=>({dispatch:M,getItemState:oe}),[M,oe]);return K.useDebugValue({state:$}),{contextValue:ce,dispatch:M,getRootProps:G,rootRef:k,state:$}}const mh=K.createContext(null);function UI(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=K.useContext(mh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:l,focusable:c}=o(n),u=K.useCallback(g=>v=>{var m;(m=g.onClick)==null||m.call(g,v),!v.defaultPrevented&&i({type:Et.itemClick,item:n,event:v})},[i,n]),f=K.useCallback(g=>v=>{var m;(m=g.onMouseOver)==null||m.call(g,v),!v.defaultPrevented&&i({type:Et.itemHover,item:n,event:v})},[i,n]);let d;return c&&(d=a?0:-1),{getRootProps:(g={})=>{const v=Nn(g);return R({},g,{onClick:u(v),onPointerOver:t?f(v):void 0,tabIndex:d})},highlighted:a,selected:l}}const ec=K.createContext(null);function VI(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 vh(){const[e,t]=K.useState(new Map),n=K.useRef(new Set),r=K.useCallback(function(u){n.current.delete(u),t(f=>{const d=new Map(f);return d.delete(u),d})},[]),i=K.useCallback(function(u,f){let d;return typeof u=="function"?d=u(n.current):d=u,n.current.add(d),t(p=>{const g=new Map(p);return g.set(d,f),g}),{id:d,deregister:()=>r(d)}},[r]),o=K.useMemo(()=>VI(e),[e]),a=K.useCallback(function(u){return Array.from(o.keys()).indexOf(u)},[o]);return{contextValue:K.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function bh(e,t){const n=K.useContext(ec);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=K.useState(typeof e=="function"?void 0:e);return aI(()=>{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 HI(e,t){return function(r={}){const i=R({},r,e(r));return R({},i,t(i))}}const WI=Math.min,GI=Math.max,Aa=Math.round,Ta=Math.floor,Ea=e=>({x:e,y:e});function YI(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 yh(e){return Ch(e)?(e.nodeName||"").toLowerCase():"#document"}function Un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xh(e){var t;return(t=(Ch(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ch(e){return e instanceof Node||e instanceof Un(e).Node}function KI(e){return e instanceof Element||e instanceof Un(e).Element}function tc(e){return e instanceof HTMLElement||e instanceof Un(e).HTMLElement}function wh(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Un(e).ShadowRoot}function Sh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=nc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function qI(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function QI(e){return["html","body","#document"].includes(yh(e))}function nc(e){return Un(e).getComputedStyle(e)}function JI(e){if(yh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wh(e)&&e.host||xh(e);return wh(t)?t.host:t}function Ih(e){const t=JI(e);return QI(t)?e.ownerDocument?e.ownerDocument.body:e.body:tc(t)&&Sh(t)?t:Ih(t)}function ka(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ih(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Un(i);if(o){const l=rc(a);return t.concat(a,a.visualViewport||[],Sh(i)?i:[],l&&n?ka(l):[])}return t.concat(i,ka(i,[],n))}function rc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XI(e){const t=nc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=tc(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=Aa(n)!==o||Aa(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function ic(e){return KI(e)?e:e.contextElement}function Ah(e){const t=ic(e);if(!tc(t))return Ea(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=XI(t);let a=(o?Aa(n.width):n.width)/r,l=(o?Aa(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const ZI=Ea(0);function eA(e){const t=Un(e);return!qI()||!t.visualViewport?ZI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tA(e,t,n){return!1}function Th(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=ic(e);let a=Ea(1);t&&(a=Ah(e));const l=tA()?eA(o):Ea(0);let c=(i.left+l.x)/a.x,u=(i.top+l.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(o){const p=Un(o),g=r;let v=p,m=rc(v);for(;m&&r&&g!==v;){const b=Ah(m),C=m.getBoundingClientRect(),w=nc(m),x=C.left+(m.clientLeft+parseFloat(w.paddingLeft))*b.x,I=C.top+(m.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,d*=b.y,c+=x,u+=I,v=Un(m),m=rc(v)}}return YI({width:f,height:d,x:c,y:u})}function nA(e,t){let n=null,r;const i=xh(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const{left:u,top:f,width:d,height:p}=e.getBoundingClientRect();if(l||t(),!d||!p)return;const g=Ta(f),v=Ta(i.clientWidth-(u+d)),m=Ta(i.clientHeight-(f+p)),b=Ta(u),w={rootMargin:-g+"px "+-v+"px "+-m+"px "+-b+"px",threshold:GI(0,WI(1,c))||1};let x=!0;function I(S){const A=S[0].intersectionRatio;if(A!==c){if(!x)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(I,Q(B({},w),{root:i.ownerDocument}))}catch(S){n=new IntersectionObserver(I,w)}n.observe(e)}return a(!0),o}function rA(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:c=!1}=r,u=ic(e),f=i||o?[...u?ka(u):[],...ka(t)]:[];f.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),o&&C.addEventListener("resize",n)});const d=u&&l?nA(u,n):null;let p=-1,g=null;a&&(g=new ResizeObserver(C=>{let[w]=C;w&&w.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let v,m=c?Th(e):null;c&&b();function b(){const C=Th(e);m&&(C.x!==m.x||C.y!==m.y||C.width!==m.width||C.height!==m.height)&&n(),m=C,v=requestAnimationFrame(b)}return n(),()=>{var C;f.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d==null||d(),(C=g)==null||C.disconnect(),g=null,c&&cancelAnimationFrame(v)}}function iA(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:l,readOnly:c,required:u}=e,[f,d]=Yl({controlled:t,default:!!n,name:"Switch",state:"checked"}),p=k=>F=>{var W;F.nativeEvent.defaultPrevented||(d(F.target.checked),o==null||o(F),(W=k.onChange)==null||W.call(k,F))},{isFocusVisibleRef:g,onBlur:v,onFocus:m,ref:b}=lh(),[C,w]=K.useState(!1);r&&C&&w(!1),K.useEffect(()=>{g.current=C},[C,g]);const x=K.useRef(null),I=k=>F=>{var W;x.current||(x.current=F.currentTarget),m(F),g.current===!0&&(w(!0),l==null||l(F)),a==null||a(F),(W=k.onFocus)==null||W.call(k,F)},S=k=>F=>{var W;v(F),g.current===!1&&w(!1),i==null||i(F),(W=k.onBlur)==null||W.call(k,F)},A=hn(b,x);return{checked:f,disabled:!!r,focusVisible:C,getInputProps:(k={})=>R({checked:t,defaultChecked:n,disabled:r,readOnly:c,ref:A,required:u,type:"checkbox",role:"switch","aria-checked":t},k,{onChange:p(k),onFocus:I(k),onBlur:S(k)}),inputRef:A,readOnly:!!c}}function oA(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[l,c]=Yl({controlled:t,default:n,name:"Tabs",state:"value"}),u=K.useCallback((b,C)=>{c(C),r==null||r(b,C)},[r,c]),{subitems:f,contextValue:d}=vh(),p=K.useRef(()=>{}),g=K.useCallback(b=>{var C;return(C=f.get(b))==null?void 0:C.id},[f]),v=K.useCallback(b=>p.current(b),[]),m=K.useCallback(b=>{p.current=b},[]);return{contextValue:R({direction:o,getTabId:v,getTabPanelId:g,onSelected:u,orientation:i,registerTabIdLookup:m,selectionFollowsFocus:a,value:l},d)}}const Eh=K.createContext(null);function _a(){const e=K.useContext(Eh);if(e==null)throw new Error("No TabsContext provided");return e}function aA(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:l,registerTabIdLookup:c,selectionFollowsFocus:u,totalSubitemCount:f,value:d,getTabId:p,getTabPanelId:g}=t,v=K.useMemo(()=>({getItemIndex:i,registerItem:l,totalSubitemCount:f}),[l,i,f]),m=K.useMemo(()=>({direction:r,getTabId:p,getTabPanelId:g,onSelected:o,orientation:a,registerTabIdLookup:c,selectionFollowsFocus:u,value:d}),[r,p,g,o,a,c,u,d]);return s.jsx(ec.Provider,{value:v,children:s.jsx(Eh.Provider,{value:m,children:n})})}function sA(e){return e.size}function lA(e){const{value:t,id:n,rootRef:r}=e,i=_a();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,l=ro(n),c=K.useRef(null),u=hn(c,r),f=K.useMemo(()=>({id:l,ref:c}),[l]),{id:d}=bh(t!=null?t:sA,f),p=d!==o,g=d!==void 0?a(d):void 0;return{hidden:p,getRootProps:(m={})=>R({"aria-labelledby":g!=null?g:void 0,hidden:p,id:l!=null?l:void 0},m,{ref:u}),rootRef:u}}const kh={valueChange:"valueChange"};function cA(e,t){if(t.type===kh.valueChange)return R({},e,{highlightedValue:t.value});const n=ph(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===Et.itemsChange){if(n.selectedValues.length>0)return R({},n,{highlightedValue:n.selectedValues[0]});Bt(null,"reset",t.context)}return r&&n.highlightedValue!=null?R({},n,{selectedValues:[n.highlightedValue]}):n}function uA(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:l,selectionFollowsFocus:c}=_a(),{subitems:u,contextValue:f}=vh(),d=K.useCallback(O=>{var T;return(T=u.get(O))==null?void 0:T.id},[u]);l(d);const p=K.useMemo(()=>Array.from(u.keys()),[u]),g=K.useCallback(O=>{var T,N;return O==null?null:(T=(N=u.get(O))==null?void 0:N.ref.current)!=null?T:null},[u]),v=r==="rtl";let m;o==="vertical"?m="vertical":m=v?"horizontal-rtl":"horizontal-ltr";const b=K.useCallback((O,T)=>{var N;i(O,(N=T[0])!=null?N:null)},[i]),C=K.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),w=K.useCallback(O=>{var T,N;return(T=(N=u.get(O))==null?void 0:N.disabled)!=null?T:!1},[u]),{contextValue:x,dispatch:I,getRootProps:S,state:{highlightedValue:A,selectedValues:E},rootRef:k}=jI({controlledProps:C,disabledItemsFocusable:!c,focusManagement:"DOM",getItemDomElement:g,isItemDisabled:w,items:p,rootRef:n,onChange:b,orientation:m,reducerActionContext:K.useMemo(()=>({selectionFollowsFocus:c||!1}),[c]),selectionMode:"single",stateReducer:cA});K.useEffect(()=>{a!==void 0&&a!=null&&I({type:kh.valueChange,value:a})},[I,a]);const F=(O={})=>R({},O,S(O),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:K.useMemo(()=>R({},f,x),[f,x]),dispatch:I,getRootProps:F,highlightedValue:A,isRtl:v,orientation:o,rootRef:k,selectedValue:(t=E[0])!=null?t:null}}function dA(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:l}=t,c=K.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),u=K.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:l}),[a,i,l]);return s.jsx(ec.Provider,{value:u,children:s.jsx(mh.Provider,{value:c,children:n})})}function fA(e){return e.size}function hA(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=K.useRef(null),a=ro(i),{value:l,selectionFollowsFocus:c,getTabPanelId:u}=_a(),f=K.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:d,index:p,totalItemCount:g}=bh(t!=null?t:fA,f),{getRootProps:v,highlighted:m,selected:b}=UI({item:d}),{getRootProps:C,rootRef:w,active:x,focusVisible:I,setFocusVisible:S}=Jl({disabled:r,focusableWhenDisabled:!c,type:"button"}),A=hn(o,n,w),E=d!==void 0?u(d):void 0;return{getRootProps:(F={})=>{const W=Nn(F),O=HI(v,C);return R({},F,O(W),{role:"tab","aria-controls":E,"aria-selected":b,id:a,ref:A})},active:x,focusVisible:I,highlighted:m,index:p,rootRef:A,selected:b||d===l,setFocusVisible:S,totalTabsCount:g}}const _h="$$joy";function pA(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function gA(e,t){return Pi(e,t)}const mA=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},vA=["values","unit","step"],bA=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>R({},n,{[r.key]:r.val}),{})};function Ph(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=De(e,vA),o=bA(t),a=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function u(p,g){const v=a.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(v!==-1&&typeof t[a[v]]=="number"?t[a[v]]:g)-r/100}${n})`}function f(p){return a.indexOf(p)+1<a.length?u(p,a[a.indexOf(p)+1]):l(p)}function d(p){const g=a.indexOf(p);return g===0?l(a[1]):g===a.length-1?c(a[g]):u(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return R({keys:a,values:o,up:l,down:c,between:u,only:f,not:d,unit:n},i)}const yA={borderRadius:4};function io(e,t){return t?jn(e,t,{clone:!1}):e}const oc={xs:0,sm:600,md:900,lg:1200,xl:1536},Dh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${oc[e]}px)`};function Vn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Dh;return t.reduce((a,l,c)=>(a[o.up(o.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Dh;return Object.keys(t).reduce((a,l)=>{if(Object.keys(o.values||oc).indexOf(l)!==-1){const c=o.up(l);a[c]=n(t[l],l)}else{const c=l;a[c]=t[c]}return a},{})}return n(t)}function xA(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function CA(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function ar(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 Pa(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=ar(e,n)||r,t&&(i=t(i,r,e)),i}function ct(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const l=a[t],c=a.theme,u=ar(c,r)||{};return Vn(a,l,d=>{let p=Pa(u,i,d);return d===p&&typeof d=="string"&&(p=Pa(u,i,`${t}${d==="default"?"":we(d)}`,d)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function wA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const SA={m:"margin",p:"padding"},IA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Oh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},AA=wA(e=>{if(e.length>2)if(Oh[e])e=Oh[e];else return[e];const[t,n]=e.split(""),r=SA[t],i=IA[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),ac=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],sc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...ac,...sc];function oo(e,t,n,r){var i;const o=(i=ar(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 Rh(e){return oo(e,"spacing",8)}function ao(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 TA(e,t){return n=>e.reduce((r,i)=>(r[i]=ao(t,n),r),{})}function EA(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=AA(n),o=TA(i,r),a=e[n];return Vn(e,a,o)}function Mh(e,t){const n=Rh(e.theme);return Object.keys(e).map(r=>EA(e,t,r,n)).reduce(io,{})}function nt(e){return Mh(e,ac)}nt.propTypes={},nt.filterProps=ac;function rt(e){return Mh(e,sc)}rt.propTypes={},rt.filterProps=sc;function Lh(e=8){if(e.mui)return e;const t=Rh({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 Da(...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]?io(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function on(e){return typeof e!="number"?e:`${e}px solid`}function an(e,t){return ct({prop:e,themeKey:"borders",transform:t})}const kA=an("border",on),_A=an("borderTop",on),PA=an("borderRight",on),DA=an("borderBottom",on),OA=an("borderLeft",on),RA=an("borderColor"),MA=an("borderTopColor"),LA=an("borderRightColor"),BA=an("borderBottomColor"),$A=an("borderLeftColor"),FA=an("outline",on),NA=an("outlineColor"),Oa=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=oo(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:ao(t,r)});return Vn(e,e.borderRadius,n)}return null};Oa.propTypes={},Oa.filterProps=["borderRadius"],Da(kA,_A,PA,DA,OA,RA,MA,LA,BA,$A,Oa,FA,NA);const Ra=e=>{if(e.gap!==void 0&&e.gap!==null){const t=oo(e.theme,"spacing",8),n=r=>({gap:ao(t,r)});return Vn(e,e.gap,n)}return null};Ra.propTypes={},Ra.filterProps=["gap"];const Ma=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=oo(e.theme,"spacing",8),n=r=>({columnGap:ao(t,r)});return Vn(e,e.columnGap,n)}return null};Ma.propTypes={},Ma.filterProps=["columnGap"];const La=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=oo(e.theme,"spacing",8),n=r=>({rowGap:ao(t,r)});return Vn(e,e.rowGap,n)}return null};La.propTypes={},La.filterProps=["rowGap"];const zA=ct({prop:"gridColumn"}),jA=ct({prop:"gridRow"}),UA=ct({prop:"gridAutoFlow"}),VA=ct({prop:"gridAutoColumns"}),HA=ct({prop:"gridAutoRows"}),WA=ct({prop:"gridTemplateColumns"}),GA=ct({prop:"gridTemplateRows"}),YA=ct({prop:"gridTemplateAreas"}),KA=ct({prop:"gridArea"});Da(Ra,Ma,La,zA,jA,UA,VA,HA,WA,GA,YA,KA);function Zr(e,t){return t==="grey"?t:e}const qA=ct({prop:"color",themeKey:"palette",transform:Zr}),QA=ct({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Zr}),JA=ct({prop:"backgroundColor",themeKey:"palette",transform:Zr});Da(qA,QA,JA);function qt(e){return e<=1&&e!==0?`${e*100}%`:e}const XA=ct({prop:"width",transform:qt}),lc=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])||oc[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:qt(n)}};return Vn(e,e.maxWidth,t)}return null};lc.filterProps=["maxWidth"];const ZA=ct({prop:"minWidth",transform:qt}),e1=ct({prop:"height",transform:qt}),t1=ct({prop:"maxHeight",transform:qt}),n1=ct({prop:"minHeight",transform:qt});ct({prop:"size",cssProperty:"width",transform:qt}),ct({prop:"size",cssProperty:"height",transform:qt});const r1=ct({prop:"boxSizing"});Da(XA,lc,ZA,e1,t1,n1,r1);const Ba={border:{themeKey:"borders",transform:on},borderTop:{themeKey:"borders",transform:on},borderRight:{themeKey:"borders",transform:on},borderBottom:{themeKey:"borders",transform:on},borderLeft:{themeKey:"borders",transform:on},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:on},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Oa},color:{themeKey:"palette",transform:Zr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Zr},backgroundColor:{themeKey:"palette",transform:Zr},p:{style:rt},pt:{style:rt},pr:{style:rt},pb:{style:rt},pl:{style:rt},px:{style:rt},py:{style:rt},padding:{style:rt},paddingTop:{style:rt},paddingRight:{style:rt},paddingBottom:{style:rt},paddingLeft:{style:rt},paddingX:{style:rt},paddingY:{style:rt},paddingInline:{style:rt},paddingInlineStart:{style:rt},paddingInlineEnd:{style:rt},paddingBlock:{style:rt},paddingBlockStart:{style:rt},paddingBlockEnd:{style:rt},m:{style:nt},mt:{style:nt},mr:{style:nt},mb:{style:nt},ml:{style:nt},mx:{style:nt},my:{style:nt},margin:{style:nt},marginTop:{style:nt},marginRight:{style:nt},marginBottom:{style:nt},marginLeft:{style:nt},marginX:{style:nt},marginY:{style:nt},marginInline:{style:nt},marginInlineStart:{style:nt},marginInlineEnd:{style:nt},marginBlock:{style:nt},marginBlockStart:{style:nt},marginBlockEnd:{style:nt},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:Ra},rowGap:{style:La},columnGap:{style:Ma},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:qt},maxWidth:{style:lc},minWidth:{transform:qt},height:{transform:qt},maxHeight:{transform:qt},minHeight:{transform:qt},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function i1(...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 o1(e,t){return typeof e=="function"?e(t):e}function a1(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const p=ar(i,u)||{};return d?d(a):Vn(a,r,v=>{let m=Pa(p,f,v);return v===m&&typeof v=="string"&&(m=Pa(p,f,`${n}${v==="default"?"":we(v)}`,v)),c===!1?m:{[c]:m}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:Ba;function l(c){let u=c;if(typeof c=="function")u=c(o);else if(typeof c!="object")return c;if(!u)return null;const f=xA(o.breakpoints),d=Object.keys(f);let p=f;return Object.keys(u).forEach(g=>{const v=o1(u[g],o);if(v!=null)if(typeof v=="object")if(a[g])p=io(p,e(g,v,o,a));else{const m=Vn({theme:o},v,b=>({[g]:b}));i1(m,v)?p[g]=t({sx:v,theme:o}):p=io(p,m)}else p=io(p,e(g,v,o,a))}),CA(d,p)}return Array.isArray(i)?i.map(l):l(i)}return t}const $a=a1();$a.filterProps=["sx"];function Bh(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 s1=["breakpoints","palette","spacing","shape"];function $h(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=De(e,s1),l=Ph(n),c=Lh(i);let u=jn({breakpoints:l,direction:"ltr",components:{},palette:R({mode:"light"},r),spacing:c,shape:R({},yA,o)},a);return u.applyStyles=Bh,u=t.reduce((f,d)=>jn(f,d),u),u.unstable_sxConfig=R({},Ba,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(d){return $a({sx:d,theme:this})},u}function l1(e){return Object.keys(e).length===0}function c1(e=null){const t=K.useContext(me.ThemeContext);return!t||l1(t)?e:t}const u1=$h();function d1(e=u1){return c1(e)}const f1=["sx"],h1=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Ba;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function p1(e){const{sx:t}=e,n=De(e,f1),{systemProps:r,otherProps:i}=h1(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const l=t(...a);return or(l)?R({},r,l):r}:o=R({},r,t),R({},i,{sx:o})}const g1=["ownerState"],m1=["variants"],v1=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function b1(e){return Object.keys(e).length===0}function y1(e){return typeof e=="string"&&e.charCodeAt(0)>96}function cc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const x1=$h(),C1=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Fa({defaultTheme:e,theme:t,themeId:n}){return b1(t)?e:t[n]||t}function w1(e){return e?(t,n)=>n[e]:null}function Na(e,t){let{ownerState:n}=t,r=De(t,g1);const i=typeof e=="function"?e(R({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Na(o,R({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let l=De(i,m1);return o.forEach(c=>{let u=!0;typeof c.props=="function"?u=c.props(R({ownerState:n},r,n)):Object.keys(c.props).forEach(f=>{(n==null?void 0:n[f])!==c.props[f]&&r[f]!==c.props[f]&&(u=!1)}),u&&(Array.isArray(l)||(l=[l]),l.push(typeof c.style=="function"?c.style(R({ownerState:n},r,n)):c.style))}),l}return i}function S1(e={}){const{themeId:t,defaultTheme:n=x1,rootShouldForwardProp:r=cc,slotShouldForwardProp:i=cc}=e,o=a=>$a(R({},a,{theme:Fa(R({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,l={})=>{mA(a,S=>S.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:c,slot:u,skipVariantsResolver:f,skipSx:d,overridesResolver:p=w1(C1(u))}=l,g=De(l,v1),v=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,m=d||!1;let b,C=cc;u==="Root"||u==="root"?C=r:u?C=i:y1(a)&&(C=void 0);const w=gA(a,R({shouldForwardProp:C,label:b},g)),x=S=>typeof S=="function"&&S.__emotion_real!==S||or(S)?A=>Na(S,R({},A,{theme:Fa({theme:A.theme,defaultTheme:n,themeId:t})})):S,I=(S,...A)=>{let E=x(S);const k=A?A.map(x):[];c&&p&&k.push(O=>{const T=Fa(R({},O,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[c]||!T.components[c].styleOverrides)return null;const N=T.components[c].styleOverrides,H={};return Object.entries(N).forEach(([j,$])=>{H[j]=Na($,R({},O,{theme:T}))}),p(O,H)}),c&&!v&&k.push(O=>{var T;const N=Fa(R({},O,{defaultTheme:n,themeId:t})),H=N==null||(T=N.components)==null||(T=T[c])==null?void 0:T.variants;return Na({variants:H},R({},O,{theme:N}))}),m||k.push(o);const F=k.length-A.length;if(Array.isArray(S)&&F>0){const O=new Array(F).fill("");E=[...S,...O],E.raw=[...S.raw,...O]}const W=w(E,...k);return a.muiName&&(W.muiName=a.muiName),W};return w.withConfig&&(I.withConfig=w.withConfig),I}}function I1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:ch(t.components[n].defaultProps,r)}function A1({props:e,name:t,defaultTheme:n,themeId:r}){let i=d1(n);return r&&(i=i[r]||i),I1({theme:i,name:t,props:e})}function T1(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 Fh(e){if(e.type)return e;if(e.charAt(0)==="#")return Fh(T1(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ha(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(ha(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const Tr=e=>{const t=Fh(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function uc(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 Nh=(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])})},E1=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,c])=>{(!n||n&&!n([...o,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,l],Array.isArray(c)?[...a,l]:a):t([...o,l],c,a))})}r(e)},k1=(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 dc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return E1(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(l,c))){const f=`--${n?`${n}-`:""}${l.join("-")}`;Object.assign(i,{[f]:k1(l,c)}),Nh(o,l,`var(${f})`,u),Nh(a,l,`var(${f}, ${c})`,u)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function Er(e){"@babel/helpers - typeof";return Er=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},Er(e)}function _1(e,t){if(Er(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Er(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function fc(e){var t=_1(e,"string");return Er(t)=="symbol"?t:t+""}const P1=["colorSchemes","components","defaultColorScheme"];function D1(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=De(e,P1),{vars:o,css:a,varsWithDefaults:l}=dc(i,t);let c=l;const u={},{[r]:f}=n,d=De(n,[r].map(fc));if(Object.entries(d||{}).forEach(([g,v])=>{const{vars:m,css:b,varsWithDefaults:C}=dc(v,t);c=jn(c,C),u[g]={css:b,vars:m}}),f){const{css:g,vars:v,varsWithDefaults:m}=dc(f,t);c=jn(c,m),u[r]={css:g,vars:v}}return{vars:c,generateCssVars:g=>{var v;if(!g){var m;const C=R({},a);return{css:C,vars:o,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,g,C))||":root"}}const b=R({},u[g].css);return{css:b,vars:u[g].vars,selector:(t==null||(v=t.getSelector)==null?void 0:v.call(t,g,b))||":root"}}}}const O1=R({},Ba,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),so={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 R1(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 ut=(e,t)=>dh(e,t,"Mui"),Ke=(e,t)=>vI(e,t,"Mui"),M1=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))$/)}),zh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},jh=(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")),zh(r,i,a)}}),r},Dt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,l]=o;M1(l)&&typeof l=="object"&&(n=R({},n,{[a]:jh(e,l,c=>`var(--variant-${c}, ${r(`palette-${a}-${c}`,i[a][c])})`)}))})}return n.context=jh(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},L1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],B1=["colorSchemes"],$1=(e="joy")=>uc(e);function F1(e){var t,n,r,i,o,a,l,c,u,f;const d={},{cssVarPrefix:p="joy",breakpoints:g,spacing:v,components:m,variants:b,shouldSkipGeneratingVar:C=R1}=d,w=De(d,L1),x=$1(p),I={primary:so.blue,neutral:so.grey,danger:so.red,success:so.green,warning:so.yellow,common:{white:"#FFF",black:"#000"}},S=Z=>{var te;const ne=Z.split("-"),de=ne[1],ve=ne[2];return x(Z,(te=I[de])==null?void 0:te[ve])},A=Z=>({plainColor:S(`palette-${Z}-500`),plainHoverBg:S(`palette-${Z}-100`),plainActiveBg:S(`palette-${Z}-200`),plainDisabledColor:S("palette-neutral-400"),outlinedColor:S(`palette-${Z}-500`),outlinedBorder:S(`palette-${Z}-300`),outlinedHoverBg:S(`palette-${Z}-100`),outlinedActiveBg:S(`palette-${Z}-200`),outlinedDisabledColor:S("palette-neutral-400"),outlinedDisabledBorder:S("palette-neutral-200"),softColor:S(`palette-${Z}-700`),softBg:S(`palette-${Z}-100`),softHoverBg:S(`palette-${Z}-200`),softActiveColor:S(`palette-${Z}-800`),softActiveBg:S(`palette-${Z}-300`),softDisabledColor:S("palette-neutral-400"),softDisabledBg:S("palette-neutral-50"),solidColor:S("palette-common-white"),solidBg:S(`palette-${Z}-500`),solidHoverBg:S(`palette-${Z}-600`),solidActiveBg:S(`palette-${Z}-700`),solidDisabledColor:S("palette-neutral-400"),solidDisabledBg:S("palette-neutral-100")}),E=Z=>({plainColor:S(`palette-${Z}-300`),plainHoverBg:S(`palette-${Z}-800`),plainActiveBg:S(`palette-${Z}-700`),plainDisabledColor:S("palette-neutral-500"),outlinedColor:S(`palette-${Z}-200`),outlinedBorder:S(`palette-${Z}-700`),outlinedHoverBg:S(`palette-${Z}-800`),outlinedActiveBg:S(`palette-${Z}-700`),outlinedDisabledColor:S("palette-neutral-500"),outlinedDisabledBorder:S("palette-neutral-800"),softColor:S(`palette-${Z}-200`),softBg:S(`palette-${Z}-800`),softHoverBg:S(`palette-${Z}-700`),softActiveColor:S(`palette-${Z}-100`),softActiveBg:S(`palette-${Z}-600`),softDisabledColor:S("palette-neutral-500"),softDisabledBg:S("palette-neutral-800"),solidColor:S("palette-common-white"),solidBg:S(`palette-${Z}-500`),solidHoverBg:S(`palette-${Z}-600`),solidActiveBg:S(`palette-${Z}-700`),solidDisabledColor:S("palette-neutral-500"),solidDisabledBg:S("palette-neutral-800")}),k={palette:{mode:"light",primary:R({},I.primary,A("primary")),neutral:R({},I.neutral,A("neutral"),{plainColor:S("palette-neutral-700"),plainHoverColor:S("palette-neutral-900"),outlinedColor:S("palette-neutral-700")}),danger:R({},I.danger,A("danger")),success:R({},I.success,A("success")),warning:R({},I.warning,A("warning")),common:{white:"#FFF",black:"#000"},text:{primary:S("palette-neutral-800"),secondary:S("palette-neutral-700"),tertiary:S("palette-neutral-600"),icon:S("palette-neutral-500")},background:{body:S("palette-common-white"),surface:S("palette-neutral-50"),popup:S("palette-common-white"),level1:S("palette-neutral-100"),level2:S("palette-neutral-200"),level3:S("palette-neutral-300"),tooltip:S("palette-neutral-500"),backdrop:`rgba(${x("palette-neutral-darkChannel",Tr(I.neutral[900]))} / 0.25)`},divider:`rgba(${x("palette-neutral-mainChannel",Tr(I.neutral[500]))} / 0.2)`,focusVisible:S("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},F={palette:{mode:"dark",primary:R({},I.primary,E("primary")),neutral:R({},I.neutral,E("neutral"),{plainColor:S("palette-neutral-300"),plainHoverColor:S("palette-neutral-300")}),danger:R({},I.danger,E("danger")),success:R({},I.success,E("success")),warning:R({},I.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:S("palette-neutral-100"),secondary:S("palette-neutral-300"),tertiary:S("palette-neutral-400"),icon:S("palette-neutral-400")},background:{body:S("palette-common-black"),surface:S("palette-neutral-900"),popup:S("palette-common-black"),level1:S("palette-neutral-800"),level2:S("palette-neutral-700"),level3:S("palette-neutral-600"),tooltip:S("palette-neutral-600"),backdrop:`rgba(${x("palette-neutral-darkChannel",Tr(I.neutral[50]))} / 0.25)`},divider:`rgba(${x("palette-neutral-mainChannel",Tr(I.neutral[500]))} / 0.16)`,focusVisible:S("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},W='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',O=R({body:`"Inter", ${x(`fontFamily-fallback, ${W}`)}`,display:`"Inter", ${x(`fontFamily-fallback, ${W}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:W},w.fontFamily),T=R({sm:300,md:500,lg:600,xl:700},w.fontWeight),N=R({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},w.fontSize),H=R({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},w.lineHeight),j=(t=(n=w.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:k.shadowRing,$=(r=(i=w.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:k.shadowChannel,M=(o=(a=w.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:k.shadowOpacity,V={colorSchemes:{light:k,dark:F},fontSize:N,fontFamily:O,fontWeight:T,focus:{thickness:"2px",selector:`&.${ut("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${x("focus-thickness",(l=(c=w.focus)==null?void 0:c.thickness)!=null?l:"2px")})`,outline:`${x("focus-thickness",(u=(f=w.focus)==null?void 0:f.thickness)!=null?u:"2px")} solid ${x("palette-focusVisible",I.primary[500])}`}},lineHeight:H,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${x("shadowRing",j)}, 0px 1px 2px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`,sm:`${x("shadowRing",j)}, 0px 1px 2px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)}), 0px 2px 4px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`,md:`${x("shadowRing",j)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)}), 0px 6px 12px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`,lg:`${x("shadowRing",j)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)}), 0px 12px 16px -4px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`,xl:`${x("shadowRing",j)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)}), 0px 20px 24px -4px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:x(`fontFamily-display, ${O.display}`),fontWeight:x(`fontWeight-xl, ${T.xl}`),fontSize:x(`fontSize-xl4, ${N.xl4}`),lineHeight:x(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${k.palette.text.primary}`)},h2:{fontFamily:x(`fontFamily-display, ${O.display}`),fontWeight:x(`fontWeight-xl, ${T.xl}`),fontSize:x(`fontSize-xl3, ${N.xl3}`),lineHeight:x(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${k.palette.text.primary}`)},h3:{fontFamily:x(`fontFamily-display, ${O.display}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-xl2, ${N.xl2}`),lineHeight:x(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${k.palette.text.primary}`)},h4:{fontFamily:x(`fontFamily-display, ${O.display}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-xl, ${N.xl}`),lineHeight:x(`lineHeight-md, ${H.md}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${k.palette.text.primary}`)},"title-lg":{fontFamily:x(`fontFamily-body, ${O.body}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-lg, ${N.lg}`),lineHeight:x(`lineHeight-xs, ${H.xs}`),color:x(`palette-text-primary, ${k.palette.text.primary}`)},"title-md":{fontFamily:x(`fontFamily-body, ${O.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-md, ${N.md}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-primary, ${k.palette.text.primary}`)},"title-sm":{fontFamily:x(`fontFamily-body, ${O.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-sm, ${N.sm}`),lineHeight:x(`lineHeight-sm, ${H.sm}`),color:x(`palette-text-primary, ${k.palette.text.primary}`)},"body-lg":{fontFamily:x(`fontFamily-body, ${O.body}`),fontSize:x(`fontSize-lg, ${N.lg}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-md":{fontFamily:x(`fontFamily-body, ${O.body}`),fontSize:x(`fontSize-md, ${N.md}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-sm":{fontFamily:x(`fontFamily-body, ${O.body}`),fontSize:x(`fontSize-sm, ${N.sm}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-tertiary, ${k.palette.text.tertiary}`)},"body-xs":{fontFamily:x(`fontFamily-body, ${O.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-xs, ${N.xs}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-tertiary, ${k.palette.text.tertiary}`)}}},Y=w?jn(V,w):V,{colorSchemes:X}=Y,D=De(Y,B1),L=R({colorSchemes:X},D,{breakpoints:Ph(g!=null?g:{}),components:jn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:Z,theme:te})=>{var ne;const de=Z.instanceFontSize;return R({margin:"var(--Icon-margin)"},Z.fontSize&&Z.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${te.vars.fontSize[Z.fontSize]})`},!Z.htmlColor&&R({color:`var(--Icon-color, ${L.vars.palette.text.icon})`},Z.color&&Z.color!=="inherit"&&te.vars.palette[Z.color]&&{color:`rgba(${(ne=te.vars.palette[Z.color])==null?void 0:ne.mainChannel} / 1)`}),de&&de!=="inherit"&&{"--Icon-fontSize":te.vars.fontSize[de]})}}}},m),cssVarPrefix:p,getCssVar:x,spacing:Lh(v)});function U(Z,te){Object.keys(te).forEach(ne=>{const de={main:"500",light:"200",dark:"700"};Z==="dark"&&(de.main=400),!te[ne].mainChannel&&te[ne][de.main]&&(te[ne].mainChannel=Tr(te[ne][de.main])),!te[ne].lightChannel&&te[ne][de.light]&&(te[ne].lightChannel=Tr(te[ne][de.light])),!te[ne].darkChannel&&te[ne][de.dark]&&(te[ne].darkChannel=Tr(te[ne][de.dark]))})}Object.entries(L.colorSchemes).forEach(([Z,te])=>{U(Z,te.palette)});const G={prefix:p,shouldSkipGeneratingVar:C},{vars:oe,generateCssVars:ce}=D1(R({colorSchemes:X},D),G);L.vars=oe,L.generateCssVars=ce,L.unstable_sxConfig=R({},O1,void 0),L.unstable_sx=function(te){return $a({sx:te,theme:this})},L.getColorSchemeSelector=Z=>Z==="light"?"&":`&[data-joy-color-scheme="${Z}"], [data-joy-color-scheme="${Z}"] &`;const se={getCssVar:x,palette:L.colorSchemes.light.palette};return L.variants=jn({plain:Dt("plain",se),plainHover:Dt("plainHover",se),plainActive:Dt("plainActive",se),plainDisabled:Dt("plainDisabled",se),outlined:Dt("outlined",se),outlinedHover:Dt("outlinedHover",se),outlinedActive:Dt("outlinedActive",se),outlinedDisabled:Dt("outlinedDisabled",se),soft:Dt("soft",se),softHover:Dt("softHover",se),softActive:Dt("softActive",se),softDisabled:Dt("softDisabled",se),solid:Dt("solid",se),solidHover:Dt("solidHover",se),solidActive:Dt("solidActive",se),solidDisabled:Dt("solidDisabled",se)},b),L.palette=R({},L.colorSchemes.light.palette,{colorScheme:"light"}),L.shouldSkipGeneratingVar=C,L.applyStyles=Bh,L}const Uh=F1(),ye=S1({defaultTheme:Uh,themeId:_h});function gt({props:e,name:t}){return A1({props:e,name:t,defaultTheme:R({},Uh,{components:{}}),themeId:_h})}function N1(e){return ut("MuiAccordion",e)}const z1=Ke("MuiAccordion",["root","expanded","disabled"]),j1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],U1=["component","slots","slotProps"],V1=["component"];function Ee(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:l}=t,c=De(t,j1),{component:u,slots:f={[e]:void 0},slotProps:d={[e]:void 0}}=o,p=De(o,U1),g=f[e]||r,v=eI(d[e],i),m=rI(R({className:n},c,{externalForwardedProps:e==="root"?p:void 0,externalSlotProps:v})),{props:{component:b},internalRef:C}=m,w=De(m.props,V1),x=hn(C,v==null?void 0:v.ref,t.ref),I=a?a(w):{},S=R({},i,I),A=e==="root"?b||u:b,E=ZS(g,R({},e==="root"&&!u&&!f[e]&&l,e!=="root"&&!f[e]&&l,w,A&&{as:A},{ref:x}),S);return Object.keys(I).forEach(k=>{delete E[k]}),[g,E]}const hc=K.createContext({});function H1(e){return ut("MuiListItem",e)}const Vh=Ke("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),za=K.createContext(!1),pc=K.createContext(!1),Hh=K.createContext(!1),Wh=K.createContext(void 0),W1=K.createContext(void 0),Gh=K.createContext(void 0),G1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],Y1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${we(o)}`,i&&`variant${we(i)}`],startAction:["startAction"],endAction:["endAction"]};return pt(a,H1,{})},gc=ye("li")(({theme:e,ownerState:t})=>{var n;return[!t.nested&&{"--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItemButton-marginBlock":"calc(-1 * var(--ListItem-paddingY))",alignItems:"center",gap:"var(--ListItem-gap)",marginInline:"var(--ListItem-marginInline)"},t.nested&&{"--NestedList-marginRight":"calc(-1 * var(--ListItem-paddingRight))","--NestedList-marginLeft":"calc(-1 * var(--ListItem-paddingLeft))","--NestedListItem-paddingLeft":"calc(var(--ListItem-paddingLeft) + var(--List-nestedInsetStart))","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItem-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",flexDirection:"column"},R({"--unstable_actionRadius":"calc(var(--ListItem-radius) - var(--variant-borderWidth, 0px))"},t.startAction&&{"--unstable_startActionWidth":"2rem"},t.endAction&&{"--unstable_endActionWidth":"2.5rem"},{boxSizing:"border-box",borderRadius:"var(--ListItem-radius)",display:"var(--_ListItem-display)","&:not([hidden])":{"--_ListItem-display":"var(--_List-markerDisplay, flex)"},flex:"none",listStyleType:"var(--_List-markerType, disc)",position:"relative",paddingBlockStart:t.nested?0:"var(--ListItem-paddingY)",paddingBlockEnd:t.nested?0:"var(--ListItem-paddingY)",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)"},t["data-first-child"]===void 0&&R({},t.row?{marginInlineStart:"var(--List-gap)"}:{marginBlockStart:"var(--List-gap)"}),t.row&&t.wrap&&{marginInlineStart:"var(--List-gap)",marginBlockStart:"var(--List-gap)"},{minBlockSize:"var(--ListItem-minHeight)"},t.sticky&&{position:"sticky",top:"var(--ListItem-stickyTop, 0px)",zIndex:1,background:`var(--ListItem-stickyBackground, ${e.vars.palette.background.body})`},{[`.${Vh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),K1=ye(gc,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),q1=ye("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",left:0,transform:"translate(var(--ListItem-startActionTranslateX), -50%)",zIndex:1})),Q1=ye("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",right:0,transform:"translate(var(--ListItem-endActionTranslateX), -50%)"})),Yh=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyListItem"}),i=K.useContext(Gh),o=K.useContext(Wh),a=K.useContext(pc),l=K.useContext(Hh),c=K.useContext(za),{component:u,className:f,children:d,nested:p=!1,sticky:g=!1,variant:v="plain",color:m="neutral",startAction:b,endAction:C,role:w,slots:x={},slotProps:I={}}=r,S=De(r,G1),[A,E]=K.useState(""),[k,F]=(o==null?void 0:o.split(":"))||["",""],W=u||(k&&!k.match(/^(ul|ol|menu)$/)?"div":void 0);let O=i==="menu"?"none":void 0;o&&(O={menu:"none",menubar:"none",group:"presentation"}[F]),w&&(O=w);const T=R({},r,{sticky:g,startAction:b,endAction:C,row:a,wrap:l,variant:v,color:m,nesting:c,nested:p,component:W,role:O}),N=Y1(T),H=R({},S,{component:W,slots:x,slotProps:I}),[j,$]=Ee("root",{additionalProps:{role:O},ref:n,className:zn(N.root,f),elementType:K1,externalForwardedProps:H,ownerState:T}),[M,V]=Ee("startAction",{className:N.startAction,elementType:q1,externalForwardedProps:H,ownerState:T}),[Y,X]=Ee("endAction",{className:N.endAction,elementType:Q1,externalForwardedProps:H,ownerState:T});return s.jsx(W1.Provider,{value:E,children:s.jsx(za.Provider,{value:p?A||!0:!1,children:s.jsxs(j,R({},$,{children:[b&&s.jsx(M,R({},V,{children:b})),K.Children.map(d,(D,L)=>{var U;return K.isValidElement(D)?K.cloneElement(D,R({},L===0&&{"data-first-child":""},oh(D,["ListItem"])&&{component:((U=D.props)==null?void 0:U.component)||"div"})):D}),C&&s.jsx(Y,R({},X,{children:C}))]}))})})});Yh.muiName="ListItem";const Kh=Yh;function J1(e){return ut("MuiAccordionDetails",e)}const kr=Ke("MuiAccordionDetails",["root","content","expanded"]),X1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],Z1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${we(n)}`,t&&`variant${we(t)}`]};return pt(o,N1,{})},eT=ye(gc,{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"},[`& .${kr.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),tT=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:l,defaultExpanded:c=!1,disabled:u=!1,expanded:f,onChange:d,variant:p="plain",slots:g={},slotProps:v={}}=r,m=De(r,X1),b=ro(i),[C,w]=Yl({controlled:f,default:c,name:"Accordion",state:"expanded"}),x=K.useCallback(W=>{w(!C),d&&d(W,!C)},[C,d,w]),I=K.useMemo(()=>({accordionId:b,expanded:C,disabled:u,toggle:x}),[b,C,u,x]),S=R({},m,{component:o,slots:g,slotProps:v}),A=R({},r,{component:o,color:a,variant:p,expanded:C,disabled:u,nested:!0}),E=Z1(A),[k,F]=Ee("root",{ref:n,className:E.root,elementType:eT,externalForwardedProps:S,ownerState:A});return s.jsx(hc.Provider,{value:I,children:s.jsx(k,R({},F,{children:K.Children.map(l,(W,O)=>K.isValidElement(W)&&O===0?K.cloneElement(W,{"data-first-child":""}):W)}))})});function nT(e){return ut("MuiAccordionGroup",e)}Ke("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const rT={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function mc(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=s.jsx(pc.Provider,{value:r,children:s.jsx(Hh.Provider,{value:i,children:K.Children.map(t,(a,l)=>K.isValidElement(a)?K.cloneElement(a,R({},l===0&&{"data-first-child":""},l===K.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:s.jsx(za.Provider,{value:n,children:o})}const vc=({theme:e,ownerState:t},n)=>{let r={};function i(o){if(typeof o=="function"){const a=o(e);i(a)}else Array.isArray(o)?o.forEach(a=>{typeof a!="boolean"&&i(a)}):typeof o=="object"&&(r=R({},r,o))}return t.sx&&(i(t.sx),n.forEach(o=>{const a=r[o];if(typeof a=="string"||typeof a=="number")if(o==="borderRadius")if(typeof a=="number")r[o]=`${a}px`;else{var 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 iT(e){return ut("MuiList",e)}Ke("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const oT=K.createContext(void 0),aT=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],sT=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,l={root:["root",o,t&&`variant${we(t)}`,n&&`color${we(n)}`,!a&&!i&&r&&`size${we(r)}`,a&&`size${we(a)}`,i&&"nesting"]};return pt(l,iT,{})},bc=ye("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=vc({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&&R({},a(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0},t.marker&&{paddingInlineStart:"calc(3ch - var(--_List-markerDeduct, 0px))"},{marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&R({},a(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)"},t.marker&&{"--_List-markerDeduct":"1ch"},{"--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],t.orientation==="horizontal"?R({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"},t.marker&&{paddingInlineStart:"3ch"}),R({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:t.orientation==="horizontal"?"row":"column"},t.wrap&&{flexWrap:"wrap"},t.marker&&{"--_List-markerDisplay":"list-item","--_List-markerType":t.marker,lineHeight:"calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"},{flexGrow:1,position:"relative"},(n=e.variants[t.variant])==null?void 0:n[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},o!==void 0&&{"--List-radius":o},r!==void 0&&{"--List-padding":r},i!==void 0&&{"--List-padding":i})]}),lT=ye(bc,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),cT=K.forwardRef(function(t,n){var r;const i=K.useContext(za),o=K.useContext(Gh),a=K.useContext(oT),l=gt({props:t,name:"JoyList"}),{component:c,className:u,children:f,size:d,orientation:p="vertical",wrap:g=!1,variant:v="plain",color:m="neutral",role:b,slots:C={},slotProps:w={}}=l,x=De(l,aT),I=d||((r=t.size)!=null?r:"md");let S;o&&(S="group"),a&&(S="presentation"),b&&(S=b);const A=R({},l,{instanceSize:t.size,size:I,nesting:i,orientation:p,wrap:g,variant:v,color:m,role:S}),E=sT(A),k=R({},x,{component:c,slots:C,slotProps:w}),[F,W]=Ee("root",{ref:n,className:zn(E.root,u),elementType:lT,externalForwardedProps:k,ownerState:A,additionalProps:{as:c,role:S,"aria-labelledby":typeof i=="string"?i:void 0}});return s.jsx(F,R({},W,{children:s.jsx(Wh.Provider,{value:`${typeof c=="string"?c:""}:${S||""}`,children:s.jsx(mc,{row:p==="horizontal",wrap:g,children:f})})}))}),uT=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],dT=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${we(t)}`,n&&`color${we(n)}`,r&&`size${we(r)}`]};return pt(i,nT,{})},fT=ye(bc,{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}`,[`& .${kr.root}.${kr.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),R({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${z1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),hT=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:l=!1,variant:c="plain",transition:u="0.2s ease",size:f="md",slots:d={},slotProps:p={}}=r,g=De(r,uT),v=R({},g,{component:i,slots:d,slotProps:p}),m=R({},r,{component:i,color:o,disableDivider:l,variant:c,transition:u,size:f}),b=dT(m),[C,w]=Ee("root",{ref:n,className:b.root,elementType:fT,externalForwardedProps:v,ownerState:m});return s.jsx(C,R({},w,{children:s.jsx(mc,{children:a})}))}),pT=["component","children","color","variant","slots","slotProps"],gT=e=>{const{expanded:t}=e;return pt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},J1,{})},mT=ye("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return R({overflow:"hidden",borderRadius:"var(--AccordionDetails-radius)",display:"grid",gridTemplateRows:"1fr",marginInline:"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",transition:"var(--AccordionDetails-transition)"},(n=t.variants[e.variant])==null?void 0:n[e.color],{[`&:not(.${kr.expanded})`]:{gridTemplateRows:"0fr"}})}),vT=ye("div",{name:"JoyAccordionDetails",slot:"Content",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",overflow:"hidden",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)",paddingBlockStart:"calc(var(--ListItem-paddingY) / 2)",paddingBlockEnd:"calc(2.5 * var(--ListItem-paddingY))",transition:"var(--AccordionDetails-transition)",[`&:not(.${kr.expanded})`]:{paddingBlock:0}}),bT=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:l="plain",slots:c={},slotProps:u={}}=r,f=De(r,pT),{accordionId:d,expanded:p=!1}=K.useContext(hc),g=K.useRef(null),v=hn(g,n);K.useEffect(()=>{g.current&&g.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(p){const k=E.getAttribute("data-prev-tabindex"),F=E.getAttribute("tabindex");F&&k&&(E.setAttribute("tabindex",k),E.removeAttribute("data-prev-tabindex")),!k&&!F&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[p]);const m=R({},f,{component:i,slots:c,slotProps:u}),b=R({},r,{component:i,color:a,variant:l,expanded:p,nesting:!0}),C=gT(b),[w,x]=Ee("root",{ref:v,className:C.root,elementType:mT,externalForwardedProps:m,additionalProps:{id:`${d}-details`,"aria-labelledby":`${d}-summary`,role:"region",hidden:p?void 0:!0},ownerState:b}),[I,S]=Ee("content",{className:C.content,elementType:vT,externalForwardedProps:m,ownerState:b});return s.jsx(w,R({},x,{children:s.jsx(I,R({},S,{children:o}))}))});function yT(e){return ut("MuiAccordionSummary",e)}const ja=Ke("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),Ua=Ke("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),xT=K.createContext("horizontal"),yc=ye("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;return R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch",gap:"var(--ListItem-gap)"},t.orientation==="vertical"&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},t["data-first-child"]===void 0&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:R({},e.focus.default,{zIndex:1})},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:active":(r=e.variants[`${t.variant}Active`])==null?void 0:r[t.color],[`.${Vh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${Ua.selected}`]:R({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${Ua.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]},[`&.${Ua.disabled}`]:R({},(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color])})});ye(yc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>R({},!e.row&&{[`&.${Ua.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function CT(e){return ut("MuiSvgIcon",e)}Ke("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const wT=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],ST=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${we(t)}`,n&&`size${we(n)}`,r&&`fontSize${we(r)}`]};return pt(i,CT,{})},qh={sm:"xl",md:"xl2",lg:"xl3"},IT=ye("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return R({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[qh[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[qh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&R({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&e.vars.palette[t.color]&&{color:`rgba(${(n=e.vars.palette[t.color])==null?void 0:n.mainChannel} / 1)`}))}),Qh=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:l="svg",fontSize:c,htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:p="0 0 24 24",size:g="md",slots:v={},slotProps:m={}}=r,b=De(r,wT),C=K.isValidElement(i)&&i.type==="svg",w=R({},r,{color:a,component:l,size:g,instanceSize:t.size,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:C}),x=ST(w),I=R({},b,{component:l,slots:v,slotProps:m}),[S,A]=Ee("root",{ref:n,className:zn(x.root,o),elementType:IT,externalForwardedProps:I,ownerState:w,additionalProps:R({color:u,focusable:!1},d&&{role:"img"},!d&&{"aria-hidden":!0},!f&&{viewBox:p},C&&i.props)});return s.jsxs(S,R({},A,{children:[C?i.props.children:i,d?s.jsx("title",{children:d}):null]}))});function xc(e,t){function n(r,i){return s.jsx(Qh,R({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Qh.muiName,K.memo(K.forwardRef(n))}const AT=xc(s.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Jh;const TT=["component","color","children","indicator","variant","slots","slotProps"],ET=e=>{const{disabled:t,expanded:n}=e;return pt({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},yT,{})},kT=ye(gc,{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)",[`&.${ja.expanded}`]:{"--Icon-color":"currentColor"}})),_T=ye(yc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${ja.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),PT=ye("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${ja.expanded}`]:{transform:"rotate(180deg)"}}),DT=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:l=Jh||(Jh=s.jsx(AT,{})),variant:c="plain",slots:u={},slotProps:f={}}=r,d=De(r,TT),{accordionId:p,disabled:g=!1,expanded:v=!1,toggle:m}=K.useContext(hc),b=R({},d,{component:i,slots:u,slotProps:f}),C=R({},r,{component:i,color:o,disabled:g,expanded:v,variant:c}),w=W=>{if(m&&m(W),typeof f.button=="function"){var O,T;(O=f.button(C))==null||(T=O.onClick)==null||T.call(O,W)}else{var N,H;(N=f.button)==null||(H=N.onClick)==null||H.call(N,W)}},x=ET(C),[I,S]=Ee("root",{ref:n,className:x.root,elementType:kT,externalForwardedProps:b,ownerState:C}),[A,E]=Ee("button",{ref:n,className:x.button,elementType:_T,externalForwardedProps:b,additionalProps:{component:"button",id:`${p}-summary`,"aria-expanded":v?"true":"false","aria-controls":`${p}-details`,disabled:g,type:"button",onClick:w},ownerState:C}),[k,F]=Ee("indicator",{ref:n,className:x.indicator,elementType:PT,externalForwardedProps:b,ownerState:C});return s.jsx(I,R({},S,{children:s.jsxs(A,R({},E,{children:[a,l&&s.jsx(k,R({},F,{children:l}))]}))}))}),OT=({label:e,disabled:t,children:n})=>(t=t||!1,s.jsx(hT,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${ja.button}:hover`]:{backgroundColor:"#fff"},[`& .${kr.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${kr.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:s.jsxs(tT,{disabled:t,children:[s.jsx(DT,{children:e}),s.jsx(bT,{variant:"soft",children:n})]})})),Cc={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"]]},wc=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const l=(c,u,f,d)=>{f!=="api"&&(d.getText().trim()===""?a(""):a(c))};return t==="description"?s.jsxs(h.FormControl,{sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{color:"primary",children:e}),s.jsx(Di,{value:n||r,defaultValue:r,onChange:l,modules:Cc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{color:"primary",children:e}),s.jsx(Di,{value:n||r,defaultValue:r,onChange:l,modules:Cc,placeholder:i,className:"ql-container ql-toolbar"}),s.jsx(h.FormHelperText,{children:o})]}):s.jsx(h.Box,{sx:()=>({marginBottom:"16px"}),children:s.jsx(Di,{value:n||r,defaultValue:r,onChange:l,modules:Cc,placeholder:i})})},RT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return s.jsxs(h.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[s.jsxs(h.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[s.jsx(h.Tab,{children:e.labels.richText}),s.jsx(h.Tab,{children:e.labels.plainText})]}),s.jsx(h.TabPanel,{value:0,sx:{px:0},children:s.jsx(wc,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),s.jsx(h.TabPanel,{value:1,sx:{px:0},children:s.jsx(h.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},MT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,l)=>{i(l||"")};return s.jsxs(h.FormControl,{sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{color:"primary",children:e}),s.jsx(h.Select,{defaultValue:t,onChange:o,children:n.map((a,l)=>s.jsx(h.Option,{value:a,children:a},`basic-select-${a}-${l}`))}),r?s.jsx(h.FormHelperText,{children:r}):s.jsx(s.Fragment,{})]})},Sc=K.createContext("md");function LT(e){return ut("MuiTabs",e)}Ke("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const BT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],$T=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${we(n)}`,r&&`color${we(r)}`,i&&`size${we(i)}`]};return pt(o,LT,{})},FT=ye("div",{name:"JoyTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r;const i=(n=t.variants[e.variant])==null?void 0:n[e.color],{bgcolor:o,backgroundColor:a,background:l,p:c,padding:u}=vc({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),f=ar(t,`palette.${o}`)||o||ar(t,`palette.${a}`)||a||l||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return R({},e.size==="sm"&&{"--Tabs-spacing":"0.75rem"},e.size==="md"&&{"--Tabs-spacing":"1rem"},e.size==="lg"&&{"--Tabs-spacing":"1.25rem"},{"--Tab-indicatorThickness":"2px","--Icon-color":e.color!=="neutral"||e.variant==="solid"?"currentColor":t.vars.palette.text.icon,"--TabList-stickyBackground":f==="transparent"?"initial":f,display:"flex",flexDirection:"column"},e.orientation==="vertical"&&{flexDirection:"row"},{backgroundColor:t.vars.palette.background.surface,position:"relative"},t.typography[`body-${e.size}`],(r=t.variants[e.variant])==null?void 0:r[e.color],c!==void 0&&{"--Tabs-padding":c},u!==void 0&&{"--Tabs-padding":u})}),Xh=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:l="horizontal",direction:c="ltr",component:u,variant:f="plain",color:d="neutral",size:p="md",slots:g={},slotProps:v={}}=r,m=De(r,BT),b=a||(o===void 0?0:void 0),{contextValue:C}=oA(R({},r,{orientation:l,defaultValue:b})),w=R({},r,{orientation:l,direction:c,variant:f,color:d,size:p}),x=$T(w),I=R({},m,{component:u,slots:g,slotProps:v}),[S,A]=Ee("root",{ref:n,elementType:FT,externalForwardedProps:I,additionalProps:{ref:n,as:u},ownerState:w,className:x.root});return s.jsx(S,R({},A,{children:s.jsx(aA,{value:C,children:s.jsx(Sc.Provider,{value:p,children:i})})}))});function NT(e){return ut("MuiTabList",e)}Ke("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function zT(e){return ut("MuiTab",e)}const Ic=Ke("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),jT=["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${we(r)}`,i&&`color${we(i)}`,n&&`size${we(n)}`]};return pt(o,NT,{})},VT=ye(bc,{name:"JoyTabList",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;const r=(n=e.variants[t.variant])==null?void 0:n[t.color];return R({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},rT,{flexGrow:"initial",flexDirection:t.orientation==="vertical"?"column":"row",borderRadius:"var(--List-radius, 0px)",padding:"var(--List-padding, 0px)",zIndex:1},t.sticky&&{position:"sticky",top:t.sticky==="top"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",bottom:t.sticky==="bottom"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",backgroundColor:(r==null?void 0:r.backgroundColor)||`var(--TabList-stickyBackground, ${e.vars.palette.background.body})`},!t.disableUnderline&&R({},t.underlinePlacement==="bottom"&&{"--unstable_TabList-underlineBottom":"1px",paddingBottom:1,boxShadow:`inset 0 -1px ${e.vars.palette.divider}`},t.underlinePlacement==="top"&&{"--unstable_TabList-underlineTop":"1px",paddingTop:1,boxShadow:`inset 0 1px ${e.vars.palette.divider}`},t.underlinePlacement==="right"&&{"--unstable_TabList-underlineRight":"1px",paddingRight:1,boxShadow:`inset -1px 0 ${e.vars.palette.divider}`},t.underlinePlacement==="left"&&{"--unstable_TabList-underlineLeft":"1px",paddingLeft:1,boxShadow:`inset 1px 0 ${e.vars.palette.divider}`}),t.tabFlex&&{[`& .${Ic.root}`]:{flex:t.tabFlex}})}),Zh=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyTabList"}),i=K.useContext(Sc),{isRtl:o,orientation:a,getRootProps:l,contextValue:c}=uA({rootRef:n}),{component:u="div",children:f,variant:d="plain",color:p="neutral",size:g,disableUnderline:v=!1,underlinePlacement:m=a==="horizontal"?"bottom":"right",tabFlex:b,sticky:C,slots:w={},slotProps:x={}}=r,I=De(r,jT),S=g!=null?g:i,A=R({},r,{isRtl:o,orientation:a,variant:d,color:p,size:S,sticky:C,tabFlex:b,nesting:!1,disableUnderline:v,underlinePlacement:m}),E=UT(A),k=R({},I,{component:u,slots:w,slotProps:x}),[F,W]=Ee("root",{ref:n,elementType:VT,getSlotProps:l,externalForwardedProps:k,ownerState:A,className:E.root});return s.jsx(F,R({},W,{children:s.jsx(dA,{value:c,children:s.jsx(mc,{row:a==="horizontal",nested:!0,children:f})})}))}),HT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],WT=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${we(i)}`,o&&`color${we(o)}`]};return pt(l,zT,{})},GT=ye(yc,{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))"}}]),ei=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyTab"}),i=K.useContext(pc),{action:o,children:a,disabled:l=!1,component:c="button",orientation:u="horizontal",variant:f="plain",color:d="neutral",disableIndicator:p=!1,indicatorPlacement:g=i?"bottom":"right",indicatorInset:v=!1,slots:m={},slotProps:b={}}=r,C=De(r,HT),w=K.useRef(null),x=hn(w,n),{active:I,focusVisible:S,setFocusVisible:A,selected:E,getRootProps:k}=hA(R({},r,{rootRef:x}));K.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),w.current.focus()}}),[A]);const F=R({},r,{disableIndicator:p,indicatorPlacement:g,indicatorInset:v,orientation:u,row:i,active:I,focusVisible:S,disabled:l,selected:E,variant:f,color:d}),W=WT(F),O=R({},C,{component:c,slots:m,slotProps:b}),[T,N]=Ee("root",{ref:n,elementType:GT,getSlotProps:k,externalForwardedProps:O,ownerState:F,className:W.root});return s.jsx(xT.Provider,{value:u,children:s.jsx(T,R({},N,{children:a}))})});function Hn(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 ep(e){if(K.isValidElement(e)||ih.isValidElementType(e)||!Hn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ep(e[n])}),t}function Qt(e,t,n={clone:!0}){const r=n.clone?B({},e):e;return Hn(e)&&Hn(t)&&Object.keys(t).forEach(i=>{K.isValidElement(t[i])||ih.isValidElementType(t[i])?r[i]=t[i]:Hn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Hn(e[i])?r[i]=Qt(e[i],t[i],n):n.clone?r[i]=Hn(t[i])?ep(t[i]):t[i]:r[i]=t[i]}),r}function _r(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 ti(e){if(typeof e!="string")throw new Error(_r(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ac(e,t){const n=B({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=B(B({},e[i]),n[i]);else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)n[i]=o||{};else if(!o)n[i]=a;else{n[i]=B({},a);for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const c=l;n[i][c]=Ac(o[c],a[c])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function YT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",l=!0;for(let c=0;c<o.length;c+=1){const u=o[c];u&&(a+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(a+=" "+n[u]))}r[i]=a}return r}const tp=e=>e,KT=(()=>{let e=tp;return{configure(t){e=t},generate(t){return e(t)},reset(){e=tp}}})(),qT={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 np(e,t,n="Mui"){const r=qT[t];return r?`${n}-${r}`:`${KT.generate(e)}-${t}`}function QT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=np(e,i,n)}),r}function JT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function lo(e,t){return t?Qt(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},B({},t)):t}function ZT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function eE(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 tE(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 c=t(e.breakpoints.not(...l),a);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},i=o=>(n(r,o),r);return n(i),Q(B({},e),{containerQueries:i})}const Va={xs:0,sm:600,md:900,lg:1200,xl:1536},rp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Va[e]}px)`},nE={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Va[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Wn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||rp;return t.reduce((a,l,c)=>(a[o.up(o.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const o=r.breakpoints||rp;return Object.keys(t).reduce((a,l)=>{if(ZT(o.keys,l)){const c=eE(r.containerQueries?r:nE,l);c&&(a[c]=n(t[l],l))}else if(Object.keys(o.values||Va).includes(l)){const c=o.up(l);a[c]=n(t[l],l)}else{const c=l;a[c]=t[c]}return a},{})}return n(t)}function rE(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function iE(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Ha(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 Wa(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Ha(e,n)||r,t&&(i=t(i,r,e)),i}function dt(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],c=a.theme,u=Ha(c,r)||{};return Wn(a,l,d=>{let p=Wa(u,i,d);return d===p&&typeof d=="string"&&(p=Wa(u,i,`${t}${d==="default"?"":ti(d)}`,d)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function oE(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const aE={m:"margin",p:"padding"},sE={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ip={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},lE=oE(e=>{if(e.length>2)if(ip[e])e=ip[e];else return[e];const[t,n]=e.split(""),r=aE[t],i=sE[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Tc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ec=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Tc,...Ec];function co(e,t,n,r){var o;const i=(o=Ha(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),c=i[l];return a>=0?c:typeof c=="number"?-c:`-${c}`}:typeof i=="function"?i:()=>{}}function kc(e){return co(e,"spacing",8)}function uo(e,t){return typeof t=="string"||t==null?t:e(t)}function cE(e,t){return n=>e.reduce((r,i)=>(r[i]=uo(t,n),r),{})}function uE(e,t,n,r){if(!t.includes(n))return null;const i=lE(n),o=cE(i,r),a=e[n];return Wn(e,a,o)}function op(e,t){const n=kc(e.theme);return Object.keys(e).map(r=>uE(e,t,r,n)).reduce(lo,{})}function it(e){return op(e,Tc)}it.propTypes={},it.filterProps=Tc;function ot(e){return op(e,Ec)}ot.propTypes={},ot.filterProps=Ec;function Ga(...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]?lo(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function sn(e){return typeof e!="number"?e:`${e}px solid`}function ln(e,t){return dt({prop:e,themeKey:"borders",transform:t})}const dE=ln("border",sn),fE=ln("borderTop",sn),hE=ln("borderRight",sn),pE=ln("borderBottom",sn),gE=ln("borderLeft",sn),mE=ln("borderColor"),vE=ln("borderTopColor"),bE=ln("borderRightColor"),yE=ln("borderBottomColor"),xE=ln("borderLeftColor"),CE=ln("outline",sn),wE=ln("outlineColor"),Ya=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=co(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:uo(t,r)});return Wn(e,e.borderRadius,n)}return null};Ya.propTypes={},Ya.filterProps=["borderRadius"],Ga(dE,fE,hE,pE,gE,mE,vE,bE,yE,xE,Ya,CE,wE);const Ka=e=>{if(e.gap!==void 0&&e.gap!==null){const t=co(e.theme,"spacing",8),n=r=>({gap:uo(t,r)});return Wn(e,e.gap,n)}return null};Ka.propTypes={},Ka.filterProps=["gap"];const qa=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=co(e.theme,"spacing",8),n=r=>({columnGap:uo(t,r)});return Wn(e,e.columnGap,n)}return null};qa.propTypes={},qa.filterProps=["columnGap"];const Qa=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=co(e.theme,"spacing",8),n=r=>({rowGap:uo(t,r)});return Wn(e,e.rowGap,n)}return null};Qa.propTypes={},Qa.filterProps=["rowGap"];const SE=dt({prop:"gridColumn"}),IE=dt({prop:"gridRow"}),AE=dt({prop:"gridAutoFlow"}),TE=dt({prop:"gridAutoColumns"}),EE=dt({prop:"gridAutoRows"}),kE=dt({prop:"gridTemplateColumns"}),_E=dt({prop:"gridTemplateRows"}),PE=dt({prop:"gridTemplateAreas"}),DE=dt({prop:"gridArea"});Ga(Ka,qa,Qa,SE,IE,AE,TE,EE,kE,_E,PE,DE);function ni(e,t){return t==="grey"?t:e}const OE=dt({prop:"color",themeKey:"palette",transform:ni}),RE=dt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ni}),ME=dt({prop:"backgroundColor",themeKey:"palette",transform:ni});Ga(OE,RE,ME);function Jt(e){return e<=1&&e!==0?`${e*100}%`:e}const LE=dt({prop:"width",transform:Jt}),_c=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,l,c;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||Va[n];return r?((c=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Jt(n)}};return Wn(e,e.maxWidth,t)}return null};_c.filterProps=["maxWidth"];const BE=dt({prop:"minWidth",transform:Jt}),$E=dt({prop:"height",transform:Jt}),FE=dt({prop:"maxHeight",transform:Jt}),NE=dt({prop:"minHeight",transform:Jt});dt({prop:"size",cssProperty:"width",transform:Jt}),dt({prop:"size",cssProperty:"height",transform:Jt});const zE=dt({prop:"boxSizing"});Ga(LE,_c,BE,$E,FE,NE,zE);const Ja={border:{themeKey:"borders",transform:sn},borderTop:{themeKey:"borders",transform:sn},borderRight:{themeKey:"borders",transform:sn},borderBottom:{themeKey:"borders",transform:sn},borderLeft:{themeKey:"borders",transform:sn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:sn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ya},color:{themeKey:"palette",transform:ni},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ni},backgroundColor:{themeKey:"palette",transform:ni},p:{style:ot},pt:{style:ot},pr:{style:ot},pb:{style:ot},pl:{style:ot},px:{style:ot},py:{style:ot},padding:{style:ot},paddingTop:{style:ot},paddingRight:{style:ot},paddingBottom:{style:ot},paddingLeft:{style:ot},paddingX:{style:ot},paddingY:{style:ot},paddingInline:{style:ot},paddingInlineStart:{style:ot},paddingInlineEnd:{style:ot},paddingBlock:{style:ot},paddingBlockStart:{style:ot},paddingBlockEnd:{style:ot},m:{style:it},mt:{style:it},mr:{style:it},mb:{style:it},ml:{style:it},mx:{style:it},my:{style:it},margin:{style:it},marginTop:{style:it},marginRight:{style:it},marginBottom:{style:it},marginLeft:{style:it},marginX:{style:it},marginY:{style:it},marginInline:{style:it},marginInlineStart:{style:it},marginInlineEnd:{style:it},marginBlock:{style:it},marginBlockStart:{style:it},marginBlockEnd:{style:it},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:Ka},rowGap:{style:Qa},columnGap:{style:qa},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Jt},maxWidth:{style:_c},minWidth:{transform:Jt},height:{transform:Jt},maxHeight:{transform:Jt},minHeight:{transform:Jt},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 jE(...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 VE(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const p=Ha(i,u)||{};return d?d(a):Wn(a,r,v=>{let m=Wa(p,f,v);return v===m&&typeof v=="string"&&(m=Wa(p,f,`${n}${v==="default"?"":ti(v)}`,v)),c===!1?m:{[c]:m}})}function t(n){var l;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(l=i.unstable_sxConfig)!=null?l:Ja;function a(c){let u=c;if(typeof c=="function")u=c(i);else if(typeof c!="object")return c;if(!u)return null;const f=rE(i.breakpoints),d=Object.keys(f);let p=f;return Object.keys(u).forEach(g=>{const v=UE(u[g],i);if(v!=null)if(typeof v=="object")if(o[g])p=lo(p,e(g,v,i,o));else{const m=Wn({theme:i},v,b=>({[g]:b}));jE(m,v)?p[g]=t({sx:v,theme:i}):p=lo(p,m)}else p=lo(p,e(g,v,i,o))}),XT(i,iE(d,p))}return Array.isArray(r)?r.map(a):a(r)}return t}const ri=VE();ri.filterProps=["sx"];function HE(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 WE={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},GE=!1,YE=/[A-Z]|^ms/g,KE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ap=function(t){return t.charCodeAt(1)===45},sp=function(t){return t!=null&&typeof t!="boolean"},Pc=pA(function(e){return ap(e)?e:e.replace(YE,"-$&").toLowerCase()}),lp=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(KE,function(r,i,o){return sr={name:i,styles:o,next:sr},i})}return WE[t]!==1&&!ap(t)&&typeof n=="number"&&n!==0?n+"px":n},qE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Xa(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 sr={name:i.name,styles:i.styles,next:sr},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)sr={name:a.name,styles:a.styles,next:sr},a=a.next;var l=o.styles+";";return l}return QE(e,t,n)}}var c=n;return c}function QE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Xa(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var l=a;sp(l)&&(r+=Pc(o)+":"+lp(o,l)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&GE)throw new Error(qE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)sp(a[c])&&(r+=Pc(o)+":"+lp(o,a[c])+";");else{var u=Xa(e,t,a);switch(o){case"animation":case"animationName":{r+=Pc(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var cp=/label:\s*([^\s;{]+)\s*(;|$)/g,sr;function JE(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="";sr=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Xa(n,t,o);else{var a=o;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=Xa(n,t,e[l]),r){var c=o;i+=c[l]}cp.lastIndex=0;for(var u="",f;(f=cp.exec(i))!==null;)u+="-"+f[1];var d=HE(i)+u;return{name:d,styles:i,next:sr}}/**
|
|
2333
|
+
*/var Wl=Symbol.for("react.transitional.element"),Gl=Symbol.for("react.portal"),pa=Symbol.for("react.fragment"),ga=Symbol.for("react.strict_mode"),ma=Symbol.for("react.profiler"),va=Symbol.for("react.consumer"),ba=Symbol.for("react.context"),ya=Symbol.for("react.forward_ref"),xa=Symbol.for("react.suspense"),Ca=Symbol.for("react.suspense_list"),wa=Symbol.for("react.memo"),Sa=Symbol.for("react.lazy"),iI=Symbol.for("react.offscreen"),oI=Symbol.for("react.client.reference");function rn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Wl:switch(e=e.type,e){case pa:case ma:case ga:case xa:case Ca:return e;default:switch(e=e&&e.$$typeof,e){case ba:case ya:case Sa:case wa:return e;case va:return e;default:return t}}case Gl:return t}}}je.ContextConsumer=va,je.ContextProvider=ba,je.Element=Wl,je.ForwardRef=ya,je.Fragment=pa,je.Lazy=Sa,je.Memo=wa,je.Portal=Gl,je.Profiler=ma,je.StrictMode=ga,je.Suspense=xa,je.SuspenseList=Ca,je.isContextConsumer=function(e){return rn(e)===va},je.isContextProvider=function(e){return rn(e)===ba},je.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wl},je.isForwardRef=function(e){return rn(e)===ya},je.isFragment=function(e){return rn(e)===pa},je.isLazy=function(e){return rn(e)===Sa},je.isMemo=function(e){return rn(e)===wa},je.isPortal=function(e){return rn(e)===Gl},je.isProfiler=function(e){return rn(e)===ma},je.isStrictMode=function(e){return rn(e)===ga},je.isSuspense=function(e){return rn(e)===xa},je.isSuspenseList=function(e){return rn(e)===Ca},je.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===pa||e===ma||e===ga||e===xa||e===Ca||e===iI||typeof e=="object"&&e!==null&&(e.$$typeof===Sa||e.$$typeof===wa||e.$$typeof===ba||e.$$typeof===va||e.$$typeof===ya||e.$$typeof===oI||e.getModuleId!==void 0)},je.typeOf=rn,rh.exports=je;var ih=rh.exports;function we(e){if(typeof e!="string")throw new Error(ha(7));return e.charAt(0).toUpperCase()+e.slice(1)}function oh(e,t){var n,r;return K.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const aI=typeof window!="undefined"?K.useLayoutEffect:K.useEffect;let ah=0;function sI(e){const[t,n]=K.useState(e),r=e||t;return K.useEffect(()=>{t==null&&(ah+=1,n(`mui-${ah}`))},[t]),r}const sh=K.useId;function ro(e){if(sh!==void 0){const t=sh();return e!=null?e:t}return sI(e)}function Yl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=K.useRef(e!==void 0),[o,a]=K.useState(t),l=i?e:o,c=K.useCallback(u=>{i||a(u)},[]);return[l,c]}class Kl{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Kl}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let Ia=!0,ql=!1;const lI=new Kl,cI={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 uI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&cI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function dI(e){e.metaKey||e.altKey||e.ctrlKey||(Ia=!0)}function Ql(){Ia=!1}function fI(){this.visibilityState==="hidden"&&ql&&(Ia=!0)}function hI(e){e.addEventListener("keydown",dI,!0),e.addEventListener("mousedown",Ql,!0),e.addEventListener("pointerdown",Ql,!0),e.addEventListener("touchstart",Ql,!0),e.addEventListener("visibilitychange",fI,!0)}function pI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return Ia||uI(t)}function lh(){const e=K.useCallback(i=>{i!=null&&hI(i.ownerDocument)},[]),t=K.useRef(!1);function n(){return t.current?(ql=!0,lI.start(100,()=>{ql=!1}),t.current=!1,!0):!1}function r(i){return pI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function ch(e,t){const n=R({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=R({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=R({},o),Object.keys(i).forEach(a=>{n[r][a]=ch(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function pt(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 uh=e=>e,gI=(()=>{let e=uh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=uh}}})(),mI={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 dh(e,t,n="Mui"){const r=mI[t];return r?`${n}-${r}`:`${gI.generate(e)}-${t}`}function vI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=dh(e,i,n)}),r}function Jl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:l,rootElementName:c}=e,u=K.useRef(null),[f,d]=K.useState(!1),{isFocusVisibleRef:p,onFocus:g,onBlur:v,ref:m}=lh(),[b,C]=K.useState(!1);t&&!n&&b&&C(!1),K.useEffect(()=>{p.current=b},[b,p]);const[w,x]=tI({rootElementName:c!=null?c:r||a?"a":void 0,componentName:"Button"}),I=j=>$=>{var M;b&&$.preventDefault(),(M=j.onMouseLeave)==null||M.call(j,$)},S=j=>$=>{var M;v($),p.current===!1&&C(!1),(M=j.onBlur)==null||M.call(j,$)},A=j=>$=>{var M;if(u.current||(u.current=$.currentTarget),g($),p.current===!0){var V;C(!0),(V=j.onFocusVisible)==null||V.call(j,$)}(M=j.onFocus)==null||M.call(j,$)},E=()=>{const j=u.current;return w==="BUTTON"||w==="INPUT"&&["button","submit","reset"].includes(j==null?void 0:j.type)||w==="A"&&(j==null?void 0:j.href)},k=j=>$=>{if(!t){var M;(M=j.onClick)==null||M.call(j,$)}},F=j=>$=>{var M;t||(d(!0),document.addEventListener("mouseup",()=>{d(!1)},{once:!0})),(M=j.onMouseDown)==null||M.call(j,$)},W=j=>$=>{var M;if((M=j.onKeyDown)==null||M.call(j,$),!$.defaultMuiPrevented&&($.target===$.currentTarget&&!E()&&$.key===" "&&$.preventDefault(),$.target===$.currentTarget&&$.key===" "&&!t&&d(!0),$.target===$.currentTarget&&!E()&&$.key==="Enter"&&!t)){var V;(V=j.onClick)==null||V.call(j,$),$.preventDefault()}},O=j=>$=>{var M;if($.target===$.currentTarget&&d(!1),(M=j.onKeyUp)==null||M.call(j,$),$.target===$.currentTarget&&!E()&&!t&&$.key===" "&&!$.defaultMuiPrevented){var V;(V=j.onClick)==null||V.call(j,$)}},T=hn(x,i,m,u),N={};return o!==void 0&&(N.tabIndex=o),w==="BUTTON"?(N.type=l!=null?l:"button",n?N["aria-disabled"]=t:N.disabled=t):w==="INPUT"?l&&["button","submit","reset"].includes(l)&&(n?N["aria-disabled"]=t:N.disabled=t):w!==""&&(!r&&!a&&(N.role="button",N.tabIndex=o!=null?o:0),t&&(N["aria-disabled"]=t,N.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(j={})=>{const $=R({},Nn(e),Nn(j)),M=R({type:l},$,N,j,{onBlur:S($),onClick:k($),onFocus:A($),onKeyDown:W($),onKeyUp:O($),onMouseDown:F($),onMouseLeave:I($),ref:T});return delete M.onFocusVisible,M},focusVisible:b,setFocusVisible:C,active:f,rootRef:T}}function bI(e,t){return e===t}const Xl={},fh=()=>{};function Zl(e,t){const n=R({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function yI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,l=K.useRef(n);K.useEffect(()=>{if(a.current===null)return;const c=Zl(l.current,o);Object.keys(t).forEach(u=>{var f;const d=(f=r[u])!=null?f:bI,p=t[u],g=c[u];if(g==null&&p!=null||g!=null&&p==null||g!=null&&p!=null&&!d(p,g)){var v,m;i==null||i((v=a.current.event)!=null?v:null,u,p,(m=a.current.type)!=null?m:"",t)}}),l.current=t,a.current=null},[l,t,a,i,r,o])}function xI(e){const t=K.useRef(null),{reducer:n,initialState:r,controlledProps:i=Xl,stateComparers:o=Xl,onStateChange:a=fh,actionContext:l,componentName:c=""}=e;K.useRef(i);const u=K.useCallback((g,v)=>{t.current=v;const m=Zl(g,i);return n(m,v)},[i,n]),[f,d]=K.useReducer(u,r),p=K.useCallback(g=>{d(R({},g,{context:l}))},[l]);return yI({nextState:f,initialState:r,stateComparers:o!=null?o:Xl,onStateChange:a!=null?a:fh,controlledProps:i,lastActionRef:t}),[Zl(f,i),p]}const CI=K.createContext(void 0);function wI(){return K.useContext(CI)}function SI(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:l=!1,value:c,inputRef:u}=e,f=wI();let d,p,g,v,m;if(f){var b,C,w;d=void 0,p=(b=f.disabled)!=null?b:!1,g=(C=f.error)!=null?C:!1,v=(w=f.required)!=null?w:!1,m=f.value}else d=t,p=n,g=r,v=l,m=c;const{current:x}=K.useRef(m!=null),I=K.useCallback(j=>{},[]),S=K.useRef(null),A=hn(S,u,I),[E,k]=K.useState(!1);K.useEffect(()=>{!f&&p&&E&&(k(!1),i==null||i())},[f,p,E,i]);const F=j=>$=>{var M;if(f!=null&&f.disabled){$.stopPropagation();return}if((M=j.onFocus)==null||M.call(j,$),f&&f.onFocus){var V;f==null||(V=f.onFocus)==null||V.call(f)}else k(!0)},W=j=>$=>{var M;(M=j.onBlur)==null||M.call(j,$),f&&f.onBlur?f.onBlur():k(!1)},O=j=>($,...M)=>{var V,Y;if(!x&&($.target||S.current)==null)throw new Error(ha(17));f==null||(V=f.onChange)==null||V.call(f,$),(Y=j.onChange)==null||Y.call(j,$,...M)},T=j=>$=>{var M;S.current&&$.currentTarget===$.target&&S.current.focus(),(M=j.onClick)==null||M.call(j,$)};return{disabled:p,error:g,focused:E,formControlContext:f,getInputProps:(j={})=>{const M=R({},{onBlur:i,onChange:o,onFocus:a},Nn(j)),V=R({},M,{onBlur:W(M),onChange:O(M),onFocus:F(M)});return R({},V,{"aria-invalid":g||void 0,defaultValue:d,value:m,required:v,disabled:p},j,{ref:A},V)},getRootProps:(j={})=>{const $=Nn(e,["onBlur","onChange","onFocus"]),M=R({},$,Nn(j));return R({},j,M,{onClick:T(M)})},inputRef:A,required:v,value:m}}const Et={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 II(e,t,n,r,i,o){if(n.length===0||!r&&n.every((l,c)=>i(l,c)))return-1;let a=e;for(;;){if(!o&&t==="next"&&a===n.length||!o&&t==="previous"&&a===-1)return-1;if(r?!1:i(n[a],a))a+=t==="next"?1:-1,o&&(a=(a+n.length)%n.length);else return a}}function Bt(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:l,itemComparer:c,focusManagement:u}=n,f=u==="DOM"?0:-1,d=i.length-1,p=e==null?-1:i.findIndex(C=>c(C,e));let g,v,m=!a;switch(t){case"reset":if(f===-1)return null;g=0,v="next",m=!1;break;case"start":g=0,v="next",m=!1;break;case"end":g=d,v="previous",m=!1;break;default:{const C=p+t;C<0?!m&&p!==-1||Math.abs(t)>1?(g=0,v="next"):(g=d,v="previous"):C>d?!m||Math.abs(t)>1?(g=d,v="previous"):(g=0,v="next"):(g=C,v=t>=0?"next":"previous")}}const b=II(g,v,i,l,o,m);return b===-1&&e!==null&&!o(e,p)?e:(r=i[b])!=null?r:null}function AI(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 hh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:l}=t,c=a.findIndex(f=>r(e,f));if(i(e,c))return t;const u=AI(e,l,o,r);return R({},t,{selectedValues:u,highlightedValue:e})}function TI(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return R({},t,{highlightedValue:Bt(r,"start",n)});case"End":return R({},t,{highlightedValue:Bt(r,"end",n)});case"PageUp":return R({},t,{highlightedValue:Bt(r,-o,n)});case"PageDown":return R({},t,{highlightedValue:Bt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return R({},t,{highlightedValue:Bt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return R({},t,{highlightedValue:Bt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return R({},t,{highlightedValue:Bt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return R({},t,{highlightedValue:Bt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:hh(t.highlightedValue,t,n)}return t}function EI(e,t){return t.focusManagement==="DOM"?e:R({},e,{highlightedValue:null})}function kI(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 _I(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,l=t.length>1;let c=l?e.highlightedValue:Bt(e.highlightedValue,1,n);for(let u=0;u<r.length;u+=1){if(!c||!l&&e.highlightedValue===c)return e;if(kI(c,t,a)&&(!i(c,r.indexOf(c))||o))return R({},e,{highlightedValue:c});c=Bt(c,1,n)}return e}function PI(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let l=null;if(n.highlightedValue!=null){var c;l=(c=e.find(d=>o(d,n.highlightedValue)))!=null?c:null}else a==="DOM"&&t.length===0&&(l=Bt(null,"reset",r));const f=((i=n.selectedValues)!=null?i:[]).filter(d=>e.some(p=>o(p,d)));return R({},n,{highlightedValue:l,selectedValues:f})}function DI(e,t){return R({},e,{highlightedValue:Bt(null,"reset",t)})}function OI(e,t){return R({},e,{highlightedValue:Bt(null,"end",t)})}function RI(e,t){return R({},e,{selectedValues:[],highlightedValue:Bt(null,"reset",t)})}function ph(e,t){const{type:n,context:r}=t;switch(n){case Et.keyDown:return TI(t.key,e,r);case Et.itemClick:return hh(t.item,e,r);case Et.blur:return EI(e,r);case Et.textNavigation:return _I(e,t.searchString,r);case Et.itemsChange:return PI(t.items,t.previousItems,e,r);case Et.resetHighlight:return DI(e,r);case Et.highlightLast:return OI(e,r);case Et.clearSelection:return RI(e,r);default:return e}}const MI=500;function LI(e){const t=K.useRef({searchString:"",lastTime:null});return K.useCallback(n=>{if(n.key.length===1&&n.key!==" "){const r=t.current,i=n.key.toLowerCase(),o=performance.now();r.searchString.length>0&&r.lastTime&&o-r.lastTime>MI?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const gh={},BI=()=>{},$I=(e,t)=>e===t,FI=()=>!1,NI=e=>typeof e=="string"?e:String(e),zI=()=>({highlightedValue:null,selectedValues:[]});function jI(e){const{controlledProps:t=gh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=zI,getItemDomElement:a,getItemId:l,isItemDisabled:c=FI,rootRef:u,onStateChange:f=BI,items:d,itemComparer:p=$I,getItemAsString:g=NI,onChange:v,onHighlightChange:m,onItemsChange:b,orientation:C="vertical",pageSize:w=5,reducerActionContext:x=gh,selectionMode:I="single",stateReducer:S,componentName:A="useList"}=e,E=K.useRef(null),k=hn(u,E),F=K.useCallback((se,Z,te)=>{if(m==null||m(se,Z,te),i==="DOM"&&Z!=null&&(te===Et.itemClick||te===Et.keyDown||te===Et.textNavigation)){var ne;a==null||(ne=a(Z))==null||ne.focus()}},[a,m,i]),W=K.useMemo(()=>({highlightedValue:p,selectedValues:(se,Z)=>Zf(se,Z,p)}),[p]),O=K.useCallback((se,Z,te,ne,de)=>{switch(f==null||f(se,Z,te,ne,de),Z){case"highlightedValue":F(se,te,ne);break;case"selectedValues":v==null||v(se,te,ne);break}},[F,v,f]),T=K.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:c,itemComparer:p,items:d,getItemAsString:g,onHighlightChange:F,orientation:C,pageSize:w,selectionMode:I,stateComparers:W}),[n,r,i,c,p,d,g,F,C,w,I,W]),N=o(),H=S!=null?S:ph,j=K.useMemo(()=>R({},x,T),[x,T]),[$,M]=xI({reducer:H,actionContext:j,initialState:N,controlledProps:t,stateComparers:W,onStateChange:O,componentName:A}),{highlightedValue:V,selectedValues:Y}=$,X=LI((se,Z)=>M({type:Et.textNavigation,event:Z,searchString:se})),D=K.useRef([]);K.useEffect(()=>{Zf(D.current,d,p)||(M({type:Et.itemsChange,event:null,items:d,previousItems:D.current}),D.current=d,b==null||b(d))},[d,p,M,b]);const L=se=>Z=>{var te;if((te=se.onKeyDown)==null||te.call(se,Z),Z.defaultMuiPrevented)return;const ne=["Home","End","PageUp","PageDown"];C==="vertical"?ne.push("ArrowUp","ArrowDown"):ne.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&ne.push(" ","Enter"),ne.includes(Z.key)&&Z.preventDefault(),M({type:Et.keyDown,key:Z.key,event:Z}),X(Z)},U=se=>Z=>{var te,ne;(te=se.onBlur)==null||te.call(se,Z),!Z.defaultMuiPrevented&&((ne=E.current)!=null&&ne.contains(Z.relatedTarget)||M({type:Et.blur,event:Z}))},G=(se={})=>{const Z=Nn(se);return R({},se,{"aria-activedescendant":i==="activeDescendant"&&V!=null?l(V):void 0,tabIndex:i==="DOM"?-1:0,ref:k},Z,{onBlur:U(Z),onKeyDown:L(Z)})},oe=K.useCallback(se=>{const Z=(Y!=null?Y:[]).some(de=>de!=null&&p(se,de)),te=V!=null&&p(se,V);return{focusable:i==="DOM",highlighted:te,selected:Z}},[p,Y,V,i]),ce=K.useMemo(()=>({dispatch:M,getItemState:oe}),[M,oe]);return K.useDebugValue({state:$}),{contextValue:ce,dispatch:M,getRootProps:G,rootRef:k,state:$}}const mh=K.createContext(null);function UI(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=K.useContext(mh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:l,focusable:c}=o(n),u=K.useCallback(g=>v=>{var m;(m=g.onClick)==null||m.call(g,v),!v.defaultPrevented&&i({type:Et.itemClick,item:n,event:v})},[i,n]),f=K.useCallback(g=>v=>{var m;(m=g.onMouseOver)==null||m.call(g,v),!v.defaultPrevented&&i({type:Et.itemHover,item:n,event:v})},[i,n]);let d;return c&&(d=a?0:-1),{getRootProps:(g={})=>{const v=Nn(g);return R({},g,{onClick:u(v),onPointerOver:t?f(v):void 0,tabIndex:d})},highlighted:a,selected:l}}const ec=K.createContext(null);function VI(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 vh(){const[e,t]=K.useState(new Map),n=K.useRef(new Set),r=K.useCallback(function(u){n.current.delete(u),t(f=>{const d=new Map(f);return d.delete(u),d})},[]),i=K.useCallback(function(u,f){let d;return typeof u=="function"?d=u(n.current):d=u,n.current.add(d),t(p=>{const g=new Map(p);return g.set(d,f),g}),{id:d,deregister:()=>r(d)}},[r]),o=K.useMemo(()=>VI(e),[e]),a=K.useCallback(function(u){return Array.from(o.keys()).indexOf(u)},[o]);return{contextValue:K.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function bh(e,t){const n=K.useContext(ec);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=K.useState(typeof e=="function"?void 0:e);return aI(()=>{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 HI(e,t){return function(r={}){const i=R({},r,e(r));return R({},i,t(i))}}const WI=Math.min,GI=Math.max,Aa=Math.round,Ta=Math.floor,Ea=e=>({x:e,y:e});function YI(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 yh(e){return Ch(e)?(e.nodeName||"").toLowerCase():"#document"}function Un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xh(e){var t;return(t=(Ch(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ch(e){return e instanceof Node||e instanceof Un(e).Node}function KI(e){return e instanceof Element||e instanceof Un(e).Element}function tc(e){return e instanceof HTMLElement||e instanceof Un(e).HTMLElement}function wh(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Un(e).ShadowRoot}function Sh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=nc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function qI(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function QI(e){return["html","body","#document"].includes(yh(e))}function nc(e){return Un(e).getComputedStyle(e)}function JI(e){if(yh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wh(e)&&e.host||xh(e);return wh(t)?t.host:t}function Ih(e){const t=JI(e);return QI(t)?e.ownerDocument?e.ownerDocument.body:e.body:tc(t)&&Sh(t)?t:Ih(t)}function ka(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ih(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Un(i);if(o){const l=rc(a);return t.concat(a,a.visualViewport||[],Sh(i)?i:[],l&&n?ka(l):[])}return t.concat(i,ka(i,[],n))}function rc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XI(e){const t=nc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=tc(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=Aa(n)!==o||Aa(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function ic(e){return KI(e)?e:e.contextElement}function Ah(e){const t=ic(e);if(!tc(t))return Ea(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=XI(t);let a=(o?Aa(n.width):n.width)/r,l=(o?Aa(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const ZI=Ea(0);function eA(e){const t=Un(e);return!qI()||!t.visualViewport?ZI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tA(e,t,n){return!1}function Th(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=ic(e);let a=Ea(1);t&&(a=Ah(e));const l=tA()?eA(o):Ea(0);let c=(i.left+l.x)/a.x,u=(i.top+l.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(o){const p=Un(o),g=r;let v=p,m=rc(v);for(;m&&r&&g!==v;){const b=Ah(m),C=m.getBoundingClientRect(),w=nc(m),x=C.left+(m.clientLeft+parseFloat(w.paddingLeft))*b.x,I=C.top+(m.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,d*=b.y,c+=x,u+=I,v=Un(m),m=rc(v)}}return YI({width:f,height:d,x:c,y:u})}function nA(e,t){let n=null,r;const i=xh(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const{left:u,top:f,width:d,height:p}=e.getBoundingClientRect();if(l||t(),!d||!p)return;const g=Ta(f),v=Ta(i.clientWidth-(u+d)),m=Ta(i.clientHeight-(f+p)),b=Ta(u),w={rootMargin:-g+"px "+-v+"px "+-m+"px "+-b+"px",threshold:GI(0,WI(1,c))||1};let x=!0;function I(S){const A=S[0].intersectionRatio;if(A!==c){if(!x)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(I,Q(B({},w),{root:i.ownerDocument}))}catch(S){n=new IntersectionObserver(I,w)}n.observe(e)}return a(!0),o}function rA(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:c=!1}=r,u=ic(e),f=i||o?[...u?ka(u):[],...ka(t)]:[];f.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),o&&C.addEventListener("resize",n)});const d=u&&l?nA(u,n):null;let p=-1,g=null;a&&(g=new ResizeObserver(C=>{let[w]=C;w&&w.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let v,m=c?Th(e):null;c&&b();function b(){const C=Th(e);m&&(C.x!==m.x||C.y!==m.y||C.width!==m.width||C.height!==m.height)&&n(),m=C,v=requestAnimationFrame(b)}return n(),()=>{var C;f.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d==null||d(),(C=g)==null||C.disconnect(),g=null,c&&cancelAnimationFrame(v)}}function iA(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:l,readOnly:c,required:u}=e,[f,d]=Yl({controlled:t,default:!!n,name:"Switch",state:"checked"}),p=k=>F=>{var W;F.nativeEvent.defaultPrevented||(d(F.target.checked),o==null||o(F),(W=k.onChange)==null||W.call(k,F))},{isFocusVisibleRef:g,onBlur:v,onFocus:m,ref:b}=lh(),[C,w]=K.useState(!1);r&&C&&w(!1),K.useEffect(()=>{g.current=C},[C,g]);const x=K.useRef(null),I=k=>F=>{var W;x.current||(x.current=F.currentTarget),m(F),g.current===!0&&(w(!0),l==null||l(F)),a==null||a(F),(W=k.onFocus)==null||W.call(k,F)},S=k=>F=>{var W;v(F),g.current===!1&&w(!1),i==null||i(F),(W=k.onBlur)==null||W.call(k,F)},A=hn(b,x);return{checked:f,disabled:!!r,focusVisible:C,getInputProps:(k={})=>R({checked:t,defaultChecked:n,disabled:r,readOnly:c,ref:A,required:u,type:"checkbox",role:"switch","aria-checked":t},k,{onChange:p(k),onFocus:I(k),onBlur:S(k)}),inputRef:A,readOnly:!!c}}function oA(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[l,c]=Yl({controlled:t,default:n,name:"Tabs",state:"value"}),u=K.useCallback((b,C)=>{c(C),r==null||r(b,C)},[r,c]),{subitems:f,contextValue:d}=vh(),p=K.useRef(()=>{}),g=K.useCallback(b=>{var C;return(C=f.get(b))==null?void 0:C.id},[f]),v=K.useCallback(b=>p.current(b),[]),m=K.useCallback(b=>{p.current=b},[]);return{contextValue:R({direction:o,getTabId:v,getTabPanelId:g,onSelected:u,orientation:i,registerTabIdLookup:m,selectionFollowsFocus:a,value:l},d)}}const Eh=K.createContext(null);function _a(){const e=K.useContext(Eh);if(e==null)throw new Error("No TabsContext provided");return e}function aA(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:l,registerTabIdLookup:c,selectionFollowsFocus:u,totalSubitemCount:f,value:d,getTabId:p,getTabPanelId:g}=t,v=K.useMemo(()=>({getItemIndex:i,registerItem:l,totalSubitemCount:f}),[l,i,f]),m=K.useMemo(()=>({direction:r,getTabId:p,getTabPanelId:g,onSelected:o,orientation:a,registerTabIdLookup:c,selectionFollowsFocus:u,value:d}),[r,p,g,o,a,c,u,d]);return s.jsx(ec.Provider,{value:v,children:s.jsx(Eh.Provider,{value:m,children:n})})}function sA(e){return e.size}function lA(e){const{value:t,id:n,rootRef:r}=e,i=_a();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,l=ro(n),c=K.useRef(null),u=hn(c,r),f=K.useMemo(()=>({id:l,ref:c}),[l]),{id:d}=bh(t!=null?t:sA,f),p=d!==o,g=d!==void 0?a(d):void 0;return{hidden:p,getRootProps:(m={})=>R({"aria-labelledby":g!=null?g:void 0,hidden:p,id:l!=null?l:void 0},m,{ref:u}),rootRef:u}}const kh={valueChange:"valueChange"};function cA(e,t){if(t.type===kh.valueChange)return R({},e,{highlightedValue:t.value});const n=ph(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===Et.itemsChange){if(n.selectedValues.length>0)return R({},n,{highlightedValue:n.selectedValues[0]});Bt(null,"reset",t.context)}return r&&n.highlightedValue!=null?R({},n,{selectedValues:[n.highlightedValue]}):n}function uA(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:l,selectionFollowsFocus:c}=_a(),{subitems:u,contextValue:f}=vh(),d=K.useCallback(O=>{var T;return(T=u.get(O))==null?void 0:T.id},[u]);l(d);const p=K.useMemo(()=>Array.from(u.keys()),[u]),g=K.useCallback(O=>{var T,N;return O==null?null:(T=(N=u.get(O))==null?void 0:N.ref.current)!=null?T:null},[u]),v=r==="rtl";let m;o==="vertical"?m="vertical":m=v?"horizontal-rtl":"horizontal-ltr";const b=K.useCallback((O,T)=>{var N;i(O,(N=T[0])!=null?N:null)},[i]),C=K.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),w=K.useCallback(O=>{var T,N;return(T=(N=u.get(O))==null?void 0:N.disabled)!=null?T:!1},[u]),{contextValue:x,dispatch:I,getRootProps:S,state:{highlightedValue:A,selectedValues:E},rootRef:k}=jI({controlledProps:C,disabledItemsFocusable:!c,focusManagement:"DOM",getItemDomElement:g,isItemDisabled:w,items:p,rootRef:n,onChange:b,orientation:m,reducerActionContext:K.useMemo(()=>({selectionFollowsFocus:c||!1}),[c]),selectionMode:"single",stateReducer:cA});K.useEffect(()=>{a!==void 0&&a!=null&&I({type:kh.valueChange,value:a})},[I,a]);const F=(O={})=>R({},O,S(O),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:K.useMemo(()=>R({},f,x),[f,x]),dispatch:I,getRootProps:F,highlightedValue:A,isRtl:v,orientation:o,rootRef:k,selectedValue:(t=E[0])!=null?t:null}}function dA(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:l}=t,c=K.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),u=K.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:l}),[a,i,l]);return s.jsx(ec.Provider,{value:u,children:s.jsx(mh.Provider,{value:c,children:n})})}function fA(e){return e.size}function hA(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=K.useRef(null),a=ro(i),{value:l,selectionFollowsFocus:c,getTabPanelId:u}=_a(),f=K.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:d,index:p,totalItemCount:g}=bh(t!=null?t:fA,f),{getRootProps:v,highlighted:m,selected:b}=UI({item:d}),{getRootProps:C,rootRef:w,active:x,focusVisible:I,setFocusVisible:S}=Jl({disabled:r,focusableWhenDisabled:!c,type:"button"}),A=hn(o,n,w),E=d!==void 0?u(d):void 0;return{getRootProps:(F={})=>{const W=Nn(F),O=HI(v,C);return R({},F,O(W),{role:"tab","aria-controls":E,"aria-selected":b,id:a,ref:A})},active:x,focusVisible:I,highlighted:m,index:p,rootRef:A,selected:b||d===l,setFocusVisible:S,totalTabsCount:g}}const _h="$$joy";function pA(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function gA(e,t){return Pi(e,t)}const mA=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},vA=["values","unit","step"],bA=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>R({},n,{[r.key]:r.val}),{})};function Ph(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=De(e,vA),o=bA(t),a=Object.keys(o);function l(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function u(p,g){const v=a.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(v!==-1&&typeof t[a[v]]=="number"?t[a[v]]:g)-r/100}${n})`}function f(p){return a.indexOf(p)+1<a.length?u(p,a[a.indexOf(p)+1]):l(p)}function d(p){const g=a.indexOf(p);return g===0?l(a[1]):g===a.length-1?c(a[g]):u(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return R({keys:a,values:o,up:l,down:c,between:u,only:f,not:d,unit:n},i)}const yA={borderRadius:4};function io(e,t){return t?jn(e,t,{clone:!1}):e}const oc={xs:0,sm:600,md:900,lg:1200,xl:1536},Dh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${oc[e]}px)`};function Vn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Dh;return t.reduce((a,l,c)=>(a[o.up(o.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Dh;return Object.keys(t).reduce((a,l)=>{if(Object.keys(o.values||oc).indexOf(l)!==-1){const c=o.up(l);a[c]=n(t[l],l)}else{const c=l;a[c]=t[c]}return a},{})}return n(t)}function xA(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function CA(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function ar(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 Pa(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=ar(e,n)||r,t&&(i=t(i,r,e)),i}function ct(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const l=a[t],c=a.theme,u=ar(c,r)||{};return Vn(a,l,d=>{let p=Pa(u,i,d);return d===p&&typeof d=="string"&&(p=Pa(u,i,`${t}${d==="default"?"":we(d)}`,d)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function wA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const SA={m:"margin",p:"padding"},IA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Oh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},AA=wA(e=>{if(e.length>2)if(Oh[e])e=Oh[e];else return[e];const[t,n]=e.split(""),r=SA[t],i=IA[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),ac=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],sc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...ac,...sc];function oo(e,t,n,r){var i;const o=(i=ar(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 Rh(e){return oo(e,"spacing",8)}function ao(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 TA(e,t){return n=>e.reduce((r,i)=>(r[i]=ao(t,n),r),{})}function EA(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=AA(n),o=TA(i,r),a=e[n];return Vn(e,a,o)}function Mh(e,t){const n=Rh(e.theme);return Object.keys(e).map(r=>EA(e,t,r,n)).reduce(io,{})}function nt(e){return Mh(e,ac)}nt.propTypes={},nt.filterProps=ac;function rt(e){return Mh(e,sc)}rt.propTypes={},rt.filterProps=sc;function Lh(e=8){if(e.mui)return e;const t=Rh({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 Da(...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]?io(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function on(e){return typeof e!="number"?e:`${e}px solid`}function an(e,t){return ct({prop:e,themeKey:"borders",transform:t})}const kA=an("border",on),_A=an("borderTop",on),PA=an("borderRight",on),DA=an("borderBottom",on),OA=an("borderLeft",on),RA=an("borderColor"),MA=an("borderTopColor"),LA=an("borderRightColor"),BA=an("borderBottomColor"),$A=an("borderLeftColor"),FA=an("outline",on),NA=an("outlineColor"),Oa=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=oo(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:ao(t,r)});return Vn(e,e.borderRadius,n)}return null};Oa.propTypes={},Oa.filterProps=["borderRadius"],Da(kA,_A,PA,DA,OA,RA,MA,LA,BA,$A,Oa,FA,NA);const Ra=e=>{if(e.gap!==void 0&&e.gap!==null){const t=oo(e.theme,"spacing",8),n=r=>({gap:ao(t,r)});return Vn(e,e.gap,n)}return null};Ra.propTypes={},Ra.filterProps=["gap"];const Ma=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=oo(e.theme,"spacing",8),n=r=>({columnGap:ao(t,r)});return Vn(e,e.columnGap,n)}return null};Ma.propTypes={},Ma.filterProps=["columnGap"];const La=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=oo(e.theme,"spacing",8),n=r=>({rowGap:ao(t,r)});return Vn(e,e.rowGap,n)}return null};La.propTypes={},La.filterProps=["rowGap"];const zA=ct({prop:"gridColumn"}),jA=ct({prop:"gridRow"}),UA=ct({prop:"gridAutoFlow"}),VA=ct({prop:"gridAutoColumns"}),HA=ct({prop:"gridAutoRows"}),WA=ct({prop:"gridTemplateColumns"}),GA=ct({prop:"gridTemplateRows"}),YA=ct({prop:"gridTemplateAreas"}),KA=ct({prop:"gridArea"});Da(Ra,Ma,La,zA,jA,UA,VA,HA,WA,GA,YA,KA);function Zr(e,t){return t==="grey"?t:e}const qA=ct({prop:"color",themeKey:"palette",transform:Zr}),QA=ct({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Zr}),JA=ct({prop:"backgroundColor",themeKey:"palette",transform:Zr});Da(qA,QA,JA);function Kt(e){return e<=1&&e!==0?`${e*100}%`:e}const XA=ct({prop:"width",transform:Kt}),lc=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])||oc[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:Kt(n)}};return Vn(e,e.maxWidth,t)}return null};lc.filterProps=["maxWidth"];const ZA=ct({prop:"minWidth",transform:Kt}),e1=ct({prop:"height",transform:Kt}),t1=ct({prop:"maxHeight",transform:Kt}),n1=ct({prop:"minHeight",transform:Kt});ct({prop:"size",cssProperty:"width",transform:Kt}),ct({prop:"size",cssProperty:"height",transform:Kt});const r1=ct({prop:"boxSizing"});Da(XA,lc,ZA,e1,t1,n1,r1);const Ba={border:{themeKey:"borders",transform:on},borderTop:{themeKey:"borders",transform:on},borderRight:{themeKey:"borders",transform:on},borderBottom:{themeKey:"borders",transform:on},borderLeft:{themeKey:"borders",transform:on},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:on},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Oa},color:{themeKey:"palette",transform:Zr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Zr},backgroundColor:{themeKey:"palette",transform:Zr},p:{style:rt},pt:{style:rt},pr:{style:rt},pb:{style:rt},pl:{style:rt},px:{style:rt},py:{style:rt},padding:{style:rt},paddingTop:{style:rt},paddingRight:{style:rt},paddingBottom:{style:rt},paddingLeft:{style:rt},paddingX:{style:rt},paddingY:{style:rt},paddingInline:{style:rt},paddingInlineStart:{style:rt},paddingInlineEnd:{style:rt},paddingBlock:{style:rt},paddingBlockStart:{style:rt},paddingBlockEnd:{style:rt},m:{style:nt},mt:{style:nt},mr:{style:nt},mb:{style:nt},ml:{style:nt},mx:{style:nt},my:{style:nt},margin:{style:nt},marginTop:{style:nt},marginRight:{style:nt},marginBottom:{style:nt},marginLeft:{style:nt},marginX:{style:nt},marginY:{style:nt},marginInline:{style:nt},marginInlineStart:{style:nt},marginInlineEnd:{style:nt},marginBlock:{style:nt},marginBlockStart:{style:nt},marginBlockEnd:{style:nt},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:Ra},rowGap:{style:La},columnGap:{style:Ma},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Kt},maxWidth:{style:lc},minWidth:{transform:Kt},height:{transform:Kt},maxHeight:{transform:Kt},minHeight:{transform:Kt},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function i1(...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 o1(e,t){return typeof e=="function"?e(t):e}function a1(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const p=ar(i,u)||{};return d?d(a):Vn(a,r,v=>{let m=Pa(p,f,v);return v===m&&typeof v=="string"&&(m=Pa(p,f,`${n}${v==="default"?"":we(v)}`,v)),c===!1?m:{[c]:m}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:Ba;function l(c){let u=c;if(typeof c=="function")u=c(o);else if(typeof c!="object")return c;if(!u)return null;const f=xA(o.breakpoints),d=Object.keys(f);let p=f;return Object.keys(u).forEach(g=>{const v=o1(u[g],o);if(v!=null)if(typeof v=="object")if(a[g])p=io(p,e(g,v,o,a));else{const m=Vn({theme:o},v,b=>({[g]:b}));i1(m,v)?p[g]=t({sx:v,theme:o}):p=io(p,m)}else p=io(p,e(g,v,o,a))}),CA(d,p)}return Array.isArray(i)?i.map(l):l(i)}return t}const $a=a1();$a.filterProps=["sx"];function Bh(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 s1=["breakpoints","palette","spacing","shape"];function $h(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=De(e,s1),l=Ph(n),c=Lh(i);let u=jn({breakpoints:l,direction:"ltr",components:{},palette:R({mode:"light"},r),spacing:c,shape:R({},yA,o)},a);return u.applyStyles=Bh,u=t.reduce((f,d)=>jn(f,d),u),u.unstable_sxConfig=R({},Ba,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(d){return $a({sx:d,theme:this})},u}function l1(e){return Object.keys(e).length===0}function c1(e=null){const t=K.useContext(me.ThemeContext);return!t||l1(t)?e:t}const u1=$h();function d1(e=u1){return c1(e)}const f1=["sx"],h1=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Ba;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function p1(e){const{sx:t}=e,n=De(e,f1),{systemProps:r,otherProps:i}=h1(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const l=t(...a);return or(l)?R({},r,l):r}:o=R({},r,t),R({},i,{sx:o})}const g1=["ownerState"],m1=["variants"],v1=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function b1(e){return Object.keys(e).length===0}function y1(e){return typeof e=="string"&&e.charCodeAt(0)>96}function cc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const x1=$h(),C1=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Fa({defaultTheme:e,theme:t,themeId:n}){return b1(t)?e:t[n]||t}function w1(e){return e?(t,n)=>n[e]:null}function Na(e,t){let{ownerState:n}=t,r=De(t,g1);const i=typeof e=="function"?e(R({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Na(o,R({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let l=De(i,m1);return o.forEach(c=>{let u=!0;typeof c.props=="function"?u=c.props(R({ownerState:n},r,n)):Object.keys(c.props).forEach(f=>{(n==null?void 0:n[f])!==c.props[f]&&r[f]!==c.props[f]&&(u=!1)}),u&&(Array.isArray(l)||(l=[l]),l.push(typeof c.style=="function"?c.style(R({ownerState:n},r,n)):c.style))}),l}return i}function S1(e={}){const{themeId:t,defaultTheme:n=x1,rootShouldForwardProp:r=cc,slotShouldForwardProp:i=cc}=e,o=a=>$a(R({},a,{theme:Fa(R({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,l={})=>{mA(a,S=>S.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:c,slot:u,skipVariantsResolver:f,skipSx:d,overridesResolver:p=w1(C1(u))}=l,g=De(l,v1),v=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,m=d||!1;let b,C=cc;u==="Root"||u==="root"?C=r:u?C=i:y1(a)&&(C=void 0);const w=gA(a,R({shouldForwardProp:C,label:b},g)),x=S=>typeof S=="function"&&S.__emotion_real!==S||or(S)?A=>Na(S,R({},A,{theme:Fa({theme:A.theme,defaultTheme:n,themeId:t})})):S,I=(S,...A)=>{let E=x(S);const k=A?A.map(x):[];c&&p&&k.push(O=>{const T=Fa(R({},O,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[c]||!T.components[c].styleOverrides)return null;const N=T.components[c].styleOverrides,H={};return Object.entries(N).forEach(([j,$])=>{H[j]=Na($,R({},O,{theme:T}))}),p(O,H)}),c&&!v&&k.push(O=>{var T;const N=Fa(R({},O,{defaultTheme:n,themeId:t})),H=N==null||(T=N.components)==null||(T=T[c])==null?void 0:T.variants;return Na({variants:H},R({},O,{theme:N}))}),m||k.push(o);const F=k.length-A.length;if(Array.isArray(S)&&F>0){const O=new Array(F).fill("");E=[...S,...O],E.raw=[...S.raw,...O]}const W=w(E,...k);return a.muiName&&(W.muiName=a.muiName),W};return w.withConfig&&(I.withConfig=w.withConfig),I}}function I1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:ch(t.components[n].defaultProps,r)}function A1({props:e,name:t,defaultTheme:n,themeId:r}){let i=d1(n);return r&&(i=i[r]||i),I1({theme:i,name:t,props:e})}function T1(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 Fh(e){if(e.type)return e;if(e.charAt(0)==="#")return Fh(T1(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ha(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(ha(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const Tr=e=>{const t=Fh(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function uc(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 Nh=(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])})},E1=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,c])=>{(!n||n&&!n([...o,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,l],Array.isArray(c)?[...a,l]:a):t([...o,l],c,a))})}r(e)},k1=(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 dc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return E1(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(l,c))){const f=`--${n?`${n}-`:""}${l.join("-")}`;Object.assign(i,{[f]:k1(l,c)}),Nh(o,l,`var(${f})`,u),Nh(a,l,`var(${f}, ${c})`,u)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function Er(e){"@babel/helpers - typeof";return Er=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},Er(e)}function _1(e,t){if(Er(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Er(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function fc(e){var t=_1(e,"string");return Er(t)=="symbol"?t:t+""}const P1=["colorSchemes","components","defaultColorScheme"];function D1(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=De(e,P1),{vars:o,css:a,varsWithDefaults:l}=dc(i,t);let c=l;const u={},{[r]:f}=n,d=De(n,[r].map(fc));if(Object.entries(d||{}).forEach(([g,v])=>{const{vars:m,css:b,varsWithDefaults:C}=dc(v,t);c=jn(c,C),u[g]={css:b,vars:m}}),f){const{css:g,vars:v,varsWithDefaults:m}=dc(f,t);c=jn(c,m),u[r]={css:g,vars:v}}return{vars:c,generateCssVars:g=>{var v;if(!g){var m;const C=R({},a);return{css:C,vars:o,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,g,C))||":root"}}const b=R({},u[g].css);return{css:b,vars:u[g].vars,selector:(t==null||(v=t.getSelector)==null?void 0:v.call(t,g,b))||":root"}}}}const O1=R({},Ba,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),so={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 R1(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 ut=(e,t)=>dh(e,t,"Mui"),Ke=(e,t)=>vI(e,t,"Mui"),M1=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))$/)}),zh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},jh=(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")),zh(r,i,a)}}),r},Dt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,l]=o;M1(l)&&typeof l=="object"&&(n=R({},n,{[a]:jh(e,l,c=>`var(--variant-${c}, ${r(`palette-${a}-${c}`,i[a][c])})`)}))})}return n.context=jh(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},L1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],B1=["colorSchemes"],$1=(e="joy")=>uc(e);function F1(e){var t,n,r,i,o,a,l,c,u,f;const d={},{cssVarPrefix:p="joy",breakpoints:g,spacing:v,components:m,variants:b,shouldSkipGeneratingVar:C=R1}=d,w=De(d,L1),x=$1(p),I={primary:so.blue,neutral:so.grey,danger:so.red,success:so.green,warning:so.yellow,common:{white:"#FFF",black:"#000"}},S=Z=>{var te;const ne=Z.split("-"),de=ne[1],ve=ne[2];return x(Z,(te=I[de])==null?void 0:te[ve])},A=Z=>({plainColor:S(`palette-${Z}-500`),plainHoverBg:S(`palette-${Z}-100`),plainActiveBg:S(`palette-${Z}-200`),plainDisabledColor:S("palette-neutral-400"),outlinedColor:S(`palette-${Z}-500`),outlinedBorder:S(`palette-${Z}-300`),outlinedHoverBg:S(`palette-${Z}-100`),outlinedActiveBg:S(`palette-${Z}-200`),outlinedDisabledColor:S("palette-neutral-400"),outlinedDisabledBorder:S("palette-neutral-200"),softColor:S(`palette-${Z}-700`),softBg:S(`palette-${Z}-100`),softHoverBg:S(`palette-${Z}-200`),softActiveColor:S(`palette-${Z}-800`),softActiveBg:S(`palette-${Z}-300`),softDisabledColor:S("palette-neutral-400"),softDisabledBg:S("palette-neutral-50"),solidColor:S("palette-common-white"),solidBg:S(`palette-${Z}-500`),solidHoverBg:S(`palette-${Z}-600`),solidActiveBg:S(`palette-${Z}-700`),solidDisabledColor:S("palette-neutral-400"),solidDisabledBg:S("palette-neutral-100")}),E=Z=>({plainColor:S(`palette-${Z}-300`),plainHoverBg:S(`palette-${Z}-800`),plainActiveBg:S(`palette-${Z}-700`),plainDisabledColor:S("palette-neutral-500"),outlinedColor:S(`palette-${Z}-200`),outlinedBorder:S(`palette-${Z}-700`),outlinedHoverBg:S(`palette-${Z}-800`),outlinedActiveBg:S(`palette-${Z}-700`),outlinedDisabledColor:S("palette-neutral-500"),outlinedDisabledBorder:S("palette-neutral-800"),softColor:S(`palette-${Z}-200`),softBg:S(`palette-${Z}-800`),softHoverBg:S(`palette-${Z}-700`),softActiveColor:S(`palette-${Z}-100`),softActiveBg:S(`palette-${Z}-600`),softDisabledColor:S("palette-neutral-500"),softDisabledBg:S("palette-neutral-800"),solidColor:S("palette-common-white"),solidBg:S(`palette-${Z}-500`),solidHoverBg:S(`palette-${Z}-600`),solidActiveBg:S(`palette-${Z}-700`),solidDisabledColor:S("palette-neutral-500"),solidDisabledBg:S("palette-neutral-800")}),k={palette:{mode:"light",primary:R({},I.primary,A("primary")),neutral:R({},I.neutral,A("neutral"),{plainColor:S("palette-neutral-700"),plainHoverColor:S("palette-neutral-900"),outlinedColor:S("palette-neutral-700")}),danger:R({},I.danger,A("danger")),success:R({},I.success,A("success")),warning:R({},I.warning,A("warning")),common:{white:"#FFF",black:"#000"},text:{primary:S("palette-neutral-800"),secondary:S("palette-neutral-700"),tertiary:S("palette-neutral-600"),icon:S("palette-neutral-500")},background:{body:S("palette-common-white"),surface:S("palette-neutral-50"),popup:S("palette-common-white"),level1:S("palette-neutral-100"),level2:S("palette-neutral-200"),level3:S("palette-neutral-300"),tooltip:S("palette-neutral-500"),backdrop:`rgba(${x("palette-neutral-darkChannel",Tr(I.neutral[900]))} / 0.25)`},divider:`rgba(${x("palette-neutral-mainChannel",Tr(I.neutral[500]))} / 0.2)`,focusVisible:S("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},F={palette:{mode:"dark",primary:R({},I.primary,E("primary")),neutral:R({},I.neutral,E("neutral"),{plainColor:S("palette-neutral-300"),plainHoverColor:S("palette-neutral-300")}),danger:R({},I.danger,E("danger")),success:R({},I.success,E("success")),warning:R({},I.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:S("palette-neutral-100"),secondary:S("palette-neutral-300"),tertiary:S("palette-neutral-400"),icon:S("palette-neutral-400")},background:{body:S("palette-common-black"),surface:S("palette-neutral-900"),popup:S("palette-common-black"),level1:S("palette-neutral-800"),level2:S("palette-neutral-700"),level3:S("palette-neutral-600"),tooltip:S("palette-neutral-600"),backdrop:`rgba(${x("palette-neutral-darkChannel",Tr(I.neutral[50]))} / 0.25)`},divider:`rgba(${x("palette-neutral-mainChannel",Tr(I.neutral[500]))} / 0.16)`,focusVisible:S("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},W='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',O=R({body:`"Inter", ${x(`fontFamily-fallback, ${W}`)}`,display:`"Inter", ${x(`fontFamily-fallback, ${W}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:W},w.fontFamily),T=R({sm:300,md:500,lg:600,xl:700},w.fontWeight),N=R({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},w.fontSize),H=R({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},w.lineHeight),j=(t=(n=w.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:k.shadowRing,$=(r=(i=w.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:k.shadowChannel,M=(o=(a=w.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:k.shadowOpacity,V={colorSchemes:{light:k,dark:F},fontSize:N,fontFamily:O,fontWeight:T,focus:{thickness:"2px",selector:`&.${ut("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${x("focus-thickness",(l=(c=w.focus)==null?void 0:c.thickness)!=null?l:"2px")})`,outline:`${x("focus-thickness",(u=(f=w.focus)==null?void 0:f.thickness)!=null?u:"2px")} solid ${x("palette-focusVisible",I.primary[500])}`}},lineHeight:H,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${x("shadowRing",j)}, 0px 1px 2px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`,sm:`${x("shadowRing",j)}, 0px 1px 2px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)}), 0px 2px 4px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`,md:`${x("shadowRing",j)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)}), 0px 6px 12px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`,lg:`${x("shadowRing",j)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)}), 0px 12px 16px -4px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`,xl:`${x("shadowRing",j)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)}), 0px 20px 24px -4px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",M)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:x(`fontFamily-display, ${O.display}`),fontWeight:x(`fontWeight-xl, ${T.xl}`),fontSize:x(`fontSize-xl4, ${N.xl4}`),lineHeight:x(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${k.palette.text.primary}`)},h2:{fontFamily:x(`fontFamily-display, ${O.display}`),fontWeight:x(`fontWeight-xl, ${T.xl}`),fontSize:x(`fontSize-xl3, ${N.xl3}`),lineHeight:x(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${k.palette.text.primary}`)},h3:{fontFamily:x(`fontFamily-display, ${O.display}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-xl2, ${N.xl2}`),lineHeight:x(`lineHeight-xs, ${H.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${k.palette.text.primary}`)},h4:{fontFamily:x(`fontFamily-display, ${O.display}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-xl, ${N.xl}`),lineHeight:x(`lineHeight-md, ${H.md}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${k.palette.text.primary}`)},"title-lg":{fontFamily:x(`fontFamily-body, ${O.body}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-lg, ${N.lg}`),lineHeight:x(`lineHeight-xs, ${H.xs}`),color:x(`palette-text-primary, ${k.palette.text.primary}`)},"title-md":{fontFamily:x(`fontFamily-body, ${O.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-md, ${N.md}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-primary, ${k.palette.text.primary}`)},"title-sm":{fontFamily:x(`fontFamily-body, ${O.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-sm, ${N.sm}`),lineHeight:x(`lineHeight-sm, ${H.sm}`),color:x(`palette-text-primary, ${k.palette.text.primary}`)},"body-lg":{fontFamily:x(`fontFamily-body, ${O.body}`),fontSize:x(`fontSize-lg, ${N.lg}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-md":{fontFamily:x(`fontFamily-body, ${O.body}`),fontSize:x(`fontSize-md, ${N.md}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-secondary, ${k.palette.text.secondary}`)},"body-sm":{fontFamily:x(`fontFamily-body, ${O.body}`),fontSize:x(`fontSize-sm, ${N.sm}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-tertiary, ${k.palette.text.tertiary}`)},"body-xs":{fontFamily:x(`fontFamily-body, ${O.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-xs, ${N.xs}`),lineHeight:x(`lineHeight-md, ${H.md}`),color:x(`palette-text-tertiary, ${k.palette.text.tertiary}`)}}},Y=w?jn(V,w):V,{colorSchemes:X}=Y,D=De(Y,B1),L=R({colorSchemes:X},D,{breakpoints:Ph(g!=null?g:{}),components:jn({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:Z,theme:te})=>{var ne;const de=Z.instanceFontSize;return R({margin:"var(--Icon-margin)"},Z.fontSize&&Z.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${te.vars.fontSize[Z.fontSize]})`},!Z.htmlColor&&R({color:`var(--Icon-color, ${L.vars.palette.text.icon})`},Z.color&&Z.color!=="inherit"&&te.vars.palette[Z.color]&&{color:`rgba(${(ne=te.vars.palette[Z.color])==null?void 0:ne.mainChannel} / 1)`}),de&&de!=="inherit"&&{"--Icon-fontSize":te.vars.fontSize[de]})}}}},m),cssVarPrefix:p,getCssVar:x,spacing:Lh(v)});function U(Z,te){Object.keys(te).forEach(ne=>{const de={main:"500",light:"200",dark:"700"};Z==="dark"&&(de.main=400),!te[ne].mainChannel&&te[ne][de.main]&&(te[ne].mainChannel=Tr(te[ne][de.main])),!te[ne].lightChannel&&te[ne][de.light]&&(te[ne].lightChannel=Tr(te[ne][de.light])),!te[ne].darkChannel&&te[ne][de.dark]&&(te[ne].darkChannel=Tr(te[ne][de.dark]))})}Object.entries(L.colorSchemes).forEach(([Z,te])=>{U(Z,te.palette)});const G={prefix:p,shouldSkipGeneratingVar:C},{vars:oe,generateCssVars:ce}=D1(R({colorSchemes:X},D),G);L.vars=oe,L.generateCssVars=ce,L.unstable_sxConfig=R({},O1,void 0),L.unstable_sx=function(te){return $a({sx:te,theme:this})},L.getColorSchemeSelector=Z=>Z==="light"?"&":`&[data-joy-color-scheme="${Z}"], [data-joy-color-scheme="${Z}"] &`;const se={getCssVar:x,palette:L.colorSchemes.light.palette};return L.variants=jn({plain:Dt("plain",se),plainHover:Dt("plainHover",se),plainActive:Dt("plainActive",se),plainDisabled:Dt("plainDisabled",se),outlined:Dt("outlined",se),outlinedHover:Dt("outlinedHover",se),outlinedActive:Dt("outlinedActive",se),outlinedDisabled:Dt("outlinedDisabled",se),soft:Dt("soft",se),softHover:Dt("softHover",se),softActive:Dt("softActive",se),softDisabled:Dt("softDisabled",se),solid:Dt("solid",se),solidHover:Dt("solidHover",se),solidActive:Dt("solidActive",se),solidDisabled:Dt("solidDisabled",se)},b),L.palette=R({},L.colorSchemes.light.palette,{colorScheme:"light"}),L.shouldSkipGeneratingVar=C,L.applyStyles=Bh,L}const Uh=F1(),ye=S1({defaultTheme:Uh,themeId:_h});function gt({props:e,name:t}){return A1({props:e,name:t,defaultTheme:R({},Uh,{components:{}}),themeId:_h})}function N1(e){return ut("MuiAccordion",e)}const z1=Ke("MuiAccordion",["root","expanded","disabled"]),j1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],U1=["component","slots","slotProps"],V1=["component"];function Ee(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:l}=t,c=De(t,j1),{component:u,slots:f={[e]:void 0},slotProps:d={[e]:void 0}}=o,p=De(o,U1),g=f[e]||r,v=eI(d[e],i),m=rI(R({className:n},c,{externalForwardedProps:e==="root"?p:void 0,externalSlotProps:v})),{props:{component:b},internalRef:C}=m,w=De(m.props,V1),x=hn(C,v==null?void 0:v.ref,t.ref),I=a?a(w):{},S=R({},i,I),A=e==="root"?b||u:b,E=ZS(g,R({},e==="root"&&!u&&!f[e]&&l,e!=="root"&&!f[e]&&l,w,A&&{as:A},{ref:x}),S);return Object.keys(I).forEach(k=>{delete E[k]}),[g,E]}const hc=K.createContext({});function H1(e){return ut("MuiListItem",e)}const Vh=Ke("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),za=K.createContext(!1),pc=K.createContext(!1),Hh=K.createContext(!1),Wh=K.createContext(void 0),W1=K.createContext(void 0),Gh=K.createContext(void 0),G1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],Y1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${we(o)}`,i&&`variant${we(i)}`],startAction:["startAction"],endAction:["endAction"]};return pt(a,H1,{})},gc=ye("li")(({theme:e,ownerState:t})=>{var n;return[!t.nested&&{"--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItemButton-marginBlock":"calc(-1 * var(--ListItem-paddingY))",alignItems:"center",gap:"var(--ListItem-gap)",marginInline:"var(--ListItem-marginInline)"},t.nested&&{"--NestedList-marginRight":"calc(-1 * var(--ListItem-paddingRight))","--NestedList-marginLeft":"calc(-1 * var(--ListItem-paddingLeft))","--NestedListItem-paddingLeft":"calc(var(--ListItem-paddingLeft) + var(--List-nestedInsetStart))","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItem-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",flexDirection:"column"},R({"--unstable_actionRadius":"calc(var(--ListItem-radius) - var(--variant-borderWidth, 0px))"},t.startAction&&{"--unstable_startActionWidth":"2rem"},t.endAction&&{"--unstable_endActionWidth":"2.5rem"},{boxSizing:"border-box",borderRadius:"var(--ListItem-radius)",display:"var(--_ListItem-display)","&:not([hidden])":{"--_ListItem-display":"var(--_List-markerDisplay, flex)"},flex:"none",listStyleType:"var(--_List-markerType, disc)",position:"relative",paddingBlockStart:t.nested?0:"var(--ListItem-paddingY)",paddingBlockEnd:t.nested?0:"var(--ListItem-paddingY)",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)"},t["data-first-child"]===void 0&&R({},t.row?{marginInlineStart:"var(--List-gap)"}:{marginBlockStart:"var(--List-gap)"}),t.row&&t.wrap&&{marginInlineStart:"var(--List-gap)",marginBlockStart:"var(--List-gap)"},{minBlockSize:"var(--ListItem-minHeight)"},t.sticky&&{position:"sticky",top:"var(--ListItem-stickyTop, 0px)",zIndex:1,background:`var(--ListItem-stickyBackground, ${e.vars.palette.background.body})`},{[`.${Vh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),K1=ye(gc,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),q1=ye("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",left:0,transform:"translate(var(--ListItem-startActionTranslateX), -50%)",zIndex:1})),Q1=ye("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",right:0,transform:"translate(var(--ListItem-endActionTranslateX), -50%)"})),Yh=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyListItem"}),i=K.useContext(Gh),o=K.useContext(Wh),a=K.useContext(pc),l=K.useContext(Hh),c=K.useContext(za),{component:u,className:f,children:d,nested:p=!1,sticky:g=!1,variant:v="plain",color:m="neutral",startAction:b,endAction:C,role:w,slots:x={},slotProps:I={}}=r,S=De(r,G1),[A,E]=K.useState(""),[k,F]=(o==null?void 0:o.split(":"))||["",""],W=u||(k&&!k.match(/^(ul|ol|menu)$/)?"div":void 0);let O=i==="menu"?"none":void 0;o&&(O={menu:"none",menubar:"none",group:"presentation"}[F]),w&&(O=w);const T=R({},r,{sticky:g,startAction:b,endAction:C,row:a,wrap:l,variant:v,color:m,nesting:c,nested:p,component:W,role:O}),N=Y1(T),H=R({},S,{component:W,slots:x,slotProps:I}),[j,$]=Ee("root",{additionalProps:{role:O},ref:n,className:zn(N.root,f),elementType:K1,externalForwardedProps:H,ownerState:T}),[M,V]=Ee("startAction",{className:N.startAction,elementType:q1,externalForwardedProps:H,ownerState:T}),[Y,X]=Ee("endAction",{className:N.endAction,elementType:Q1,externalForwardedProps:H,ownerState:T});return s.jsx(W1.Provider,{value:E,children:s.jsx(za.Provider,{value:p?A||!0:!1,children:s.jsxs(j,R({},$,{children:[b&&s.jsx(M,R({},V,{children:b})),K.Children.map(d,(D,L)=>{var U;return K.isValidElement(D)?K.cloneElement(D,R({},L===0&&{"data-first-child":""},oh(D,["ListItem"])&&{component:((U=D.props)==null?void 0:U.component)||"div"})):D}),C&&s.jsx(Y,R({},X,{children:C}))]}))})})});Yh.muiName="ListItem";const Kh=Yh;function J1(e){return ut("MuiAccordionDetails",e)}const kr=Ke("MuiAccordionDetails",["root","content","expanded"]),X1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],Z1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${we(n)}`,t&&`variant${we(t)}`]};return pt(o,N1,{})},eT=ye(gc,{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"},[`& .${kr.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),tT=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:l,defaultExpanded:c=!1,disabled:u=!1,expanded:f,onChange:d,variant:p="plain",slots:g={},slotProps:v={}}=r,m=De(r,X1),b=ro(i),[C,w]=Yl({controlled:f,default:c,name:"Accordion",state:"expanded"}),x=K.useCallback(W=>{w(!C),d&&d(W,!C)},[C,d,w]),I=K.useMemo(()=>({accordionId:b,expanded:C,disabled:u,toggle:x}),[b,C,u,x]),S=R({},m,{component:o,slots:g,slotProps:v}),A=R({},r,{component:o,color:a,variant:p,expanded:C,disabled:u,nested:!0}),E=Z1(A),[k,F]=Ee("root",{ref:n,className:E.root,elementType:eT,externalForwardedProps:S,ownerState:A});return s.jsx(hc.Provider,{value:I,children:s.jsx(k,R({},F,{children:K.Children.map(l,(W,O)=>K.isValidElement(W)&&O===0?K.cloneElement(W,{"data-first-child":""}):W)}))})});function nT(e){return ut("MuiAccordionGroup",e)}Ke("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const rT={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function mc(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=s.jsx(pc.Provider,{value:r,children:s.jsx(Hh.Provider,{value:i,children:K.Children.map(t,(a,l)=>K.isValidElement(a)?K.cloneElement(a,R({},l===0&&{"data-first-child":""},l===K.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:s.jsx(za.Provider,{value:n,children:o})}const vc=({theme:e,ownerState:t},n)=>{let r={};function i(o){if(typeof o=="function"){const a=o(e);i(a)}else Array.isArray(o)?o.forEach(a=>{typeof a!="boolean"&&i(a)}):typeof o=="object"&&(r=R({},r,o))}return t.sx&&(i(t.sx),n.forEach(o=>{const a=r[o];if(typeof a=="string"||typeof a=="number")if(o==="borderRadius")if(typeof a=="number")r[o]=`${a}px`;else{var 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 iT(e){return ut("MuiList",e)}Ke("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const oT=K.createContext(void 0),aT=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],sT=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,l={root:["root",o,t&&`variant${we(t)}`,n&&`color${we(n)}`,!a&&!i&&r&&`size${we(r)}`,a&&`size${we(a)}`,i&&"nesting"]};return pt(l,iT,{})},bc=ye("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=vc({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&&R({},a(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0},t.marker&&{paddingInlineStart:"calc(3ch - var(--_List-markerDeduct, 0px))"},{marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&R({},a(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)"},t.marker&&{"--_List-markerDeduct":"1ch"},{"--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],t.orientation==="horizontal"?R({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"},t.marker&&{paddingInlineStart:"3ch"}),R({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:t.orientation==="horizontal"?"row":"column"},t.wrap&&{flexWrap:"wrap"},t.marker&&{"--_List-markerDisplay":"list-item","--_List-markerType":t.marker,lineHeight:"calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"},{flexGrow:1,position:"relative"},(n=e.variants[t.variant])==null?void 0:n[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},o!==void 0&&{"--List-radius":o},r!==void 0&&{"--List-padding":r},i!==void 0&&{"--List-padding":i})]}),lT=ye(bc,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),cT=K.forwardRef(function(t,n){var r;const i=K.useContext(za),o=K.useContext(Gh),a=K.useContext(oT),l=gt({props:t,name:"JoyList"}),{component:c,className:u,children:f,size:d,orientation:p="vertical",wrap:g=!1,variant:v="plain",color:m="neutral",role:b,slots:C={},slotProps:w={}}=l,x=De(l,aT),I=d||((r=t.size)!=null?r:"md");let S;o&&(S="group"),a&&(S="presentation"),b&&(S=b);const A=R({},l,{instanceSize:t.size,size:I,nesting:i,orientation:p,wrap:g,variant:v,color:m,role:S}),E=sT(A),k=R({},x,{component:c,slots:C,slotProps:w}),[F,W]=Ee("root",{ref:n,className:zn(E.root,u),elementType:lT,externalForwardedProps:k,ownerState:A,additionalProps:{as:c,role:S,"aria-labelledby":typeof i=="string"?i:void 0}});return s.jsx(F,R({},W,{children:s.jsx(Wh.Provider,{value:`${typeof c=="string"?c:""}:${S||""}`,children:s.jsx(mc,{row:p==="horizontal",wrap:g,children:f})})}))}),uT=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],dT=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${we(t)}`,n&&`color${we(n)}`,r&&`size${we(r)}`]};return pt(i,nT,{})},fT=ye(bc,{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}`,[`& .${kr.root}.${kr.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),R({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${z1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),hT=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:l=!1,variant:c="plain",transition:u="0.2s ease",size:f="md",slots:d={},slotProps:p={}}=r,g=De(r,uT),v=R({},g,{component:i,slots:d,slotProps:p}),m=R({},r,{component:i,color:o,disableDivider:l,variant:c,transition:u,size:f}),b=dT(m),[C,w]=Ee("root",{ref:n,className:b.root,elementType:fT,externalForwardedProps:v,ownerState:m});return s.jsx(C,R({},w,{children:s.jsx(mc,{children:a})}))}),pT=["component","children","color","variant","slots","slotProps"],gT=e=>{const{expanded:t}=e;return pt({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},J1,{})},mT=ye("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return R({overflow:"hidden",borderRadius:"var(--AccordionDetails-radius)",display:"grid",gridTemplateRows:"1fr",marginInline:"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",transition:"var(--AccordionDetails-transition)"},(n=t.variants[e.variant])==null?void 0:n[e.color],{[`&:not(.${kr.expanded})`]:{gridTemplateRows:"0fr"}})}),vT=ye("div",{name:"JoyAccordionDetails",slot:"Content",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",overflow:"hidden",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)",paddingBlockStart:"calc(var(--ListItem-paddingY) / 2)",paddingBlockEnd:"calc(2.5 * var(--ListItem-paddingY))",transition:"var(--AccordionDetails-transition)",[`&:not(.${kr.expanded})`]:{paddingBlock:0}}),bT=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:l="plain",slots:c={},slotProps:u={}}=r,f=De(r,pT),{accordionId:d,expanded:p=!1}=K.useContext(hc),g=K.useRef(null),v=hn(g,n);K.useEffect(()=>{g.current&&g.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(p){const k=E.getAttribute("data-prev-tabindex"),F=E.getAttribute("tabindex");F&&k&&(E.setAttribute("tabindex",k),E.removeAttribute("data-prev-tabindex")),!k&&!F&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[p]);const m=R({},f,{component:i,slots:c,slotProps:u}),b=R({},r,{component:i,color:a,variant:l,expanded:p,nesting:!0}),C=gT(b),[w,x]=Ee("root",{ref:v,className:C.root,elementType:mT,externalForwardedProps:m,additionalProps:{id:`${d}-details`,"aria-labelledby":`${d}-summary`,role:"region",hidden:p?void 0:!0},ownerState:b}),[I,S]=Ee("content",{className:C.content,elementType:vT,externalForwardedProps:m,ownerState:b});return s.jsx(w,R({},x,{children:s.jsx(I,R({},S,{children:o}))}))});function yT(e){return ut("MuiAccordionSummary",e)}const ja=Ke("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),Ua=Ke("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),xT=K.createContext("horizontal"),yc=ye("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;return R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch",gap:"var(--ListItem-gap)"},t.orientation==="vertical"&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},t["data-first-child"]===void 0&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:R({},e.focus.default,{zIndex:1})},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:active":(r=e.variants[`${t.variant}Active`])==null?void 0:r[t.color],[`.${Vh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${Ua.selected}`]:R({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${Ua.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]},[`&.${Ua.disabled}`]:R({},(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color])})});ye(yc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>R({},!e.row&&{[`&.${Ua.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function CT(e){return ut("MuiSvgIcon",e)}Ke("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const wT=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],ST=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${we(t)}`,n&&`size${we(n)}`,r&&`fontSize${we(r)}`]};return pt(i,CT,{})},qh={sm:"xl",md:"xl2",lg:"xl3"},IT=ye("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return R({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[qh[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[qh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&R({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&e.vars.palette[t.color]&&{color:`rgba(${(n=e.vars.palette[t.color])==null?void 0:n.mainChannel} / 1)`}))}),Qh=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:l="svg",fontSize:c,htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:p="0 0 24 24",size:g="md",slots:v={},slotProps:m={}}=r,b=De(r,wT),C=K.isValidElement(i)&&i.type==="svg",w=R({},r,{color:a,component:l,size:g,instanceSize:t.size,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:C}),x=ST(w),I=R({},b,{component:l,slots:v,slotProps:m}),[S,A]=Ee("root",{ref:n,className:zn(x.root,o),elementType:IT,externalForwardedProps:I,ownerState:w,additionalProps:R({color:u,focusable:!1},d&&{role:"img"},!d&&{"aria-hidden":!0},!f&&{viewBox:p},C&&i.props)});return s.jsxs(S,R({},A,{children:[C?i.props.children:i,d?s.jsx("title",{children:d}):null]}))});function xc(e,t){function n(r,i){return s.jsx(Qh,R({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Qh.muiName,K.memo(K.forwardRef(n))}const AT=xc(s.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Jh;const TT=["component","color","children","indicator","variant","slots","slotProps"],ET=e=>{const{disabled:t,expanded:n}=e;return pt({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},yT,{})},kT=ye(gc,{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)",[`&.${ja.expanded}`]:{"--Icon-color":"currentColor"}})),_T=ye(yc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${ja.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),PT=ye("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${ja.expanded}`]:{transform:"rotate(180deg)"}}),DT=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:l=Jh||(Jh=s.jsx(AT,{})),variant:c="plain",slots:u={},slotProps:f={}}=r,d=De(r,TT),{accordionId:p,disabled:g=!1,expanded:v=!1,toggle:m}=K.useContext(hc),b=R({},d,{component:i,slots:u,slotProps:f}),C=R({},r,{component:i,color:o,disabled:g,expanded:v,variant:c}),w=W=>{if(m&&m(W),typeof f.button=="function"){var O,T;(O=f.button(C))==null||(T=O.onClick)==null||T.call(O,W)}else{var N,H;(N=f.button)==null||(H=N.onClick)==null||H.call(N,W)}},x=ET(C),[I,S]=Ee("root",{ref:n,className:x.root,elementType:kT,externalForwardedProps:b,ownerState:C}),[A,E]=Ee("button",{ref:n,className:x.button,elementType:_T,externalForwardedProps:b,additionalProps:{component:"button",id:`${p}-summary`,"aria-expanded":v?"true":"false","aria-controls":`${p}-details`,disabled:g,type:"button",onClick:w},ownerState:C}),[k,F]=Ee("indicator",{ref:n,className:x.indicator,elementType:PT,externalForwardedProps:b,ownerState:C});return s.jsx(I,R({},S,{children:s.jsxs(A,R({},E,{children:[a,l&&s.jsx(k,R({},F,{children:l}))]}))}))}),OT=({label:e,disabled:t,children:n})=>(t=t||!1,s.jsx(hT,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${ja.button}:hover`]:{backgroundColor:"#fff"},[`& .${kr.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${kr.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:s.jsxs(tT,{disabled:t,children:[s.jsx(DT,{children:e}),s.jsx(bT,{variant:"soft",children:n})]})})),Cc={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"]]},wc=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const l=(c,u,f,d)=>{f!=="api"&&(d.getText().trim()===""?a(""):a(c))};return t==="description"?s.jsxs(h.FormControl,{sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{color:"primary",children:e}),s.jsx(Di,{value:n||r,defaultValue:r,onChange:l,modules:Cc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{color:"primary",children:e}),s.jsx(Di,{value:n||r,defaultValue:r,onChange:l,modules:Cc,placeholder:i,className:"ql-container ql-toolbar"}),s.jsx(h.FormHelperText,{children:o})]}):s.jsx(h.Box,{sx:()=>({marginBottom:"16px"}),children:s.jsx(Di,{value:n||r,defaultValue:r,onChange:l,modules:Cc,placeholder:i})})},RT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return s.jsxs(h.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[s.jsxs(h.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[s.jsx(h.Tab,{children:e.labels.richText}),s.jsx(h.Tab,{children:e.labels.plainText})]}),s.jsx(h.TabPanel,{value:0,sx:{px:0},children:s.jsx(wc,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),s.jsx(h.TabPanel,{value:1,sx:{px:0},children:s.jsx(h.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},MT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,l)=>{i(l||"")};return s.jsxs(h.FormControl,{sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{color:"primary",children:e}),s.jsx(h.Select,{defaultValue:t,onChange:o,children:n.map((a,l)=>s.jsx(h.Option,{value:a,children:a},`basic-select-${a}-${l}`))}),r?s.jsx(h.FormHelperText,{children:r}):s.jsx(s.Fragment,{})]})},Sc=K.createContext("md");function LT(e){return ut("MuiTabs",e)}Ke("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const BT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],$T=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${we(n)}`,r&&`color${we(r)}`,i&&`size${we(i)}`]};return pt(o,LT,{})},FT=ye("div",{name:"JoyTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r;const i=(n=t.variants[e.variant])==null?void 0:n[e.color],{bgcolor:o,backgroundColor:a,background:l,p:c,padding:u}=vc({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),f=ar(t,`palette.${o}`)||o||ar(t,`palette.${a}`)||a||l||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return R({},e.size==="sm"&&{"--Tabs-spacing":"0.75rem"},e.size==="md"&&{"--Tabs-spacing":"1rem"},e.size==="lg"&&{"--Tabs-spacing":"1.25rem"},{"--Tab-indicatorThickness":"2px","--Icon-color":e.color!=="neutral"||e.variant==="solid"?"currentColor":t.vars.palette.text.icon,"--TabList-stickyBackground":f==="transparent"?"initial":f,display:"flex",flexDirection:"column"},e.orientation==="vertical"&&{flexDirection:"row"},{backgroundColor:t.vars.palette.background.surface,position:"relative"},t.typography[`body-${e.size}`],(r=t.variants[e.variant])==null?void 0:r[e.color],c!==void 0&&{"--Tabs-padding":c},u!==void 0&&{"--Tabs-padding":u})}),Xh=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:l="horizontal",direction:c="ltr",component:u,variant:f="plain",color:d="neutral",size:p="md",slots:g={},slotProps:v={}}=r,m=De(r,BT),b=a||(o===void 0?0:void 0),{contextValue:C}=oA(R({},r,{orientation:l,defaultValue:b})),w=R({},r,{orientation:l,direction:c,variant:f,color:d,size:p}),x=$T(w),I=R({},m,{component:u,slots:g,slotProps:v}),[S,A]=Ee("root",{ref:n,elementType:FT,externalForwardedProps:I,additionalProps:{ref:n,as:u},ownerState:w,className:x.root});return s.jsx(S,R({},A,{children:s.jsx(aA,{value:C,children:s.jsx(Sc.Provider,{value:p,children:i})})}))});function NT(e){return ut("MuiTabList",e)}Ke("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function zT(e){return ut("MuiTab",e)}const Ic=Ke("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),jT=["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${we(r)}`,i&&`color${we(i)}`,n&&`size${we(n)}`]};return pt(o,NT,{})},VT=ye(bc,{name:"JoyTabList",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;const r=(n=e.variants[t.variant])==null?void 0:n[t.color];return R({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},rT,{flexGrow:"initial",flexDirection:t.orientation==="vertical"?"column":"row",borderRadius:"var(--List-radius, 0px)",padding:"var(--List-padding, 0px)",zIndex:1},t.sticky&&{position:"sticky",top:t.sticky==="top"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",bottom:t.sticky==="bottom"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",backgroundColor:(r==null?void 0:r.backgroundColor)||`var(--TabList-stickyBackground, ${e.vars.palette.background.body})`},!t.disableUnderline&&R({},t.underlinePlacement==="bottom"&&{"--unstable_TabList-underlineBottom":"1px",paddingBottom:1,boxShadow:`inset 0 -1px ${e.vars.palette.divider}`},t.underlinePlacement==="top"&&{"--unstable_TabList-underlineTop":"1px",paddingTop:1,boxShadow:`inset 0 1px ${e.vars.palette.divider}`},t.underlinePlacement==="right"&&{"--unstable_TabList-underlineRight":"1px",paddingRight:1,boxShadow:`inset -1px 0 ${e.vars.palette.divider}`},t.underlinePlacement==="left"&&{"--unstable_TabList-underlineLeft":"1px",paddingLeft:1,boxShadow:`inset 1px 0 ${e.vars.palette.divider}`}),t.tabFlex&&{[`& .${Ic.root}`]:{flex:t.tabFlex}})}),Zh=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyTabList"}),i=K.useContext(Sc),{isRtl:o,orientation:a,getRootProps:l,contextValue:c}=uA({rootRef:n}),{component:u="div",children:f,variant:d="plain",color:p="neutral",size:g,disableUnderline:v=!1,underlinePlacement:m=a==="horizontal"?"bottom":"right",tabFlex:b,sticky:C,slots:w={},slotProps:x={}}=r,I=De(r,jT),S=g!=null?g:i,A=R({},r,{isRtl:o,orientation:a,variant:d,color:p,size:S,sticky:C,tabFlex:b,nesting:!1,disableUnderline:v,underlinePlacement:m}),E=UT(A),k=R({},I,{component:u,slots:w,slotProps:x}),[F,W]=Ee("root",{ref:n,elementType:VT,getSlotProps:l,externalForwardedProps:k,ownerState:A,className:E.root});return s.jsx(F,R({},W,{children:s.jsx(dA,{value:c,children:s.jsx(mc,{row:a==="horizontal",nested:!0,children:f})})}))}),HT=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],WT=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${we(i)}`,o&&`color${we(o)}`]};return pt(l,zT,{})},GT=ye(yc,{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))"}}]),ei=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyTab"}),i=K.useContext(pc),{action:o,children:a,disabled:l=!1,component:c="button",orientation:u="horizontal",variant:f="plain",color:d="neutral",disableIndicator:p=!1,indicatorPlacement:g=i?"bottom":"right",indicatorInset:v=!1,slots:m={},slotProps:b={}}=r,C=De(r,HT),w=K.useRef(null),x=hn(w,n),{active:I,focusVisible:S,setFocusVisible:A,selected:E,getRootProps:k}=hA(R({},r,{rootRef:x}));K.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),w.current.focus()}}),[A]);const F=R({},r,{disableIndicator:p,indicatorPlacement:g,indicatorInset:v,orientation:u,row:i,active:I,focusVisible:S,disabled:l,selected:E,variant:f,color:d}),W=WT(F),O=R({},C,{component:c,slots:m,slotProps:b}),[T,N]=Ee("root",{ref:n,elementType:GT,getSlotProps:k,externalForwardedProps:O,ownerState:F,className:W.root});return s.jsx(xT.Provider,{value:u,children:s.jsx(T,R({},N,{children:a}))})});function Hn(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 ep(e){if(K.isValidElement(e)||ih.isValidElementType(e)||!Hn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ep(e[n])}),t}function qt(e,t,n={clone:!0}){const r=n.clone?B({},e):e;return Hn(e)&&Hn(t)&&Object.keys(t).forEach(i=>{K.isValidElement(t[i])||ih.isValidElementType(t[i])?r[i]=t[i]:Hn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Hn(e[i])?r[i]=qt(e[i],t[i],n):n.clone?r[i]=Hn(t[i])?ep(t[i]):t[i]:r[i]=t[i]}),r}function _r(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 ti(e){if(typeof e!="string")throw new Error(_r(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ac(e,t){const n=B({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=B(B({},e[i]),n[i]);else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)n[i]=o||{};else if(!o)n[i]=a;else{n[i]=B({},a);for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const c=l;n[i][c]=Ac(o[c],a[c])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function YT(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",l=!0;for(let c=0;c<o.length;c+=1){const u=o[c];u&&(a+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(a+=" "+n[u]))}r[i]=a}return r}const tp=e=>e,KT=(()=>{let e=tp;return{configure(t){e=t},generate(t){return e(t)},reset(){e=tp}}})(),qT={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 np(e,t,n="Mui"){const r=qT[t];return r?`${n}-${r}`:`${KT.generate(e)}-${t}`}function QT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=np(e,i,n)}),r}function JT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function lo(e,t){return t?qt(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},B({},t)):t}function ZT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function eE(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 tE(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 c=t(e.breakpoints.not(...l),a);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},i=o=>(n(r,o),r);return n(i),Q(B({},e),{containerQueries:i})}const Va={xs:0,sm:600,md:900,lg:1200,xl:1536},rp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Va[e]}px)`},nE={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Va[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Wn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||rp;return t.reduce((a,l,c)=>(a[o.up(o.keys[c])]=n(t[c]),a),{})}if(typeof t=="object"){const o=r.breakpoints||rp;return Object.keys(t).reduce((a,l)=>{if(ZT(o.keys,l)){const c=eE(r.containerQueries?r:nE,l);c&&(a[c]=n(t[l],l))}else if(Object.keys(o.values||Va).includes(l)){const c=o.up(l);a[c]=n(t[l],l)}else{const c=l;a[c]=t[c]}return a},{})}return n(t)}function rE(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function iE(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Ha(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 Wa(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Ha(e,n)||r,t&&(i=t(i,r,e)),i}function dt(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],c=a.theme,u=Ha(c,r)||{};return Wn(a,l,d=>{let p=Wa(u,i,d);return d===p&&typeof d=="string"&&(p=Wa(u,i,`${t}${d==="default"?"":ti(d)}`,d)),n===!1?p:{[n]:p}})};return o.propTypes={},o.filterProps=[t],o}function oE(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const aE={m:"margin",p:"padding"},sE={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ip={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},lE=oE(e=>{if(e.length>2)if(ip[e])e=ip[e];else return[e];const[t,n]=e.split(""),r=aE[t],i=sE[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Tc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ec=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Tc,...Ec];function co(e,t,n,r){var o;const i=(o=Ha(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),c=i[l];return a>=0?c:typeof c=="number"?-c:`-${c}`}:typeof i=="function"?i:()=>{}}function kc(e){return co(e,"spacing",8)}function uo(e,t){return typeof t=="string"||t==null?t:e(t)}function cE(e,t){return n=>e.reduce((r,i)=>(r[i]=uo(t,n),r),{})}function uE(e,t,n,r){if(!t.includes(n))return null;const i=lE(n),o=cE(i,r),a=e[n];return Wn(e,a,o)}function op(e,t){const n=kc(e.theme);return Object.keys(e).map(r=>uE(e,t,r,n)).reduce(lo,{})}function it(e){return op(e,Tc)}it.propTypes={},it.filterProps=Tc;function ot(e){return op(e,Ec)}ot.propTypes={},ot.filterProps=Ec;function Ga(...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]?lo(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function sn(e){return typeof e!="number"?e:`${e}px solid`}function ln(e,t){return dt({prop:e,themeKey:"borders",transform:t})}const dE=ln("border",sn),fE=ln("borderTop",sn),hE=ln("borderRight",sn),pE=ln("borderBottom",sn),gE=ln("borderLeft",sn),mE=ln("borderColor"),vE=ln("borderTopColor"),bE=ln("borderRightColor"),yE=ln("borderBottomColor"),xE=ln("borderLeftColor"),CE=ln("outline",sn),wE=ln("outlineColor"),Ya=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=co(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:uo(t,r)});return Wn(e,e.borderRadius,n)}return null};Ya.propTypes={},Ya.filterProps=["borderRadius"],Ga(dE,fE,hE,pE,gE,mE,vE,bE,yE,xE,Ya,CE,wE);const Ka=e=>{if(e.gap!==void 0&&e.gap!==null){const t=co(e.theme,"spacing",8),n=r=>({gap:uo(t,r)});return Wn(e,e.gap,n)}return null};Ka.propTypes={},Ka.filterProps=["gap"];const qa=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=co(e.theme,"spacing",8),n=r=>({columnGap:uo(t,r)});return Wn(e,e.columnGap,n)}return null};qa.propTypes={},qa.filterProps=["columnGap"];const Qa=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=co(e.theme,"spacing",8),n=r=>({rowGap:uo(t,r)});return Wn(e,e.rowGap,n)}return null};Qa.propTypes={},Qa.filterProps=["rowGap"];const SE=dt({prop:"gridColumn"}),IE=dt({prop:"gridRow"}),AE=dt({prop:"gridAutoFlow"}),TE=dt({prop:"gridAutoColumns"}),EE=dt({prop:"gridAutoRows"}),kE=dt({prop:"gridTemplateColumns"}),_E=dt({prop:"gridTemplateRows"}),PE=dt({prop:"gridTemplateAreas"}),DE=dt({prop:"gridArea"});Ga(Ka,qa,Qa,SE,IE,AE,TE,EE,kE,_E,PE,DE);function ni(e,t){return t==="grey"?t:e}const OE=dt({prop:"color",themeKey:"palette",transform:ni}),RE=dt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ni}),ME=dt({prop:"backgroundColor",themeKey:"palette",transform:ni});Ga(OE,RE,ME);function Qt(e){return e<=1&&e!==0?`${e*100}%`:e}const LE=dt({prop:"width",transform:Qt}),_c=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,l,c;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||Va[n];return r?((c=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Qt(n)}};return Wn(e,e.maxWidth,t)}return null};_c.filterProps=["maxWidth"];const BE=dt({prop:"minWidth",transform:Qt}),$E=dt({prop:"height",transform:Qt}),FE=dt({prop:"maxHeight",transform:Qt}),NE=dt({prop:"minHeight",transform:Qt});dt({prop:"size",cssProperty:"width",transform:Qt}),dt({prop:"size",cssProperty:"height",transform:Qt});const zE=dt({prop:"boxSizing"});Ga(LE,_c,BE,$E,FE,NE,zE);const Ja={border:{themeKey:"borders",transform:sn},borderTop:{themeKey:"borders",transform:sn},borderRight:{themeKey:"borders",transform:sn},borderBottom:{themeKey:"borders",transform:sn},borderLeft:{themeKey:"borders",transform:sn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:sn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ya},color:{themeKey:"palette",transform:ni},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ni},backgroundColor:{themeKey:"palette",transform:ni},p:{style:ot},pt:{style:ot},pr:{style:ot},pb:{style:ot},pl:{style:ot},px:{style:ot},py:{style:ot},padding:{style:ot},paddingTop:{style:ot},paddingRight:{style:ot},paddingBottom:{style:ot},paddingLeft:{style:ot},paddingX:{style:ot},paddingY:{style:ot},paddingInline:{style:ot},paddingInlineStart:{style:ot},paddingInlineEnd:{style:ot},paddingBlock:{style:ot},paddingBlockStart:{style:ot},paddingBlockEnd:{style:ot},m:{style:it},mt:{style:it},mr:{style:it},mb:{style:it},ml:{style:it},mx:{style:it},my:{style:it},margin:{style:it},marginTop:{style:it},marginRight:{style:it},marginBottom:{style:it},marginLeft:{style:it},marginX:{style:it},marginY:{style:it},marginInline:{style:it},marginInlineStart:{style:it},marginInlineEnd:{style:it},marginBlock:{style:it},marginBlockStart:{style:it},marginBlockEnd:{style:it},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:Ka},rowGap:{style:Qa},columnGap:{style:qa},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Qt},maxWidth:{style:_c},minWidth:{transform:Qt},height:{transform:Qt},maxHeight:{transform:Qt},minHeight:{transform:Qt},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 jE(...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 VE(){function e(n,r,i,o){const a={[n]:r,theme:i},l=o[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:f,style:d}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const p=Ha(i,u)||{};return d?d(a):Wn(a,r,v=>{let m=Wa(p,f,v);return v===m&&typeof v=="string"&&(m=Wa(p,f,`${n}${v==="default"?"":ti(v)}`,v)),c===!1?m:{[c]:m}})}function t(n){var l;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(l=i.unstable_sxConfig)!=null?l:Ja;function a(c){let u=c;if(typeof c=="function")u=c(i);else if(typeof c!="object")return c;if(!u)return null;const f=rE(i.breakpoints),d=Object.keys(f);let p=f;return Object.keys(u).forEach(g=>{const v=UE(u[g],i);if(v!=null)if(typeof v=="object")if(o[g])p=lo(p,e(g,v,i,o));else{const m=Wn({theme:i},v,b=>({[g]:b}));jE(m,v)?p[g]=t({sx:v,theme:i}):p=lo(p,m)}else p=lo(p,e(g,v,i,o))}),XT(i,iE(d,p))}return Array.isArray(r)?r.map(a):a(r)}return t}const ri=VE();ri.filterProps=["sx"];function HE(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 WE={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},GE=!1,YE=/[A-Z]|^ms/g,KE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ap=function(t){return t.charCodeAt(1)===45},sp=function(t){return t!=null&&typeof t!="boolean"},Pc=pA(function(e){return ap(e)?e:e.replace(YE,"-$&").toLowerCase()}),lp=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(KE,function(r,i,o){return sr={name:i,styles:o,next:sr},i})}return WE[t]!==1&&!ap(t)&&typeof n=="number"&&n!==0?n+"px":n},qE="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Xa(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 sr={name:i.name,styles:i.styles,next:sr},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)sr={name:a.name,styles:a.styles,next:sr},a=a.next;var l=o.styles+";";return l}return QE(e,t,n)}}var c=n;return c}function QE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Xa(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var l=a;sp(l)&&(r+=Pc(o)+":"+lp(o,l)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&GE)throw new Error(qE);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)sp(a[c])&&(r+=Pc(o)+":"+lp(o,a[c])+";");else{var u=Xa(e,t,a);switch(o){case"animation":case"animationName":{r+=Pc(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}}return r}var cp=/label:\s*([^\s;{]+)\s*(;|$)/g,sr;function JE(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="";sr=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Xa(n,t,o);else{var a=o;i+=a[0]}for(var l=1;l<e.length;l++)if(i+=Xa(n,t,e[l]),r){var c=o;i+=c[l]}cp.lastIndex=0;for(var u="",f;(f=cp.exec(i))!==null;)u+="-"+f[1];var d=HE(i)+u;return{name:d,styles:i,next:sr}}/**
|
|
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 Pi(e,t)}function ZE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const up=[];function dp(e){return up[0]=e,JE(up)}const ek=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>Q(B({},n),{[r.key]:r.val}),{})};function tk(e){const p=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=p,i=Qe(p,["values","unit","step"]),o=ek(t),a=Object.keys(o);function l(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n})`}function c(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-r/100}${n})`}function u(g,v){const m=a.indexOf(v);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:v)-r/100}${n})`}function f(g){return a.indexOf(g)+1<a.length?u(g,a[a.indexOf(g)+1]):l(g)}function d(g){const v=a.indexOf(g);return v===0?l(a[1]):v===a.length-1?c(a[v]):u(g,a[a.indexOf(g)+1]).replace("@media","@media not all and")}return B({keys:a,values:o,up:l,down:c,between:u,only:f,not:d,unit:n},i)}const nk={borderRadius:4};function fp(e=8,t=kc({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 rk(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 hp(e={},...t){const f=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=f,a=Qe(f,["breakpoints","palette","spacing","shape"]),l=tk(n),c=fp(i);let u=Qt({breakpoints:l,direction:"ltr",components:{},palette:B({mode:"light"},r),spacing:c,shape:B(B({},nk),o)},a);return u=tE(u),u.applyStyles=rk,u=t.reduce((d,p)=>Qt(d,p),u),u.unstable_sxConfig=B(B({},Ja),a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(p){return ri({sx:p,theme:this})},u}function pp(e){const i=e,{variants:t}=i,n=Qe(i,["variants"]),r={variants:t,style:dp(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=dp(o.style))}),r}const ik=hp();function Dc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function ok(e){return e?(t,n)=>n[e]:null}function ak(e,t,n){e.theme=ck(e.theme)?n:e.theme[t]||e.theme}function Za(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Za(e,i));if(Array.isArray(n==null?void 0:n.variants)){let i;if(n.isProcessed)i=n.style;else{const r=n,{variants:o}=r;i=Qe(r,["variants"])}return gp(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function gp(e,t,n=[]){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r!=null||(r=Q(B(B({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const 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=Q(B(B({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function sk(e={}){const{themeId:t,defaultTheme:n=ik,rootShouldForwardProp:r=Dc,slotShouldForwardProp:i=Dc}=e;function o(l){ak(l,t,n)}return(l,c={})=>{ZE(l,A=>A.filter(E=>E!==ri));const S=c,{name:u,slot:f,skipVariantsResolver:d,skipSx:p,overridesResolver:g=ok(dk(f))}=S,v=Qe(S,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),m=d!==void 0?d:f&&f!=="Root"&&f!=="root"||!1,b=p||!1;let C=Dc;f==="Root"||f==="root"?C=r:f?C=i:uk(l)&&(C=void 0);const w=XE(l,B({shouldForwardProp:C,label:lk()},v)),x=A=>{if(typeof A=="function"&&A.__emotion_real!==A)return function(k){return Za(k,A)};if(Hn(A)){const E=pp(A);return E.variants?function(F){return Za(F,E)}:E.style}return A},I=(...A)=>{const E=[],k=A.map(x),F=[];if(E.push(o),u&&g&&F.push(function(N){var M,V;const j=(V=(M=N.theme.components)==null?void 0:M[u])==null?void 0:V.styleOverrides;if(!j)return null;const $={};for(const Y in j)$[Y]=Za(N,j[Y]);return g(N,$)}),u&&!m&&F.push(function(N){var $,M;const H=N.theme,j=(M=($=H==null?void 0:H.components)==null?void 0:$[u])==null?void 0:M.variants;return j?gp(N,j):null}),b||F.push(ri),Array.isArray(k[0])){const T=k.shift(),N=new Array(E.length).fill(""),H=new Array(F.length).fill("");let j;j=[...N,...T,...H],j.raw=[...N,...T.raw,...H],E.unshift(j)}const W=[...E,...k,...F],O=w(...W);return l.muiName&&(O.muiName=l.muiName),O};return w.withConfig&&(I.withConfig=w.withConfig),I}}function lk(e,t){return void 0}function ck(e){for(const t in e)return!1;return!0}function uk(e){return typeof e=="string"&&e.charCodeAt(0)>96}function dk(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Oc(e,t=0,n=1){return JT(e,t,n)}function fk(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 lr(e){if(e.type)return e;if(e.charAt(0)==="#")return lr(fk(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(_r(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(_r(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const hk=e=>{const t=lr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},fo=(e,t)=>{try{return hk(e)}catch(n){return e}};function es(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 mp(e){e=lr(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(u,f=(u+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let l="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),es({type:l,values:c})}function Rc(e){e=lr(e);let t=e.type==="hsl"||e.type==="hsla"?lr(mp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:_i((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function pk(e,t){const n=Rc(e),r=Rc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function gk(e,t){return e=lr(e),t=Oc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,es(e)}function ts(e,t,n){try{return gk(e,t)}catch(r){return e}}function Mc(e,t){if(e=lr(e),t=Oc(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 es(e)}function Ue(e,t,n){try{return Mc(e,t)}catch(r){return e}}function Lc(e,t){if(e=lr(e),t=Oc(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 es(e)}function Ve(e,t,n){try{return Lc(e,t)}catch(r){return e}}function mk(e,t=.15){return Rc(e)>.5?Mc(e,t):Lc(e,t)}function ns(e,t,n){try{return mk(e,t)}catch(r){return e}}const vk=K.createContext(void 0);function bk(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?Ac(i.defaultProps,r):!i.styleOverrides&&!i.variants?Ac(i,r):r}function yk({props:e,name:t}){const n=K.useContext(vk);return bk({props:e,name:t,theme:{components:n}})}const vp={theme:void 0};function xk(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(vp.theme=i.theme,o=pp(e(vp)),t=o,n=i.theme),o}}function Ck(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 bp=(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])})},wk=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,c])=>{(!n||n&&!n([...o,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,l],Array.isArray(c)?[...a,l]:a):t([...o,l],c,a))})}r(e)},Sk=(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 wk(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(l,c))){const f=`--${n?`${n}-`:""}${l.join("-")}`,d=Sk(l,c);Object.assign(i,{[f]:d}),bp(o,l,`var(${f})`,u),bp(a,l,`var(${f}, ${d})`,u)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function Ik(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:i}=t,x=e,{colorSchemes:o={},components:a,defaultColorScheme:l="light"}=x,c=Qe(x,["colorSchemes","components","defaultColorScheme"]),{vars:u,css:f,varsWithDefaults:d}=Bc(c,t);let p=d;const g={},I=o,{[l]:v}=I,m=Qe(I,[Ks(l)]);if(Object.entries(m||{}).forEach(([S,A])=>{const{vars:E,css:k,varsWithDefaults:F}=Bc(A,t);p=Qt(p,F),g[S]={css:k,vars:E}}),v){const{css:S,vars:A,varsWithDefaults:E}=Bc(v,t);p=Qt(p,E),g[l]={css:S,vars:A}}function b(S,A){var k,F;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),S){if(E==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((F=(k=o[S])==null?void 0:k.palette)==null?void 0:F.mode)||S})`]:{":root":A}};if(E)return e.defaultColorScheme===S?`:root, ${E.replace("%s",String(S))}`:E.replace("%s",String(S))}return":root"}return{vars:p,generateThemeVars:()=>{let S=B({},u);return Object.entries(g).forEach(([,{vars:A}])=>{S=Qt(S,A)}),S},generateStyleSheets:()=>{var O,T;const S=[],A=e.defaultColorScheme||"light";function E(N,H){Object.keys(H).length&&S.push(typeof N=="string"?{[N]:B({},H)}:N)}E(n(void 0,B({},f)),f);const W=g,{[A]:k}=W,F=Qe(W,[Ks(A)]);if(k){const{css:N}=k,H=(T=(O=o[A])==null?void 0:O.palette)==null?void 0:T.mode,j=B(!r&&H?{colorScheme:H}:{},N);E(n(A,B({},j)),j)}return Object.entries(F).forEach(([N,{css:H}])=>{var M,V;const j=(V=(M=o[N])==null?void 0:M.palette)==null?void 0:V.mode,$=B(!r&&j?{colorScheme:j}:{},H);E(n(N,B({},$)),$)}),S}}}function Ak(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 ho={black:"#000",white:"#fff"},Tk={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"},ii={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"},oi={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"},po={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"},ai={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"},si={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"},li={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 yp(){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:ho.white,default:ho.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 Ek=yp();function xp(){return{text:{primary:ho.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:ho.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 Cp=xp();function wp(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=Lc(e.main,i):t==="dark"&&(e.dark=Mc(e.main,o)))}function kk(e="light"){return e==="dark"?{main:ai[200],light:ai[50],dark:ai[400]}:{main:ai[700],light:ai[400],dark:ai[800]}}function _k(e="light"){return e==="dark"?{main:ii[200],light:ii[50],dark:ii[400]}:{main:ii[500],light:ii[300],dark:ii[700]}}function Pk(e="light"){return e==="dark"?{main:oi[500],light:oi[300],dark:oi[700]}:{main:oi[700],light:oi[400],dark:oi[800]}}function Dk(e="light"){return e==="dark"?{main:si[400],light:si[300],dark:si[700]}:{main:si[700],light:si[500],dark:si[900]}}function Ok(e="light"){return e==="dark"?{main:li[400],light:li[300],dark:li[700]}:{main:li[800],light:li[500],dark:li[900]}}function Rk(e="light"){return e==="dark"?{main:po[400],light:po[300],dark:po[700]}:{main:"#ed6c02",light:po[500],dark:po[900]}}function $c(e){const m=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=m,i=Qe(m,["mode","contrastThreshold","tonalOffset"]),o=e.primary||kk(t),a=e.secondary||_k(t),l=e.error||Pk(t),c=e.info||Dk(t),u=e.success||Ok(t),f=e.warning||Rk(t);function d(b){return pk(b,Cp.text.primary)>=n?Cp.text.primary:Ek.text.primary}const p=({color:b,name:C,mainShade:w=500,lightShade:x=300,darkShade:I=700})=>{if(b=B({},b),!b.main&&b[w]&&(b.main=b[w]),!b.hasOwnProperty("main"))throw new Error(_r(11,C?` (${C})`:"",w));if(typeof b.main!="string")throw new Error(_r(12,C?` (${C})`:"",JSON.stringify(b.main)));return wp(b,"light",x,r),wp(b,"dark",I,r),b.contrastText||(b.contrastText=d(b.main)),b};let g;return t==="light"?g=yp():t==="dark"&&(g=xp()),Qt(B({common:B({},ho),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:u,name:"success"}),grey:Tk,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},g),i)}function Mk(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 Lk(e,t){return B({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function Bk(e){return Math.round(e*1e5)/1e5}const Sp={textTransform:"uppercase"},Ip='"Roboto", "Helvetica", "Arial", sans-serif';function $k(e,t){const b=typeof t=="function"?t(e):t,{fontFamily:n=Ip,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=b,d=Qe(b,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),p=r/14,g=f||(C=>`${C/c*p}rem`),v=(C,w,x,I,S)=>B(B(B({fontFamily:n,fontWeight:C,fontSize:g(w),lineHeight:x},n===Ip?{letterSpacing:`${Bk(I/w)}em`}:{}),S),u),m={h1:v(i,96,1.167,-1.5),h2:v(i,60,1.2,-.5),h3:v(o,48,1.167,0),h4:v(o,34,1.235,.25),h5:v(o,24,1.334,0),h6:v(a,20,1.6,.15),subtitle1:v(o,16,1.75,.15),subtitle2:v(a,14,1.57,.1),body1:v(o,16,1.5,.15),body2:v(o,14,1.43,.15),button:v(a,14,1.75,.4,Sp),caption:v(o,12,1.66,.4),overline:v(o,12,2.66,1,Sp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Qt(B({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},m),d,{clone:!1})}const Fk=.2,Nk=.14,zk=.12;function qe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Fk})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Nk})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${zk})`].join(",")}const jk=["none",qe(0,2,1,-1,0,1,1,0,0,1,3,0),qe(0,3,1,-2,0,2,2,0,0,1,5,0),qe(0,3,3,-2,0,3,4,0,0,1,8,0),qe(0,2,4,-1,0,4,5,0,0,1,10,0),qe(0,3,5,-1,0,5,8,0,0,1,14,0),qe(0,3,5,-1,0,6,10,0,0,1,18,0),qe(0,4,5,-2,0,7,10,1,0,2,16,1),qe(0,5,5,-3,0,8,10,1,0,3,14,2),qe(0,5,6,-3,0,9,12,1,0,3,16,2),qe(0,6,6,-3,0,10,14,1,0,4,18,3),qe(0,6,7,-4,0,11,15,1,0,4,20,3),qe(0,7,8,-4,0,12,17,2,0,5,22,4),qe(0,7,8,-4,0,13,19,2,0,5,24,4),qe(0,7,9,-4,0,14,21,2,0,5,26,4),qe(0,8,9,-5,0,15,22,2,0,6,28,5),qe(0,8,10,-5,0,16,24,2,0,6,30,5),qe(0,8,11,-5,0,17,26,2,0,6,32,5),qe(0,9,11,-5,0,18,28,2,0,7,34,6),qe(0,9,12,-6,0,19,29,2,0,7,36,6),qe(0,10,13,-6,0,20,31,3,0,8,38,7),qe(0,10,13,-6,0,21,33,3,0,8,40,7),qe(0,10,14,-6,0,22,35,3,0,8,42,7),qe(0,11,14,-7,0,23,36,3,0,9,44,8),qe(0,11,15,-7,0,24,38,3,0,9,46,8)],Uk={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)"},Vk={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ap(e){return`${Math.round(e)}ms`}function Hk(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*_i(t,.25)+t/5)*10),3e3)}function Wk(e){const t=B(B({},Uk),e.easing),n=B(B({},Vk),e.duration);return Q(B({getAutoHeightDuration:Hk,create:(i=["all"],o={})=>{const f=o,{duration:a=n.standard,easing:l=t.easeInOut,delay:c=0}=f,u=Qe(f,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof a=="string"?a:Ap(a)} ${l} ${typeof c=="string"?c:Ap(c)}`).join(",")}},e),{easing:t,duration:n})}const Gk={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Yk(e){return Hn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Tp(e={}){const t=B({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,l]=i[o];!Yk(l)||a.startsWith("unstable_")?delete r[a]:Hn(l)&&(r[a]=B({},l),n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
2339
|
+
*/function XE(e,t){return Pi(e,t)}function ZE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const up=[];function dp(e){return up[0]=e,JE(up)}const ek=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>Q(B({},n),{[r.key]:r.val}),{})};function tk(e){const p=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=p,i=Qe(p,["values","unit","step"]),o=ek(t),a=Object.keys(o);function l(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n})`}function c(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-r/100}${n})`}function u(g,v){const m=a.indexOf(v);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:v)-r/100}${n})`}function f(g){return a.indexOf(g)+1<a.length?u(g,a[a.indexOf(g)+1]):l(g)}function d(g){const v=a.indexOf(g);return v===0?l(a[1]):v===a.length-1?c(a[v]):u(g,a[a.indexOf(g)+1]).replace("@media","@media not all and")}return B({keys:a,values:o,up:l,down:c,between:u,only:f,not:d,unit:n},i)}const nk={borderRadius:4};function fp(e=8,t=kc({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 rk(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 hp(e={},...t){const f=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=f,a=Qe(f,["breakpoints","palette","spacing","shape"]),l=tk(n),c=fp(i);let u=qt({breakpoints:l,direction:"ltr",components:{},palette:B({mode:"light"},r),spacing:c,shape:B(B({},nk),o)},a);return u=tE(u),u.applyStyles=rk,u=t.reduce((d,p)=>qt(d,p),u),u.unstable_sxConfig=B(B({},Ja),a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(p){return ri({sx:p,theme:this})},u}function pp(e){const i=e,{variants:t}=i,n=Qe(i,["variants"]),r={variants:t,style:dp(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=dp(o.style))}),r}const ik=hp();function Dc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function ok(e){return e?(t,n)=>n[e]:null}function ak(e,t,n){e.theme=ck(e.theme)?n:e.theme[t]||e.theme}function Za(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Za(e,i));if(Array.isArray(n==null?void 0:n.variants)){let i;if(n.isProcessed)i=n.style;else{const r=n,{variants:o}=r;i=Qe(r,["variants"])}return gp(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function gp(e,t,n=[]){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r!=null||(r=Q(B(B({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const 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=Q(B(B({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function sk(e={}){const{themeId:t,defaultTheme:n=ik,rootShouldForwardProp:r=Dc,slotShouldForwardProp:i=Dc}=e;function o(l){ak(l,t,n)}return(l,c={})=>{ZE(l,A=>A.filter(E=>E!==ri));const S=c,{name:u,slot:f,skipVariantsResolver:d,skipSx:p,overridesResolver:g=ok(dk(f))}=S,v=Qe(S,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),m=d!==void 0?d:f&&f!=="Root"&&f!=="root"||!1,b=p||!1;let C=Dc;f==="Root"||f==="root"?C=r:f?C=i:uk(l)&&(C=void 0);const w=XE(l,B({shouldForwardProp:C,label:lk()},v)),x=A=>{if(typeof A=="function"&&A.__emotion_real!==A)return function(k){return Za(k,A)};if(Hn(A)){const E=pp(A);return E.variants?function(F){return Za(F,E)}:E.style}return A},I=(...A)=>{const E=[],k=A.map(x),F=[];if(E.push(o),u&&g&&F.push(function(N){var M,V;const j=(V=(M=N.theme.components)==null?void 0:M[u])==null?void 0:V.styleOverrides;if(!j)return null;const $={};for(const Y in j)$[Y]=Za(N,j[Y]);return g(N,$)}),u&&!m&&F.push(function(N){var $,M;const H=N.theme,j=(M=($=H==null?void 0:H.components)==null?void 0:$[u])==null?void 0:M.variants;return j?gp(N,j):null}),b||F.push(ri),Array.isArray(k[0])){const T=k.shift(),N=new Array(E.length).fill(""),H=new Array(F.length).fill("");let j;j=[...N,...T,...H],j.raw=[...N,...T.raw,...H],E.unshift(j)}const W=[...E,...k,...F],O=w(...W);return l.muiName&&(O.muiName=l.muiName),O};return w.withConfig&&(I.withConfig=w.withConfig),I}}function lk(e,t){return void 0}function ck(e){for(const t in e)return!1;return!0}function uk(e){return typeof e=="string"&&e.charCodeAt(0)>96}function dk(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Oc(e,t=0,n=1){return JT(e,t,n)}function fk(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 lr(e){if(e.type)return e;if(e.charAt(0)==="#")return lr(fk(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(_r(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(_r(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const hk=e=>{const t=lr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},fo=(e,t)=>{try{return hk(e)}catch(n){return e}};function es(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 mp(e){e=lr(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(u,f=(u+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let l="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),es({type:l,values:c})}function Rc(e){e=lr(e);let t=e.type==="hsl"||e.type==="hsla"?lr(mp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:_i((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function pk(e,t){const n=Rc(e),r=Rc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function gk(e,t){return e=lr(e),t=Oc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,es(e)}function ts(e,t,n){try{return gk(e,t)}catch(r){return e}}function Mc(e,t){if(e=lr(e),t=Oc(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 es(e)}function Ue(e,t,n){try{return Mc(e,t)}catch(r){return e}}function Lc(e,t){if(e=lr(e),t=Oc(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 es(e)}function Ve(e,t,n){try{return Lc(e,t)}catch(r){return e}}function mk(e,t=.15){return Rc(e)>.5?Mc(e,t):Lc(e,t)}function ns(e,t,n){try{return mk(e,t)}catch(r){return e}}const vk=K.createContext(void 0);function bk(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?Ac(i.defaultProps,r):!i.styleOverrides&&!i.variants?Ac(i,r):r}function yk({props:e,name:t}){const n=K.useContext(vk);return bk({props:e,name:t,theme:{components:n}})}const vp={theme:void 0};function xk(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(vp.theme=i.theme,o=pp(e(vp)),t=o,n=i.theme),o}}function Ck(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 bp=(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])})},wk=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([l,c])=>{(!n||n&&!n([...o,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,l],Array.isArray(c)?[...a,l]:a):t([...o,l],c,a))})}r(e)},Sk=(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 wk(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(l,c))){const f=`--${n?`${n}-`:""}${l.join("-")}`,d=Sk(l,c);Object.assign(i,{[f]:d}),bp(o,l,`var(${f})`,u),bp(a,l,`var(${f}, ${d})`,u)}},l=>l[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function Ik(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:i}=t,x=e,{colorSchemes:o={},components:a,defaultColorScheme:l="light"}=x,c=Qe(x,["colorSchemes","components","defaultColorScheme"]),{vars:u,css:f,varsWithDefaults:d}=Bc(c,t);let p=d;const g={},I=o,{[l]:v}=I,m=Qe(I,[Ks(l)]);if(Object.entries(m||{}).forEach(([S,A])=>{const{vars:E,css:k,varsWithDefaults:F}=Bc(A,t);p=qt(p,F),g[S]={css:k,vars:E}}),v){const{css:S,vars:A,varsWithDefaults:E}=Bc(v,t);p=qt(p,E),g[l]={css:S,vars:A}}function b(S,A){var k,F;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),S){if(E==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((F=(k=o[S])==null?void 0:k.palette)==null?void 0:F.mode)||S})`]:{":root":A}};if(E)return e.defaultColorScheme===S?`:root, ${E.replace("%s",String(S))}`:E.replace("%s",String(S))}return":root"}return{vars:p,generateThemeVars:()=>{let S=B({},u);return Object.entries(g).forEach(([,{vars:A}])=>{S=qt(S,A)}),S},generateStyleSheets:()=>{var O,T;const S=[],A=e.defaultColorScheme||"light";function E(N,H){Object.keys(H).length&&S.push(typeof N=="string"?{[N]:B({},H)}:N)}E(n(void 0,B({},f)),f);const W=g,{[A]:k}=W,F=Qe(W,[Ks(A)]);if(k){const{css:N}=k,H=(T=(O=o[A])==null?void 0:O.palette)==null?void 0:T.mode,j=B(!r&&H?{colorScheme:H}:{},N);E(n(A,B({},j)),j)}return Object.entries(F).forEach(([N,{css:H}])=>{var M,V;const j=(V=(M=o[N])==null?void 0:M.palette)==null?void 0:V.mode,$=B(!r&&j?{colorScheme:j}:{},H);E(n(N,B({},$)),$)}),S}}}function Ak(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 ho={black:"#000",white:"#fff"},Tk={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"},ii={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"},oi={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"},po={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"},ai={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"},si={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"},li={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 yp(){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:ho.white,default:ho.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 Ek=yp();function xp(){return{text:{primary:ho.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:ho.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 Cp=xp();function wp(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=Lc(e.main,i):t==="dark"&&(e.dark=Mc(e.main,o)))}function kk(e="light"){return e==="dark"?{main:ai[200],light:ai[50],dark:ai[400]}:{main:ai[700],light:ai[400],dark:ai[800]}}function _k(e="light"){return e==="dark"?{main:ii[200],light:ii[50],dark:ii[400]}:{main:ii[500],light:ii[300],dark:ii[700]}}function Pk(e="light"){return e==="dark"?{main:oi[500],light:oi[300],dark:oi[700]}:{main:oi[700],light:oi[400],dark:oi[800]}}function Dk(e="light"){return e==="dark"?{main:si[400],light:si[300],dark:si[700]}:{main:si[700],light:si[500],dark:si[900]}}function Ok(e="light"){return e==="dark"?{main:li[400],light:li[300],dark:li[700]}:{main:li[800],light:li[500],dark:li[900]}}function Rk(e="light"){return e==="dark"?{main:po[400],light:po[300],dark:po[700]}:{main:"#ed6c02",light:po[500],dark:po[900]}}function $c(e){const m=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=m,i=Qe(m,["mode","contrastThreshold","tonalOffset"]),o=e.primary||kk(t),a=e.secondary||_k(t),l=e.error||Pk(t),c=e.info||Dk(t),u=e.success||Ok(t),f=e.warning||Rk(t);function d(b){return pk(b,Cp.text.primary)>=n?Cp.text.primary:Ek.text.primary}const p=({color:b,name:C,mainShade:w=500,lightShade:x=300,darkShade:I=700})=>{if(b=B({},b),!b.main&&b[w]&&(b.main=b[w]),!b.hasOwnProperty("main"))throw new Error(_r(11,C?` (${C})`:"",w));if(typeof b.main!="string")throw new Error(_r(12,C?` (${C})`:"",JSON.stringify(b.main)));return wp(b,"light",x,r),wp(b,"dark",I,r),b.contrastText||(b.contrastText=d(b.main)),b};let g;return t==="light"?g=yp():t==="dark"&&(g=xp()),qt(B({common:B({},ho),mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:u,name:"success"}),grey:Tk,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},g),i)}function Mk(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 Lk(e,t){return B({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function Bk(e){return Math.round(e*1e5)/1e5}const Sp={textTransform:"uppercase"},Ip='"Roboto", "Helvetica", "Arial", sans-serif';function $k(e,t){const b=typeof t=="function"?t(e):t,{fontFamily:n=Ip,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:f}=b,d=Qe(b,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),p=r/14,g=f||(C=>`${C/c*p}rem`),v=(C,w,x,I,S)=>B(B(B({fontFamily:n,fontWeight:C,fontSize:g(w),lineHeight:x},n===Ip?{letterSpacing:`${Bk(I/w)}em`}:{}),S),u),m={h1:v(i,96,1.167,-1.5),h2:v(i,60,1.2,-.5),h3:v(o,48,1.167,0),h4:v(o,34,1.235,.25),h5:v(o,24,1.334,0),h6:v(a,20,1.6,.15),subtitle1:v(o,16,1.75,.15),subtitle2:v(a,14,1.57,.1),body1:v(o,16,1.5,.15),body2:v(o,14,1.43,.15),button:v(a,14,1.75,.4,Sp),caption:v(o,12,1.66,.4),overline:v(o,12,2.66,1,Sp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return qt(B({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},m),d,{clone:!1})}const Fk=.2,Nk=.14,zk=.12;function qe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Fk})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Nk})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${zk})`].join(",")}const jk=["none",qe(0,2,1,-1,0,1,1,0,0,1,3,0),qe(0,3,1,-2,0,2,2,0,0,1,5,0),qe(0,3,3,-2,0,3,4,0,0,1,8,0),qe(0,2,4,-1,0,4,5,0,0,1,10,0),qe(0,3,5,-1,0,5,8,0,0,1,14,0),qe(0,3,5,-1,0,6,10,0,0,1,18,0),qe(0,4,5,-2,0,7,10,1,0,2,16,1),qe(0,5,5,-3,0,8,10,1,0,3,14,2),qe(0,5,6,-3,0,9,12,1,0,3,16,2),qe(0,6,6,-3,0,10,14,1,0,4,18,3),qe(0,6,7,-4,0,11,15,1,0,4,20,3),qe(0,7,8,-4,0,12,17,2,0,5,22,4),qe(0,7,8,-4,0,13,19,2,0,5,24,4),qe(0,7,9,-4,0,14,21,2,0,5,26,4),qe(0,8,9,-5,0,15,22,2,0,6,28,5),qe(0,8,10,-5,0,16,24,2,0,6,30,5),qe(0,8,11,-5,0,17,26,2,0,6,32,5),qe(0,9,11,-5,0,18,28,2,0,7,34,6),qe(0,9,12,-6,0,19,29,2,0,7,36,6),qe(0,10,13,-6,0,20,31,3,0,8,38,7),qe(0,10,13,-6,0,21,33,3,0,8,40,7),qe(0,10,14,-6,0,22,35,3,0,8,42,7),qe(0,11,14,-7,0,23,36,3,0,9,44,8),qe(0,11,15,-7,0,24,38,3,0,9,46,8)],Uk={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)"},Vk={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ap(e){return`${Math.round(e)}ms`}function Hk(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*_i(t,.25)+t/5)*10),3e3)}function Wk(e){const t=B(B({},Uk),e.easing),n=B(B({},Vk),e.duration);return Q(B({getAutoHeightDuration:Hk,create:(i=["all"],o={})=>{const f=o,{duration:a=n.standard,easing:l=t.easeInOut,delay:c=0}=f,u=Qe(f,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof a=="string"?a:Ap(a)} ${l} ${typeof c=="string"?c:Ap(c)}`).join(",")}},e),{easing:t,duration:n})}const Gk={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Yk(e){return Hn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Tp(e={}){const t=B({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,l]=i[o];!Yk(l)||a.startsWith("unstable_")?delete r[a]:Hn(l)&&(r[a]=B({},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 Fc(e={},...t){const g=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:l={},shape:c}=g,u=Qe(g,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(_r(20));const f=$c(o),d=hp(e);let p=
|
|
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 t_(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const An=e=>{try{return e()}catch(t){}},n_=(e="mui")=>Ck(e);function Nc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Qk(Q(B({},t),{palette:B({mode:i},t==null?void 0:t.palette)}));return}const l=Fc(Q(B({},n),{palette:B({mode:i},t==null?void 0:t.palette)})),{palette:o}=l,a=Qe(l,["palette"]);return e[r]=Q(B({},t),{palette:o,opacity:B(B({},Ep(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||kp(i)}),a}function r_(e={},...t){const F=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Jk,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root"}=F,u=Qe(F,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),f=Object.keys(n)[0],d=r||(n.light&&f!=="light"?"light":f),p=n_(o),W=n,{[d]:g,light:v,dark:m}=W,b=Qe(W,[Ks(d),"light","dark"]),C=B({},b);let w=g;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(w=!0),!w)throw new Error(_r(21,d));const x=Nc(C,w,u,d);v&&!C.light&&Nc(C,v,void 0,"light"),m&&!C.dark&&Nc(C,m,void 0,"dark");let I=Q(B({defaultColorScheme:d},x),{cssVarPrefix:o,colorSchemeSelector:l,rootSelector:c,getCssVar:p,colorSchemes:C,font:B(B({},Mk(x.typography)),x.font),spacing:t_(u.spacing)});Object.keys(I.colorSchemes).forEach(O=>{const T=I.colorSchemes[O].palette,N=H=>{const j=H.split("-"),$=j[1],M=j[2];return p(H,T[$][M])};if(T.mode==="light"&&(re(T.common,"background","#fff"),re(T.common,"onBackground","#000")),T.mode==="dark"&&(re(T.common,"background","#000"),re(T.common,"onBackground","#fff")),e_(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){re(T.Alert,"errorColor",Ue(T.error.light,.6)),re(T.Alert,"infoColor",Ue(T.info.light,.6)),re(T.Alert,"successColor",Ue(T.success.light,.6)),re(T.Alert,"warningColor",Ue(T.warning.light,.6)),re(T.Alert,"errorFilledBg",N("palette-error-main")),re(T.Alert,"infoFilledBg",N("palette-info-main")),re(T.Alert,"successFilledBg",N("palette-success-main")),re(T.Alert,"warningFilledBg",N("palette-warning-main")),re(T.Alert,"errorFilledColor",An(()=>T.getContrastText(T.error.main))),re(T.Alert,"infoFilledColor",An(()=>T.getContrastText(T.info.main))),re(T.Alert,"successFilledColor",An(()=>T.getContrastText(T.success.main))),re(T.Alert,"warningFilledColor",An(()=>T.getContrastText(T.warning.main))),re(T.Alert,"errorStandardBg",Ve(T.error.light,.9)),re(T.Alert,"infoStandardBg",Ve(T.info.light,.9)),re(T.Alert,"successStandardBg",Ve(T.success.light,.9)),re(T.Alert,"warningStandardBg",Ve(T.warning.light,.9)),re(T.Alert,"errorIconColor",N("palette-error-main")),re(T.Alert,"infoIconColor",N("palette-info-main")),re(T.Alert,"successIconColor",N("palette-success-main")),re(T.Alert,"warningIconColor",N("palette-warning-main")),re(T.AppBar,"defaultBg",N("palette-grey-100")),re(T.Avatar,"defaultBg",N("palette-grey-400")),re(T.Button,"inheritContainedBg",N("palette-grey-300")),re(T.Button,"inheritContainedHoverBg",N("palette-grey-A100")),re(T.Chip,"defaultBorder",N("palette-grey-400")),re(T.Chip,"defaultAvatarColor",N("palette-grey-700")),re(T.Chip,"defaultIconColor",N("palette-grey-700")),re(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),re(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),re(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),re(T.LinearProgress,"primaryBg",Ve(T.primary.main,.62)),re(T.LinearProgress,"secondaryBg",Ve(T.secondary.main,.62)),re(T.LinearProgress,"errorBg",Ve(T.error.main,.62)),re(T.LinearProgress,"infoBg",Ve(T.info.main,.62)),re(T.LinearProgress,"successBg",Ve(T.success.main,.62)),re(T.LinearProgress,"warningBg",Ve(T.warning.main,.62)),re(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.11)`),re(T.Slider,"primaryTrack",Ve(T.primary.main,.62)),re(T.Slider,"secondaryTrack",Ve(T.secondary.main,.62)),re(T.Slider,"errorTrack",Ve(T.error.main,.62)),re(T.Slider,"infoTrack",Ve(T.info.main,.62)),re(T.Slider,"successTrack",Ve(T.success.main,.62)),re(T.Slider,"warningTrack",Ve(T.warning.main,.62));const H=ns(T.background.default,.8);re(T.SnackbarContent,"bg",H),re(T.SnackbarContent,"color",An(()=>T.getContrastText(H))),re(T.SpeedDialAction,"fabHoverBg",ns(T.background.paper,.15)),re(T.StepConnector,"border",N("palette-grey-400")),re(T.StepContent,"border",N("palette-grey-400")),re(T.Switch,"defaultColor",N("palette-common-white")),re(T.Switch,"defaultDisabledColor",N("palette-grey-100")),re(T.Switch,"primaryDisabledColor",Ve(T.primary.main,.62)),re(T.Switch,"secondaryDisabledColor",Ve(T.secondary.main,.62)),re(T.Switch,"errorDisabledColor",Ve(T.error.main,.62)),re(T.Switch,"infoDisabledColor",Ve(T.info.main,.62)),re(T.Switch,"successDisabledColor",Ve(T.success.main,.62)),re(T.Switch,"warningDisabledColor",Ve(T.warning.main,.62)),re(T.TableCell,"border",Ve(ts(T.divider,1),.88)),re(T.Tooltip,"bg",ts(T.grey[700],.92))}if(T.mode==="dark"){re(T.Alert,"errorColor",Ve(T.error.light,.6)),re(T.Alert,"infoColor",Ve(T.info.light,.6)),re(T.Alert,"successColor",Ve(T.success.light,.6)),re(T.Alert,"warningColor",Ve(T.warning.light,.6)),re(T.Alert,"errorFilledBg",N("palette-error-dark")),re(T.Alert,"infoFilledBg",N("palette-info-dark")),re(T.Alert,"successFilledBg",N("palette-success-dark")),re(T.Alert,"warningFilledBg",N("palette-warning-dark")),re(T.Alert,"errorFilledColor",An(()=>T.getContrastText(T.error.dark))),re(T.Alert,"infoFilledColor",An(()=>T.getContrastText(T.info.dark))),re(T.Alert,"successFilledColor",An(()=>T.getContrastText(T.success.dark))),re(T.Alert,"warningFilledColor",An(()=>T.getContrastText(T.warning.dark))),re(T.Alert,"errorStandardBg",Ue(T.error.light,.9)),re(T.Alert,"infoStandardBg",Ue(T.info.light,.9)),re(T.Alert,"successStandardBg",Ue(T.success.light,.9)),re(T.Alert,"warningStandardBg",Ue(T.warning.light,.9)),re(T.Alert,"errorIconColor",N("palette-error-main")),re(T.Alert,"infoIconColor",N("palette-info-main")),re(T.Alert,"successIconColor",N("palette-success-main")),re(T.Alert,"warningIconColor",N("palette-warning-main")),re(T.AppBar,"defaultBg",N("palette-grey-900")),re(T.AppBar,"darkBg",N("palette-background-paper")),re(T.AppBar,"darkColor",N("palette-text-primary")),re(T.Avatar,"defaultBg",N("palette-grey-600")),re(T.Button,"inheritContainedBg",N("palette-grey-800")),re(T.Button,"inheritContainedHoverBg",N("palette-grey-700")),re(T.Chip,"defaultBorder",N("palette-grey-700")),re(T.Chip,"defaultAvatarColor",N("palette-grey-300")),re(T.Chip,"defaultIconColor",N("palette-grey-300")),re(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),re(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),re(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),re(T.LinearProgress,"primaryBg",Ue(T.primary.main,.5)),re(T.LinearProgress,"secondaryBg",Ue(T.secondary.main,.5)),re(T.LinearProgress,"errorBg",Ue(T.error.main,.5)),re(T.LinearProgress,"infoBg",Ue(T.info.main,.5)),re(T.LinearProgress,"successBg",Ue(T.success.main,.5)),re(T.LinearProgress,"warningBg",Ue(T.warning.main,.5)),re(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.13)`),re(T.Slider,"primaryTrack",Ue(T.primary.main,.5)),re(T.Slider,"secondaryTrack",Ue(T.secondary.main,.5)),re(T.Slider,"errorTrack",Ue(T.error.main,.5)),re(T.Slider,"infoTrack",Ue(T.info.main,.5)),re(T.Slider,"successTrack",Ue(T.success.main,.5)),re(T.Slider,"warningTrack",Ue(T.warning.main,.5));const H=ns(T.background.default,.98);re(T.SnackbarContent,"bg",H),re(T.SnackbarContent,"color",An(()=>T.getContrastText(H))),re(T.SpeedDialAction,"fabHoverBg",ns(T.background.paper,.15)),re(T.StepConnector,"border",N("palette-grey-600")),re(T.StepContent,"border",N("palette-grey-600")),re(T.Switch,"defaultColor",N("palette-grey-300")),re(T.Switch,"defaultDisabledColor",N("palette-grey-600")),re(T.Switch,"primaryDisabledColor",Ue(T.primary.main,.55)),re(T.Switch,"secondaryDisabledColor",Ue(T.secondary.main,.55)),re(T.Switch,"errorDisabledColor",Ue(T.error.main,.55)),re(T.Switch,"infoDisabledColor",Ue(T.info.main,.55)),re(T.Switch,"successDisabledColor",Ue(T.success.main,.55)),re(T.Switch,"warningDisabledColor",Ue(T.warning.main,.55)),re(T.TableCell,"border",Ue(ts(T.divider,1),.68)),re(T.Tooltip,"bg",ts(T.grey[700],.92))}Gn(T.background,"default"),Gn(T.background,"paper"),Gn(T.common,"background"),Gn(T.common,"onBackground"),Gn(T,"divider"),Object.keys(T).forEach(H=>{const j=T[H];H!=="tonalOffset"&&j&&typeof j=="object"&&(j.main&&re(T[H],"mainChannel",fo(go(j.main))),j.light&&re(T[H],"lightChannel",fo(go(j.light))),j.dark&&re(T[H],"darkChannel",fo(go(j.dark))),j.contrastText&&re(T[H],"contrastTextChannel",fo(go(j.contrastText))),H==="text"&&(Gn(T[H],"primary"),Gn(T[H],"secondary")),H==="action"&&(j.active&&Gn(T[H],"active"),j.selected&&Gn(T[H],"selected")))})}),I=t.reduce((O,T)=>Qt(O,T),I);const S={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:Zk(I)},{vars:A,generateThemeVars:E,generateStyleSheets:k}=Ik(I,S);return I.vars=A,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([O,T])=>{I[O]=T}),I.generateThemeVars=E,I.generateStyleSheets=k,I.generateSpacing=function(){return fp(u.spacing,kc(this))},I.getColorSchemeSelector=Ak(l),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=a,I.unstable_sxConfig=B(B({},Ja),u==null?void 0:u.unstable_sxConfig),I.unstable_sx=function(T){return ri({sx:T,theme:this})},I.toRuntimeSource=Tp,I}function _p(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=Q(B({},n!==!0&&n),{palette:$c(Q(B({},n===!0?{}:n.palette),{mode:t}))}))}function i_(e={},...t){const f=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=f,a=Qe(f,["palette","cssVariables","colorSchemes","defaultColorScheme"]),l=o||"light",c=i==null?void 0:i[l],u=B(B({},i),n?{[l]:Q(B({},typeof c!="boolean"&&c),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Fc(e,...t);let d=n;"palette"in e||u[l]&&(u[l]!==!0?d=u[l].palette:l==="dark"&&(d={mode:"dark"}));const p=Fc(Q(B({},e),{palette:d}),...t);return p.defaultColorScheme=l,p.colorSchemes=u,p.palette.mode==="light"&&(p.colorSchemes.light=Q(B({},u.light!==!0&&u.light),{palette:p.palette}),_p(p,"dark",u.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark=Q(B({},u.dark!==!0&&u.dark),{palette:p.palette}),_p(p,"light",u.light)),p}return!n&&!("light"in u)&&l==="light"&&(u.light=!0),r_(B(Q(B({},a),{colorSchemes:u,defaultColorScheme:l}),typeof r!="boolean"&&r),...t)}const o_=i_(),a_="$$material";function s_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const l_=sk({themeId:a_,defaultTheme:o_,rootShouldForwardProp:e=>s_(e)&&e!=="classes"}),c_=xk;function u_(e){return yk(e)}function d_(e){return np("MuiSvgIcon",e)}QT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const f_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${ti(t)}`,`fontSize${ti(n)}`]};return YT(i,d_,r)},h_=l_("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ti(n.color)}`],t[`fontSize${ti(n.fontSize)}`]]}})(c_(({theme:e})=>{var t,n,r,i,o,a,l,c,u,f,d,p,g,v,m,b,C,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:x=>!x.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:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:d.call(f,35))||"2.1875rem"}},...Object.entries(((p=e.vars)!=null?p:e).palette).filter(([,x])=>x&&x.main).map(([x])=>{var I,S,A;return{props:{color:x},style:{color:(A=(S=((I=e.vars)!=null?I:e).palette)==null?void 0:S[x])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(m=(v=((g=e.vars)!=null?g:e).palette)==null?void 0:v.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(w=(C=((b=e.vars)!=null?b:e).palette)==null?void 0:C.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),zc=K.forwardRef(function(t,n){const r=u_({props:t,name:"MuiSvgIcon"}),w=r,{children:i,className:o,color:a="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:p="0 0 24 24"}=w,g=Qe(w,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),v=K.isValidElement(i)&&i.type==="svg",m=Q(B({},r),{color:a,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v}),b={};f||(b.viewBox=p);const C=f_(m);return s.jsxs(h_,Q(B(B(B({as:l,className:zn(C.root,o),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},b),g),v&&i.props),{ownerState:m,children:[v?i.props.children:i,d?s.jsx("title",{children:d}):null]}))});zc.muiName="SvgIcon";function Be(e,t){function n(r,i){return s.jsx(zc,Q(B({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=zc.muiName,K.memo(K.forwardRef(n))}const jc=Be(s.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"),p_=Be(s.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"),g_=Be(s.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 m_(e){return ut("MuiTabPanel",e)}Ke("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const v_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],b_=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${we(n)}`,o,r&&`variant${we(r)}`,i&&`color${we(i)}`,n&&`size${we(n)}`]};return pt(a,m_,{})},y_=ye("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return R({display:t.hidden?"none":"block",padding:"var(--Tabs-spacing)",flexGrow:1,fontFamily:e.vars.fontFamily.body},e.typography[`body-${t.size}`],(n=e.variants[t.variant])==null?void 0:n[t.color])}),ci=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyTabPanel"}),{orientation:i}=_a()||{orientation:"horizontal"},o=K.useContext(Sc),{children:a,value:l=0,component:c,color:u="neutral",variant:f="plain",size:d,slots:p={},slotProps:g={},keepMounted:v=!1}=r,m=De(r,v_),{hidden:b,getRootProps:C}=lA(R({},r,{value:l})),w=d!=null?d:o,x=R({},r,{orientation:i,hidden:b,size:w,color:u,variant:f}),I=b_(x),S=R({},m,{component:c,slots:p,slotProps:g}),[A,E]=Ee("root",{ref:n,elementType:y_,getSlotProps:C,externalForwardedProps:S,additionalProps:{role:"tabpanel",ref:n,as:c},ownerState:x,className:I.root});return v?s.jsx(A,R({},E,{children:a})):s.jsx(A,R({},E,{children:!b&&a}))});function x_(e){return ut("MuiInput",e)}const Pp=Ke("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"]),rs=K.createContext(void 0),C_=["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 w_(e,t){var n;const r=K.useContext(rs),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:c,className:u,defaultValue:f,disabled:d,disabledInProp:p,error:g,id:v,name:m,onClick:b,onChange:C,onKeyDown:w,onKeyUp:x,onFocus:I,onBlur:S,placeholder:A,readOnly:E,required:k,type:F,value:W}=e,O=De(e,C_),{getRootProps:T,getInputProps:N,focused:H,error:j,disabled:$}=SI({disabled:(n=p!=null?p:r==null?void 0:r.disabled)!=null?n:d,defaultValue:f,error:g,onBlur:S,onClick:b,onChange:C,onFocus:I,required:k!=null?k:r==null?void 0:r.required,value:W}),M={[t.disabled]:$,[t.error]:j,[t.focused]:H,[t.formControl]:!!r,[u]:u},V={[t.disabled]:$};return R({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:c,disabled:$,id:v,onKeyDown:w,onKeyUp:x,name:m,placeholder:A,readOnly:E,type:F},rootStateClasses:M,inputStateClasses:V,getRootProps:T,getInputProps:N,focused:H,error:j,disabled:$},O)}const Uc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,mo="data-skip-inverted-colors",Dp=`& :not([${mo}], [${mo}] *)`,Op=e=>{var t,n,r,i,o,a,l,c,u,f,d,p,g,v,m,b,C,w,x,I,S,A;const E=Uc(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")]:`${(c=e.colorSchemes.light)==null?void 0:c.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(u=e.colorSchemes.light)==null?void 0:u.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(p=e.colorSchemes.dark)==null?void 0:p.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.body} !important`,[E("--palette-background-surface")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(C=e.colorSchemes.dark)==null?void 0:C.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(x=e.colorSchemes.dark)==null?void 0:x.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(I=e.colorSchemes.dark)==null?void 0:I.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function S_(e){return e.theme!==void 0}const I_=e=>t=>{const n=S_(t)?t.theme:t,r=uc(n.cssVarPrefix),i=Uc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[Dp]:{"--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)`}},[`&, & [${mo}]`]:Op(n)}},A_=e=>t=>{const{theme:n=t}=t,r=uc(n.cssVarPrefix),i=Uc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[Dp]:{"--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)`}},[`&, & [${mo}]`]:Op(n)}},T_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],E_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${we(r)}`,i&&`color${we(i)}`,o&&`size${we(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return pt(a,x_,{})},k_=ye("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;const c=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[R({"--Input-radius":e.vars.radius.sm,"--Input-gap":"0.5rem","--Input-placeholderColor":"inherit","--Input-placeholderOpacity":.64,"--Input-decoratorColor":e.vars.palette.text.icon,"--Input-focused":"0","--Input-focusedThickness":e.vars.focus.thickness,"--Input-focusedHighlight":(r=e.vars.palette[t.color==="neutral"?"primary":t.color])==null?void 0:r[500],[`&:not([${mo}])`]:R({},t.instanceColor&&{"--_Input-focusedHighlight":(i=e.vars.palette[t.instanceColor==="neutral"?"primary":t.instanceColor])==null?void 0:i[500]},{"--Input-focusedHighlight":`var(--_Input-focusedHighlight, ${e.vars.palette.focusVisible})`})},t.size==="sm"&&{"--Input-minHeight":"2rem","--Input-paddingInline":"0.5rem","--Input-decoratorChildHeight":"min(1.5rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},t.size==="md"&&{"--Input-minHeight":"2.25rem","--Input-paddingInline":"0.75rem","--Input-decoratorChildHeight":"min(1.75rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},t.size==="lg"&&{"--Input-minHeight":"2.75rem","--Input-paddingInline":"1rem","--Input-gap":"0.75rem","--Input-decoratorChildHeight":"min(2.25rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Input-decoratorChildOffset":"min(calc(var(--Input-paddingInline) - (var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2), var(--Input-paddingInline))","--_Input-paddingBlock":"max((var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2, 0px)","--Input-decoratorChildRadius":"max(var(--Input-radius) - var(--variant-borderWidth, 0px) - var(--_Input-paddingBlock), min(var(--_Input-paddingBlock) + var(--variant-borderWidth, 0px), var(--Input-radius) / 2))","--Button-minHeight":"var(--Input-decoratorChildHeight)","--Button-paddingBlock":"0px","--IconButton-size":"var(--Input-decoratorChildHeight)","--Button-radius":"var(--Input-decoratorChildRadius)","--IconButton-radius":"var(--Input-decoratorChildRadius)",boxSizing:"border-box"},t.variant!=="plain"&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Input-minHeight)"},t.fullWidth&&{width:"100%"},{cursor:"text",position:"relative",display:"flex",paddingInline:"var(--Input-paddingInline)",borderRadius:"var(--Input-radius)"},e.typography[`body-${t.size}`],c,{backgroundColor:(o=c==null?void 0:c.backgroundColor)!=null?o:e.vars.palette.background.surface,"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Input-focusedInset, inset) 0 0 0 calc(var(--Input-focused) * var(--Input-focusedThickness)) var(--Input-focusedHighlight)"}}),{"&:hover":R({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${Pp.disabled}`]:(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),__=ye("input")(({ownerState:e})=>({border:"none",minWidth:0,outline:0,padding:0,flex:1,color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit",textOverflow:"ellipsis","&:-webkit-autofill":R({paddingInline:"var(--Input-paddingInline)"},!e.startDecorator&&{marginInlineStart:"calc(-1 * var(--Input-paddingInline))",paddingInlineStart:"var(--Input-paddingInline)",borderTopLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"},!e.endDecorator&&{marginInlineEnd:"calc(-1 * var(--Input-paddingInline))",paddingInlineEnd:"var(--Input-paddingInline)",borderTopRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"}),"&::-webkit-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"}})),P_=ye("div")({"--Button-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Input-paddingInline) / -4)",display:"inherit",alignItems:"center",paddingBlock:"var(--unstable_InputPaddingBlock)",flexWrap:"wrap",marginInlineEnd:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),D_=ye("div")({"--Button-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Input-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",marginInlineStart:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),O_=ye(k_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),R_=ye(__,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),M_=ye(P_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),L_=ye(D_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),is=K.forwardRef(function(t,n){var r,i,o,a,l,c;const u=gt({props:t,name:"JoyInput"}),f=w_(R({},u,{disabledInProp:t.disabled}),Pp),{propsToForward:d,rootStateClasses:p,inputStateClasses:g,getRootProps:v,getInputProps:m,formControl:b,focused:C,error:w=!1,disabled:x,fullWidth:I=!1,size:S="md",color:A="neutral",variant:E="outlined",startDecorator:k,endDecorator:F,component:W,slots:O={},slotProps:T={}}=f,N=De(f,T_),H=(r=(i=t.error)!=null?i:b==null?void 0:b.error)!=null?r:w,j=(o=(a=t.size)!=null?a:b==null?void 0:b.size)!=null?o:S,$=(l=t.color)!=null?l:H?"danger":(c=b==null?void 0:b.color)!=null?c:A,M=R({instanceColor:H?"danger":t.color},u,{fullWidth:I,color:$,disabled:x,error:H,focused:C,size:j,variant:E}),V=E_(M),Y=R({},N,{component:W,slots:O,slotProps:T}),[X,D]=Ee("root",{ref:n,className:[V.root,p],elementType:O_,getSlotProps:v,externalForwardedProps:Y,ownerState:M}),[L,U]=Ee("input",R({},b&&{additionalProps:{id:b.htmlFor,"aria-describedby":b["aria-describedby"]}},{className:[V.input,g],elementType:R_,getSlotProps:m,internalForwardedProps:d,externalForwardedProps:Y,ownerState:M})),[G,oe]=Ee("startDecorator",{className:V.startDecorator,elementType:M_,externalForwardedProps:Y,ownerState:M}),[ce,se]=Ee("endDecorator",{className:V.endDecorator,elementType:L_,externalForwardedProps:Y,ownerState:M});return s.jsxs(X,R({},D,{children:[k&&s.jsx(G,R({},oe,{children:k})),s.jsx(L,R({},U)),F&&s.jsx(ce,R({},se,{children:F}))]}))}),Ot=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,endDecorator:l=void 0,onChange:c})=>s.jsxs(h.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{required:i,color:"primary",children:e}),s.jsx(is,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,endDecorator:l,onChange:c,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Rp=Be(s.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 B_(e){return ut("MuiCircularProgress",e)}Ke("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let $_=e=>e,Mp;const F_=["color","backgroundColor"],N_=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],z_=me.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),j_=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${we(n)}`,r&&`variant${we(r)}`,i&&`size${we(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return pt(o,B_,{})};function ui(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const U_=ye("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i,o;const a=((n=t.variants[e.variant])==null?void 0:n[e.color])||{},{color:l,backgroundColor:c}=a,u=De(a,F_);return R({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":c,"--CircularProgress-progressColor":l,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":ui("track","3px"),"--_progress-thickness":ui("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":ui("track","6px"),"--_progress-thickness":ui("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":ui("track","8px"),"--_progress-thickness":ui("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))"},u,e.variant==="outlined"&&{"&::before":R({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},u)},e.variant==="soft"&&{"--CircularProgress-trackColor":t.variants.soft.neutral.backgroundColor,"--CircularProgress-progressColor":(r=t.variants.solid)==null?void 0:r[e.color].backgroundColor},e.variant==="solid"&&{"--CircularProgress-trackColor":(i=t.variants.softHover)==null?void 0:i[e.color].backgroundColor,"--CircularProgress-progressColor":(o=t.variants.solid)==null?void 0:o[e.color].backgroundColor})}),V_=ye("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),H_=ye("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),W_=ye("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&me.css(Mp||(Mp=$_`
|
|
2346
|
+
export default theme;`}function Fc(e={},...t){const g=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:l={},shape:c}=g,u=Qe(g,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(_r(20));const f=$c(o),d=hp(e);let p=qt(d,{mixins:Lk(d.breakpoints,r),palette:f,shadows:jk.slice(),typography:$k(f,l),transitions:Wk(a),zIndex:B({},Gk)});return p=qt(p,u),p=t.reduce((v,m)=>qt(v,m),p),p.unstable_sxConfig=B(B({},Ja),u==null?void 0:u.unstable_sxConfig),p.unstable_sx=function(m){return ri({sx:m,theme:this})},p.toRuntimeSource=Tp,p}function Kk(e){let t;return e<1?t=5.11916*_i(e,2):t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const qk=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Kk(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ep(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function kp(e){return e==="dark"?qk:[]}function Qk(e){const a=e,{palette:t={mode:"light"},opacity:n,overlays:r}=a,i=Qe(a,["palette","opacity","overlays"]),o=$c(t);return B({palette:o,opacity:B(B({},Ep(o.mode)),n),overlays:r||kp(o.mode)},i)}function Jk(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 Xk=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Zk=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 Xk(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]:B(B({},n),a)}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function e_(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function re(e,t,n){!e[t]&&n&&(e[t]=n)}function go(e){return typeof e!="string"||!e.startsWith("hsl")?e:mp(e)}function Gn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=fo(go(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 t_(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const An=e=>{try{return e()}catch(t){}},n_=(e="mui")=>Ck(e);function Nc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Qk(Q(B({},t),{palette:B({mode:i},t==null?void 0:t.palette)}));return}const l=Fc(Q(B({},n),{palette:B({mode:i},t==null?void 0:t.palette)})),{palette:o}=l,a=Qe(l,["palette"]);return e[r]=Q(B({},t),{palette:o,opacity:B(B({},Ep(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||kp(i)}),a}function r_(e={},...t){const F=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Jk,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root"}=F,u=Qe(F,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),f=Object.keys(n)[0],d=r||(n.light&&f!=="light"?"light":f),p=n_(o),W=n,{[d]:g,light:v,dark:m}=W,b=Qe(W,[Ks(d),"light","dark"]),C=B({},b);let w=g;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(w=!0),!w)throw new Error(_r(21,d));const x=Nc(C,w,u,d);v&&!C.light&&Nc(C,v,void 0,"light"),m&&!C.dark&&Nc(C,m,void 0,"dark");let I=Q(B({defaultColorScheme:d},x),{cssVarPrefix:o,colorSchemeSelector:l,rootSelector:c,getCssVar:p,colorSchemes:C,font:B(B({},Mk(x.typography)),x.font),spacing:t_(u.spacing)});Object.keys(I.colorSchemes).forEach(O=>{const T=I.colorSchemes[O].palette,N=H=>{const j=H.split("-"),$=j[1],M=j[2];return p(H,T[$][M])};if(T.mode==="light"&&(re(T.common,"background","#fff"),re(T.common,"onBackground","#000")),T.mode==="dark"&&(re(T.common,"background","#000"),re(T.common,"onBackground","#fff")),e_(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){re(T.Alert,"errorColor",Ue(T.error.light,.6)),re(T.Alert,"infoColor",Ue(T.info.light,.6)),re(T.Alert,"successColor",Ue(T.success.light,.6)),re(T.Alert,"warningColor",Ue(T.warning.light,.6)),re(T.Alert,"errorFilledBg",N("palette-error-main")),re(T.Alert,"infoFilledBg",N("palette-info-main")),re(T.Alert,"successFilledBg",N("palette-success-main")),re(T.Alert,"warningFilledBg",N("palette-warning-main")),re(T.Alert,"errorFilledColor",An(()=>T.getContrastText(T.error.main))),re(T.Alert,"infoFilledColor",An(()=>T.getContrastText(T.info.main))),re(T.Alert,"successFilledColor",An(()=>T.getContrastText(T.success.main))),re(T.Alert,"warningFilledColor",An(()=>T.getContrastText(T.warning.main))),re(T.Alert,"errorStandardBg",Ve(T.error.light,.9)),re(T.Alert,"infoStandardBg",Ve(T.info.light,.9)),re(T.Alert,"successStandardBg",Ve(T.success.light,.9)),re(T.Alert,"warningStandardBg",Ve(T.warning.light,.9)),re(T.Alert,"errorIconColor",N("palette-error-main")),re(T.Alert,"infoIconColor",N("palette-info-main")),re(T.Alert,"successIconColor",N("palette-success-main")),re(T.Alert,"warningIconColor",N("palette-warning-main")),re(T.AppBar,"defaultBg",N("palette-grey-100")),re(T.Avatar,"defaultBg",N("palette-grey-400")),re(T.Button,"inheritContainedBg",N("palette-grey-300")),re(T.Button,"inheritContainedHoverBg",N("palette-grey-A100")),re(T.Chip,"defaultBorder",N("palette-grey-400")),re(T.Chip,"defaultAvatarColor",N("palette-grey-700")),re(T.Chip,"defaultIconColor",N("palette-grey-700")),re(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),re(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),re(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),re(T.LinearProgress,"primaryBg",Ve(T.primary.main,.62)),re(T.LinearProgress,"secondaryBg",Ve(T.secondary.main,.62)),re(T.LinearProgress,"errorBg",Ve(T.error.main,.62)),re(T.LinearProgress,"infoBg",Ve(T.info.main,.62)),re(T.LinearProgress,"successBg",Ve(T.success.main,.62)),re(T.LinearProgress,"warningBg",Ve(T.warning.main,.62)),re(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.11)`),re(T.Slider,"primaryTrack",Ve(T.primary.main,.62)),re(T.Slider,"secondaryTrack",Ve(T.secondary.main,.62)),re(T.Slider,"errorTrack",Ve(T.error.main,.62)),re(T.Slider,"infoTrack",Ve(T.info.main,.62)),re(T.Slider,"successTrack",Ve(T.success.main,.62)),re(T.Slider,"warningTrack",Ve(T.warning.main,.62));const H=ns(T.background.default,.8);re(T.SnackbarContent,"bg",H),re(T.SnackbarContent,"color",An(()=>T.getContrastText(H))),re(T.SpeedDialAction,"fabHoverBg",ns(T.background.paper,.15)),re(T.StepConnector,"border",N("palette-grey-400")),re(T.StepContent,"border",N("palette-grey-400")),re(T.Switch,"defaultColor",N("palette-common-white")),re(T.Switch,"defaultDisabledColor",N("palette-grey-100")),re(T.Switch,"primaryDisabledColor",Ve(T.primary.main,.62)),re(T.Switch,"secondaryDisabledColor",Ve(T.secondary.main,.62)),re(T.Switch,"errorDisabledColor",Ve(T.error.main,.62)),re(T.Switch,"infoDisabledColor",Ve(T.info.main,.62)),re(T.Switch,"successDisabledColor",Ve(T.success.main,.62)),re(T.Switch,"warningDisabledColor",Ve(T.warning.main,.62)),re(T.TableCell,"border",Ve(ts(T.divider,1),.88)),re(T.Tooltip,"bg",ts(T.grey[700],.92))}if(T.mode==="dark"){re(T.Alert,"errorColor",Ve(T.error.light,.6)),re(T.Alert,"infoColor",Ve(T.info.light,.6)),re(T.Alert,"successColor",Ve(T.success.light,.6)),re(T.Alert,"warningColor",Ve(T.warning.light,.6)),re(T.Alert,"errorFilledBg",N("palette-error-dark")),re(T.Alert,"infoFilledBg",N("palette-info-dark")),re(T.Alert,"successFilledBg",N("palette-success-dark")),re(T.Alert,"warningFilledBg",N("palette-warning-dark")),re(T.Alert,"errorFilledColor",An(()=>T.getContrastText(T.error.dark))),re(T.Alert,"infoFilledColor",An(()=>T.getContrastText(T.info.dark))),re(T.Alert,"successFilledColor",An(()=>T.getContrastText(T.success.dark))),re(T.Alert,"warningFilledColor",An(()=>T.getContrastText(T.warning.dark))),re(T.Alert,"errorStandardBg",Ue(T.error.light,.9)),re(T.Alert,"infoStandardBg",Ue(T.info.light,.9)),re(T.Alert,"successStandardBg",Ue(T.success.light,.9)),re(T.Alert,"warningStandardBg",Ue(T.warning.light,.9)),re(T.Alert,"errorIconColor",N("palette-error-main")),re(T.Alert,"infoIconColor",N("palette-info-main")),re(T.Alert,"successIconColor",N("palette-success-main")),re(T.Alert,"warningIconColor",N("palette-warning-main")),re(T.AppBar,"defaultBg",N("palette-grey-900")),re(T.AppBar,"darkBg",N("palette-background-paper")),re(T.AppBar,"darkColor",N("palette-text-primary")),re(T.Avatar,"defaultBg",N("palette-grey-600")),re(T.Button,"inheritContainedBg",N("palette-grey-800")),re(T.Button,"inheritContainedHoverBg",N("palette-grey-700")),re(T.Chip,"defaultBorder",N("palette-grey-700")),re(T.Chip,"defaultAvatarColor",N("palette-grey-300")),re(T.Chip,"defaultIconColor",N("palette-grey-300")),re(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),re(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),re(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),re(T.LinearProgress,"primaryBg",Ue(T.primary.main,.5)),re(T.LinearProgress,"secondaryBg",Ue(T.secondary.main,.5)),re(T.LinearProgress,"errorBg",Ue(T.error.main,.5)),re(T.LinearProgress,"infoBg",Ue(T.info.main,.5)),re(T.LinearProgress,"successBg",Ue(T.success.main,.5)),re(T.LinearProgress,"warningBg",Ue(T.warning.main,.5)),re(T.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.13)`),re(T.Slider,"primaryTrack",Ue(T.primary.main,.5)),re(T.Slider,"secondaryTrack",Ue(T.secondary.main,.5)),re(T.Slider,"errorTrack",Ue(T.error.main,.5)),re(T.Slider,"infoTrack",Ue(T.info.main,.5)),re(T.Slider,"successTrack",Ue(T.success.main,.5)),re(T.Slider,"warningTrack",Ue(T.warning.main,.5));const H=ns(T.background.default,.98);re(T.SnackbarContent,"bg",H),re(T.SnackbarContent,"color",An(()=>T.getContrastText(H))),re(T.SpeedDialAction,"fabHoverBg",ns(T.background.paper,.15)),re(T.StepConnector,"border",N("palette-grey-600")),re(T.StepContent,"border",N("palette-grey-600")),re(T.Switch,"defaultColor",N("palette-grey-300")),re(T.Switch,"defaultDisabledColor",N("palette-grey-600")),re(T.Switch,"primaryDisabledColor",Ue(T.primary.main,.55)),re(T.Switch,"secondaryDisabledColor",Ue(T.secondary.main,.55)),re(T.Switch,"errorDisabledColor",Ue(T.error.main,.55)),re(T.Switch,"infoDisabledColor",Ue(T.info.main,.55)),re(T.Switch,"successDisabledColor",Ue(T.success.main,.55)),re(T.Switch,"warningDisabledColor",Ue(T.warning.main,.55)),re(T.TableCell,"border",Ue(ts(T.divider,1),.68)),re(T.Tooltip,"bg",ts(T.grey[700],.92))}Gn(T.background,"default"),Gn(T.background,"paper"),Gn(T.common,"background"),Gn(T.common,"onBackground"),Gn(T,"divider"),Object.keys(T).forEach(H=>{const j=T[H];H!=="tonalOffset"&&j&&typeof j=="object"&&(j.main&&re(T[H],"mainChannel",fo(go(j.main))),j.light&&re(T[H],"lightChannel",fo(go(j.light))),j.dark&&re(T[H],"darkChannel",fo(go(j.dark))),j.contrastText&&re(T[H],"contrastTextChannel",fo(go(j.contrastText))),H==="text"&&(Gn(T[H],"primary"),Gn(T[H],"secondary")),H==="action"&&(j.active&&Gn(T[H],"active"),j.selected&&Gn(T[H],"selected")))})}),I=t.reduce((O,T)=>qt(O,T),I);const S={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:Zk(I)},{vars:A,generateThemeVars:E,generateStyleSheets:k}=Ik(I,S);return I.vars=A,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach(([O,T])=>{I[O]=T}),I.generateThemeVars=E,I.generateStyleSheets=k,I.generateSpacing=function(){return fp(u.spacing,kc(this))},I.getColorSchemeSelector=Ak(l),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=a,I.unstable_sxConfig=B(B({},Ja),u==null?void 0:u.unstable_sxConfig),I.unstable_sx=function(T){return ri({sx:T,theme:this})},I.toRuntimeSource=Tp,I}function _p(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=Q(B({},n!==!0&&n),{palette:$c(Q(B({},n===!0?{}:n.palette),{mode:t}))}))}function i_(e={},...t){const f=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=f,a=Qe(f,["palette","cssVariables","colorSchemes","defaultColorScheme"]),l=o||"light",c=i==null?void 0:i[l],u=B(B({},i),n?{[l]:Q(B({},typeof c!="boolean"&&c),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Fc(e,...t);let d=n;"palette"in e||u[l]&&(u[l]!==!0?d=u[l].palette:l==="dark"&&(d={mode:"dark"}));const p=Fc(Q(B({},e),{palette:d}),...t);return p.defaultColorScheme=l,p.colorSchemes=u,p.palette.mode==="light"&&(p.colorSchemes.light=Q(B({},u.light!==!0&&u.light),{palette:p.palette}),_p(p,"dark",u.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark=Q(B({},u.dark!==!0&&u.dark),{palette:p.palette}),_p(p,"light",u.light)),p}return!n&&!("light"in u)&&l==="light"&&(u.light=!0),r_(B(Q(B({},a),{colorSchemes:u,defaultColorScheme:l}),typeof r!="boolean"&&r),...t)}const o_=i_(),a_="$$material";function s_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const l_=sk({themeId:a_,defaultTheme:o_,rootShouldForwardProp:e=>s_(e)&&e!=="classes"}),c_=xk;function u_(e){return yk(e)}function d_(e){return np("MuiSvgIcon",e)}QT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const f_=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${ti(t)}`,`fontSize${ti(n)}`]};return YT(i,d_,r)},h_=l_("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ti(n.color)}`],t[`fontSize${ti(n.fontSize)}`]]}})(c_(({theme:e})=>{var t,n,r,i,o,a,l,c,u,f,d,p,g,v,m,b,C,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:x=>!x.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:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(f=e.typography)==null?void 0:f.pxToRem)==null?void 0:d.call(f,35))||"2.1875rem"}},...Object.entries(((p=e.vars)!=null?p:e).palette).filter(([,x])=>x&&x.main).map(([x])=>{var I,S,A;return{props:{color:x},style:{color:(A=(S=((I=e.vars)!=null?I:e).palette)==null?void 0:S[x])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(m=(v=((g=e.vars)!=null?g:e).palette)==null?void 0:v.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(w=(C=((b=e.vars)!=null?b:e).palette)==null?void 0:C.action)==null?void 0:w.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),zc=K.forwardRef(function(t,n){const r=u_({props:t,name:"MuiSvgIcon"}),w=r,{children:i,className:o,color:a="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:p="0 0 24 24"}=w,g=Qe(w,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),v=K.isValidElement(i)&&i.type==="svg",m=Q(B({},r),{color:a,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v}),b={};f||(b.viewBox=p);const C=f_(m);return s.jsxs(h_,Q(B(B(B({as:l,className:zn(C.root,o),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},b),g),v&&i.props),{ownerState:m,children:[v?i.props.children:i,d?s.jsx("title",{children:d}):null]}))});zc.muiName="SvgIcon";function Be(e,t){function n(r,i){return s.jsx(zc,Q(B({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=zc.muiName,K.memo(K.forwardRef(n))}const jc=Be(s.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"),p_=Be(s.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"),g_=Be(s.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 m_(e){return ut("MuiTabPanel",e)}Ke("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const v_=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],b_=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${we(n)}`,o,r&&`variant${we(r)}`,i&&`color${we(i)}`,n&&`size${we(n)}`]};return pt(a,m_,{})},y_=ye("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return R({display:t.hidden?"none":"block",padding:"var(--Tabs-spacing)",flexGrow:1,fontFamily:e.vars.fontFamily.body},e.typography[`body-${t.size}`],(n=e.variants[t.variant])==null?void 0:n[t.color])}),ci=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyTabPanel"}),{orientation:i}=_a()||{orientation:"horizontal"},o=K.useContext(Sc),{children:a,value:l=0,component:c,color:u="neutral",variant:f="plain",size:d,slots:p={},slotProps:g={},keepMounted:v=!1}=r,m=De(r,v_),{hidden:b,getRootProps:C}=lA(R({},r,{value:l})),w=d!=null?d:o,x=R({},r,{orientation:i,hidden:b,size:w,color:u,variant:f}),I=b_(x),S=R({},m,{component:c,slots:p,slotProps:g}),[A,E]=Ee("root",{ref:n,elementType:y_,getSlotProps:C,externalForwardedProps:S,additionalProps:{role:"tabpanel",ref:n,as:c},ownerState:x,className:I.root});return v?s.jsx(A,R({},E,{children:a})):s.jsx(A,R({},E,{children:!b&&a}))});function x_(e){return ut("MuiInput",e)}const Pp=Ke("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"]),rs=K.createContext(void 0),C_=["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 w_(e,t){var n;const r=K.useContext(rs),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:c,className:u,defaultValue:f,disabled:d,disabledInProp:p,error:g,id:v,name:m,onClick:b,onChange:C,onKeyDown:w,onKeyUp:x,onFocus:I,onBlur:S,placeholder:A,readOnly:E,required:k,type:F,value:W}=e,O=De(e,C_),{getRootProps:T,getInputProps:N,focused:H,error:j,disabled:$}=SI({disabled:(n=p!=null?p:r==null?void 0:r.disabled)!=null?n:d,defaultValue:f,error:g,onBlur:S,onClick:b,onChange:C,onFocus:I,required:k!=null?k:r==null?void 0:r.required,value:W}),M={[t.disabled]:$,[t.error]:j,[t.focused]:H,[t.formControl]:!!r,[u]:u},V={[t.disabled]:$};return R({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:l,autoFocus:c,disabled:$,id:v,onKeyDown:w,onKeyUp:x,name:m,placeholder:A,readOnly:E,type:F},rootStateClasses:M,inputStateClasses:V,getRootProps:T,getInputProps:N,focused:H,error:j,disabled:$},O)}const Uc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,mo="data-skip-inverted-colors",Dp=`& :not([${mo}], [${mo}] *)`,Op=e=>{var t,n,r,i,o,a,l,c,u,f,d,p,g,v,m,b,C,w,x,I,S,A;const E=Uc(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")]:`${(c=e.colorSchemes.light)==null?void 0:c.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(u=e.colorSchemes.light)==null?void 0:u.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(p=e.colorSchemes.dark)==null?void 0:p.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.body} !important`,[E("--palette-background-surface")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(b=e.colorSchemes.dark)==null?void 0:b.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(C=e.colorSchemes.dark)==null?void 0:C.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(x=e.colorSchemes.dark)==null?void 0:x.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(I=e.colorSchemes.dark)==null?void 0:I.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function S_(e){return e.theme!==void 0}const I_=e=>t=>{const n=S_(t)?t.theme:t,r=uc(n.cssVarPrefix),i=Uc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[Dp]:{"--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)`}},[`&, & [${mo}]`]:Op(n)}},A_=e=>t=>{const{theme:n=t}=t,r=uc(n.cssVarPrefix),i=Uc(n.cssVarPrefix),o=a=>{const l=a.split("-");return r(a,n.palette[l[1]][l[2]])};return{[Dp]:{"--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)`}},[`&, & [${mo}]`]:Op(n)}},T_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],E_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${we(r)}`,i&&`color${we(i)}`,o&&`size${we(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return pt(a,x_,{})},k_=ye("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,l;const c=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[R({"--Input-radius":e.vars.radius.sm,"--Input-gap":"0.5rem","--Input-placeholderColor":"inherit","--Input-placeholderOpacity":.64,"--Input-decoratorColor":e.vars.palette.text.icon,"--Input-focused":"0","--Input-focusedThickness":e.vars.focus.thickness,"--Input-focusedHighlight":(r=e.vars.palette[t.color==="neutral"?"primary":t.color])==null?void 0:r[500],[`&:not([${mo}])`]:R({},t.instanceColor&&{"--_Input-focusedHighlight":(i=e.vars.palette[t.instanceColor==="neutral"?"primary":t.instanceColor])==null?void 0:i[500]},{"--Input-focusedHighlight":`var(--_Input-focusedHighlight, ${e.vars.palette.focusVisible})`})},t.size==="sm"&&{"--Input-minHeight":"2rem","--Input-paddingInline":"0.5rem","--Input-decoratorChildHeight":"min(1.5rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},t.size==="md"&&{"--Input-minHeight":"2.25rem","--Input-paddingInline":"0.75rem","--Input-decoratorChildHeight":"min(1.75rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},t.size==="lg"&&{"--Input-minHeight":"2.75rem","--Input-paddingInline":"1rem","--Input-gap":"0.75rem","--Input-decoratorChildHeight":"min(2.25rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Input-decoratorChildOffset":"min(calc(var(--Input-paddingInline) - (var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2), var(--Input-paddingInline))","--_Input-paddingBlock":"max((var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2, 0px)","--Input-decoratorChildRadius":"max(var(--Input-radius) - var(--variant-borderWidth, 0px) - var(--_Input-paddingBlock), min(var(--_Input-paddingBlock) + var(--variant-borderWidth, 0px), var(--Input-radius) / 2))","--Button-minHeight":"var(--Input-decoratorChildHeight)","--Button-paddingBlock":"0px","--IconButton-size":"var(--Input-decoratorChildHeight)","--Button-radius":"var(--Input-decoratorChildRadius)","--IconButton-radius":"var(--Input-decoratorChildRadius)",boxSizing:"border-box"},t.variant!=="plain"&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Input-minHeight)"},t.fullWidth&&{width:"100%"},{cursor:"text",position:"relative",display:"flex",paddingInline:"var(--Input-paddingInline)",borderRadius:"var(--Input-radius)"},e.typography[`body-${t.size}`],c,{backgroundColor:(o=c==null?void 0:c.backgroundColor)!=null?o:e.vars.palette.background.surface,"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Input-focusedInset, inset) 0 0 0 calc(var(--Input-focused) * var(--Input-focusedThickness)) var(--Input-focusedHighlight)"}}),{"&:hover":R({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${Pp.disabled}`]:(l=e.variants[`${t.variant}Disabled`])==null?void 0:l[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),__=ye("input")(({ownerState:e})=>({border:"none",minWidth:0,outline:0,padding:0,flex:1,color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit",textOverflow:"ellipsis","&:-webkit-autofill":R({paddingInline:"var(--Input-paddingInline)"},!e.startDecorator&&{marginInlineStart:"calc(-1 * var(--Input-paddingInline))",paddingInlineStart:"var(--Input-paddingInline)",borderTopLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"},!e.endDecorator&&{marginInlineEnd:"calc(-1 * var(--Input-paddingInline))",paddingInlineEnd:"var(--Input-paddingInline)",borderTopRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"}),"&::-webkit-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"}})),P_=ye("div")({"--Button-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Input-paddingInline) / -4)",display:"inherit",alignItems:"center",paddingBlock:"var(--unstable_InputPaddingBlock)",flexWrap:"wrap",marginInlineEnd:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),D_=ye("div")({"--Button-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Input-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",marginInlineStart:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),O_=ye(k_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),R_=ye(__,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),M_=ye(P_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),L_=ye(D_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),is=K.forwardRef(function(t,n){var r,i,o,a,l,c;const u=gt({props:t,name:"JoyInput"}),f=w_(R({},u,{disabledInProp:t.disabled}),Pp),{propsToForward:d,rootStateClasses:p,inputStateClasses:g,getRootProps:v,getInputProps:m,formControl:b,focused:C,error:w=!1,disabled:x,fullWidth:I=!1,size:S="md",color:A="neutral",variant:E="outlined",startDecorator:k,endDecorator:F,component:W,slots:O={},slotProps:T={}}=f,N=De(f,T_),H=(r=(i=t.error)!=null?i:b==null?void 0:b.error)!=null?r:w,j=(o=(a=t.size)!=null?a:b==null?void 0:b.size)!=null?o:S,$=(l=t.color)!=null?l:H?"danger":(c=b==null?void 0:b.color)!=null?c:A,M=R({instanceColor:H?"danger":t.color},u,{fullWidth:I,color:$,disabled:x,error:H,focused:C,size:j,variant:E}),V=E_(M),Y=R({},N,{component:W,slots:O,slotProps:T}),[X,D]=Ee("root",{ref:n,className:[V.root,p],elementType:O_,getSlotProps:v,externalForwardedProps:Y,ownerState:M}),[L,U]=Ee("input",R({},b&&{additionalProps:{id:b.htmlFor,"aria-describedby":b["aria-describedby"]}},{className:[V.input,g],elementType:R_,getSlotProps:m,internalForwardedProps:d,externalForwardedProps:Y,ownerState:M})),[G,oe]=Ee("startDecorator",{className:V.startDecorator,elementType:M_,externalForwardedProps:Y,ownerState:M}),[ce,se]=Ee("endDecorator",{className:V.endDecorator,elementType:L_,externalForwardedProps:Y,ownerState:M});return s.jsxs(X,R({},D,{children:[k&&s.jsx(G,R({},oe,{children:k})),s.jsx(L,R({},U)),F&&s.jsx(ce,R({},se,{children:F}))]}))}),Ot=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,endDecorator:l=void 0,onChange:c})=>s.jsxs(h.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{required:i,color:"primary",children:e}),s.jsx(is,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,endDecorator:l,onChange:c,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Rp=Be(s.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 B_(e){return ut("MuiCircularProgress",e)}Ke("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let $_=e=>e,Mp;const F_=["color","backgroundColor"],N_=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],z_=me.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),j_=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${we(n)}`,r&&`variant${we(r)}`,i&&`size${we(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return pt(o,B_,{})};function ui(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const U_=ye("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i,o;const a=((n=t.variants[e.variant])==null?void 0:n[e.color])||{},{color:l,backgroundColor:c}=a,u=De(a,F_);return R({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":c,"--CircularProgress-progressColor":l,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":ui("track","3px"),"--_progress-thickness":ui("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":ui("track","6px"),"--_progress-thickness":ui("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":ui("track","8px"),"--_progress-thickness":ui("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))"},u,e.variant==="outlined"&&{"&::before":R({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},u)},e.variant==="soft"&&{"--CircularProgress-trackColor":t.variants.soft.neutral.backgroundColor,"--CircularProgress-progressColor":(r=t.variants.solid)==null?void 0:r[e.color].backgroundColor},e.variant==="solid"&&{"--CircularProgress-trackColor":(i=t.variants.softHover)==null?void 0:i[e.color].backgroundColor,"--CircularProgress-progressColor":(o=t.variants.solid)==null?void 0:o[e.color].backgroundColor})}),V_=ye("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),H_=ye("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),W_=ye("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&me.css(Mp||(Mp=$_`
|
|
2348
2348
|
animation: var(--CircularProgress-circulation, 0.8s linear 0s infinite normal none running)
|
|
2349
2349
|
${0};
|
|
2350
|
-
`),z_)),Lp=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:l="md",variant:c="soft",thickness:u,determinate:f=!1,value:d=f?0:25,component:p,slots:g={},slotProps:v={}}=r,m=De(r,N_),b=R({},r,{color:a,size:l,variant:c,thickness:u,value:d,determinate:f,instanceSize:t.size}),C=j_(b),w=R({},m,{component:p,slots:g,slotProps:v}),[x,I]=Ee("root",{ref:n,className:zn(C.root,o),elementType:U_,externalForwardedProps:w,ownerState:b,additionalProps:R({role:"progressbar",style:{"--CircularProgress-percent":d}},d&&f&&{"aria-valuenow":Math.round(typeof d=="number"?d:Number(d||0))})}),[S,A]=Ee("svg",{className:C.svg,elementType:V_,externalForwardedProps:w,ownerState:b}),[E,k]=Ee("track",{className:C.track,elementType:H_,externalForwardedProps:w,ownerState:b}),[F,W]=Ee("progress",{className:C.progress,elementType:W_,externalForwardedProps:w,ownerState:b});return s.jsxs(x,R({},I,{children:[s.jsxs(S,R({},A,{children:[s.jsx(E,R({},k)),s.jsx(F,R({},W))]})),i]}))});function G_(e){return ut("MuiButton",e)}const Bp=Ke("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),$p=K.createContext({}),Fp=K.createContext(void 0),Y_=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],K_=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:l,loading:c}=e,u={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",l&&`variant${we(l)}`,t&&`color${we(t)}`,a&&`size${we(a)}`,c&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},f=pt(u,G_,{});return r&&i&&(f.root+=` ${i}`),f},q_=ye("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),Q_=ye("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),J_=ye("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return R({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),X_=({theme:e,ownerState:t})=>{var n,r,i,o;return[R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.size==="sm"&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.25rem)",paddingInline:"0.75rem"},t.size==="md"&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.25rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.375rem)",paddingInline:"1rem"},t.size==="lg"&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 2.75rem)",fontSize:e.vars.fontSize.md,paddingBlock:"var(--Button-paddingBlock, 0.5rem)",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",userSelect:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:e.vars.lineHeight.md},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),R({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},'&:active, &[aria-pressed="true"]':(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],[`&.${Bp.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${Bp.loading}`]:{color:"transparent"}})]},Z_=ye("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(X_),di=K.forwardRef(function(t,n){var r;const i=gt({props:t,name:"JoyButton"}),{children:o,action:a,color:l="primary",variant:c="solid",size:u="md",fullWidth:f=!1,startDecorator:d,endDecorator:p,loading:g=!1,loadingPosition:v="center",loadingIndicator:m,disabled:b,component:C,slots:w={},slotProps:x={}}=i,I=De(i,Y_),S=K.useContext($p),A=K.useContext(Fp),E=t.variant||S.variant||c,k=t.size||S.size||u,F=t.color||S.color||l,W=(r=t.loading||t.disabled)!=null?r:S.disabled||g||b,O=K.useRef(null),T=hn(O,n),{focusVisible:N,setFocusVisible:H,getRootProps:j}=Jl(R({},i,{disabled:W,rootRef:T})),$=m!=null?m:s.jsx(Lp,{color:F,thickness:{sm:2,md:3,lg:4}[k]||3});K.useImperativeHandle(a,()=>({focusVisible:()=>{var ne;H(!0),(ne=O.current)==null||ne.focus()}}),[H]);const M=R({},i,{color:F,fullWidth:f,variant:E,size:k,focusVisible:N,loading:g,loadingPosition:v,disabled:W}),V=K_(M),Y=ne=>{var de;let ve=i.onClick;if(typeof x.root=="function"?ve=x.root(M).onClick:x.root&&(ve=x.root.onClick),(de=ve)==null||de(ne),A){var Fe;(Fe=A.onClick)==null||Fe.call(A,ne,i.value)}};let X=i["aria-pressed"];typeof x.root=="function"?X=x.root(M)["aria-pressed"]:x.root&&(X=x.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?X=A.value.indexOf(i.value)!==-1:X=A.value===i.value);const D=R({},I,{component:C,slots:w,slotProps:x}),[L,U]=Ee("root",{ref:n,className:V.root,elementType:Z_,externalForwardedProps:D,getSlotProps:j,ownerState:M,additionalProps:{onClick:Y,"aria-pressed":X}}),[G,oe]=Ee("startDecorator",{className:V.startDecorator,elementType:q_,externalForwardedProps:D,ownerState:M}),[ce,se]=Ee("endDecorator",{className:V.endDecorator,elementType:Q_,externalForwardedProps:D,ownerState:M}),[Z,te]=Ee("loadingIndicatorCenter",{className:V.loadingIndicatorCenter,elementType:J_,externalForwardedProps:D,ownerState:M});return s.jsxs(L,R({},U,{children:[(d||g&&v==="start")&&s.jsx(G,R({},oe,{children:g&&v==="start"?$:d})),o,g&&v==="center"&&s.jsx(Z,R({},te,{children:$})),(p||g&&v==="end")&&s.jsx(ce,R({},se,{children:g&&v==="end"?$:p}))]}))});di.muiName="Button";var Np={exports:{}};function eP(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 Vc={exports:{}};const tP=Wu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var zp;function Hc(){return zp||(zp=1,function(e,t){(function(n,r){e.exports=r()})(zt,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 zt!="undefined"&&zt.crypto&&(o=zt.crypto),!o&&typeof eP=="function")try{o=tP}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(x){var I;return w.prototype=x,I=new w,w.prototype=null,I}}(),c={},u=c.lib={},f=u.Base=function(){return{extend:function(w){var x=l(this);return w&&x.mixIn(w),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var x in w)w.hasOwnProperty(x)&&(this[x]=w[x]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=u.WordArray=f.extend({init:function(w,x){w=this.words=w||[],x!=i?this.sigBytes=x:this.sigBytes=w.length*4},toString:function(w){return(w||g).stringify(this)},concat:function(w){var x=this.words,I=w.words,S=this.sigBytes,A=w.sigBytes;if(this.clamp(),S%4)for(var E=0;E<A;E++){var k=I[E>>>2]>>>24-E%4*8&255;x[S+E>>>2]|=k<<24-(S+E)%4*8}else for(var F=0;F<A;F+=4)x[S+F>>>2]=I[F>>>2];return this.sigBytes+=A,this},clamp:function(){var w=this.words,x=this.sigBytes;w[x>>>2]&=4294967295<<32-x%4*8,w.length=r.ceil(x/4)},clone:function(){var w=f.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var x=[],I=0;I<w;I+=4)x.push(a());return new d.init(x,w)}}),p=c.enc={},g=p.Hex={stringify:function(w){for(var x=w.words,I=w.sigBytes,S=[],A=0;A<I;A++){var E=x[A>>>2]>>>24-A%4*8&255;S.push((E>>>4).toString(16)),S.push((E&15).toString(16))}return S.join("")},parse:function(w){for(var x=w.length,I=[],S=0;S<x;S+=2)I[S>>>3]|=parseInt(w.substr(S,2),16)<<24-S%8*4;return new d.init(I,x/2)}},v=p.Latin1={stringify:function(w){for(var x=w.words,I=w.sigBytes,S=[],A=0;A<I;A++){var E=x[A>>>2]>>>24-A%4*8&255;S.push(String.fromCharCode(E))}return S.join("")},parse:function(w){for(var x=w.length,I=[],S=0;S<x;S++)I[S>>>2]|=(w.charCodeAt(S)&255)<<24-S%4*8;return new d.init(I,x)}},m=p.Utf8={stringify:function(w){try{return decodeURIComponent(escape(v.stringify(w)))}catch(x){throw new Error("Malformed UTF-8 data")}},parse:function(w){return v.parse(unescape(encodeURIComponent(w)))}},b=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=m.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var x,I=this._data,S=I.words,A=I.sigBytes,E=this.blockSize,k=E*4,F=A/k;w?F=r.ceil(F):F=r.max((F|0)-this._minBufferSize,0);var W=F*E,O=r.min(W*4,A);if(W){for(var T=0;T<W;T+=E)this._doProcessBlock(S,T);x=S.splice(0,W),I.sigBytes-=O}return new d.init(x,O)},clone:function(){var w=f.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0});u.Hasher=b.extend({cfg:f.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){b.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(w){return function(x,I){return new w.init(I).finalize(x)}},_createHmacHelper:function(w){return function(x,I){return new C.HMAC.init(w,I).finalize(x)}}});var C=c.algo={};return c}(Math);return n})}(Vc)),Vc.exports}(function(e,t){(function(n,r){e.exports=r(Hc())})(zt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,l=o.Hasher,c=i.algo,u=[];(function(){for(var m=0;m<64;m++)u[m]=r.abs(r.sin(m+1))*4294967296|0})();var f=c.MD5=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,b){for(var C=0;C<16;C++){var w=b+C,x=m[w];m[w]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}var I=this._hash.words,S=m[b+0],A=m[b+1],E=m[b+2],k=m[b+3],F=m[b+4],W=m[b+5],O=m[b+6],T=m[b+7],N=m[b+8],H=m[b+9],j=m[b+10],$=m[b+11],M=m[b+12],V=m[b+13],Y=m[b+14],X=m[b+15],D=I[0],L=I[1],U=I[2],G=I[3];D=d(D,L,U,G,S,7,u[0]),G=d(G,D,L,U,A,12,u[1]),U=d(U,G,D,L,E,17,u[2]),L=d(L,U,G,D,k,22,u[3]),D=d(D,L,U,G,F,7,u[4]),G=d(G,D,L,U,W,12,u[5]),U=d(U,G,D,L,O,17,u[6]),L=d(L,U,G,D,T,22,u[7]),D=d(D,L,U,G,N,7,u[8]),G=d(G,D,L,U,H,12,u[9]),U=d(U,G,D,L,j,17,u[10]),L=d(L,U,G,D,$,22,u[11]),D=d(D,L,U,G,M,7,u[12]),G=d(G,D,L,U,V,12,u[13]),U=d(U,G,D,L,Y,17,u[14]),L=d(L,U,G,D,X,22,u[15]),D=p(D,L,U,G,A,5,u[16]),G=p(G,D,L,U,O,9,u[17]),U=p(U,G,D,L,$,14,u[18]),L=p(L,U,G,D,S,20,u[19]),D=p(D,L,U,G,W,5,u[20]),G=p(G,D,L,U,j,9,u[21]),U=p(U,G,D,L,X,14,u[22]),L=p(L,U,G,D,F,20,u[23]),D=p(D,L,U,G,H,5,u[24]),G=p(G,D,L,U,Y,9,u[25]),U=p(U,G,D,L,k,14,u[26]),L=p(L,U,G,D,N,20,u[27]),D=p(D,L,U,G,V,5,u[28]),G=p(G,D,L,U,E,9,u[29]),U=p(U,G,D,L,T,14,u[30]),L=p(L,U,G,D,M,20,u[31]),D=g(D,L,U,G,W,4,u[32]),G=g(G,D,L,U,N,11,u[33]),U=g(U,G,D,L,$,16,u[34]),L=g(L,U,G,D,Y,23,u[35]),D=g(D,L,U,G,A,4,u[36]),G=g(G,D,L,U,F,11,u[37]),U=g(U,G,D,L,T,16,u[38]),L=g(L,U,G,D,j,23,u[39]),D=g(D,L,U,G,V,4,u[40]),G=g(G,D,L,U,S,11,u[41]),U=g(U,G,D,L,k,16,u[42]),L=g(L,U,G,D,O,23,u[43]),D=g(D,L,U,G,H,4,u[44]),G=g(G,D,L,U,M,11,u[45]),U=g(U,G,D,L,X,16,u[46]),L=g(L,U,G,D,E,23,u[47]),D=v(D,L,U,G,S,6,u[48]),G=v(G,D,L,U,T,10,u[49]),U=v(U,G,D,L,Y,15,u[50]),L=v(L,U,G,D,W,21,u[51]),D=v(D,L,U,G,M,6,u[52]),G=v(G,D,L,U,k,10,u[53]),U=v(U,G,D,L,j,15,u[54]),L=v(L,U,G,D,A,21,u[55]),D=v(D,L,U,G,N,6,u[56]),G=v(G,D,L,U,X,10,u[57]),U=v(U,G,D,L,O,15,u[58]),L=v(L,U,G,D,V,21,u[59]),D=v(D,L,U,G,F,6,u[60]),G=v(G,D,L,U,$,10,u[61]),U=v(U,G,D,L,E,15,u[62]),L=v(L,U,G,D,H,21,u[63]),I[0]=I[0]+D|0,I[1]=I[1]+L|0,I[2]=I[2]+U|0,I[3]=I[3]+G|0},_doFinalize:function(){var m=this._data,b=m.words,C=this._nDataBytes*8,w=m.sigBytes*8;b[w>>>5]|=128<<24-w%32;var x=r.floor(C/4294967296),I=C;b[(w+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,b[(w+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,m.sigBytes=(b.length+1)*4,this._process();for(var S=this._hash,A=S.words,E=0;E<4;E++){var k=A[E];A[E]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return S},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});function d(m,b,C,w,x,I,S){var A=m+(b&C|~b&w)+x+S;return(A<<I|A>>>32-I)+b}function p(m,b,C,w,x,I,S){var A=m+(b&w|C&~w)+x+S;return(A<<I|A>>>32-I)+b}function g(m,b,C,w,x,I,S){var A=m+(b^C^w)+x+S;return(A<<I|A>>>32-I)+b}function v(m,b,C,w,x,I,S){var A=m+(C^(b|~w))+x+S;return(A<<I|A>>>32-I)+b}i.MD5=l._createHelper(f),i.HmacMD5=l._createHmacHelper(f)}(Math),n.MD5})})(Np);var nP=Np.exports;const jp=bn(nP);var Up={exports:{}};(function(e,t){(function(n,r){e.exports=r(Hc())})(zt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,l=o.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var u=c.byteLength,f=[],d=0;d<u;d++)f[d>>>2]|=c[d]<<24-d%4*8;a.call(this,f,u)}else a.apply(this,arguments)};l.prototype=o}}(),n.lib.WordArray})})(Up);var rP=Up.exports;const Vp=bn(rP);var Hp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Hc())})(zt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(c){var u=c.words,f=c.sigBytes,d=this._map;c.clamp();for(var p=[],g=0;g<f;g+=3)for(var v=u[g>>>2]>>>24-g%4*8&255,m=u[g+1>>>2]>>>24-(g+1)%4*8&255,b=u[g+2>>>2]>>>24-(g+2)%4*8&255,C=v<<16|m<<8|b,w=0;w<4&&g+w*.75<f;w++)p.push(d.charAt(C>>>6*(3-w)&63));var x=d.charAt(64);if(x)for(;p.length%4;)p.push(x);return p.join("")},parse:function(c){var u=c.length,f=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var p=0;p<f.length;p++)d[f.charCodeAt(p)]=p}var g=f.charAt(64);if(g){var v=c.indexOf(g);v!==-1&&(u=v)}return l(c,u,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(c,u,f){for(var d=[],p=0,g=0;g<u;g++)if(g%4){var v=f[c.charCodeAt(g-1)]<<g%4*2,m=f[c.charCodeAt(g)]>>>6-g%4*2,b=v|m;d[p>>>2]|=b<<24-p%4*8,p++}return o.create(d,p)}}(),n.enc.Base64})})(Hp);var iP=Hp.exports;const oP=bn(iP);class Wp{constructor(){J(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Vp.create(new Uint8Array(a)),u=jp(l).toString(oP);n(u)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));J(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Vp.create(new Uint8Array(a)),c=jp(l).toString();n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Gp=({title:e,open:t,imageSrc:n,toggleModal:r})=>s.jsx(h.Modal,{open:t,onClose:r,children:s.jsxs(h.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[s.jsx(h.ModalClose,{}),s.jsx(h.DialogTitle,{sx:{marginBottom:"10px"},children:e}),s.jsx(h.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:s.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Yp=Be(s.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),We=()=>{const e=y.useContext(fa);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},aP=Be(s.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),sP=({isLoading:e,images:t,onClick:n})=>s.jsxs(s.Fragment,{children:[s.jsx(h.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return s.jsx(h.Grid,{xs:5,sm:4,md:3,children:s.jsxs(h.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:[s.jsx(h.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"}}),s.jsx(h.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:s.jsx(h.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?s.jsx(h.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:s.jsx(h.CircularProgress,{variant:"solid",color:"neutral"})}):s.jsx(s.Fragment,{})]}),lP=Be(s.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),cP=Be(s.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),uP=e=>s.jsx(h.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:s.jsxs(h.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&s.jsx(h.Button,{variant:"outlined",color:"neutral",startDecorator:s.jsx(lP,{}),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&&s.jsx(h.Button,{variant:"outlined",color:"neutral",endDecorator:s.jsx(cP,{}),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})]})}),Xt=Be(s.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"),dP=Be(s.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),fP=({color:e})=>e==="warning"?s.jsx(dP,{}):s.jsx(Xt,{}),Ge=e=>s.jsx(h.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:s.jsx(fP,{color:e.color}),children:e.message},e.message),vo=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return s.jsxs(h.FormControl,{sx:{marginBottom:"16px"},children:[s.jsx(h.FormLabel,{required:n,color:"primary",children:e}),s.jsx(h.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},hP=({labels:e,showFilters:t,onClick:n})=>s.jsx(h.Tooltip,{title:t?e.hideFilters:e.showFilters,children:s.jsx(h.IconButton,{"aria-label":"Filters",onClick:n,children:s.jsx(aP,{})})}),Kp=({labels:e,onChangeImages:t})=>{const[n,r]=y.useState(!1),[i,o]=y.useState(!1),[a,l]=y.useState(!1),[c,u]=y.useState(!1),[f,d]=y.useState(1),[p,g]=y.useState(""),[v,m]=y.useState(null),[b,C]=y.useState([]),{https:w}=We();y.useEffect(()=>{E()},[f]);const x=()=>u(!c),I=()=>d(F=>F-1),S=()=>d(F=>F+1),A=()=>_(this,null,function*(){if(p){o(!0);const F=v?B({},v):null,W=yield w.fetchImagesFromSportal365(p,F,f);if(W){const O=yield W.json();W.ok?(C(O.data),d(O.meta.pagination.current_page)):(console.error(O),x())}o(!1)}else C([])}),E=()=>_(this,null,function*(){if(p){l(!0),C([]);const F=v&&v.from&&v.to?B({},v):null,W=yield w.fetchImagesFromSportal365(p,F,f);if(W){const O=yield W.json();W.ok?(C(O.data),d(O.meta.pagination.current_page)):(console.error(O),x())}l(!1)}}),k=(F,W)=>{m(O=>O?Q(B({},O),{[W]:F}):{[W]:F})};return s.jsxs(s.Fragment,{children:[s.jsxs(h.Box,{sx:{marginBottom:"10px"},children:[s.jsx(h.Input,{value:p,onChange:F=>g(F.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:s.jsx(hP,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?s.jsxs(h.Grid,{container:!0,spacing:2,children:[s.jsx(h.Grid,{xs:6,children:s.jsx(vo,{label:e.fromDate,defaultValue:v==null?void 0:v.from,required:!1,onChange:F=>k(F,"from")})}),s.jsx(h.Grid,{xs:6,children:s.jsx(vo,{label:e.toDate,defaultValue:v==null?void 0:v.to,required:!1,onChange:F=>k(F,"to")})})]}):s.jsx(s.Fragment,{}),s.jsx(h.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),s.jsx(sP,{images:b,isLoading:a,onClick:t}),s.jsx(uP,{labels:e,pageCount:f,images:b,getPreviousPage:I,getNextPage:S})]}),s.jsx(Ge,{showToast:c,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:x})]})},qp=Be(s.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"),Qp=h.styled("input")`
|
|
2350
|
+
`),z_)),Lp=K.forwardRef(function(t,n){const r=gt({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:l="md",variant:c="soft",thickness:u,determinate:f=!1,value:d=f?0:25,component:p,slots:g={},slotProps:v={}}=r,m=De(r,N_),b=R({},r,{color:a,size:l,variant:c,thickness:u,value:d,determinate:f,instanceSize:t.size}),C=j_(b),w=R({},m,{component:p,slots:g,slotProps:v}),[x,I]=Ee("root",{ref:n,className:zn(C.root,o),elementType:U_,externalForwardedProps:w,ownerState:b,additionalProps:R({role:"progressbar",style:{"--CircularProgress-percent":d}},d&&f&&{"aria-valuenow":Math.round(typeof d=="number"?d:Number(d||0))})}),[S,A]=Ee("svg",{className:C.svg,elementType:V_,externalForwardedProps:w,ownerState:b}),[E,k]=Ee("track",{className:C.track,elementType:H_,externalForwardedProps:w,ownerState:b}),[F,W]=Ee("progress",{className:C.progress,elementType:W_,externalForwardedProps:w,ownerState:b});return s.jsxs(x,R({},I,{children:[s.jsxs(S,R({},A,{children:[s.jsx(E,R({},k)),s.jsx(F,R({},W))]})),i]}))});function G_(e){return ut("MuiButton",e)}const Bp=Ke("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),$p=K.createContext({}),Fp=K.createContext(void 0),Y_=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],K_=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:l,loading:c}=e,u={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",l&&`variant${we(l)}`,t&&`color${we(t)}`,a&&`size${we(a)}`,c&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},f=pt(u,G_,{});return r&&i&&(f.root+=` ${i}`),f},q_=ye("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),Q_=ye("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),J_=ye("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({theme:e,ownerState:t})=>{var n,r;return R({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),X_=({theme:e,ownerState:t})=>{var n,r,i,o;return[R({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.size==="sm"&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.25rem)",paddingInline:"0.75rem"},t.size==="md"&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.25rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.375rem)",paddingInline:"1rem"},t.size==="lg"&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 2.75rem)",fontSize:e.vars.fontSize.md,paddingBlock:"var(--Button-paddingBlock, 0.5rem)",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",userSelect:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:e.vars.lineHeight.md},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),R({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},'&:active, &[aria-pressed="true"]':(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],[`&.${Bp.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${Bp.loading}`]:{color:"transparent"}})]},Z_=ye("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(X_),di=K.forwardRef(function(t,n){var r;const i=gt({props:t,name:"JoyButton"}),{children:o,action:a,color:l="primary",variant:c="solid",size:u="md",fullWidth:f=!1,startDecorator:d,endDecorator:p,loading:g=!1,loadingPosition:v="center",loadingIndicator:m,disabled:b,component:C,slots:w={},slotProps:x={}}=i,I=De(i,Y_),S=K.useContext($p),A=K.useContext(Fp),E=t.variant||S.variant||c,k=t.size||S.size||u,F=t.color||S.color||l,W=(r=t.loading||t.disabled)!=null?r:S.disabled||g||b,O=K.useRef(null),T=hn(O,n),{focusVisible:N,setFocusVisible:H,getRootProps:j}=Jl(R({},i,{disabled:W,rootRef:T})),$=m!=null?m:s.jsx(Lp,{color:F,thickness:{sm:2,md:3,lg:4}[k]||3});K.useImperativeHandle(a,()=>({focusVisible:()=>{var ne;H(!0),(ne=O.current)==null||ne.focus()}}),[H]);const M=R({},i,{color:F,fullWidth:f,variant:E,size:k,focusVisible:N,loading:g,loadingPosition:v,disabled:W}),V=K_(M),Y=ne=>{var de;let ve=i.onClick;if(typeof x.root=="function"?ve=x.root(M).onClick:x.root&&(ve=x.root.onClick),(de=ve)==null||de(ne),A){var Fe;(Fe=A.onClick)==null||Fe.call(A,ne,i.value)}};let X=i["aria-pressed"];typeof x.root=="function"?X=x.root(M)["aria-pressed"]:x.root&&(X=x.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?X=A.value.indexOf(i.value)!==-1:X=A.value===i.value);const D=R({},I,{component:C,slots:w,slotProps:x}),[L,U]=Ee("root",{ref:n,className:V.root,elementType:Z_,externalForwardedProps:D,getSlotProps:j,ownerState:M,additionalProps:{onClick:Y,"aria-pressed":X}}),[G,oe]=Ee("startDecorator",{className:V.startDecorator,elementType:q_,externalForwardedProps:D,ownerState:M}),[ce,se]=Ee("endDecorator",{className:V.endDecorator,elementType:Q_,externalForwardedProps:D,ownerState:M}),[Z,te]=Ee("loadingIndicatorCenter",{className:V.loadingIndicatorCenter,elementType:J_,externalForwardedProps:D,ownerState:M});return s.jsxs(L,R({},U,{children:[(d||g&&v==="start")&&s.jsx(G,R({},oe,{children:g&&v==="start"?$:d})),o,g&&v==="center"&&s.jsx(Z,R({},te,{children:$})),(p||g&&v==="end")&&s.jsx(ce,R({},se,{children:g&&v==="end"?$:p}))]}))});di.muiName="Button";var Np={exports:{}};function eP(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 Vc={exports:{}};const tP=Wu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var zp;function Hc(){return zp||(zp=1,function(e,t){(function(n,r){e.exports=r()})(zt,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 zt!="undefined"&&zt.crypto&&(o=zt.crypto),!o&&typeof eP=="function")try{o=tP}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(x){var I;return w.prototype=x,I=new w,w.prototype=null,I}}(),c={},u=c.lib={},f=u.Base=function(){return{extend:function(w){var x=l(this);return w&&x.mixIn(w),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var x in w)w.hasOwnProperty(x)&&(this[x]=w[x]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=u.WordArray=f.extend({init:function(w,x){w=this.words=w||[],x!=i?this.sigBytes=x:this.sigBytes=w.length*4},toString:function(w){return(w||g).stringify(this)},concat:function(w){var x=this.words,I=w.words,S=this.sigBytes,A=w.sigBytes;if(this.clamp(),S%4)for(var E=0;E<A;E++){var k=I[E>>>2]>>>24-E%4*8&255;x[S+E>>>2]|=k<<24-(S+E)%4*8}else for(var F=0;F<A;F+=4)x[S+F>>>2]=I[F>>>2];return this.sigBytes+=A,this},clamp:function(){var w=this.words,x=this.sigBytes;w[x>>>2]&=4294967295<<32-x%4*8,w.length=r.ceil(x/4)},clone:function(){var w=f.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var x=[],I=0;I<w;I+=4)x.push(a());return new d.init(x,w)}}),p=c.enc={},g=p.Hex={stringify:function(w){for(var x=w.words,I=w.sigBytes,S=[],A=0;A<I;A++){var E=x[A>>>2]>>>24-A%4*8&255;S.push((E>>>4).toString(16)),S.push((E&15).toString(16))}return S.join("")},parse:function(w){for(var x=w.length,I=[],S=0;S<x;S+=2)I[S>>>3]|=parseInt(w.substr(S,2),16)<<24-S%8*4;return new d.init(I,x/2)}},v=p.Latin1={stringify:function(w){for(var x=w.words,I=w.sigBytes,S=[],A=0;A<I;A++){var E=x[A>>>2]>>>24-A%4*8&255;S.push(String.fromCharCode(E))}return S.join("")},parse:function(w){for(var x=w.length,I=[],S=0;S<x;S++)I[S>>>2]|=(w.charCodeAt(S)&255)<<24-S%4*8;return new d.init(I,x)}},m=p.Utf8={stringify:function(w){try{return decodeURIComponent(escape(v.stringify(w)))}catch(x){throw new Error("Malformed UTF-8 data")}},parse:function(w){return v.parse(unescape(encodeURIComponent(w)))}},b=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=m.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var x,I=this._data,S=I.words,A=I.sigBytes,E=this.blockSize,k=E*4,F=A/k;w?F=r.ceil(F):F=r.max((F|0)-this._minBufferSize,0);var W=F*E,O=r.min(W*4,A);if(W){for(var T=0;T<W;T+=E)this._doProcessBlock(S,T);x=S.splice(0,W),I.sigBytes-=O}return new d.init(x,O)},clone:function(){var w=f.clone.call(this);return w._data=this._data.clone(),w},_minBufferSize:0});u.Hasher=b.extend({cfg:f.extend(),init:function(w){this.cfg=this.cfg.extend(w),this.reset()},reset:function(){b.reset.call(this),this._doReset()},update:function(w){return this._append(w),this._process(),this},finalize:function(w){w&&this._append(w);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(w){return function(x,I){return new w.init(I).finalize(x)}},_createHmacHelper:function(w){return function(x,I){return new C.HMAC.init(w,I).finalize(x)}}});var C=c.algo={};return c}(Math);return n})}(Vc)),Vc.exports}(function(e,t){(function(n,r){e.exports=r(Hc())})(zt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,l=o.Hasher,c=i.algo,u=[];(function(){for(var m=0;m<64;m++)u[m]=r.abs(r.sin(m+1))*4294967296|0})();var f=c.MD5=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,b){for(var C=0;C<16;C++){var w=b+C,x=m[w];m[w]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}var I=this._hash.words,S=m[b+0],A=m[b+1],E=m[b+2],k=m[b+3],F=m[b+4],W=m[b+5],O=m[b+6],T=m[b+7],N=m[b+8],H=m[b+9],j=m[b+10],$=m[b+11],M=m[b+12],V=m[b+13],Y=m[b+14],X=m[b+15],D=I[0],L=I[1],U=I[2],G=I[3];D=d(D,L,U,G,S,7,u[0]),G=d(G,D,L,U,A,12,u[1]),U=d(U,G,D,L,E,17,u[2]),L=d(L,U,G,D,k,22,u[3]),D=d(D,L,U,G,F,7,u[4]),G=d(G,D,L,U,W,12,u[5]),U=d(U,G,D,L,O,17,u[6]),L=d(L,U,G,D,T,22,u[7]),D=d(D,L,U,G,N,7,u[8]),G=d(G,D,L,U,H,12,u[9]),U=d(U,G,D,L,j,17,u[10]),L=d(L,U,G,D,$,22,u[11]),D=d(D,L,U,G,M,7,u[12]),G=d(G,D,L,U,V,12,u[13]),U=d(U,G,D,L,Y,17,u[14]),L=d(L,U,G,D,X,22,u[15]),D=p(D,L,U,G,A,5,u[16]),G=p(G,D,L,U,O,9,u[17]),U=p(U,G,D,L,$,14,u[18]),L=p(L,U,G,D,S,20,u[19]),D=p(D,L,U,G,W,5,u[20]),G=p(G,D,L,U,j,9,u[21]),U=p(U,G,D,L,X,14,u[22]),L=p(L,U,G,D,F,20,u[23]),D=p(D,L,U,G,H,5,u[24]),G=p(G,D,L,U,Y,9,u[25]),U=p(U,G,D,L,k,14,u[26]),L=p(L,U,G,D,N,20,u[27]),D=p(D,L,U,G,V,5,u[28]),G=p(G,D,L,U,E,9,u[29]),U=p(U,G,D,L,T,14,u[30]),L=p(L,U,G,D,M,20,u[31]),D=g(D,L,U,G,W,4,u[32]),G=g(G,D,L,U,N,11,u[33]),U=g(U,G,D,L,$,16,u[34]),L=g(L,U,G,D,Y,23,u[35]),D=g(D,L,U,G,A,4,u[36]),G=g(G,D,L,U,F,11,u[37]),U=g(U,G,D,L,T,16,u[38]),L=g(L,U,G,D,j,23,u[39]),D=g(D,L,U,G,V,4,u[40]),G=g(G,D,L,U,S,11,u[41]),U=g(U,G,D,L,k,16,u[42]),L=g(L,U,G,D,O,23,u[43]),D=g(D,L,U,G,H,4,u[44]),G=g(G,D,L,U,M,11,u[45]),U=g(U,G,D,L,X,16,u[46]),L=g(L,U,G,D,E,23,u[47]),D=v(D,L,U,G,S,6,u[48]),G=v(G,D,L,U,T,10,u[49]),U=v(U,G,D,L,Y,15,u[50]),L=v(L,U,G,D,W,21,u[51]),D=v(D,L,U,G,M,6,u[52]),G=v(G,D,L,U,k,10,u[53]),U=v(U,G,D,L,j,15,u[54]),L=v(L,U,G,D,A,21,u[55]),D=v(D,L,U,G,N,6,u[56]),G=v(G,D,L,U,X,10,u[57]),U=v(U,G,D,L,O,15,u[58]),L=v(L,U,G,D,V,21,u[59]),D=v(D,L,U,G,F,6,u[60]),G=v(G,D,L,U,$,10,u[61]),U=v(U,G,D,L,E,15,u[62]),L=v(L,U,G,D,H,21,u[63]),I[0]=I[0]+D|0,I[1]=I[1]+L|0,I[2]=I[2]+U|0,I[3]=I[3]+G|0},_doFinalize:function(){var m=this._data,b=m.words,C=this._nDataBytes*8,w=m.sigBytes*8;b[w>>>5]|=128<<24-w%32;var x=r.floor(C/4294967296),I=C;b[(w+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,b[(w+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,m.sigBytes=(b.length+1)*4,this._process();for(var S=this._hash,A=S.words,E=0;E<4;E++){var k=A[E];A[E]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return S},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});function d(m,b,C,w,x,I,S){var A=m+(b&C|~b&w)+x+S;return(A<<I|A>>>32-I)+b}function p(m,b,C,w,x,I,S){var A=m+(b&w|C&~w)+x+S;return(A<<I|A>>>32-I)+b}function g(m,b,C,w,x,I,S){var A=m+(b^C^w)+x+S;return(A<<I|A>>>32-I)+b}function v(m,b,C,w,x,I,S){var A=m+(C^(b|~w))+x+S;return(A<<I|A>>>32-I)+b}i.MD5=l._createHelper(f),i.HmacMD5=l._createHmacHelper(f)}(Math),n.MD5})})(Np);var nP=Np.exports;const jp=bn(nP);var Up={exports:{}};(function(e,t){(function(n,r){e.exports=r(Hc())})(zt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,l=o.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var u=c.byteLength,f=[],d=0;d<u;d++)f[d>>>2]|=c[d]<<24-d%4*8;a.call(this,f,u)}else a.apply(this,arguments)};l.prototype=o}}(),n.lib.WordArray})})(Up);var rP=Up.exports;const Vp=bn(rP);var Hp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Hc())})(zt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(c){var u=c.words,f=c.sigBytes,d=this._map;c.clamp();for(var p=[],g=0;g<f;g+=3)for(var v=u[g>>>2]>>>24-g%4*8&255,m=u[g+1>>>2]>>>24-(g+1)%4*8&255,b=u[g+2>>>2]>>>24-(g+2)%4*8&255,C=v<<16|m<<8|b,w=0;w<4&&g+w*.75<f;w++)p.push(d.charAt(C>>>6*(3-w)&63));var x=d.charAt(64);if(x)for(;p.length%4;)p.push(x);return p.join("")},parse:function(c){var u=c.length,f=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var p=0;p<f.length;p++)d[f.charCodeAt(p)]=p}var g=f.charAt(64);if(g){var v=c.indexOf(g);v!==-1&&(u=v)}return l(c,u,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(c,u,f){for(var d=[],p=0,g=0;g<u;g++)if(g%4){var v=f[c.charCodeAt(g-1)]<<g%4*2,m=f[c.charCodeAt(g)]>>>6-g%4*2,b=v|m;d[p>>>2]|=b<<24-p%4*8,p++}return o.create(d,p)}}(),n.enc.Base64})})(Hp);var iP=Hp.exports;const oP=bn(iP);class Wp{constructor(){J(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Vp.create(new Uint8Array(a)),u=jp(l).toString(oP);n(u)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));J(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,l=Vp.create(new Uint8Array(a)),c=jp(l).toString();n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Gp=({title:e,open:t,imageSrc:n,toggleModal:r})=>s.jsx(h.Modal,{open:t,onClose:r,children:s.jsxs(h.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[s.jsx(h.ModalClose,{}),s.jsx(h.DialogTitle,{sx:{marginBottom:"10px"},children:e}),s.jsx(h.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:s.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Yp=Be(s.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),We=()=>{const e=y.useContext(fa);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},aP=Be(s.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),sP=({isLoading:e,images:t,onClick:n})=>s.jsxs(s.Fragment,{children:[s.jsx(h.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return s.jsx(h.Grid,{xs:5,sm:4,md:3,children:s.jsxs(h.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:[s.jsx(h.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"}}),s.jsx(h.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:s.jsx(h.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?s.jsx(h.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:s.jsx(h.CircularProgress,{variant:"solid",color:"neutral"})}):s.jsx(s.Fragment,{})]}),lP=Be(s.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),cP=Be(s.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),uP=e=>s.jsx(h.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:s.jsxs(h.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&s.jsx(h.Button,{variant:"outlined",color:"neutral",startDecorator:s.jsx(lP,{}),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&&s.jsx(h.Button,{variant:"outlined",color:"neutral",endDecorator:s.jsx(cP,{}),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})]})}),Jt=Be(s.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"),dP=Be(s.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),fP=({color:e})=>e==="warning"?s.jsx(dP,{}):s.jsx(Jt,{}),Ge=e=>s.jsx(h.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:s.jsx(fP,{color:e.color}),children:e.message},e.message),vo=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return s.jsxs(h.FormControl,{sx:{marginBottom:"16px"},children:[s.jsx(h.FormLabel,{required:n,color:"primary",children:e}),s.jsx(h.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},hP=({labels:e,showFilters:t,onClick:n})=>s.jsx(h.Tooltip,{title:t?e.hideFilters:e.showFilters,children:s.jsx(h.IconButton,{"aria-label":"Filters",onClick:n,children:s.jsx(aP,{})})}),Kp=({labels:e,onChangeImages:t})=>{const[n,r]=y.useState(!1),[i,o]=y.useState(!1),[a,l]=y.useState(!1),[c,u]=y.useState(!1),[f,d]=y.useState(1),[p,g]=y.useState(""),[v,m]=y.useState(null),[b,C]=y.useState([]),{https:w}=We();y.useEffect(()=>{E()},[f]);const x=()=>u(!c),I=()=>d(F=>F-1),S=()=>d(F=>F+1),A=()=>_(this,null,function*(){if(p){o(!0);const F=v?B({},v):null,W=yield w.fetchImagesFromSportal365(p,F,f);if(W){const O=yield W.json();W.ok?(C(O.data),d(O.meta.pagination.current_page)):(console.error(O),x())}o(!1)}else C([])}),E=()=>_(this,null,function*(){if(p){l(!0),C([]);const F=v&&v.from&&v.to?B({},v):null,W=yield w.fetchImagesFromSportal365(p,F,f);if(W){const O=yield W.json();W.ok?(C(O.data),d(O.meta.pagination.current_page)):(console.error(O),x())}l(!1)}}),k=(F,W)=>{m(O=>O?Q(B({},O),{[W]:F}):{[W]:F})};return s.jsxs(s.Fragment,{children:[s.jsxs(h.Box,{sx:{marginBottom:"10px"},children:[s.jsx(h.Input,{value:p,onChange:F=>g(F.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:s.jsx(hP,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?s.jsxs(h.Grid,{container:!0,spacing:2,children:[s.jsx(h.Grid,{xs:6,children:s.jsx(vo,{label:e.fromDate,defaultValue:v==null?void 0:v.from,required:!1,onChange:F=>k(F,"from")})}),s.jsx(h.Grid,{xs:6,children:s.jsx(vo,{label:e.toDate,defaultValue:v==null?void 0:v.to,required:!1,onChange:F=>k(F,"to")})})]}):s.jsx(s.Fragment,{}),s.jsx(h.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),s.jsx(sP,{images:b,isLoading:a,onClick:t}),s.jsx(uP,{labels:e,pageCount:f,images:b,getPreviousPage:I,getNextPage:S})]}),s.jsx(Ge,{showToast:c,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:x})]})},qp=Be(s.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"),Qp=h.styled("input")`
|
|
2351
2351
|
clip: rect(0 0 0 0);
|
|
2352
2352
|
clip-path: inset(50%);
|
|
2353
2353
|
height: 1px;
|
|
@@ -2450,11 +2450,11 @@ 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
|
-
`,MP=1,LP=3,BP=function(e){Iy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=K.createRef(),n.videoRef=K.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document!="undefined"?document:null,n.currentWindow=typeof window!="undefined"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver=="undefined"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=_P(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=DP(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,c,u=n.imageRef.current||n.videoRef.current;if(u&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var f=n.containerRect.width/n.containerRect.height,d=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,p=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((a=n.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,g=u.offsetWidth<d||u.offsetHeight<p,v=d/p,m=void 0;if(g)switch(n.state.mediaObjectFit){default:case"contain":m=f>v?{width:n.containerRect.height*v,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/v};break;case"horizontal-cover":m={width:n.containerRect.width,height:n.containerRect.width/v};break;case"vertical-cover":m={width:n.containerRect.height*v,height:n.containerRect.height};break}else m={width:u.offsetWidth,height:u.offsetHeight};n.mediaSize=Pt(Pt({},m),{naturalWidth:d,naturalHeight:p}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:IP(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)!==b.height||((c=n.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(t.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(t.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(t.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=t.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+r.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,a=r.x,l=r.y;n.dragStartPosition={x:a,y:l},n.dragStartCrop=Pt({},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,c={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+l},u=n.props.restrictPosition?cs(c,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):c;n.props.onCropChange(u)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=t.getMousePoint(r),o=SP(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,c;return(c=(l=n.props).onInteractionStart)===null||c===void 0?void 0:c.call(l)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var l,c;return(c=(l=n.props).onInteractionEnd)===null||c===void 0?void 0:c.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,c=a.zoom;return{x:(i+l.x)/c,y:(o+l.y)/c}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,l=a.shouldUpdatePosition,c=l===void 0?!0:l;if(!(!n.state.cropSize||!n.props.onZoomChange)){var u=us(r,n.props.minZoom,n.props.maxZoom);if(c){var f=n.getPointOnContainer(i,n.containerPosition),d=n.getPointOnMedia(f),p={x:d.x*u-f.x,y:d.y*u-f.y},g=n.props.restrictPosition?cs(p,n.mediaSize,n.state.cropSize,u,n.props.rotation):p;n.props.onCropChange(g)}n.props.onZoomChange(u)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?cs(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return TP(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?cs(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=RP,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,c,u,f,d;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.width)?this.computeSizes():(((l=n.crop)===null||l===void 0?void 0:l.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=n.crop)===null||u===void 0?void 0:u.y)!==((f=this.props.crop)===null||f===void 0?void 0:f.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((d=this.videoRef.current)===null||d===void 0||d.load());var p=this.getObjectFit();p!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:p},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,c=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,f=c/u;return f<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=cg(r,i),this.lastPinchRotation=ug(r,i),this.onDragStart(dg(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=dg(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var l=cg(i,o),c=r.props.zoom*(l/r.lastPinchDistance);r.setNewZoom(c,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=l;var u=ug(i,o),f=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(f),r.lastPinchRotation=u})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,l=i.mediaProps,c=i.transform,u=i.crop,f=u.x,d=u.y,p=i.rotation,g=i.zoom,v=i.cropShape,m=i.showGrid,b=i.style,C=b.containerStyle,w=b.cropAreaStyle,x=b.mediaStyle,I=i.classes,S=I.containerClassName,A=I.cropAreaClassName,E=I.mediaClassName,k=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return K.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(W){return n.containerRef=W},"data-testid":"container",style:C,className:ds("reactEasyCrop_Container",S)},o?K.createElement("img",Pt({alt:"",className:ds("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:Pt(Pt({},x),{transform:c||"translate(".concat(f,"px, ").concat(d,"px) rotate(").concat(p,"deg) scale(").concat(g,")")}),onLoad:this.onMediaLoad})):a&&K.createElement("video",Pt({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:ds("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:Pt(Pt({},x),{transform:c||"translate(".concat(f,"px, ").concat(d,"px) rotate(").concat(p,"deg) scale(").concat(g,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(F){return K.createElement("source",Pt({key:F.src},F))})),this.state.cropSize&&K.createElement("div",{style:Pt(Pt({},w),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:ds("reactEasyCrop_CropArea",v==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:LP,minZoom:MP,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t}(K.Component);const $P=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 FP(e){return e*Math.PI/180}function NP(e,t,n=0){return _(this,null,function*(){const r=yield $P(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(FP(n)),o.translate(-l/2,-l/2),o.drawImage(r,l/2-r.width*.5,l/2-r.height*.5);const c=o.getImageData(0,0,l,l);return i.width=t.width,i.height=t.height,o.putImageData(c,Math.round(0-l/2+r.width*.5-t.x),Math.round(0-l/2+r.height*.5-t.y)),new Promise(u=>i.toBlob(f=>{const d=new File([f],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});u(d)},"image/jpeg"))})}const fg=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,l]=y.useState({x:0,y:0}),[c,u]=y.useState(1),[f,d]=y.useState(16/9),[p,g]=y.useState(null),v=(x,I)=>{g(I)},m=(x,I)=>d(I),b=()=>_(this,null,function*(){const x=yield NP(n,p);w(),o(x)}),C=()=>{w(),r()},w=()=>{l({x:0,y:0}),u(1),d(16/9),g(null)};return s.jsx(h.Modal,{open:t,onClose:i,children:s.jsxs(h.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[s.jsx(h.ModalClose,{}),s.jsx(h.DialogTitle,{children:e.cropImage}),s.jsxs(h.DialogContent,{sx:{width:"100%"},children:[s.jsx(h.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:s.jsx(BP,{image:n,crop:a,zoom:c,aspect:f,onCropChange:l,onCropComplete:v,onZoomChange:u})}),s.jsxs(h.FormControl,{sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{color:"primary",children:e.aspectRatio}),s.jsxs(h.Select,{value:f,onChange:m,children:[s.jsx(h.Option,{value:4/3,children:"4 / 3"}),s.jsx(h.Option,{value:16/9,children:"16 / 9"}),s.jsx(h.Option,{value:1,children:"1"})]})]}),s.jsx(h.Box,{mb:1,mx:2,children:s.jsx(h.Slider,{value:c,min:1,max:3,step:.1,onChange:(x,I)=>u(I)})}),s.jsxs(h.DialogActions,{children:[s.jsx(h.Button,{color:"primary",onClick:b,loading:!1,children:e.crop}),s.jsx(h.Button,{color:"primary",variant:"outlined",onClick:C,loading:!1,children:e.reset})]})]})]})})},hg=Be(s.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),pg=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=y.useState(!1),[l,c]=y.useState(!1),[u,f]=y.useState(!1),[d,p]=y.useState(!1),[g,v]=y.useState(""),[m,b]=y.useState("primary"),[C,w]=y.useState(""),x=y.useRef(null),I=()=>p(!d),S=()=>{x.current&&x.current.click()},A=new Wp,E=y.useContext(fa),k=()=>{v(""),c(!1)},F=M=>{let V="",Y="primary";switch(M){case"copy_url":V=e.urlCopiedToClipboardMessage,Y="primary";break;case"image_deleted":V=e.imageDeletedMessage,Y="primary";break;case"image_reset":V=e.imageResetMessage,Y="primary";break;case"upload_success":V=e.uploadingImageMessage,Y="success";break;case"upload_failed":V=e.uploadingImageErrorMessage,Y="danger";break;case"sign_in_url_failed":V=e.generateSignedInUrlErrorMessage,Y="danger";break;case"encrypting_file_failed":V=e.encryptingImageErrorMessage,Y="danger";break}b(Y),v(V),c(!0)},W=()=>f(!u),O=()=>{i(),F("image_deleted")},T=M=>{navigator.clipboard.writeText(M),F("copy_url")},N=M=>_(this,null,function*(){M.persist();const V=M.target.files?M.target.files[0]:null;if(V){a(!0);try{const Y=V.type.split("/")[1],X=yield A.readFileAndHash(V),D=(yield A.generateHashFileName(V))+"."+Y,L={image_type:Y,image_file_name:D,image_size:V.size,base64_sum:X},U=yield E==null?void 0:E.https.generateSignedInUrl(L);if(U!=null&&U.ok){const G=yield U.json(),oe={"Content-Type":V.type,"Content-MD5":X};try{const ce=new File([V],D,{type:V.type}),se=yield E==null?void 0:E.https.storeInBucket(G.data.signed_url,ce,oe);r(se||""),w(se),F("upload_success")}catch(ce){console.error("There was a problem with uploading the file: ",ce),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield U==null?void 0:U.json()),F("sign_in_url_failed")}catch(Y){console.error("There was a problem with encrypting file...",Y),F("encrypting_file_failed")}a(!1)}}),H=M=>_(this,null,function*(){if(M){a(!0);try{const V=M.type.split("/")[1],Y=yield A.readFileAndHash(M),X=(yield A.generateHashFileName(M))+"."+V,D={image_type:V,image_file_name:X,image_size:M.size,base64_sum:Y},L=yield E==null?void 0:E.https.generateSignedInUrl(D);if(L!=null&&L.ok){const U=yield L.json(),G={"Content-Type":M.type,"Content-MD5":Y};try{const oe=new File([M],X,{type:M.type}),ce=yield E==null?void 0:E.https.storeInBucket(U.data.signed_url,oe,G);r(ce||""),F("upload_success")}catch(oe){console.error("There was a problem with uploading the file: ",oe),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield L==null?void 0:L.json()),F("sign_in_url_failed")}catch(V){console.error("There was a problem with encrypting file...",V),F("encrypting_file_failed")}a(!1)}}),j=()=>{r(C),F("image_reset")},$=M=>{r(M),w(M)};return s.jsxs(s.Fragment,{children:[s.jsxs(h.Card,{sx:{marginBottom:"10px"},children:[s.jsxs(h.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[s.jsx(h.Typography,{level:"title-lg",children:t}),s.jsx(h.Tooltip,{title:e.clearImage,children:s.jsx(h.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:O,children:s.jsx(Rp,{})})})]}),s.jsxs(h.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[s.jsxs(h.Skeleton,{loading:o,animation:"wave",children:[n?s.jsx(h.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)"}}}):s.jsx(jc,{sx:{fontSize:"3rem",opacity:.2}}),n?s.jsx(h.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:s.jsx(Yp,{sx:{fontSize:"3rem",color:"#fff"}})}):s.jsx(s.Fragment,{})]}),s.jsx(h.Tooltip,{title:e.copyUrl,children:s.jsx(di,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:s.jsx(_e.ContentCopy,{})})}),s.jsx(h.Tooltip,{title:e.viewImage,children:s.jsx(di,{onClick:W,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:s.jsx(qp,{})})}),s.jsx(h.Tooltip,{title:e.cropImage,children:s.jsx(di,{onClick:I,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:s.jsx(hg,{})})})]}),s.jsx(h.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:s.jsxs(di,{sx:{width:"100%"},onClick:S,children:[s.jsx(_e.Upload,{})," ",e.uploadImage,s.jsx(Qp,{type:"file",accept:"image/*",onChange:N,ref:x})]})}),E!=null&&E.https.sportal365Config?s.jsx(h.AccordionGroup,{variant:"soft",children:s.jsxs(h.Accordion,{children:[s.jsx(h.AccordionSummary,{children:s.jsx(h.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),s.jsx(h.AccordionDetails,{children:s.jsx(Kp,{labels:e,onChangeImages:$})})]})}):s.jsx(s.Fragment,{})]}),s.jsx(Ge,{showToast:l,message:g,color:m,hideToast:k}),s.jsx(Gp,{title:e.viewImage,open:u,imageSrc:n,toggleModal:W}),s.jsx(fg,{labels:e,open:d,imageSrc:n,toggleModal:I,uploadImage:H,resetDefaultImageUrl:j})]})},zP=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),jP=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),UP=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),VP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=y.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],l=zP(e),c=jP(e),u=UP(e),f=(v,m)=>{const b=v.target.value;o.colors[m]=b,n(o)},d=(v,m)=>{const b=v.target.value;o.urls[m]=b,n(o)},p=(v,m)=>{o.images[m]=v,n(o)},g=v=>{o.images[v]="",n(o)};return s.jsx(h.Box,{children:s.jsxs(Xh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[s.jsxs(Zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${Ic.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:[s.jsxs(ei,{children:[s.jsx(h.ListItemDecorator,{children:s.jsx(jc,{sx:{width:"20px"}})}),e.images]}),s.jsxs(ei,{children:[s.jsx(h.ListItemDecorator,{children:s.jsx(p_,{sx:{width:"20px"}})}),e.colors]}),s.jsxs(ei,{children:[s.jsx(h.ListItemDecorator,{children:s.jsx(g_,{sx:{width:"20px"}})}),e.urls]})]}),s.jsxs(ci,{value:0,sx:{px:0},children:[s.jsx(pg,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:v=>p(v,"main_logo"),clearImage:()=>g("main_logo")}),s.jsx(h.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?s.jsx(s.Fragment,{children:a.map(v=>s.jsx(pg,{labels:e,title:l.get(v),image:o.images[v],onChangeImages:m=>p(m,v),clearImage:()=>g(v)},`branding-image-${v}`))}):s.jsx(s.Fragment,{})]}),s.jsx(ci,{value:1,sx:{px:0},children:s.jsx(h.Box,{children:Object.keys(o.colors).map(v=>s.jsx(h.Box,{mb:2,children:s.jsx(Ot,{size:"sm",label:c.get(v),placeholder:"",defaultValue:o.colors[v],required:!1,onChange:m=>f(m,v)})},`branding-color-${v}`))})}),s.jsx(ci,{value:2,sx:{px:0},children:s.jsx(h.Box,{children:Object.keys(o.urls).map(v=>s.jsx(h.Box,{mb:2,children:s.jsx(Ot,{size:"sm",label:u.get(v),placeholder:"",defaultValue:o.urls[v],required:!1,onChange:m=>d(m,v)})},`branding-url-${v}`))})})]})})},gg=Be(s.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"),mg=e=>{const t=()=>_(this,null,function*(){yield no(e.environment).signOut()});return s.jsx(h.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},HP=Be(s.jsx("path",{d:"m8.71 11.71 2.59 2.59c.39.39 1.02.39 1.41 0l2.59-2.59c.63-.63.18-1.71-.71-1.71H9.41c-.89 0-1.33 1.08-.7 1.71"}),"ArrowDropDownRounded"),WP=Be(s.jsx("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm0 6-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25zm-7.5-5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zm-1.51 3.49L9 15.17l-.99-2.18L5.83 12l2.18-.99L9 8.83l.99 2.18 2.18.99z"}),"AutoAwesomeOutlined"),GP=(e,t)=>{let n=[{id:"football_post_match",label:t.generateFootballPostMatchLabel}];switch(e){case"classic_quiz":n=[...n,{id:"formula1_post_event",label:(t==null?void 0:t.generateFormula1PostEventLabel)||""}];break}return n},YP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,generateLabels:r,entityType:i,environment:o,onClickCreate:a,onClickCreateFromTemplate:l,onClickGenerate:c})=>{const u=()=>{if(!r||!c)return s.jsx(s.Fragment,{});const f=GP(i,r);return s.jsxs(h.Dropdown,{children:[s.jsxs(h.ButtonGroup,{variant:"solid",size:"md",color:"neutral",children:[s.jsx(h.MenuButton,{slots:{root:h.Button},startDecorator:s.jsx(WP,{}),sx:{border:1,borderColor:"neutral.outlinedBorder",borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0,bgcolor:"transparent",color:"neutral.outlinedColor","&:hover":{bgcolor:"neutral.outlinedActiveBg"}},children:r.generateAIEntityLabel}),s.jsx(h.MenuButton,{slots:{root:h.IconButton},"aria-label":"More AI quiz options",sx:{border:1,borderColor:"neutral.outlinedBorder",borderLeft:"none",bgcolor:"transparent",color:"neutral.outlinedColor","&:hover":{bgcolor:"neutral.outlinedActiveBg"},borderTopRightRadius:"6px !important",borderBottomRightRadius:"6px !important"},children:s.jsx(HP,{})})]}),s.jsx(h.Menu,{placement:"bottom",sx:{maxHeight:240,borderRadius:12,boxShadow:"md"},children:f.map(d=>s.jsx(h.MenuItem,{onClick:()=>c(d.id),children:d.label},d.id))})]})};return s.jsx(s.Fragment,{children:s.jsxs(h.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[s.jsxs(h.Stack,{direction:"row",alignItems:"center",spacing:2,children:[s.jsx(h.Button,{startDecorator:s.jsx(gg,{}),variant:"solid",color:"primary",onClick:a,children:e}),t?s.jsx(h.Button,{startDecorator:s.jsx(gg,{}),variant:"outlined",color:"primary",onClick:l,children:t}):s.jsx(s.Fragment,{}),u()]}),n?s.jsx(mg,{signOutLabel:n,environment:o}):s.jsx(s.Fragment,{})]})})};var vg={},Zc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],hi={_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},bo={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},Ht=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},cn=function(e){return e===!0?1:0};function bg(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var eu=function(e){return e instanceof Array?e:[e]};function $t(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function $e(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,n!==void 0&&(r.textContent=n),r}function fs(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function yg(e,t){if(t(e))return e;if(e.parentNode)return yg(e.parentNode,t)}function hs(e,t){var n=$e("div","numInputWrapper"),r=$e("input","numInput "+e),i=$e("span","arrowUp"),o=$e("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Zt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var tu=function(){},ps=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},KP={D:tu,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*cn(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:tu,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:tu,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},Dr={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})"},yo={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[yo.w(e,t,n)]},F:function(e,t,n){return ps(yo.n(e,t,n)-1,!1,t)},G:function(e,t,n){return Ht(yo.h(e,t,n))},H:function(e){return Ht(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[cn(e.getHours()>11)]},M:function(e,t){return ps(e.getMonth(),!0,t)},S:function(e){return Ht(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return Ht(e.getFullYear(),4)},d:function(e){return Ht(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return Ht(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return Ht(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)}},xg=function(e){var t=e.config,n=t===void 0?hi:t,r=e.l10n,i=r===void 0?bo:r,o=e.isMobile,a=o===void 0?!1:o;return function(l,c,u){var f=u||i;return n.formatDate!==void 0&&!a?n.formatDate(l,c,f):c.split("").map(function(d,p,g){return yo[d]&&g[p-1]!=="\\"?yo[d](l,f,n):d!=="\\"?d:""}).join("")}},nu=function(e){var t=e.config,n=t===void 0?hi:t,r=e.l10n,i=r===void 0?bo:r;return function(o,a,l,c){if(!(o!==0&&!o)){var u=c||i,f,d=o;if(o instanceof Date)f=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)f=new Date(o);else if(typeof o=="string"){var p=a||(n||hi).dateFormat,g=String(o).trim();if(g==="today")f=new Date,l=!0;else if(n&&n.parseDate)f=n.parseDate(o,p);else if(/Z$/.test(g)||/GMT$/.test(g))f=new Date(o);else{for(var v=void 0,m=[],b=0,C=0,w="";b<p.length;b++){var x=p[b],I=x==="\\",S=p[b-1]==="\\"||I;if(Dr[x]&&!S){w+=Dr[x];var A=new RegExp(w).exec(o);A&&(v=!0)&&m[x!=="Y"?"push":"unshift"]({fn:KP[x],val:A[++C]})}else I||(w+=".")}f=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),m.forEach(function(E){var k=E.fn,F=E.val;return f=k(f,F,u)||f}),f=v?f:void 0}}if(!(f instanceof Date&&!isNaN(f.getTime()))){n.errorHandler(new Error("Invalid date provided: "+d));return}return l===!0&&f.setHours(0,0,0,0),f}}};function en(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 qP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},ru=function(e,t,n){return e*3600+t*60+n},QP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},JP={DAY:864e5};function iu(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(),c=e.maxDate.getMinutes();t=Math.min(t,l),t===l&&(n=Math.min(c,n)),t===l&&n===c&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var r=function(l){l&&Object.keys(l).forEach(function(c){return e[c]=l[c]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var Rt=function(){return Rt=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},Rt.apply(this,arguments)},Cg=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},XP=300;function ZP(e,t){var n={config:Rt(Rt({},hi),mt.defaultConfig),l10n:bo};n.parseDate=nu({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=m,n._setHoursFromDate=p,n._positionCalendar=xe,n.changeMonth=D,n.changeYear=se,n.clear=L,n.close=U,n.onMouseOver=ve,n._createElement=$e,n.createDay=A,n.destroy=G,n.isEnabled=Z,n.jumpToDate=w,n.updateValue=Wt,n.open=st,n.redraw=Oe,n.set=Mt,n.setDate=Nt,n.toggle=Fo;function r(){n.utils={getDaysInMonth:function(P,z){return P===void 0&&(P=n.currentMonth),z===void 0&&(z=n.currentYear),P===1&&(z%4===0&&z%100!==0||z%400===0)?29:n.l10n.daysInMonth[P]}}}function i(){n.element=n.input=e,n.isOpen=!1,vt(),ge(),dn(),Ei(),r(),n.isMobile||S(),C(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&p(n.config.noCalendar?n.latestSelectedDateObj:void 0),Wt(!1)),l();var P=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&P&&xe(),Ne("onReady")}function o(){var P;return((P=n.calendarContainer)===null||P===void 0?void 0:P.getRootNode()).activeElement||document.activeElement}function a(P){return P.bind(n)}function l(){var P=n.config;P.weekNumbers===!1&&P.showMonths===1||P.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var z=(n.days.offsetWidth+1)*P.showMonths;n.daysContainer.style.width=z+"px",n.calendarContainer.style.width=z+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function c(P){if(n.selectedDates.length===0){var z=n.config.minDate===void 0||en(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),q=iu(n.config);z.setHours(q.hours,q.minutes,q.seconds,z.getMilliseconds()),n.selectedDates=[z],n.latestSelectedDateObj=z}P!==void 0&&P.type!=="blur"&&bt(P);var ee=n._input.value;d(),Wt(),n._input.value!==ee&&n._debouncedChange()}function u(P,z){return P%12+12*cn(z===n.l10n.amPM[1])}function f(P){switch(P%24){case 0:case 12:return 12;default:return P%12}}function d(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var P=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,z=(parseInt(n.minuteElement.value,10)||0)%60,q=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(P=u(P,n.amPM.textContent));var ee=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&en(n.latestSelectedDateObj,n.config.minDate,!0)===0,ae=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&en(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var ue=ru(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Ce=ru(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),fe=ru(P,z,q);if(fe>Ce&&fe<ue){var Se=QP(ue);P=Se[0],z=Se[1],q=Se[2]}}else{if(ae){var pe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;P=Math.min(P,pe.getHours()),P===pe.getHours()&&(z=Math.min(z,pe.getMinutes())),z===pe.getMinutes()&&(q=Math.min(q,pe.getSeconds()))}if(ee){var ie=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;P=Math.max(P,ie.getHours()),P===ie.getHours()&&z<ie.getMinutes()&&(z=ie.getMinutes()),z===ie.getMinutes()&&(q=Math.max(q,ie.getSeconds()))}}g(P,z,q)}}function p(P){var z=P||n.latestSelectedDateObj;z&&z instanceof Date&&g(z.getHours(),z.getMinutes(),z.getSeconds())}function g(P,z,q){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(P%24,z,q||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=Ht(n.config.time_24hr?P:(12+P)%12+12*cn(P%12===0)),n.minuteElement.value=Ht(z),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[cn(P>=12)]),n.secondElement!==void 0&&(n.secondElement.value=Ht(q)))}function v(P){var z=Zt(P),q=parseInt(z.value)+(P.delta||0);(q/1e3>1||P.key==="Enter"&&!/[^\d]/.test(q.toString()))&&se(q)}function m(P,z,q,ee){if(z instanceof Array)return z.forEach(function(ae){return m(P,ae,q,ee)});if(P instanceof Array)return P.forEach(function(ae){return m(ae,z,q,ee)});P.addEventListener(z,q,ee),n._handlers.push({remove:function(){return P.removeEventListener(z,q,ee)}})}function b(){Ne("onChange")}function C(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(q){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+q+"]"),function(ee){return m(ee,"click",n[q])})}),n.isMobile){$o();return}var P=bg(Fe,50);if(n._debouncedChange=bg(b,XP),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(n.daysContainer,"mouseover",function(q){n.config.mode==="range"&&ve(Zt(q))}),m(n._input,"keydown",de),n.calendarContainer!==void 0&&m(n.calendarContainer,"keydown",de),!n.config.inline&&!n.config.static&&m(window,"resize",P),window.ontouchstart!==void 0?m(window.document,"touchstart",ce):m(window.document,"mousedown",ce),m(window.document,"focus",ce,{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",Gt),m(n.monthNav,["keyup","increment"],v),m(n.daysContainer,"click",St)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var z=function(q){return Zt(q).select()};m(n.timeContainer,["increment"],c),m(n.timeContainer,"blur",c,{capture:!0}),m(n.timeContainer,"click",x),m([n.hourElement,n.minuteElement],["focus","click"],z),n.secondElement!==void 0&&m(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&m(n.amPM,"click",function(q){c(q)})}n.config.allowInput&&m(n._input,"blur",ne)}function w(P,z){var q=P!==void 0?n.parseDate(P):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),ee=n.currentYear,ae=n.currentMonth;try{q!==void 0&&(n.currentYear=q.getFullYear(),n.currentMonth=q.getMonth())}catch(ue){ue.message="Invalid date supplied: "+q,n.config.errorHandler(ue)}z&&n.currentYear!==ee&&(Ne("onYearChange"),N()),z&&(n.currentYear!==ee||n.currentMonth!==ae)&&Ne("onMonthChange"),n.redraw()}function x(P){var z=Zt(P);~z.className.indexOf("arrow")&&I(P,z.classList.contains("arrowUp")?1:-1)}function I(P,z,q){var ee=P&&Zt(P),ae=q||ee&&ee.parentNode&&ee.parentNode.firstChild,ue=hr("increment");ue.delta=z,ae&&ae.dispatchEvent(ue)}function S(){var P=window.document.createDocumentFragment();if(n.calendarContainer=$e("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(P.appendChild($()),n.innerContainer=$e("div","flatpickr-innerContainer"),n.config.weekNumbers){var z=X(),q=z.weekWrapper,ee=z.weekNumbers;n.innerContainer.appendChild(q),n.weekNumbers=ee,n.weekWrapper=q}n.rContainer=$e("div","flatpickr-rContainer"),n.rContainer.appendChild(V()),n.daysContainer||(n.daysContainer=$e("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),P.appendChild(n.innerContainer)}n.config.enableTime&&P.appendChild(M()),$t(n.calendarContainer,"rangeMode",n.config.mode==="range"),$t(n.calendarContainer,"animate",n.config.animate===!0),$t(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(P);var ae=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&&(!ae&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var ue=$e("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ue,n.element),ue.appendChild(n.element),n.altInput&&ue.appendChild(n.altInput),ue.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function A(P,z,q,ee){var ae=Z(z,!0),ue=$e("span",P,z.getDate().toString());return ue.dateObj=z,ue.$i=ee,ue.setAttribute("aria-label",n.formatDate(z,n.config.ariaDateFormat)),P.indexOf("hidden")===-1&&en(z,n.now)===0&&(n.todayDateElem=ue,ue.classList.add("today"),ue.setAttribute("aria-current","date")),ae?(ue.tabIndex=-1,Lr(z)&&(ue.classList.add("selected"),n.selectedDateElem=ue,n.config.mode==="range"&&($t(ue,"startRange",n.selectedDates[0]&&en(z,n.selectedDates[0],!0)===0),$t(ue,"endRange",n.selectedDates[1]&&en(z,n.selectedDates[1],!0)===0),P==="nextMonthDay"&&ue.classList.add("inRange")))):ue.classList.add("flatpickr-disabled"),n.config.mode==="range"&&ki(z)&&!Lr(z)&&ue.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&P!=="prevMonthDay"&&ee%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(z)+"</span>"),Ne("onDayCreate",ue),ue}function E(P){P.focus(),n.config.mode==="range"&&ve(P)}function k(P){for(var z=P>0?0:n.config.showMonths-1,q=P>0?n.config.showMonths:-1,ee=z;ee!=q;ee+=P)for(var ae=n.daysContainer.children[ee],ue=P>0?0:ae.children.length-1,Ce=P>0?ae.children.length:-1,fe=ue;fe!=Ce;fe+=P){var Se=ae.children[fe];if(Se.className.indexOf("hidden")===-1&&Z(Se.dateObj))return Se}}function F(P,z){for(var q=P.className.indexOf("Month")===-1?P.dateObj.getMonth():n.currentMonth,ee=z>0?n.config.showMonths:-1,ae=z>0?1:-1,ue=q-n.currentMonth;ue!=ee;ue+=ae)for(var Ce=n.daysContainer.children[ue],fe=q-n.currentMonth===ue?P.$i+z:z<0?Ce.children.length-1:0,Se=Ce.children.length,pe=fe;pe>=0&&pe<Se&&pe!=(z>0?Se:-1);pe+=ae){var ie=Ce.children[pe];if(ie.className.indexOf("hidden")===-1&&Z(ie.dateObj)&&Math.abs(P.$i-pe)>=Math.abs(z))return E(ie)}n.changeMonth(ae),W(k(ae),0)}function W(P,z){var q=o(),ee=te(q||document.body),ae=P!==void 0?P:ee?q:n.selectedDateElem!==void 0&&te(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&te(n.todayDateElem)?n.todayDateElem:k(z>0?1:-1);ae===void 0?n._input.focus():ee?F(ae,z):E(ae)}function O(P,z){for(var q=(new Date(P,z,1).getDay()-n.l10n.firstDayOfWeek+7)%7,ee=n.utils.getDaysInMonth((z-1+12)%12,P),ae=n.utils.getDaysInMonth(z,P),ue=window.document.createDocumentFragment(),Ce=n.config.showMonths>1,fe=Ce?"prevMonthDay hidden":"prevMonthDay",Se=Ce?"nextMonthDay hidden":"nextMonthDay",pe=ee+1-q,ie=0;pe<=ee;pe++,ie++)ue.appendChild(A("flatpickr-day "+fe,new Date(P,z-1,pe),pe,ie));for(pe=1;pe<=ae;pe++,ie++)ue.appendChild(A("flatpickr-day",new Date(P,z,pe),pe,ie));for(var Ae=ae+1;Ae<=42-q&&(n.config.showMonths===1||ie%7!==0);Ae++,ie++)ue.appendChild(A("flatpickr-day "+Se,new Date(P,z+1,Ae%ae),Ae,ie));var Lt=$e("div","dayContainer");return Lt.appendChild(ue),Lt}function T(){if(n.daysContainer!==void 0){fs(n.daysContainer),n.weekNumbers&&fs(n.weekNumbers);for(var P=document.createDocumentFragment(),z=0;z<n.config.showMonths;z++){var q=new Date(n.currentYear,n.currentMonth,1);q.setMonth(n.currentMonth+z),P.appendChild(O(q.getFullYear(),q.getMonth()))}n.daysContainer.appendChild(P),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&ve()}}function N(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var P=function(ee){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&ee<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&ee>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var z=0;z<12;z++)if(P(z)){var q=$e("option","flatpickr-monthDropdown-month");q.value=new Date(n.currentYear,z).getMonth().toString(),q.textContent=ps(z,n.config.shorthandCurrentMonth,n.l10n),q.tabIndex=-1,n.currentMonth===z&&(q.selected=!0),n.monthsDropdownContainer.appendChild(q)}}}function H(){var P=$e("div","flatpickr-month"),z=window.document.createDocumentFragment(),q;n.config.showMonths>1||n.config.monthSelectorType==="static"?q=$e("span","cur-month"):(n.monthsDropdownContainer=$e("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),m(n.monthsDropdownContainer,"change",function(Ce){var fe=Zt(Ce),Se=parseInt(fe.value,10);n.changeMonth(Se-n.currentMonth),Ne("onMonthChange")}),N(),q=n.monthsDropdownContainer);var ee=hs("cur-year",{tabindex:"-1"}),ae=ee.getElementsByTagName("input")[0];ae.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&ae.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(ae.setAttribute("max",n.config.maxDate.getFullYear().toString()),ae.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ue=$e("div","flatpickr-current-month");return ue.appendChild(q),ue.appendChild(ee),z.appendChild(ue),P.appendChild(z),{container:P,yearElement:ae,monthElement:q}}function j(){fs(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var P=n.config.showMonths;P--;){var z=H();n.yearElements.push(z.yearElement),n.monthElements.push(z.monthElement),n.monthNav.appendChild(z.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){return n.monthNav=$e("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=$e("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=$e("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,j(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(P){n.__hidePrevMonthArrow!==P&&($t(n.prevMonthNav,"flatpickr-disabled",P),n.__hidePrevMonthArrow=P)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(P){n.__hideNextMonthArrow!==P&&($t(n.nextMonthNav,"flatpickr-disabled",P),n.__hideNextMonthArrow=P)}}),n.currentYearElement=n.yearElements[0],pr(),n.monthNav}function M(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var P=iu(n.config);n.timeContainer=$e("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var z=$e("span","flatpickr-time-separator",":"),q=hs("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=q.getElementsByTagName("input")[0];var ee=hs("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=ee.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=Ht(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?P.hours:f(P.hours)),n.minuteElement.value=Ht(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():P.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(q),n.timeContainer.appendChild(z),n.timeContainer.appendChild(ee),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var ae=hs("flatpickr-second");n.secondElement=ae.getElementsByTagName("input")[0],n.secondElement.value=Ht(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():P.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild($e("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(ae)}return n.config.time_24hr||(n.amPM=$e("span","flatpickr-am-pm",n.l10n.amPM[cn((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function V(){n.weekdayContainer?fs(n.weekdayContainer):n.weekdayContainer=$e("div","flatpickr-weekdays");for(var P=n.config.showMonths;P--;){var z=$e("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(z)}return Y(),n.weekdayContainer}function Y(){if(n.weekdayContainer){var P=n.l10n.firstDayOfWeek,z=Cg(n.l10n.weekdays.shorthand);P>0&&P<z.length&&(z=Cg(z.splice(P,z.length),z.splice(0,P)));for(var q=n.config.showMonths;q--;)n.weekdayContainer.children[q].innerHTML=`
|
|
2453
|
+
`,MP=1,LP=3,BP=function(e){Iy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=K.createRef(),n.videoRef=K.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document!="undefined"?document:null,n.currentWindow=typeof window!="undefined"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver=="undefined"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=_P(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=DP(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,c,u=n.imageRef.current||n.videoRef.current;if(u&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var f=n.containerRect.width/n.containerRect.height,d=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,p=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((a=n.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,g=u.offsetWidth<d||u.offsetHeight<p,v=d/p,m=void 0;if(g)switch(n.state.mediaObjectFit){default:case"contain":m=f>v?{width:n.containerRect.height*v,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/v};break;case"horizontal-cover":m={width:n.containerRect.width,height:n.containerRect.width/v};break;case"vertical-cover":m={width:n.containerRect.height*v,height:n.containerRect.height};break}else m={width:u.offsetWidth,height:u.offsetHeight};n.mediaSize=Pt(Pt({},m),{naturalWidth:d,naturalHeight:p}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var b=n.props.cropSize?n.props.cropSize:IP(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)!==b.height||((c=n.state.cropSize)===null||c===void 0?void 0:c.width)!==b.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(b),n.setState({cropSize:b},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(b),b}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(t.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(t.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(t.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=t.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+r.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,a=r.x,l=r.y;n.dragStartPosition={x:a,y:l},n.dragStartCrop=Pt({},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,c={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+l},u=n.props.restrictPosition?cs(c,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):c;n.props.onCropChange(u)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=t.getMousePoint(r),o=SP(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,c;return(c=(l=n.props).onInteractionStart)===null||c===void 0?void 0:c.call(l)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var l,c;return(c=(l=n.props).onInteractionEnd)===null||c===void 0?void 0:c.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,c=a.zoom;return{x:(i+l.x)/c,y:(o+l.y)/c}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,l=a.shouldUpdatePosition,c=l===void 0?!0:l;if(!(!n.state.cropSize||!n.props.onZoomChange)){var u=us(r,n.props.minZoom,n.props.maxZoom);if(c){var f=n.getPointOnContainer(i,n.containerPosition),d=n.getPointOnMedia(f),p={x:d.x*u-f.x,y:d.y*u-f.y},g=n.props.restrictPosition?cs(p,n.mediaSize,n.state.cropSize,u,n.props.rotation):p;n.props.onCropChange(g)}n.props.onZoomChange(u)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?cs(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return TP(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?cs(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=RP,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,c,u,f,d;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.width)?this.computeSizes():(((l=n.crop)===null||l===void 0?void 0:l.x)!==((c=this.props.crop)===null||c===void 0?void 0:c.x)||((u=n.crop)===null||u===void 0?void 0:u.y)!==((f=this.props.crop)===null||f===void 0?void 0:f.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((d=this.videoRef.current)===null||d===void 0||d.load());var p=this.getObjectFit();p!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:p},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,c=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,u=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,f=c/u;return f<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=cg(r,i),this.lastPinchRotation=ug(r,i),this.onDragStart(dg(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=dg(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var l=cg(i,o),c=r.props.zoom*(l/r.lastPinchDistance);r.setNewZoom(c,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=l;var u=ug(i,o),f=r.props.rotation+(u-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(f),r.lastPinchRotation=u})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,l=i.mediaProps,c=i.transform,u=i.crop,f=u.x,d=u.y,p=i.rotation,g=i.zoom,v=i.cropShape,m=i.showGrid,b=i.style,C=b.containerStyle,w=b.cropAreaStyle,x=b.mediaStyle,I=i.classes,S=I.containerClassName,A=I.cropAreaClassName,E=I.mediaClassName,k=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return K.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(W){return n.containerRef=W},"data-testid":"container",style:C,className:ds("reactEasyCrop_Container",S)},o?K.createElement("img",Pt({alt:"",className:ds("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:Pt(Pt({},x),{transform:c||"translate(".concat(f,"px, ").concat(d,"px) rotate(").concat(p,"deg) scale(").concat(g,")")}),onLoad:this.onMediaLoad})):a&&K.createElement("video",Pt({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:ds("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:Pt(Pt({},x),{transform:c||"translate(".concat(f,"px, ").concat(d,"px) rotate(").concat(p,"deg) scale(").concat(g,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(F){return K.createElement("source",Pt({key:F.src},F))})),this.state.cropSize&&K.createElement("div",{style:Pt(Pt({},w),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:ds("reactEasyCrop_CropArea",v==="round"&&"reactEasyCrop_CropAreaRound",m&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:LP,minZoom:MP,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t}(K.Component);const $P=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 FP(e){return e*Math.PI/180}function NP(e,t,n=0){return _(this,null,function*(){const r=yield $P(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(FP(n)),o.translate(-l/2,-l/2),o.drawImage(r,l/2-r.width*.5,l/2-r.height*.5);const c=o.getImageData(0,0,l,l);return i.width=t.width,i.height=t.height,o.putImageData(c,Math.round(0-l/2+r.width*.5-t.x),Math.round(0-l/2+r.height*.5-t.y)),new Promise(u=>i.toBlob(f=>{const d=new File([f],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});u(d)},"image/jpeg"))})}const fg=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,l]=y.useState({x:0,y:0}),[c,u]=y.useState(1),[f,d]=y.useState(16/9),[p,g]=y.useState(null),v=(x,I)=>{g(I)},m=(x,I)=>d(I),b=()=>_(this,null,function*(){const x=yield NP(n,p);w(),o(x)}),C=()=>{w(),r()},w=()=>{l({x:0,y:0}),u(1),d(16/9),g(null)};return s.jsx(h.Modal,{open:t,onClose:i,children:s.jsxs(h.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[s.jsx(h.ModalClose,{}),s.jsx(h.DialogTitle,{children:e.cropImage}),s.jsxs(h.DialogContent,{sx:{width:"100%"},children:[s.jsx(h.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:s.jsx(BP,{image:n,crop:a,zoom:c,aspect:f,onCropChange:l,onCropComplete:v,onZoomChange:u})}),s.jsxs(h.FormControl,{sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{color:"primary",children:e.aspectRatio}),s.jsxs(h.Select,{value:f,onChange:m,children:[s.jsx(h.Option,{value:4/3,children:"4 / 3"}),s.jsx(h.Option,{value:16/9,children:"16 / 9"}),s.jsx(h.Option,{value:1,children:"1"})]})]}),s.jsx(h.Box,{mb:1,mx:2,children:s.jsx(h.Slider,{value:c,min:1,max:3,step:.1,onChange:(x,I)=>u(I)})}),s.jsxs(h.DialogActions,{children:[s.jsx(h.Button,{color:"primary",onClick:b,loading:!1,children:e.crop}),s.jsx(h.Button,{color:"primary",variant:"outlined",onClick:C,loading:!1,children:e.reset})]})]})]})})},hg=Be(s.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),pg=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=y.useState(!1),[l,c]=y.useState(!1),[u,f]=y.useState(!1),[d,p]=y.useState(!1),[g,v]=y.useState(""),[m,b]=y.useState("primary"),[C,w]=y.useState(""),x=y.useRef(null),I=()=>p(!d),S=()=>{x.current&&x.current.click()},A=new Wp,E=y.useContext(fa),k=()=>{v(""),c(!1)},F=M=>{let V="",Y="primary";switch(M){case"copy_url":V=e.urlCopiedToClipboardMessage,Y="primary";break;case"image_deleted":V=e.imageDeletedMessage,Y="primary";break;case"image_reset":V=e.imageResetMessage,Y="primary";break;case"upload_success":V=e.uploadingImageMessage,Y="success";break;case"upload_failed":V=e.uploadingImageErrorMessage,Y="danger";break;case"sign_in_url_failed":V=e.generateSignedInUrlErrorMessage,Y="danger";break;case"encrypting_file_failed":V=e.encryptingImageErrorMessage,Y="danger";break}b(Y),v(V),c(!0)},W=()=>f(!u),O=()=>{i(),F("image_deleted")},T=M=>{navigator.clipboard.writeText(M),F("copy_url")},N=M=>_(this,null,function*(){M.persist();const V=M.target.files?M.target.files[0]:null;if(V){a(!0);try{const Y=V.type.split("/")[1],X=yield A.readFileAndHash(V),D=(yield A.generateHashFileName(V))+"."+Y,L={image_type:Y,image_file_name:D,image_size:V.size,base64_sum:X},U=yield E==null?void 0:E.https.generateSignedInUrl(L);if(U!=null&&U.ok){const G=yield U.json(),oe={"Content-Type":V.type,"Content-MD5":X};try{const ce=new File([V],D,{type:V.type}),se=yield E==null?void 0:E.https.storeInBucket(G.data.signed_url,ce,oe);r(se||""),w(se),F("upload_success")}catch(ce){console.error("There was a problem with uploading the file: ",ce),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield U==null?void 0:U.json()),F("sign_in_url_failed")}catch(Y){console.error("There was a problem with encrypting file...",Y),F("encrypting_file_failed")}a(!1)}}),H=M=>_(this,null,function*(){if(M){a(!0);try{const V=M.type.split("/")[1],Y=yield A.readFileAndHash(M),X=(yield A.generateHashFileName(M))+"."+V,D={image_type:V,image_file_name:X,image_size:M.size,base64_sum:Y},L=yield E==null?void 0:E.https.generateSignedInUrl(D);if(L!=null&&L.ok){const U=yield L.json(),G={"Content-Type":M.type,"Content-MD5":Y};try{const oe=new File([M],X,{type:M.type}),ce=yield E==null?void 0:E.https.storeInBucket(U.data.signed_url,oe,G);r(ce||""),F("upload_success")}catch(oe){console.error("There was a problem with uploading the file: ",oe),F("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield L==null?void 0:L.json()),F("sign_in_url_failed")}catch(V){console.error("There was a problem with encrypting file...",V),F("encrypting_file_failed")}a(!1)}}),j=()=>{r(C),F("image_reset")},$=M=>{r(M),w(M)};return s.jsxs(s.Fragment,{children:[s.jsxs(h.Card,{sx:{marginBottom:"10px"},children:[s.jsxs(h.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[s.jsx(h.Typography,{level:"title-lg",children:t}),s.jsx(h.Tooltip,{title:e.clearImage,children:s.jsx(h.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:O,children:s.jsx(Rp,{})})})]}),s.jsxs(h.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[s.jsxs(h.Skeleton,{loading:o,animation:"wave",children:[n?s.jsx(h.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)"}}}):s.jsx(jc,{sx:{fontSize:"3rem",opacity:.2}}),n?s.jsx(h.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:s.jsx(Yp,{sx:{fontSize:"3rem",color:"#fff"}})}):s.jsx(s.Fragment,{})]}),s.jsx(h.Tooltip,{title:e.copyUrl,children:s.jsx(di,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:s.jsx(_e.ContentCopy,{})})}),s.jsx(h.Tooltip,{title:e.viewImage,children:s.jsx(di,{onClick:W,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:s.jsx(qp,{})})}),s.jsx(h.Tooltip,{title:e.cropImage,children:s.jsx(di,{onClick:I,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:s.jsx(hg,{})})})]}),s.jsx(h.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:s.jsxs(di,{sx:{width:"100%"},onClick:S,children:[s.jsx(_e.Upload,{})," ",e.uploadImage,s.jsx(Qp,{type:"file",accept:"image/*",onChange:N,ref:x})]})}),E!=null&&E.https.sportal365Config?s.jsx(h.AccordionGroup,{variant:"soft",children:s.jsxs(h.Accordion,{children:[s.jsx(h.AccordionSummary,{children:s.jsx(h.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.sportal365Images})}),s.jsx(h.AccordionDetails,{children:s.jsx(Kp,{labels:e,onChangeImages:$})})]})}):s.jsx(s.Fragment,{})]}),s.jsx(Ge,{showToast:l,message:g,color:m,hideToast:k}),s.jsx(Gp,{title:e.viewImage,open:u,imageSrc:n,toggleModal:W}),s.jsx(fg,{labels:e,open:d,imageSrc:n,toggleModal:I,uploadImage:H,resetDefaultImageUrl:j})]})},zP=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),jP=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),UP=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),VP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=y.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],l=zP(e),c=jP(e),u=UP(e),f=(v,m)=>{const b=v.target.value;o.colors[m]=b,n(o)},d=(v,m)=>{const b=v.target.value;o.urls[m]=b,n(o)},p=(v,m)=>{o.images[m]=v,n(o)},g=v=>{o.images[v]="",n(o)};return s.jsx(h.Box,{children:s.jsxs(Xh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[s.jsxs(Zh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${Ic.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:[s.jsxs(ei,{children:[s.jsx(h.ListItemDecorator,{children:s.jsx(jc,{sx:{width:"20px"}})}),e.images]}),s.jsxs(ei,{children:[s.jsx(h.ListItemDecorator,{children:s.jsx(p_,{sx:{width:"20px"}})}),e.colors]}),s.jsxs(ei,{children:[s.jsx(h.ListItemDecorator,{children:s.jsx(g_,{sx:{width:"20px"}})}),e.urls]})]}),s.jsxs(ci,{value:0,sx:{px:0},children:[s.jsx(pg,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:v=>p(v,"main_logo"),clearImage:()=>g("main_logo")}),s.jsx(h.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?s.jsx(s.Fragment,{children:a.map(v=>s.jsx(pg,{labels:e,title:l.get(v),image:o.images[v],onChangeImages:m=>p(m,v),clearImage:()=>g(v)},`branding-image-${v}`))}):s.jsx(s.Fragment,{})]}),s.jsx(ci,{value:1,sx:{px:0},children:s.jsx(h.Box,{children:Object.keys(o.colors).map(v=>s.jsx(h.Box,{mb:2,children:s.jsx(Ot,{size:"sm",label:c.get(v),placeholder:"",defaultValue:o.colors[v],required:!1,onChange:m=>f(m,v)})},`branding-color-${v}`))})}),s.jsx(ci,{value:2,sx:{px:0},children:s.jsx(h.Box,{children:Object.keys(o.urls).map(v=>s.jsx(h.Box,{mb:2,children:s.jsx(Ot,{size:"sm",label:u.get(v),placeholder:"",defaultValue:o.urls[v],required:!1,onChange:m=>d(m,v)})},`branding-url-${v}`))})})]})})},gg=Be(s.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"),mg=e=>{const t=()=>_(this,null,function*(){yield no(e.environment).signOut()});return s.jsx(h.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},HP=Be(s.jsx("path",{d:"m8.71 11.71 2.59 2.59c.39.39 1.02.39 1.41 0l2.59-2.59c.63-.63.18-1.71-.71-1.71H9.41c-.89 0-1.33 1.08-.7 1.71"}),"ArrowDropDownRounded"),WP=Be(s.jsx("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm0 6-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25zm-7.5-5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zm-1.51 3.49L9 15.17l-.99-2.18L5.83 12l2.18-.99L9 8.83l.99 2.18 2.18.99z"}),"AutoAwesomeOutlined"),GP=(e,t)=>{let n=[{id:"football_post_match",label:t.generateFootballPostMatchLabel}];switch(e){case"classic_quiz":n=[...n,{id:"formula1_post_event",label:(t==null?void 0:t.generateFormula1PostEventLabel)||""}];break}return n},YP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,generateLabels:r,entityType:i,environment:o,onClickCreate:a,onClickCreateFromTemplate:l,onClickGenerate:c})=>{const u=()=>{if(!r||!c)return s.jsx(s.Fragment,{});const f=GP(i,r);return s.jsxs(h.Dropdown,{children:[s.jsxs(h.ButtonGroup,{variant:"solid",size:"md",color:"neutral",children:[s.jsx(h.MenuButton,{slots:{root:h.Button},startDecorator:s.jsx(WP,{}),sx:{border:1,borderColor:"neutral.outlinedBorder",borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0,bgcolor:"transparent",color:"neutral.outlinedColor","&:hover":{bgcolor:"neutral.outlinedActiveBg"}},children:r.generateAIEntityLabel}),s.jsx(h.MenuButton,{slots:{root:h.IconButton},"aria-label":"More AI quiz options",sx:{border:1,borderColor:"neutral.outlinedBorder",borderLeft:"none",bgcolor:"transparent",color:"neutral.outlinedColor","&:hover":{bgcolor:"neutral.outlinedActiveBg"},borderTopRightRadius:"6px !important",borderBottomRightRadius:"6px !important"},children:s.jsx(HP,{})})]}),s.jsx(h.Menu,{placement:"bottom",sx:{maxHeight:240,borderRadius:12,boxShadow:"md"},children:f.map(d=>s.jsx(h.MenuItem,{onClick:()=>c(d.id),children:d.label},d.id))})]})};return s.jsx(s.Fragment,{children:s.jsxs(h.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[s.jsxs(h.Stack,{direction:"row",alignItems:"center",spacing:2,children:[s.jsx(h.Button,{startDecorator:s.jsx(gg,{}),variant:"solid",color:"primary",onClick:a,children:e}),t?s.jsx(h.Button,{startDecorator:s.jsx(gg,{}),variant:"outlined",color:"primary",onClick:l,children:t}):s.jsx(s.Fragment,{}),u()]}),n?s.jsx(mg,{signOutLabel:n,environment:o}):s.jsx(s.Fragment,{})]})})};var vg={},Zc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],hi={_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},bo={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},Ht=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},cn=function(e){return e===!0?1:0};function bg(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var eu=function(e){return e instanceof Array?e:[e]};function $t(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function $e(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,n!==void 0&&(r.textContent=n),r}function fs(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function yg(e,t){if(t(e))return e;if(e.parentNode)return yg(e.parentNode,t)}function hs(e,t){var n=$e("div","numInputWrapper"),r=$e("input","numInput "+e),i=$e("span","arrowUp"),o=$e("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Xt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var tu=function(){},ps=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},KP={D:tu,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*cn(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:tu,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:tu,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},Dr={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})"},yo={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[yo.w(e,t,n)]},F:function(e,t,n){return ps(yo.n(e,t,n)-1,!1,t)},G:function(e,t,n){return Ht(yo.h(e,t,n))},H:function(e){return Ht(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[cn(e.getHours()>11)]},M:function(e,t){return ps(e.getMonth(),!0,t)},S:function(e){return Ht(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return Ht(e.getFullYear(),4)},d:function(e){return Ht(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return Ht(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return Ht(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)}},xg=function(e){var t=e.config,n=t===void 0?hi:t,r=e.l10n,i=r===void 0?bo:r,o=e.isMobile,a=o===void 0?!1:o;return function(l,c,u){var f=u||i;return n.formatDate!==void 0&&!a?n.formatDate(l,c,f):c.split("").map(function(d,p,g){return yo[d]&&g[p-1]!=="\\"?yo[d](l,f,n):d!=="\\"?d:""}).join("")}},nu=function(e){var t=e.config,n=t===void 0?hi:t,r=e.l10n,i=r===void 0?bo:r;return function(o,a,l,c){if(!(o!==0&&!o)){var u=c||i,f,d=o;if(o instanceof Date)f=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)f=new Date(o);else if(typeof o=="string"){var p=a||(n||hi).dateFormat,g=String(o).trim();if(g==="today")f=new Date,l=!0;else if(n&&n.parseDate)f=n.parseDate(o,p);else if(/Z$/.test(g)||/GMT$/.test(g))f=new Date(o);else{for(var v=void 0,m=[],b=0,C=0,w="";b<p.length;b++){var x=p[b],I=x==="\\",S=p[b-1]==="\\"||I;if(Dr[x]&&!S){w+=Dr[x];var A=new RegExp(w).exec(o);A&&(v=!0)&&m[x!=="Y"?"push":"unshift"]({fn:KP[x],val:A[++C]})}else I||(w+=".")}f=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),m.forEach(function(E){var k=E.fn,F=E.val;return f=k(f,F,u)||f}),f=v?f:void 0}}if(!(f instanceof Date&&!isNaN(f.getTime()))){n.errorHandler(new Error("Invalid date provided: "+d));return}return l===!0&&f.setHours(0,0,0,0),f}}};function Zt(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 qP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},ru=function(e,t,n){return e*3600+t*60+n},QP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},JP={DAY:864e5};function iu(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(),c=e.maxDate.getMinutes();t=Math.min(t,l),t===l&&(n=Math.min(c,n)),t===l&&n===c&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var r=function(l){l&&Object.keys(l).forEach(function(c){return e[c]=l[c]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var Rt=function(){return Rt=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},Rt.apply(this,arguments)},Cg=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},XP=300;function ZP(e,t){var n={config:Rt(Rt({},hi),mt.defaultConfig),l10n:bo};n.parseDate=nu({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=m,n._setHoursFromDate=p,n._positionCalendar=xe,n.changeMonth=D,n.changeYear=se,n.clear=L,n.close=U,n.onMouseOver=ve,n._createElement=$e,n.createDay=A,n.destroy=G,n.isEnabled=Z,n.jumpToDate=w,n.updateValue=Wt,n.open=st,n.redraw=Oe,n.set=Mt,n.setDate=Nt,n.toggle=Fo;function r(){n.utils={getDaysInMonth:function(P,z){return P===void 0&&(P=n.currentMonth),z===void 0&&(z=n.currentYear),P===1&&(z%4===0&&z%100!==0||z%400===0)?29:n.l10n.daysInMonth[P]}}}function i(){n.element=n.input=e,n.isOpen=!1,vt(),ge(),dn(),Ei(),r(),n.isMobile||S(),C(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&p(n.config.noCalendar?n.latestSelectedDateObj:void 0),Wt(!1)),l();var P=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&P&&xe(),Ne("onReady")}function o(){var P;return((P=n.calendarContainer)===null||P===void 0?void 0:P.getRootNode()).activeElement||document.activeElement}function a(P){return P.bind(n)}function l(){var P=n.config;P.weekNumbers===!1&&P.showMonths===1||P.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var z=(n.days.offsetWidth+1)*P.showMonths;n.daysContainer.style.width=z+"px",n.calendarContainer.style.width=z+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function c(P){if(n.selectedDates.length===0){var z=n.config.minDate===void 0||Zt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),q=iu(n.config);z.setHours(q.hours,q.minutes,q.seconds,z.getMilliseconds()),n.selectedDates=[z],n.latestSelectedDateObj=z}P!==void 0&&P.type!=="blur"&&bt(P);var ee=n._input.value;d(),Wt(),n._input.value!==ee&&n._debouncedChange()}function u(P,z){return P%12+12*cn(z===n.l10n.amPM[1])}function f(P){switch(P%24){case 0:case 12:return 12;default:return P%12}}function d(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var P=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,z=(parseInt(n.minuteElement.value,10)||0)%60,q=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(P=u(P,n.amPM.textContent));var ee=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Zt(n.latestSelectedDateObj,n.config.minDate,!0)===0,ae=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Zt(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var ue=ru(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Ce=ru(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),fe=ru(P,z,q);if(fe>Ce&&fe<ue){var Se=QP(ue);P=Se[0],z=Se[1],q=Se[2]}}else{if(ae){var pe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;P=Math.min(P,pe.getHours()),P===pe.getHours()&&(z=Math.min(z,pe.getMinutes())),z===pe.getMinutes()&&(q=Math.min(q,pe.getSeconds()))}if(ee){var ie=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;P=Math.max(P,ie.getHours()),P===ie.getHours()&&z<ie.getMinutes()&&(z=ie.getMinutes()),z===ie.getMinutes()&&(q=Math.max(q,ie.getSeconds()))}}g(P,z,q)}}function p(P){var z=P||n.latestSelectedDateObj;z&&z instanceof Date&&g(z.getHours(),z.getMinutes(),z.getSeconds())}function g(P,z,q){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(P%24,z,q||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=Ht(n.config.time_24hr?P:(12+P)%12+12*cn(P%12===0)),n.minuteElement.value=Ht(z),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[cn(P>=12)]),n.secondElement!==void 0&&(n.secondElement.value=Ht(q)))}function v(P){var z=Xt(P),q=parseInt(z.value)+(P.delta||0);(q/1e3>1||P.key==="Enter"&&!/[^\d]/.test(q.toString()))&&se(q)}function m(P,z,q,ee){if(z instanceof Array)return z.forEach(function(ae){return m(P,ae,q,ee)});if(P instanceof Array)return P.forEach(function(ae){return m(ae,z,q,ee)});P.addEventListener(z,q,ee),n._handlers.push({remove:function(){return P.removeEventListener(z,q,ee)}})}function b(){Ne("onChange")}function C(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(q){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+q+"]"),function(ee){return m(ee,"click",n[q])})}),n.isMobile){$o();return}var P=bg(Fe,50);if(n._debouncedChange=bg(b,XP),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(n.daysContainer,"mouseover",function(q){n.config.mode==="range"&&ve(Xt(q))}),m(n._input,"keydown",de),n.calendarContainer!==void 0&&m(n.calendarContainer,"keydown",de),!n.config.inline&&!n.config.static&&m(window,"resize",P),window.ontouchstart!==void 0?m(window.document,"touchstart",ce):m(window.document,"mousedown",ce),m(window.document,"focus",ce,{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",en),m(n.monthNav,["keyup","increment"],v),m(n.daysContainer,"click",St)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var z=function(q){return Xt(q).select()};m(n.timeContainer,["increment"],c),m(n.timeContainer,"blur",c,{capture:!0}),m(n.timeContainer,"click",x),m([n.hourElement,n.minuteElement],["focus","click"],z),n.secondElement!==void 0&&m(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&m(n.amPM,"click",function(q){c(q)})}n.config.allowInput&&m(n._input,"blur",ne)}function w(P,z){var q=P!==void 0?n.parseDate(P):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),ee=n.currentYear,ae=n.currentMonth;try{q!==void 0&&(n.currentYear=q.getFullYear(),n.currentMonth=q.getMonth())}catch(ue){ue.message="Invalid date supplied: "+q,n.config.errorHandler(ue)}z&&n.currentYear!==ee&&(Ne("onYearChange"),N()),z&&(n.currentYear!==ee||n.currentMonth!==ae)&&Ne("onMonthChange"),n.redraw()}function x(P){var z=Xt(P);~z.className.indexOf("arrow")&&I(P,z.classList.contains("arrowUp")?1:-1)}function I(P,z,q){var ee=P&&Xt(P),ae=q||ee&&ee.parentNode&&ee.parentNode.firstChild,ue=hr("increment");ue.delta=z,ae&&ae.dispatchEvent(ue)}function S(){var P=window.document.createDocumentFragment();if(n.calendarContainer=$e("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(P.appendChild($()),n.innerContainer=$e("div","flatpickr-innerContainer"),n.config.weekNumbers){var z=X(),q=z.weekWrapper,ee=z.weekNumbers;n.innerContainer.appendChild(q),n.weekNumbers=ee,n.weekWrapper=q}n.rContainer=$e("div","flatpickr-rContainer"),n.rContainer.appendChild(V()),n.daysContainer||(n.daysContainer=$e("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),P.appendChild(n.innerContainer)}n.config.enableTime&&P.appendChild(M()),$t(n.calendarContainer,"rangeMode",n.config.mode==="range"),$t(n.calendarContainer,"animate",n.config.animate===!0),$t(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(P);var ae=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&&(!ae&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var ue=$e("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ue,n.element),ue.appendChild(n.element),n.altInput&&ue.appendChild(n.altInput),ue.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function A(P,z,q,ee){var ae=Z(z,!0),ue=$e("span",P,z.getDate().toString());return ue.dateObj=z,ue.$i=ee,ue.setAttribute("aria-label",n.formatDate(z,n.config.ariaDateFormat)),P.indexOf("hidden")===-1&&Zt(z,n.now)===0&&(n.todayDateElem=ue,ue.classList.add("today"),ue.setAttribute("aria-current","date")),ae?(ue.tabIndex=-1,Lr(z)&&(ue.classList.add("selected"),n.selectedDateElem=ue,n.config.mode==="range"&&($t(ue,"startRange",n.selectedDates[0]&&Zt(z,n.selectedDates[0],!0)===0),$t(ue,"endRange",n.selectedDates[1]&&Zt(z,n.selectedDates[1],!0)===0),P==="nextMonthDay"&&ue.classList.add("inRange")))):ue.classList.add("flatpickr-disabled"),n.config.mode==="range"&&ki(z)&&!Lr(z)&&ue.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&P!=="prevMonthDay"&&ee%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(z)+"</span>"),Ne("onDayCreate",ue),ue}function E(P){P.focus(),n.config.mode==="range"&&ve(P)}function k(P){for(var z=P>0?0:n.config.showMonths-1,q=P>0?n.config.showMonths:-1,ee=z;ee!=q;ee+=P)for(var ae=n.daysContainer.children[ee],ue=P>0?0:ae.children.length-1,Ce=P>0?ae.children.length:-1,fe=ue;fe!=Ce;fe+=P){var Se=ae.children[fe];if(Se.className.indexOf("hidden")===-1&&Z(Se.dateObj))return Se}}function F(P,z){for(var q=P.className.indexOf("Month")===-1?P.dateObj.getMonth():n.currentMonth,ee=z>0?n.config.showMonths:-1,ae=z>0?1:-1,ue=q-n.currentMonth;ue!=ee;ue+=ae)for(var Ce=n.daysContainer.children[ue],fe=q-n.currentMonth===ue?P.$i+z:z<0?Ce.children.length-1:0,Se=Ce.children.length,pe=fe;pe>=0&&pe<Se&&pe!=(z>0?Se:-1);pe+=ae){var ie=Ce.children[pe];if(ie.className.indexOf("hidden")===-1&&Z(ie.dateObj)&&Math.abs(P.$i-pe)>=Math.abs(z))return E(ie)}n.changeMonth(ae),W(k(ae),0)}function W(P,z){var q=o(),ee=te(q||document.body),ae=P!==void 0?P:ee?q:n.selectedDateElem!==void 0&&te(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&te(n.todayDateElem)?n.todayDateElem:k(z>0?1:-1);ae===void 0?n._input.focus():ee?F(ae,z):E(ae)}function O(P,z){for(var q=(new Date(P,z,1).getDay()-n.l10n.firstDayOfWeek+7)%7,ee=n.utils.getDaysInMonth((z-1+12)%12,P),ae=n.utils.getDaysInMonth(z,P),ue=window.document.createDocumentFragment(),Ce=n.config.showMonths>1,fe=Ce?"prevMonthDay hidden":"prevMonthDay",Se=Ce?"nextMonthDay hidden":"nextMonthDay",pe=ee+1-q,ie=0;pe<=ee;pe++,ie++)ue.appendChild(A("flatpickr-day "+fe,new Date(P,z-1,pe),pe,ie));for(pe=1;pe<=ae;pe++,ie++)ue.appendChild(A("flatpickr-day",new Date(P,z,pe),pe,ie));for(var Ae=ae+1;Ae<=42-q&&(n.config.showMonths===1||ie%7!==0);Ae++,ie++)ue.appendChild(A("flatpickr-day "+Se,new Date(P,z+1,Ae%ae),Ae,ie));var Lt=$e("div","dayContainer");return Lt.appendChild(ue),Lt}function T(){if(n.daysContainer!==void 0){fs(n.daysContainer),n.weekNumbers&&fs(n.weekNumbers);for(var P=document.createDocumentFragment(),z=0;z<n.config.showMonths;z++){var q=new Date(n.currentYear,n.currentMonth,1);q.setMonth(n.currentMonth+z),P.appendChild(O(q.getFullYear(),q.getMonth()))}n.daysContainer.appendChild(P),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&ve()}}function N(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var P=function(ee){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&ee<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&ee>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var z=0;z<12;z++)if(P(z)){var q=$e("option","flatpickr-monthDropdown-month");q.value=new Date(n.currentYear,z).getMonth().toString(),q.textContent=ps(z,n.config.shorthandCurrentMonth,n.l10n),q.tabIndex=-1,n.currentMonth===z&&(q.selected=!0),n.monthsDropdownContainer.appendChild(q)}}}function H(){var P=$e("div","flatpickr-month"),z=window.document.createDocumentFragment(),q;n.config.showMonths>1||n.config.monthSelectorType==="static"?q=$e("span","cur-month"):(n.monthsDropdownContainer=$e("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),m(n.monthsDropdownContainer,"change",function(Ce){var fe=Xt(Ce),Se=parseInt(fe.value,10);n.changeMonth(Se-n.currentMonth),Ne("onMonthChange")}),N(),q=n.monthsDropdownContainer);var ee=hs("cur-year",{tabindex:"-1"}),ae=ee.getElementsByTagName("input")[0];ae.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&ae.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(ae.setAttribute("max",n.config.maxDate.getFullYear().toString()),ae.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ue=$e("div","flatpickr-current-month");return ue.appendChild(q),ue.appendChild(ee),z.appendChild(ue),P.appendChild(z),{container:P,yearElement:ae,monthElement:q}}function j(){fs(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var P=n.config.showMonths;P--;){var z=H();n.yearElements.push(z.yearElement),n.monthElements.push(z.monthElement),n.monthNav.appendChild(z.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){return n.monthNav=$e("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=$e("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=$e("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,j(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(P){n.__hidePrevMonthArrow!==P&&($t(n.prevMonthNav,"flatpickr-disabled",P),n.__hidePrevMonthArrow=P)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(P){n.__hideNextMonthArrow!==P&&($t(n.nextMonthNav,"flatpickr-disabled",P),n.__hideNextMonthArrow=P)}}),n.currentYearElement=n.yearElements[0],pr(),n.monthNav}function M(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var P=iu(n.config);n.timeContainer=$e("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var z=$e("span","flatpickr-time-separator",":"),q=hs("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=q.getElementsByTagName("input")[0];var ee=hs("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=ee.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=Ht(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?P.hours:f(P.hours)),n.minuteElement.value=Ht(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():P.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(q),n.timeContainer.appendChild(z),n.timeContainer.appendChild(ee),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var ae=hs("flatpickr-second");n.secondElement=ae.getElementsByTagName("input")[0],n.secondElement.value=Ht(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():P.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild($e("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(ae)}return n.config.time_24hr||(n.amPM=$e("span","flatpickr-am-pm",n.l10n.amPM[cn((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function V(){n.weekdayContainer?fs(n.weekdayContainer):n.weekdayContainer=$e("div","flatpickr-weekdays");for(var P=n.config.showMonths;P--;){var z=$e("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(z)}return Y(),n.weekdayContainer}function Y(){if(n.weekdayContainer){var P=n.l10n.firstDayOfWeek,z=Cg(n.l10n.weekdays.shorthand);P>0&&P<z.length&&(z=Cg(z.splice(P,z.length),z.splice(0,P)));for(var q=n.config.showMonths;q--;)n.weekdayContainer.children[q].innerHTML=`
|
|
2454
2454
|
<span class='flatpickr-weekday'>
|
|
2455
2455
|
`+z.join("</span><span class='flatpickr-weekday'>")+`
|
|
2456
2456
|
</span>
|
|
2457
|
-
`}}function X(){n.calendarContainer.classList.add("hasWeeks");var P=$e("div","flatpickr-weekwrapper");P.appendChild($e("span","flatpickr-weekday",n.l10n.weekAbbreviation));var z=$e("div","flatpickr-weeks");return P.appendChild(z),{weekWrapper:P,weekNumbers:z}}function D(P,z){z===void 0&&(z=!0);var q=z?P:P-n.currentMonth;q<0&&n._hidePrevMonthArrow===!0||q>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=q,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,Ne("onYearChange"),N()),T(),Ne("onMonthChange"),pr())}function L(P,z){if(P===void 0&&(P=!0),z===void 0&&(z=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,z===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var q=iu(n.config),ee=q.hours,ae=q.minutes,ue=q.seconds;g(ee,ae,ue)}n.redraw(),P&&Ne("onChange")}function U(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),Ne("onClose")}function G(){n.config!==void 0&&Ne("onDestroy");for(var P=n._handlers.length;P--;)n._handlers[P].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var z=n.calendarContainer.parentNode;if(z.lastChild&&z.removeChild(z.lastChild),z.parentNode){for(;z.firstChild;)z.parentNode.insertBefore(z.firstChild,z);z.parentNode.removeChild(z)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(q){try{delete n[q]}catch(ee){}})}function oe(P){return n.calendarContainer.contains(P)}function ce(P){if(n.isOpen&&!n.config.inline){var z=Zt(P),q=oe(z),ee=z===n.input||z===n.altInput||n.element.contains(z)||P.path&&P.path.indexOf&&(~P.path.indexOf(n.input)||~P.path.indexOf(n.altInput)),ae=!ee&&!q&&!oe(P.relatedTarget),ue=!n.config.ignoredFocusElements.some(function(Ce){return Ce.contains(z)});ae&&ue&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&c(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function se(P){if(!(!P||n.config.minDate&&P<n.config.minDate.getFullYear()||n.config.maxDate&&P>n.config.maxDate.getFullYear())){var z=P,q=n.currentYear!==z;n.currentYear=z||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),q&&(n.redraw(),Ne("onYearChange"),N())}}function Z(P,z){var q;z===void 0&&(z=!0);var ee=n.parseDate(P,void 0,z);if(n.config.minDate&&ee&&en(ee,n.config.minDate,z!==void 0?z:!n.minDateHasTime)<0||n.config.maxDate&&ee&&en(ee,n.config.maxDate,z!==void 0?z:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(ee===void 0)return!1;for(var ae=!!n.config.enable,ue=(q=n.config.enable)!==null&&q!==void 0?q:n.config.disable,Ce=0,fe=void 0;Ce<ue.length;Ce++){if(fe=ue[Ce],typeof fe=="function"&&fe(ee))return ae;if(fe instanceof Date&&ee!==void 0&&fe.getTime()===ee.getTime())return ae;if(typeof fe=="string"){var Se=n.parseDate(fe,void 0,!0);return Se&&Se.getTime()===ee.getTime()?ae:!ae}else if(typeof fe=="object"&&ee!==void 0&&fe.from&&fe.to&&ee.getTime()>=fe.from.getTime()&&ee.getTime()<=fe.to.getTime())return ae}return!ae}function te(P){return n.daysContainer!==void 0?P.className.indexOf("hidden")===-1&&P.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(P):!1}function ne(P){var z=P.target===n._input,q=n._input.value.trimEnd()!==gr();z&&q&&!(P.relatedTarget&&oe(P.relatedTarget))&&n.setDate(n._input.value,!0,P.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function de(P){var z=Zt(P),q=n.config.wrap?e.contains(z):z===n._input,ee=n.config.allowInput,ae=n.isOpen&&(!ee||!q),ue=n.config.inline&&q&&!ee;if(P.keyCode===13&&q){if(ee)return n.setDate(n._input.value,!0,z===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),z.blur();n.open()}else if(oe(z)||ae||ue){var Ce=!!n.timeContainer&&n.timeContainer.contains(z);switch(P.keyCode){case 13:Ce?(P.preventDefault(),c(),Pe()):St(P);break;case 27:P.preventDefault(),Pe();break;case 8:case 46:q&&!n.config.allowInput&&(P.preventDefault(),n.clear());break;case 37:case 39:if(!Ce&&!q){P.preventDefault();var fe=o();if(n.daysContainer!==void 0&&(ee===!1||fe&&te(fe))){var Se=P.keyCode===39?1:-1;P.ctrlKey?(P.stopPropagation(),D(Se),W(k(1),0)):W(void 0,Se)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:P.preventDefault();var pe=P.keyCode===40?1:-1;n.daysContainer&&z.$i!==void 0||z===n.input||z===n.altInput?P.ctrlKey?(P.stopPropagation(),se(n.currentYear-pe),W(k(1),0)):Ce||W(void 0,pe*7):z===n.currentYearElement?se(n.currentYear-pe):n.config.enableTime&&(!Ce&&n.hourElement&&n.hourElement.focus(),c(P),n._debouncedChange());break;case 9:if(Ce){var ie=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(lt){return lt}),Ae=ie.indexOf(z);if(Ae!==-1){var Lt=ie[Ae+(P.shiftKey?-1:1)];P.preventDefault(),(Lt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(z)&&P.shiftKey&&(P.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&z===n.amPM)switch(P.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],d(),Wt();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],d(),Wt();break}(q||oe(z))&&Ne("onKeyDown",P)}function ve(P,z){if(z===void 0&&(z="flatpickr-day"),!(n.selectedDates.length!==1||P&&(!P.classList.contains(z)||P.classList.contains("flatpickr-disabled")))){for(var q=P?P.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),ee=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),ae=Math.min(q,n.selectedDates[0].getTime()),ue=Math.max(q,n.selectedDates[0].getTime()),Ce=!1,fe=0,Se=0,pe=ae;pe<ue;pe+=JP.DAY)Z(new Date(pe),!0)||(Ce=Ce||pe>ae&&pe<ue,pe<ee&&(!fe||pe>fe)?fe=pe:pe>ee&&(!Se||pe<Se)&&(Se=pe));var ie=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+z));ie.forEach(function(Ae){var Lt=Ae.dateObj,lt=Lt.getTime(),vn=fe>0&<<fe||Se>0&<>Se;if(vn){Ae.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(_n){Ae.classList.remove(_n)});return}else if(Ce&&!vn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(_n){Ae.classList.remove(_n)}),P!==void 0&&(P.classList.add(q<=n.selectedDates[0].getTime()?"startRange":"endRange"),ee<q&<===ee?Ae.classList.add("startRange"):ee>q&<===ee&&Ae.classList.add("endRange"),lt>=fe&&(Se===0||lt<=Se)&&qP(lt,ee,q)&&Ae.classList.add("inRange"))})}}function Fe(){n.isOpen&&!n.config.static&&!n.config.inline&&xe()}function st(P,z){if(z===void 0&&(z=n._positionElement),n.isMobile===!0){if(P){P.preventDefault();var q=Zt(P);q&&q.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),Ne("onOpen");return}else if(n._input.disabled||n.config.inline)return;var ee=n.isOpen;n.isOpen=!0,ee||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),Ne("onOpen"),xe(z)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(P===void 0||!n.timeContainer.contains(P.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function Je(P){return function(z){var q=n.config["_"+P+"Date"]=n.parseDate(z,n.config.dateFormat),ee=n.config["_"+(P==="min"?"max":"min")+"Date"];q!==void 0&&(n[P==="min"?"minDateHasTime":"maxDateHasTime"]=q.getHours()>0||q.getMinutes()>0||q.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(ae){return Z(ae)}),!n.selectedDates.length&&P==="min"&&p(q),Wt()),n.daysContainer&&(Oe(),q!==void 0?n.currentYearElement[P]=q.getFullYear().toString():n.currentYearElement.removeAttribute(P),n.currentYearElement.disabled=!!ee&&q!==void 0&&ee.getFullYear()===q.getFullYear())}}function vt(){var P=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],z=Rt(Rt({},JSON.parse(JSON.stringify(e.dataset||{}))),t),q={};n.config.parseDate=z.parseDate,n.config.formatDate=z.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(ie){n.config._enable=kn(ie)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(ie){n.config._disable=kn(ie)}});var ee=z.mode==="time";if(!z.dateFormat&&(z.enableTime||ee)){var ae=mt.defaultConfig.dateFormat||hi.dateFormat;q.dateFormat=z.noCalendar||ee?"H:i"+(z.enableSeconds?":S":""):ae+" H:i"+(z.enableSeconds?":S":"")}if(z.altInput&&(z.enableTime||ee)&&!z.altFormat){var ue=mt.defaultConfig.altFormat||hi.altFormat;q.altFormat=z.noCalendar||ee?"h:i"+(z.enableSeconds?":S K":" K"):ue+(" h:i"+(z.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:Je("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:Je("max")});var Ce=function(ie){return function(Ae){n.config[ie==="min"?"_minTime":"_maxTime"]=n.parseDate(Ae,"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")}),z.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,q,z);for(var fe=0;fe<P.length;fe++)n.config[P[fe]]=n.config[P[fe]]===!0||n.config[P[fe]]==="true";Zc.filter(function(ie){return n.config[ie]!==void 0}).forEach(function(ie){n.config[ie]=eu(n.config[ie]||[]).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 fe=0;fe<n.config.plugins.length;fe++){var Se=n.config.plugins[fe](n)||{};for(var pe in Se)Zc.indexOf(pe)>-1?n.config[pe]=eu(Se[pe]).map(a).concat(n.config[pe]):typeof z[pe]=="undefined"&&(n.config[pe]=Se[pe])}z.altInputClass||(n.config.altInputClass=he().className+" "+n.config.altInputClass),Ne("onParseConfig")}function he(){return n.config.wrap?e.querySelector("[data-input]"):e}function ge(){typeof n.config.locale!="object"&&typeof mt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Rt(Rt({},mt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?mt.l10ns[n.config.locale]:void 0),Dr.D="("+n.l10n.weekdays.shorthand.join("|")+")",Dr.l="("+n.l10n.weekdays.longhand.join("|")+")",Dr.M="("+n.l10n.months.shorthand.join("|")+")",Dr.F="("+n.l10n.months.longhand.join("|")+")",Dr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var P=Rt(Rt({},t),JSON.parse(JSON.stringify(e.dataset||{})));P.time_24hr===void 0&&mt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=xg(n),n.parseDate=nu({config:n.config,l10n:n.l10n})}function xe(P){if(typeof n.config.position=="function")return void n.config.position(n,P);if(n.calendarContainer!==void 0){Ne("onPreCalendarPosition");var z=P||n._positionElement,q=Array.prototype.reduce.call(n.calendarContainer.children,function(pz,gz){return pz+gz.offsetHeight},0),ee=n.calendarContainer.offsetWidth,ae=n.config.position.split(" "),ue=ae[0],Ce=ae.length>1?ae[1]:null,fe=z.getBoundingClientRect(),Se=window.innerHeight-fe.bottom,pe=ue==="above"||ue!=="below"&&Se<q&&fe.top>q,ie=window.pageYOffset+fe.top+(pe?-q-2:z.offsetHeight+2);if($t(n.calendarContainer,"arrowTop",!pe),$t(n.calendarContainer,"arrowBottom",pe),!n.config.inline){var Ae=window.pageXOffset+fe.left,Lt=!1,lt=!1;Ce==="center"?(Ae-=(ee-fe.width)/2,Lt=!0):Ce==="right"&&(Ae-=ee-fe.width,lt=!0),$t(n.calendarContainer,"arrowLeft",!Lt&&!lt),$t(n.calendarContainer,"arrowCenter",Lt),$t(n.calendarContainer,"arrowRight",lt);var vn=window.document.body.offsetWidth-(window.pageXOffset+fe.right),_n=Ae+ee>window.document.body.offsetWidth,sz=vn+ee>window.document.body.offsetWidth;if($t(n.calendarContainer,"rightMost",_n),!n.config.static)if(n.calendarContainer.style.top=ie+"px",!_n)n.calendarContainer.style.left=Ae+"px",n.calendarContainer.style.right="auto";else if(!sz)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=vn+"px";else{var Vu=ke();if(Vu===void 0)return;var lz=window.document.body.offsetWidth,cz=Math.max(0,lz/2-ee/2),uz=".flatpickr-calendar.centerMost:before",dz=".flatpickr-calendar.centerMost:after",fz=Vu.cssRules.length,hz="{left:"+fe.left+"px;right:auto;}";$t(n.calendarContainer,"rightMost",!1),$t(n.calendarContainer,"centerMost",!0),Vu.insertRule(uz+","+dz+hz,fz),n.calendarContainer.style.left=cz+"px",n.calendarContainer.style.right="auto"}}}}function ke(){for(var P=null,z=0;z<document.styleSheets.length;z++){var q=document.styleSheets[z];if(q.cssRules){try{q.cssRules}catch(ee){continue}P=q;break}}return P!=null?P:Ye()}function Ye(){var P=document.createElement("style");return document.head.appendChild(P),P.sheet}function Oe(){n.config.noCalendar||n.isMobile||(N(),pr(),T())}function Pe(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function St(P){P.preventDefault(),P.stopPropagation();var z=function(ie){return ie.classList&&ie.classList.contains("flatpickr-day")&&!ie.classList.contains("flatpickr-disabled")&&!ie.classList.contains("notAllowed")},q=yg(Zt(P),z);if(q!==void 0){var ee=q,ae=n.latestSelectedDateObj=new Date(ee.dateObj.getTime()),ue=(ae.getMonth()<n.currentMonth||ae.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=ee,n.config.mode==="single")n.selectedDates=[ae];else if(n.config.mode==="multiple"){var Ce=Lr(ae);Ce?n.selectedDates.splice(parseInt(Ce),1):n.selectedDates.push(ae)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=ae,n.selectedDates.push(ae),en(ae,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(ie,Ae){return ie.getTime()-Ae.getTime()}));if(d(),ue){var fe=n.currentYear!==ae.getFullYear();n.currentYear=ae.getFullYear(),n.currentMonth=ae.getMonth(),fe&&(Ne("onYearChange"),N()),Ne("onMonthChange")}if(pr(),T(),Wt(),!ue&&n.config.mode!=="range"&&n.config.showMonths===1?E(ee):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var Se=n.config.mode==="single"&&!n.config.enableTime,pe=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(Se||pe)&&Pe()}b()}}var It={locale:[ge,Y],showMonths:[j,l,V],minDate:[w],maxDate:[w],positionElement:[Mr],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 Mt(P,z){if(P!==null&&typeof P=="object"){Object.assign(n.config,P);for(var q in P)It[q]!==void 0&&It[q].forEach(function(ee){return ee()})}else n.config[P]=z,It[P]!==void 0?It[P].forEach(function(ee){return ee()}):Zc.indexOf(P)>-1&&(n.config[P]=eu(z));n.redraw(),Wt(!0)}function _t(P,z){var q=[];if(P instanceof Array)q=P.map(function(ee){return n.parseDate(ee,z)});else if(P instanceof Date||typeof P=="number")q=[n.parseDate(P,z)];else if(typeof P=="string")switch(n.config.mode){case"single":case"time":q=[n.parseDate(P,z)];break;case"multiple":q=P.split(n.config.conjunction).map(function(ee){return n.parseDate(ee,z)});break;case"range":q=P.split(n.l10n.rangeSeparator).map(function(ee){return n.parseDate(ee,z)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(P)));n.selectedDates=n.config.allowInvalidPreload?q:q.filter(function(ee){return ee instanceof Date&&Z(ee,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(ee,ae){return ee.getTime()-ae.getTime()})}function Nt(P,z,q){if(z===void 0&&(z=!1),q===void 0&&(q=n.config.dateFormat),P!==0&&!P||P instanceof Array&&P.length===0)return n.clear(z);_t(P,q),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,z),p(),n.selectedDates.length===0&&n.clear(!1),Wt(z),z&&Ne("onChange")}function kn(P){return P.slice().map(function(z){return typeof z=="string"||typeof z=="number"||z instanceof Date?n.parseDate(z,void 0,!0):z&&typeof z=="object"&&z.from&&z.to?{from:n.parseDate(z.from,void 0),to:n.parseDate(z.to,void 0)}:z}).filter(function(z){return z})}function Ei(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var P=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);P&&_t(P,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function dn(){if(n.input=he(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=$e(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),Mr()}function Mr(){n._positionElement=n.config.positionElement||n._input}function $o(){var P=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=$e("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=P,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=P==="datetime-local"?"Y-m-d\\TH:i:S":P==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(z){}m(n.mobileInput,"change",function(z){n.setDate(Zt(z).value,!1,n.mobileFormatStr),Ne("onChange"),Ne("onClose")})}function Fo(P){if(n.isOpen===!0)return n.close();n.open(P)}function Ne(P,z){if(n.config!==void 0){var q=n.config[P];if(q!==void 0&&q.length>0)for(var ee=0;q[ee]&&ee<q.length;ee++)q[ee](n.selectedDates,n.input.value,n,z);P==="onChange"&&(n.input.dispatchEvent(hr("change")),n.input.dispatchEvent(hr("input")))}}function hr(P){var z=document.createEvent("Event");return z.initEvent(P,!0,!0),z}function Lr(P){for(var z=0;z<n.selectedDates.length;z++){var q=n.selectedDates[z];if(q instanceof Date&&en(q,P)===0)return""+z}return!1}function ki(P){return n.config.mode!=="range"||n.selectedDates.length<2?!1:en(P,n.selectedDates[0])>=0&&en(P,n.selectedDates[1])<=0}function pr(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(P,z){var q=new Date(n.currentYear,n.currentMonth,1);q.setMonth(n.currentMonth+z),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[z].textContent=ps(q.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=q.getMonth().toString(),P.value=q.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function gr(P){var z=P||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(q){return n.formatDate(q,z)}).filter(function(q,ee,ae){return n.config.mode!=="range"||n.config.enableTime||ae.indexOf(q)===ee}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function Wt(P){P===void 0&&(P=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=gr(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=gr(n.config.altFormat)),P!==!1&&Ne("onValueUpdate")}function Gt(P){var z=Zt(P),q=n.prevMonthNav.contains(z),ee=n.nextMonthNav.contains(z);q||ee?D(q?-1:1):n.yearElements.indexOf(z)>=0?z.select():z.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):z.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function bt(P){P.preventDefault();var z=P.type==="keydown",q=Zt(P),ee=q;n.amPM!==void 0&&q===n.amPM&&(n.amPM.textContent=n.l10n.amPM[cn(n.amPM.textContent===n.l10n.amPM[0])]);var ae=parseFloat(ee.getAttribute("min")),ue=parseFloat(ee.getAttribute("max")),Ce=parseFloat(ee.getAttribute("step")),fe=parseInt(ee.value,10),Se=P.delta||(z?P.which===38?1:-1:0),pe=fe+Ce*Se;if(typeof ee.value!="undefined"&&ee.value.length===2){var ie=ee===n.hourElement,Ae=ee===n.minuteElement;pe<ae?(pe=ue+pe+cn(!ie)+(cn(ie)&&cn(!n.amPM)),Ae&&I(void 0,-1,n.hourElement)):pe>ue&&(pe=ee===n.hourElement?pe-ue-cn(!n.amPM):ae,Ae&&I(void 0,1,n.hourElement)),n.amPM&&ie&&(Ce===1?pe+fe===23:Math.abs(pe-fe)>Ce)&&(n.amPM.textContent=n.l10n.amPM[cn(n.amPM.textContent===n.l10n.amPM[0])]),ee.value=Ht(pe)}}return i(),n}function pi(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=ZP(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 pi(this,e)},HTMLElement.prototype.flatpickr=function(e){return pi([this],e)});var mt=function(e,t){return typeof e=="string"?pi(window.document.querySelectorAll(e),t):e instanceof Node?pi([e],t):pi(e,t)};mt.defaultConfig={},mt.l10ns={en:Rt({},bo),default:Rt({},bo)},mt.localize=function(e){mt.l10ns.default=Rt(Rt({},mt.l10ns.default),e)},mt.setDefaults=function(e){mt.defaultConfig=Rt(Rt({},mt.defaultConfig),e)},mt.parseDate=nu({}),mt.formatDate=xg({}),mt.compareDates=en,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return pi(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=mt);const eD=Wu(Object.freeze(Object.defineProperty({__proto__:null,default:mt},Symbol.toStringTag,{value:"Module"})));(function(e){function t(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(U){return typeof U}:t=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},t(D)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(y),r=o(JS),i=o(eD);function o(D){return D&&D.__esModule?D:{default:D}}function a(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return a=function(){return D},D}function l(D){if(D&&D.__esModule)return D;if(D===null||t(D)!=="object"&&typeof D!="function")return{default:D};var L=a();if(L&&L.has(D))return L.get(D);var U={},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var oe in D)if(Object.prototype.hasOwnProperty.call(D,oe)){var ce=G?Object.getOwnPropertyDescriptor(D,oe):null;ce&&(ce.get||ce.set)?Object.defineProperty(U,oe,ce):U[oe]=D[oe]}return U.default=D,L&&L.set(D,U),U}function c(D){return p(D)||d(D)||f(D)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2457
|
+
`}}function X(){n.calendarContainer.classList.add("hasWeeks");var P=$e("div","flatpickr-weekwrapper");P.appendChild($e("span","flatpickr-weekday",n.l10n.weekAbbreviation));var z=$e("div","flatpickr-weeks");return P.appendChild(z),{weekWrapper:P,weekNumbers:z}}function D(P,z){z===void 0&&(z=!0);var q=z?P:P-n.currentMonth;q<0&&n._hidePrevMonthArrow===!0||q>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=q,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,Ne("onYearChange"),N()),T(),Ne("onMonthChange"),pr())}function L(P,z){if(P===void 0&&(P=!0),z===void 0&&(z=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,z===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var q=iu(n.config),ee=q.hours,ae=q.minutes,ue=q.seconds;g(ee,ae,ue)}n.redraw(),P&&Ne("onChange")}function U(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),Ne("onClose")}function G(){n.config!==void 0&&Ne("onDestroy");for(var P=n._handlers.length;P--;)n._handlers[P].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var z=n.calendarContainer.parentNode;if(z.lastChild&&z.removeChild(z.lastChild),z.parentNode){for(;z.firstChild;)z.parentNode.insertBefore(z.firstChild,z);z.parentNode.removeChild(z)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(q){try{delete n[q]}catch(ee){}})}function oe(P){return n.calendarContainer.contains(P)}function ce(P){if(n.isOpen&&!n.config.inline){var z=Xt(P),q=oe(z),ee=z===n.input||z===n.altInput||n.element.contains(z)||P.path&&P.path.indexOf&&(~P.path.indexOf(n.input)||~P.path.indexOf(n.altInput)),ae=!ee&&!q&&!oe(P.relatedTarget),ue=!n.config.ignoredFocusElements.some(function(Ce){return Ce.contains(z)});ae&&ue&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&c(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function se(P){if(!(!P||n.config.minDate&&P<n.config.minDate.getFullYear()||n.config.maxDate&&P>n.config.maxDate.getFullYear())){var z=P,q=n.currentYear!==z;n.currentYear=z||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),q&&(n.redraw(),Ne("onYearChange"),N())}}function Z(P,z){var q;z===void 0&&(z=!0);var ee=n.parseDate(P,void 0,z);if(n.config.minDate&&ee&&Zt(ee,n.config.minDate,z!==void 0?z:!n.minDateHasTime)<0||n.config.maxDate&&ee&&Zt(ee,n.config.maxDate,z!==void 0?z:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(ee===void 0)return!1;for(var ae=!!n.config.enable,ue=(q=n.config.enable)!==null&&q!==void 0?q:n.config.disable,Ce=0,fe=void 0;Ce<ue.length;Ce++){if(fe=ue[Ce],typeof fe=="function"&&fe(ee))return ae;if(fe instanceof Date&&ee!==void 0&&fe.getTime()===ee.getTime())return ae;if(typeof fe=="string"){var Se=n.parseDate(fe,void 0,!0);return Se&&Se.getTime()===ee.getTime()?ae:!ae}else if(typeof fe=="object"&&ee!==void 0&&fe.from&&fe.to&&ee.getTime()>=fe.from.getTime()&&ee.getTime()<=fe.to.getTime())return ae}return!ae}function te(P){return n.daysContainer!==void 0?P.className.indexOf("hidden")===-1&&P.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(P):!1}function ne(P){var z=P.target===n._input,q=n._input.value.trimEnd()!==gr();z&&q&&!(P.relatedTarget&&oe(P.relatedTarget))&&n.setDate(n._input.value,!0,P.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function de(P){var z=Xt(P),q=n.config.wrap?e.contains(z):z===n._input,ee=n.config.allowInput,ae=n.isOpen&&(!ee||!q),ue=n.config.inline&&q&&!ee;if(P.keyCode===13&&q){if(ee)return n.setDate(n._input.value,!0,z===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),z.blur();n.open()}else if(oe(z)||ae||ue){var Ce=!!n.timeContainer&&n.timeContainer.contains(z);switch(P.keyCode){case 13:Ce?(P.preventDefault(),c(),Pe()):St(P);break;case 27:P.preventDefault(),Pe();break;case 8:case 46:q&&!n.config.allowInput&&(P.preventDefault(),n.clear());break;case 37:case 39:if(!Ce&&!q){P.preventDefault();var fe=o();if(n.daysContainer!==void 0&&(ee===!1||fe&&te(fe))){var Se=P.keyCode===39?1:-1;P.ctrlKey?(P.stopPropagation(),D(Se),W(k(1),0)):W(void 0,Se)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:P.preventDefault();var pe=P.keyCode===40?1:-1;n.daysContainer&&z.$i!==void 0||z===n.input||z===n.altInput?P.ctrlKey?(P.stopPropagation(),se(n.currentYear-pe),W(k(1),0)):Ce||W(void 0,pe*7):z===n.currentYearElement?se(n.currentYear-pe):n.config.enableTime&&(!Ce&&n.hourElement&&n.hourElement.focus(),c(P),n._debouncedChange());break;case 9:if(Ce){var ie=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(lt){return lt}),Ae=ie.indexOf(z);if(Ae!==-1){var Lt=ie[Ae+(P.shiftKey?-1:1)];P.preventDefault(),(Lt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(z)&&P.shiftKey&&(P.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&z===n.amPM)switch(P.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],d(),Wt();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],d(),Wt();break}(q||oe(z))&&Ne("onKeyDown",P)}function ve(P,z){if(z===void 0&&(z="flatpickr-day"),!(n.selectedDates.length!==1||P&&(!P.classList.contains(z)||P.classList.contains("flatpickr-disabled")))){for(var q=P?P.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),ee=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),ae=Math.min(q,n.selectedDates[0].getTime()),ue=Math.max(q,n.selectedDates[0].getTime()),Ce=!1,fe=0,Se=0,pe=ae;pe<ue;pe+=JP.DAY)Z(new Date(pe),!0)||(Ce=Ce||pe>ae&&pe<ue,pe<ee&&(!fe||pe>fe)?fe=pe:pe>ee&&(!Se||pe<Se)&&(Se=pe));var ie=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+z));ie.forEach(function(Ae){var Lt=Ae.dateObj,lt=Lt.getTime(),vn=fe>0&<<fe||Se>0&<>Se;if(vn){Ae.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(_n){Ae.classList.remove(_n)});return}else if(Ce&&!vn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(_n){Ae.classList.remove(_n)}),P!==void 0&&(P.classList.add(q<=n.selectedDates[0].getTime()?"startRange":"endRange"),ee<q&<===ee?Ae.classList.add("startRange"):ee>q&<===ee&&Ae.classList.add("endRange"),lt>=fe&&(Se===0||lt<=Se)&&qP(lt,ee,q)&&Ae.classList.add("inRange"))})}}function Fe(){n.isOpen&&!n.config.static&&!n.config.inline&&xe()}function st(P,z){if(z===void 0&&(z=n._positionElement),n.isMobile===!0){if(P){P.preventDefault();var q=Xt(P);q&&q.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),Ne("onOpen");return}else if(n._input.disabled||n.config.inline)return;var ee=n.isOpen;n.isOpen=!0,ee||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),Ne("onOpen"),xe(z)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(P===void 0||!n.timeContainer.contains(P.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function Je(P){return function(z){var q=n.config["_"+P+"Date"]=n.parseDate(z,n.config.dateFormat),ee=n.config["_"+(P==="min"?"max":"min")+"Date"];q!==void 0&&(n[P==="min"?"minDateHasTime":"maxDateHasTime"]=q.getHours()>0||q.getMinutes()>0||q.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(ae){return Z(ae)}),!n.selectedDates.length&&P==="min"&&p(q),Wt()),n.daysContainer&&(Oe(),q!==void 0?n.currentYearElement[P]=q.getFullYear().toString():n.currentYearElement.removeAttribute(P),n.currentYearElement.disabled=!!ee&&q!==void 0&&ee.getFullYear()===q.getFullYear())}}function vt(){var P=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],z=Rt(Rt({},JSON.parse(JSON.stringify(e.dataset||{}))),t),q={};n.config.parseDate=z.parseDate,n.config.formatDate=z.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(ie){n.config._enable=kn(ie)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(ie){n.config._disable=kn(ie)}});var ee=z.mode==="time";if(!z.dateFormat&&(z.enableTime||ee)){var ae=mt.defaultConfig.dateFormat||hi.dateFormat;q.dateFormat=z.noCalendar||ee?"H:i"+(z.enableSeconds?":S":""):ae+" H:i"+(z.enableSeconds?":S":"")}if(z.altInput&&(z.enableTime||ee)&&!z.altFormat){var ue=mt.defaultConfig.altFormat||hi.altFormat;q.altFormat=z.noCalendar||ee?"h:i"+(z.enableSeconds?":S K":" K"):ue+(" h:i"+(z.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:Je("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:Je("max")});var Ce=function(ie){return function(Ae){n.config[ie==="min"?"_minTime":"_maxTime"]=n.parseDate(Ae,"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")}),z.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,q,z);for(var fe=0;fe<P.length;fe++)n.config[P[fe]]=n.config[P[fe]]===!0||n.config[P[fe]]==="true";Zc.filter(function(ie){return n.config[ie]!==void 0}).forEach(function(ie){n.config[ie]=eu(n.config[ie]||[]).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 fe=0;fe<n.config.plugins.length;fe++){var Se=n.config.plugins[fe](n)||{};for(var pe in Se)Zc.indexOf(pe)>-1?n.config[pe]=eu(Se[pe]).map(a).concat(n.config[pe]):typeof z[pe]=="undefined"&&(n.config[pe]=Se[pe])}z.altInputClass||(n.config.altInputClass=he().className+" "+n.config.altInputClass),Ne("onParseConfig")}function he(){return n.config.wrap?e.querySelector("[data-input]"):e}function ge(){typeof n.config.locale!="object"&&typeof mt.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Rt(Rt({},mt.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?mt.l10ns[n.config.locale]:void 0),Dr.D="("+n.l10n.weekdays.shorthand.join("|")+")",Dr.l="("+n.l10n.weekdays.longhand.join("|")+")",Dr.M="("+n.l10n.months.shorthand.join("|")+")",Dr.F="("+n.l10n.months.longhand.join("|")+")",Dr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var P=Rt(Rt({},t),JSON.parse(JSON.stringify(e.dataset||{})));P.time_24hr===void 0&&mt.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=xg(n),n.parseDate=nu({config:n.config,l10n:n.l10n})}function xe(P){if(typeof n.config.position=="function")return void n.config.position(n,P);if(n.calendarContainer!==void 0){Ne("onPreCalendarPosition");var z=P||n._positionElement,q=Array.prototype.reduce.call(n.calendarContainer.children,function(pz,gz){return pz+gz.offsetHeight},0),ee=n.calendarContainer.offsetWidth,ae=n.config.position.split(" "),ue=ae[0],Ce=ae.length>1?ae[1]:null,fe=z.getBoundingClientRect(),Se=window.innerHeight-fe.bottom,pe=ue==="above"||ue!=="below"&&Se<q&&fe.top>q,ie=window.pageYOffset+fe.top+(pe?-q-2:z.offsetHeight+2);if($t(n.calendarContainer,"arrowTop",!pe),$t(n.calendarContainer,"arrowBottom",pe),!n.config.inline){var Ae=window.pageXOffset+fe.left,Lt=!1,lt=!1;Ce==="center"?(Ae-=(ee-fe.width)/2,Lt=!0):Ce==="right"&&(Ae-=ee-fe.width,lt=!0),$t(n.calendarContainer,"arrowLeft",!Lt&&!lt),$t(n.calendarContainer,"arrowCenter",Lt),$t(n.calendarContainer,"arrowRight",lt);var vn=window.document.body.offsetWidth-(window.pageXOffset+fe.right),_n=Ae+ee>window.document.body.offsetWidth,sz=vn+ee>window.document.body.offsetWidth;if($t(n.calendarContainer,"rightMost",_n),!n.config.static)if(n.calendarContainer.style.top=ie+"px",!_n)n.calendarContainer.style.left=Ae+"px",n.calendarContainer.style.right="auto";else if(!sz)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=vn+"px";else{var Vu=ke();if(Vu===void 0)return;var lz=window.document.body.offsetWidth,cz=Math.max(0,lz/2-ee/2),uz=".flatpickr-calendar.centerMost:before",dz=".flatpickr-calendar.centerMost:after",fz=Vu.cssRules.length,hz="{left:"+fe.left+"px;right:auto;}";$t(n.calendarContainer,"rightMost",!1),$t(n.calendarContainer,"centerMost",!0),Vu.insertRule(uz+","+dz+hz,fz),n.calendarContainer.style.left=cz+"px",n.calendarContainer.style.right="auto"}}}}function ke(){for(var P=null,z=0;z<document.styleSheets.length;z++){var q=document.styleSheets[z];if(q.cssRules){try{q.cssRules}catch(ee){continue}P=q;break}}return P!=null?P:Ye()}function Ye(){var P=document.createElement("style");return document.head.appendChild(P),P.sheet}function Oe(){n.config.noCalendar||n.isMobile||(N(),pr(),T())}function Pe(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function St(P){P.preventDefault(),P.stopPropagation();var z=function(ie){return ie.classList&&ie.classList.contains("flatpickr-day")&&!ie.classList.contains("flatpickr-disabled")&&!ie.classList.contains("notAllowed")},q=yg(Xt(P),z);if(q!==void 0){var ee=q,ae=n.latestSelectedDateObj=new Date(ee.dateObj.getTime()),ue=(ae.getMonth()<n.currentMonth||ae.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=ee,n.config.mode==="single")n.selectedDates=[ae];else if(n.config.mode==="multiple"){var Ce=Lr(ae);Ce?n.selectedDates.splice(parseInt(Ce),1):n.selectedDates.push(ae)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=ae,n.selectedDates.push(ae),Zt(ae,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(ie,Ae){return ie.getTime()-Ae.getTime()}));if(d(),ue){var fe=n.currentYear!==ae.getFullYear();n.currentYear=ae.getFullYear(),n.currentMonth=ae.getMonth(),fe&&(Ne("onYearChange"),N()),Ne("onMonthChange")}if(pr(),T(),Wt(),!ue&&n.config.mode!=="range"&&n.config.showMonths===1?E(ee):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var Se=n.config.mode==="single"&&!n.config.enableTime,pe=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(Se||pe)&&Pe()}b()}}var It={locale:[ge,Y],showMonths:[j,l,V],minDate:[w],maxDate:[w],positionElement:[Mr],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 Mt(P,z){if(P!==null&&typeof P=="object"){Object.assign(n.config,P);for(var q in P)It[q]!==void 0&&It[q].forEach(function(ee){return ee()})}else n.config[P]=z,It[P]!==void 0?It[P].forEach(function(ee){return ee()}):Zc.indexOf(P)>-1&&(n.config[P]=eu(z));n.redraw(),Wt(!0)}function _t(P,z){var q=[];if(P instanceof Array)q=P.map(function(ee){return n.parseDate(ee,z)});else if(P instanceof Date||typeof P=="number")q=[n.parseDate(P,z)];else if(typeof P=="string")switch(n.config.mode){case"single":case"time":q=[n.parseDate(P,z)];break;case"multiple":q=P.split(n.config.conjunction).map(function(ee){return n.parseDate(ee,z)});break;case"range":q=P.split(n.l10n.rangeSeparator).map(function(ee){return n.parseDate(ee,z)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(P)));n.selectedDates=n.config.allowInvalidPreload?q:q.filter(function(ee){return ee instanceof Date&&Z(ee,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(ee,ae){return ee.getTime()-ae.getTime()})}function Nt(P,z,q){if(z===void 0&&(z=!1),q===void 0&&(q=n.config.dateFormat),P!==0&&!P||P instanceof Array&&P.length===0)return n.clear(z);_t(P,q),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,z),p(),n.selectedDates.length===0&&n.clear(!1),Wt(z),z&&Ne("onChange")}function kn(P){return P.slice().map(function(z){return typeof z=="string"||typeof z=="number"||z instanceof Date?n.parseDate(z,void 0,!0):z&&typeof z=="object"&&z.from&&z.to?{from:n.parseDate(z.from,void 0),to:n.parseDate(z.to,void 0)}:z}).filter(function(z){return z})}function Ei(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var P=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);P&&_t(P,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function dn(){if(n.input=he(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=$e(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),Mr()}function Mr(){n._positionElement=n.config.positionElement||n._input}function $o(){var P=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=$e("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=P,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=P==="datetime-local"?"Y-m-d\\TH:i:S":P==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(z){}m(n.mobileInput,"change",function(z){n.setDate(Xt(z).value,!1,n.mobileFormatStr),Ne("onChange"),Ne("onClose")})}function Fo(P){if(n.isOpen===!0)return n.close();n.open(P)}function Ne(P,z){if(n.config!==void 0){var q=n.config[P];if(q!==void 0&&q.length>0)for(var ee=0;q[ee]&&ee<q.length;ee++)q[ee](n.selectedDates,n.input.value,n,z);P==="onChange"&&(n.input.dispatchEvent(hr("change")),n.input.dispatchEvent(hr("input")))}}function hr(P){var z=document.createEvent("Event");return z.initEvent(P,!0,!0),z}function Lr(P){for(var z=0;z<n.selectedDates.length;z++){var q=n.selectedDates[z];if(q instanceof Date&&Zt(q,P)===0)return""+z}return!1}function ki(P){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Zt(P,n.selectedDates[0])>=0&&Zt(P,n.selectedDates[1])<=0}function pr(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(P,z){var q=new Date(n.currentYear,n.currentMonth,1);q.setMonth(n.currentMonth+z),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[z].textContent=ps(q.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=q.getMonth().toString(),P.value=q.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function gr(P){var z=P||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(q){return n.formatDate(q,z)}).filter(function(q,ee,ae){return n.config.mode!=="range"||n.config.enableTime||ae.indexOf(q)===ee}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function Wt(P){P===void 0&&(P=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=gr(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=gr(n.config.altFormat)),P!==!1&&Ne("onValueUpdate")}function en(P){var z=Xt(P),q=n.prevMonthNav.contains(z),ee=n.nextMonthNav.contains(z);q||ee?D(q?-1:1):n.yearElements.indexOf(z)>=0?z.select():z.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):z.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function bt(P){P.preventDefault();var z=P.type==="keydown",q=Xt(P),ee=q;n.amPM!==void 0&&q===n.amPM&&(n.amPM.textContent=n.l10n.amPM[cn(n.amPM.textContent===n.l10n.amPM[0])]);var ae=parseFloat(ee.getAttribute("min")),ue=parseFloat(ee.getAttribute("max")),Ce=parseFloat(ee.getAttribute("step")),fe=parseInt(ee.value,10),Se=P.delta||(z?P.which===38?1:-1:0),pe=fe+Ce*Se;if(typeof ee.value!="undefined"&&ee.value.length===2){var ie=ee===n.hourElement,Ae=ee===n.minuteElement;pe<ae?(pe=ue+pe+cn(!ie)+(cn(ie)&&cn(!n.amPM)),Ae&&I(void 0,-1,n.hourElement)):pe>ue&&(pe=ee===n.hourElement?pe-ue-cn(!n.amPM):ae,Ae&&I(void 0,1,n.hourElement)),n.amPM&&ie&&(Ce===1?pe+fe===23:Math.abs(pe-fe)>Ce)&&(n.amPM.textContent=n.l10n.amPM[cn(n.amPM.textContent===n.l10n.amPM[0])]),ee.value=Ht(pe)}}return i(),n}function pi(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=ZP(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 pi(this,e)},HTMLElement.prototype.flatpickr=function(e){return pi([this],e)});var mt=function(e,t){return typeof e=="string"?pi(window.document.querySelectorAll(e),t):e instanceof Node?pi([e],t):pi(e,t)};mt.defaultConfig={},mt.l10ns={en:Rt({},bo),default:Rt({},bo)},mt.localize=function(e){mt.l10ns.default=Rt(Rt({},mt.l10ns.default),e)},mt.setDefaults=function(e){mt.defaultConfig=Rt(Rt({},mt.defaultConfig),e)},mt.parseDate=nu({}),mt.formatDate=xg({}),mt.compareDates=Zt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return pi(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=mt);const eD=Wu(Object.freeze(Object.defineProperty({__proto__:null,default:mt},Symbol.toStringTag,{value:"Module"})));(function(e){function t(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(U){return typeof U}:t=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},t(D)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(y),r=o(JS),i=o(eD);function o(D){return D&&D.__esModule?D:{default:D}}function a(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return a=function(){return D},D}function l(D){if(D&&D.__esModule)return D;if(D===null||t(D)!=="object"&&typeof D!="function")return{default:D};var L=a();if(L&&L.has(D))return L.get(D);var U={},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var oe in D)if(Object.prototype.hasOwnProperty.call(D,oe)){var ce=G?Object.getOwnPropertyDescriptor(D,oe):null;ce&&(ce.get||ce.set)?Object.defineProperty(U,oe,ce):U[oe]=D[oe]}return U.default=D,L&&L.set(D,U),U}function c(D){return p(D)||d(D)||f(D)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2458
2458
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(D,L){if(D){if(typeof D=="string")return g(D,L);var U=Object.prototype.toString.call(D).slice(8,-1);if(U==="Object"&&D.constructor&&(U=D.constructor.name),U==="Map"||U==="Set")return Array.from(D);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return g(D,L)}}function d(D){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(D))return Array.from(D)}function p(D){if(Array.isArray(D))return g(D)}function g(D,L){(L==null||L>D.length)&&(L=D.length);for(var U=0,G=new Array(L);U<L;U++)G[U]=D[U];return G}function v(){return v=Object.assign||function(D){for(var L=1;L<arguments.length;L++){var U=arguments[L];for(var G in U)Object.prototype.hasOwnProperty.call(U,G)&&(D[G]=U[G])}return D},v.apply(this,arguments)}function m(D,L){if(D==null)return{};var U=b(D,L),G,oe;if(Object.getOwnPropertySymbols){var ce=Object.getOwnPropertySymbols(D);for(oe=0;oe<ce.length;oe++)G=ce[oe],!(L.indexOf(G)>=0)&&Object.prototype.propertyIsEnumerable.call(D,G)&&(U[G]=D[G])}return U}function b(D,L){if(D==null)return{};var U={},G=Object.keys(D),oe,ce;for(ce=0;ce<G.length;ce++)oe=G[ce],!(L.indexOf(oe)>=0)&&(U[oe]=D[oe]);return U}function C(D,L){var U=Object.keys(D);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(D);L&&(G=G.filter(function(oe){return Object.getOwnPropertyDescriptor(D,oe).enumerable})),U.push.apply(U,G)}return U}function w(D){for(var L=1;L<arguments.length;L++){var U=arguments[L]!=null?arguments[L]:{};L%2?C(Object(U),!0).forEach(function(G){N(D,G,U[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(U)):C(Object(U)).forEach(function(G){Object.defineProperty(D,G,Object.getOwnPropertyDescriptor(U,G))})}return D}function x(D,L){if(!(D instanceof L))throw new TypeError("Cannot call a class as a function")}function I(D,L){for(var U=0;U<L.length;U++){var G=L[U];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(D,G.key,G)}}function S(D,L,U){return L&&I(D.prototype,L),D}function A(D,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(L&&L.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),L&&E(D,L)}function E(D,L){return E=Object.setPrototypeOf||function(G,oe){return G.__proto__=oe,G},E(D,L)}function k(D){var L=O();return function(){var G=T(D),oe;if(L){var ce=T(this).constructor;oe=Reflect.construct(G,arguments,ce)}else oe=G.apply(this,arguments);return F(this,oe)}}function F(D,L){return L&&(t(L)==="object"||typeof L=="function")?L:W(D)}function W(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function O(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(D){return!1}}function T(D){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},T(D)}function N(D,L,U){return L in D?Object.defineProperty(D,L,{value:U,enumerable:!0,configurable:!0,writable:!0}):D[L]=U,D}var H=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],j=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),$=["onCreate","onDestroy"],M=r.default.func,V=function(D){A(U,D);var L=k(U);function U(){var G;x(this,U);for(var oe=arguments.length,ce=new Array(oe),se=0;se<oe;se++)ce[se]=arguments[se];return G=L.call.apply(L,[this].concat(ce)),N(W(G),"createFlatpickrInstance",function(){var Z=w({onClose:function(){G.node.blur&&G.node.blur()}},G.props.options);Z=Y(Z,G.props),G.flatpickr=(0,i.default)(G.node,Z),G.props.hasOwnProperty("value")&&G.flatpickr.setDate(G.props.value,!1);var te=G.props.onCreate;te&&te(G.flatpickr)}),N(W(G),"destroyFlatpickrInstance",function(){var Z=G.props.onDestroy;Z&&Z(G.flatpickr),G.flatpickr.destroy(),G.flatpickr=null}),N(W(G),"handleNodeChange",function(Z){G.node=Z,G.flatpickr&&(G.destroyFlatpickrInstance(),G.createFlatpickrInstance())}),G}return S(U,[{key:"componentDidUpdate",value:function(oe){var ce=this.props.options,se=oe.options;ce=Y(ce,this.props),se=Y(se,oe);for(var Z=Object.getOwnPropertyNames(ce),te=Z.length-1;te>=0;te--){var ne=Z[te],de=ce[ne];de!==se[ne]&&(H.indexOf(ne)!==-1&&!Array.isArray(de)&&(de=[de]),this.flatpickr.set(ne,de))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&oe.value&&Array.isArray(oe.value)&&this.props.value.every(function(ve,Fe){oe[Fe]}))&&this.props.value!==oe.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 oe=this.props,ce=oe.options,se=oe.defaultValue,Z=oe.value,te=oe.children,ne=oe.render,de=m(oe,["options","defaultValue","value","children","render"]);return H.forEach(function(ve){delete de[ve]}),$.forEach(function(ve){delete de[ve]}),ne?ne(w(w({},de),{},{defaultValue:se,value:Z}),this.handleNodeChange):ce.wrap?n.default.createElement("div",v({},de,{ref:this.handleNodeChange}),te):n.default.createElement("input",v({},de,{defaultValue:se,ref:this.handleNodeChange}))}}]),U}(n.Component);N(V,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:j,onOpen:j,onClose:j,onMonthChange:j,onYearChange:j,onReady:j,onValueUpdate:j,onDayCreate:j,onCreate:M,onDestroy:M,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),N(V,"defaultProps",{options:{}});function Y(D,L){var U=w({},D);return H.forEach(function(G){if(L.hasOwnProperty(G)){var oe;U[G]&&!Array.isArray(U[G])?U[G]=[U[G]]:U[G]||(U[G]=[]);var ce=Array.isArray(L[G])?L[G]:[L[G]];(oe=U[G]).push.apply(oe,c(ce))}}),U}var X=V;e.default=X})(vg);const wg=bn(vg);var Sg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(zt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",l="minute",c="hour",u="day",f="week",d="month",p="quarter",g="year",v="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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(H){var j=["th","st","nd","rd"],$=H%100;return"["+H+(j[($-20)%10]||j[$]||j[0])+"]"}},x=function(H,j,$){var M=String(H);return!M||M.length>=j?H:""+Array(j+1-M.length).join($)+H},I={s:x,z:function(H){var j=-H.utcOffset(),$=Math.abs(j),M=Math.floor($/60),V=$%60;return(j<=0?"+":"-")+x(M,2,"0")+":"+x(V,2,"0")},m:function H(j,$){if(j.date()<$.date())return-H($,j);var M=12*($.year()-j.year())+($.month()-j.month()),V=j.clone().add(M,d),Y=$-V<0,X=j.clone().add(M+(Y?-1:1),d);return+(-(M+($-V)/(Y?V-X:X-V))||0)},a:function(H){return H<0?Math.ceil(H)||0:Math.floor(H)},p:function(H){return{M:d,y:g,w:f,d:u,D:v,h:c,m:l,s:a,ms:o,Q:p}[H]||String(H||"").toLowerCase().replace(/s$/,"")},u:function(H){return H===void 0}},S="en",A={};A[S]=w;var E="$isDayjsObject",k=function(H){return H instanceof T||!(!H||!H[E])},F=function H(j,$,M){var V;if(!j)return S;if(typeof j=="string"){var Y=j.toLowerCase();A[Y]&&(V=Y),$&&(A[Y]=$,V=Y);var X=j.split("-");if(!V&&X.length>1)return H(X[0])}else{var D=j.name;A[D]=j,V=D}return!M&&V&&(S=V),V||!M&&S},W=function(H,j){if(k(H))return H.clone();var $=typeof j=="object"?j:{};return $.date=H,$.args=arguments,new T($)},O=I;O.l=F,O.i=k,O.w=function(H,j){return W(H,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var T=function(){function H($){this.$L=F($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[E]=!0}var j=H.prototype;return j.parse=function($){this.$d=function(M){var V=M.date,Y=M.utc;if(V===null)return new Date(NaN);if(O.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var X=V.match(b);if(X){var D=X[2]-1||0,L=(X[7]||"0").substring(0,3);return Y?new Date(Date.UTC(X[1],D,X[3]||1,X[4]||0,X[5]||0,X[6]||0,L)):new Date(X[1],D,X[3]||1,X[4]||0,X[5]||0,X[6]||0,L)}}return new Date(V)}($),this.init()},j.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()},j.$utils=function(){return O},j.isValid=function(){return this.$d.toString()!==m},j.isSame=function($,M){var V=W($);return this.startOf(M)<=V&&V<=this.endOf(M)},j.isAfter=function($,M){return W($)<this.startOf(M)},j.isBefore=function($,M){return this.endOf(M)<W($)},j.$g=function($,M,V){return O.u($)?this[M]:this.set(V,$)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function($,M){var V=this,Y=!!O.u(M)||M,X=O.p($),D=function(te,ne){var de=O.w(V.$u?Date.UTC(V.$y,ne,te):new Date(V.$y,ne,te),V);return Y?de:de.endOf(u)},L=function(te,ne){return O.w(V.toDate()[te].apply(V.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(ne)),V)},U=this.$W,G=this.$M,oe=this.$D,ce="set"+(this.$u?"UTC":"");switch(X){case g:return Y?D(1,0):D(31,11);case d:return Y?D(1,G):D(0,G+1);case f:var se=this.$locale().weekStart||0,Z=(U<se?U+7:U)-se;return D(Y?oe-Z:oe+(6-Z),G);case u:case v:return L(ce+"Hours",0);case c:return L(ce+"Minutes",1);case l:return L(ce+"Seconds",2);case a:return L(ce+"Milliseconds",3);default:return this.clone()}},j.endOf=function($){return this.startOf($,!1)},j.$set=function($,M){var V,Y=O.p($),X="set"+(this.$u?"UTC":""),D=(V={},V[u]=X+"Date",V[v]=X+"Date",V[d]=X+"Month",V[g]=X+"FullYear",V[c]=X+"Hours",V[l]=X+"Minutes",V[a]=X+"Seconds",V[o]=X+"Milliseconds",V)[Y],L=Y===u?this.$D+(M-this.$W):M;if(Y===d||Y===g){var U=this.clone().set(v,1);U.$d[D](L),U.init(),this.$d=U.set(v,Math.min(this.$D,U.daysInMonth())).$d}else D&&this.$d[D](L);return this.init(),this},j.set=function($,M){return this.clone().$set($,M)},j.get=function($){return this[O.p($)]()},j.add=function($,M){var V,Y=this;$=Number($);var X=O.p(M),D=function(G){var oe=W(Y);return O.w(oe.date(oe.date()+Math.round(G*$)),Y)};if(X===d)return this.set(d,this.$M+$);if(X===g)return this.set(g,this.$y+$);if(X===u)return D(1);if(X===f)return D(7);var L=(V={},V[l]=r,V[c]=i,V[a]=n,V)[X]||1,U=this.$d.getTime()+$*L;return O.w(U,this)},j.subtract=function($,M){return this.add(-1*$,M)},j.format=function($){var M=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var Y=$||"YYYY-MM-DDTHH:mm:ssZ",X=O.z(this),D=this.$H,L=this.$m,U=this.$M,G=V.weekdays,oe=V.months,ce=V.meridiem,se=function(ne,de,ve,Fe){return ne&&(ne[de]||ne(M,Y))||ve[de].slice(0,Fe)},Z=function(ne){return O.s(D%12||12,ne,"0")},te=ce||function(ne,de,ve){var Fe=ne<12?"AM":"PM";return ve?Fe.toLowerCase():Fe};return Y.replace(C,function(ne,de){return de||function(ve){switch(ve){case"YY":return String(M.$y).slice(-2);case"YYYY":return O.s(M.$y,4,"0");case"M":return U+1;case"MM":return O.s(U+1,2,"0");case"MMM":return se(V.monthsShort,U,oe,3);case"MMMM":return se(oe,U);case"D":return M.$D;case"DD":return O.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return se(V.weekdaysMin,M.$W,G,2);case"ddd":return se(V.weekdaysShort,M.$W,G,3);case"dddd":return G[M.$W];case"H":return String(D);case"HH":return O.s(D,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return te(D,L,!0);case"A":return te(D,L,!1);case"m":return String(L);case"mm":return O.s(L,2,"0");case"s":return String(M.$s);case"ss":return O.s(M.$s,2,"0");case"SSS":return O.s(M.$ms,3,"0");case"Z":return X}return null}(ne)||X.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function($,M,V){var Y,X=this,D=O.p(M),L=W($),U=(L.utcOffset()-this.utcOffset())*r,G=this-L,oe=function(){return O.m(X,L)};switch(D){case g:Y=oe()/12;break;case d:Y=oe();break;case p:Y=oe()/3;break;case f:Y=(G-U)/6048e5;break;case u:Y=(G-U)/864e5;break;case c:Y=G/i;break;case l:Y=G/r;break;case a:Y=G/n;break;default:Y=G}return V?Y:O.a(Y)},j.daysInMonth=function(){return this.endOf(d).$D},j.$locale=function(){return A[this.$L]},j.locale=function($,M){if(!$)return this.$L;var V=this.clone(),Y=F($,M,!0);return Y&&(V.$L=Y),V},j.clone=function(){return O.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},H}(),N=T.prototype;return W.prototype=N,[["$ms",o],["$s",a],["$m",l],["$H",c],["$W",u],["$M",d],["$y",g],["$D",v]].forEach(function(H){N[H[1]]=function(j){return this.$g(j,H[0],H[1])}}),W.extend=function(H,j){return H.$i||(H(j,T,W),H.$i=!0),W},W.locale=F,W.isDayjs=k,W.unix=function(H){return W(1e3*H)},W.en=A[S],W.Ls=A,W.p={},W})})(Sg);var tD=Sg.exports;const ft=bn(tD);var Ig={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(zt,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,a){var l,c=function(p,g,v){v===void 0&&(v={});var m=new Date(p),b=function(C,w){w===void 0&&(w={});var x=w.timeZoneName||"short",I=C+"|"+x,S=r[I];return S||(S=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:C,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),r[I]=S),S}(g,v);return b.formatToParts(m)},u=function(p,g){for(var v=c(p,g),m=[],b=0;b<v.length;b+=1){var C=v[b],w=C.type,x=C.value,I=n[w];I>=0&&(m[I]=parseInt(x,10))}var S=m[3],A=S===24?0:S,E=m[0]+"-"+m[1]+"-"+m[2]+" "+A+":"+m[4]+":"+m[5]+":000",k=+p;return(a.utc(E).valueOf()-(k-=k%1e3))/6e4},f=o.prototype;f.tz=function(p,g){p===void 0&&(p=l);var v,m=this.utcOffset(),b=this.toDate(),C=b.toLocaleString("en-US",{timeZone:p}),w=Math.round((b-new Date(C))/1e3/60),x=15*-Math.round(b.getTimezoneOffset()/15)-w;if(!Number(x))v=this.utcOffset(0,g);else if(v=a(C,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),g){var I=v.utcOffset();v=v.add(m-I,"minute")}return v.$x.$timezone=p,v},f.offsetName=function(p){var g=this.$x.$timezone||a.tz.guess(),v=c(this.valueOf(),g,{timeZoneName:p}).find(function(m){return m.type.toLowerCase()==="timezonename"});return v&&v.value};var d=f.startOf;f.startOf=function(p,g){if(!this.$x||!this.$x.$timezone)return d.call(this,p,g);var v=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(v,p,g).tz(this.$x.$timezone,!0)},a.tz=function(p,g,v){var m=v&&g,b=v||g||l,C=u(+a(),b);if(typeof p!="string")return a(p).tz(b);var w=function(A,E,k){var F=A-60*E*1e3,W=u(F,k);if(E===W)return[F,E];var O=u(F-=60*(W-E)*1e3,k);return W===O?[F,W]:[A-60*Math.min(W,O)*1e3,Math.max(W,O)]}(a.utc(p,m).valueOf(),C,b),x=w[0],I=w[1],S=a(x).utcOffset(I);return S.$x.$timezone=b,S},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(p){l=p}}})})(Ig);var nD=Ig.exports;const rD=bn(nD);var Ag={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(zt,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,l){var c=a.prototype;l.utc=function(m){var b={date:m,utc:!0,args:arguments};return new a(b)},c.utc=function(m){var b=l(this.toDate(),{locale:this.$L,utc:!0});return m?b.add(this.utcOffset(),n):b},c.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var u=c.parse;c.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var f=c.init;c.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else f.call(this)};var d=c.utcOffset;c.utcOffset=function(m,b){var C=this.$utils().u;if(C(m))return this.$u?0:C(this.$offset)?d.call(this):this.$offset;if(typeof m=="string"&&(m=function(S){S===void 0&&(S="");var A=S.match(r);if(!A)return null;var E=(""+A[0]).match(i)||["-",0,0],k=E[0],F=60*+E[1]+ +E[2];return F===0?0:k==="+"?F:-F}(m),m===null))return this;var w=Math.abs(m)<=16?60*m:m,x=this;if(b)return x.$offset=w,x.$u=m===0,x;if(m!==0){var I=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(w+I,n)).$offset=w,x.$x.$localOffset=I}else x=this.utc();return x};var p=c.format;c.format=function(m){var b=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,b)},c.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var g=c.toDate;c.toDate=function(m){return m==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var v=c.diff;c.diff=function(m,b,C){if(m&&this.$u===m.$u)return v.call(this,m,b,C);var w=this.local(),x=l(m).local();return v.call(w,x,b,C)}}})})(Ag);var iD=Ag.exports;const oD=bn(iD);ft.extend(rD),ft.extend(oD);const aD=e=>{if(!ft(e).isAfter(ft(Date.now()).subtract(15,"minute")))return ft(Date.now()).add(15,"minute").toDate()},ou=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const l=ft.utc(a[0]).toISOString();i(l)}else i("")};return s.jsx(h.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:s.jsx(wg,{value:e&&ft(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||aD(e),maxDate:n,parseDate:(a,l)=>ft(a,l).toDate(),formatDate:(a,l)=>ft(a).format(l),time_24hr:!0,minuteIncrement:1}})})},sD=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return s.jsxs(h.Box,{sx:{marginBottom:"16px"},children:[s.jsx(h.FormControl,{children:s.jsx(h.FormLabel,{required:e,color:"primary",children:"Duration"})}),s.jsxs(h.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[s.jsx(vo,{label:"From date",defaultValue:i,required:e,onChange:n}),s.jsx(vo,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},Tg=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(ft(t).toDate()),n&&r.push(ft(n).toDate()),r},lD=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=y.useState(Tg(t)),[a,l]=y.useState(!1),c=()=>l(!a),u=f=>{if(f&&f.length>0){const d="YYYY-MM-DD",p=ft(f[0]).format(d),g=ft(f[1]).format(d);r({from:p,to:g})}else f&&f.length===0&&(r({from:"",to:""}),c());o(f)};return s.jsxs(h.FormControl,{sx:{marginBottom:"16px"},children:[s.jsx(h.FormLabel,{required:n,color:"primary",children:e}),s.jsx(h.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:s.jsx(wg,{value:i,onChange:u,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(f,d)=>ft(f,d).toDate(),formatDate:(f,d)=>ft(f).format(d),defaultDate:Tg(t)||void 0}})}),s.jsx(Ge,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:c})]})},cD=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{no(e).signOut().then(()=>n(null)).catch(l=>{console.error("There was a problem logging out the user:",l)})};return s.jsx(h.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:s.jsx(h.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:s.jsxs(h.CardContent,{children:[s.jsx(h.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),s.jsx(h.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),s.jsx(h.Box,{display:"flex",justifyContent:"center",children:s.jsx(h.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},Eg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],au=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),uD=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=y.useState(Eg(n)),[a,l]=y.useState(null),[c,u]=y.useState(""),[f,d]=y.useState(""),[p,g]=y.useState(""),[v,m]=y.useState("");y.useEffect(()=>o(Eg(n)),[n]);const b=()=>{const I=[...i];I.push({key:c,value:p}),o(I),u(""),g(""),r(au(I))},C=I=>{const S=i.filter((A,E)=>E!==I);o(S),r(au(S))},w=(I,S)=>{d(S.key),m(S.value),l(I)},x=I=>{const S=[...i];S[I]={key:f,value:v},o(S),l(null),d(""),m(""),r(au(S))};return s.jsxs(h.Box,{children:[i.map((I,S)=>s.jsx(h.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:s.jsx(h.CardContent,{style:{flex:1},children:a===S?s.jsxs(h.Box,{display:"flex",alignItems:"center",children:[s.jsx(h.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:f,onChange:A=>d(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),s.jsx(h.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:v,onChange:A=>m(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),s.jsx(h.Tooltip,{title:e.save,children:f&&v?s.jsx(h.IconButton,{onClick:()=>x(S),children:s.jsx(_e.Check,{})}):s.jsx("span",{children:s.jsx(h.IconButton,{disabled:!0,children:s.jsx(_e.Check,{})})})})]}):s.jsxs(h.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[s.jsxs(h.Box,{children:[s.jsxs(h.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",s.jsx(h.Typography,{whiteSpace:"wrap",children:I.key})]}),s.jsxs(h.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",s.jsx(h.Typography,{whiteSpace:"wrap",children:I.value})]})]}),s.jsxs(h.Box,{children:[s.jsx(h.Tooltip,{title:e.edit,children:s.jsx(h.IconButton,{onClick:()=>w(S,I),children:s.jsx(_e.Edit,{})})}),s.jsx(h.Tooltip,{title:e.delete,children:s.jsx(h.IconButton,{onClick:()=>C(S),children:s.jsx(_e.Delete,{})})})]})]})})},`dynamic-fields-${t}-${S}`)),s.jsxs(h.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[s.jsx(h.Input,{size:"md",variant:"outlined",color:"neutral",value:c,placeholder:e.keyDynamicFields,onChange:I=>u(I.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),s.jsx(h.Input,{size:"md",variant:"outlined",color:"neutral",value:p,onChange:I=>g(I.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),s.jsx(h.Tooltip,{title:e.add,children:c&&p?s.jsx(h.Button,{onClick:b,children:s.jsx(_e.Add,{})}):s.jsx("span",{children:s.jsx(h.Button,{disabled:!0,children:s.jsx(_e.Add,{})})})})]})]})};function xo(e,t,n){return(t=fc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kg(Object(n),!0).forEach(function(r){xo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _g(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,fc(r.key),r)}}function fD(e,t,n){return t&&_g(e.prototype,t),n&&_g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function su(e,t){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},su(e,t)}function hD(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&&su(e,t)}function gs(e){return gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gs(e)}function Pg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Pg=function(){return!!e})()}function pD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gD(e,t){if(t&&(Er(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pD(e)}function mD(e){var t=Pg();return function(){var n,r=gs(e);if(t){var i=gs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gD(this,n)}}function lu(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 vD(e){if(Array.isArray(e))return lu(e)}function bD(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dg(e,t){if(e){if(typeof e=="string")return lu(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)?lu(e,t):void 0}}function yD(){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 gi(e){return vD(e)||bD(e)||Dg(e)||yD()}function xD(e){if(Array.isArray(e))return e}function CD(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,l=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function wD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2460
2460
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yn(e,t){return xD(e)||CD(e,t)||Dg(e,t)||wD()}function Tn(e,t){if(e==null)return{};var n,r,i=De(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 SD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var cu=y.useLayoutEffect,ID=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ms=function(){};function AD(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function TD(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(AD(e,a)));return o.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var vs=function(t){return LD(t)?t.filter(Boolean):Er(t)==="object"&&t!==null?[t]:[]},Og=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=Tn(t,ID);return be({},n)},at=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 bs(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ED(e){return bs(e)?window.innerHeight:e.clientHeight}function Rg(e){return bs(e)?window.pageYOffset:e.scrollTop}function ys(e,t){if(bs(e)){window.scrollTo(0,t);return}e.scrollTop=t}function kD(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 _D(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function xs(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ms,i=Rg(e),o=t-i,a=10,l=0;function c(){l+=a;var u=_D(l,i,o,n);ys(e,u),l<n?window.requestAnimationFrame(c):r(e)}c()}function Mg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?ys(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&ys(e,Math.max(t.offsetTop-i,0))}function PD(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 Lg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function DD(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var Bg=!1,OD={get passive(){return Bg=!0}},Cs=typeof window!="undefined"?window:{};Cs.addEventListener&&Cs.removeEventListener&&(Cs.addEventListener("p",ms,OD),Cs.removeEventListener("p",ms,!1));var RD=Bg;function MD(e){return e!=null}function LD(e){return Array.isArray(e)}function Co(e,t,n){return e?t:n}function _z(e){return e}function Pz(e){return e}var BD=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=Yn(a,1),c=l[0];return!r.includes(c)});return o.reduce(function(a,l){var c=Yn(l,2),u=c[0],f=c[1];return a[u]=f,a},{})},$D=["children","innerProps"],FD=["children","innerProps"];function ND(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,c=kD(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var f=c.getBoundingClientRect(),d=f.height,p=n.getBoundingClientRect(),g=p.bottom,v=p.height,m=p.top,b=n.offsetParent.getBoundingClientRect(),C=b.top,w=a?window.innerHeight:ED(c),x=Rg(c),I=parseInt(getComputedStyle(n).marginBottom,10),S=parseInt(getComputedStyle(n).marginTop,10),A=C-S,E=w-m,k=A+x,F=d-x-m,W=g-w+x+I,O=x+m-S,T=160;switch(i){case"auto":case"bottom":if(E>=v)return{placement:"bottom",maxHeight:t};if(F>=v&&!a)return o&&xs(c,W,T),{placement:"bottom",maxHeight:t};if(!a&&F>=r||a&&E>=r){o&&xs(c,W,T);var N=a?E-I:F-I;return{placement:"bottom",maxHeight:N}}if(i==="auto"||a){var H=t,j=a?A:k;return j>=r&&(H=Math.min(j-I-l,t)),{placement:"top",maxHeight:H}}if(i==="bottom")return o&&ys(c,W),{placement:"bottom",maxHeight:t};break;case"top":if(A>=v)return{placement:"top",maxHeight:t};if(k>=v&&!a)return o&&xs(c,O,T),{placement:"top",maxHeight:t};if(!a&&k>=r||a&&A>=r){var $=t;return(!a&&k>=r||a&&A>=r)&&($=a?A-S:k-S),o&&xs(c,O,T),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function zD(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var $g=function(t){return t==="auto"?"bottom":t},jD=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,l=o.spacing,c=o.colors;return be((r={label:"menu"},xo(r,zD(i),"100%"),xo(r,"position","absolute"),xo(r,"width","100%"),xo(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},Fg=y.createContext(null),UD=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,c=t.theme,u=y.useContext(Fg)||{},f=u.setPortalPlacement,d=y.useRef(null),p=y.useState(i),g=Yn(p,2),v=g[0],m=g[1],b=y.useState(null),C=Yn(b,2),w=C[0],x=C[1],I=c.spacing.controlHeight;return cu(function(){var S=d.current;if(S){var A=a==="fixed",E=l&&!A,k=ND({maxHeight:i,menuEl:S,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:A,controlHeight:I});m(k.maxHeight),x(k.placement),f==null||f(k.placement)}},[i,o,a,l,r,f,I]),n({ref:d,placerProps:be(be({},t),{},{placement:w||$g(o),maxHeight:v})})},VD=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return me.jsx("div",R({},at(t,"menu",{menu:!0}),{ref:r},i),n)},HD=VD,WD=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return be({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},GD=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return me.jsx("div",R({},at(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Ng=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return be({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},YD=Ng,KD=Ng,qD=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Tn(t,$D);return me.jsx("div",R({},at(be(be({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},QD=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Tn(t,FD);return me.jsx("div",R({},at(be(be({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},JD=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}},XD=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,l=t.menuPosition,c=y.useRef(null),u=y.useRef(null),f=y.useState($g(a)),d=Yn(f,2),p=d[0],g=d[1],v=y.useMemo(function(){return{setPortalPlacement:g}},[]),m=y.useState(null),b=Yn(m,2),C=b[0],w=b[1],x=y.useCallback(function(){if(i){var E=PD(i),k=l==="fixed"?0:window.pageYOffset,F=E[p]+k;(F!==(C==null?void 0:C.offset)||E.left!==(C==null?void 0:C.rect.left)||E.width!==(C==null?void 0:C.rect.width))&&w({offset:F,rect:E})}},[i,l,p,C==null?void 0:C.offset,C==null?void 0:C.rect.left,C==null?void 0:C.rect.width]);cu(function(){x()},[x]);var I=y.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&c.current&&(u.current=rA(i,c.current,x,{elementResize:"ResizeObserver"in window}))},[i,x]);cu(function(){I()},[I]);var S=y.useCallback(function(E){c.current=E,I()},[I]);if(!n&&l!=="fixed"||!C)return null;var A=me.jsx("div",R({ref:S},at(be(be({},t),{},{offset:C.offset,position:l,rect:C.rect}),"menuPortal",{"menu-portal":!0}),o),r);return me.jsx(Fg.Provider,{value:v},n?yt.createPortal(A,n):A)},ZD=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},eO=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return me.jsx("div",R({},at(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},tO=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return be({alignItems:"center",display:i&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},nO=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return me.jsx("div",R({},at(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},rO=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},iO=function(t){var n=t.children,r=t.innerProps;return me.jsx("div",R({},at(t,"indicatorsContainer",{indicators:!0}),r),n)},zg,oO=["size"],aO=["innerProps","isRtl","size"],sO={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},jg=function(t){var n=t.size,r=Tn(t,oO);return me.jsx("svg",R({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:sO},r))},uu=function(t){return me.jsx(jg,R({size:20},t),me.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"}))},Ug=function(t){return me.jsx(jg,R({size:20},t),me.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"}))},Vg=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return be({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},lO=Vg,cO=function(t){var n=t.children,r=t.innerProps;return me.jsx("div",R({},at(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||me.jsx(Ug,null))},uO=Vg,dO=function(t){var n=t.children,r=t.innerProps;return me.jsx("div",R({},at(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||me.jsx(uu,null))},fO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return be({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},hO=function(t){var n=t.innerProps;return me.jsx("span",R({},n,at(t,"indicatorSeparator",{"indicator-separator":!0})))},pO=me.keyframes(zg||(zg=SD([`
|
|
@@ -2472,7 +2472,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
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
|
-
`},F$={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 N$(e){let{announcements:t=F$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=$$}=e;const{announce:o,announcement:a}=M$(),l=Po("DndLiveRegion"),[c,u]=y.useState(!1);if(y.useEffect(()=>{u(!0)},[]),L$(y.useMemo(()=>({onDragStart(d){let{active:p}=d;o(t.onDragStart({active:p}))},onDragMove(d){let{active:p,over:g}=d;t.onDragMove&&o(t.onDragMove({active:p,over:g}))},onDragOver(d){let{active:p,over:g}=d;o(t.onDragOver({active:p,over:g}))},onDragEnd(d){let{active:p,over:g}=d;o(t.onDragEnd({active:p,over:g}))},onDragCancel(d){let{active:p,over:g}=d;o(t.onDragCancel({active:p,over:g}))}}),[o,t])),!c)return null;const f=y.createElement(y.Fragment,null,y.createElement(O$,{id:r,value:i.draggable}),y.createElement(R$,{id:l,announcement:a}));return n?yt.createPortal(f,n):f}var wt;(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"})(wt||(wt={}));function Rs(){}function Ms(e,t){return y.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function kv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const mn=Object.freeze({x:0,y:0});function z$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function j$(e,t){const n=Os(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 U$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function V$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function _v(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 Pv(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=_v(t),o=[];for(const a of r){const{id:l}=a,c=n.get(l);if(c){const u=_v(c),f=i.reduce((p,g,v)=>p+z$(u[v],g),0),d=Number((f/4).toFixed(4));o.push({id:l,data:{droppableContainer:a,value:d}})}}return o.sort(U$)};function W$(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 c=t.width*t.height,u=e.width*e.height,f=a*l,d=f/(c+u-f);return Number(d.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 c=W$(l,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(V$)};function Y$(e,t,n){return Q(B({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function Dv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:mn}function K$(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)=>Q(B({},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}),B({},n))}}const q$=K$(1);function Ov(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 Q$(e,t,n){const r=Ov(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:l}=r,c=e.left-a-(1-i)*parseFloat(n),u=e.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const J$={ignoreTransform:!1};function Ai(e,t){t===void 0&&(t=J$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=Ft(e).getComputedStyle(e);u&&(n=Q$(n,u,f))}const{top:r,left:i,width:o,height:a,bottom:l,right:c}=n;return{top:r,left:i,width:o,height:a,bottom:l,right:c}}function Rv(e){return Ai(e,{ignoreTransform:!0})}function X$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Z$(e,t){return t===void 0&&(t=Ft(e).getComputedStyle(e)),t.position==="fixed"}function eF(e,t){t===void 0&&(t=Ft(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 Ls(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Ou(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Eo(i)||Iv(i)||n.includes(i))return n;const o=Ft(e).getComputedStyle(i);return i!==e&&eF(i,o)&&n.push(i),Z$(i,o)?n:r(i.parentNode)}return e?r(e):n}function Mv(e){const[t]=Ls(e,1);return t!=null?t:null}function Mu(e){return!Es||!e?null:wi(e)?e:Du(e)?Ou(e)||e===Si(e).scrollingElement?window:Eo(e)?e:null:null}function Lv(e){return wi(e)?e.scrollX:e.scrollLeft}function Bv(e){return wi(e)?e.scrollY:e.scrollTop}function Lu(e){return{x:Lv(e),y:Bv(e)}}var kt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(kt||(kt={}));function $v(e){return!Es||!e?!1:e===document.scrollingElement}function Fv(e){const t={x:0,y:0},n=$v(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 tF={x:.2,y:.2};function nF(e,t,n,r,i){let{top:o,left:a,right:l,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=tF);const{isTop:u,isBottom:f,isLeft:d,isRight:p}=Fv(e),g={x:0,y:0},v={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(g.y=kt.Backward,v.y=r*Math.abs((t.top+m.height-o)/m.height)):!f&&c>=t.bottom-m.height&&(g.y=kt.Forward,v.y=r*Math.abs((t.bottom-m.height-c)/m.height)),!p&&l>=t.right-m.width?(g.x=kt.Forward,v.x=r*Math.abs((t.right-m.width-l)/m.width)):!d&&a<=t.left+m.width&&(g.x=kt.Backward,v.x=r*Math.abs((t.left+m.width-a)/m.width)),{direction:g,speed:v}}function rF(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 Nv(e){return e.reduce((t,n)=>Ii(t,Lu(n)),mn)}function iF(e){return e.reduce((t,n)=>t+Lv(n),0)}function oF(e){return e.reduce((t,n)=>t+Bv(n),0)}function zv(e,t){if(t===void 0&&(t=Ai),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Mv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const aF=[["x",["left","right"],iF],["y",["top","bottom"],oF]];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=Ls(n),i=Nv(r);this.rect=B({},t),this.width=t.width,this.height=t.height;for(const[o,a,l]of aF)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=l(r),f=i[o]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Oo{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 sF(e){const{EventTarget:t}=Ft(e);return e instanceof t?e:Si(e)}function $u(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(_i(n,2)+_i(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 un;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(un||(un={}));function jv(e){e.preventDefault()}function lF(e){e.stopPropagation()}var Re;(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"})(Re||(Re={}));const Uv={start:[Re.Space,Re.Enter],cancel:[Re.Esc],end:[Re.Space,Re.Enter,Re.Tab]},cF=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Re.Right:return Q(B({},n),{x:n.x+25});case Re.Left:return Q(B({},n),{x:n.x-25});case Re.Down:return Q(B({},n),{y:n.y+25});case Re.Up:return Q(B({},n),{y:n.y-25})}};class Bs{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 Oo(Si(n)),this.windowListeners=new Oo(Ft(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(un.Resize,this.handleCancel),this.windowListeners.add(un.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(un.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&zv(r),n(mn)}handleKeyDown(t){if(Ds(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Uv,coordinateGetter:a=cF,scrollBehavior:l="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:mn;this.referenceCoordinates||(this.referenceCoordinates=f);const d=a(t,{active:n,context:r.current,currentCoordinates:f});if(d){const p=Do(d,f),g={x:0,y:0},{scrollableAncestors:v}=r.current;for(const m of v){const b=t.code,{isTop:C,isRight:w,isLeft:x,isBottom:I,maxScroll:S,minScroll:A}=Fv(m),E=rF(m),k={x:Math.min(b===Re.Right?E.right-E.width/2:E.right,Math.max(b===Re.Right?E.left:E.left+E.width/2,d.x)),y:Math.min(b===Re.Down?E.bottom-E.height/2:E.bottom,Math.max(b===Re.Down?E.top:E.top+E.height/2,d.y))},F=b===Re.Right&&!w||b===Re.Left&&!x,W=b===Re.Down&&!I||b===Re.Up&&!C;if(F&&k.x!==d.x){const O=m.scrollLeft+p.x,T=b===Re.Right&&O<=S.x||b===Re.Left&&O>=A.x;if(T&&!p.y){m.scrollTo({left:O,behavior:l});return}T?g.x=m.scrollLeft-O:g.x=b===Re.Right?m.scrollLeft-S.x:m.scrollLeft-A.x,g.x&&m.scrollBy({left:-g.x,behavior:l});break}else if(W&&k.y!==d.y){const O=m.scrollTop+p.y,T=b===Re.Down&&O<=S.y||b===Re.Up&&O>=A.y;if(T&&!p.x){m.scrollTo({top:O,behavior:l});return}T?g.y=m.scrollTop-O:g.y=b===Re.Down?m.scrollTop-S.y:m.scrollTop-A.y,g.y&&m.scrollBy({top:-g.y,behavior:l});break}}this.handleMove(t,Ii(Do(d,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Bs.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Uv,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 Vv(e){return!!(e&&"distance"in e)}function Hv(e){return!!(e&&"delay"in e)}class Fu{constructor(t,n,r){var i;r===void 0&&(r=sF(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=Si(a),this.documentListeners=new Oo(this.document),this.listeners=new Oo(r),this.windowListeners=new Oo(Ft(a)),this.initialCoordinates=(i=Os(o))!=null?i:mn,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(un.Resize,this.handleCancel),this.windowListeners.add(un.DragStart,jv),this.windowListeners.add(un.VisibilityChange,this.handleCancel),this.windowListeners.add(un.ContextMenu,jv),this.documentListeners.add(un.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Hv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Vv(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(un.Click,lF,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(un.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 c=(n=Os(t))!=null?n:mn,u=Do(i,c);if(!r&&l){if(Vv(l)){if(l.tolerance!=null&&$u(u,l.tolerance))return this.handleCancel();if($u(u,l.distance))return this.handleStart()}if(Hv(l)&&$u(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Re.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const uF={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class $s extends Fu{constructor(t){const{event:n}=t,r=Si(n.target);super(t,uF,r)}}$s.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 dF={move:{name:"mousemove"},end:{name:"mouseup"}};var Nu;(function(e){e[e.RightClick=2]="RightClick"})(Nu||(Nu={}));class fF extends Fu{constructor(t){super(t,dF,Si(t.event.target))}}fF.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Nu.RightClick?!1:(r==null||r({event:n}),!0)}}];const zu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class hF extends Fu{constructor(t){super(t,zu)}static setup(){return window.addEventListener(zu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(zu.move.name,t)};function t(){}}}hF.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 Ro;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ro||(Ro={}));var Fs;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Fs||(Fs={}));function pF(e){let{acceleration:t,activator:n=Ro.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:l=Fs.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:p}=e;const g=mF({delta:d,disabled:!o}),[v,m]=E$(),b=y.useRef({x:0,y:0}),C=y.useRef({x:0,y:0}),w=y.useMemo(()=>{switch(n){case Ro.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ro.DraggableRect:return i}},[n,i,c]),x=y.useRef(null),I=y.useCallback(()=>{const A=x.current;if(!A)return;const E=b.current.x*C.current.x,k=b.current.y*C.current.y;A.scrollBy(E,k)},[]),S=y.useMemo(()=>l===Fs.TreeOrder?[...u].reverse():u,[l,u]);y.useEffect(()=>{if(!o||!u.length||!w){m();return}for(const A of S){if((r==null?void 0:r(A))===!1)continue;const E=u.indexOf(A),k=f[E];if(!k)continue;const{direction:F,speed:W}=nF(A,k,w,t,p);for(const O of["x","y"])g[O][F[O]]||(W[O]=0,F[O]=0);if(W.x>0||W.y>0){m(),x.current=A,v(I,a),b.current=W,C.current=F;return}}b.current={x:0,y:0},C.current={x:0,y:0},m()},[t,I,r,m,o,a,JSON.stringify(w),JSON.stringify(g),v,u,S,f,JSON.stringify(p)])}const gF={x:{[kt.Backward]:!1,[kt.Forward]:!1},y:{[kt.Backward]:!1,[kt.Forward]:!1}};function mF(e){let{delta:t,disabled:n}=e;const r=Ps(t);return _o(i=>{if(n||!r||!i)return gF;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[kt.Backward]:i.x[kt.Backward]||o.x===-1,[kt.Forward]:i.x[kt.Forward]||o.x===1},y:{[kt.Backward]:i.y[kt.Backward]||o.y===-1,[kt.Forward]:i.y[kt.Forward]||o.y===1}}},[n,t,r])}function vF(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return _o(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function bF(e,t){return y.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Mo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Mo||(Mo={}));var ju;(function(e){e.Optimized="optimized"})(ju||(ju={}));const Wv=new Map;function yF(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=y.useState(null),{frequency:l,measure:c,strategy:u}=i,f=y.useRef(e),d=b(),p=ko(d),g=y.useCallback(function(C){C===void 0&&(C=[]),!p.current&&a(w=>w===null?C:w.concat(C.filter(x=>!w.includes(x))))},[p]),v=y.useRef(null),m=_o(C=>{if(d&&!n)return Wv;if(!C||C===Wv||f.current!==e||o!=null){const w=new Map;for(let x of e){if(!x)continue;if(o&&o.length>0&&!o.includes(x.id)&&x.rect.current){w.set(x.id,x.rect.current);continue}const I=x.node.current,S=I?new Bu(c(I),I):null;x.rect.current=S,S&&w.set(x.id,S)}return w}return C},[e,o,n,d,c]);return y.useEffect(()=>{f.current=e},[e]),y.useEffect(()=>{d||g()},[n,d]),y.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),y.useEffect(()=>{d||typeof l!="number"||v.current!==null||(v.current=setTimeout(()=>{g(),v.current=null},l))},[l,d,g,...r]),{droppableRects:m,measureDroppableContainers:g,measuringScheduled:o!=null};function b(){switch(u){case Mo.Always:return!1;case Mo.BeforeDragging:return n;default:return!n}}}function Uu(e,t){return _o(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function xF(e,t){return Uu(e,t)}function CF(e){let{callback:t,disabled:n}=e;const r=ks(t),i=y.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Ns(e){let{callback:t,disabled:n}=e;const r=ks(t),i=y.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function wF(e){return new Bu(Ai(e),e)}function Gv(e,t,n){t===void 0&&(t=wF);const[r,i]=y.useState(null);function o(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c!=null?c:n)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const a=CF({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),l=Ns({callback:o});return gn(()=>{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 SF(e){const t=Uu(e);return Dv(e,t)}const Yv=[];function IF(e){const t=y.useRef(e),n=_o(r=>e?r&&r!==Yv&&e&&t.current&&e.parentNode===t.current.parentNode?r:Ls(e):Yv,[e]);return y.useEffect(()=>{t.current=e},[e]),n}function AF(e){const[t,n]=y.useState(null),r=y.useRef(e),i=y.useCallback(o=>{const a=Mu(o.target);a&&n(l=>l?(l.set(a,Lu(a)),new Map(l)):null)},[]);return y.useEffect(()=>{const o=r.current;if(e!==o){a(o);const l=e.map(c=>{const u=Mu(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Lu(u)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{a(e),a(o)};function a(l){l.forEach(c=>{const u=Mu(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),y.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Ii(o,a),mn):Nv(e):mn,[e,t])}function Kv(e,t){t===void 0&&(t=[]);const n=y.useRef(null);return y.useEffect(()=>{n.current=null},t),y.useEffect(()=>{const r=e!==mn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Do(e,n.current):mn}function TF(e){y.useEffect(()=>{if(!Es)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 EF(e,t){return y.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function qv(e){return y.useMemo(()=>e?X$(e):null,[e])}const Qv=[];function kF(e,t){t===void 0&&(t=Ai);const[n]=e,r=qv(n?Ft(n):null),[i,o]=y.useState(Qv);function a(){o(()=>e.length?e.map(c=>$v(c)?r:new Bu(t(c),c)):Qv)}const l=Ns({callback:a});return gn(()=>{l==null||l.disconnect(),a(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),i}function Jv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Eo(t)?t:e}function _F(e){let{measure:t}=e;const[n,r]=y.useState(null),i=y.useCallback(u=>{for(const{target:f}of u)if(Eo(f)){r(d=>{const p=t(f);return d?Q(B({},d),{width:p.width,height:p.height}):p});break}},[t]),o=Ns({callback:i}),a=y.useCallback(u=>{const f=Jv(u);o==null||o.disconnect(),f&&(o==null||o.observe(f)),r(f?t(f):null)},[t,o]),[l,c]=_s(a);return y.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const PF=[{sensor:$s,options:{}},{sensor:Bs,options:{}}],DF={current:{}},zs={draggable:{measure:Rv},droppable:{measure:Rv,strategy:Mo.WhileDragging,frequency:ju.Optimized},dragOverlay:{measure:Ai}};class Lo 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 OF={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Lo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Rs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zs,measureDroppableContainers:Rs,windowRect:null,measuringScheduled:!1},Xv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Rs,draggableNodes:new Map,over:null,measureDroppableContainers:Rs},Bo=y.createContext(Xv),Zv=y.createContext(OF);function RF(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Lo}}}function MF(e,t){switch(t.type){case wt.DragStart:return Q(B({},e),{draggable:Q(B({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case wt.DragMove:return e.draggable.active==null?e:Q(B({},e),{draggable:Q(B({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case wt.DragEnd:case wt.DragCancel:return Q(B({},e),{draggable:Q(B({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case wt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Lo(e.droppable.containers);return i.set(r,n),Q(B({},e),{droppable:Q(B({},e.droppable),{containers:i})})}case wt.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 Lo(e.droppable.containers);return a.set(n,Q(B({},o),{disabled:i})),Q(B({},e),{droppable:Q(B({},e.droppable),{containers:a})})}case wt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Lo(e.droppable.containers);return o.delete(n),Q(B({},e),{droppable:Q(B({},e.droppable),{containers:o})})}default:return e}}function LF(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=y.useContext(Bo),o=Ps(r),a=Ps(n==null?void 0:n.id);return y.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!Ds(o)||document.activeElement===o.target)return;const l=i.get(a);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=P$(f);if(d){d.focus();break}}})}},[r,t,i,a,o]),null}function eb(e,t){let i=t,{transform:n}=i,r=Qe(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(B({transform:o},r)),n):n}function BF(e){return y.useMemo(()=>({draggable:B(B({},zs.draggable),e==null?void 0:e.draggable),droppable:B(B({},zs.droppable),e==null?void 0:e.droppable),dragOverlay:B(B({},zs.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 $F(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=y.useRef(!1),{x:a,y:l}=typeof i=="boolean"?{x:i,y:i}:i;gn(()=>{if(!a&&!l||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=Dv(f,r);if(a||(d.x=0),l||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=Mv(u);p&&p.scrollBy({top:d.y,left:d.x})}},[t,a,l,r,n])}const js=y.createContext(Q(B({},mn),{scaleX:1,scaleY:1}));var dr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(dr||(dr={}));const tb=y.memo(function(t){var n,r,i,o;let Gt=t,{id:a,accessibility:l,autoScroll:c=!0,children:u,sensors:f=PF,collisionDetection:d=G$,measuring:p,modifiers:g}=Gt,v=Qe(Gt,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const m=y.useReducer(MF,void 0,RF),[b,C]=m,[w,x]=B$(),[I,S]=y.useState(dr.Uninitialized),A=I===dr.Initialized,{draggable:{active:E,nodes:k,translate:F},droppable:{containers:W}}=b,O=E!=null?k.get(E):null,T=y.useRef({initial:null,translated:null}),N=y.useMemo(()=>{var bt;return E!=null?{id:E,data:(bt=O==null?void 0:O.data)!=null?bt:DF,rect:T}:null},[E,O]),H=y.useRef(null),[j,$]=y.useState(null),[M,V]=y.useState(null),Y=ko(v,Object.values(v)),X=Po("DndDescribedBy",a),D=y.useMemo(()=>W.getEnabled(),[W]),L=BF(p),{droppableRects:U,measureDroppableContainers:G,measuringScheduled:oe}=yF(D,{dragging:A,dependencies:[F.x,F.y],config:L.droppable}),ce=vF(k,E),se=y.useMemo(()=>M?Os(M):null,[M]),Z=Wt(),te=xF(ce,L.draggable.measure);$F({activeNode:E!=null?k.get(E):null,config:Z.layoutShiftCompensation,initialRect:te,measure:L.draggable.measure});const ne=Gv(ce,L.draggable.measure,te),de=Gv(ce?ce.parentElement:null),ve=y.useRef({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:W,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Fe=W.getNodeFor((n=ve.current.over)==null?void 0:n.id),st=_F({measure:L.dragOverlay.measure}),Je=(r=st.nodeRef.current)!=null?r:ce,vt=A?(i=st.rect)!=null?i:ne:null,he=!!(st.nodeRef.current&&st.rect),ge=SF(he?null:ne),xe=qv(Je?Ft(Je):null),ke=IF(A?Fe!=null?Fe:ce:null),Ye=kF(ke),Oe=eb(g,{transform:{x:F.x-ge.x,y:F.y-ge.y,scaleX:1,scaleY:1},activatorEvent:M,active:N,activeNodeRect:ne,containerNodeRect:de,draggingNodeRect:vt,over:ve.current.over,overlayNodeRect:st.rect,scrollableAncestors:ke,scrollableAncestorRects:Ye,windowRect:xe}),Pe=se?Ii(se,F):null,St=AF(ke),It=Kv(St),Mt=Kv(St,[ne]),_t=Ii(Oe,It),Nt=vt?q$(vt,Oe):null,kn=N&&Nt?d({active:N,collisionRect:Nt,droppableRects:U,droppableContainers:D,pointerCoordinates:Pe}):null,Ei=Pv(kn,"id"),[dn,Mr]=y.useState(null),$o=he?Oe:Ii(Oe,Mt),Fo=Y$($o,(o=dn==null?void 0:dn.rect)!=null?o:null,ne),Ne=y.useRef(null),hr=y.useCallback((bt,P)=>{let{sensor:z,options:q}=P;if(H.current==null)return;const ee=k.get(H.current);if(!ee)return;const ae=bt.nativeEvent,ue=new z({active:H.current,activeNode:ee,event:ae,options:q,context:ve,onAbort(fe){if(!k.get(fe))return;const{onDragAbort:pe}=Y.current,ie={id:fe};pe==null||pe(ie),w({type:"onDragAbort",event:ie})},onPending(fe,Se,pe,ie){if(!k.get(fe))return;const{onDragPending:Lt}=Y.current,lt={id:fe,constraint:Se,initialCoordinates:pe,offset:ie};Lt==null||Lt(lt),w({type:"onDragPending",event:lt})},onStart(fe){const Se=H.current;if(Se==null)return;const pe=k.get(Se);if(!pe)return;const{onDragStart:ie}=Y.current,Ae={activatorEvent:ae,active:{id:Se,data:pe.data,rect:T}};yt.unstable_batchedUpdates(()=>{ie==null||ie(Ae),S(dr.Initializing),C({type:wt.DragStart,initialCoordinates:fe,active:Se}),w({type:"onDragStart",event:Ae}),$(Ne.current),V(ae)})},onMove(fe){C({type:wt.DragMove,coordinates:fe})},onEnd:Ce(wt.DragEnd),onCancel:Ce(wt.DragCancel)});Ne.current=ue;function Ce(fe){return function(){return _(this,null,function*(){const{active:pe,collisions:ie,over:Ae,scrollAdjustedTranslate:Lt}=ve.current;let lt=null;if(pe&&Lt){const{cancelDrop:vn}=Y.current;lt={activatorEvent:ae,active:pe,collisions:ie,delta:Lt,over:Ae},fe===wt.DragEnd&&typeof vn=="function"&&(yield Promise.resolve(vn(lt)))&&(fe=wt.DragCancel)}H.current=null,yt.unstable_batchedUpdates(()=>{C({type:fe}),S(dr.Uninitialized),Mr(null),$(null),V(null),Ne.current=null;const vn=fe===wt.DragEnd?"onDragEnd":"onDragCancel";if(lt){const _n=Y.current[vn];_n==null||_n(lt),w({type:vn,event:lt})}})})}}},[k]),Lr=y.useCallback((bt,P)=>(z,q)=>{const ee=z.nativeEvent,ae=k.get(q);if(H.current!==null||!ae||ee.dndKit||ee.defaultPrevented)return;const ue={active:ae};bt(z,P.options,ue)===!0&&(ee.dndKit={capturedBy:P.sensor},H.current=q,hr(z,P))},[k,hr]),ki=bF(f,Lr);TF(f),gn(()=>{ne&&I===dr.Initializing&&S(dr.Initialized)},[ne,I]),y.useEffect(()=>{const{onDragMove:bt}=Y.current,{active:P,activatorEvent:z,collisions:q,over:ee}=ve.current;if(!P||!z)return;const ae={active:P,activatorEvent:z,collisions:q,delta:{x:_t.x,y:_t.y},over:ee};yt.unstable_batchedUpdates(()=>{bt==null||bt(ae),w({type:"onDragMove",event:ae})})},[_t.x,_t.y]),y.useEffect(()=>{const{active:bt,activatorEvent:P,collisions:z,droppableContainers:q,scrollAdjustedTranslate:ee}=ve.current;if(!bt||H.current==null||!P||!ee)return;const{onDragOver:ae}=Y.current,ue=q.get(Ei),Ce=ue&&ue.rect.current?{id:ue.id,rect:ue.rect.current,data:ue.data,disabled:ue.disabled}:null,fe={active:bt,activatorEvent:P,collisions:z,delta:{x:ee.x,y:ee.y},over:Ce};yt.unstable_batchedUpdates(()=>{Mr(Ce),ae==null||ae(fe),w({type:"onDragOver",event:fe})})},[Ei]),gn(()=>{ve.current={activatorEvent:M,active:N,activeNode:ce,collisionRect:Nt,collisions:kn,droppableRects:U,draggableNodes:k,draggingNode:Je,draggingNodeRect:vt,droppableContainers:W,over:dn,scrollableAncestors:ke,scrollAdjustedTranslate:_t},T.current={initial:vt,translated:Nt}},[N,ce,kn,Nt,k,Je,vt,U,W,dn,ke,_t]),pF(Q(B({},Z),{delta:F,draggingRect:Nt,pointerCoordinates:Pe,scrollableAncestors:ke,scrollableAncestorRects:Ye}));const pr=y.useMemo(()=>({active:N,activeNode:ce,activeNodeRect:ne,activatorEvent:M,collisions:kn,containerNodeRect:de,dragOverlay:st,draggableNodes:k,droppableContainers:W,droppableRects:U,over:dn,measureDroppableContainers:G,scrollableAncestors:ke,scrollableAncestorRects:Ye,measuringConfiguration:L,measuringScheduled:oe,windowRect:xe}),[N,ce,ne,M,kn,de,st,k,W,U,dn,G,ke,Ye,L,oe,xe]),gr=y.useMemo(()=>({activatorEvent:M,activators:ki,active:N,activeNodeRect:ne,ariaDescribedById:{draggable:X},dispatch:C,draggableNodes:k,over:dn,measureDroppableContainers:G}),[M,ki,N,ne,C,X,k,dn,G]);return y.createElement(Ev.Provider,{value:x},y.createElement(Bo.Provider,{value:gr},y.createElement(Zv.Provider,{value:pr},y.createElement(js.Provider,{value:Fo},u)),y.createElement(LF,{disabled:(l==null?void 0:l.restoreFocus)===!1})),y.createElement(N$,Q(B({},l),{hiddenTextDescribedById:X})));function Wt(){const bt=(j==null?void 0:j.autoScrollEnabled)===!1,P=typeof c=="object"?c.enabled===!1:c===!1,z=A&&!bt&&!P;return typeof c=="object"?Q(B({},c),{enabled:z}):{enabled:z}}}),FF=y.createContext(null),nb="button",NF="Draggable";function zF(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=Po(NF),{activators:a,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:p}=y.useContext(Bo),{role:g=nb,roleDescription:v="draggable",tabIndex:m=0}=i!=null?i:{},b=(c==null?void 0:c.id)===t,C=y.useContext(b?js:FF),[w,x]=_s(),[I,S]=_s(),A=EF(a,t),E=ko(n);gn(()=>(d.set(t,{id:t,key:o,node:w,activatorNode:I,data:E}),()=>{const F=d.get(t);F&&F.key===o&&d.delete(t)}),[d,t]);const k=y.useMemo(()=>({role:g,tabIndex:m,"aria-disabled":r,"aria-pressed":b&&g===nb?!0:void 0,"aria-roledescription":v,"aria-describedby":f.draggable}),[r,g,m,b,v,f.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:k,isDragging:b,listeners:r?void 0:A,node:w,over:p,setNodeRef:x,setActivatorNodeRef:S,transform:C}}function rb(){return y.useContext(Zv)}const jF="Droppable",UF={timeout:25};function VF(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=Po(jF),{active:a,dispatch:l,over:c,measureDroppableContainers:u}=y.useContext(Bo),f=y.useRef({disabled:n}),d=y.useRef(!1),p=y.useRef(null),g=y.useRef(null),{disabled:v,updateMeasurementsFor:m,timeout:b}=B(B({},UF),i),C=ko(m!=null?m:r),w=y.useCallback(()=>{if(!d.current){d.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(C.current)?C.current:[C.current]),g.current=null},b)},[b]),x=Ns({callback:w,disabled:v||!a}),I=y.useCallback((k,F)=>{x&&(F&&(x.unobserve(F),d.current=!1),k&&x.observe(k))},[x]),[S,A]=_s(I),E=ko(t);return y.useEffect(()=>{!x||!S.current||(x.disconnect(),d.current=!1,x.observe(S.current))},[S,x]),y.useEffect(()=>(l({type:wt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:S,rect:p,data:E}}),()=>l({type:wt.UnregisterDroppable,key:o,id:r})),[r]),y.useEffect(()=>{n!==f.current.disabled&&(l({type:wt.SetDroppableDisabled,id:r,key:o,disabled:n}),f.current.disabled=n)},[r,o,n,l]),{active:a,rect:p,isOver:(c==null?void 0:c.id)===r,node:S,over:c,setNodeRef:A}}function HF(e){let{animation:t,children:n}=e;const[r,i]=y.useState(null),[o,a]=y.useState(null),l=Ps(n);return!n&&!r&&l&&i(l),gn(()=>{if(!o)return;const c=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(c==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),y.createElement(y.Fragment,null,n,r?y.cloneElement(r,{ref:a}):null)}const WF={x:0,y:0,scaleX:1,scaleY:1};function GF(e){let{children:t}=e;return y.createElement(Bo.Provider,{value:Xv},y.createElement(js.Provider,{value:WF},t))}const YF={position:"fixed",touchAction:"none"},KF=e=>Ds(e)?"transform 250ms ease":void 0,qF=y.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:l,style:c,transform:u,transition:f=KF}=e;if(!l)return null;const d=i?u:Q(B({},u),{scaleX:1,scaleY:1}),p=B(Q(B({},YF),{width:l.width,height:l.height,top:l.top,left:l.left,transform:Kn.Transform.toString(d),transformOrigin:i&&r?j$(r,l):void 0,transition:typeof f=="function"?f(r):f}),c);return y.createElement(n,{className:a,style:p,ref:t},o)}),ib=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[l,c]of Object.entries(o.active))c!==void 0&&(i[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,c));if(o!=null&&o.dragOverlay)for(const[l,c]of Object.entries(o.dragOverlay))c!==void 0&&r.node.style.setProperty(l,c);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[c,u]of Object.entries(i))n.node.style.setProperty(c,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},QF={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Kn.Transform.toString(t)},{transform:Kn.Transform.toString(n)}]},sideEffects:ib({styles:{active:{opacity:"0"}}})};function JF(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return ks((o,a)=>{if(t===null)return;const l=n.get(o);if(!l)return;const c=l.node.current;if(!c)return;const u=Jv(a);if(!u)return;const{transform:f}=Ft(a).getComputedStyle(a),d=Ov(f);if(!d)return;const p=typeof t=="function"?t:XF(t);return zv(c,i.draggable.measure),p({active:{id:o,data:l.data,node:c,rect:i.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}function XF(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=B(B({},QF),e);return o=>{let w=o,{active:a,dragOverlay:l,transform:c}=w,u=Qe(w,["active","dragOverlay","transform"]);if(!t)return;const f={x:l.rect.left-a.rect.left,y:l.rect.top-a.rect.top},d={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/l.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/l.rect.height:1},p=B({x:c.x-f.x,y:c.y-f.y},d),g=i(Q(B({},u),{active:a,dragOverlay:l,transform:{initial:c,final:p}})),[v]=g,m=g[g.length-1];if(JSON.stringify(v)===JSON.stringify(m))return;const b=r==null?void 0:r(B({active:a,dragOverlay:l},u)),C=l.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise(x=>{C.onfinish=()=>{b==null||b(),x()}})}}let ob=0;function ZF(e){return y.useMemo(()=>{if(e!=null)return ob++,ob},[e])}const eN=y.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:l="div",className:c,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:p,containerNodeRect:g,draggableNodes:v,droppableContainers:m,dragOverlay:b,over:C,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:I,windowRect:S}=rb(),A=y.useContext(js),E=ZF(d==null?void 0:d.id),k=eb(a,{activatorEvent:f,active:d,activeNodeRect:p,containerNodeRect:g,draggingNodeRect:b.rect,over:C,overlayNodeRect:b.rect,scrollableAncestors:x,scrollableAncestorRects:I,transform:A,windowRect:S}),F=Uu(p),W=JF({config:r,draggableNodes:v,droppableContainers:m,measuringConfiguration:w}),O=F?b.setRef:void 0;return y.createElement(GF,null,y.createElement(HF,{animation:W},d&&E?y.createElement(qF,{key:E,id:d.id,ref:O,as:l,activatorEvent:f,adjustScale:t,className:c,transition:o,rect:F,style:B({zIndex:u},i),transform:k},n):null))});function Us(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function tN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Vs(e){return e!==null&&e>=0}function nN(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 rN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ab=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Us(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}},sb="Sortable",lb=y.createContext({activeIndex:-1,containerId:sb,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ab,disabled:{draggable:!1,droppable:!1}});function cb(e){let{children:t,id:n,items:r,strategy:i=ab,disabled:o=!1}=e;const{active:a,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:f}=rb(),d=Po(sb,n),p=l.rect!==null,g=y.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),v=a!=null,m=a?g.indexOf(a.id):-1,b=u?g.indexOf(u.id):-1,C=y.useRef(g),w=!nN(g,C.current),x=b!==-1&&m===-1||w,I=rN(o);gn(()=>{w&&v&&f(g)},[w,g,v,f]),y.useEffect(()=>{C.current=g},[g]);const S=y.useMemo(()=>({activeIndex:m,containerId:d,disabled:I,disableTransforms:x,items:g,overIndex:b,useDragOverlay:p,sortedRects:tN(g,c),strategy:i}),[m,d,I.draggable,I.droppable,x,g,b,c,p,i]);return y.createElement(lb.Provider,{value:S},t)}const iN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Us(n,r,i).indexOf(t)},oN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!r||l!==o&&i===a?!1:n?!0:a!==i&&t===c},aN={duration:200,easing:"ease"},ub="transform",sN=Kn.Transition.toString({property:ub,duration:0,easing:"linear"}),lN={roleDescription:"sortable"};function cN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=y.useState(null),l=y.useRef(n);return gn(()=>{if(!t&&n!==l.current&&r.current){const c=i.current;if(c){const u=Ai(r.current,{ignoreTransform:!0}),f={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(f.x||f.y)&&a(f)}}n!==l.current&&(l.current=n)},[t,n,r,i]),y.useEffect(()=>{o&&a(null)},[o]),o}function db(e){let{animateLayoutChanges:t=oN,attributes:n,disabled:r,data:i,getNewIndex:o=iN,id:a,strategy:l,resizeObserverConfig:c,transition:u=aN}=e;const{items:f,containerId:d,activeIndex:p,disabled:g,disableTransforms:v,sortedRects:m,overIndex:b,useDragOverlay:C,strategy:w}=y.useContext(lb),x=uN(r,g),I=f.indexOf(a),S=y.useMemo(()=>B({sortable:{containerId:d,index:I,items:f}},i),[d,i,I,f]),A=y.useMemo(()=>f.slice(f.indexOf(a)),[f,a]),{rect:E,node:k,isOver:F,setNodeRef:W}=VF({id:a,data:S,disabled:x.droppable,resizeObserverConfig:B({updateMeasurementsFor:A},c)}),{active:O,activatorEvent:T,activeNodeRect:N,attributes:H,setNodeRef:j,listeners:$,isDragging:M,over:V,setActivatorNodeRef:Y,transform:X}=zF({id:a,data:S,attributes:B(B({},lN),n),disabled:x.draggable}),D=T$(W,j),L=!!O,U=L&&!v&&Vs(p)&&Vs(b),G=!C&&M,oe=G&&U?X:null,ce=l!=null?l:w,se=U?oe!=null?oe:ce({rects:m,activeNodeRect:N,activeIndex:p,overIndex:b,index:I}):null,Z=Vs(p)&&Vs(b)?o({id:a,items:f,activeIndex:p,overIndex:b}):I,te=O==null?void 0:O.id,ne=y.useRef({activeId:te,items:f,newIndex:Z,containerId:d}),de=f!==ne.current.items,ve=t({active:O,containerId:d,isDragging:M,isSorting:L,id:a,index:I,items:f,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:u,wasDragging:ne.current.activeId!=null}),Fe=cN({disabled:!ve,index:I,node:k,rect:E});return y.useEffect(()=>{L&&ne.current.newIndex!==Z&&(ne.current.newIndex=Z),d!==ne.current.containerId&&(ne.current.containerId=d),f!==ne.current.items&&(ne.current.items=f)},[L,Z,d,f]),y.useEffect(()=>{if(te===ne.current.activeId)return;if(te!=null&&ne.current.activeId==null){ne.current.activeId=te;return}const Je=setTimeout(()=>{ne.current.activeId=te},50);return()=>clearTimeout(Je)},[te]),{active:O,activeIndex:p,attributes:H,data:S,rect:E,index:I,newIndex:Z,items:f,isOver:F,isSorting:L,isDragging:M,listeners:$,node:k,overIndex:b,over:V,setNodeRef:D,setActivatorNodeRef:Y,setDroppableNodeRef:W,setDraggableNodeRef:j,transform:Fe!=null?Fe:se,transition:st()};function st(){if(Fe||de&&ne.current.newIndex===I)return sN;if(!(G&&!Ds(T)||!u)&&(L||ve))return Kn.Transition.toString(Q(B({},u),{property:ub}))}}function uN(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 Hs(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 dN=[Re.Down,Re.Right,Re.Up,Re.Left],fb=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:l}}=t;if(dN.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];o.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=i.get(d.id);if(p)switch(e.code){case Re.Down:r.top<p.top&&c.push(d);break;case Re.Up:r.top>p.top&&c.push(d);break;case Re.Left:r.left>p.left&&c.push(d);break;case Re.Right:r.left<p.left&&c.push(d);break}});const u=H$({active:n,collisionRect:r,droppableRects:i,droppableContainers:c,pointerCoordinates:null});let f=Pv(u,"id");if(f===(a==null?void 0:a.id)&&u.length>1&&(f=u[1].id),f!=null){const d=o.get(n.id),p=o.get(f),g=p?i.get(p.id):null,v=p==null?void 0:p.node.current;if(v&&g&&d&&p){const b=Ls(v).some((A,E)=>l[E]!==A),C=hb(d,p),w=fN(d,p),x=b||!C?{x:0,y:0}:{x:w?r.width-g.width:0,y:w?r.height-g.height:0},I={x:g.left,y:g.top};return x.x&&x.y?I:Do(I,x)}}}};function hb(e,t){return!Hs(e)||!Hs(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function fN(e,t){return!Hs(e)||!Hs(t)||!hb(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const pb=Be(s.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"),Ws=y.createContext({attributes:{},listeners:void 0,ref(){}}),hN=()=>{const{attributes:e,listeners:t,ref:n}=y.useContext(Ws);return s.jsx(h.Button,Q(B(B({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:s.jsx(pb,{})}))},gb=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:l,listeners:c,setNodeRef:u,setActivatorNodeRef:f,transform:d,transition:p}=db({id:t}),g=y.useMemo(()=>({attributes:a,listeners:c,ref:f}),[a,c,f]),v={opacity:l?.6:void 0,transform:Kn.Translate.toString(d),transition:p};return s.jsx(Ws.Provider,{value:g,children:s.jsx(h.ListItem,{variant:o,ref:u,style:v,startAction:i?s.jsx(hN,{}):s.jsx(s.Fragment,{}),endAction:i?s.jsx(h.Tooltip,{title:n,children:s.jsx(h.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:s.jsx(_e.Remove,{})})}):s.jsx(s.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},pN={sideEffects:ib({styles:{active:{opacity:"0.6"}}})},mb=({children:e})=>s.jsx(eN,{dropAnimation:pN,children:e}),gN=({entities:e=[],labels:t,disabled:n,setEntities:r,removeItem:i})=>{const[o,a]=y.useState(null),l=y.useMemo(()=>e.find(u=>u.id===(o==null?void 0:o.id)),[o,e]),c=kv(Ms($s),Ms(Bs,{coordinateGetter:fb}));return s.jsxs(tb,{sensors:c,onDragStart:({active:u})=>{a(u)},onDragEnd:({active:u,over:f})=>{if(f&&u.id!==(f==null?void 0:f.id)){const d=e.findIndex(({id:g})=>g===u.id),p=e.findIndex(({id:g})=>g===f.id);r(Us(e,d,p))}a(null)},onDragCancel:()=>{a(null)},children:[s.jsx(cb,{items:e,children:s.jsx(h.List,{sx:{gap:"10px",padding:0},children:e.map(u=>s.jsxs(gb,{id:u.id,variant:"outlined",removeItem:()=>i(u.id),tooltipTitle:t.removeEntity,useDraggable:!n,children:[s.jsx(h.Typography,{ml:n?0:2.5,children:u.title||u.name}),u.type&&s.jsx(h.Chip,{color:RB(u.type),sx:{marginLeft:2,marginRight:4},children:MB(u.type)})]},`sortable-item-${u.id}`))})}),s.jsx(mb,{children:l?s.jsx(s.Fragment,{children:e.map(u=>s.jsx(gb,{id:u.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${u.id}`))}):s.jsx(s.Fragment,{})})]})},mN=({labels:e,value:t,options:n,size:r="sm",disabled:i=!1,sx:o={},onChange:a})=>s.jsxs(h.FormControl,{size:r,disabled:i,children:[s.jsx(h.FormLabel,{children:e.itemsPerPage}),s.jsx(h.Select,{value:t,size:r,onChange:a,sx:Q(B({},o),{minHeight:"37px"}),children:n.map((l,c)=>s.jsx(h.Option,{value:l,children:l},`items-per-page-${l}-${c}`))})]}),vN=(e,t)=>{const[n,r]=y.useState(null),{sdk:i}=We(),o=()=>_(this,null,function*(){let l=[];if(!e){r(l);return}try{switch(e){case"top_x":l=(yield i.topX.getGames({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":l=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"template":l=(yield i.loyalty.getTemplates(void 0,!0)).data.map(C=>({id:C.id,name:C.name,status:C.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":l=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"personality_quiz":l=(yield i.miniGames.getPersonalityQuizzes({limit:50},!1,!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"either_or":l=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"poll":l=(yield i.voting.getPolls({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"bracket":l=(yield i.bracketGame.getGames({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"standing":l=(yield i.standingGame.getGames({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break}}catch(c){console.error(c),r(l),t();return}r(l)});return y.useEffect(()=>(o(),()=>r(null)),[e]),n},bN=({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 s.jsx(h.Chip,{color:t,variant:"solid",size:"sm",children:e})},yN=Be(s.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"),xN=Be(s.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"),CN=Be(s.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"),wN=Be(s.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),SN=Be(s.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"),IN=e=>{switch(e.entityType){case"top_x":return s.jsx(h.Tooltip,{title:"Top X",children:s.jsx(yN,{})});case"match_quiz":return s.jsx(h.Tooltip,{title:"Match Quiz",children:s.jsx(xN,{})});case"template":return s.jsx(h.Tooltip,{title:"Leaderboard Templates",children:s.jsx(_e.EmojiEvents,{})});case"classic_quiz":return s.jsx(h.Tooltip,{title:"Classic Quiz",children:s.jsx(CN,{})});case"either_or":return s.jsx(h.Tooltip,{title:"Either/Or",children:s.jsx(wN,{})});case"poll":return s.jsx(h.Tooltip,{title:"Poll",children:s.jsx(SN,{})});case"bracket":return s.jsx(h.Tooltip,{title:"Custom Bracket Game",children:s.jsx(_e.EmojiEvents,{})});case"standing":return s.jsx(h.Tooltip,{title:"Custom Standings Game",children:s.jsx(_e.EmojiEvents,{})});default:return null}},vb=({entity:e,deleteLabel:t,onDelete:n})=>s.jsx(s.Fragment,{children:s.jsx(h.Card,{sx:{p:2,mb:2},children:s.jsx(h.CardContent,{children:s.jsxs(h.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[s.jsx(h.Typography,{fontSize:"sm",startDecorator:s.jsx(IN,{entityType:e.type}),children:e.name}),s.jsx(h.Box,{display:{xs:"none",md:"block"},children:s.jsx(bN,{status:e.status})}),s.jsx(h.Box,{children:s.jsx(h.Tooltip,{title:t,children:s.jsx(h.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:s.jsx(_e.Delete,{})})})})]})})})}),AN=(e,t,n,r)=>_(this,null,function*(){let o=[];const a=new Map;t.forEach(l=>{if(a.has(l.entity_type)){const c=a.get(l.entity_type);a.set(l.entity_type,[...c,[l.entity_id,l.entity_relationship]])}else a.set(l.entity_type,[[l.entity_id,l.entity_relationship]])});try{for(const[l,c]of a)switch(l){case"top_x":const u=c.map(([O])=>O),f=yield e.topX.getGames({limit:u.length,gameIds:u},!0);o=[...o,...f.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"match_quiz":const d=c.map(([O])=>O),p=yield e.matchQuiz.getGames({limit:d.length,gameIds:d},!0);o=[...o,...p.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"template":const g=c.map(([O])=>O),v=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...v.data.filter(O=>g.includes(O.id)).map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"classic_quiz":const m=c.map(([O])=>O),b=yield e.miniGames.getClassicQuizzes({limit:m.length,classicQuizIds:m},!1,!0);o=[...o,...b.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"personality_quiz":const C=c.map(([O])=>O),w=yield e.miniGames.getPersonalityQuizzes({limit:C.length,personalityQuizIds:C},!1,!0);o=[...o,...w.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"either_or":const x=c.map(([O])=>O),I=yield e.miniGames.getEitherOrs({limit:x.length,eitherOrIds:x},!1,!0);o=[...o,...I.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"poll":const S=c.map(([O])=>O),A=yield e.voting.getPolls({limit:S.length,pollIds:S},!0);o=[...o,...A.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"bracket":const E=c.map(([O])=>O),k=yield e.bracketGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,...k.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"standing":const F=c.map(([O])=>O),W=yield e.standingGame.getGames({limit:F.length,gameIds:F},!0);o=[...o,...W.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;default:}}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),TN=["top_x","match_quiz","template","classic_quiz","personality_quiz","poll","either_or","bracket","standing"],EN=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],kN=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic Quiz").set("personality_quiz","Personality Quiz").set("either_or","Either/Or").set("match_quiz","Match Quiz").set("top_x","Top X").set("bracket","Custom Bracket Game").set("standing","Custom Standing Game").set("poll","Poll"),bb=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"),_N=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState(""),[l,c]=y.useState(null),[u,f]=y.useState("relatedTo"),[d,p]=y.useState(!1),g=()=>p(!d),v=vN(l,g),{sdk:m}=We();y.useEffect(()=>(e.length>0&&AN(m,e,i,g),()=>{i([]),a(""),c(null),f("relatedTo")}),[]);const b=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===u)){a("");return}const S=[...e,{entity_id:o,entity_type:l,entity_relationship:u}],A=(v==null?void 0:v.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:l,status:E.status,relationship:u})))||[];i([...r,...A]),t(S),a("")},C=(I,S)=>{const A=e.filter(k=>!(k.entity_id===I&&k.entity_relationship===S)),E=r.filter(k=>!(k.id===I&&k.relationship===S));i(E),t(A)},w=r.reduce((I,S)=>{const A=S.relationship;return I[A]||(I[A]=[]),I[A].push(S),I},{}),x=Object.keys(w).sort();return s.jsxs(s.Fragment,{children:[x.map(I=>s.jsxs(h.Box,{sx:{mb:2},children:[s.jsx(h.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:s.jsx(h.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:bb.get(I)||"Unknown relationship"})}),w[I].map((S,A)=>s.jsx(vb,{entity:S,deleteLabel:n.delete,onDelete:C},`related-entity-relationship-${S.id}-${A}`))]},`relationship-group-${I}`)),s.jsxs(h.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.type}),s.jsx(h.Select,{value:l,size:"sm",name:"entity_type",onChange:(I,S)=>c(S),sx:{minHeight:"37px"},children:TN.map(I=>s.jsx(h.Option,{value:I,children:kN.get(I)},`entity-type-option-${I}`))})]}),s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.relationship}),s.jsx(h.Select,{value:u,size:"sm",name:"entity_relationship",onChange:(I,S)=>f(S),sx:{minHeight:"37px"},children:EN.map(I=>s.jsx(h.Option,{value:I,children:bb.get(I)},`entity-relationship-option-${I}`))})]}),s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.entity}),s.jsx(h.Select,{value:o,size:"sm",name:"entity_id",onChange:(I,S)=>a(S),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!v&&s.jsx(h.CircularProgress,{size:"sm"}),children:v&&v.map(I=>s.jsx(h.Option,{value:I.id,children:I.name},`entity--${I.id}`))})]}),s.jsx(h.Button,{startDecorator:s.jsx(_e.Add,{}),disabled:!o||!l,onClick:b,sx:{mb:1},children:n.add})]}),s.jsx(Ge,{showToast:d,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:g})]})},PN=(e,t,n,r)=>_(this,null,function*(){let o=[];const a=t.filter(l=>l.entity_type==="classic_quiz"&&l.entity_relationship==="bonusPointsGame").map(l=>[l.entity_id,l.entity_relationship]);if(a.length===0){n([]);return}try{const l=a.map(([u])=>u);o=(yield e.miniGames.getClassicQuizzes({limit:l.length,classicQuizIds:l},!1,!0)).data.map(u=>{var d;const f=((d=a.find(([p])=>p===u.id))==null?void 0:d[1])||"bonusPointsGame";return{id:u.id,name:u.title,status:u.status,type:"classic_quiz",relationship:f}})}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),DN=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState(""),[l,c]=y.useState(null),[u,f]=y.useState(!1),d=()=>f(!u),{sdk:p}=We();y.useEffect(()=>(e.length>0&&PN(p,e,i,d),()=>{i([]),a("")}),[]),y.useEffect(()=>(_(this,null,function*(){try{const w=(yield p.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:"classic_quiz",relationship:"bonusPointsGame"}));c(w)}catch(C){console.error(C),c([]),d()}}),()=>c(null)),[]);const g=()=>{if(e.some(w=>w.entity_id===o&&w.entity_relationship==="bonusPointsGame")){a("");return}const b=[...e,{entity_id:o,entity_type:"classic_quiz",entity_relationship:"bonusPointsGame"}],C=(l==null?void 0:l.filter(w=>w.id===o).map(w=>({id:w.id,name:w.name,type:"classic_quiz",status:w.status,relationship:"bonusPointsGame"})))||[];i([...r,...C]),t(b),a("")},v=(m,b)=>{const C=e.filter(x=>!(x.entity_id===m&&x.entity_relationship===b)),w=r.filter(x=>!(x.id===m&&x.relationship===b));i(w),t(C)};return s.jsxs(s.Fragment,{children:[r.length>0&&s.jsxs(h.Box,{sx:{mb:2},children:[s.jsx(h.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:s.jsx(h.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:"Bonus points game"})}),r.map((m,b)=>s.jsx(vb,{entity:m,deleteLabel:n.delete,onDelete:v},`related-entity-relationship-${m.id}-${b}`))]}),s.jsxs(h.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.type}),s.jsx(h.Input,{value:"Classic Quiz",readOnly:!0,disabled:!0,size:"sm",sx:{minHeight:"37px"}})]}),s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.relationship}),s.jsx(h.Input,{value:"Bonus Points Game",readOnly:!0,disabled:!0,size:"sm",sx:{minHeight:"37px"}})]}),s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.entity}),s.jsx(h.Select,{value:o,size:"sm",name:"entity_id",onChange:(m,b)=>a(b),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!l&&s.jsx(h.CircularProgress,{size:"sm"}),children:l&&l.map(m=>s.jsx(h.Option,{value:m.id,children:m.name},`entity--${m.id}`))})]}),s.jsx(h.Button,{startDecorator:s.jsx(_e.Add,{}),disabled:!o,onClick:g,sx:{mb:1},children:n.add})]}),s.jsx(Ge,{showToast:u,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:d})]})},ON=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(!1),[o,a]=y.useState("success"),[l,c]=y.useState(""),u=y.useContext(fa),f=(p,g)=>{a(p),c(g),i(!0)},d=()=>_(this,null,function*(){n(!0);const p=yield u==null?void 0:u.https.exportLeadsPerEntity(e.entityId);if(p!=null&&p.ok){const g=yield p.blob(),v=URL.createObjectURL(g),m=document.createElement("a");m.href=v,m.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(v),n(!1),f("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield p==null?void 0:p.json()),n(!1),f("danger",e.labels.usersLeadsExportErrorMessage)});return s.jsxs(s.Fragment,{children:[s.jsxs(h.Box,{mb:2,children:[s.jsx(h.Box,{display:"flex",alignItems:"center",mb:1,children:s.jsx(h.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),s.jsx(h.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:s.jsxs(h.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:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:e.labels.category}),s.jsx("th",{children:e.labels.action})]})}),s.jsx("tbody",{children:s.jsxs("tr",{children:[s.jsxs("td",{children:[s.jsx(h.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),s.jsx(h.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),s.jsx("td",{children:s.jsx(h.Button,{loading:t,onClick:d,children:e.labels.exportAllUsersLeads})})]})})]})})]}),s.jsx(Ge,{showToast:r,color:o,message:l,hideToast:()=>i(!1)})]})},RN=({tooltipContent:e="Drag to reorder"})=>{const{attributes:t,listeners:n,ref:r}=y.useContext(Ws);return s.jsx(h.Tooltip,{title:e,placement:"left",arrow:!0,children:s.jsx(h.IconButton,Q(B(B({variant:"plain",color:"neutral",size:"sm",sx:{color:"text.tertiary",my:"auto",mr:1,":hover":{bgcolor:"action.hover"},":active":{bgcolor:"action.selected"},transition:"all 0.2s",cursor:"grab","&:active":{cursor:"grabbing"}}},t),n),{ref:r,children:s.jsx(pb,{})}))})},yb=({id:e,useDraggable:t=!0,variant:n="outlined",item:r,tooltipContent:i})=>{const{attributes:o,isDragging:a,listeners:l,setNodeRef:c,setActivatorNodeRef:u,transform:f,transition:d}=db({id:e}),p=y.useMemo(()=>({attributes:o,listeners:l,ref:u}),[o,l,u]),g={opacity:a?.6:void 0,transform:Kn.Translate.toString(f),transition:d},v=b=>b.split(" ").map(C=>C[0]).join("").toUpperCase().substring(0,2),m=b=>r!=null&&r.color?r.color:`hsl(${b.split("").reduce((x,I)=>I.charCodeAt(0)+((x<<5)-x),0)%360}, 70%, 80%)`;return s.jsx(Ws.Provider,{value:p,children:s.jsx(h.ListItem,{variant:n,ref:c,style:g,endAction:t?s.jsx(RN,{tooltipContent:i}):null,sx:{p:0,borderRadius:"md",overflow:"hidden",transition:"all 0.2s",boxShadow:a?"md":"sm",transform:`scale(${a?1.02:1})`,border:"1px solid",borderColor:"divider"},children:s.jsxs(h.Box,{sx:{display:"flex",width:"100%",alignItems:"center",gap:2,p:0},children:[s.jsx(h.Sheet,{sx:{width:"8px",alignSelf:"stretch",bgcolor:m(r.name)}}),s.jsx(h.Avatar,{src:r.image,alt:r.name,sx:{bgcolor:m(r.name),my:2,ml:1},children:v(r.name)}),s.jsxs(h.Box,{sx:{py:2,pr:2,flexGrow:1,display:"flex",flexDirection:"column",gap:.5},children:[s.jsx(h.Typography,{level:"title-md",children:r.name}),r.description&&s.jsx(h.Typography,{level:"body-sm",sx:{color:"text.secondary",textOverflow:"ellipsis"},children:r.description}),s.jsx(h.Box,{sx:{mt:.5},children:r.type&&s.jsx(h.Chip,{variant:"soft",color:"primary",size:"sm",sx:{px:1,bgcolor:`${m(r.type)}40`},children:r.type})})]})]})})})},MN=({items:e=[],labels:t,setItems:n})=>{const[r,i]=y.useState(null),o=y.useMemo(()=>e.find(l=>l.id===(r==null?void 0:r.id)),[r,e]),a=kv(Ms($s,{activationConstraint:{distance:8}}),Ms(Bs,{coordinateGetter:fb}));return e.length===0?s.jsx(h.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",border:"1px dashed",borderColor:"divider",borderRadius:"md"},children:s.jsx(h.Typography,{level:"body-lg",color:"neutral",children:(t==null?void 0:t.noItemsToDisplay)||"No items to display"})}):s.jsxs(tb,{sensors:a,onDragStart:({active:l})=>{i(l)},onDragEnd:({active:l,over:c})=>{if(c&&l.id!==(c==null?void 0:c.id)){const u=e.findIndex(({id:d})=>d===l.id),f=e.findIndex(({id:d})=>d===c.id);n(Us(e,u,f))}i(null)},onDragCancel:()=>{i(null)},children:[s.jsx(cb,{items:e,children:s.jsx(h.List,{sx:{gap:2,maxHeight:"70vh",overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"action.focus",borderRadius:"4px"}},children:e.map(l=>s.jsx(yb,{id:l.id,variant:"outlined",item:l,tooltipContent:t==null?void 0:t.dragToReorder},`sortable-item-${l.id}`))})}),s.jsx(mb,{children:o?s.jsx(yb,{id:o.id,useDraggable:!1,item:o,tooltipContent:t.dragToReorder},`sortable-overlay-item-${o.id}`):null})]})},LN=({entityType:e,entityId:t,authRequirement:n,labels:r})=>{const i=y.useRef(null),o=y.useRef(null),[a,l]=y.useState(!1),[c,u]=y.useState(!1),[f,d]=y.useState(!1),[p,g]=y.useState(""),[v,m]=y.useState(""),[b,C]=y.useState(""),[w,x]=y.useState(null),[I,S]=y.useState(""),[A,E]=y.useState(""),[k,F]=y.useState(""),[W,O]=y.useState(null),[T,N]=y.useState([]),[H,j]=y.useState("before"),[$,M]=y.useState(!1),[V,Y]=y.useState(""),[X,D]=y.useState(""),[L,U]=y.useState("STANDARD"),[G,oe]=y.useState("left"),[ce,se]=y.useState(!0),[Z,te]=y.useState(!0),[ne,de]=y.useState(!0),[ve,Fe]=y.useState(!0),[st,Je]=y.useState(!0),[vt,he]=y.useState(!1);y.useEffect(()=>{n!=="LEAD"&&l(!1),n!=="REGISTERED"&&u(!1)},[n]);const ge=`
|
|
2475
|
+
`},F$={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 N$(e){let{announcements:t=F$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=$$}=e;const{announce:o,announcement:a}=M$(),l=Po("DndLiveRegion"),[c,u]=y.useState(!1);if(y.useEffect(()=>{u(!0)},[]),L$(y.useMemo(()=>({onDragStart(d){let{active:p}=d;o(t.onDragStart({active:p}))},onDragMove(d){let{active:p,over:g}=d;t.onDragMove&&o(t.onDragMove({active:p,over:g}))},onDragOver(d){let{active:p,over:g}=d;o(t.onDragOver({active:p,over:g}))},onDragEnd(d){let{active:p,over:g}=d;o(t.onDragEnd({active:p,over:g}))},onDragCancel(d){let{active:p,over:g}=d;o(t.onDragCancel({active:p,over:g}))}}),[o,t])),!c)return null;const f=y.createElement(y.Fragment,null,y.createElement(O$,{id:r,value:i.draggable}),y.createElement(R$,{id:l,announcement:a}));return n?yt.createPortal(f,n):f}var wt;(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"})(wt||(wt={}));function Rs(){}function Ms(e,t){return y.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function kv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const mn=Object.freeze({x:0,y:0});function z$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function j$(e,t){const n=Os(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 U$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function V$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function _v(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 Pv(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=_v(t),o=[];for(const a of r){const{id:l}=a,c=n.get(l);if(c){const u=_v(c),f=i.reduce((p,g,v)=>p+z$(u[v],g),0),d=Number((f/4).toFixed(4));o.push({id:l,data:{droppableContainer:a,value:d}})}}return o.sort(U$)};function W$(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 c=t.width*t.height,u=e.width*e.height,f=a*l,d=f/(c+u-f);return Number(d.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 c=W$(l,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(V$)};function Y$(e,t,n){return Q(B({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function Dv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:mn}function K$(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)=>Q(B({},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}),B({},n))}}const q$=K$(1);function Ov(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 Q$(e,t,n){const r=Ov(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:l}=r,c=e.left-a-(1-i)*parseFloat(n),u=e.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const J$={ignoreTransform:!1};function Ai(e,t){t===void 0&&(t=J$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=Ft(e).getComputedStyle(e);u&&(n=Q$(n,u,f))}const{top:r,left:i,width:o,height:a,bottom:l,right:c}=n;return{top:r,left:i,width:o,height:a,bottom:l,right:c}}function Rv(e){return Ai(e,{ignoreTransform:!0})}function X$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Z$(e,t){return t===void 0&&(t=Ft(e).getComputedStyle(e)),t.position==="fixed"}function eF(e,t){t===void 0&&(t=Ft(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 Ls(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Ou(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Eo(i)||Iv(i)||n.includes(i))return n;const o=Ft(e).getComputedStyle(i);return i!==e&&eF(i,o)&&n.push(i),Z$(i,o)?n:r(i.parentNode)}return e?r(e):n}function Mv(e){const[t]=Ls(e,1);return t!=null?t:null}function Mu(e){return!Es||!e?null:wi(e)?e:Du(e)?Ou(e)||e===Si(e).scrollingElement?window:Eo(e)?e:null:null}function Lv(e){return wi(e)?e.scrollX:e.scrollLeft}function Bv(e){return wi(e)?e.scrollY:e.scrollTop}function Lu(e){return{x:Lv(e),y:Bv(e)}}var kt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(kt||(kt={}));function $v(e){return!Es||!e?!1:e===document.scrollingElement}function Fv(e){const t={x:0,y:0},n=$v(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 tF={x:.2,y:.2};function nF(e,t,n,r,i){let{top:o,left:a,right:l,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=tF);const{isTop:u,isBottom:f,isLeft:d,isRight:p}=Fv(e),g={x:0,y:0},v={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(g.y=kt.Backward,v.y=r*Math.abs((t.top+m.height-o)/m.height)):!f&&c>=t.bottom-m.height&&(g.y=kt.Forward,v.y=r*Math.abs((t.bottom-m.height-c)/m.height)),!p&&l>=t.right-m.width?(g.x=kt.Forward,v.x=r*Math.abs((t.right-m.width-l)/m.width)):!d&&a<=t.left+m.width&&(g.x=kt.Backward,v.x=r*Math.abs((t.left+m.width-a)/m.width)),{direction:g,speed:v}}function rF(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 Nv(e){return e.reduce((t,n)=>Ii(t,Lu(n)),mn)}function iF(e){return e.reduce((t,n)=>t+Lv(n),0)}function oF(e){return e.reduce((t,n)=>t+Bv(n),0)}function zv(e,t){if(t===void 0&&(t=Ai),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Mv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const aF=[["x",["left","right"],iF],["y",["top","bottom"],oF]];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=Ls(n),i=Nv(r);this.rect=B({},t),this.width=t.width,this.height=t.height;for(const[o,a,l]of aF)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=l(r),f=i[o]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Oo{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 sF(e){const{EventTarget:t}=Ft(e);return e instanceof t?e:Si(e)}function $u(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(_i(n,2)+_i(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 un;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(un||(un={}));function jv(e){e.preventDefault()}function lF(e){e.stopPropagation()}var Re;(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"})(Re||(Re={}));const Uv={start:[Re.Space,Re.Enter],cancel:[Re.Esc],end:[Re.Space,Re.Enter,Re.Tab]},cF=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Re.Right:return Q(B({},n),{x:n.x+25});case Re.Left:return Q(B({},n),{x:n.x-25});case Re.Down:return Q(B({},n),{y:n.y+25});case Re.Up:return Q(B({},n),{y:n.y-25})}};class Bs{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 Oo(Si(n)),this.windowListeners=new Oo(Ft(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(un.Resize,this.handleCancel),this.windowListeners.add(un.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(un.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&zv(r),n(mn)}handleKeyDown(t){if(Ds(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Uv,coordinateGetter:a=cF,scrollBehavior:l="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:mn;this.referenceCoordinates||(this.referenceCoordinates=f);const d=a(t,{active:n,context:r.current,currentCoordinates:f});if(d){const p=Do(d,f),g={x:0,y:0},{scrollableAncestors:v}=r.current;for(const m of v){const b=t.code,{isTop:C,isRight:w,isLeft:x,isBottom:I,maxScroll:S,minScroll:A}=Fv(m),E=rF(m),k={x:Math.min(b===Re.Right?E.right-E.width/2:E.right,Math.max(b===Re.Right?E.left:E.left+E.width/2,d.x)),y:Math.min(b===Re.Down?E.bottom-E.height/2:E.bottom,Math.max(b===Re.Down?E.top:E.top+E.height/2,d.y))},F=b===Re.Right&&!w||b===Re.Left&&!x,W=b===Re.Down&&!I||b===Re.Up&&!C;if(F&&k.x!==d.x){const O=m.scrollLeft+p.x,T=b===Re.Right&&O<=S.x||b===Re.Left&&O>=A.x;if(T&&!p.y){m.scrollTo({left:O,behavior:l});return}T?g.x=m.scrollLeft-O:g.x=b===Re.Right?m.scrollLeft-S.x:m.scrollLeft-A.x,g.x&&m.scrollBy({left:-g.x,behavior:l});break}else if(W&&k.y!==d.y){const O=m.scrollTop+p.y,T=b===Re.Down&&O<=S.y||b===Re.Up&&O>=A.y;if(T&&!p.x){m.scrollTo({top:O,behavior:l});return}T?g.y=m.scrollTop-O:g.y=b===Re.Down?m.scrollTop-S.y:m.scrollTop-A.y,g.y&&m.scrollBy({top:-g.y,behavior:l});break}}this.handleMove(t,Ii(Do(d,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Bs.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Uv,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 Vv(e){return!!(e&&"distance"in e)}function Hv(e){return!!(e&&"delay"in e)}class Fu{constructor(t,n,r){var i;r===void 0&&(r=sF(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=Si(a),this.documentListeners=new Oo(this.document),this.listeners=new Oo(r),this.windowListeners=new Oo(Ft(a)),this.initialCoordinates=(i=Os(o))!=null?i:mn,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(un.Resize,this.handleCancel),this.windowListeners.add(un.DragStart,jv),this.windowListeners.add(un.VisibilityChange,this.handleCancel),this.windowListeners.add(un.ContextMenu,jv),this.documentListeners.add(un.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Hv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Vv(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(un.Click,lF,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(un.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 c=(n=Os(t))!=null?n:mn,u=Do(i,c);if(!r&&l){if(Vv(l)){if(l.tolerance!=null&&$u(u,l.tolerance))return this.handleCancel();if($u(u,l.distance))return this.handleStart()}if(Hv(l)&&$u(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Re.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const uF={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class $s extends Fu{constructor(t){const{event:n}=t,r=Si(n.target);super(t,uF,r)}}$s.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 dF={move:{name:"mousemove"},end:{name:"mouseup"}};var Nu;(function(e){e[e.RightClick=2]="RightClick"})(Nu||(Nu={}));class fF extends Fu{constructor(t){super(t,dF,Si(t.event.target))}}fF.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Nu.RightClick?!1:(r==null||r({event:n}),!0)}}];const zu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class hF extends Fu{constructor(t){super(t,zu)}static setup(){return window.addEventListener(zu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(zu.move.name,t)};function t(){}}}hF.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 Ro;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ro||(Ro={}));var Fs;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Fs||(Fs={}));function pF(e){let{acceleration:t,activator:n=Ro.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:l=Fs.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:p}=e;const g=mF({delta:d,disabled:!o}),[v,m]=E$(),b=y.useRef({x:0,y:0}),C=y.useRef({x:0,y:0}),w=y.useMemo(()=>{switch(n){case Ro.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ro.DraggableRect:return i}},[n,i,c]),x=y.useRef(null),I=y.useCallback(()=>{const A=x.current;if(!A)return;const E=b.current.x*C.current.x,k=b.current.y*C.current.y;A.scrollBy(E,k)},[]),S=y.useMemo(()=>l===Fs.TreeOrder?[...u].reverse():u,[l,u]);y.useEffect(()=>{if(!o||!u.length||!w){m();return}for(const A of S){if((r==null?void 0:r(A))===!1)continue;const E=u.indexOf(A),k=f[E];if(!k)continue;const{direction:F,speed:W}=nF(A,k,w,t,p);for(const O of["x","y"])g[O][F[O]]||(W[O]=0,F[O]=0);if(W.x>0||W.y>0){m(),x.current=A,v(I,a),b.current=W,C.current=F;return}}b.current={x:0,y:0},C.current={x:0,y:0},m()},[t,I,r,m,o,a,JSON.stringify(w),JSON.stringify(g),v,u,S,f,JSON.stringify(p)])}const gF={x:{[kt.Backward]:!1,[kt.Forward]:!1},y:{[kt.Backward]:!1,[kt.Forward]:!1}};function mF(e){let{delta:t,disabled:n}=e;const r=Ps(t);return _o(i=>{if(n||!r||!i)return gF;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[kt.Backward]:i.x[kt.Backward]||o.x===-1,[kt.Forward]:i.x[kt.Forward]||o.x===1},y:{[kt.Backward]:i.y[kt.Backward]||o.y===-1,[kt.Forward]:i.y[kt.Forward]||o.y===1}}},[n,t,r])}function vF(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return _o(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function bF(e,t){return y.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var Mo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Mo||(Mo={}));var ju;(function(e){e.Optimized="optimized"})(ju||(ju={}));const Wv=new Map;function yF(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=y.useState(null),{frequency:l,measure:c,strategy:u}=i,f=y.useRef(e),d=b(),p=ko(d),g=y.useCallback(function(C){C===void 0&&(C=[]),!p.current&&a(w=>w===null?C:w.concat(C.filter(x=>!w.includes(x))))},[p]),v=y.useRef(null),m=_o(C=>{if(d&&!n)return Wv;if(!C||C===Wv||f.current!==e||o!=null){const w=new Map;for(let x of e){if(!x)continue;if(o&&o.length>0&&!o.includes(x.id)&&x.rect.current){w.set(x.id,x.rect.current);continue}const I=x.node.current,S=I?new Bu(c(I),I):null;x.rect.current=S,S&&w.set(x.id,S)}return w}return C},[e,o,n,d,c]);return y.useEffect(()=>{f.current=e},[e]),y.useEffect(()=>{d||g()},[n,d]),y.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),y.useEffect(()=>{d||typeof l!="number"||v.current!==null||(v.current=setTimeout(()=>{g(),v.current=null},l))},[l,d,g,...r]),{droppableRects:m,measureDroppableContainers:g,measuringScheduled:o!=null};function b(){switch(u){case Mo.Always:return!1;case Mo.BeforeDragging:return n;default:return!n}}}function Uu(e,t){return _o(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function xF(e,t){return Uu(e,t)}function CF(e){let{callback:t,disabled:n}=e;const r=ks(t),i=y.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Ns(e){let{callback:t,disabled:n}=e;const r=ks(t),i=y.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return y.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function wF(e){return new Bu(Ai(e),e)}function Gv(e,t,n){t===void 0&&(t=wF);const[r,i]=y.useState(null);function o(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c!=null?c:n)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const a=CF({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),l=Ns({callback:o});return gn(()=>{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 SF(e){const t=Uu(e);return Dv(e,t)}const Yv=[];function IF(e){const t=y.useRef(e),n=_o(r=>e?r&&r!==Yv&&e&&t.current&&e.parentNode===t.current.parentNode?r:Ls(e):Yv,[e]);return y.useEffect(()=>{t.current=e},[e]),n}function AF(e){const[t,n]=y.useState(null),r=y.useRef(e),i=y.useCallback(o=>{const a=Mu(o.target);a&&n(l=>l?(l.set(a,Lu(a)),new Map(l)):null)},[]);return y.useEffect(()=>{const o=r.current;if(e!==o){a(o);const l=e.map(c=>{const u=Mu(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Lu(u)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{a(e),a(o)};function a(l){l.forEach(c=>{const u=Mu(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),y.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Ii(o,a),mn):Nv(e):mn,[e,t])}function Kv(e,t){t===void 0&&(t=[]);const n=y.useRef(null);return y.useEffect(()=>{n.current=null},t),y.useEffect(()=>{const r=e!==mn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Do(e,n.current):mn}function TF(e){y.useEffect(()=>{if(!Es)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 EF(e,t){return y.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function qv(e){return y.useMemo(()=>e?X$(e):null,[e])}const Qv=[];function kF(e,t){t===void 0&&(t=Ai);const[n]=e,r=qv(n?Ft(n):null),[i,o]=y.useState(Qv);function a(){o(()=>e.length?e.map(c=>$v(c)?r:new Bu(t(c),c)):Qv)}const l=Ns({callback:a});return gn(()=>{l==null||l.disconnect(),a(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),i}function Jv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Eo(t)?t:e}function _F(e){let{measure:t}=e;const[n,r]=y.useState(null),i=y.useCallback(u=>{for(const{target:f}of u)if(Eo(f)){r(d=>{const p=t(f);return d?Q(B({},d),{width:p.width,height:p.height}):p});break}},[t]),o=Ns({callback:i}),a=y.useCallback(u=>{const f=Jv(u);o==null||o.disconnect(),f&&(o==null||o.observe(f)),r(f?t(f):null)},[t,o]),[l,c]=_s(a);return y.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const PF=[{sensor:$s,options:{}},{sensor:Bs,options:{}}],DF={current:{}},zs={draggable:{measure:Rv},droppable:{measure:Rv,strategy:Mo.WhileDragging,frequency:ju.Optimized},dragOverlay:{measure:Ai}};class Lo 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 OF={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Lo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Rs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zs,measureDroppableContainers:Rs,windowRect:null,measuringScheduled:!1},Xv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Rs,draggableNodes:new Map,over:null,measureDroppableContainers:Rs},Bo=y.createContext(Xv),Zv=y.createContext(OF);function RF(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Lo}}}function MF(e,t){switch(t.type){case wt.DragStart:return Q(B({},e),{draggable:Q(B({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case wt.DragMove:return e.draggable.active==null?e:Q(B({},e),{draggable:Q(B({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case wt.DragEnd:case wt.DragCancel:return Q(B({},e),{draggable:Q(B({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case wt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Lo(e.droppable.containers);return i.set(r,n),Q(B({},e),{droppable:Q(B({},e.droppable),{containers:i})})}case wt.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 Lo(e.droppable.containers);return a.set(n,Q(B({},o),{disabled:i})),Q(B({},e),{droppable:Q(B({},e.droppable),{containers:a})})}case wt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Lo(e.droppable.containers);return o.delete(n),Q(B({},e),{droppable:Q(B({},e.droppable),{containers:o})})}default:return e}}function LF(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=y.useContext(Bo),o=Ps(r),a=Ps(n==null?void 0:n.id);return y.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!Ds(o)||document.activeElement===o.target)return;const l=i.get(a);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=P$(f);if(d){d.focus();break}}})}},[r,t,i,a,o]),null}function eb(e,t){let i=t,{transform:n}=i,r=Qe(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(B({transform:o},r)),n):n}function BF(e){return y.useMemo(()=>({draggable:B(B({},zs.draggable),e==null?void 0:e.draggable),droppable:B(B({},zs.droppable),e==null?void 0:e.droppable),dragOverlay:B(B({},zs.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 $F(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=y.useRef(!1),{x:a,y:l}=typeof i=="boolean"?{x:i,y:i}:i;gn(()=>{if(!a&&!l||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=Dv(f,r);if(a||(d.x=0),l||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=Mv(u);p&&p.scrollBy({top:d.y,left:d.x})}},[t,a,l,r,n])}const js=y.createContext(Q(B({},mn),{scaleX:1,scaleY:1}));var dr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(dr||(dr={}));const tb=y.memo(function(t){var n,r,i,o;let en=t,{id:a,accessibility:l,autoScroll:c=!0,children:u,sensors:f=PF,collisionDetection:d=G$,measuring:p,modifiers:g}=en,v=Qe(en,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const m=y.useReducer(MF,void 0,RF),[b,C]=m,[w,x]=B$(),[I,S]=y.useState(dr.Uninitialized),A=I===dr.Initialized,{draggable:{active:E,nodes:k,translate:F},droppable:{containers:W}}=b,O=E!=null?k.get(E):null,T=y.useRef({initial:null,translated:null}),N=y.useMemo(()=>{var bt;return E!=null?{id:E,data:(bt=O==null?void 0:O.data)!=null?bt:DF,rect:T}:null},[E,O]),H=y.useRef(null),[j,$]=y.useState(null),[M,V]=y.useState(null),Y=ko(v,Object.values(v)),X=Po("DndDescribedBy",a),D=y.useMemo(()=>W.getEnabled(),[W]),L=BF(p),{droppableRects:U,measureDroppableContainers:G,measuringScheduled:oe}=yF(D,{dragging:A,dependencies:[F.x,F.y],config:L.droppable}),ce=vF(k,E),se=y.useMemo(()=>M?Os(M):null,[M]),Z=Wt(),te=xF(ce,L.draggable.measure);$F({activeNode:E!=null?k.get(E):null,config:Z.layoutShiftCompensation,initialRect:te,measure:L.draggable.measure});const ne=Gv(ce,L.draggable.measure,te),de=Gv(ce?ce.parentElement:null),ve=y.useRef({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:W,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Fe=W.getNodeFor((n=ve.current.over)==null?void 0:n.id),st=_F({measure:L.dragOverlay.measure}),Je=(r=st.nodeRef.current)!=null?r:ce,vt=A?(i=st.rect)!=null?i:ne:null,he=!!(st.nodeRef.current&&st.rect),ge=SF(he?null:ne),xe=qv(Je?Ft(Je):null),ke=IF(A?Fe!=null?Fe:ce:null),Ye=kF(ke),Oe=eb(g,{transform:{x:F.x-ge.x,y:F.y-ge.y,scaleX:1,scaleY:1},activatorEvent:M,active:N,activeNodeRect:ne,containerNodeRect:de,draggingNodeRect:vt,over:ve.current.over,overlayNodeRect:st.rect,scrollableAncestors:ke,scrollableAncestorRects:Ye,windowRect:xe}),Pe=se?Ii(se,F):null,St=AF(ke),It=Kv(St),Mt=Kv(St,[ne]),_t=Ii(Oe,It),Nt=vt?q$(vt,Oe):null,kn=N&&Nt?d({active:N,collisionRect:Nt,droppableRects:U,droppableContainers:D,pointerCoordinates:Pe}):null,Ei=Pv(kn,"id"),[dn,Mr]=y.useState(null),$o=he?Oe:Ii(Oe,Mt),Fo=Y$($o,(o=dn==null?void 0:dn.rect)!=null?o:null,ne),Ne=y.useRef(null),hr=y.useCallback((bt,P)=>{let{sensor:z,options:q}=P;if(H.current==null)return;const ee=k.get(H.current);if(!ee)return;const ae=bt.nativeEvent,ue=new z({active:H.current,activeNode:ee,event:ae,options:q,context:ve,onAbort(fe){if(!k.get(fe))return;const{onDragAbort:pe}=Y.current,ie={id:fe};pe==null||pe(ie),w({type:"onDragAbort",event:ie})},onPending(fe,Se,pe,ie){if(!k.get(fe))return;const{onDragPending:Lt}=Y.current,lt={id:fe,constraint:Se,initialCoordinates:pe,offset:ie};Lt==null||Lt(lt),w({type:"onDragPending",event:lt})},onStart(fe){const Se=H.current;if(Se==null)return;const pe=k.get(Se);if(!pe)return;const{onDragStart:ie}=Y.current,Ae={activatorEvent:ae,active:{id:Se,data:pe.data,rect:T}};yt.unstable_batchedUpdates(()=>{ie==null||ie(Ae),S(dr.Initializing),C({type:wt.DragStart,initialCoordinates:fe,active:Se}),w({type:"onDragStart",event:Ae}),$(Ne.current),V(ae)})},onMove(fe){C({type:wt.DragMove,coordinates:fe})},onEnd:Ce(wt.DragEnd),onCancel:Ce(wt.DragCancel)});Ne.current=ue;function Ce(fe){return function(){return _(this,null,function*(){const{active:pe,collisions:ie,over:Ae,scrollAdjustedTranslate:Lt}=ve.current;let lt=null;if(pe&&Lt){const{cancelDrop:vn}=Y.current;lt={activatorEvent:ae,active:pe,collisions:ie,delta:Lt,over:Ae},fe===wt.DragEnd&&typeof vn=="function"&&(yield Promise.resolve(vn(lt)))&&(fe=wt.DragCancel)}H.current=null,yt.unstable_batchedUpdates(()=>{C({type:fe}),S(dr.Uninitialized),Mr(null),$(null),V(null),Ne.current=null;const vn=fe===wt.DragEnd?"onDragEnd":"onDragCancel";if(lt){const _n=Y.current[vn];_n==null||_n(lt),w({type:vn,event:lt})}})})}}},[k]),Lr=y.useCallback((bt,P)=>(z,q)=>{const ee=z.nativeEvent,ae=k.get(q);if(H.current!==null||!ae||ee.dndKit||ee.defaultPrevented)return;const ue={active:ae};bt(z,P.options,ue)===!0&&(ee.dndKit={capturedBy:P.sensor},H.current=q,hr(z,P))},[k,hr]),ki=bF(f,Lr);TF(f),gn(()=>{ne&&I===dr.Initializing&&S(dr.Initialized)},[ne,I]),y.useEffect(()=>{const{onDragMove:bt}=Y.current,{active:P,activatorEvent:z,collisions:q,over:ee}=ve.current;if(!P||!z)return;const ae={active:P,activatorEvent:z,collisions:q,delta:{x:_t.x,y:_t.y},over:ee};yt.unstable_batchedUpdates(()=>{bt==null||bt(ae),w({type:"onDragMove",event:ae})})},[_t.x,_t.y]),y.useEffect(()=>{const{active:bt,activatorEvent:P,collisions:z,droppableContainers:q,scrollAdjustedTranslate:ee}=ve.current;if(!bt||H.current==null||!P||!ee)return;const{onDragOver:ae}=Y.current,ue=q.get(Ei),Ce=ue&&ue.rect.current?{id:ue.id,rect:ue.rect.current,data:ue.data,disabled:ue.disabled}:null,fe={active:bt,activatorEvent:P,collisions:z,delta:{x:ee.x,y:ee.y},over:Ce};yt.unstable_batchedUpdates(()=>{Mr(Ce),ae==null||ae(fe),w({type:"onDragOver",event:fe})})},[Ei]),gn(()=>{ve.current={activatorEvent:M,active:N,activeNode:ce,collisionRect:Nt,collisions:kn,droppableRects:U,draggableNodes:k,draggingNode:Je,draggingNodeRect:vt,droppableContainers:W,over:dn,scrollableAncestors:ke,scrollAdjustedTranslate:_t},T.current={initial:vt,translated:Nt}},[N,ce,kn,Nt,k,Je,vt,U,W,dn,ke,_t]),pF(Q(B({},Z),{delta:F,draggingRect:Nt,pointerCoordinates:Pe,scrollableAncestors:ke,scrollableAncestorRects:Ye}));const pr=y.useMemo(()=>({active:N,activeNode:ce,activeNodeRect:ne,activatorEvent:M,collisions:kn,containerNodeRect:de,dragOverlay:st,draggableNodes:k,droppableContainers:W,droppableRects:U,over:dn,measureDroppableContainers:G,scrollableAncestors:ke,scrollableAncestorRects:Ye,measuringConfiguration:L,measuringScheduled:oe,windowRect:xe}),[N,ce,ne,M,kn,de,st,k,W,U,dn,G,ke,Ye,L,oe,xe]),gr=y.useMemo(()=>({activatorEvent:M,activators:ki,active:N,activeNodeRect:ne,ariaDescribedById:{draggable:X},dispatch:C,draggableNodes:k,over:dn,measureDroppableContainers:G}),[M,ki,N,ne,C,X,k,dn,G]);return y.createElement(Ev.Provider,{value:x},y.createElement(Bo.Provider,{value:gr},y.createElement(Zv.Provider,{value:pr},y.createElement(js.Provider,{value:Fo},u)),y.createElement(LF,{disabled:(l==null?void 0:l.restoreFocus)===!1})),y.createElement(N$,Q(B({},l),{hiddenTextDescribedById:X})));function Wt(){const bt=(j==null?void 0:j.autoScrollEnabled)===!1,P=typeof c=="object"?c.enabled===!1:c===!1,z=A&&!bt&&!P;return typeof c=="object"?Q(B({},c),{enabled:z}):{enabled:z}}}),FF=y.createContext(null),nb="button",NF="Draggable";function zF(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=Po(NF),{activators:a,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:p}=y.useContext(Bo),{role:g=nb,roleDescription:v="draggable",tabIndex:m=0}=i!=null?i:{},b=(c==null?void 0:c.id)===t,C=y.useContext(b?js:FF),[w,x]=_s(),[I,S]=_s(),A=EF(a,t),E=ko(n);gn(()=>(d.set(t,{id:t,key:o,node:w,activatorNode:I,data:E}),()=>{const F=d.get(t);F&&F.key===o&&d.delete(t)}),[d,t]);const k=y.useMemo(()=>({role:g,tabIndex:m,"aria-disabled":r,"aria-pressed":b&&g===nb?!0:void 0,"aria-roledescription":v,"aria-describedby":f.draggable}),[r,g,m,b,v,f.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:k,isDragging:b,listeners:r?void 0:A,node:w,over:p,setNodeRef:x,setActivatorNodeRef:S,transform:C}}function rb(){return y.useContext(Zv)}const jF="Droppable",UF={timeout:25};function VF(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=Po(jF),{active:a,dispatch:l,over:c,measureDroppableContainers:u}=y.useContext(Bo),f=y.useRef({disabled:n}),d=y.useRef(!1),p=y.useRef(null),g=y.useRef(null),{disabled:v,updateMeasurementsFor:m,timeout:b}=B(B({},UF),i),C=ko(m!=null?m:r),w=y.useCallback(()=>{if(!d.current){d.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(C.current)?C.current:[C.current]),g.current=null},b)},[b]),x=Ns({callback:w,disabled:v||!a}),I=y.useCallback((k,F)=>{x&&(F&&(x.unobserve(F),d.current=!1),k&&x.observe(k))},[x]),[S,A]=_s(I),E=ko(t);return y.useEffect(()=>{!x||!S.current||(x.disconnect(),d.current=!1,x.observe(S.current))},[S,x]),y.useEffect(()=>(l({type:wt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:S,rect:p,data:E}}),()=>l({type:wt.UnregisterDroppable,key:o,id:r})),[r]),y.useEffect(()=>{n!==f.current.disabled&&(l({type:wt.SetDroppableDisabled,id:r,key:o,disabled:n}),f.current.disabled=n)},[r,o,n,l]),{active:a,rect:p,isOver:(c==null?void 0:c.id)===r,node:S,over:c,setNodeRef:A}}function HF(e){let{animation:t,children:n}=e;const[r,i]=y.useState(null),[o,a]=y.useState(null),l=Ps(n);return!n&&!r&&l&&i(l),gn(()=>{if(!o)return;const c=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(c==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),y.createElement(y.Fragment,null,n,r?y.cloneElement(r,{ref:a}):null)}const WF={x:0,y:0,scaleX:1,scaleY:1};function GF(e){let{children:t}=e;return y.createElement(Bo.Provider,{value:Xv},y.createElement(js.Provider,{value:WF},t))}const YF={position:"fixed",touchAction:"none"},KF=e=>Ds(e)?"transform 250ms ease":void 0,qF=y.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:l,style:c,transform:u,transition:f=KF}=e;if(!l)return null;const d=i?u:Q(B({},u),{scaleX:1,scaleY:1}),p=B(Q(B({},YF),{width:l.width,height:l.height,top:l.top,left:l.left,transform:Kn.Transform.toString(d),transformOrigin:i&&r?j$(r,l):void 0,transition:typeof f=="function"?f(r):f}),c);return y.createElement(n,{className:a,style:p,ref:t},o)}),ib=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[l,c]of Object.entries(o.active))c!==void 0&&(i[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,c));if(o!=null&&o.dragOverlay)for(const[l,c]of Object.entries(o.dragOverlay))c!==void 0&&r.node.style.setProperty(l,c);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[c,u]of Object.entries(i))n.node.style.setProperty(c,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},QF={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Kn.Transform.toString(t)},{transform:Kn.Transform.toString(n)}]},sideEffects:ib({styles:{active:{opacity:"0"}}})};function JF(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return ks((o,a)=>{if(t===null)return;const l=n.get(o);if(!l)return;const c=l.node.current;if(!c)return;const u=Jv(a);if(!u)return;const{transform:f}=Ft(a).getComputedStyle(a),d=Ov(f);if(!d)return;const p=typeof t=="function"?t:XF(t);return zv(c,i.draggable.measure),p({active:{id:o,data:l.data,node:c,rect:i.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}function XF(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=B(B({},QF),e);return o=>{let w=o,{active:a,dragOverlay:l,transform:c}=w,u=Qe(w,["active","dragOverlay","transform"]);if(!t)return;const f={x:l.rect.left-a.rect.left,y:l.rect.top-a.rect.top},d={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/l.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/l.rect.height:1},p=B({x:c.x-f.x,y:c.y-f.y},d),g=i(Q(B({},u),{active:a,dragOverlay:l,transform:{initial:c,final:p}})),[v]=g,m=g[g.length-1];if(JSON.stringify(v)===JSON.stringify(m))return;const b=r==null?void 0:r(B({active:a,dragOverlay:l},u)),C=l.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise(x=>{C.onfinish=()=>{b==null||b(),x()}})}}let ob=0;function ZF(e){return y.useMemo(()=>{if(e!=null)return ob++,ob},[e])}const eN=y.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:l="div",className:c,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:p,containerNodeRect:g,draggableNodes:v,droppableContainers:m,dragOverlay:b,over:C,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:I,windowRect:S}=rb(),A=y.useContext(js),E=ZF(d==null?void 0:d.id),k=eb(a,{activatorEvent:f,active:d,activeNodeRect:p,containerNodeRect:g,draggingNodeRect:b.rect,over:C,overlayNodeRect:b.rect,scrollableAncestors:x,scrollableAncestorRects:I,transform:A,windowRect:S}),F=Uu(p),W=JF({config:r,draggableNodes:v,droppableContainers:m,measuringConfiguration:w}),O=F?b.setRef:void 0;return y.createElement(GF,null,y.createElement(HF,{animation:W},d&&E?y.createElement(qF,{key:E,id:d.id,ref:O,as:l,activatorEvent:f,adjustScale:t,className:c,transition:o,rect:F,style:B({zIndex:u},i),transform:k},n):null))});function Us(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function tN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Vs(e){return e!==null&&e>=0}function nN(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 rN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ab=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=Us(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}},sb="Sortable",lb=y.createContext({activeIndex:-1,containerId:sb,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ab,disabled:{draggable:!1,droppable:!1}});function cb(e){let{children:t,id:n,items:r,strategy:i=ab,disabled:o=!1}=e;const{active:a,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:f}=rb(),d=Po(sb,n),p=l.rect!==null,g=y.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),v=a!=null,m=a?g.indexOf(a.id):-1,b=u?g.indexOf(u.id):-1,C=y.useRef(g),w=!nN(g,C.current),x=b!==-1&&m===-1||w,I=rN(o);gn(()=>{w&&v&&f(g)},[w,g,v,f]),y.useEffect(()=>{C.current=g},[g]);const S=y.useMemo(()=>({activeIndex:m,containerId:d,disabled:I,disableTransforms:x,items:g,overIndex:b,useDragOverlay:p,sortedRects:tN(g,c),strategy:i}),[m,d,I.draggable,I.droppable,x,g,b,c,p,i]);return y.createElement(lb.Provider,{value:S},t)}const iN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return Us(n,r,i).indexOf(t)},oN=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!r||l!==o&&i===a?!1:n?!0:a!==i&&t===c},aN={duration:200,easing:"ease"},ub="transform",sN=Kn.Transition.toString({property:ub,duration:0,easing:"linear"}),lN={roleDescription:"sortable"};function cN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=y.useState(null),l=y.useRef(n);return gn(()=>{if(!t&&n!==l.current&&r.current){const c=i.current;if(c){const u=Ai(r.current,{ignoreTransform:!0}),f={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(f.x||f.y)&&a(f)}}n!==l.current&&(l.current=n)},[t,n,r,i]),y.useEffect(()=>{o&&a(null)},[o]),o}function db(e){let{animateLayoutChanges:t=oN,attributes:n,disabled:r,data:i,getNewIndex:o=iN,id:a,strategy:l,resizeObserverConfig:c,transition:u=aN}=e;const{items:f,containerId:d,activeIndex:p,disabled:g,disableTransforms:v,sortedRects:m,overIndex:b,useDragOverlay:C,strategy:w}=y.useContext(lb),x=uN(r,g),I=f.indexOf(a),S=y.useMemo(()=>B({sortable:{containerId:d,index:I,items:f}},i),[d,i,I,f]),A=y.useMemo(()=>f.slice(f.indexOf(a)),[f,a]),{rect:E,node:k,isOver:F,setNodeRef:W}=VF({id:a,data:S,disabled:x.droppable,resizeObserverConfig:B({updateMeasurementsFor:A},c)}),{active:O,activatorEvent:T,activeNodeRect:N,attributes:H,setNodeRef:j,listeners:$,isDragging:M,over:V,setActivatorNodeRef:Y,transform:X}=zF({id:a,data:S,attributes:B(B({},lN),n),disabled:x.draggable}),D=T$(W,j),L=!!O,U=L&&!v&&Vs(p)&&Vs(b),G=!C&&M,oe=G&&U?X:null,ce=l!=null?l:w,se=U?oe!=null?oe:ce({rects:m,activeNodeRect:N,activeIndex:p,overIndex:b,index:I}):null,Z=Vs(p)&&Vs(b)?o({id:a,items:f,activeIndex:p,overIndex:b}):I,te=O==null?void 0:O.id,ne=y.useRef({activeId:te,items:f,newIndex:Z,containerId:d}),de=f!==ne.current.items,ve=t({active:O,containerId:d,isDragging:M,isSorting:L,id:a,index:I,items:f,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:u,wasDragging:ne.current.activeId!=null}),Fe=cN({disabled:!ve,index:I,node:k,rect:E});return y.useEffect(()=>{L&&ne.current.newIndex!==Z&&(ne.current.newIndex=Z),d!==ne.current.containerId&&(ne.current.containerId=d),f!==ne.current.items&&(ne.current.items=f)},[L,Z,d,f]),y.useEffect(()=>{if(te===ne.current.activeId)return;if(te!=null&&ne.current.activeId==null){ne.current.activeId=te;return}const Je=setTimeout(()=>{ne.current.activeId=te},50);return()=>clearTimeout(Je)},[te]),{active:O,activeIndex:p,attributes:H,data:S,rect:E,index:I,newIndex:Z,items:f,isOver:F,isSorting:L,isDragging:M,listeners:$,node:k,overIndex:b,over:V,setNodeRef:D,setActivatorNodeRef:Y,setDroppableNodeRef:W,setDraggableNodeRef:j,transform:Fe!=null?Fe:se,transition:st()};function st(){if(Fe||de&&ne.current.newIndex===I)return sN;if(!(G&&!Ds(T)||!u)&&(L||ve))return Kn.Transition.toString(Q(B({},u),{property:ub}))}}function uN(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 Hs(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 dN=[Re.Down,Re.Right,Re.Up,Re.Left],fb=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:l}}=t;if(dN.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];o.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=i.get(d.id);if(p)switch(e.code){case Re.Down:r.top<p.top&&c.push(d);break;case Re.Up:r.top>p.top&&c.push(d);break;case Re.Left:r.left>p.left&&c.push(d);break;case Re.Right:r.left<p.left&&c.push(d);break}});const u=H$({active:n,collisionRect:r,droppableRects:i,droppableContainers:c,pointerCoordinates:null});let f=Pv(u,"id");if(f===(a==null?void 0:a.id)&&u.length>1&&(f=u[1].id),f!=null){const d=o.get(n.id),p=o.get(f),g=p?i.get(p.id):null,v=p==null?void 0:p.node.current;if(v&&g&&d&&p){const b=Ls(v).some((A,E)=>l[E]!==A),C=hb(d,p),w=fN(d,p),x=b||!C?{x:0,y:0}:{x:w?r.width-g.width:0,y:w?r.height-g.height:0},I={x:g.left,y:g.top};return x.x&&x.y?I:Do(I,x)}}}};function hb(e,t){return!Hs(e)||!Hs(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function fN(e,t){return!Hs(e)||!Hs(t)||!hb(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const pb=Be(s.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"),Ws=y.createContext({attributes:{},listeners:void 0,ref(){}}),hN=()=>{const{attributes:e,listeners:t,ref:n}=y.useContext(Ws);return s.jsx(h.Button,Q(B(B({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:s.jsx(pb,{})}))},gb=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:l,listeners:c,setNodeRef:u,setActivatorNodeRef:f,transform:d,transition:p}=db({id:t}),g=y.useMemo(()=>({attributes:a,listeners:c,ref:f}),[a,c,f]),v={opacity:l?.6:void 0,transform:Kn.Translate.toString(d),transition:p};return s.jsx(Ws.Provider,{value:g,children:s.jsx(h.ListItem,{variant:o,ref:u,style:v,startAction:i?s.jsx(hN,{}):s.jsx(s.Fragment,{}),endAction:i?s.jsx(h.Tooltip,{title:n,children:s.jsx(h.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:s.jsx(_e.Remove,{})})}):s.jsx(s.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},pN={sideEffects:ib({styles:{active:{opacity:"0.6"}}})},mb=({children:e})=>s.jsx(eN,{dropAnimation:pN,children:e}),gN=({entities:e=[],labels:t,disabled:n,setEntities:r,removeItem:i})=>{const[o,a]=y.useState(null),l=y.useMemo(()=>e.find(u=>u.id===(o==null?void 0:o.id)),[o,e]),c=kv(Ms($s),Ms(Bs,{coordinateGetter:fb}));return s.jsxs(tb,{sensors:c,onDragStart:({active:u})=>{a(u)},onDragEnd:({active:u,over:f})=>{if(f&&u.id!==(f==null?void 0:f.id)){const d=e.findIndex(({id:g})=>g===u.id),p=e.findIndex(({id:g})=>g===f.id);r(Us(e,d,p))}a(null)},onDragCancel:()=>{a(null)},children:[s.jsx(cb,{items:e,children:s.jsx(h.List,{sx:{gap:"10px",padding:0},children:e.map(u=>s.jsxs(gb,{id:u.id,variant:"outlined",removeItem:()=>i(u.id),tooltipTitle:t.removeEntity,useDraggable:!n,children:[s.jsx(h.Typography,{ml:n?0:2.5,children:u.title||u.name}),u.type&&s.jsx(h.Chip,{color:RB(u.type),sx:{marginLeft:2,marginRight:4},children:MB(u.type)})]},`sortable-item-${u.id}`))})}),s.jsx(mb,{children:l?s.jsx(s.Fragment,{children:e.map(u=>s.jsx(gb,{id:u.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${u.id}`))}):s.jsx(s.Fragment,{})})]})},mN=({labels:e,value:t,options:n,size:r="sm",disabled:i=!1,sx:o={},onChange:a})=>s.jsxs(h.FormControl,{size:r,disabled:i,children:[s.jsx(h.FormLabel,{children:e.itemsPerPage}),s.jsx(h.Select,{value:t,size:r,onChange:a,sx:Q(B({},o),{minHeight:"37px"}),children:n.map((l,c)=>s.jsx(h.Option,{value:l,children:l},`items-per-page-${l}-${c}`))})]}),vN=(e,t)=>{const[n,r]=y.useState(null),{sdk:i}=We(),o=()=>_(this,null,function*(){let l=[];if(!e){r(l);return}try{switch(e){case"top_x":l=(yield i.topX.getGames({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":l=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"template":l=(yield i.loyalty.getTemplates(void 0,!0)).data.map(C=>({id:C.id,name:C.name,status:C.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":l=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"personality_quiz":l=(yield i.miniGames.getPersonalityQuizzes({limit:50},!1,!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"either_or":l=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"poll":l=(yield i.voting.getPolls({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"bracket":l=(yield i.bracketGame.getGames({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break;case"standing":l=(yield i.standingGame.getGames({limit:50},!0)).data.map(C=>({id:C.id,name:C.title,status:C.status,type:e,relationship:"relatedTo"}));break}}catch(c){console.error(c),r(l),t();return}r(l)});return y.useEffect(()=>(o(),()=>r(null)),[e]),n},bN=({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 s.jsx(h.Chip,{color:t,variant:"solid",size:"sm",children:e})},yN=Be(s.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"),xN=Be(s.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"),CN=Be(s.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"),wN=Be(s.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),SN=Be(s.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"),IN=e=>{switch(e.entityType){case"top_x":return s.jsx(h.Tooltip,{title:"Top X",children:s.jsx(yN,{})});case"match_quiz":return s.jsx(h.Tooltip,{title:"Match Quiz",children:s.jsx(xN,{})});case"template":return s.jsx(h.Tooltip,{title:"Leaderboard Templates",children:s.jsx(_e.EmojiEvents,{})});case"classic_quiz":return s.jsx(h.Tooltip,{title:"Classic Quiz",children:s.jsx(CN,{})});case"either_or":return s.jsx(h.Tooltip,{title:"Either/Or",children:s.jsx(wN,{})});case"poll":return s.jsx(h.Tooltip,{title:"Poll",children:s.jsx(SN,{})});case"bracket":return s.jsx(h.Tooltip,{title:"Custom Bracket Game",children:s.jsx(_e.EmojiEvents,{})});case"standing":return s.jsx(h.Tooltip,{title:"Custom Standings Game",children:s.jsx(_e.EmojiEvents,{})});default:return null}},vb=({entity:e,deleteLabel:t,onDelete:n})=>s.jsx(s.Fragment,{children:s.jsx(h.Card,{sx:{p:2,mb:2},children:s.jsx(h.CardContent,{children:s.jsxs(h.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[s.jsx(h.Typography,{fontSize:"sm",startDecorator:s.jsx(IN,{entityType:e.type}),children:e.name}),s.jsx(h.Box,{display:{xs:"none",md:"block"},children:s.jsx(bN,{status:e.status})}),s.jsx(h.Box,{children:s.jsx(h.Tooltip,{title:t,children:s.jsx(h.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:s.jsx(_e.Delete,{})})})})]})})})}),AN=(e,t,n,r)=>_(this,null,function*(){let o=[];const a=new Map;t.forEach(l=>{if(a.has(l.entity_type)){const c=a.get(l.entity_type);a.set(l.entity_type,[...c,[l.entity_id,l.entity_relationship]])}else a.set(l.entity_type,[[l.entity_id,l.entity_relationship]])});try{for(const[l,c]of a)switch(l){case"top_x":const u=c.map(([O])=>O),f=yield e.topX.getGames({limit:u.length,gameIds:u},!0);o=[...o,...f.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"match_quiz":const d=c.map(([O])=>O),p=yield e.matchQuiz.getGames({limit:d.length,gameIds:d},!0);o=[...o,...p.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"template":const g=c.map(([O])=>O),v=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...v.data.filter(O=>g.includes(O.id)).map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"classic_quiz":const m=c.map(([O])=>O),b=yield e.miniGames.getClassicQuizzes({limit:m.length,classicQuizIds:m},!1,!0);o=[...o,...b.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"personality_quiz":const C=c.map(([O])=>O),w=yield e.miniGames.getPersonalityQuizzes({limit:C.length,personalityQuizIds:C},!1,!0);o=[...o,...w.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"either_or":const x=c.map(([O])=>O),I=yield e.miniGames.getEitherOrs({limit:x.length,eitherOrIds:x},!1,!0);o=[...o,...I.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"poll":const S=c.map(([O])=>O),A=yield e.voting.getPolls({limit:S.length,pollIds:S},!0);o=[...o,...A.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"bracket":const E=c.map(([O])=>O),k=yield e.bracketGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,...k.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;case"standing":const F=c.map(([O])=>O),W=yield e.standingGame.getGames({limit:F.length,gameIds:F},!0);o=[...o,...W.data.map(O=>{var N;const T=((N=c.find(([H])=>H===O.id))==null?void 0:N[1])||"relatedTo";return{id:O.id,name:O.title,status:O.status,type:l,relationship:T}})];break;default:}}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),TN=["top_x","match_quiz","template","classic_quiz","personality_quiz","poll","either_or","bracket","standing"],EN=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],kN=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic Quiz").set("personality_quiz","Personality Quiz").set("either_or","Either/Or").set("match_quiz","Match Quiz").set("top_x","Top X").set("bracket","Custom Bracket Game").set("standing","Custom Standing Game").set("poll","Poll"),bb=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"),_N=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState(""),[l,c]=y.useState(null),[u,f]=y.useState("relatedTo"),[d,p]=y.useState(!1),g=()=>p(!d),v=vN(l,g),{sdk:m}=We();y.useEffect(()=>(e.length>0&&AN(m,e,i,g),()=>{i([]),a(""),c(null),f("relatedTo")}),[]);const b=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===u)){a("");return}const S=[...e,{entity_id:o,entity_type:l,entity_relationship:u}],A=(v==null?void 0:v.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:l,status:E.status,relationship:u})))||[];i([...r,...A]),t(S),a("")},C=(I,S)=>{const A=e.filter(k=>!(k.entity_id===I&&k.entity_relationship===S)),E=r.filter(k=>!(k.id===I&&k.relationship===S));i(E),t(A)},w=r.reduce((I,S)=>{const A=S.relationship;return I[A]||(I[A]=[]),I[A].push(S),I},{}),x=Object.keys(w).sort();return s.jsxs(s.Fragment,{children:[x.map(I=>s.jsxs(h.Box,{sx:{mb:2},children:[s.jsx(h.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:s.jsx(h.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:bb.get(I)||"Unknown relationship"})}),w[I].map((S,A)=>s.jsx(vb,{entity:S,deleteLabel:n.delete,onDelete:C},`related-entity-relationship-${S.id}-${A}`))]},`relationship-group-${I}`)),s.jsxs(h.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.type}),s.jsx(h.Select,{value:l,size:"sm",name:"entity_type",onChange:(I,S)=>c(S),sx:{minHeight:"37px"},children:TN.map(I=>s.jsx(h.Option,{value:I,children:kN.get(I)},`entity-type-option-${I}`))})]}),s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.relationship}),s.jsx(h.Select,{value:u,size:"sm",name:"entity_relationship",onChange:(I,S)=>f(S),sx:{minHeight:"37px"},children:EN.map(I=>s.jsx(h.Option,{value:I,children:bb.get(I)},`entity-relationship-option-${I}`))})]}),s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.entity}),s.jsx(h.Select,{value:o,size:"sm",name:"entity_id",onChange:(I,S)=>a(S),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!v&&s.jsx(h.CircularProgress,{size:"sm"}),children:v&&v.map(I=>s.jsx(h.Option,{value:I.id,children:I.name},`entity--${I.id}`))})]}),s.jsx(h.Button,{startDecorator:s.jsx(_e.Add,{}),disabled:!o||!l,onClick:b,sx:{mb:1},children:n.add})]}),s.jsx(Ge,{showToast:d,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:g})]})},PN=(e,t,n,r)=>_(this,null,function*(){let o=[];const a=t.filter(l=>l.entity_type==="classic_quiz"&&l.entity_relationship==="bonusPointsGame").map(l=>[l.entity_id,l.entity_relationship]);if(a.length===0){n([]);return}try{const l=a.map(([u])=>u);o=(yield e.miniGames.getClassicQuizzes({limit:l.length,classicQuizIds:l},!1,!0)).data.map(u=>{var d;const f=((d=a.find(([p])=>p===u.id))==null?void 0:d[1])||"bonusPointsGame";return{id:u.id,name:u.title,status:u.status,type:"classic_quiz",relationship:f}})}catch(l){console.error("Error loading related entities",l),n(o),r()}n(o)}),DN=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState(""),[l,c]=y.useState(null),[u,f]=y.useState(!1),d=()=>f(!u),{sdk:p}=We();y.useEffect(()=>(e.length>0&&PN(p,e,i,d),()=>{i([]),a("")}),[]),y.useEffect(()=>(_(this,null,function*(){try{const w=(yield p.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(x=>({id:x.id,name:x.title,status:x.status,type:"classic_quiz",relationship:"bonusPointsGame"}));c(w)}catch(C){console.error(C),c([]),d()}}),()=>c(null)),[]);const g=()=>{if(e.some(w=>w.entity_id===o&&w.entity_relationship==="bonusPointsGame")){a("");return}const b=[...e,{entity_id:o,entity_type:"classic_quiz",entity_relationship:"bonusPointsGame"}],C=(l==null?void 0:l.filter(w=>w.id===o).map(w=>({id:w.id,name:w.name,type:"classic_quiz",status:w.status,relationship:"bonusPointsGame"})))||[];i([...r,...C]),t(b),a("")},v=(m,b)=>{const C=e.filter(x=>!(x.entity_id===m&&x.entity_relationship===b)),w=r.filter(x=>!(x.id===m&&x.relationship===b));i(w),t(C)};return s.jsxs(s.Fragment,{children:[r.length>0&&s.jsxs(h.Box,{sx:{mb:2},children:[s.jsx(h.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:s.jsx(h.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:"Bonus points game"})}),r.map((m,b)=>s.jsx(vb,{entity:m,deleteLabel:n.delete,onDelete:v},`related-entity-relationship-${m.id}-${b}`))]}),s.jsxs(h.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.type}),s.jsx(h.Input,{value:"Classic Quiz",readOnly:!0,disabled:!0,size:"sm",sx:{minHeight:"37px"}})]}),s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.relationship}),s.jsx(h.Input,{value:"Bonus Points Game",readOnly:!0,disabled:!0,size:"sm",sx:{minHeight:"37px"}})]}),s.jsxs(h.FormControl,{children:[s.jsx(h.FormLabel,{required:!0,color:"primary",children:n.entity}),s.jsx(h.Select,{value:o,size:"sm",name:"entity_id",onChange:(m,b)=>a(b),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!l&&s.jsx(h.CircularProgress,{size:"sm"}),children:l&&l.map(m=>s.jsx(h.Option,{value:m.id,children:m.name},`entity--${m.id}`))})]}),s.jsx(h.Button,{startDecorator:s.jsx(_e.Add,{}),disabled:!o,onClick:g,sx:{mb:1},children:n.add})]}),s.jsx(Ge,{showToast:u,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:d})]})},ON=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(!1),[o,a]=y.useState("success"),[l,c]=y.useState(""),u=y.useContext(fa),f=(p,g)=>{a(p),c(g),i(!0)},d=()=>_(this,null,function*(){n(!0);const p=yield u==null?void 0:u.https.exportLeadsPerEntity(e.entityId);if(p!=null&&p.ok){const g=yield p.blob(),v=URL.createObjectURL(g),m=document.createElement("a");m.href=v,m.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(v),n(!1),f("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield p==null?void 0:p.json()),n(!1),f("danger",e.labels.usersLeadsExportErrorMessage)});return s.jsxs(s.Fragment,{children:[s.jsxs(h.Box,{mb:2,children:[s.jsx(h.Box,{display:"flex",alignItems:"center",mb:1,children:s.jsx(h.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),s.jsx(h.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:s.jsxs(h.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:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:e.labels.category}),s.jsx("th",{children:e.labels.action})]})}),s.jsx("tbody",{children:s.jsxs("tr",{children:[s.jsxs("td",{children:[s.jsx(h.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),s.jsx(h.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),s.jsx("td",{children:s.jsx(h.Button,{loading:t,onClick:d,children:e.labels.exportAllUsersLeads})})]})})]})})]}),s.jsx(Ge,{showToast:r,color:o,message:l,hideToast:()=>i(!1)})]})},RN=({tooltipContent:e="Drag to reorder"})=>{const{attributes:t,listeners:n,ref:r}=y.useContext(Ws);return s.jsx(h.Tooltip,{title:e,placement:"left",arrow:!0,children:s.jsx(h.IconButton,Q(B(B({variant:"plain",color:"neutral",size:"sm",sx:{color:"text.tertiary",my:"auto",mr:1,":hover":{bgcolor:"action.hover"},":active":{bgcolor:"action.selected"},transition:"all 0.2s",cursor:"grab","&:active":{cursor:"grabbing"}}},t),n),{ref:r,children:s.jsx(pb,{})}))})},yb=({id:e,useDraggable:t=!0,variant:n="outlined",item:r,tooltipContent:i})=>{const{attributes:o,isDragging:a,listeners:l,setNodeRef:c,setActivatorNodeRef:u,transform:f,transition:d}=db({id:e}),p=y.useMemo(()=>({attributes:o,listeners:l,ref:u}),[o,l,u]),g={opacity:a?.6:void 0,transform:Kn.Translate.toString(f),transition:d},v=b=>b.split(" ").map(C=>C[0]).join("").toUpperCase().substring(0,2),m=b=>r!=null&&r.color?r.color:`hsl(${b.split("").reduce((x,I)=>I.charCodeAt(0)+((x<<5)-x),0)%360}, 70%, 80%)`;return s.jsx(Ws.Provider,{value:p,children:s.jsx(h.ListItem,{variant:n,ref:c,style:g,endAction:t?s.jsx(RN,{tooltipContent:i}):null,sx:{p:0,borderRadius:"md",overflow:"hidden",transition:"all 0.2s",boxShadow:a?"md":"sm",transform:`scale(${a?1.02:1})`,border:"1px solid",borderColor:"divider"},children:s.jsxs(h.Box,{sx:{display:"flex",width:"100%",alignItems:"center",gap:2,p:0},children:[s.jsx(h.Sheet,{sx:{width:"8px",alignSelf:"stretch",bgcolor:m(r.name)}}),s.jsx(h.Avatar,{src:r.image,alt:r.name,sx:{bgcolor:m(r.name),my:2,ml:1},children:v(r.name)}),s.jsxs(h.Box,{sx:{py:2,pr:2,flexGrow:1,display:"flex",flexDirection:"column",gap:.5},children:[s.jsx(h.Typography,{level:"title-md",children:r.name}),r.description&&s.jsx(h.Typography,{level:"body-sm",sx:{color:"text.secondary",textOverflow:"ellipsis"},children:r.description}),s.jsx(h.Box,{sx:{mt:.5},children:r.type&&s.jsx(h.Chip,{variant:"soft",color:"primary",size:"sm",sx:{px:1,bgcolor:`${m(r.type)}40`},children:r.type})})]})]})})})},MN=({items:e=[],labels:t,setItems:n})=>{const[r,i]=y.useState(null),o=y.useMemo(()=>e.find(l=>l.id===(r==null?void 0:r.id)),[r,e]),a=kv(Ms($s,{activationConstraint:{distance:8}}),Ms(Bs,{coordinateGetter:fb}));return e.length===0?s.jsx(h.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",border:"1px dashed",borderColor:"divider",borderRadius:"md"},children:s.jsx(h.Typography,{level:"body-lg",color:"neutral",children:(t==null?void 0:t.noItemsToDisplay)||"No items to display"})}):s.jsxs(tb,{sensors:a,onDragStart:({active:l})=>{i(l)},onDragEnd:({active:l,over:c})=>{if(c&&l.id!==(c==null?void 0:c.id)){const u=e.findIndex(({id:d})=>d===l.id),f=e.findIndex(({id:d})=>d===c.id);n(Us(e,u,f))}i(null)},onDragCancel:()=>{i(null)},children:[s.jsx(cb,{items:e,children:s.jsx(h.List,{sx:{gap:2,maxHeight:"70vh",overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"action.focus",borderRadius:"4px"}},children:e.map(l=>s.jsx(yb,{id:l.id,variant:"outlined",item:l,tooltipContent:t==null?void 0:t.dragToReorder},`sortable-item-${l.id}`))})}),s.jsx(mb,{children:o?s.jsx(yb,{id:o.id,useDraggable:!1,item:o,tooltipContent:t.dragToReorder},`sortable-overlay-item-${o.id}`):null})]})},LN=({entityType:e,entityId:t,authRequirement:n,labels:r})=>{const i=y.useRef(null),o=y.useRef(null),[a,l]=y.useState(!1),[c,u]=y.useState(!1),[f,d]=y.useState(!1),[p,g]=y.useState(""),[v,m]=y.useState(""),[b,C]=y.useState(""),[w,x]=y.useState(null),[I,S]=y.useState(""),[A,E]=y.useState(""),[k,F]=y.useState(""),[W,O]=y.useState(null),[T,N]=y.useState([]),[H,j]=y.useState("before"),[$,M]=y.useState(!1),[V,Y]=y.useState(""),[X,D]=y.useState(""),[L,U]=y.useState("STANDARD"),[G,oe]=y.useState("left"),[ce,se]=y.useState(!0),[Z,te]=y.useState(!0),[ne,de]=y.useState(!0),[ve,Fe]=y.useState(!0),[st,Je]=y.useState(!0),[vt,he]=y.useState(!1);y.useEffect(()=>{n!=="LEAD"&&l(!1),n!=="REGISTERED"&&u(!1)},[n]);const ge=`
|
|
2476
2476
|
data-content-type="${e}"`,xe=`
|
|
2477
2477
|
data-content-id="${t}"`,ke=T.length>0?`
|
|
2478
2478
|
data-lead-fields="${T.join(", ")}"`:"",Ye=a?`
|
|
@@ -2496,7 +2496,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2496
2496
|
data-additional-cta-url="${k}"`:"",pr=f&&W?`
|
|
2497
2497
|
data-additional-cta-target="${W}"`:"",gr=`<div
|
|
2498
2498
|
data-component="fu-widget"${ge}${xe}${kn}${Ei}${dn}${Mr}${$o}${Fo}${Ne}${ke}${Ye}${Oe}${Pe}${St}${It}${Mt}${_t}${Nt}${hr}${Lr}${ki}${pr}
|
|
2499
|
-
></div>`,Wt={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},
|
|
2499
|
+
></div>`,Wt={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},en=({title:ie})=>s.jsx(h.Tooltip,{title:ie,sx:{maxWidth:300},children:s.jsx(Jt,{color:"primary"})}),bt=()=>e!=="either-or"?s.jsx(s.Fragment,{}):s.jsxs(h.Box,{mb:1.5,children:[s.jsxs(h.FormControl,{sx:{mb:1.5},children:[s.jsx(h.FormLabel,{color:"primary",children:r.layoutTemplate}),s.jsxs(h.Select,{value:L,size:"md",name:"layout_template",onChange:fe,children:[s.jsx(h.Option,{value:"STANDARD",children:"Standard"}),s.jsx(h.Option,{value:"SPLIT",children:"Split"}),s.jsx(h.Option,{value:"OVERLAY",children:"Overlay"})]}),s.jsx(h.FormHelperText,{children:r.layoutTemplateDescription})]}),s.jsxs(h.FormControl,{sx:{mb:1.5},children:[s.jsx(h.FormLabel,{color:"primary",children:r.imagePosition}),s.jsxs(h.Select,{value:G,size:"md",name:"image_position",disabled:L!=="STANDARD",onChange:(ie,Ae)=>oe(Ae),children:[s.jsx(h.Option,{value:"left",children:"Left"}),s.jsx(h.Option,{value:"right",children:"Right"})]}),s.jsx(h.FormHelperText,{children:r.imagePositionDescription})]})]}),P=()=>e==="classic-quiz"||e==="personality-quiz"?s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:ce,label:r.showAnswerExplanations,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{se(ie)}}),s.jsx(h.Tooltip,{title:r.showAnswerExplanationsTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}):e==="match-quiz"||e==="event-game"?s.jsxs(s.Fragment,{children:[s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:Z,label:r.showPredictionDetails||"",labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{te(ie)}}),s.jsx(h.Tooltip,{title:r.showPredictionDetailsTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:ne,label:r.showCountdown||"",labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{de(ie)}}),s.jsx(h.Tooltip,{title:r.showCountdownTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:st,label:r.showPoints||"",labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{Je(ie)}}),s.jsx(h.Tooltip,{title:r.showPointsTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),e==="match-quiz"&&s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:ve,label:r.showTeamLabels||"",labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{Fe(ie)}}),s.jsx(h.Tooltip,{title:r.showTeamLabelsTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]})]}):s.jsx(s.Fragment,{}),z=()=>e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Box,{display:"flex",mb:1.5,alignItems:"center",children:[s.jsx(pn,{defaultValue:a,label:r.configureLeads,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="LEAD",onChange:ie=>{ie===!1&&(N([]),j("before")),l(ie)}}),n!=="LEAD"&&s.jsx(h.Tooltip,{title:r.configureLeadsDisabledMessage,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),q=()=>!a||e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Card,{sx:{mb:1.5},children:[s.jsx(Or,{label:"",values:T,allValues:Object.keys(Wt),valuesMap:Wt,onChange:ie=>N(ie)}),s.jsxs(h.FormControl,{sx:{mb:2},children:[s.jsx(h.FormLabel,{color:"primary",children:r.leadPosition}),s.jsxs(h.Select,{value:H,size:"md",name:"lead_position",onChange:(ie,Ae)=>j(Ae==="before"?"before":"after"),children:[s.jsx(h.Option,{value:"before",children:"Before"}),s.jsx(h.Option,{value:"after",children:"After"})]})]}),s.jsxs(h.FormControl,{sx:{mb:2},children:[s.jsx(h.Checkbox,{label:r.syncWithProfile,checked:vt,onChange:ie=>he(ie.target.checked)}),s.jsx(h.FormHelperText,{children:r.syncWithProfileDescription})]})]}),ee=()=>e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Box,{display:"flex",mb:1.5,alignItems:"center",children:[s.jsx(pn,{defaultValue:c,label:r.configureSignIn,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="REGISTERED",onChange:ie=>{ie===!1&&(g(""),m("")),u(ie)}}),n!=="REGISTERED"&&s.jsx(h.Tooltip,{title:r.configureSignInDisabledMessage,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),ae=()=>!c||e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Card,{sx:{mb:1.5},children:[s.jsx(Ot,{label:r.signInLabel,placeholder:"",defaultValue:"",value:p,required:!1,size:"md",endDecorator:s.jsx(en,{title:r.signInLabelInfoMessage}),onChange:ie=>g(ie.target.value)}),s.jsx(Ot,{label:r.authenticationHandler,placeholder:"",defaultValue:v,value:"",required:!1,size:"md",endDecorator:s.jsx(en,{title:r.authenticationHandlerInfoMessage}),onChange:ie=>m(ie.target.value)}),s.jsx(Ot,{label:r.signInUrl,placeholder:"",defaultValue:b,value:"",required:!1,size:"md",endDecorator:s.jsx(en,{title:r.signInUrlInfoMessage}),onChange:ie=>C(ie.target.value)}),s.jsxs(h.FormControl,{sx:{mb:2},children:[s.jsx(h.FormLabel,{color:"primary",children:r.signInTarget}),s.jsxs(h.Select,Q(B({action:i,value:w,size:"md",name:"signin_cta_target",onChange:(ie,Ae)=>x(Ae),sx:{flex:1}},w&&{endDecorator:s.jsx(h.IconButton,{variant:"plain",color:"neutral",onMouseDown:ie=>{ie.stopPropagation()},onClick:()=>{var ie;x(null),(ie=i.current)==null||ie.focusVisible()},sx:{width:"18px",height:"18px"},children:s.jsx(As,{})}),indicator:null}),{children:[s.jsx(h.Option,{value:"_blank",children:"Opens URL in a new tab"}),s.jsx(h.Option,{value:"_self",children:"Opens URL in the same tab"})]}))]})]}),ue=()=>e==="event-game"?s.jsx(s.Fragment,{}):s.jsx(pn,{sx:{label:{mb:1.5}},defaultValue:$,label:r.addCampaignInfo,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{ie===!1&&(Y(""),D("")),M(ie)}}),Ce=()=>!$||e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Card,{sx:{mb:1.5},children:[s.jsx(Ot,{label:r.id,placeholder:"",defaultValue:V,required:!1,size:"md",endDecorator:s.jsx(en,{title:r.campaignIdInfoMessage}),onChange:ie=>Y(ie.target.value)}),s.jsx(Ot,{label:r.name,placeholder:"",defaultValue:X,required:!1,size:"md",endDecorator:s.jsx(en,{title:r.campaignNameInfoMessage}),onChange:ie=>D(ie.target.value)})]}),fe=(ie,Ae)=>{U(Ae),oe(Ae!=="STANDARD"?null:"left")},Se=()=>s.jsxs(h.Box,{display:"flex",mb:1.5,alignItems:"center",children:[s.jsx(pn,{defaultValue:f,label:r.configureAdditionalCta,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{ie===!1&&(S(""),E("")),d(ie)}}),s.jsx(h.Tooltip,{title:r.configureAdditionalCtaTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),pe=()=>f?s.jsxs(h.Card,{sx:{mb:1.5},children:[s.jsx(Ot,{label:r.additionalCtaLabel,placeholder:"",defaultValue:"",value:I,required:!1,size:"md",endDecorator:s.jsx(en,{title:r.additionalCtaLabelInfoMessage}),onChange:ie=>S(ie.target.value)}),s.jsx(Ot,{label:r.additionalCtaHandler,placeholder:"",defaultValue:A,value:"",required:!1,size:"md",endDecorator:s.jsx(en,{title:r.additionalCtaHandlerInfoMessage}),onChange:ie=>E(ie.target.value)}),s.jsx(Ot,{label:r.additionalCtaUrl,placeholder:"",defaultValue:k,value:"",required:!1,size:"md",endDecorator:s.jsx(en,{title:r.additionalCtaUrlInfoMessage}),onChange:ie=>F(ie.target.value)}),s.jsxs(h.FormControl,{sx:{mb:2},children:[s.jsx(h.FormLabel,{color:"primary",children:r.additionalCtaTarget}),s.jsxs(h.Select,Q(B({action:o,value:W,size:"md",name:"additional_cta_target",onChange:(ie,Ae)=>O(Ae),sx:{flex:1}},W&&{endDecorator:s.jsx(h.IconButton,{variant:"plain",color:"neutral",onMouseDown:ie=>{ie.stopPropagation()},onClick:()=>{var ie;O(null),(ie=o.current)==null||ie.focusVisible()},sx:{width:"18px",height:"18px"},children:s.jsx(As,{})}),indicator:null}),{children:[s.jsx(h.Option,{value:"_blank",children:"Opens the provided URL in a new tab"}),s.jsx(h.Option,{value:"_self",children:"Opens the provided URL in the same tab"})]}))]})]}):s.jsx(s.Fragment,{});return s.jsxs(h.Box,{mt:1,children:[bt(),P(),z(),q(),ee(),ae(),ue(),Ce(),Se(),pe(),s.jsxs(h.Box,{position:"relative",mb:1.5,children:[s.jsx(h.Textarea,{value:gr,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:ie=>ie.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),s.jsx(h.Tooltip,{title:r.copyToClipboard,children:s.jsx(h.Button,{onClick:()=>{navigator.clipboard.writeText(gr)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:s.jsx(_e.ContentCopy,{})})})]}),s.jsx(h.Alert,{variant:"outlined",color:"primary",startDecorator:s.jsx(Jt,{}),sx:{mb:1.5,width:"fit-content"},children:s.jsxs(h.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[r.divElementTextInfo,s.jsx(h.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},BN=["load-more","limited"],$N={"load-more":"Load more",limited:"Limited"},FN=({entityId:e,labels:t})=>{const[n,r]=y.useState(!1),[i,o]=y.useState(""),[a,l]=y.useState(""),[c,u]=y.useState(""),[f,d]=y.useState(10),[p,g]=y.useState(2),[v,m]=y.useState("load-more"),b=`
|
|
2500
2500
|
data-content-id="${e}"`,C=i?`
|
|
2501
2501
|
data-classic-quiz-url="${i}"`:"",w=a?`
|
|
2502
2502
|
data-either-or-url="${a}"`:"",x=c?`
|
|
@@ -2506,4 +2506,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2506
2506
|
data-widget-mode="${v}"`,F=`<div
|
|
2507
2507
|
data-component="fu-widget"
|
|
2508
2508
|
data-content-type="list"${b}${C}${w}${x}${A}${E}${k}
|
|
2509
|
-
></div>`,W=({title:N})=>s.jsx(h.Tooltip,{title:N,sx:{maxWidth:300},children:s.jsx(Xt,{color:"primary"})}),O=()=>s.jsxs(h.Card,{sx:{pb:1,mb:3},children:[s.jsx(Ot,{label:t.classicQuizURL,placeholder:"",defaultValue:i,required:!1,size:"md",endDecorator:s.jsx(W,{title:t.quizzesInfoMessage}),onChange:N=>o(N.target.value)}),s.jsx(Ot,{label:t.eitherOrURL,placeholder:"",defaultValue:a,required:!1,size:"md",endDecorator:s.jsx(W,{title:t.eitherOrsInfoMessage}),onChange:N=>l(N.target.value)}),s.jsx(Ot,{label:t.pollURL,placeholder:"",defaultValue:c,required:!1,size:"md",endDecorator:s.jsx(W,{title:t.pollsInfoMessage}),onChange:N=>u(N.target.value)})]}),T=()=>s.jsxs(h.Card,{sx:{pb:1,mb:3},children:[s.jsx(Pu,{label:t.itemsPerPage,description:t.itemsPerPageDescription,defaultValue:f,onChange:N=>d(N||null),size:"md"}),s.jsx(Pu,{label:t.itemsPerRow,description:t.itemsPerRowDescription,defaultValue:p,onChange:N=>g(N||null),size:"md"}),s.jsxs(h.FormControl,{sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{color:"primary",children:t.mode}),s.jsx(h.Select,{defaultValue:v,onChange:(N,H)=>m(H),children:BN.map((N,H)=>s.jsx(h.Option,{value:N,children:$N[N]},`basic-select-${N}-${H}`))}),s.jsx(h.FormHelperText,{children:t.modeDescription})]})]});return s.jsxs(h.Box,{mt:1,children:[T(),s.jsx(pn,{defaultValue:n,label:t.configureURLs,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:N=>{N===!1&&(o(""),l(""),u("")),r(N)}}),n&&O(),s.jsxs(h.Box,{position:"relative",mb:1,children:[s.jsx(h.Textarea,{value:F,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:N=>N.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),s.jsx(h.Tooltip,{title:t.copyToClipboard,children:s.jsx(h.Button,{onClick:()=>{navigator.clipboard.writeText(F)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:s.jsx(_e.ContentCopy,{})})})]}),s.jsx(h.Alert,{variant:"outlined",color:"primary",startDecorator:s.jsx(Xt,{}),sx:{mb:1,width:"fit-content"},children:s.jsxs(h.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[t.divElementTextInfo,s.jsx(h.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},xb=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})))||[],NN=({labels:e,ids:t,onChange:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState([]),[l,c]=y.useState(""),[u,f]=y.useState("name"),[d,p]=y.useState(!1),[g,v]=y.useState(!1),{sdk:m}=We(),b=!0,C=()=>v(!g),w=(A,E)=>{i(E);const k=E.map(F=>F.id);n(k&&k.length?k:null)},x=3;y.useEffect(()=>{!l&&t&&t.length&&m.profile.getByIds(t,void 0,b).then(A=>{i(xb(A))}).catch(A=>{C(),console.error(A),i([])})},[]);const I=y.useMemo(()=>cr((A,E)=>{p(!0),m.profile.getByIds(E==="id"?[A]:[],E==="name"?A:void 0,b).then(k=>{a([...xb(k)]),p(!1)}).catch(k=>{console.error(k),C(),a([]),p(!1)})},300),[]);y.useEffect(()=>{if(!l||l.length<x){a([]);return}return I(l,u),()=>I.cancel()},[l,I,u]);const S=(A,E)=>A.map((k,F)=>{var W;return s.jsx(h.Chip,{variant:"solid",endDecorator:s.jsx(h.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:O=>E({index:F}).onClick(O),children:s.jsx(_e.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:s.jsxs(h.Box,{display:"flex",alignItems:"center",mr:1,children:[s.jsx(h.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(W=k.avatar)!=null?W:Le.avatar}),s.jsx(h.Typography,{children:k.label})]})},k.id)});return s.jsxs(s.Fragment,{children:[s.jsx(h.Box,{sx:{marginBottom:"16px"},children:s.jsx(h.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:d,disableClearable:!0,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(A,E)=>A.id===E.id,endDecorator:s.jsxs(s.Fragment,{children:[d&&s.jsx(h.CircularProgress,{size:"sm",sx:{bgcolor:"primary",marginRight:2}}),s.jsx(h.Divider,{orientation:"vertical"}),s.jsxs(h.Select,{variant:"plain",value:u,onChange:(A,E)=>f(E),slotProps:{listbox:{variant:"outlined"}},sx:{mr:-1.5,"&:hover":{bgcolor:"transparent"}},children:[s.jsx(h.Option,{value:"name",children:e.searchByName}),s.jsx(h.Option,{value:"id",children:e.searchById})]})]}),placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:A=>A.filter(E=>!r.some(k=>k.value===E.value)),onInputChange:(A,E)=>{c(E)},onChange:w,getOptionKey:A=>A.id,value:r,renderTags:S,renderOption:(A,E)=>{var k;return s.jsx(h.AutocompleteOption,Q(B({},A),{children:s.jsxs(h.Box,{display:"flex",alignItems:"center",mr:1,children:[s.jsx(h.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(k=E.avatar)!=null?k:Le.avatar}),s.jsx(h.Typography,{children:E.label})]})}))}})}),s.jsx(Ge,{showToast:g,message:e.searchProfilesErrorMessage,color:"danger",hideToast:C})]})},zN=({value:e,sx:t,tooltipPlacement:n})=>{const r=c=>{const u=Math.abs(c);return u>=1e9?(c/1e9).toFixed(1)+"b":u>=1e6?(c/1e6).toFixed(1)+"m":u>=1e3?(c/1e3).toFixed(1)+"k":c.toString()},i=c=>new Intl.NumberFormat("en-US").format(c),o=Math.abs(e)>=1e3,a=r(e),l=i(e);return o?s.jsx(h.Tooltip,{title:l,placement:n,arrow:!0,children:s.jsx(h.Typography,{sx:t,children:a})}):s.jsx(h.Typography,{sx:t,children:a})},jN=(e,t,n,r)=>{if(e&&e.length===0){n([]);return}t.football.getPlayers({playerIds:e}).then(i=>{const o=i.data.map(a=>Cb(a));n(o)}).catch(i=>{console.error("Error fetching players by ID:",i),r()})},Cb=e=>{var t,n,r,i,o;return{id:e.id,name:e.name,avatar:((t=e.assets)==null?void 0:t.headshot)||Le.avatar,countryName:((n=e.country)==null?void 0:n.name)||"Unknown",countryFlag:((i=(r=e.country)==null?void 0:r.assets)==null?void 0:i.flag)||Le.flag,teams:((o=e.teams)==null?void 0:o.map(a=>{var l;return{id:a.id,name:a.name,logo:((l=a.assets)==null?void 0:l.logo)||Le.team}}))||[]}},UN=({player:e,onRemove:t})=>s.jsx(h.Tooltip,{title:s.jsxs(h.Box,{sx:{p:1},children:[s.jsx(h.Typography,{level:"body-sm",fontWeight:"bold",children:e.name}),s.jsxs(h.Typography,{level:"body-xs",sx:{display:"flex",alignItems:"center",gap:.5,mt:.5},children:[s.jsx("img",{src:e.countryFlag,alt:e.countryName,width:16,height:12,loading:"lazy"}),e.countryName]}),e.teams&&e.teams.length>0&&s.jsxs(h.Box,{sx:{mt:.5},children:[s.jsx(h.Typography,{level:"body-xs",sx:{mb:.5},children:"Teams:"}),s.jsx(h.Box,{sx:{display:"flex",flexDirection:"column",gap:.25},children:e.teams.map((n,r)=>s.jsxs(h.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[s.jsx("img",{src:n.logo,alt:n.name,width:16,height:16,style:{borderRadius:"2px"},loading:"lazy"}),s.jsx(h.Typography,{level:"body-xs",children:n.name})]},r))})]})]}),placement:"left",variant:"solid",sx:{"--Tooltip-radius":"8px",maxWidth:300,bgcolor:"background.level1"},children:s.jsxs(h.Box,{sx:{display:"inline-flex",alignItems:"center",gap:.5,backgroundColor:"#e0f3ff",borderRadius:"50px",padding:"2px 8px 2px 2px",margin:"2px",position:"relative","&:hover":{backgroundColor:"#d0e8ff",cursor:"default"}},children:[s.jsx(h.Avatar,{src:e.avatar,alt:e.name,size:"sm",sx:{width:24,height:24,border:"1px solid #fff"}}),s.jsx(h.Typography,{level:"body-sm",sx:{fontSize:"12px",maxWidth:80,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),s.jsx(h.IconButton,{size:"sm",variant:"plain",color:"danger",onClick:t,sx:{minHeight:16,minWidth:16,padding:0,ml:.5,"&:hover":{backgroundColor:"rgba(255, 0, 0, 0.1)"}},children:s.jsx(_e.Close,{sx:{fontSize:12}})})]})}),VN=({labels:e,teamIds:t,selectedPlayers:n,onChangePlayers:r})=>{const[i,o]=y.useState([]),[a,l]=y.useState([]),[c,u]=y.useState([]),[f,d]=y.useState(!1),[p,g]=y.useState(""),[v,m]=y.useState(!1),{sdk:b}=We(),C=()=>m(!v),w=t&&t.length>0,x=(k,F)=>{o(F),r(F)},I=()=>_(this,null,function*(){if(w){d(!0);try{const k=t.map(O=>b.football.getTeamById(O)),F=yield Promise.all(k),W=[];F.forEach(O=>{if(O.squad&&O.squad.length>0){const T=O.squad.map(N=>{var H,j,$,M,V;return{id:N.id,name:N.name,avatar:((H=N.assets)==null?void 0:H.headshot)||Le.avatar,countryName:((j=N.country)==null?void 0:j.name)||"Unknown",countryFlag:((M=($=N.country)==null?void 0:$.assets)==null?void 0:M.flag)||Le.flag,teams:[{id:O.id,name:O.name,logo:((V=O.assets)==null?void 0:V.logo)||Le.team}]}}).sort((N,H)=>N.name.localeCompare(H.name));W.push(...T)}}),u(W),l(W)}catch(k){console.error("Error fetching team players:",k),C()}finally{d(!1)}}}),S=k=>{if(!k){l(c);return}const F=c.filter(W=>W.name.toLowerCase().includes(k.toLowerCase()));l(F)};y.useEffect(()=>{jN(n,b,o,C)},[n]),y.useEffect(()=>{w&&I()},[t]);const A=y.useMemo(()=>cr(k=>{if(!w){if(!k||k.length<2){l([]),d(!1);return}d(!0),b.football.getPlayers({name:k,sortField:"name",sortOrder:"asc"}).then(F=>{const W=F.data.map(O=>Cb(O));l(W),d(!1)}).catch(F=>{console.error("Error searching players:",F),l([]),d(!1),C()})}},300),[b,w]);y.useEffect(()=>(w?S(p):A(p),()=>{w||A.cancel()}),[p,w]);const E=(k,F)=>k.map((W,O)=>s.jsx(UN,{player:W,onRemove:()=>{const T=F({index:O});T.onClick&&T.onClick({})}},W.id));return s.jsxs(s.Fragment,{children:[s.jsx(h.Autocomplete,{forcePopupIcon:w,multiple:!0,loading:f,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38,flexWrap:"wrap"}},noOptions:{sx:{}}},isOptionEqualToValue:(k,F)=>k.id===F.id,endDecorator:f?s.jsx(h.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e==null?void 0:e.searchPlayersPlaceholder,options:a,filterSelectedOptions:!0,onInputChange:(k,F)=>{g(F)},onChange:x,getOptionKey:k=>typeof k=="string"?k:k.id,getOptionLabel:k=>typeof k=="string"?k:k.name,value:i,renderTags:E,limitTags:1,renderOption:(k,F)=>{const W={props:k};return s.jsxs(h.AutocompleteOption,Q(B({},k),{sx:{display:"flex",alignItems:"center",gap:1},children:[s.jsx(h.Avatar,{src:F.avatar,alt:F.name,size:"sm",sx:{width:32,height:32}}),s.jsxs(h.Box,{sx:{flexGrow:1},children:[s.jsx(h.Typography,{level:"body-sm",fontWeight:"bold",children:F.name}),s.jsxs(h.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[s.jsx("img",{src:F.countryFlag,alt:F.countryName,width:16,height:12,loading:"lazy"}),s.jsx(h.Typography,{level:"body-xs",color:"neutral",children:F.countryName})]})]})]}),`player-option-${F.id}-${W}`)}}),s.jsx(Ge,{showToast:v,message:e.getPlayersErrorMessage,color:"danger",hideToast:C})]})},HN=(e,t={})=>{const{enabled:n=!0}=t,{sdk:r}=We(),[i,o]=y.useState(null),[a,l]=y.useState(!1),[c,u]=y.useState(null),[f,d]=y.useState(null),p=y.useMemo(()=>B({},e),[JSON.stringify(e)]),g=y.useCallback(()=>_(this,null,function*(){var v,m;l(!0),u(null);try{const b=yield r.football.getMatches(p);o(b.data),d((m=(v=b.meta)==null?void 0:v.pagination)!=null?m:null)}catch(b){u(b),o([]),d(null)}finally{l(!1)}}),[r,p]);return y.useEffect(()=>{n&&g()},[g,n]),{matches:i,loading:a,error:c,meta:f,refetch:g}},wb=Be(s.jsx("path",{d:"M4.25 5.61C6.57 8.59 10 13 10 13v5c0 1.1.9 2 2 2s2-.9 2-2v-5s3.43-4.41 5.75-7.39c.51-.66.04-1.61-.8-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAltRounded"),Sb=Be(s.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.89-2-2-2m0 16H5V7h14zm-5.5-6c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5M12 9c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"PreviewRounded"),fr=Ke("MuiStep",["root","indicator","horizontal","vertical","active","completed","disabled"]),Ti=Ke("MuiStepIndicator",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]),WN=Be(s.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z"}),"KeyboardArrowLeft"),GN=Be(s.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight"),Ib=Be(s.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");class YN{constructor(){J(this,"id","");J(this,"title","");J(this,"alternative_title",null);J(this,"description",null);J(this,"type",null);J(this,"auth_requirement",null);J(this,"rules",null);J(this,"ad_content",null);J(this,"labels",null);J(this,"branding",null);J(this,"embed_code",null);J(this,"custom_fields",null);J(this,"images",null);J(this,"status","");J(this,"flags",[]);J(this,"context",null);J(this,"options",[]);J(this,"related",[]);J(this,"multiple_choice",!1);J(this,"max_multiple_choice_options",null);J(this,"participation_count",0);J(this,"preferences_enabled",!1);J(this,"max_attempts",1);J(this,"external_activity",null)}}const KN=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(""),o=e.generatedEntity,a=d=>{const p=new YN;return p.title=d.question||"",p.status="INACTIVE",p.options=(d.options||[]).map(g=>({title:g,description:"",images:{main:"",mobile:"",cover:""},embed_code:null,preference_mappings:[]})),p},l=d=>{i(d.id);const p=a(d);e.setPollRequestBody(p)},c=()=>{if(!o)return s.jsx(h.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.noPreviewAvailable})});const d=()=>s.jsxs(h.Table,{variant:"outlined",size:"sm",sx:{width:"100%",maxWidth:"100%","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[s.jsx("thead",{children:s.jsx("tr",{children:s.jsx("th",{children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.questions})})})}),s.jsx("tbody",{children:o.questions.map((g,v)=>{var m;return s.jsx("tr",{children:s.jsx("td",{children:s.jsxs(h.Typography,{level:"body-sm",children:[g.question," ",s.jsx(h.Typography,{children:(m=g.options)==null?void 0:m.map((b,C)=>s.jsx(h.Chip,{color:b.correct?"success":"neutral",variant:b.correct?"solid":"outlined",sx:{mr:1},size:"sm",children:b.option},`question-option-${C}`))})]})})},`question-${v}`)})})]}),p=()=>{const g=o.questions||[],v=m=>!m&&m!==0?"neutral":m>=5?"success":m>=4?"primary":m>=3?"warning":"neutral";return s.jsx(h.Box,{component:"ul",sx:{listStyle:"none",m:0,p:0,ml:0,pl:0,marginBlockStart:0,marginBlockEnd:0,marginInlineStart:0,marginInlineEnd:0,paddingInlineStart:0,display:"flex",flexDirection:"column",gap:1},children:g.map((m,b)=>{const C=r===m.id;return s.jsx(h.Box,{component:"li",children:s.jsx(h.Sheet,{variant:"outlined",sx:{p:1,borderRadius:"sm",cursor:"pointer",bgcolor:C?"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))":"background.body",borderColor:C?"primary.solidBg":void 0,"&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"},"&:hover .pollOptionChipNeutral":{backgroundColor:"background.level1",borderColor:"neutral.outlinedBorder"}},onClick:()=>l(m),role:"button",tabIndex:0,onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),l(m))},children:s.jsxs(h.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[s.jsx(h.Radio,{name:"selectedPollSuggestion",value:m.id,checked:C,onChange:()=>l(m),size:"sm"}),s.jsxs(h.Box,{sx:{flex:1,minWidth:0},children:[s.jsxs(h.Box,{sx:{display:"flex",alignItems:"center",gap:.5,mb:.5},children:[s.jsx(h.Typography,{level:"body-sm",fontWeight:600,p:0,children:m.question}),s.jsx(h.Box,{sx:{flex:1}}),m.engagement_score?s.jsx(h.Tooltip,{title:e.labels.engagementScore,children:s.jsx(h.Chip,{size:"sm",variant:"solid",color:v(m.engagement_score),children:m.engagement_score})}):s.jsx(s.Fragment,{})]}),s.jsx(h.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(m.options||[]).map((w,x)=>s.jsx(h.Chip,{className:C?void 0:"pollOptionChipNeutral",variant:C?"soft":"outlined",color:C?"primary":"neutral",size:"sm",sx:{mr:.5,mb:.5},children:w},`poll-suggestion-opt-${x}`))})]})]})})},`poll-suggestion-${m.id||b}`)})})};return e.entityType==="poll"?s.jsx(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",p:1,maxHeight:"400px",my:.5},children:p()}):s.jsxs(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:[s.jsxs(h.Box,{role:"button",tabIndex:0,onClick:()=>n(!t),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),n(v=>!v))},sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}},children:[s.jsx(h.Typography,{level:"body-sm",sx:{flexGrow:1},children:o.title}),s.jsx(h.Tooltip,{title:t?"":e.labels.expand,children:s.jsx(h.IconButton,{"aria-label":"expand row",variant:"plain",color:"neutral",size:"sm",sx:{"&:hover":{backgroundColor:"background.surface"}},children:t?s.jsx(Ib,{}):s.jsx(Is,{})})})]}),s.jsx(h.Box,{sx:{display:t?"block":"none",p:1},children:t?d():null})]})},u=()=>!e.matches||e.matches.length===0?s.jsx(h.Box,{sx:{height:250,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.noMatchesFound})}):s.jsx(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"250px",my:.5},children:e.matches.map(d=>{var p,g,v,m,b,C,w,x,I,S,A,E,k,F,W,O,T,N,H,j,$,M,V,Y;return s.jsxs(y.Fragment,{children:[s.jsxs(h.Box,{onClick:()=>e.setSelectedMatchId(d.id),onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),e.setSelectedMatchId(d.id))},role:"button",tabIndex:0,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"},backgroundColor:e.selectedMatchId===d.id?"rgba(0,0,0,0.04)":"transparent"},children:[s.jsx(h.Radio,{size:"sm",name:"selectedMatch",value:d.id,checked:e.selectedMatchId===d.id,onChange:X=>e.setSelectedMatchId(X.target.value),sx:{mr:1}}),s.jsx(h.Tooltip,{title:(((g=(p=d.context)==null?void 0:p.competition)==null?void 0:g.name)||"Competition with no name")+((b=(m=(v=d.context)==null?void 0:v.competition)==null?void 0:m.country)!=null&&b.name?` (${d.context.competition.country.name})`:""),children:s.jsx(h.Avatar,{src:((x=(w=(C=d.context)==null?void 0:C.competition)==null?void 0:w.assets)==null?void 0:x.logo)||Le.competition,sx:{width:"15px",height:"15px"},slotProps:{img:{loading:"lazy"}}})}),s.jsxs(h.Typography,{level:"body-sm",children:["[",ft(d.kickoffAt).format("HH:mm DD.MM.YYYY"),"]"]}),(I=d.homeTeam)!=null&&I.code?s.jsx(h.Tooltip,{title:d.homeTeam.name,children:s.jsxs(h.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[s.jsx(h.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.homeTeam.id)?700:400,children:d.homeTeam.code||d.homeTeam.name}),s.jsx(h.Avatar,{src:((S=d.homeTeam.assets)==null?void 0:S.logo)||Le.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})]})}):s.jsxs(s.Fragment,{children:[s.jsx(h.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.homeTeam.id)?700:400,children:d.homeTeam.code||d.homeTeam.name}),s.jsx(h.Avatar,{src:((A=d.homeTeam.assets)==null?void 0:A.logo)||Le.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})]}),((k=(E=d==null?void 0:d.scores)==null?void 0:E.ftScore)==null?void 0:k.homeGoals)!==null&&((W=(F=d==null?void 0:d.scores)==null?void 0:F.ftScore)==null?void 0:W.awayGoals)!==null?s.jsx(h.Chip,{variant:"outlined",children:((N=(T=(O=d.scores)==null?void 0:O.ftScore)==null?void 0:T.homeGoals)!=null?N:"")+":"+(($=(j=(H=d.scores)==null?void 0:H.ftScore)==null?void 0:j.awayGoals)!=null?$:"")}):" : ",(M=d.awayTeam)!=null&&M.code?s.jsx(h.Tooltip,{title:d.awayTeam.name,children:s.jsxs(h.Box,{display:"flex",gap:.5,alignItems:"center",children:[s.jsx(h.Avatar,{src:((V=d.awayTeam.assets)==null?void 0:V.logo)||Le.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})," ",s.jsx(h.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.awayTeam.id)?700:400,children:d.awayTeam.code||d.awayTeam.name})]})}):s.jsxs(s.Fragment,{children:[s.jsx(h.Avatar,{src:((Y=d.awayTeam.assets)==null?void 0:Y.logo)||Le.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}}),s.jsx(h.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.awayTeam.id)?700:400,children:d.awayTeam.code||d.awayTeam.name})]})]}),s.jsx(h.Divider,{sx:{my:.5}})]},`search-matches-custom-${d.id}`)})}),f=()=>s.jsxs(s.Fragment,{children:[s.jsx(h.Typography,{level:"body-xs",children:e.pagination?`${e.labels.page} ${e.pagination.currentPage} ${e.labels.of} ${e.pagination.numberOfPages} • ${e.pagination.totalItems} ${e.labels.total}`:""}),s.jsxs(h.Box,{sx:{display:"flex",gap:1},children:[s.jsx(h.IconButton,{size:"sm",color:"neutral",variant:"outlined",disabled:!e.pagination||e.pagination&&e.pagination.currentPage<=1,onClick:()=>e.setPage(d=>Math.max(1,d-1)),sx:{bgcolor:"background.surface"},children:s.jsx(WN,{})}),s.jsx(h.IconButton,{size:"sm",color:"neutral",variant:"outlined",disabled:!e.pagination||e.pagination&&e.pagination.currentPage>=e.pagination.numberOfPages,onClick:()=>e.setPage(d=>e.pagination?Math.min(e.pagination.numberOfPages,d+1):d+1),sx:{bgcolor:"background.surface"},children:s.jsx(GN,{})})]})]});return e.loading?s.jsx(h.Box,{sx:{height:240},children:s.jsx(yi,{my:0})}):s.jsxs(s.Fragment,{children:[e.step==="search"?u():c(),s.jsxs(h.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[s.jsx(h.Button,{size:"sm",color:"primary",variant:"outlined",disabled:!e.selectedMatchId,onClick:e.onGenerate,children:e.step==="search"?e.labels.generate:e.labels.regenerate}),e.step==="search"?f():s.jsx(s.Fragment,{})]})]})},qN=e=>{const t=ft(Date.now()).format("YYYY-MM-DD");if(e.step==="preview")return s.jsx(s.Fragment,{});const n=()=>e.entityType==="poll"?s.jsx(h.Checkbox,{disabled:!e.matchFilters.teamIds||e.matchFilters.teamIds.length===0,checked:e.useFramingGuidelines,size:"sm",onChange:r=>{e.setUseFramingGuidelines(r.target.checked)},label:e.labels.useFramingGuidelinesLabel}):s.jsx(s.Fragment,{});return s.jsxs(s.Fragment,{children:[s.jsx(zm,{labels:{teamsSelectionPlaceholder:e.labels.teamsSelectionPlaceholder||"",searchTeamsErrorMessage:e.labels.searchTeamsErrorMessage},ids:e.matchFilters.teamIds||[],onChange:e.onChangeTeams,scope:e.competitionsScope,readOnly:e.isGenerating,AdditionalCheckbox:n()}),s.jsxs(h.Grid,{container:!0,spacing:2,minWidth:"100%",columns:{xs:0,sm:0,md:12},mb:2,children:[s.jsx(h.Grid,{xs:6,children:s.jsxs(h.FormControl,{size:"sm",children:[s.jsx(h.FormLabel,{children:e.labels.fromDate}),s.jsx(h.Input,{name:"fromDate",type:"date",defaultValue:e.matchFilters.fromDate,onChange:e.onChangeDates,sx:{backgroundColor:"#fff",borderRadius:"md",minHeight:"36px"},slotProps:{input:{max:t}},readOnly:e.isGenerating})]})}),s.jsx(h.Grid,{xs:6,children:s.jsxs(h.FormControl,{size:"sm",children:[s.jsx(h.FormLabel,{children:e.labels.toDate}),s.jsx(h.Input,{name:"toDate",type:"date",defaultValue:e.matchFilters.toDate,onChange:e.onChangeDates,sx:{backgroundColor:"#fff",borderRadius:"md",minHeight:"36px"},slotProps:{input:{max:t}},readOnly:e.isGenerating})]})})]})]})},QN=ft(Date.now()).format("YYYY-MM-DD"),Ab=e=>{const t=e==null?void 0:e.toLowerCase();return t&&Ri[t]?Ri[t].key:"en"},Tb=e=>({fromDate:"",toDate:QN,competitionIds:e&&e.length?e:void 0,teamIds:void 0,sortOrder:"desc",status:"finished"}),JN=e=>{var Z;const[t,n]=y.useState(Ab(e.defaultLanguage)),[r,i]=y.useState(Tb(e.competitionsScope)),[o,a]=y.useState(1),[l,c]=y.useState(""),[u,f]=y.useState(!1),[d,p]=y.useState("search"),[g,v]=y.useState(!1),[m,b]=y.useState(null),[C,w]=y.useState(null),[x,I]=y.useState(!1),[S,A]=y.useState(!1),[E,k]=y.useState(""),[F,W]=y.useState(!1),[O,T]=y.useState(""),[N,H]=y.useState("danger"),j=10,$=y.useMemo(()=>{const Fe=r,{fromDate:te,toDate:ne}=Fe,de=Qe(Fe,["fromDate","toDate"]),ve=B({},de);if(te&&(ve.fromDate=`${te}T00:00:00Z`),ne){const st=ft().add(1,"minute").format("THH:mm:ss")+"Z";ve.toDate=ne+st}return Q(B({},ve),{page:o,limit:j})},[r,o]),M=y.useMemo(()=>!(!m||e.entityType==="poll"&&!C),[m,e.entityType,C]);y.useEffect(()=>()=>{n(Ab),i(Tb(e.competitionsScope)),a(1),c(""),f(!1),p("search"),b(null)},[]);const{https:V}=We(),{matches:Y,loading:X,meta:D}=HN($,{enabled:u}),L=()=>{T(""),W(!1)},U=te=>{let ne="",de="danger";switch(te){case"on_generate_failed":ne=e.labels.onEntityGenerateErrorMessage;break;case"on_create":ne=e.labels.onEntityCreateMessage,de="success";break;case"on_create_failed":ne=e.labels.onEntityCreateErrorMessage;break}H(de),T(ne),W(!0)},G=te=>{var de;const ne=te.map(ve=>ve.id);i(ve=>Q(B({},ve),{teamIds:ne||void 0})),a(1),f(!0),e.entityType==="poll"&&(te.length===0?(k(""),A(!1)):k(((de=te[te.length-1])==null?void 0:de.label)||""))},oe=te=>{const{name:ne,value:de}=te.target;i(ve=>Q(B({},ve),{[ne]:de})),f(!0)},ce=()=>_(this,null,function*(){v(!0),e.entityType==="poll"&&w(null);let te=null;switch(e.entityType){case"classic_quiz":te=yield V.generatePostMatchQuiz({sportType:"football",lang:t,eventId:l});break;case"poll":const de=S?E:"";te=yield V.generatePostMatchPoll({targetParticipant:de,lang:t,eventId:l});break}if(!(te!=null&&te.ok)){const de=yield te==null?void 0:te.json();console.error("Failed to generate AI content",de),v(!1),U("on_generate_failed");return}const ne=yield te==null?void 0:te.json();if(e.entityType==="poll"){const de=ne;de.questions.sort((ve,Fe)=>Fe.engagement_score-ve.engagement_score),b(de)}else b(ne);v(!1),p("preview")}),se=te=>_(this,null,function*(){I(!0);let ne=null;switch(e.entityType){case"classic_quiz":const ve=m;ne=yield V.createClassicQuiz(ve);break;case"poll":ne=yield V.createPoll(C);break}const de=yield ne==null?void 0:ne.json();if(!(ne!=null&&ne.ok)){console.error("Failed to create content",de),I(!1),U("on_create_failed");return}if(I(!1),te==="goto"){U("on_create"),e.toggleModal(),e.fetchEntityById(de.data.id);return}U("on_create")});return s.jsx(h.Modal,{open:e.isOpen,onClose:()=>{g||x||e.toggleModal()},children:s.jsxs(s.Fragment,{children:[s.jsxs(h.ModalDialog,{sx:{backgroundColor:"white",minWidth:"50%",height:900},children:[s.jsx(h.DialogTitle,{children:e.labels.generateFootballPostMatchModalTitle}),s.jsx(h.Divider,{}),s.jsx(h.DialogContent,{sx:{overflowX:"hidden"},children:s.jsxs(s.Fragment,{children:[s.jsxs(h.FormControl,{size:"sm",sx:{mb:2},children:[s.jsx(h.FormLabel,{children:e.labels.language}),s.jsx(h.Select,{value:t,onChange:(te,ne)=>ne&&n(ne),indicator:null,disabled:g,startDecorator:s.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(qn[t]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(qn[t]||"gb").toLowerCase()}.png`,alt:((Z=Object.values(Te).find(te=>te.key===t))==null?void 0:Z.name)||"Language"}),sx:{minWidth:220,minHeight:38},children:Object.values(Te).map(te=>s.jsxs(h.Option,{value:te.key,label:te.name,children:[s.jsx(h.ListItemDecorator,{children:s.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(qn[te.key]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(qn[te.key]||"gb").toLowerCase()}.png`,alt:te.name})}),te.name]},te.key))}),s.jsx(h.FormHelperText,{children:e.labels.targetLanguageDescription})]}),s.jsxs(h.Stepper,{sx:{my:2,width:"100%","--StepIndicator-size":"3rem","--Step-connectorInset":"0px",[`& .${Ti.root}`]:{borderWidth:3},[`& .${fr.root}::after`]:{height:3},[`& .${fr.completed}`]:{[`& .${Ti.root}`]:{borderColor:"primary.300",color:"primary.300"},"&::after":{bgcolor:"primary.300"}},[`& .${fr.active}`]:{[`& .${Ti.root}`]:{borderColor:"currentColor"}},[`& .${fr.disabled} *`]:{color:"neutral.outlinedDisabledColor"}},children:[s.jsx(h.Step,{active:d==="search",orientation:"vertical",indicator:s.jsx(h.Tooltip,{title:d==="preview"?e.labels.searchMatchTooltip:"",placement:"right",children:s.jsx(h.StepIndicator,{variant:d==="search"?"solid":"outlined",color:"primary",onClick:()=>{d==="preview"&&(b(null),p("search"))},onKeyDown:te=>{(te.key==="Enter"||te.key===" ")&&d==="preview"&&(te.preventDefault(),b(null),p("search"))},sx:B({cursor:d==="preview"?"pointer":"default"},d==="preview"&&{animation:"pulse 2s infinite","@keyframes pulse":{"0%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0.7)"},"70%":{boxShadow:"0 0 0 10px rgba(25, 118, 210, 0)"},"100%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0)"}},"&:hover":{animation:"none",boxShadow:"0 0 0 4px rgba(25, 118, 210, 0.3)"}}),role:"button",tabIndex:d==="preview"?0:-1,children:s.jsx(wb,{})})}),children:s.jsx(h.Typography,{sx:B({textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},d==="preview"&&{cursor:"pointer"}),onClick:()=>{d==="preview"&&(b(null),p("search"))},onKeyDown:te=>{(te.key==="Enter"||te.key===" ")&&d==="preview"&&(te.preventDefault(),b(null),p("search"))},role:"button",tabIndex:d==="preview"?0:-1,children:e.labels.searchMatch})}),s.jsx(h.Step,{orientation:"vertical",active:d==="preview",disabled:d!=="preview",indicator:s.jsx(h.StepIndicator,{variant:d==="preview"?"solid":"outlined",color:"primary",children:s.jsx(Sb,{})}),children:s.jsx(h.Typography,{sx:{textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},children:e.labels.preview})})]}),s.jsx(qN,{entityType:e.entityType,step:d,labels:e.labels,useFramingGuidelines:S,matchFilters:r,competitionsScope:e.competitionsScope,generatedEntity:m,isGenerating:g,setUseFramingGuidelines:A,onChangeTeams:G,onChangeDates:oe}),u?s.jsx(h.Sheet,{variant:"outlined",sx:{p:1,borderRadius:"sm",bgcolor:"background.surface"},children:s.jsx(KN,{step:d,loading:X||g,matches:Y,selectedMatchId:l,generatedEntity:m,labels:e.labels,pagination:D,teamIdsFilter:r.teamIds,setPollRequestBody:w,setPage:a,setSelectedMatchId:c,onGenerate:ce,entityType:e.entityType,setGeneratedEntity:b})}):s.jsx(s.Fragment,{})]})}),s.jsxs(h.DialogActions,{children:[s.jsx(h.Button,{variant:"outlined",color:"primary",loading:x,disabled:!M||g,onClick:()=>se("goto"),children:e.labels.createAndGoTo}),s.jsx(h.Button,{variant:"solid",color:"primary",loading:x,disabled:!M||g,onClick:()=>se("continue"),children:e.labels.createAndContinue}),s.jsx(h.Button,{disabled:g||x,variant:"plain",color:"neutral",onClick:te=>{te.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]}),s.jsx(Ge,{showToast:F,color:N,message:O,hideToast:L})]})})},XN=e=>{const[t,n]=y.useState(!1),r=e.generatedEntity,i=()=>{if(!r)return s.jsx(h.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.noPreviewAvailable})});const a=()=>s.jsxs(h.Table,{variant:"outlined",size:"sm",sx:{width:"100%",maxWidth:"100%","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[s.jsx("thead",{children:s.jsx("tr",{children:s.jsx("th",{children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.questions})})})}),s.jsx("tbody",{children:r.questions.map((l,c)=>{var u;return s.jsx("tr",{children:s.jsx("td",{children:s.jsxs(h.Typography,{level:"body-sm",children:[l.question," ",s.jsx(h.Typography,{children:(u=l.options)==null?void 0:u.map((f,d)=>s.jsx(h.Chip,{color:f.correct?"success":"neutral",variant:f.correct?"solid":"outlined",sx:{mr:1},size:"sm",children:f.option},`question-option-${d}`))})]})})},`question-${c}`)})})]});return s.jsxs(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:[s.jsxs(h.Box,{role:"button",tabIndex:0,onClick:()=>n(!t),onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n(c=>!c))},sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}},children:[s.jsx(h.Typography,{level:"body-sm",sx:{flexGrow:1},children:r.title}),s.jsx(h.Tooltip,{title:t?"":e.labels.expand,children:s.jsx(h.IconButton,{"aria-label":"expand row",variant:"plain",color:"neutral",size:"sm",sx:{"&:hover":{backgroundColor:"background.surface"}},children:t?s.jsx(Ib,{}):s.jsx(Is,{})})})]}),s.jsx(h.Box,{sx:{display:t?"block":"none",p:1},children:t?a():null})]})},o=()=>!e.races||e.races.length===0?s.jsx(h.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.noRacesFound})}):s.jsx(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:e.races.map(a=>{var u;const l=a.status==="Completed",c=a.status==="Scheduled";return s.jsxs(y.Fragment,{children:[s.jsxs(h.Box,{onClick:l?()=>e.setSelectedRaceId(a.id.toString()):void 0,onKeyDown:l?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),e.setSelectedRaceId(a.id.toString()))}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:l?"pointer":"not-allowed",opacity:c?.6:1,"&:hover":l?{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}:{},backgroundColor:e.selectedRaceId===a.id.toString()?"rgba(0,0,0,0.04)":"transparent"},children:[s.jsx(h.Radio,{size:"sm",name:"selectedRace",value:a.id.toString(),checked:e.selectedRaceId===a.id.toString(),disabled:!l,onChange:l?f=>e.setSelectedRaceId(f.target.value):void 0,sx:{mr:1}}),s.jsx(h.Tooltip,{title:a.competition.name+((u=a.competition.location)!=null&&u.country?` (${a.competition.location.country})`:""),children:s.jsx(h.Avatar,{src:a.circuit.image||Le.competition,sx:{width:"15px",height:"15px"},slotProps:{img:{loading:"lazy"}}})}),s.jsxs(h.Typography,{level:"body-sm",children:["[",ft(a.date).format("HH:mm DD.MM.YYYY"),"]"]}),s.jsx(h.Typography,{level:"body-sm",fontWeight:600,children:a.competition.name}),s.jsx(h.Typography,{level:"body-sm",children:a.circuit.name}),s.jsx(h.Chip,{variant:l?"solid":"outlined",color:l?"success":"neutral",size:"sm",children:a.status==="Completed"?"Finished":"Upcoming"})]}),s.jsx(h.Divider,{sx:{my:.5}})]},`race-${a.id}`)})});return e.loading?s.jsx(h.Box,{sx:{height:240},children:s.jsx(yi,{my:0})}):s.jsxs(s.Fragment,{children:[e.step==="search"?o():i(),s.jsx(h.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:s.jsx(h.Button,{size:"sm",color:"primary",variant:"outlined",disabled:!e.selectedRaceId,onClick:e.onGenerate,children:e.step==="search"?e.labels.generate:e.labels.regenerate})})]})},Eb=e=>{const t=e==null?void 0:e.toLowerCase();return t&&Ri[t]?Ri[t].key:"en"},Gs=()=>new Date().getFullYear(),ZN=()=>{const e=Gs();return[e,e-1,e-2]},ez={Login:bM,InformationInput:Ot,RichText:wc,HeaderButtons:YP,MarketSelection:RM,Accordion:OT,DynamicFields:uD,BasicSelect:MT,BooleanSwitch:pn,Branding:VP,ProfileSearchSelect:e2,RangeCalendar:lD,CompetitionSearchSelect:XL,Related:$M,Images:KR,Duration:sD,DatePickerComponent:vo,Flags:HR,Spinner:yi,Tags:jm,Toast:Ge,AdContent:RT,Match:MM,Winners:UB,CompetitionsSearchSelect:ZL,TeamsSearchSelect:zm,CustomSelect:ZM,Schedule:GM,NoPermissionCard:cD,CustomFlatpickrCalendar:ou,ContextSelectFilter:HB,NumberInput:Pu,EntityContext:w$,MiniGamesImages:I$,AuthRequirement:A$,SortableList:gN,ItemsPerPageFilter:mN,ImageCard:So,RelatedRelationship:_N,BonusPointsRelatedQuiz:DN,ExportUsersLeads:ON,SignOutButton:mg,BasicSortableList:MN,WidgetEmbedCode:LN,WidgetListEmbedCode:FN,AdvancedProfileSearchSelect:NN,FormatNumber:zN,PlayersSearchSelect:VN,GenerateFootballPostMatchModal:JN,GenerateFormula1PostEventModal:e=>{var M,V;const[t,n]=y.useState(Eb(e.defaultLanguage)),[r,i]=y.useState(Gs()),[o,a]=y.useState([]),[l,c]=y.useState(!1),[u,f]=y.useState(""),[d,p]=y.useState("search"),[g,v]=y.useState(!1),[m,b]=y.useState(null),[C,w]=y.useState(!1),[x,I]=y.useState(!1),[S,A]=y.useState(""),[E,k]=y.useState("danger"),F=y.useMemo(()=>!!m,[m]);y.useEffect(()=>{e.isOpen?N(Gs()):(n(Eb(e.defaultLanguage)),i(Gs()),a([]),f(""),p("search"),b(null))},[e.isOpen]);const{https:W}=We(),O=()=>{A(""),I(!1)},T=Y=>{let X="",D="danger";switch(Y){case"on_generate_failed":X=e.labels.onEntityGenerateErrorMessage;break;case"on_create":X=e.labels.onEntityCreateMessage,D="success";break;case"on_create_failed":X=e.labels.onEntityCreateErrorMessage;break;case"fetch_races_failed":X=e.labels.fetchRacesErrorMessage;break}k(D),A(X),I(!0)},N=Y=>_(this,null,function*(){c(!0);const X=yield W.apiSports.getRaces(Y),D=yield X.json();if(!X.ok){console.error("Error fetching races:",D),c(!1),a([]),T("fetch_races_failed");return}const G=(D.response||[]).sort((te,ne)=>new Date(ne.date).getTime()-new Date(te.date).getTime()),oe=G.filter(te=>te.status==="Completed"),ce=G.filter(te=>te.status==="Scheduled"),Z=[...ce.length>0?[ce.sort((te,ne)=>new Date(te.date).getTime()-new Date(ne.date).getTime())[0]]:[],...oe];a(Z),c(!1)}),H=Y=>{i(Y),f(""),N(Y)},j=()=>_(this,null,function*(){v(!0);const Y=yield W.generatePostMatchQuiz({sportType:"formula1",lang:t,eventId:u});if(!(Y!=null&&Y.ok)){const D=yield Y==null?void 0:Y.json();console.error("Failed to generate AI content",D),v(!1),T("on_generate_failed");return}const X=yield Y==null?void 0:Y.json();b(X),v(!1),p("preview")}),$=Y=>_(this,null,function*(){w(!0);const X=m,D=yield W.createClassicQuiz(X),L=yield D.json();if(!(D!=null&&D.ok)){console.error("Failed to create content",L),w(!1),T("on_create_failed");return}if(w(!1),Y==="goto"){T("on_create"),e.toggleModal(),e.fetchEntityById(L.data.id);return}T("on_create")});return s.jsx(h.Modal,{open:e.isOpen,onClose:()=>{g||C||e.toggleModal()},children:s.jsxs(s.Fragment,{children:[s.jsxs(h.ModalDialog,{sx:{backgroundColor:"white",minWidth:"50%",height:900},children:[s.jsx(h.DialogTitle,{children:e.labels.generateFormulaOnePostEventModalTitle}),s.jsx(h.Divider,{}),s.jsx(h.DialogContent,{sx:{overflowX:"hidden"},children:s.jsxs(s.Fragment,{children:[s.jsxs(h.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"},gap:2,mb:2},children:[s.jsxs(h.FormControl,{size:"sm",children:[s.jsx(h.FormLabel,{children:e.labels.language}),s.jsx(h.Select,{value:t,onChange:(Y,X)=>X&&n(X),indicator:null,disabled:g,startDecorator:s.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(qn[t]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(qn[t]||"gb").toLowerCase()}.png`,alt:((M=Object.values(Te).find(Y=>Y.key===t))==null?void 0:M.name)||"Language"}),sx:{minHeight:38},children:Object.values(Te).map(Y=>s.jsxs(h.Option,{value:Y.key,label:Y.name,children:[s.jsx(h.ListItemDecorator,{children:s.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(qn[Y.key]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(qn[Y.key]||"gb").toLowerCase()}.png`,alt:Y.name})}),Y.name]},Y.key))}),s.jsx(h.FormHelperText,{children:e.labels.targetLanguageDescription})]}),s.jsxs(h.FormControl,{size:"sm",children:[s.jsx(h.FormLabel,{children:e.labels.season}),s.jsx(h.Select,{value:r,onChange:(Y,X)=>X&&H(X),disabled:g||!!m,sx:{minHeight:38},children:ZN().map(Y=>s.jsx(h.Option,{value:Y,children:Y},Y))}),s.jsx(h.FormHelperText,{children:e.labels.seasonDescription})]})]}),s.jsxs(h.Stepper,{sx:{my:2,width:"100%","--StepIndicator-size":"3rem","--Step-connectorInset":"0px",[`& .${Ti.root}`]:{borderWidth:3},[`& .${fr.root}::after`]:{height:3},[`& .${fr.completed}`]:{[`& .${Ti.root}`]:{borderColor:"primary.300",color:"primary.300"},"&::after":{bgcolor:"primary.300"}},[`& .${fr.active}`]:{[`& .${Ti.root}`]:{borderColor:"currentColor"}},[`& .${fr.disabled} *`]:{color:"neutral.outlinedDisabledColor"}},children:[s.jsx(h.Step,{active:d==="search",orientation:"vertical",indicator:s.jsx(h.Tooltip,{title:d==="preview"?(V=e.labels)==null?void 0:V.searchRaceTooltip:"",placement:"right",children:s.jsx(h.StepIndicator,{variant:d==="search"?"solid":"outlined",color:"primary",onClick:()=>{d==="preview"&&(b(null),p("search"))},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&d==="preview"&&(Y.preventDefault(),b(null),p("search"))},sx:B({cursor:d==="preview"?"pointer":"default"},d==="preview"&&{animation:"pulse 2s infinite","@keyframes pulse":{"0%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0.7)"},"70%":{boxShadow:"0 0 0 10px rgba(25, 118, 210, 0)"},"100%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0)"}},"&:hover":{animation:"none",boxShadow:"0 0 0 4px rgba(25, 118, 210, 0.3)"}}),role:"button",tabIndex:d==="preview"?0:-1,children:s.jsx(wb,{})})}),children:s.jsx(h.Typography,{sx:B({textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},d==="preview"&&{cursor:"pointer"}),onClick:()=>{d==="preview"&&(b(null),p("search"))},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&d==="preview"&&(Y.preventDefault(),b(null),p("search"))},role:"button",tabIndex:d==="preview"?0:-1,children:e.labels.searchRace})}),s.jsx(h.Step,{orientation:"vertical",active:d==="preview",disabled:d!=="preview",indicator:s.jsx(h.StepIndicator,{variant:d==="preview"?"solid":"outlined",color:"primary",children:s.jsx(Sb,{})}),children:s.jsx(h.Typography,{sx:{textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},children:e.labels.preview})})]}),s.jsx(h.Sheet,{variant:"outlined",sx:{mt:2,p:1,borderRadius:"sm",bgcolor:"background.surface"},children:s.jsx(XN,{step:d,loading:l||g,races:o,selectedRaceId:u,generatedEntity:m,labels:e.labels,setSelectedRaceId:f,onGenerate:j,setGeneratedEntity:b})})]})}),s.jsxs(h.DialogActions,{children:[s.jsx(h.Button,{variant:"outlined",color:"primary",loading:C,disabled:!F||g,onClick:()=>$("goto"),children:e.labels.createAndGoTo}),s.jsx(h.Button,{variant:"solid",color:"primary",loading:C,disabled:!F||g,onClick:()=>$("continue"),children:e.labels.createAndContinue}),s.jsx(h.Button,{disabled:g||C,variant:"plain",color:"neutral",onClick:Y=>{Y.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]}),s.jsx(Ge,{showToast:x,color:E,message:S,hideToast:O})]})})}},kb=y.createContext(null),tz=({children:e})=>s.jsx(kb.Provider,{value:ez,children:e}),nz=()=>{const e=y.useContext(kb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},_b=425,Pb=1024,rz=()=>{const[e,t]=y.useState(window.innerWidth<=Pb),[n,r]=y.useState(window.innerWidth<=_b);return y.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=Pb),r(window.innerWidth<=_b)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}};var Db=(e=>(e.BOOLEAN="BOOLEAN",e.NUMBER="NUMBER",e.ENUM="ENUM",e.FREE_INPUT="FREE_INPUT",e))(Db||{}),Ob=(e=>(e.ACTIVE="ACTIVE",e.SETTLED="SETTLED",e.VOID="VOID",e))(Ob||{});class iz{constructor(){J(this,"id","");J(this,"question","");J(this,"status","ACTIVE");J(this,"void_reason",null);J(this,"points",0);J(this,"outcome_type",null);J(this,"valid_outcomes",null);J(this,"outcome",null)}}class oz{constructor(){J(this,"id","");J(this,"title","");J(this,"description","");J(this,"type","EVENT");J(this,"rules","");J(this,"status","PENDING");J(this,"images",null);J(this,"related",[]);J(this,"custom_fields",null);J(this,"predictions_cutoff","");J(this,"fixtures",[]);J(this,"tiebreaker",{stat_tiebreaker_enabled:!1,stat_total:0})}}const az={APIProvider:WS,AuthProvider:GS,AuthContext:qf,ComponentProvider:tz,useComponentContext:nz,useAPIContext:We,useIsMobile:rz,constants:{supportedLanguages:Te,languagesMap:Ri}};Ie.EventGameFixtureStatusEnum=Ob,Ie.EventGameFixturesModel=iz,Ie.EventGameOutcomeTypeEnum=Db,Ie.EventGameRequestBody=oz,Ie.default=az,Object.defineProperties(Ie,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
2509
|
+
></div>`,W=({title:N})=>s.jsx(h.Tooltip,{title:N,sx:{maxWidth:300},children:s.jsx(Jt,{color:"primary"})}),O=()=>s.jsxs(h.Card,{sx:{pb:1,mb:3},children:[s.jsx(Ot,{label:t.classicQuizURL,placeholder:"",defaultValue:i,required:!1,size:"md",endDecorator:s.jsx(W,{title:t.quizzesInfoMessage}),onChange:N=>o(N.target.value)}),s.jsx(Ot,{label:t.eitherOrURL,placeholder:"",defaultValue:a,required:!1,size:"md",endDecorator:s.jsx(W,{title:t.eitherOrsInfoMessage}),onChange:N=>l(N.target.value)}),s.jsx(Ot,{label:t.pollURL,placeholder:"",defaultValue:c,required:!1,size:"md",endDecorator:s.jsx(W,{title:t.pollsInfoMessage}),onChange:N=>u(N.target.value)})]}),T=()=>s.jsxs(h.Card,{sx:{pb:1,mb:3},children:[s.jsx(Pu,{label:t.itemsPerPage,description:t.itemsPerPageDescription,defaultValue:f,onChange:N=>d(N||null),size:"md"}),s.jsx(Pu,{label:t.itemsPerRow,description:t.itemsPerRowDescription,defaultValue:p,onChange:N=>g(N||null),size:"md"}),s.jsxs(h.FormControl,{sx:()=>({marginBottom:"16px"}),children:[s.jsx(h.FormLabel,{color:"primary",children:t.mode}),s.jsx(h.Select,{defaultValue:v,onChange:(N,H)=>m(H),children:BN.map((N,H)=>s.jsx(h.Option,{value:N,children:$N[N]},`basic-select-${N}-${H}`))}),s.jsx(h.FormHelperText,{children:t.modeDescription})]})]});return s.jsxs(h.Box,{mt:1,children:[T(),s.jsx(pn,{defaultValue:n,label:t.configureURLs,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:N=>{N===!1&&(o(""),l(""),u("")),r(N)}}),n&&O(),s.jsxs(h.Box,{position:"relative",mb:1,children:[s.jsx(h.Textarea,{value:F,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:N=>N.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),s.jsx(h.Tooltip,{title:t.copyToClipboard,children:s.jsx(h.Button,{onClick:()=>{navigator.clipboard.writeText(F)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:s.jsx(_e.ContentCopy,{})})})]}),s.jsx(h.Alert,{variant:"outlined",color:"primary",startDecorator:s.jsx(Jt,{}),sx:{mb:1,width:"fit-content"},children:s.jsxs(h.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[t.divElementTextInfo,s.jsx(h.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},xb=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})))||[],NN=({labels:e,ids:t,onChange:n})=>{const[r,i]=y.useState([]),[o,a]=y.useState([]),[l,c]=y.useState(""),[u,f]=y.useState("name"),[d,p]=y.useState(!1),[g,v]=y.useState(!1),{sdk:m}=We(),b=!0,C=()=>v(!g),w=(A,E)=>{i(E);const k=E.map(F=>F.id);n(k&&k.length?k:null)},x=3;y.useEffect(()=>{!l&&t&&t.length&&m.profile.getByIds(t,void 0,b).then(A=>{i(xb(A))}).catch(A=>{C(),console.error(A),i([])})},[]);const I=y.useMemo(()=>cr((A,E)=>{p(!0),m.profile.getByIds(E==="id"?[A]:[],E==="name"?A:void 0,b).then(k=>{a([...xb(k)]),p(!1)}).catch(k=>{console.error(k),C(),a([]),p(!1)})},300),[]);y.useEffect(()=>{if(!l||l.length<x){a([]);return}return I(l,u),()=>I.cancel()},[l,I,u]);const S=(A,E)=>A.map((k,F)=>{var W;return s.jsx(h.Chip,{variant:"solid",endDecorator:s.jsx(h.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:O=>E({index:F}).onClick(O),children:s.jsx(_e.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:s.jsxs(h.Box,{display:"flex",alignItems:"center",mr:1,children:[s.jsx(h.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(W=k.avatar)!=null?W:Le.avatar}),s.jsx(h.Typography,{children:k.label})]})},k.id)});return s.jsxs(s.Fragment,{children:[s.jsx(h.Box,{sx:{marginBottom:"16px"},children:s.jsx(h.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:d,disableClearable:!0,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(A,E)=>A.id===E.id,endDecorator:s.jsxs(s.Fragment,{children:[d&&s.jsx(h.CircularProgress,{size:"sm",sx:{bgcolor:"primary",marginRight:2}}),s.jsx(h.Divider,{orientation:"vertical"}),s.jsxs(h.Select,{variant:"plain",value:u,onChange:(A,E)=>f(E),slotProps:{listbox:{variant:"outlined"}},sx:{mr:-1.5,"&:hover":{bgcolor:"transparent"}},children:[s.jsx(h.Option,{value:"name",children:e.searchByName}),s.jsx(h.Option,{value:"id",children:e.searchById})]})]}),placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:A=>A.filter(E=>!r.some(k=>k.value===E.value)),onInputChange:(A,E)=>{c(E)},onChange:w,getOptionKey:A=>A.id,value:r,renderTags:S,renderOption:(A,E)=>{var k;return s.jsx(h.AutocompleteOption,Q(B({},A),{children:s.jsxs(h.Box,{display:"flex",alignItems:"center",mr:1,children:[s.jsx(h.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(k=E.avatar)!=null?k:Le.avatar}),s.jsx(h.Typography,{children:E.label})]})}))}})}),s.jsx(Ge,{showToast:g,message:e.searchProfilesErrorMessage,color:"danger",hideToast:C})]})},zN=({value:e,sx:t,tooltipPlacement:n})=>{const r=c=>{const u=Math.abs(c);return u>=1e9?(c/1e9).toFixed(1)+"b":u>=1e6?(c/1e6).toFixed(1)+"m":u>=1e3?(c/1e3).toFixed(1)+"k":c.toString()},i=c=>new Intl.NumberFormat("en-US").format(c),o=Math.abs(e)>=1e3,a=r(e),l=i(e);return o?s.jsx(h.Tooltip,{title:l,placement:n,arrow:!0,children:s.jsx(h.Typography,{sx:t,children:a})}):s.jsx(h.Typography,{sx:t,children:a})},jN=(e,t,n,r)=>{if(e&&e.length===0){n([]);return}t.football.getPlayers({playerIds:e}).then(i=>{const o=i.data.map(a=>Cb(a));n(o)}).catch(i=>{console.error("Error fetching players by ID:",i),r()})},Cb=e=>{var t,n,r,i,o;return{id:e.id,name:e.name,avatar:((t=e.assets)==null?void 0:t.headshot)||Le.avatar,countryName:((n=e.country)==null?void 0:n.name)||"Unknown",countryFlag:((i=(r=e.country)==null?void 0:r.assets)==null?void 0:i.flag)||Le.flag,teams:((o=e.teams)==null?void 0:o.map(a=>{var l;return{id:a.id,name:a.name,logo:((l=a.assets)==null?void 0:l.logo)||Le.team}}))||[]}},UN=({player:e,onRemove:t})=>s.jsx(h.Tooltip,{title:s.jsxs(h.Box,{sx:{p:1},children:[s.jsx(h.Typography,{level:"body-sm",fontWeight:"bold",children:e.name}),s.jsxs(h.Typography,{level:"body-xs",sx:{display:"flex",alignItems:"center",gap:.5,mt:.5},children:[s.jsx("img",{src:e.countryFlag,alt:e.countryName,width:16,height:12,loading:"lazy"}),e.countryName]}),e.teams&&e.teams.length>0&&s.jsxs(h.Box,{sx:{mt:.5},children:[s.jsx(h.Typography,{level:"body-xs",sx:{mb:.5},children:"Teams:"}),s.jsx(h.Box,{sx:{display:"flex",flexDirection:"column",gap:.25},children:e.teams.map((n,r)=>s.jsxs(h.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[s.jsx("img",{src:n.logo,alt:n.name,width:16,height:16,style:{borderRadius:"2px"},loading:"lazy"}),s.jsx(h.Typography,{level:"body-xs",children:n.name})]},r))})]})]}),placement:"left",variant:"solid",sx:{"--Tooltip-radius":"8px",maxWidth:300,bgcolor:"background.level1"},children:s.jsxs(h.Box,{sx:{display:"inline-flex",alignItems:"center",gap:.5,backgroundColor:"#e0f3ff",borderRadius:"50px",padding:"2px 8px 2px 2px",margin:"2px",position:"relative","&:hover":{backgroundColor:"#d0e8ff",cursor:"default"}},children:[s.jsx(h.Avatar,{src:e.avatar,alt:e.name,size:"sm",sx:{width:24,height:24,border:"1px solid #fff"}}),s.jsx(h.Typography,{level:"body-sm",sx:{fontSize:"12px",maxWidth:80,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),s.jsx(h.IconButton,{size:"sm",variant:"plain",color:"danger",onClick:t,sx:{minHeight:16,minWidth:16,padding:0,ml:.5,"&:hover":{backgroundColor:"rgba(255, 0, 0, 0.1)"}},children:s.jsx(_e.Close,{sx:{fontSize:12}})})]})}),VN=({labels:e,teamIds:t,selectedPlayers:n,onChangePlayers:r})=>{const[i,o]=y.useState([]),[a,l]=y.useState([]),[c,u]=y.useState([]),[f,d]=y.useState(!1),[p,g]=y.useState(""),[v,m]=y.useState(!1),{sdk:b}=We(),C=()=>m(!v),w=t&&t.length>0,x=(k,F)=>{o(F),r(F)},I=()=>_(this,null,function*(){if(w){d(!0);try{const k=t.map(O=>b.football.getTeamById(O)),F=yield Promise.all(k),W=[];F.forEach(O=>{if(O.squad&&O.squad.length>0){const T=O.squad.map(N=>{var H,j,$,M,V;return{id:N.id,name:N.name,avatar:((H=N.assets)==null?void 0:H.headshot)||Le.avatar,countryName:((j=N.country)==null?void 0:j.name)||"Unknown",countryFlag:((M=($=N.country)==null?void 0:$.assets)==null?void 0:M.flag)||Le.flag,teams:[{id:O.id,name:O.name,logo:((V=O.assets)==null?void 0:V.logo)||Le.team}]}}).sort((N,H)=>N.name.localeCompare(H.name));W.push(...T)}}),u(W),l(W)}catch(k){console.error("Error fetching team players:",k),C()}finally{d(!1)}}}),S=k=>{if(!k){l(c);return}const F=c.filter(W=>W.name.toLowerCase().includes(k.toLowerCase()));l(F)};y.useEffect(()=>{jN(n,b,o,C)},[n]),y.useEffect(()=>{w&&I()},[t]);const A=y.useMemo(()=>cr(k=>{if(!w){if(!k||k.length<2){l([]),d(!1);return}d(!0),b.football.getPlayers({name:k,sortField:"name",sortOrder:"asc"}).then(F=>{const W=F.data.map(O=>Cb(O));l(W),d(!1)}).catch(F=>{console.error("Error searching players:",F),l([]),d(!1),C()})}},300),[b,w]);y.useEffect(()=>(w?S(p):A(p),()=>{w||A.cancel()}),[p,w]);const E=(k,F)=>k.map((W,O)=>s.jsx(UN,{player:W,onRemove:()=>{const T=F({index:O});T.onClick&&T.onClick({})}},W.id));return s.jsxs(s.Fragment,{children:[s.jsx(h.Autocomplete,{forcePopupIcon:w,multiple:!0,loading:f,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38,flexWrap:"wrap"}},noOptions:{sx:{}}},isOptionEqualToValue:(k,F)=>k.id===F.id,endDecorator:f?s.jsx(h.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e==null?void 0:e.searchPlayersPlaceholder,options:a,filterSelectedOptions:!0,onInputChange:(k,F)=>{g(F)},onChange:x,getOptionKey:k=>typeof k=="string"?k:k.id,getOptionLabel:k=>typeof k=="string"?k:k.name,value:i,renderTags:E,limitTags:1,renderOption:(k,F)=>{const W={props:k};return s.jsxs(h.AutocompleteOption,Q(B({},k),{sx:{display:"flex",alignItems:"center",gap:1},children:[s.jsx(h.Avatar,{src:F.avatar,alt:F.name,size:"sm",sx:{width:32,height:32}}),s.jsxs(h.Box,{sx:{flexGrow:1},children:[s.jsx(h.Typography,{level:"body-sm",fontWeight:"bold",children:F.name}),s.jsxs(h.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[s.jsx("img",{src:F.countryFlag,alt:F.countryName,width:16,height:12,loading:"lazy"}),s.jsx(h.Typography,{level:"body-xs",color:"neutral",children:F.countryName})]})]})]}),`player-option-${F.id}-${W}`)}}),s.jsx(Ge,{showToast:v,message:e.getPlayersErrorMessage,color:"danger",hideToast:C})]})},HN=(e,t={})=>{const{enabled:n=!0}=t,{sdk:r}=We(),[i,o]=y.useState(null),[a,l]=y.useState(!1),[c,u]=y.useState(null),[f,d]=y.useState(null),p=y.useMemo(()=>B({},e),[JSON.stringify(e)]),g=y.useCallback(()=>_(this,null,function*(){var v,m;l(!0),u(null);try{const b=yield r.football.getMatches(p);o(b.data),d((m=(v=b.meta)==null?void 0:v.pagination)!=null?m:null)}catch(b){u(b),o([]),d(null)}finally{l(!1)}}),[r,p]);return y.useEffect(()=>{n&&g()},[g,n]),{matches:i,loading:a,error:c,meta:f,refetch:g}},wb=Be(s.jsx("path",{d:"M4.25 5.61C6.57 8.59 10 13 10 13v5c0 1.1.9 2 2 2s2-.9 2-2v-5s3.43-4.41 5.75-7.39c.51-.66.04-1.61-.8-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAltRounded"),Sb=Be(s.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.89-2-2-2m0 16H5V7h14zm-5.5-6c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5M12 9c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"PreviewRounded"),fr=Ke("MuiStep",["root","indicator","horizontal","vertical","active","completed","disabled"]),Ti=Ke("MuiStepIndicator",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]),WN=Be(s.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z"}),"KeyboardArrowLeft"),GN=Be(s.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight"),Ib=Be(s.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");class YN{constructor(){J(this,"id","");J(this,"title","");J(this,"alternative_title",null);J(this,"description",null);J(this,"type",null);J(this,"auth_requirement",null);J(this,"rules",null);J(this,"ad_content",null);J(this,"labels",null);J(this,"branding",null);J(this,"embed_code",null);J(this,"custom_fields",null);J(this,"images",null);J(this,"status","");J(this,"flags",[]);J(this,"context",null);J(this,"options",[]);J(this,"related",[]);J(this,"multiple_choice",!1);J(this,"max_multiple_choice_options",null);J(this,"participation_count",0);J(this,"preferences_enabled",!1);J(this,"max_attempts",1);J(this,"external_activity",null)}}const KN=e=>{const[t,n]=y.useState(!1),[r,i]=y.useState(""),o=e.generatedEntity,a=d=>{const p=new YN;return p.title=d.question||"",p.status="INACTIVE",p.options=(d.options||[]).map(g=>({title:g,description:"",images:{main:"",mobile:"",cover:""},embed_code:null,preference_mappings:[]})),p},l=d=>{i(d.id);const p=a(d);e.setPollRequestBody(p)},c=()=>{if(!o)return s.jsx(h.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.noPreviewAvailable})});const d=()=>s.jsxs(h.Table,{variant:"outlined",size:"sm",sx:{width:"100%",maxWidth:"100%","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[s.jsx("thead",{children:s.jsx("tr",{children:s.jsx("th",{children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.questions})})})}),s.jsx("tbody",{children:o.questions.map((g,v)=>{var m;return s.jsx("tr",{children:s.jsx("td",{children:s.jsxs(h.Typography,{level:"body-sm",children:[g.question," ",s.jsx(h.Typography,{children:(m=g.options)==null?void 0:m.map((b,C)=>s.jsx(h.Chip,{color:b.correct?"success":"neutral",variant:b.correct?"solid":"outlined",sx:{mr:1},size:"sm",children:b.option},`question-option-${C}`))})]})})},`question-${v}`)})})]}),p=()=>{const g=o.questions||[],v=m=>!m&&m!==0?"neutral":m>=5?"success":m>=4?"primary":m>=3?"warning":"neutral";return s.jsx(h.Box,{component:"ul",sx:{listStyle:"none",m:0,p:0,ml:0,pl:0,marginBlockStart:0,marginBlockEnd:0,marginInlineStart:0,marginInlineEnd:0,paddingInlineStart:0,display:"flex",flexDirection:"column",gap:1},children:g.map((m,b)=>{const C=r===m.id;return s.jsx(h.Box,{component:"li",children:s.jsx(h.Sheet,{variant:"outlined",sx:{p:1,borderRadius:"sm",cursor:"pointer",bgcolor:C?"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))":"background.body",borderColor:C?"primary.solidBg":void 0,"&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"},"&:hover .pollOptionChipNeutral":{backgroundColor:"background.level1",borderColor:"neutral.outlinedBorder"}},onClick:()=>l(m),role:"button",tabIndex:0,onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),l(m))},children:s.jsxs(h.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[s.jsx(h.Radio,{name:"selectedPollSuggestion",value:m.id,checked:C,onChange:()=>l(m),size:"sm"}),s.jsxs(h.Box,{sx:{flex:1,minWidth:0},children:[s.jsxs(h.Box,{sx:{display:"flex",alignItems:"center",gap:.5,mb:.5},children:[s.jsx(h.Typography,{level:"body-sm",fontWeight:600,p:0,children:m.question}),s.jsx(h.Box,{sx:{flex:1}}),m.engagement_score?s.jsx(h.Tooltip,{title:e.labels.engagementScore,children:s.jsx(h.Chip,{size:"sm",variant:"solid",color:v(m.engagement_score),children:m.engagement_score})}):s.jsx(s.Fragment,{})]}),s.jsx(h.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(m.options||[]).map((w,x)=>s.jsx(h.Chip,{className:C?void 0:"pollOptionChipNeutral",variant:C?"soft":"outlined",color:C?"primary":"neutral",size:"sm",sx:{mr:.5,mb:.5},children:w},`poll-suggestion-opt-${x}`))})]})]})})},`poll-suggestion-${m.id||b}`)})})};return e.entityType==="poll"?s.jsx(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",p:1,maxHeight:"400px",my:.5},children:p()}):s.jsxs(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:[s.jsxs(h.Box,{role:"button",tabIndex:0,onClick:()=>n(!t),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),n(v=>!v))},sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}},children:[s.jsx(h.Typography,{level:"body-sm",sx:{flexGrow:1},children:o.title}),s.jsx(h.Tooltip,{title:t?"":e.labels.expand,children:s.jsx(h.IconButton,{"aria-label":"expand row",variant:"plain",color:"neutral",size:"sm",sx:{"&:hover":{backgroundColor:"background.surface"}},children:t?s.jsx(Ib,{}):s.jsx(Is,{})})})]}),s.jsx(h.Box,{sx:{display:t?"block":"none",p:1},children:t?d():null})]})},u=()=>!e.matches||e.matches.length===0?s.jsx(h.Box,{sx:{height:250,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.noMatchesFound})}):s.jsx(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"250px",my:.5},children:e.matches.map(d=>{var p,g,v,m,b,C,w,x,I,S,A,E,k,F,W,O,T,N,H,j,$,M,V,Y;return s.jsxs(y.Fragment,{children:[s.jsxs(h.Box,{onClick:()=>e.setSelectedMatchId(d.id),onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),e.setSelectedMatchId(d.id))},role:"button",tabIndex:0,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"},backgroundColor:e.selectedMatchId===d.id?"rgba(0,0,0,0.04)":"transparent"},children:[s.jsx(h.Radio,{size:"sm",name:"selectedMatch",value:d.id,checked:e.selectedMatchId===d.id,onChange:X=>e.setSelectedMatchId(X.target.value),sx:{mr:1}}),s.jsx(h.Tooltip,{title:(((g=(p=d.context)==null?void 0:p.competition)==null?void 0:g.name)||"Competition with no name")+((b=(m=(v=d.context)==null?void 0:v.competition)==null?void 0:m.country)!=null&&b.name?` (${d.context.competition.country.name})`:""),children:s.jsx(h.Avatar,{src:((x=(w=(C=d.context)==null?void 0:C.competition)==null?void 0:w.assets)==null?void 0:x.logo)||Le.competition,sx:{width:"15px",height:"15px"},slotProps:{img:{loading:"lazy"}}})}),s.jsxs(h.Typography,{level:"body-sm",children:["[",ft(d.kickoffAt).format("HH:mm DD.MM.YYYY"),"]"]}),(I=d.homeTeam)!=null&&I.code?s.jsx(h.Tooltip,{title:d.homeTeam.name,children:s.jsxs(h.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[s.jsx(h.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.homeTeam.id)?700:400,children:d.homeTeam.code||d.homeTeam.name}),s.jsx(h.Avatar,{src:((S=d.homeTeam.assets)==null?void 0:S.logo)||Le.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})]})}):s.jsxs(s.Fragment,{children:[s.jsx(h.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.homeTeam.id)?700:400,children:d.homeTeam.code||d.homeTeam.name}),s.jsx(h.Avatar,{src:((A=d.homeTeam.assets)==null?void 0:A.logo)||Le.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})]}),((k=(E=d==null?void 0:d.scores)==null?void 0:E.ftScore)==null?void 0:k.homeGoals)!==null&&((W=(F=d==null?void 0:d.scores)==null?void 0:F.ftScore)==null?void 0:W.awayGoals)!==null?s.jsx(h.Chip,{variant:"outlined",children:((N=(T=(O=d.scores)==null?void 0:O.ftScore)==null?void 0:T.homeGoals)!=null?N:"")+":"+(($=(j=(H=d.scores)==null?void 0:H.ftScore)==null?void 0:j.awayGoals)!=null?$:"")}):" : ",(M=d.awayTeam)!=null&&M.code?s.jsx(h.Tooltip,{title:d.awayTeam.name,children:s.jsxs(h.Box,{display:"flex",gap:.5,alignItems:"center",children:[s.jsx(h.Avatar,{src:((V=d.awayTeam.assets)==null?void 0:V.logo)||Le.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}})," ",s.jsx(h.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.awayTeam.id)?700:400,children:d.awayTeam.code||d.awayTeam.name})]})}):s.jsxs(s.Fragment,{children:[s.jsx(h.Avatar,{src:((Y=d.awayTeam.assets)==null?void 0:Y.logo)||Le.team,sx:{width:"20px",height:"20px"},slotProps:{img:{loading:"lazy"}}}),s.jsx(h.Typography,{fontWeight:e.teamIdsFilter&&e.teamIdsFilter.includes(d.awayTeam.id)?700:400,children:d.awayTeam.code||d.awayTeam.name})]})]}),s.jsx(h.Divider,{sx:{my:.5}})]},`search-matches-custom-${d.id}`)})}),f=()=>s.jsxs(s.Fragment,{children:[s.jsx(h.Typography,{level:"body-xs",children:e.pagination?`${e.labels.page} ${e.pagination.currentPage} ${e.labels.of} ${e.pagination.numberOfPages} • ${e.pagination.totalItems} ${e.labels.total}`:""}),s.jsxs(h.Box,{sx:{display:"flex",gap:1},children:[s.jsx(h.IconButton,{size:"sm",color:"neutral",variant:"outlined",disabled:!e.pagination||e.pagination&&e.pagination.currentPage<=1,onClick:()=>e.setPage(d=>Math.max(1,d-1)),sx:{bgcolor:"background.surface"},children:s.jsx(WN,{})}),s.jsx(h.IconButton,{size:"sm",color:"neutral",variant:"outlined",disabled:!e.pagination||e.pagination&&e.pagination.currentPage>=e.pagination.numberOfPages,onClick:()=>e.setPage(d=>e.pagination?Math.min(e.pagination.numberOfPages,d+1):d+1),sx:{bgcolor:"background.surface"},children:s.jsx(GN,{})})]})]});return e.loading?s.jsx(h.Box,{sx:{height:240},children:s.jsx(yi,{my:0})}):s.jsxs(s.Fragment,{children:[e.step==="search"?u():c(),s.jsxs(h.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[s.jsx(h.Button,{size:"sm",color:"primary",variant:"outlined",disabled:!e.selectedMatchId,onClick:e.onGenerate,children:e.step==="search"?e.labels.generate:e.labels.regenerate}),e.step==="search"?f():s.jsx(s.Fragment,{})]})]})},qN=e=>{const t=ft(Date.now()).format("YYYY-MM-DD");if(e.step==="preview")return s.jsx(s.Fragment,{});const n=()=>e.entityType==="poll"?s.jsx(h.Checkbox,{disabled:!e.matchFilters.teamIds||e.matchFilters.teamIds.length===0,checked:e.useFramingGuidelines,size:"sm",onChange:r=>{e.setUseFramingGuidelines(r.target.checked)},label:e.labels.useFramingGuidelinesLabel}):s.jsx(s.Fragment,{});return s.jsxs(s.Fragment,{children:[s.jsx(zm,{labels:{teamsSelectionPlaceholder:e.labels.teamsSelectionPlaceholder||"",searchTeamsErrorMessage:e.labels.searchTeamsErrorMessage},ids:e.matchFilters.teamIds||[],onChange:e.onChangeTeams,scope:e.competitionsScope,readOnly:e.isGenerating,AdditionalCheckbox:n()}),s.jsxs(h.Grid,{container:!0,spacing:2,minWidth:"100%",columns:{xs:0,sm:0,md:12},mb:2,children:[s.jsx(h.Grid,{xs:6,children:s.jsxs(h.FormControl,{size:"sm",children:[s.jsx(h.FormLabel,{children:e.labels.fromDate}),s.jsx(h.Input,{name:"fromDate",type:"date",defaultValue:e.matchFilters.fromDate,onChange:e.onChangeDates,sx:{backgroundColor:"#fff",borderRadius:"md",minHeight:"36px"},slotProps:{input:{max:t}},readOnly:e.isGenerating})]})}),s.jsx(h.Grid,{xs:6,children:s.jsxs(h.FormControl,{size:"sm",children:[s.jsx(h.FormLabel,{children:e.labels.toDate}),s.jsx(h.Input,{name:"toDate",type:"date",defaultValue:e.matchFilters.toDate,onChange:e.onChangeDates,sx:{backgroundColor:"#fff",borderRadius:"md",minHeight:"36px"},slotProps:{input:{max:t}},readOnly:e.isGenerating})]})})]})]})},QN=ft(Date.now()).format("YYYY-MM-DD"),Ab=e=>{const t=e==null?void 0:e.toLowerCase();return t&&Ri[t]?Ri[t].key:"en"},Tb=e=>({fromDate:"",toDate:QN,competitionIds:e&&e.length?e:void 0,teamIds:void 0,sortOrder:"desc",status:"finished"}),JN=e=>{var Z;const[t,n]=y.useState(Ab(e.defaultLanguage)),[r,i]=y.useState(Tb(e.competitionsScope)),[o,a]=y.useState(1),[l,c]=y.useState(""),[u,f]=y.useState(!1),[d,p]=y.useState("search"),[g,v]=y.useState(!1),[m,b]=y.useState(null),[C,w]=y.useState(null),[x,I]=y.useState(!1),[S,A]=y.useState(!1),[E,k]=y.useState(""),[F,W]=y.useState(!1),[O,T]=y.useState(""),[N,H]=y.useState("danger"),j=10,$=y.useMemo(()=>{const Fe=r,{fromDate:te,toDate:ne}=Fe,de=Qe(Fe,["fromDate","toDate"]),ve=B({},de);if(te&&(ve.fromDate=`${te}T00:00:00Z`),ne){const st=ft().add(1,"minute").format("THH:mm:ss")+"Z";ve.toDate=ne+st}return Q(B({},ve),{page:o,limit:j})},[r,o]),M=y.useMemo(()=>!(!m||e.entityType==="poll"&&!C),[m,e.entityType,C]);y.useEffect(()=>()=>{n(Ab),i(Tb(e.competitionsScope)),a(1),c(""),f(!1),p("search"),b(null)},[]);const{https:V}=We(),{matches:Y,loading:X,meta:D}=HN($,{enabled:u}),L=()=>{T(""),W(!1)},U=te=>{let ne="",de="danger";switch(te){case"on_generate_failed":ne=e.labels.onEntityGenerateErrorMessage;break;case"on_create":ne=e.labels.onEntityCreateMessage,de="success";break;case"on_create_failed":ne=e.labels.onEntityCreateErrorMessage;break}H(de),T(ne),W(!0)},G=te=>{var de;const ne=te.map(ve=>ve.id);i(ve=>Q(B({},ve),{teamIds:ne||void 0})),a(1),f(!0),e.entityType==="poll"&&(te.length===0?(k(""),A(!1)):k(((de=te[te.length-1])==null?void 0:de.label)||""))},oe=te=>{const{name:ne,value:de}=te.target;i(ve=>Q(B({},ve),{[ne]:de})),f(!0)},ce=()=>_(this,null,function*(){v(!0),e.entityType==="poll"&&w(null);let te=null;switch(e.entityType){case"classic_quiz":te=yield V.generatePostMatchQuiz({sportType:"football",lang:t,eventId:l});break;case"poll":const de=S?E:"";te=yield V.generatePostMatchPoll({targetParticipant:de,lang:t,eventId:l});break}if(!(te!=null&&te.ok)){const de=yield te==null?void 0:te.json();console.error("Failed to generate AI content",de),v(!1),U("on_generate_failed");return}const ne=yield te==null?void 0:te.json();if(e.entityType==="poll"){const de=ne;de.questions.sort((ve,Fe)=>Fe.engagement_score-ve.engagement_score),b(de)}else b(ne);v(!1),p("preview")}),se=te=>_(this,null,function*(){I(!0);let ne=null;switch(e.entityType){case"classic_quiz":const ve=m;ne=yield V.createClassicQuiz(ve);break;case"poll":ne=yield V.createPoll(C);break}const de=yield ne==null?void 0:ne.json();if(!(ne!=null&&ne.ok)){console.error("Failed to create content",de),I(!1),U("on_create_failed");return}if(I(!1),te==="goto"){U("on_create"),e.toggleModal(),e.fetchEntityById(de.data.id);return}U("on_create")});return s.jsx(h.Modal,{open:e.isOpen,onClose:()=>{g||x||e.toggleModal()},children:s.jsxs(s.Fragment,{children:[s.jsxs(h.ModalDialog,{sx:{backgroundColor:"white",minWidth:"50%",height:900},children:[s.jsx(h.DialogTitle,{children:e.labels.generateFootballPostMatchModalTitle}),s.jsx(h.Divider,{}),s.jsx(h.DialogContent,{sx:{overflowX:"hidden"},children:s.jsxs(s.Fragment,{children:[s.jsxs(h.FormControl,{size:"sm",sx:{mb:2},children:[s.jsx(h.FormLabel,{children:e.labels.language}),s.jsx(h.Select,{value:t,onChange:(te,ne)=>ne&&n(ne),indicator:null,disabled:g,startDecorator:s.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(qn[t]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(qn[t]||"gb").toLowerCase()}.png`,alt:((Z=Object.values(Te).find(te=>te.key===t))==null?void 0:Z.name)||"Language"}),sx:{minWidth:220,minHeight:38},children:Object.values(Te).map(te=>s.jsxs(h.Option,{value:te.key,label:te.name,children:[s.jsx(h.ListItemDecorator,{children:s.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(qn[te.key]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(qn[te.key]||"gb").toLowerCase()}.png`,alt:te.name})}),te.name]},te.key))}),s.jsx(h.FormHelperText,{children:e.labels.targetLanguageDescription})]}),s.jsxs(h.Stepper,{sx:{my:2,width:"100%","--StepIndicator-size":"3rem","--Step-connectorInset":"0px",[`& .${Ti.root}`]:{borderWidth:3},[`& .${fr.root}::after`]:{height:3},[`& .${fr.completed}`]:{[`& .${Ti.root}`]:{borderColor:"primary.300",color:"primary.300"},"&::after":{bgcolor:"primary.300"}},[`& .${fr.active}`]:{[`& .${Ti.root}`]:{borderColor:"currentColor"}},[`& .${fr.disabled} *`]:{color:"neutral.outlinedDisabledColor"}},children:[s.jsx(h.Step,{active:d==="search",orientation:"vertical",indicator:s.jsx(h.Tooltip,{title:d==="preview"?e.labels.searchMatchTooltip:"",placement:"right",children:s.jsx(h.StepIndicator,{variant:d==="search"?"solid":"outlined",color:"primary",onClick:()=>{d==="preview"&&(b(null),p("search"))},onKeyDown:te=>{(te.key==="Enter"||te.key===" ")&&d==="preview"&&(te.preventDefault(),b(null),p("search"))},sx:B({cursor:d==="preview"?"pointer":"default"},d==="preview"&&{animation:"pulse 2s infinite","@keyframes pulse":{"0%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0.7)"},"70%":{boxShadow:"0 0 0 10px rgba(25, 118, 210, 0)"},"100%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0)"}},"&:hover":{animation:"none",boxShadow:"0 0 0 4px rgba(25, 118, 210, 0.3)"}}),role:"button",tabIndex:d==="preview"?0:-1,children:s.jsx(wb,{})})}),children:s.jsx(h.Typography,{sx:B({textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},d==="preview"&&{cursor:"pointer"}),onClick:()=>{d==="preview"&&(b(null),p("search"))},onKeyDown:te=>{(te.key==="Enter"||te.key===" ")&&d==="preview"&&(te.preventDefault(),b(null),p("search"))},role:"button",tabIndex:d==="preview"?0:-1,children:e.labels.searchMatch})}),s.jsx(h.Step,{orientation:"vertical",active:d==="preview",disabled:d!=="preview",indicator:s.jsx(h.StepIndicator,{variant:d==="preview"?"solid":"outlined",color:"primary",children:s.jsx(Sb,{})}),children:s.jsx(h.Typography,{sx:{textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},children:e.labels.preview})})]}),s.jsx(qN,{entityType:e.entityType,step:d,labels:e.labels,useFramingGuidelines:S,matchFilters:r,competitionsScope:e.competitionsScope,generatedEntity:m,isGenerating:g,setUseFramingGuidelines:A,onChangeTeams:G,onChangeDates:oe}),u?s.jsx(h.Sheet,{variant:"outlined",sx:{p:1,borderRadius:"sm",bgcolor:"background.surface"},children:s.jsx(KN,{step:d,loading:X||g,matches:Y,selectedMatchId:l,generatedEntity:m,labels:e.labels,pagination:D,teamIdsFilter:r.teamIds,setPollRequestBody:w,setPage:a,setSelectedMatchId:c,onGenerate:ce,entityType:e.entityType,setGeneratedEntity:b})}):s.jsx(s.Fragment,{})]})}),s.jsxs(h.DialogActions,{children:[s.jsx(h.Button,{variant:"outlined",color:"primary",loading:x,disabled:!M||g,onClick:()=>se("goto"),children:e.labels.createAndGoTo}),s.jsx(h.Button,{variant:"solid",color:"primary",loading:x,disabled:!M||g,onClick:()=>se("continue"),children:e.labels.createAndContinue}),s.jsx(h.Button,{disabled:g||x,variant:"plain",color:"neutral",onClick:te=>{te.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]}),s.jsx(Ge,{showToast:F,color:N,message:O,hideToast:L})]})})},XN=e=>{const[t,n]=y.useState(!1),r=e.generatedEntity,i=()=>{if(!r)return s.jsx(h.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.noPreviewAvailable})});const a=()=>s.jsxs(h.Table,{variant:"outlined",size:"sm",sx:{width:"100%",maxWidth:"100%","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[s.jsx("thead",{children:s.jsx("tr",{children:s.jsx("th",{children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.questions})})})}),s.jsx("tbody",{children:r.questions.map((l,c)=>{var u;return s.jsx("tr",{children:s.jsx("td",{children:s.jsxs(h.Typography,{level:"body-sm",children:[l.question," ",s.jsx(h.Typography,{children:(u=l.options)==null?void 0:u.map((f,d)=>s.jsx(h.Chip,{color:f.correct?"success":"neutral",variant:f.correct?"solid":"outlined",sx:{mr:1},size:"sm",children:f.option},`question-option-${d}`))})]})})},`question-${c}`)})})]});return s.jsxs(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:[s.jsxs(h.Box,{role:"button",tabIndex:0,onClick:()=>n(!t),onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),n(c=>!c))},sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:"pointer","&:hover":{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}},children:[s.jsx(h.Typography,{level:"body-sm",sx:{flexGrow:1},children:r.title}),s.jsx(h.Tooltip,{title:t?"":e.labels.expand,children:s.jsx(h.IconButton,{"aria-label":"expand row",variant:"plain",color:"neutral",size:"sm",sx:{"&:hover":{backgroundColor:"background.surface"}},children:t?s.jsx(Ib,{}):s.jsx(Is,{})})})]}),s.jsx(h.Box,{sx:{display:t?"block":"none",p:1},children:t?a():null})]})},o=()=>!e.races||e.races.length===0?s.jsx(h.Box,{sx:{height:240,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(h.Typography,{level:"body-sm",children:e.labels.noRacesFound})}):s.jsx(h.Sheet,{sx:{overflowY:"auto",borderRadius:"sm",maxHeight:"300px",my:.5},children:e.races.map(a=>{var u;const l=a.status==="Completed",c=a.status==="Scheduled";return s.jsxs(y.Fragment,{children:[s.jsxs(h.Box,{onClick:l?()=>e.setSelectedRaceId(a.id.toString()):void 0,onKeyDown:l?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),e.setSelectedRaceId(a.id.toString()))}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:"xs",p:1,borderRadius:"sm",cursor:l?"pointer":"not-allowed",opacity:c?.6:1,"&:hover":l?{backgroundColor:"var(--joy-palette-neutral-softBg, rgba(0,0,0,0.04))"}:{},backgroundColor:e.selectedRaceId===a.id.toString()?"rgba(0,0,0,0.04)":"transparent"},children:[s.jsx(h.Radio,{size:"sm",name:"selectedRace",value:a.id.toString(),checked:e.selectedRaceId===a.id.toString(),disabled:!l,onChange:l?f=>e.setSelectedRaceId(f.target.value):void 0,sx:{mr:1}}),s.jsx(h.Tooltip,{title:a.competition.name+((u=a.competition.location)!=null&&u.country?` (${a.competition.location.country})`:""),children:s.jsx(h.Avatar,{src:a.circuit.image||Le.competition,sx:{width:"15px",height:"15px"},slotProps:{img:{loading:"lazy"}}})}),s.jsxs(h.Typography,{level:"body-sm",children:["[",ft(a.date).format("HH:mm DD.MM.YYYY"),"]"]}),s.jsx(h.Typography,{level:"body-sm",fontWeight:600,children:a.competition.name}),s.jsx(h.Typography,{level:"body-sm",children:a.circuit.name}),s.jsx(h.Chip,{variant:l?"solid":"outlined",color:l?"success":"neutral",size:"sm",children:a.status==="Completed"?"Finished":"Upcoming"})]}),s.jsx(h.Divider,{sx:{my:.5}})]},`race-${a.id}`)})});return e.loading?s.jsx(h.Box,{sx:{height:240},children:s.jsx(yi,{my:0})}):s.jsxs(s.Fragment,{children:[e.step==="search"?o():i(),s.jsx(h.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:s.jsx(h.Button,{size:"sm",color:"primary",variant:"outlined",disabled:!e.selectedRaceId,onClick:e.onGenerate,children:e.step==="search"?e.labels.generate:e.labels.regenerate})})]})},Eb=e=>{const t=e==null?void 0:e.toLowerCase();return t&&Ri[t]?Ri[t].key:"en"},Gs=()=>new Date().getFullYear(),ZN=()=>{const e=Gs();return[e,e-1,e-2]},ez={Login:bM,InformationInput:Ot,RichText:wc,HeaderButtons:YP,MarketSelection:RM,Accordion:OT,DynamicFields:uD,BasicSelect:MT,BooleanSwitch:pn,Branding:VP,ProfileSearchSelect:e2,RangeCalendar:lD,CompetitionSearchSelect:XL,Related:$M,Images:KR,Duration:sD,DatePickerComponent:vo,Flags:HR,Spinner:yi,Tags:jm,Toast:Ge,AdContent:RT,Match:MM,Winners:UB,CompetitionsSearchSelect:ZL,TeamsSearchSelect:zm,CustomSelect:ZM,Schedule:GM,NoPermissionCard:cD,CustomFlatpickrCalendar:ou,ContextSelectFilter:HB,NumberInput:Pu,EntityContext:w$,MiniGamesImages:I$,AuthRequirement:A$,SortableList:gN,ItemsPerPageFilter:mN,ImageCard:So,RelatedRelationship:_N,BonusPointsRelatedQuiz:DN,ExportUsersLeads:ON,SignOutButton:mg,BasicSortableList:MN,WidgetEmbedCode:LN,WidgetListEmbedCode:FN,AdvancedProfileSearchSelect:NN,FormatNumber:zN,PlayersSearchSelect:VN,GenerateFootballPostMatchModal:JN,GenerateFormula1PostEventModal:e=>{var M,V;const[t,n]=y.useState(Eb(e.defaultLanguage)),[r,i]=y.useState(Gs()),[o,a]=y.useState([]),[l,c]=y.useState(!1),[u,f]=y.useState(""),[d,p]=y.useState("search"),[g,v]=y.useState(!1),[m,b]=y.useState(null),[C,w]=y.useState(!1),[x,I]=y.useState(!1),[S,A]=y.useState(""),[E,k]=y.useState("danger"),F=y.useMemo(()=>!!m,[m]);y.useEffect(()=>{e.isOpen?N(Gs()):(n(Eb(e.defaultLanguage)),i(Gs()),a([]),f(""),p("search"),b(null))},[e.isOpen]);const{https:W}=We(),O=()=>{A(""),I(!1)},T=Y=>{let X="",D="danger";switch(Y){case"on_generate_failed":X=e.labels.onEntityGenerateErrorMessage;break;case"on_create":X=e.labels.onEntityCreateMessage,D="success";break;case"on_create_failed":X=e.labels.onEntityCreateErrorMessage;break;case"fetch_races_failed":X=e.labels.fetchRacesErrorMessage;break}k(D),A(X),I(!0)},N=Y=>_(this,null,function*(){c(!0);const X=yield W.apiSports.getRaces(Y),D=yield X.json();if(!X.ok){console.error("Error fetching races:",D),c(!1),a([]),T("fetch_races_failed");return}const G=(D.response||[]).sort((te,ne)=>new Date(ne.date).getTime()-new Date(te.date).getTime()),oe=G.filter(te=>te.status==="Completed"),ce=G.filter(te=>te.status==="Scheduled"),Z=[...ce.length>0?[ce.sort((te,ne)=>new Date(te.date).getTime()-new Date(ne.date).getTime())[0]]:[],...oe];a(Z),c(!1)}),H=Y=>{i(Y),f(""),N(Y)},j=()=>_(this,null,function*(){v(!0);const Y=yield W.generatePostMatchQuiz({sportType:"formula1",lang:t,eventId:u});if(!(Y!=null&&Y.ok)){const D=yield Y==null?void 0:Y.json();console.error("Failed to generate AI content",D),v(!1),T("on_generate_failed");return}const X=yield Y==null?void 0:Y.json();b(X),v(!1),p("preview")}),$=Y=>_(this,null,function*(){w(!0);const X=m,D=yield W.createClassicQuiz(X),L=yield D.json();if(!(D!=null&&D.ok)){console.error("Failed to create content",L),w(!1),T("on_create_failed");return}if(w(!1),Y==="goto"){T("on_create"),e.toggleModal(),e.fetchEntityById(L.data.id);return}T("on_create")});return s.jsx(h.Modal,{open:e.isOpen,onClose:()=>{g||C||e.toggleModal()},children:s.jsxs(s.Fragment,{children:[s.jsxs(h.ModalDialog,{sx:{backgroundColor:"white",minWidth:"50%",height:900},children:[s.jsx(h.DialogTitle,{children:e.labels.generateFormulaOnePostEventModalTitle}),s.jsx(h.Divider,{}),s.jsx(h.DialogContent,{sx:{overflowX:"hidden"},children:s.jsxs(s.Fragment,{children:[s.jsxs(h.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"},gap:2,mb:2},children:[s.jsxs(h.FormControl,{size:"sm",children:[s.jsx(h.FormLabel,{children:e.labels.language}),s.jsx(h.Select,{value:t,onChange:(Y,X)=>X&&n(X),indicator:null,disabled:g,startDecorator:s.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(qn[t]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(qn[t]||"gb").toLowerCase()}.png`,alt:((M=Object.values(Te).find(Y=>Y.key===t))==null?void 0:M.name)||"Language"}),sx:{minHeight:38},children:Object.values(Te).map(Y=>s.jsxs(h.Option,{value:Y.key,label:Y.name,children:[s.jsx(h.ListItemDecorator,{children:s.jsx("img",{loading:"lazy",width:"20",srcSet:`https://flagcdn.com/w40/${(qn[Y.key]||"gb").toLowerCase()}.png 2x`,src:`https://flagcdn.com/w20/${(qn[Y.key]||"gb").toLowerCase()}.png`,alt:Y.name})}),Y.name]},Y.key))}),s.jsx(h.FormHelperText,{children:e.labels.targetLanguageDescription})]}),s.jsxs(h.FormControl,{size:"sm",children:[s.jsx(h.FormLabel,{children:e.labels.season}),s.jsx(h.Select,{value:r,onChange:(Y,X)=>X&&H(X),disabled:g||!!m,sx:{minHeight:38},children:ZN().map(Y=>s.jsx(h.Option,{value:Y,children:Y},Y))}),s.jsx(h.FormHelperText,{children:e.labels.seasonDescription})]})]}),s.jsxs(h.Stepper,{sx:{my:2,width:"100%","--StepIndicator-size":"3rem","--Step-connectorInset":"0px",[`& .${Ti.root}`]:{borderWidth:3},[`& .${fr.root}::after`]:{height:3},[`& .${fr.completed}`]:{[`& .${Ti.root}`]:{borderColor:"primary.300",color:"primary.300"},"&::after":{bgcolor:"primary.300"}},[`& .${fr.active}`]:{[`& .${Ti.root}`]:{borderColor:"currentColor"}},[`& .${fr.disabled} *`]:{color:"neutral.outlinedDisabledColor"}},children:[s.jsx(h.Step,{active:d==="search",orientation:"vertical",indicator:s.jsx(h.Tooltip,{title:d==="preview"?(V=e.labels)==null?void 0:V.searchRaceTooltip:"",placement:"right",children:s.jsx(h.StepIndicator,{variant:d==="search"?"solid":"outlined",color:"primary",onClick:()=>{d==="preview"&&(b(null),p("search"))},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&d==="preview"&&(Y.preventDefault(),b(null),p("search"))},sx:B({cursor:d==="preview"?"pointer":"default"},d==="preview"&&{animation:"pulse 2s infinite","@keyframes pulse":{"0%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0.7)"},"70%":{boxShadow:"0 0 0 10px rgba(25, 118, 210, 0)"},"100%":{boxShadow:"0 0 0 0 rgba(25, 118, 210, 0)"}},"&:hover":{animation:"none",boxShadow:"0 0 0 4px rgba(25, 118, 210, 0.3)"}}),role:"button",tabIndex:d==="preview"?0:-1,children:s.jsx(wb,{})})}),children:s.jsx(h.Typography,{sx:B({textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},d==="preview"&&{cursor:"pointer"}),onClick:()=>{d==="preview"&&(b(null),p("search"))},onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&d==="preview"&&(Y.preventDefault(),b(null),p("search"))},role:"button",tabIndex:d==="preview"?0:-1,children:e.labels.searchRace})}),s.jsx(h.Step,{orientation:"vertical",active:d==="preview",disabled:d!=="preview",indicator:s.jsx(h.StepIndicator,{variant:d==="preview"?"solid":"outlined",color:"primary",children:s.jsx(Sb,{})}),children:s.jsx(h.Typography,{sx:{textTransform:"uppercase",fontWeight:"lg",fontSize:"0.75rem"},children:e.labels.preview})})]}),s.jsx(h.Sheet,{variant:"outlined",sx:{mt:2,p:1,borderRadius:"sm",bgcolor:"background.surface"},children:s.jsx(XN,{step:d,loading:l||g,races:o,selectedRaceId:u,generatedEntity:m,labels:e.labels,setSelectedRaceId:f,onGenerate:j,setGeneratedEntity:b})})]})}),s.jsxs(h.DialogActions,{children:[s.jsx(h.Button,{variant:"outlined",color:"primary",loading:C,disabled:!F||g,onClick:()=>$("goto"),children:e.labels.createAndGoTo}),s.jsx(h.Button,{variant:"solid",color:"primary",loading:C,disabled:!F||g,onClick:()=>$("continue"),children:e.labels.createAndContinue}),s.jsx(h.Button,{disabled:g||C,variant:"plain",color:"neutral",onClick:Y=>{Y.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]}),s.jsx(Ge,{showToast:x,color:E,message:S,hideToast:O})]})})}},kb=y.createContext(null),tz=({children:e})=>s.jsx(kb.Provider,{value:ez,children:e}),nz=()=>{const e=y.useContext(kb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},_b=425,Pb=1024,rz=()=>{const[e,t]=y.useState(window.innerWidth<=Pb),[n,r]=y.useState(window.innerWidth<=_b);return y.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=Pb),r(window.innerWidth<=_b)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}};var Db=(e=>(e.BOOLEAN="BOOLEAN",e.NUMBER="NUMBER",e.ENUM="ENUM",e.FREE_INPUT="FREE_INPUT",e))(Db||{}),Ob=(e=>(e.ACTIVE="ACTIVE",e.SETTLED="SETTLED",e.VOID="VOID",e))(Ob||{});class iz{constructor(){J(this,"id","");J(this,"question","");J(this,"status","ACTIVE");J(this,"void_reason",null);J(this,"points",0);J(this,"outcome_type",null);J(this,"valid_outcomes",null);J(this,"outcome",null)}}class oz{constructor(){J(this,"id","");J(this,"title","");J(this,"description","");J(this,"type","EVENT");J(this,"rules","");J(this,"status","PENDING");J(this,"images",null);J(this,"related",[]);J(this,"custom_fields",null);J(this,"predictions_cutoff","");J(this,"fixtures",[]);J(this,"tiebreaker",{stat_tiebreaker_enabled:!1,stat_total:0})}}const az={APIProvider:WS,AuthProvider:GS,AuthContext:qf,ComponentProvider:tz,useComponentContext:nz,useAPIContext:We,useIsMobile:rz,constants:{supportedLanguages:Te,languagesMap:Ri}};Ie.EventGameFixtureStatusEnum=Ob,Ie.EventGameFixturesModel=iz,Ie.EventGameOutcomeTypeEnum=Db,Ie.EventGameRequestBody=oz,Ie.default=az,Object.defineProperties(Ie,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|