axiodb 9.7.9 → 11.9.12
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/README.md +67 -2
- package/lib/Services/Auth/AuthEvents.service.d.ts +15 -0
- package/lib/Services/Auth/AuthEvents.service.js +17 -0
- package/lib/Services/Auth/AuthEvents.service.js.map +1 -0
- package/lib/Services/Auth/AuthSeeder.service.d.ts +16 -0
- package/lib/Services/Auth/AuthSeeder.service.js +99 -0
- package/lib/Services/Auth/AuthSeeder.service.js.map +1 -0
- package/lib/Services/Auth/AuthService.service.d.ts +53 -0
- package/lib/Services/Auth/AuthService.service.js +221 -0
- package/lib/Services/Auth/AuthService.service.js.map +1 -0
- package/lib/Services/Auth/ConfigDatabase.service.d.ts +22 -0
- package/lib/Services/Auth/ConfigDatabase.service.js +47 -0
- package/lib/Services/Auth/ConfigDatabase.service.js.map +1 -0
- package/lib/Services/Auth/CookieCodec.helper.d.ts +10 -0
- package/lib/Services/Auth/CookieCodec.helper.js +30 -0
- package/lib/Services/Auth/CookieCodec.helper.js.map +1 -0
- package/lib/Services/Auth/LoginRateLimiter.service.d.ts +35 -0
- package/lib/Services/Auth/LoginRateLimiter.service.js +89 -0
- package/lib/Services/Auth/LoginRateLimiter.service.js.map +1 -0
- package/lib/Services/Auth/PasswordHasher.helper.d.ts +9 -0
- package/lib/Services/Auth/PasswordHasher.helper.js +54 -0
- package/lib/Services/Auth/PasswordHasher.helper.js.map +1 -0
- package/lib/Services/Auth/PermissionChecker.helper.d.ts +21 -0
- package/lib/Services/Auth/PermissionChecker.helper.js +41 -0
- package/lib/Services/Auth/PermissionChecker.helper.js.map +1 -0
- package/lib/Services/Auth/SessionStore.service.d.ts +23 -0
- package/lib/Services/Auth/SessionStore.service.js +96 -0
- package/lib/Services/Auth/SessionStore.service.js.map +1 -0
- package/lib/Services/Collection/collection.operation.d.ts +6 -0
- package/lib/Services/Collection/collection.operation.js +10 -0
- package/lib/Services/Collection/collection.operation.js.map +1 -1
- package/lib/Services/Index/Index.service.d.ts +20 -0
- package/lib/Services/Index/Index.service.js +25 -1
- package/lib/Services/Index/Index.service.js.map +1 -1
- package/lib/Services/Indexation.operation.d.ts +4 -0
- package/lib/Services/Indexation.operation.js +20 -6
- package/lib/Services/Indexation.operation.js.map +1 -1
- package/lib/client/AxioDBCloud.client.d.ts +20 -1
- package/lib/client/AxioDBCloud.client.js +54 -3
- package/lib/client/AxioDBCloud.client.js.map +1 -1
- package/lib/client/CollectionProxy.d.ts +4 -0
- package/lib/client/CollectionProxy.js +11 -0
- package/lib/client/CollectionProxy.js.map +1 -1
- package/lib/client/types/client.types.d.ts +8 -0
- package/lib/client/types/client.types.js.map +1 -1
- package/lib/config/Interfaces/Auth/auth.interface.d.ts +70 -0
- package/lib/config/Interfaces/Auth/auth.interface.js +4 -0
- package/lib/config/Interfaces/Auth/auth.interface.js.map +1 -0
- package/lib/config/Interfaces/Operation/Indexation.operation.interface.d.ts +2 -0
- package/lib/config/Keys/Permissions.d.ts +64 -0
- package/lib/config/Keys/Permissions.js +121 -0
- package/lib/config/Keys/Permissions.js.map +1 -0
- package/lib/server/config/keys.d.ts +2 -2
- package/lib/server/config/keys.js +109 -1
- package/lib/server/config/keys.js.map +1 -1
- package/lib/server/config/server.js +6 -0
- package/lib/server/config/server.js.map +1 -1
- package/lib/server/controller/Auth/Auth.controller.d.ts +12 -0
- package/lib/server/controller/Auth/Auth.controller.js +162 -0
- package/lib/server/controller/Auth/Auth.controller.js.map +1 -0
- package/lib/server/controller/Auth/RoleManagement.controller.d.ts +9 -0
- package/lib/server/controller/Auth/RoleManagement.controller.js +89 -0
- package/lib/server/controller/Auth/RoleManagement.controller.js.map +1 -0
- package/lib/server/controller/Auth/UserManagement.controller.d.ts +11 -0
- package/lib/server/controller/Auth/UserManagement.controller.js +122 -0
- package/lib/server/controller/Auth/UserManagement.controller.js.map +1 -0
- package/lib/server/controller/Collections/Collection.controller.js +10 -0
- package/lib/server/controller/Collections/Collection.controller.js.map +1 -1
- package/lib/server/controller/Database/Databse.controller.js +17 -0
- package/lib/server/controller/Database/Databse.controller.js.map +1 -1
- package/lib/server/controller/Index/Index.controller.d.ts +35 -0
- package/lib/server/controller/Index/Index.controller.js +148 -0
- package/lib/server/controller/Index/Index.controller.js.map +1 -0
- package/lib/server/controller/Operation/CRUD.controller.js +31 -0
- package/lib/server/controller/Operation/CRUD.controller.js.map +1 -1
- package/lib/server/helper/responseBuilder.helper.d.ts +8 -0
- package/lib/server/helper/responseBuilder.helper.js +11 -1
- package/lib/server/helper/responseBuilder.helper.js.map +1 -1
- package/lib/server/middleware/auth.middleware.d.ts +14 -0
- package/lib/server/middleware/auth.middleware.js +64 -0
- package/lib/server/middleware/auth.middleware.js.map +1 -0
- package/lib/server/middleware/permission.middleware.d.ts +6 -0
- package/lib/server/middleware/permission.middleware.js +36 -0
- package/lib/server/middleware/permission.middleware.js.map +1 -0
- package/lib/server/public/AxioControl/.vite/manifest.json +2 -2
- package/lib/server/public/AxioControl/.vite/ssr-manifest.json +10 -0
- package/lib/server/public/AxioControl/assets/index-D3V1EZ2f.css +1 -0
- package/lib/server/public/AxioControl/assets/index-DyJg6FRw.js +75 -0
- package/lib/server/public/AxioControl/index.html +2 -2
- package/lib/server/public/AxioControl/sw.js +1 -1
- package/lib/server/router/Router.js +18 -1
- package/lib/server/router/Router.js.map +1 -1
- package/lib/server/router/Routers/Auth.routes.d.ts +2 -0
- package/lib/server/router/Routers/Auth.routes.js +27 -0
- package/lib/server/router/Routers/Auth.routes.js.map +1 -0
- package/lib/server/router/Routers/Collection.routes.js +20 -3
- package/lib/server/router/Routers/Collection.routes.js.map +1 -1
- package/lib/server/router/Routers/DB.routes.js +8 -5
- package/lib/server/router/Routers/DB.routes.js.map +1 -1
- package/lib/server/router/Routers/Index.routes.d.ts +7 -0
- package/lib/server/router/Routers/Index.routes.js +38 -0
- package/lib/server/router/Routers/Index.routes.js.map +1 -0
- package/lib/server/router/Routers/Operation.routes.js +31 -10
- package/lib/server/router/Routers/Operation.routes.js.map +1 -1
- package/lib/server/router/Routers/RoleManagement.routes.d.ts +2 -0
- package/lib/server/router/Routers/RoleManagement.routes.js +28 -0
- package/lib/server/router/Routers/RoleManagement.routes.js.map +1 -0
- package/lib/server/router/Routers/UserManagement.routes.d.ts +2 -0
- package/lib/server/router/Routers/UserManagement.routes.js +38 -0
- package/lib/server/router/Routers/UserManagement.routes.js.map +1 -0
- package/lib/tcp/config/keys.d.ts +8 -0
- package/lib/tcp/config/keys.js +8 -0
- package/lib/tcp/config/keys.js.map +1 -1
- package/lib/tcp/config/permissions.d.ts +16 -0
- package/lib/tcp/config/permissions.js +46 -0
- package/lib/tcp/config/permissions.js.map +1 -0
- package/lib/tcp/config/protocol.js +13 -0
- package/lib/tcp/config/protocol.js.map +1 -1
- package/lib/tcp/config/server.d.ts +1 -1
- package/lib/tcp/config/server.js +28 -6
- package/lib/tcp/config/server.js.map +1 -1
- package/lib/tcp/connection/ConnectionManager.d.ts +19 -0
- package/lib/tcp/connection/ConnectionManager.js +31 -0
- package/lib/tcp/connection/ConnectionManager.js.map +1 -1
- package/lib/tcp/connection/RequestContext.d.ts +4 -1
- package/lib/tcp/connection/RequestContext.js +4 -1
- package/lib/tcp/connection/RequestContext.js.map +1 -1
- package/lib/tcp/handler/CommandHandler.d.ts +5 -1
- package/lib/tcp/handler/CommandHandler.js +34 -4
- package/lib/tcp/handler/CommandHandler.js.map +1 -1
- package/lib/tcp/handler/handlers/Auth.handler.d.ts +16 -0
- package/lib/tcp/handler/handlers/Auth.handler.js +91 -0
- package/lib/tcp/handler/handlers/Auth.handler.js.map +1 -0
- package/lib/tcp/handler/handlers/Operation.handler.d.ts +4 -0
- package/lib/tcp/handler/handlers/Operation.handler.js +27 -0
- package/lib/tcp/handler/handlers/Operation.handler.js.map +1 -1
- package/lib/tcp/types/command.types.d.ts +2 -0
- package/lib/tcp/types/command.types.js +5 -0
- package/lib/tcp/types/command.types.js.map +1 -1
- package/lib/tcp/types/protocol.types.d.ts +2 -0
- package/lib/tcp/types/protocol.types.js.map +1 -1
- package/package.json +2 -1
- package/lib/server/public/AxioControl/assets/index-BRkVgnlw.js +0 -75
- package/lib/server/public/AxioControl/assets/index-C8TNGVxT.css +0 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var r2=Object.defineProperty,o2=Object.defineProperties;var u2=Object.getOwnPropertyDescriptors;var qr=Object.getOwnPropertySymbols;var Ep=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable;var Vs=(n,a)=>(a=Symbol[n])?a:Symbol.for("Symbol."+n),c2=n=>{throw TypeError(n)},kc=Math.pow,Tp=(n,a,i)=>a in n?r2(n,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[a]=i,K=(n,a)=>{for(var i in a||(a={}))Ep.call(a,i)&&Tp(n,i,a[i]);if(qr)for(var i of qr(a))Ap.call(a,i)&&Tp(n,i,a[i]);return n},oe=(n,a)=>o2(n,u2(a));var ot=(n,a)=>{var i={};for(var r in n)Ep.call(n,r)&&a.indexOf(r)<0&&(i[r]=n[r]);if(n!=null&&qr)for(var r of qr(n))a.indexOf(r)<0&&Ap.call(n,r)&&(i[r]=n[r]);return i};var d2=(n,a)=>()=>(a||n((a={exports:{}}).exports,a),a.exports);var ve=(n,a,i)=>new Promise((r,o)=>{var f=g=>{try{p(i.next(g))}catch(m){o(m)}},d=g=>{try{p(i.throw(g))}catch(m){o(m)}},p=g=>g.done?r(g.value):Promise.resolve(g.value).then(f,d);p((i=i.apply(n,a)).next())}),_a=function(n,a){this[0]=n,this[1]=a},Hc=(n,a,i)=>{var r=(d,p,g,m)=>{try{var y=i[d](p),v=(p=y.value)instanceof _a,b=y.done;Promise.resolve(v?p[0]:p).then(j=>v?r(d==="return"?d:"next",p[1]?{done:j.done,value:j.value}:j,g,m):g({value:j,done:b})).catch(j=>r("throw",j,g,m))}catch(j){m(j)}},o=d=>f[d]=p=>new Promise((g,m)=>r(d,p,g,m)),f={};return i=i.apply(n,a),f[Vs("asyncIterator")]=()=>f,o("next"),o("throw"),o("return"),f},Pc=n=>{var a=n[Vs("asyncIterator")],i=!1,r,o={};return a==null?(a=n[Vs("iterator")](),r=f=>o[f]=d=>a[f](d)):(a=a.call(n),r=f=>o[f]=d=>{if(i){if(i=!1,f==="throw")throw d;return d}return i=!0,{done:!1,value:new _a(new Promise(p=>{var g=a[f](d);g instanceof Object||c2("Object expected"),p(g)}),1)}}),o[Vs("iterator")]=()=>o,r("next"),"throw"in a?r("throw"):o.throw=f=>{throw f},"return"in a&&r("return"),o},Cp=(n,a,i)=>(a=n[Vs("asyncIterator")])?a.call(n):(n=n[Vs("iterator")](),a={},i=(r,o)=>(o=n[r])&&(a[r]=f=>new Promise((d,p,g)=>(f=o.call(n,f),g=f.done,Promise.resolve(f.value).then(m=>d({value:m,done:g}),p)))),i("next"),i("return"),a);var QE=d2(Ce=>{(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const f of o)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(o){const f={};return o.integrity&&(f.integrity=o.integrity),o.referrerPolicy&&(f.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?f.credentials="include":o.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(o){if(o.ep)return;o.ep=!0;const f=i(o);fetch(o.href,f)}})();function f2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var qc={exports:{}},tl={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Rp;function h2(){if(Rp)return tl;Rp=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(r,o,f){var d=null;if(f!==void 0&&(d=""+f),o.key!==void 0&&(d=""+o.key),"key"in o){f={};for(var p in o)p!=="key"&&(f[p]=o[p])}else f=o;return o=f.ref,{$$typeof:n,type:r,key:d,ref:o!==void 0?o:null,props:f}}return tl.Fragment=a,tl.jsx=i,tl.jsxs=i,tl}var Dp;function m2(){return Dp||(Dp=1,qc.exports=h2()),qc.exports}var c=m2(),Yc={exports:{}},ge={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Mp;function p2(){if(Mp)return ge;Mp=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function b(C){return C===null||typeof C!="object"?null:(C=v&&C[v]||C["@@iterator"],typeof C=="function"?C:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,E={};function T(C,Y,W){this.props=C,this.context=Y,this.refs=E,this.updater=W||j}T.prototype.isReactComponent={},T.prototype.setState=function(C,Y){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,Y,"setState")},T.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function D(){}D.prototype=T.prototype;function U(C,Y,W){this.props=C,this.context=Y,this.refs=E,this.updater=W||j}var M=U.prototype=new D;M.constructor=U,N(M,T.prototype),M.isPureReactComponent=!0;var H=Array.isArray,L={H:null,A:null,T:null,S:null,V:null},$=Object.prototype.hasOwnProperty;function G(C,Y,W,J,ne,Ne){return W=Ne.ref,{$$typeof:n,type:C,key:Y,ref:W!==void 0?W:null,props:Ne}}function Z(C,Y){return G(C.type,Y,void 0,void 0,void 0,C.props)}function se(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function he(C){var Y={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(W){return Y[W]})}var me=/\/+/g;function de(C,Y){return typeof C=="object"&&C!==null&&C.key!=null?he(""+C.key):Y.toString(36)}function Re(){}function qe(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(Re,Re):(C.status="pending",C.then(function(Y){C.status==="pending"&&(C.status="fulfilled",C.value=Y)},function(Y){C.status==="pending"&&(C.status="rejected",C.reason=Y)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function be(C,Y,W,J,ne){var Ne=typeof C;(Ne==="undefined"||Ne==="boolean")&&(C=null);var fe=!1;if(C===null)fe=!0;else switch(Ne){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(C.$$typeof){case n:case a:fe=!0;break;case y:return fe=C._init,be(fe(C._payload),Y,W,J,ne)}}if(fe)return ne=ne(C),fe=J===""?"."+de(C,0):J,H(ne)?(W="",fe!=null&&(W=fe.replace(me,"$&/")+"/"),be(ne,Y,W,"",function(sn){return sn})):ne!=null&&(se(ne)&&(ne=Z(ne,W+(ne.key==null||C&&C.key===ne.key?"":(""+ne.key).replace(me,"$&/")+"/")+fe)),Y.push(ne)),1;fe=0;var xt=J===""?".":J+":";if(H(C))for(var Be=0;Be<C.length;Be++)J=C[Be],Ne=xt+de(J,Be),fe+=be(J,Y,W,Ne,ne);else if(Be=b(C),typeof Be=="function")for(C=Be.call(C),Be=0;!(J=C.next()).done;)J=J.value,Ne=xt+de(J,Be++),fe+=be(J,Y,W,Ne,ne);else if(Ne==="object"){if(typeof C.then=="function")return be(qe(C),Y,W,J,ne);throw Y=String(C),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return fe}function P(C,Y,W){if(C==null)return C;var J=[],ne=0;return be(C,J,"","",function(Ne){return Y.call(W,Ne,ne++)}),J}function Q(C){if(C._status===-1){var Y=C._result;Y=Y(),Y.then(function(W){(C._status===0||C._status===-1)&&(C._status=1,C._result=W)},function(W){(C._status===0||C._status===-1)&&(C._status=2,C._result=W)}),C._status===-1&&(C._status=0,C._result=Y)}if(C._status===1)return C._result.default;throw C._result}var ee=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)};function ye(){}return ge.Children={map:P,forEach:function(C,Y,W){P(C,function(){Y.apply(this,arguments)},W)},count:function(C){var Y=0;return P(C,function(){Y++}),Y},toArray:function(C){return P(C,function(Y){return Y})||[]},only:function(C){if(!se(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},ge.Component=T,ge.Fragment=i,ge.Profiler=o,ge.PureComponent=U,ge.StrictMode=r,ge.Suspense=g,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,ge.__COMPILER_RUNTIME={__proto__:null,c:function(C){return L.H.useMemoCache(C)}},ge.cache=function(C){return function(){return C.apply(null,arguments)}},ge.cloneElement=function(C,Y,W){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var J=N({},C.props),ne=C.key,Ne=void 0;if(Y!=null)for(fe in Y.ref!==void 0&&(Ne=void 0),Y.key!==void 0&&(ne=""+Y.key),Y)!$.call(Y,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Y.ref===void 0||(J[fe]=Y[fe]);var fe=arguments.length-2;if(fe===1)J.children=W;else if(1<fe){for(var xt=Array(fe),Be=0;Be<fe;Be++)xt[Be]=arguments[Be+2];J.children=xt}return G(C.type,ne,void 0,void 0,Ne,J)},ge.createContext=function(C){return C={$$typeof:d,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:f,_context:C},C},ge.createElement=function(C,Y,W){var J,ne={},Ne=null;if(Y!=null)for(J in Y.key!==void 0&&(Ne=""+Y.key),Y)$.call(Y,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ne[J]=Y[J]);var fe=arguments.length-2;if(fe===1)ne.children=W;else if(1<fe){for(var xt=Array(fe),Be=0;Be<fe;Be++)xt[Be]=arguments[Be+2];ne.children=xt}if(C&&C.defaultProps)for(J in fe=C.defaultProps,fe)ne[J]===void 0&&(ne[J]=fe[J]);return G(C,Ne,void 0,void 0,null,ne)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(C){return{$$typeof:p,render:C}},ge.isValidElement=se,ge.lazy=function(C){return{$$typeof:y,_payload:{_status:-1,_result:C},_init:Q}},ge.memo=function(C,Y){return{$$typeof:m,type:C,compare:Y===void 0?null:Y}},ge.startTransition=function(C){var Y=L.T,W={};L.T=W;try{var J=C(),ne=L.S;ne!==null&&ne(W,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(ye,ee)}catch(Ne){ee(Ne)}finally{L.T=Y}},ge.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},ge.use=function(C){return L.H.use(C)},ge.useActionState=function(C,Y,W){return L.H.useActionState(C,Y,W)},ge.useCallback=function(C,Y){return L.H.useCallback(C,Y)},ge.useContext=function(C){return L.H.useContext(C)},ge.useDebugValue=function(){},ge.useDeferredValue=function(C,Y){return L.H.useDeferredValue(C,Y)},ge.useEffect=function(C,Y,W){var J=L.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return J.useEffect(C,Y)},ge.useId=function(){return L.H.useId()},ge.useImperativeHandle=function(C,Y,W){return L.H.useImperativeHandle(C,Y,W)},ge.useInsertionEffect=function(C,Y){return L.H.useInsertionEffect(C,Y)},ge.useLayoutEffect=function(C,Y){return L.H.useLayoutEffect(C,Y)},ge.useMemo=function(C,Y){return L.H.useMemo(C,Y)},ge.useOptimistic=function(C,Y){return L.H.useOptimistic(C,Y)},ge.useReducer=function(C,Y,W){return L.H.useReducer(C,Y,W)},ge.useRef=function(C){return L.H.useRef(C)},ge.useState=function(C){return L.H.useState(C)},ge.useSyncExternalStore=function(C,Y,W){return L.H.useSyncExternalStore(C,Y,W)},ge.useTransition=function(){return L.H.useTransition()},ge.version="19.1.1",ge}var Op;function Gd(){return Op||(Op=1,Yc.exports=p2()),Yc.exports}var S=Gd();const Yr=f2(S);var Gc={exports:{}},nl={},Xc={exports:{}},Fc={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Lp;function g2(){return Lp||(Lp=1,function(n){function a(P,Q){var ee=P.length;P.push(Q);e:for(;0<ee;){var ye=ee-1>>>1,C=P[ye];if(0<o(C,Q))P[ye]=Q,P[ee]=C,ee=ye;else break e}}function i(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var Q=P[0],ee=P.pop();if(ee!==Q){P[0]=ee;e:for(var ye=0,C=P.length,Y=C>>>1;ye<Y;){var W=2*(ye+1)-1,J=P[W],ne=W+1,Ne=P[ne];if(0>o(J,ee))ne<C&&0>o(Ne,J)?(P[ye]=Ne,P[ne]=ee,ye=ne):(P[ye]=J,P[W]=ee,ye=W);else if(ne<C&&0>o(Ne,ee))P[ye]=Ne,P[ne]=ee,ye=ne;else break e}}return Q}function o(P,Q){var ee=P.sortIndex-Q.sortIndex;return ee!==0?ee:P.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,p=d.now();n.unstable_now=function(){return d.now()-p}}var g=[],m=[],y=1,v=null,b=3,j=!1,N=!1,E=!1,T=!1,D=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate!="undefined"?setImmediate:null;function H(P){for(var Q=i(m);Q!==null;){if(Q.callback===null)r(m);else if(Q.startTime<=P)r(m),Q.sortIndex=Q.expirationTime,a(g,Q);else break;Q=i(m)}}function L(P){if(E=!1,H(P),!N)if(i(g)!==null)N=!0,$||($=!0,de());else{var Q=i(m);Q!==null&&be(L,Q.startTime-P)}}var $=!1,G=-1,Z=5,se=-1;function he(){return T?!0:!(n.unstable_now()-se<Z)}function me(){if(T=!1,$){var P=n.unstable_now();se=P;var Q=!0;try{e:{N=!1,E&&(E=!1,U(G),G=-1),j=!0;var ee=b;try{t:{for(H(P),v=i(g);v!==null&&!(v.expirationTime>P&&he());){var ye=v.callback;if(typeof ye=="function"){v.callback=null,b=v.priorityLevel;var C=ye(v.expirationTime<=P);if(P=n.unstable_now(),typeof C=="function"){v.callback=C,H(P),Q=!0;break t}v===i(g)&&r(g),H(P)}else r(g);v=i(g)}if(v!==null)Q=!0;else{var Y=i(m);Y!==null&&be(L,Y.startTime-P),Q=!1}}break e}finally{v=null,b=ee,j=!1}Q=void 0}}finally{Q?de():$=!1}}}var de;if(typeof M=="function")de=function(){M(me)};else if(typeof MessageChannel!="undefined"){var Re=new MessageChannel,qe=Re.port2;Re.port1.onmessage=me,de=function(){qe.postMessage(null)}}else de=function(){D(me,0)};function be(P,Q){G=D(function(){P(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(P){P.callback=null},n.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<P?Math.floor(1e3/P):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(P){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var ee=b;b=Q;try{return P()}finally{b=ee}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(P,Q){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ee=b;b=P;try{return Q()}finally{b=ee}},n.unstable_scheduleCallback=function(P,Q,ee){var ye=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ye+ee:ye):ee=ye,P){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=ee+C,P={id:y++,callback:Q,priorityLevel:P,startTime:ee,expirationTime:C,sortIndex:-1},ee>ye?(P.sortIndex=ee,a(m,P),i(g)===null&&P===i(m)&&(E?(U(G),G=-1):E=!0,be(L,ee-ye))):(P.sortIndex=C,a(g,P),N||j||(N=!0,$||($=!0,de()))),P},n.unstable_shouldYield=he,n.unstable_wrapCallback=function(P){var Q=b;return function(){var ee=b;b=Q;try{return P.apply(this,arguments)}finally{b=ee}}}}(Fc)),Fc}var Up;function y2(){return Up||(Up=1,Xc.exports=g2()),Xc.exports}var Kc={exports:{}},pt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var zp;function x2(){if(zp)return pt;zp=1;var n=Gd();function a(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function f(g,m,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:g,containerInfo:m,implementation:y}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,pt.createPortal=function(g,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(a(299));return f(g,m,null,y)},pt.flushSync=function(g){var m=d.T,y=r.p;try{if(d.T=null,r.p=2,g)return g()}finally{d.T=m,r.p=y,r.d.f()}},pt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(g,m))},pt.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},pt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var y=m.as,v=p(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?r.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:b,fetchPriority:j}):y==="script"&&r.d.X(g,{crossOrigin:v,integrity:b,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},pt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=p(m.as,m.crossOrigin);r.d.M(g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(g)},pt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,v=p(y,m.crossOrigin);r.d.L(g,y,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},pt.preloadModule=function(g,m){if(typeof g=="string")if(m){var y=p(m.as,m.crossOrigin);r.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(g)},pt.requestFormReset=function(g){r.d.r(g)},pt.unstable_batchedUpdates=function(g,m){return g(m)},pt.useFormState=function(g,m,y){return d.H.useFormState(g,m,y)},pt.useFormStatus=function(){return d.H.useHostTransitionStatus()},pt.version="19.1.1",pt}var Bp;function v2(){if(Bp)return Kc.exports;Bp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Kc.exports=x2(),Kc.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Vp;function b2(){if(Vp)return nl;Vp=1;var n=y2(),a=Gd(),i=v2();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var s=e,l=t;;){var u=s.return;if(u===null)break;var h=u.alternate;if(h===null){if(l=u.return,l!==null){s=l;continue}break}if(u.child===h.child){for(h=u.child;h;){if(h===s)return p(u),e;if(h===l)return p(u),t;h=h.sibling}throw Error(r(188))}if(s.return!==l.return)s=u,l=h;else{for(var x=!1,w=u.child;w;){if(w===s){x=!0,s=u,l=h;break}if(w===l){x=!0,l=u,s=h;break}w=w.sibling}if(!x){for(w=h.child;w;){if(w===s){x=!0,s=h,l=u;break}if(w===l){x=!0,l=h,s=u;break}w=w.sibling}if(!x)throw Error(r(189))}}if(s.alternate!==l)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),U=Symbol.for("react.consumer"),M=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),he=Symbol.for("react.memo_cache_sentinel"),me=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=me&&e[me]||e["@@iterator"],typeof e=="function"?e:null)}var Re=Symbol.for("react.client.reference");function qe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case T:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case $:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case M:return(e.displayName||"Context")+".Provider";case U:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:qe(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return qe(e(t))}catch(s){}}return null}var be=Array.isArray,P=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ye=[],C=-1;function Y(e){return{current:e}}function W(e){0>C||(e.current=ye[C],ye[C]=null,C--)}function J(e,t){C++,ye[C]=e.current,e.current=t}var ne=Y(null),Ne=Y(null),fe=Y(null),xt=Y(null);function Be(e,t){switch(J(fe,t),J(Ne,e),J(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?I0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=I0(t),e=ep(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(ne),J(ne,e)}function sn(){W(ne),W(Ne),W(fe)}function $a(e){e.memoizedState!==null&&J(xt,e);var t=ne.current,s=ep(t,e.type);t!==s&&(J(Ne,e),J(ne,s))}function Za(e){Ne.current===e&&(W(ne),W(Ne)),xt.current===e&&(W(xt),Qi._currentValue=ee)}var ti=Object.prototype.hasOwnProperty,ni=n.unstable_scheduleCallback,Qa=n.unstable_cancelCallback,To=n.unstable_shouldYield,Eo=n.unstable_requestPaint,Ht=n.unstable_now,Ao=n.unstable_getCurrentPriorityLevel,ai=n.unstable_ImmediatePriority,si=n.unstable_UserBlockingPriority,Ja=n.unstable_NormalPriority,I=n.unstable_LowPriority,Ee=n.unstable_IdlePriority,Ye=n.log,ln=n.unstable_setDisableYieldValue,vt=null,bt=null;function Fn(e){if(typeof Ye=="function"&&ln(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(vt,e)}catch(t){}}var Mt=Math.clz32?Math.clz32:Kv,Xv=Math.log,Fv=Math.LN2;function Kv(e){return e>>>=0,e===0?32:31-(Xv(e)/Fv|0)|0}var Rl=256,Dl=4194304;function ba(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ml(e,t,s){var l=e.pendingLanes;if(l===0)return 0;var u=0,h=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var w=l&134217727;return w!==0?(l=w&~h,l!==0?u=ba(l):(x&=w,x!==0?u=ba(x):s||(s=w&~e,s!==0&&(u=ba(s))))):(w=l&~h,w!==0?u=ba(w):x!==0?u=ba(x):s||(s=l&~e,s!==0&&(u=ba(s)))),u===0?0:t!==0&&t!==u&&(t&h)===0&&(h=u&-u,s=t&-t,h>=s||h===32&&(s&4194048)!==0)?t:u}function ii(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $v(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bf(){var e=Rl;return Rl<<=1,(Rl&4194048)===0&&(Rl=256),e}function Vf(){var e=Dl;return Dl<<=1,(Dl&62914560)===0&&(Dl=4194304),e}function Co(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Zv(e,t,s,l,u,h){var x=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var w=e.entanglements,A=e.expirationTimes,B=e.hiddenUpdates;for(s=x&~s;0<s;){var q=31-Mt(s),F=1<<q;w[q]=0,A[q]=-1;var V=B[q];if(V!==null)for(B[q]=null,q=0;q<V.length;q++){var _=V[q];_!==null&&(_.lane&=-536870913)}s&=~F}l!==0&&_f(e,l,0),h!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=h&~(x&~t))}function _f(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Mt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&4194090}function kf(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-Mt(s),u=1<<l;u&t|e[l]&t&&(e[l]|=t),s&=~u}}function Ro(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Do(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hf(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:vp(e.type))}function Qv(e,t){var s=Q.p;try{return Q.p=e,t()}finally{Q.p=s}}var Kn=Math.random().toString(36).slice(2),ht="__reactFiber$"+Kn,jt="__reactProps$"+Kn,Wa="__reactContainer$"+Kn,Mo="__reactEvents$"+Kn,Jv="__reactListeners$"+Kn,Wv="__reactHandles$"+Kn,Pf="__reactResources$"+Kn,ri="__reactMarker$"+Kn;function Oo(e){delete e[ht],delete e[jt],delete e[Mo],delete e[Jv],delete e[Wv]}function Ia(e){var t=e[ht];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Wa]||s[ht]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=sp(e);e!==null;){if(s=e[ht])return s;e=sp(e)}return t}e=s,s=e.parentNode}return null}function es(e){if(e=e[ht]||e[Wa]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function oi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ts(e){var t=e[Pf];return t||(t=e[Pf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[ri]=!0}var qf=new Set,Yf={};function wa(e,t){ns(e,t),ns(e+"Capture",t)}function ns(e,t){for(Yf[e]=t,e=0;e<t.length;e++)qf.add(t[e])}var Iv=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Gf={},Xf={};function e1(e){return ti.call(Xf,e)?!0:ti.call(Gf,e)?!1:Iv.test(e)?Xf[e]=!0:(Gf[e]=!0,!1)}function Ol(e,t,s){if(e1(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function Ll(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function Nn(e,t,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+l)}}var Lo,Ff;function as(e){if(Lo===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Lo=t&&t[1]||"",Ff=-1<s.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Lo+e+Ff}var Uo=!1;function zo(e,t){if(!e||Uo)return"";Uo=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(_){var V=_}Reflect.construct(e,[],F)}else{try{F.call()}catch(_){V=_}e.call(F.prototype)}}else{try{throw Error()}catch(_){V=_}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(_){if(_&&V&&typeof _.stack=="string")return[_.stack,V.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),x=h[0],w=h[1];if(x&&w){var A=x.split(`
|
|
44
|
+
`),B=w.split(`
|
|
45
|
+
`);for(u=l=0;l<A.length&&!A[l].includes("DetermineComponentFrameRoot");)l++;for(;u<B.length&&!B[u].includes("DetermineComponentFrameRoot");)u++;if(l===A.length||u===B.length)for(l=A.length-1,u=B.length-1;1<=l&&0<=u&&A[l]!==B[u];)u--;for(;1<=l&&0<=u;l--,u--)if(A[l]!==B[u]){if(l!==1||u!==1)do if(l--,u--,0>u||A[l]!==B[u]){var q=`
|
|
46
|
+
`+A[l].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=l&&0<=u);break}}}finally{Uo=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?as(s):""}function t1(e){switch(e.tag){case 26:case 27:case 5:return as(e.type);case 16:return as("Lazy");case 13:return as("Suspense");case 19:return as("SuspenseList");case 0:case 15:return zo(e.type,!1);case 11:return zo(e.type.render,!1);case 1:return zo(e.type,!0);case 31:return as("Activity");default:return""}}function Kf(e){try{var t="";do t+=t1(e),e=e.return;while(e);return t}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}function Pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $f(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function n1(e){var t=$f(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof s!="undefined"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,h=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(x){l=""+x,h.call(this,x)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ul(e){e._valueTracker||(e._valueTracker=n1(e))}function Zf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=$f(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function zl(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}var a1=/[\n"\\]/g;function qt(e){return e.replace(a1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Bo(e,t,s,l,u,h,x,w){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Pt(t)):e.value!==""+Pt(t)&&(e.value=""+Pt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Vo(e,x,Pt(t)):s!=null?Vo(e,x,Pt(s)):l!=null&&e.removeAttribute("value"),u==null&&h!=null&&(e.defaultChecked=!!h),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+Pt(w):e.removeAttribute("name")}function Qf(e,t,s,l,u,h,x,w){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||s!=null){if(!(h!=="submit"&&h!=="reset"||t!=null))return;s=s!=null?""+Pt(s):"",t=t!=null?""+Pt(t):s,w||t===e.value||(e.value=t),e.defaultValue=t}l=l!=null?l:u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=w?e.checked:!!l,e.defaultChecked=!!l,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x)}function Vo(e,t,s){t==="number"&&zl(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function ss(e,t,s,l){if(e=e.options,t){t={};for(var u=0;u<s.length;u++)t["$"+s[u]]=!0;for(s=0;s<e.length;s++)u=t.hasOwnProperty("$"+e[s].value),e[s].selected!==u&&(e[s].selected=u),u&&l&&(e[s].defaultSelected=!0)}else{for(s=""+Pt(s),t=null,u=0;u<e.length;u++){if(e[u].value===s){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Jf(e,t,s){if(t!=null&&(t=""+Pt(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+Pt(s):""}function Wf(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(r(92));if(be(l)){if(1<l.length)throw Error(r(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=Pt(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l)}function is(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var s1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function If(e,t,s){var l=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,s):typeof s!="number"||s===0||s1.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function eh(e,t,s){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in t)l=t[u],t.hasOwnProperty(u)&&s[u]!==l&&If(e,u,l)}else for(var h in t)t.hasOwnProperty(h)&&If(e,h,t[h])}function _o(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var i1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),l1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Bl(e){return l1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ko=null;function Ho(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ls=null,rs=null;function th(e){var t=es(e);if(t&&(e=t.stateNode)){var s=e[jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Bo(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+qt(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var u=l[jt]||null;if(!u)throw Error(r(90));Bo(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<s.length;t++)l=s[t],l.form===e.form&&Zf(l)}break e;case"textarea":Jf(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&ss(e,!!s.multiple,t,!1)}}}var Po=!1;function nh(e,t,s){if(Po)return e(t,s);Po=!0;try{var l=e(t);return l}finally{if(Po=!1,(ls!==null||rs!==null)&&(wr(),ls&&(t=ls,e=rs,rs=ls=null,th(t),e)))for(t=0;t<e.length;t++)th(e[t])}}function ui(e,t){var s=e.stateNode;if(s===null)return null;var l=s[jt]||null;if(l===null)return null;s=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(r(231,t,typeof s));return s}var Tn=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),qo=!1;if(Tn)try{var ci={};Object.defineProperty(ci,"passive",{get:function(){qo=!0}}),window.addEventListener("test",ci,ci),window.removeEventListener("test",ci,ci)}catch(e){qo=!1}var $n=null,Yo=null,Vl=null;function ah(){if(Vl)return Vl;var e,t=Yo,s=t.length,l,u="value"in $n?$n.value:$n.textContent,h=u.length;for(e=0;e<s&&t[e]===u[e];e++);var x=s-e;for(l=1;l<=x&&t[s-l]===u[h-l];l++);return Vl=u.slice(e,1<l?1-l:void 0)}function _l(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function kl(){return!0}function sh(){return!1}function Nt(e){function t(s,l,u,h,x){this._reactName=s,this._targetInst=u,this.type=l,this.nativeEvent=h,this.target=x,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(s=e[w],this[w]=s?s(h):h[w]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?kl:sh,this.isPropagationStopped=sh,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=kl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=kl)},persist:function(){},isPersistent:kl}),t}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hl=Nt(Sa),di=y({},Sa,{view:0,detail:0}),r1=Nt(di),Go,Xo,fi,Pl=y({},di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ko,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fi&&(fi&&e.type==="mousemove"?(Go=e.screenX-fi.screenX,Xo=e.screenY-fi.screenY):Xo=Go=0,fi=e),Go)},movementY:function(e){return"movementY"in e?e.movementY:Xo}}),ih=Nt(Pl),o1=y({},Pl,{dataTransfer:0}),u1=Nt(o1),c1=y({},di,{relatedTarget:0}),Fo=Nt(c1),d1=y({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),f1=Nt(d1),h1=y({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),m1=Nt(h1),p1=y({},Sa,{data:0}),lh=Nt(p1),g1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},y1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},x1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=x1[e])?!!t[e]:!1}function Ko(){return v1}var b1=y({},di,{key:function(e){if(e.key){var t=g1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_l(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?y1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ko,charCode:function(e){return e.type==="keypress"?_l(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_l(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),w1=Nt(b1),S1=y({},Pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rh=Nt(S1),j1=y({},di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ko}),N1=Nt(j1),T1=y({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),E1=Nt(T1),A1=y({},Pl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),C1=Nt(A1),R1=y({},Sa,{newState:0,oldState:0}),D1=Nt(R1),M1=[9,13,27,32],$o=Tn&&"CompositionEvent"in window,hi=null;Tn&&"documentMode"in document&&(hi=document.documentMode);var O1=Tn&&"TextEvent"in window&&!hi,oh=Tn&&(!$o||hi&&8<hi&&11>=hi),uh=" ",ch=!1;function dh(e,t){switch(e){case"keyup":return M1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var os=!1;function L1(e,t){switch(e){case"compositionend":return fh(t);case"keypress":return t.which!==32?null:(ch=!0,uh);case"textInput":return e=t.data,e===uh&&ch?null:e;default:return null}}function U1(e,t){if(os)return e==="compositionend"||!$o&&dh(e,t)?(e=ah(),Vl=Yo=$n=null,os=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return oh&&t.locale!=="ko"?null:t.data;default:return null}}var z1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!z1[e.type]:t==="textarea"}function mh(e,t,s,l){ls?rs?rs.push(l):rs=[l]:ls=l,t=Ar(t,"onChange"),0<t.length&&(s=new Hl("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var mi=null,pi=null;function B1(e){$0(e,0)}function ql(e){var t=oi(e);if(Zf(t))return e}function ph(e,t){if(e==="change")return t}var gh=!1;if(Tn){var Zo;if(Tn){var Qo="oninput"in document;if(!Qo){var yh=document.createElement("div");yh.setAttribute("oninput","return;"),Qo=typeof yh.oninput=="function"}Zo=Qo}else Zo=!1;gh=Zo&&(!document.documentMode||9<document.documentMode)}function xh(){mi&&(mi.detachEvent("onpropertychange",vh),pi=mi=null)}function vh(e){if(e.propertyName==="value"&&ql(pi)){var t=[];mh(t,pi,e,Ho(e)),nh(B1,t)}}function V1(e,t,s){e==="focusin"?(xh(),mi=t,pi=s,mi.attachEvent("onpropertychange",vh)):e==="focusout"&&xh()}function _1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ql(pi)}function k1(e,t){if(e==="click")return ql(t)}function H1(e,t){if(e==="input"||e==="change")return ql(t)}function P1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:P1;function gi(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var u=s[l];if(!ti.call(t,u)||!Ot(e[u],t[u]))return!1}return!0}function bh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wh(e,t){var s=bh(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=t&&l>=t)return{node:s,offset:t-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=bh(s)}}function Sh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zl(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch(l){s=!1}if(s)e=t.contentWindow;else break;t=zl(e.document)}return t}function Jo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var q1=Tn&&"documentMode"in document&&11>=document.documentMode,us=null,Wo=null,yi=null,Io=!1;function Nh(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Io||us==null||us!==zl(l)||(l=us,"selectionStart"in l&&Jo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),yi&&gi(yi,l)||(yi=l,l=Ar(Wo,"onSelect"),0<l.length&&(t=new Hl("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=us)))}function ja(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var cs={animationend:ja("Animation","AnimationEnd"),animationiteration:ja("Animation","AnimationIteration"),animationstart:ja("Animation","AnimationStart"),transitionrun:ja("Transition","TransitionRun"),transitionstart:ja("Transition","TransitionStart"),transitioncancel:ja("Transition","TransitionCancel"),transitionend:ja("Transition","TransitionEnd")},eu={},Th={};Tn&&(Th=document.createElement("div").style,"AnimationEvent"in window||(delete cs.animationend.animation,delete cs.animationiteration.animation,delete cs.animationstart.animation),"TransitionEvent"in window||delete cs.transitionend.transition);function Na(e){if(eu[e])return eu[e];if(!cs[e])return e;var t=cs[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Th)return eu[e]=t[s];return e}var Eh=Na("animationend"),Ah=Na("animationiteration"),Ch=Na("animationstart"),Y1=Na("transitionrun"),G1=Na("transitionstart"),X1=Na("transitioncancel"),Rh=Na("transitionend"),Dh=new Map,tu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");tu.push("scrollEnd");function rn(e,t){Dh.set(e,t),wa(t,[e])}var Mh=new WeakMap;function Yt(e,t){if(typeof e=="object"&&e!==null){var s=Mh.get(e);return s!==void 0?s:(t={value:e,source:t,stack:Kf(t)},Mh.set(e,t),t)}return{value:e,source:t,stack:Kf(t)}}var Gt=[],ds=0,nu=0;function Yl(){for(var e=ds,t=nu=ds=0;t<e;){var s=Gt[t];Gt[t++]=null;var l=Gt[t];Gt[t++]=null;var u=Gt[t];Gt[t++]=null;var h=Gt[t];if(Gt[t++]=null,l!==null&&u!==null){var x=l.pending;x===null?u.next=u:(u.next=x.next,x.next=u),l.pending=u}h!==0&&Oh(s,u,h)}}function Gl(e,t,s,l){Gt[ds++]=e,Gt[ds++]=t,Gt[ds++]=s,Gt[ds++]=l,nu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function au(e,t,s,l){return Gl(e,t,s,l),Xl(e)}function fs(e,t){return Gl(e,null,null,t),Xl(e)}function Oh(e,t,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var u=!1,h=e.return;h!==null;)h.childLanes|=s,l=h.alternate,l!==null&&(l.childLanes|=s),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(u=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,u&&t!==null&&(u=31-Mt(s),e=h.hiddenUpdates,l=e[u],l===null?e[u]=[t]:l.push(t),t.lane=s|536870912),h):null}function Xl(e){if(50<qi)throw qi=0,uc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hs={};function F1(e,t,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,s,l){return new F1(e,t,s,l)}function su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function En(e,t){var s=e.alternate;return s===null?(s=Lt(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Lh(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Fl(e,t,s,l,u,h){var x=0;if(l=e,typeof e=="function")su(e)&&(x=1);else if(typeof e=="string")x=$b(e,s,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case se:return e=Lt(31,s,t,u),e.elementType=se,e.lanes=h,e;case N:return Ta(s.children,u,h,t);case E:x=8,u|=24;break;case T:return e=Lt(12,s,t,u|2),e.elementType=T,e.lanes=h,e;case L:return e=Lt(13,s,t,u),e.elementType=L,e.lanes=h,e;case $:return e=Lt(19,s,t,u),e.elementType=$,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:case M:x=10;break e;case U:x=9;break e;case H:x=11;break e;case G:x=14;break e;case Z:x=16,l=null;break e}x=29,s=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Lt(x,s,t,u),t.elementType=e,t.type=l,t.lanes=h,t}function Ta(e,t,s,l){return e=Lt(7,e,l,t),e.lanes=s,e}function iu(e,t,s){return e=Lt(6,e,null,t),e.lanes=s,e}function lu(e,t,s){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ms=[],ps=0,Kl=null,$l=0,Xt=[],Ft=0,Ea=null,An=1,Cn="";function Aa(e,t){ms[ps++]=$l,ms[ps++]=Kl,Kl=e,$l=t}function Uh(e,t,s){Xt[Ft++]=An,Xt[Ft++]=Cn,Xt[Ft++]=Ea,Ea=e;var l=An;e=Cn;var u=32-Mt(l)-1;l&=~(1<<u),s+=1;var h=32-Mt(t)+u;if(30<h){var x=u-u%5;h=(l&(1<<x)-1).toString(32),l>>=x,u-=x,An=1<<32-Mt(t)+u|s<<u|l,Cn=h+e}else An=1<<h|s<<u|l,Cn=e}function ru(e){e.return!==null&&(Aa(e,1),Uh(e,1,0))}function ou(e){for(;e===Kl;)Kl=ms[--ps],ms[ps]=null,$l=ms[--ps],ms[ps]=null;for(;e===Ea;)Ea=Xt[--Ft],Xt[Ft]=null,Cn=Xt[--Ft],Xt[Ft]=null,An=Xt[--Ft],Xt[Ft]=null}var wt=null,Fe=null,De=!1,Ca=null,hn=!1,uu=Error(r(519));function Ra(e){var t=Error(r(418,""));throw bi(Yt(t,e)),uu}function zh(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[ht]=e,t[jt]=l,s){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(s=0;s<Gi.length;s++)je(Gi[s],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),Qf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),Ul(t);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),Wf(t,l.value,l.defaultValue,l.children),Ul(t)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||l.suppressHydrationWarning===!0||W0(t.textContent,s)?(l.popover!=null&&(je("beforetoggle",t),je("toggle",t)),l.onScroll!=null&&je("scroll",t),l.onScrollEnd!=null&&je("scrollend",t),l.onClick!=null&&(t.onclick=Cr),t=!0):t=!1,t||Ra(e)}function Bh(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:wt=wt.return}}function xi(e){if(e!==wt)return!1;if(!De)return Bh(e),De=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||Tc(e.type,e.memoizedProps)),s=!s),s&&Fe&&Ra(e),Bh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(s=e.data,s==="/$"){if(t===0){Fe=un(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++;e=e.nextSibling}Fe=null}}else t===27?(t=Fe,ca(e.type)?(e=Rc,Rc=null,Fe=e):Fe=t):Fe=wt?un(e.stateNode.nextSibling):null;return!0}function vi(){Fe=wt=null,De=!1}function Vh(){var e=Ca;return e!==null&&(At===null?At=e:At.push.apply(At,e),Ca=null),e}function bi(e){Ca===null?Ca=[e]:Ca.push(e)}var cu=Y(null),Da=null,Rn=null;function Zn(e,t,s){J(cu,t._currentValue),t._currentValue=s}function Dn(e){e._currentValue=cu.current,W(cu)}function du(e,t,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===s)break;e=e.return}}function fu(e,t,s,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var h=u.dependencies;if(h!==null){var x=u.child;h=h.firstContext;e:for(;h!==null;){var w=h;h=u;for(var A=0;A<t.length;A++)if(w.context===t[A]){h.lanes|=s,w=h.alternate,w!==null&&(w.lanes|=s),du(h.return,s,e),l||(x=null);break e}h=w.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(r(341));x.lanes|=s,h=x.alternate,h!==null&&(h.lanes|=s),du(x,s,e),x=null}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===e){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function wi(e,t,s,l){e=null;for(var u=t,h=!1;u!==null;){if(!h){if((u.flags&524288)!==0)h=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var x=u.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var w=u.type;Ot(u.pendingProps.value,x.value)||(e!==null?e.push(w):e=[w])}}else if(u===xt.current){if(x=u.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Qi):e=[Qi])}u=u.return}e!==null&&fu(t,e,s,l),t.flags|=262144}function Zl(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ma(e){Da=e,Rn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function mt(e){return _h(Da,e)}function Ql(e,t){return Da===null&&Ma(e),_h(e,t)}function _h(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},Rn===null){if(e===null)throw Error(r(308));Rn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Rn=Rn.next=t;return s}var K1=typeof AbortController!="undefined"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},$1=n.unstable_scheduleCallback,Z1=n.unstable_NormalPriority,nt={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hu(){return{controller:new K1,data:new Map,refCount:0}}function Si(e){e.refCount--,e.refCount===0&&$1(Z1,function(){e.controller.abort()})}var ji=null,mu=0,gs=0,ys=null;function Q1(e,t){if(ji===null){var s=ji=[];mu=0,gs=gc(),ys={status:"pending",value:void 0,then:function(l){s.push(l)}}}return mu++,t.then(kh,kh),t}function kh(){if(--mu===0&&ji!==null){ys!==null&&(ys.status="fulfilled");var e=ji;ji=null,gs=0,ys=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function J1(e,t){var s=[],l={status:"pending",value:null,reason:null,then:function(u){s.push(u)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var u=0;u<s.length;u++)(0,s[u])(t)},function(u){for(l.status="rejected",l.reason=u,u=0;u<s.length;u++)(0,s[u])(void 0)}),l}var Hh=P.S;P.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Q1(e,t),Hh!==null&&Hh(e,t)};var Oa=Y(null);function pu(){var e=Oa.current;return e!==null?e:_e.pooledCache}function Jl(e,t){t===null?J(Oa,Oa.current):J(Oa,t.pool)}function Ph(){var e=pu();return e===null?null:{parent:nt._currentValue,pool:e}}var Ni=Error(r(460)),qh=Error(r(474)),Wl=Error(r(542)),gu={then:function(){}};function Yh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Il(){}function Gh(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(Il,Il),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Fh(e),e;default:if(typeof t.status=="string")t.then(Il,Il);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=l}},function(l){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Fh(e),e}throw Ti=t,Ni}}var Ti=null;function Xh(){if(Ti===null)throw Error(r(459));var e=Ti;return Ti=null,e}function Fh(e){if(e===Ni||e===Wl)throw Error(r(483))}var Qn=!1;function yu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Jn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wn(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Me&2)!==0){var u=l.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),l.pending=t,t=Xl(e),Oh(e,null,s),t}return Gl(e,l,t,s),Xl(e)}function Ei(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,kf(e,s)}}function vu(e,t){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var u=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};h===null?u=h=x:h=h.next=x,s=s.next}while(s!==null);h===null?u=h=t:h=h.next=t}else u=h=t;s={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var bu=!1;function Ai(){if(bu){var e=ys;if(e!==null)throw e}}function Ci(e,t,s,l){bu=!1;var u=e.updateQueue;Qn=!1;var h=u.firstBaseUpdate,x=u.lastBaseUpdate,w=u.shared.pending;if(w!==null){u.shared.pending=null;var A=w,B=A.next;A.next=null,x===null?h=B:x.next=B,x=A;var q=e.alternate;q!==null&&(q=q.updateQueue,w=q.lastBaseUpdate,w!==x&&(w===null?q.firstBaseUpdate=B:w.next=B,q.lastBaseUpdate=A))}if(h!==null){var F=u.baseState;x=0,q=B=A=null,w=h;do{var V=w.lane&-536870913,_=V!==w.lane;if(_?(Te&V)===V:(l&V)===V){V!==0&&V===gs&&(bu=!0),q!==null&&(q=q.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ue=e,le=w;V=t;var ze=s;switch(le.tag){case 1:if(ue=le.payload,typeof ue=="function"){F=ue.call(ze,F,V);break e}F=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=le.payload,V=typeof ue=="function"?ue.call(ze,F,V):ue,V==null)break e;F=y({},F,V);break e;case 2:Qn=!0}}V=w.callback,V!==null&&(e.flags|=64,_&&(e.flags|=8192),_=u.callbacks,_===null?u.callbacks=[V]:_.push(V))}else _={lane:V,tag:w.tag,payload:w.payload,callback:w.callback,next:null},q===null?(B=q=_,A=F):q=q.next=_,x|=V;if(w=w.next,w===null){if(w=u.shared.pending,w===null)break;_=w,w=_.next,_.next=null,u.lastBaseUpdate=_,u.shared.pending=null}}while(!0);q===null&&(A=F),u.baseState=A,u.firstBaseUpdate=B,u.lastBaseUpdate=q,h===null&&(u.shared.lanes=0),la|=x,e.lanes=x,e.memoizedState=F}}function Kh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function $h(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Kh(s[e],t)}var xs=Y(null),er=Y(0);function Zh(e,t){e=Vn,J(er,e),J(xs,t),Vn=e|t.baseLanes}function wu(){J(er,Vn),J(xs,xs.current)}function Su(){Vn=er.current,W(xs),W(er)}var In=0,xe=null,Le=null,Ie=null,tr=!1,vs=!1,La=!1,nr=0,Ri=0,bs=null,W1=0;function Qe(){throw Error(r(321))}function ju(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!Ot(e[s],t[s]))return!1;return!0}function Nu(e,t,s,l,u,h){return In=h,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Om:Lm,La=!1,h=s(l,u),La=!1,vs&&(h=Jh(t,s,l,u)),Qh(e),h}function Qh(e){P.H=or;var t=Le!==null&&Le.next!==null;if(In=0,Ie=Le=xe=null,tr=!1,Ri=0,bs=null,t)throw Error(r(300));e===null||it||(e=e.dependencies,e!==null&&Zl(e)&&(it=!0))}function Jh(e,t,s,l){xe=e;var u=0;do{if(vs&&(bs=null),Ri=0,vs=!1,25<=u)throw Error(r(301));if(u+=1,Ie=Le=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}P.H=ib,h=t(s,l)}while(vs);return h}function I1(){var e=P.H,t=e.useState()[0];return t=typeof t.then=="function"?Di(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(xe.flags|=1024),t}function Tu(){var e=nr!==0;return nr=0,e}function Eu(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function Au(e){if(tr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}tr=!1}In=0,Ie=Le=xe=null,vs=!1,Ri=nr=0,bs=null}function Tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?xe.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function et(){if(Le===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=Ie===null?xe.memoizedState:Ie.next;if(t!==null)Ie=t,Le=e;else{if(e===null)throw xe.alternate===null?Error(r(467)):Error(r(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},Ie===null?xe.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function Cu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Di(e){var t=Ri;return Ri+=1,bs===null&&(bs=[]),e=Gh(bs,e,t),t=xe,(Ie===null?t.memoizedState:Ie.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Om:Lm),e}function ar(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Di(e);if(e.$$typeof===M)return mt(e)}throw Error(r(438,String(e)))}function Ru(e){var t=null,s=xe.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=xe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Cu(),xe.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),l=0;l<e;l++)s[l]=he;return t.index++,s}function Mn(e,t){return typeof t=="function"?t(e):t}function sr(e){var t=et();return Du(t,Le,e)}function Du(e,t,s){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=s;var u=e.baseQueue,h=l.pending;if(h!==null){if(u!==null){var x=u.next;u.next=h.next,h.next=x}t.baseQueue=u=h,l.pending=null}if(h=e.baseState,u===null)e.memoizedState=h;else{t=u.next;var w=x=null,A=null,B=t,q=!1;do{var F=B.lane&-536870913;if(F!==B.lane?(Te&F)===F:(In&F)===F){var V=B.revertLane;if(V===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),F===gs&&(q=!0);else if((In&V)===V){B=B.next,V===gs&&(q=!0);continue}else F={lane:0,revertLane:B.revertLane,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},A===null?(w=A=F,x=h):A=A.next=F,xe.lanes|=V,la|=V;F=B.action,La&&s(h,F),h=B.hasEagerState?B.eagerState:s(h,F)}else V={lane:F,revertLane:B.revertLane,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},A===null?(w=A=V,x=h):A=A.next=V,xe.lanes|=F,la|=F;B=B.next}while(B!==null&&B!==t);if(A===null?x=h:A.next=w,!Ot(h,e.memoizedState)&&(it=!0,q&&(s=ys,s!==null)))throw s;e.memoizedState=h,e.baseState=x,e.baseQueue=A,l.lastRenderedState=h}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Mu(e){var t=et(),s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var l=s.dispatch,u=s.pending,h=t.memoizedState;if(u!==null){s.pending=null;var x=u=u.next;do h=e(h,x.action),x=x.next;while(x!==u);Ot(h,t.memoizedState)||(it=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),s.lastRenderedState=h}return[h,l]}function Wh(e,t,s){var l=xe,u=et(),h=De;if(h){if(s===void 0)throw Error(r(407));s=s()}else s=t();var x=!Ot((Le||u).memoizedState,s);x&&(u.memoizedState=s,it=!0),u=u.queue;var w=tm.bind(null,l,u,e);if(Mi(2048,8,w,[e]),u.getSnapshot!==t||x||Ie!==null&&Ie.memoizedState.tag&1){if(l.flags|=2048,ws(9,ir(),em.bind(null,l,u,s,t),null),_e===null)throw Error(r(349));h||(In&124)!==0||Ih(l,t,s)}return s}function Ih(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=xe.updateQueue,t===null?(t=Cu(),xe.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function em(e,t,s,l){t.value=s,t.getSnapshot=l,nm(t)&&am(e)}function tm(e,t,s){return s(function(){nm(t)&&am(e)})}function nm(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!Ot(e,s)}catch(l){return!0}}function am(e){var t=fs(e,2);t!==null&&_t(t,e,2)}function Ou(e){var t=Tt();if(typeof e=="function"){var s=e;if(e=s(),La){Fn(!0);try{s()}finally{Fn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:e},t}function sm(e,t,s,l){return e.baseState=s,Du(e,Le,typeof l=="function"?l:Mn)}function eb(e,t,s,l,u){if(rr(e))throw Error(r(485));if(e=t.action,e!==null){var h={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){h.listeners.push(x)}};P.T!==null?s(!0):h.isTransition=!1,l(h),s=t.pending,s===null?(h.next=t.pending=h,im(t,h)):(h.next=s.next,t.pending=s.next=h)}}function im(e,t){var s=t.action,l=t.payload,u=e.state;if(t.isTransition){var h=P.T,x={};P.T=x;try{var w=s(u,l),A=P.S;A!==null&&A(x,w),lm(e,t,w)}catch(B){Lu(e,t,B)}finally{P.T=h}}else try{h=s(u,l),lm(e,t,h)}catch(B){Lu(e,t,B)}}function lm(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){rm(e,t,l)},function(l){return Lu(e,t,l)}):rm(e,t,s)}function rm(e,t,s){t.status="fulfilled",t.value=s,om(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,im(e,s)))}function Lu(e,t,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=s,om(t),t=t.next;while(t!==l)}e.action=null}function om(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function um(e,t){return t}function cm(e,t){if(De){var s=_e.formState;if(s!==null){e:{var l=xe;if(De){if(Fe){t:{for(var u=Fe,h=hn;u.nodeType!==8;){if(!h){u=null;break t}if(u=un(u.nextSibling),u===null){u=null;break t}}h=u.data,u=h==="F!"||h==="F"?u:null}if(u){Fe=un(u.nextSibling),l=u.data==="F!";break e}}Ra(l)}l=!1}l&&(t=s[0])}}return s=Tt(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:um,lastRenderedState:t},s.queue=l,s=Rm.bind(null,xe,l),l.dispatch=s,l=Ou(!1),h=_u.bind(null,xe,!1,l.queue),l=Tt(),u={state:t,dispatch:null,action:e,pending:null},l.queue=u,s=eb.bind(null,xe,u,h,s),u.dispatch=s,l.memoizedState=e,[t,s,!1]}function dm(e){var t=et();return fm(t,Le,e)}function fm(e,t,s){if(t=Du(e,t,um)[0],e=sr(Mn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Di(t)}catch(x){throw x===Ni?Wl:x}else l=t;t=et();var u=t.queue,h=u.dispatch;return s!==t.memoizedState&&(xe.flags|=2048,ws(9,ir(),tb.bind(null,u,s),null)),[l,h,e]}function tb(e,t){e.action=t}function hm(e){var t=et(),s=Le;if(s!==null)return fm(t,s,e);et(),t=t.memoizedState,s=et();var l=s.queue.dispatch;return s.memoizedState=e,[t,l,!1]}function ws(e,t,s,l){return e={tag:e,create:s,deps:l,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Cu(),xe.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e),e}function ir(){return{destroy:void 0,resource:void 0}}function mm(){return et().memoizedState}function lr(e,t,s,l){var u=Tt();l=l===void 0?null:l,xe.flags|=e,u.memoizedState=ws(1|t,ir(),s,l)}function Mi(e,t,s,l){var u=et();l=l===void 0?null:l;var h=u.memoizedState.inst;Le!==null&&l!==null&&ju(l,Le.memoizedState.deps)?u.memoizedState=ws(t,h,s,l):(xe.flags|=e,u.memoizedState=ws(1|t,h,s,l))}function pm(e,t){lr(8390656,8,e,t)}function gm(e,t){Mi(2048,8,e,t)}function ym(e,t){return Mi(4,2,e,t)}function xm(e,t){return Mi(4,4,e,t)}function vm(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bm(e,t,s){s=s!=null?s.concat([e]):null,Mi(4,4,vm.bind(null,t,e),s)}function Uu(){}function wm(e,t){var s=et();t=t===void 0?null:t;var l=s.memoizedState;return t!==null&&ju(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function Sm(e,t){var s=et();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&ju(t,l[1]))return l[0];if(l=e(),La){Fn(!0);try{e()}finally{Fn(!1)}}return s.memoizedState=[l,t],l}function zu(e,t,s){return s===void 0||(In&1073741824)!==0?e.memoizedState=t:(e.memoizedState=s,e=T0(),xe.lanes|=e,la|=e,s)}function jm(e,t,s,l){return Ot(s,t)?s:xs.current!==null?(e=zu(e,s,l),Ot(e,t)||(it=!0),e):(In&42)===0?(it=!0,e.memoizedState=s):(e=T0(),xe.lanes|=e,la|=e,t)}function Nm(e,t,s,l,u){var h=Q.p;Q.p=h!==0&&8>h?h:8;var x=P.T,w={};P.T=w,_u(e,!1,t,s);try{var A=u(),B=P.S;if(B!==null&&B(w,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var q=J1(A,l);Oi(e,t,q,Vt(e))}else Oi(e,t,l,Vt(e))}catch(F){Oi(e,t,{then:function(){},status:"rejected",reason:F},Vt())}finally{Q.p=h,P.T=x}}function nb(){}function Bu(e,t,s,l){if(e.tag!==5)throw Error(r(476));var u=Tm(e).queue;Nm(e,u,t,ee,s===null?nb:function(){return Em(e),s(l)})}function Tm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:ee},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Em(e){var t=Tm(e).next.queue;Oi(e,t,{},Vt())}function Vu(){return mt(Qi)}function Am(){return et().memoizedState}function Cm(){return et().memoizedState}function ab(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=Vt();e=Jn(s);var l=Wn(t,e,s);l!==null&&(_t(l,t,s),Ei(l,t,s)),t={cache:hu()},e.payload=t;return}t=t.return}}function sb(e,t,s){var l=Vt();s={lane:l,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null},rr(e)?Dm(t,s):(s=au(e,t,s,l),s!==null&&(_t(s,e,l),Mm(s,t,l)))}function Rm(e,t,s){var l=Vt();Oi(e,t,s,l)}function Oi(e,t,s,l){var u={lane:l,revertLane:0,action:s,hasEagerState:!1,eagerState:null,next:null};if(rr(e))Dm(t,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var x=t.lastRenderedState,w=h(x,s);if(u.hasEagerState=!0,u.eagerState=w,Ot(w,x))return Gl(e,t,u,0),_e===null&&Yl(),!1}catch(A){}finally{}if(s=au(e,t,u,l),s!==null)return _t(s,e,l),Mm(s,t,l),!0}return!1}function _u(e,t,s,l){if(l={lane:2,revertLane:gc(),action:l,hasEagerState:!1,eagerState:null,next:null},rr(e)){if(t)throw Error(r(479))}else t=au(e,s,l,2),t!==null&&_t(t,e,2)}function rr(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Dm(e,t){vs=tr=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Mm(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,kf(e,s)}}var or={readContext:mt,use:ar,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useLayoutEffect:Qe,useInsertionEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useSyncExternalStore:Qe,useId:Qe,useHostTransitionStatus:Qe,useFormState:Qe,useActionState:Qe,useOptimistic:Qe,useMemoCache:Qe,useCacheRefresh:Qe},Om={readContext:mt,use:ar,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:pm,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,lr(4194308,4,vm.bind(null,t,e),s)},useLayoutEffect:function(e,t){return lr(4194308,4,e,t)},useInsertionEffect:function(e,t){lr(4,2,e,t)},useMemo:function(e,t){var s=Tt();t=t===void 0?null:t;var l=e();if(La){Fn(!0);try{e()}finally{Fn(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=Tt();if(s!==void 0){var u=s(t);if(La){Fn(!0);try{s(t)}finally{Fn(!1)}}}else u=t;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=sb.bind(null,xe,e),[l.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ou(e);var t=e.queue,s=Rm.bind(null,xe,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:Uu,useDeferredValue:function(e,t){var s=Tt();return zu(s,e,t)},useTransition:function(){var e=Ou(!1);return e=Nm.bind(null,xe,e.queue,!0,!1),Tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=xe,u=Tt();if(De){if(s===void 0)throw Error(r(407));s=s()}else{if(s=t(),_e===null)throw Error(r(349));(Te&124)!==0||Ih(l,t,s)}u.memoizedState=s;var h={value:s,getSnapshot:t};return u.queue=h,pm(tm.bind(null,l,h,e),[e]),l.flags|=2048,ws(9,ir(),em.bind(null,l,h,s,t),null),s},useId:function(){var e=Tt(),t=_e.identifierPrefix;if(De){var s=Cn,l=An;s=(l&~(1<<32-Mt(l)-1)).toString(32)+s,t="«"+t+"R"+s,s=nr++,0<s&&(t+="H"+s.toString(32)),t+="»"}else s=W1++,t="«"+t+"r"+s.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Vu,useFormState:cm,useActionState:cm,useOptimistic:function(e){var t=Tt();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=_u.bind(null,xe,!0,s),s.dispatch=t,[e,t]},useMemoCache:Ru,useCacheRefresh:function(){return Tt().memoizedState=ab.bind(null,xe)}},Lm={readContext:mt,use:ar,useCallback:wm,useContext:mt,useEffect:gm,useImperativeHandle:bm,useInsertionEffect:ym,useLayoutEffect:xm,useMemo:Sm,useReducer:sr,useRef:mm,useState:function(){return sr(Mn)},useDebugValue:Uu,useDeferredValue:function(e,t){var s=et();return jm(s,Le.memoizedState,e,t)},useTransition:function(){var e=sr(Mn)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:Wh,useId:Am,useHostTransitionStatus:Vu,useFormState:dm,useActionState:dm,useOptimistic:function(e,t){var s=et();return sm(s,Le,e,t)},useMemoCache:Ru,useCacheRefresh:Cm},ib={readContext:mt,use:ar,useCallback:wm,useContext:mt,useEffect:gm,useImperativeHandle:bm,useInsertionEffect:ym,useLayoutEffect:xm,useMemo:Sm,useReducer:Mu,useRef:mm,useState:function(){return Mu(Mn)},useDebugValue:Uu,useDeferredValue:function(e,t){var s=et();return Le===null?zu(s,e,t):jm(s,Le.memoizedState,e,t)},useTransition:function(){var e=Mu(Mn)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:Wh,useId:Am,useHostTransitionStatus:Vu,useFormState:hm,useActionState:hm,useOptimistic:function(e,t){var s=et();return Le!==null?sm(s,Le,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:Ru,useCacheRefresh:Cm},Ss=null,Li=0;function ur(e){var t=Li;return Li+=1,Ss===null&&(Ss=[]),Gh(Ss,e,t)}function Ui(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function cr(e,t){throw t.$$typeof===v?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Um(e){var t=e._init;return t(e._payload)}function zm(e){function t(O,R){if(e){var z=O.deletions;z===null?(O.deletions=[R],O.flags|=16):z.push(R)}}function s(O,R){if(!e)return null;for(;R!==null;)t(O,R),R=R.sibling;return null}function l(O){for(var R=new Map;O!==null;)O.key!==null?R.set(O.key,O):R.set(O.index,O),O=O.sibling;return R}function u(O,R){return O=En(O,R),O.index=0,O.sibling=null,O}function h(O,R,z){return O.index=z,e?(z=O.alternate,z!==null?(z=z.index,z<R?(O.flags|=67108866,R):z):(O.flags|=67108866,R)):(O.flags|=1048576,R)}function x(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function w(O,R,z,X){return R===null||R.tag!==6?(R=iu(z,O.mode,X),R.return=O,R):(R=u(R,z),R.return=O,R)}function A(O,R,z,X){var te=z.type;return te===N?q(O,R,z.props.children,X,z.key):R!==null&&(R.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===Z&&Um(te)===R.type)?(R=u(R,z.props),Ui(R,z),R.return=O,R):(R=Fl(z.type,z.key,z.props,null,O.mode,X),Ui(R,z),R.return=O,R)}function B(O,R,z,X){return R===null||R.tag!==4||R.stateNode.containerInfo!==z.containerInfo||R.stateNode.implementation!==z.implementation?(R=lu(z,O.mode,X),R.return=O,R):(R=u(R,z.children||[]),R.return=O,R)}function q(O,R,z,X,te){return R===null||R.tag!==7?(R=Ta(z,O.mode,X,te),R.return=O,R):(R=u(R,z),R.return=O,R)}function F(O,R,z){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=iu(""+R,O.mode,z),R.return=O,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case b:return z=Fl(R.type,R.key,R.props,null,O.mode,z),Ui(z,R),z.return=O,z;case j:return R=lu(R,O.mode,z),R.return=O,R;case Z:var X=R._init;return R=X(R._payload),F(O,R,z)}if(be(R)||de(R))return R=Ta(R,O.mode,z,null),R.return=O,R;if(typeof R.then=="function")return F(O,ur(R),z);if(R.$$typeof===M)return F(O,Ql(O,R),z);cr(O,R)}return null}function V(O,R,z,X){var te=R!==null?R.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return te!==null?null:w(O,R,""+z,X);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case b:return z.key===te?A(O,R,z,X):null;case j:return z.key===te?B(O,R,z,X):null;case Z:return te=z._init,z=te(z._payload),V(O,R,z,X)}if(be(z)||de(z))return te!==null?null:q(O,R,z,X,null);if(typeof z.then=="function")return V(O,R,ur(z),X);if(z.$$typeof===M)return V(O,R,Ql(O,z),X);cr(O,z)}return null}function _(O,R,z,X,te){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return O=O.get(z)||null,w(R,O,""+X,te);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return O=O.get(X.key===null?z:X.key)||null,A(R,O,X,te);case j:return O=O.get(X.key===null?z:X.key)||null,B(R,O,X,te);case Z:var we=X._init;return X=we(X._payload),_(O,R,z,X,te)}if(be(X)||de(X))return O=O.get(z)||null,q(R,O,X,te,null);if(typeof X.then=="function")return _(O,R,z,ur(X),te);if(X.$$typeof===M)return _(O,R,z,Ql(R,X),te);cr(R,X)}return null}function ue(O,R,z,X){for(var te=null,we=null,ae=R,re=R=0,rt=null;ae!==null&&re<z.length;re++){ae.index>re?(rt=ae,ae=null):rt=ae.sibling;var Ae=V(O,ae,z[re],X);if(Ae===null){ae===null&&(ae=rt);break}e&&ae&&Ae.alternate===null&&t(O,ae),R=h(Ae,R,re),we===null?te=Ae:we.sibling=Ae,we=Ae,ae=rt}if(re===z.length)return s(O,ae),De&&Aa(O,re),te;if(ae===null){for(;re<z.length;re++)ae=F(O,z[re],X),ae!==null&&(R=h(ae,R,re),we===null?te=ae:we.sibling=ae,we=ae);return De&&Aa(O,re),te}for(ae=l(ae);re<z.length;re++)rt=_(ae,O,re,z[re],X),rt!==null&&(e&&rt.alternate!==null&&ae.delete(rt.key===null?re:rt.key),R=h(rt,R,re),we===null?te=rt:we.sibling=rt,we=rt);return e&&ae.forEach(function(pa){return t(O,pa)}),De&&Aa(O,re),te}function le(O,R,z,X){if(z==null)throw Error(r(151));for(var te=null,we=null,ae=R,re=R=0,rt=null,Ae=z.next();ae!==null&&!Ae.done;re++,Ae=z.next()){ae.index>re?(rt=ae,ae=null):rt=ae.sibling;var pa=V(O,ae,Ae.value,X);if(pa===null){ae===null&&(ae=rt);break}e&&ae&&pa.alternate===null&&t(O,ae),R=h(pa,R,re),we===null?te=pa:we.sibling=pa,we=pa,ae=rt}if(Ae.done)return s(O,ae),De&&Aa(O,re),te;if(ae===null){for(;!Ae.done;re++,Ae=z.next())Ae=F(O,Ae.value,X),Ae!==null&&(R=h(Ae,R,re),we===null?te=Ae:we.sibling=Ae,we=Ae);return De&&Aa(O,re),te}for(ae=l(ae);!Ae.done;re++,Ae=z.next())Ae=_(ae,O,re,Ae.value,X),Ae!==null&&(e&&Ae.alternate!==null&&ae.delete(Ae.key===null?re:Ae.key),R=h(Ae,R,re),we===null?te=Ae:we.sibling=Ae,we=Ae);return e&&ae.forEach(function(l2){return t(O,l2)}),De&&Aa(O,re),te}function ze(O,R,z,X){if(typeof z=="object"&&z!==null&&z.type===N&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case b:e:{for(var te=z.key;R!==null;){if(R.key===te){if(te=z.type,te===N){if(R.tag===7){s(O,R.sibling),X=u(R,z.props.children),X.return=O,O=X;break e}}else if(R.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===Z&&Um(te)===R.type){s(O,R.sibling),X=u(R,z.props),Ui(X,z),X.return=O,O=X;break e}s(O,R);break}else t(O,R);R=R.sibling}z.type===N?(X=Ta(z.props.children,O.mode,X,z.key),X.return=O,O=X):(X=Fl(z.type,z.key,z.props,null,O.mode,X),Ui(X,z),X.return=O,O=X)}return x(O);case j:e:{for(te=z.key;R!==null;){if(R.key===te)if(R.tag===4&&R.stateNode.containerInfo===z.containerInfo&&R.stateNode.implementation===z.implementation){s(O,R.sibling),X=u(R,z.children||[]),X.return=O,O=X;break e}else{s(O,R);break}else t(O,R);R=R.sibling}X=lu(z,O.mode,X),X.return=O,O=X}return x(O);case Z:return te=z._init,z=te(z._payload),ze(O,R,z,X)}if(be(z))return ue(O,R,z,X);if(de(z)){if(te=de(z),typeof te!="function")throw Error(r(150));return z=te.call(z),le(O,R,z,X)}if(typeof z.then=="function")return ze(O,R,ur(z),X);if(z.$$typeof===M)return ze(O,R,Ql(O,z),X);cr(O,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,R!==null&&R.tag===6?(s(O,R.sibling),X=u(R,z),X.return=O,O=X):(s(O,R),X=iu(z,O.mode,X),X.return=O,O=X),x(O)):s(O,R)}return function(O,R,z,X){try{Li=0;var te=ze(O,R,z,X);return Ss=null,te}catch(ae){if(ae===Ni||ae===Wl)throw ae;var we=Lt(29,ae,null,O.mode);return we.lanes=X,we.return=O,we}finally{}}}var js=zm(!0),Bm=zm(!1),Kt=Y(null),mn=null;function ea(e){var t=e.alternate;J(at,at.current&1),J(Kt,e),mn===null&&(t===null||xs.current!==null||t.memoizedState!==null)&&(mn=e)}function Vm(e){if(e.tag===22){if(J(at,at.current),J(Kt,e),mn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(mn=e)}}else ta()}function ta(){J(at,at.current),J(Kt,Kt.current)}function On(e){W(Kt),mn===e&&(mn=null),W(at)}var at=Y(0);function dr(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||Cc(s)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ku(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:y({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Hu={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=Vt(),u=Jn(l);u.payload=t,s!=null&&(u.callback=s),t=Wn(e,u,l),t!==null&&(_t(t,e,l),Ei(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=Vt(),u=Jn(l);u.tag=1,u.payload=t,s!=null&&(u.callback=s),t=Wn(e,u,l),t!==null&&(_t(t,e,l),Ei(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Vt(),l=Jn(s);l.tag=2,t!=null&&(l.callback=t),t=Wn(e,l,s),t!==null&&(_t(t,e,s),Ei(t,e,s))}};function _m(e,t,s,l,u,h,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,h,x):t.prototype&&t.prototype.isPureReactComponent?!gi(s,l)||!gi(u,h):!0}function km(e,t,s,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,l),t.state!==e&&Hu.enqueueReplaceState(t,t.state,null)}function Ua(e,t){var s=t;if("ref"in t){s={};for(var l in t)l!=="ref"&&(s[l]=t[l])}if(e=e.defaultProps){s===t&&(s=y({},s));for(var u in e)s[u]===void 0&&(s[u]=e[u])}return s}var fr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Hm(e){fr(e)}function Pm(e){console.error(e)}function qm(e){fr(e)}function hr(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Ym(e,t,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Pu(e,t,s){return s=Jn(s),s.tag=3,s.payload={element:null},s.callback=function(){hr(e,t)},s}function Gm(e){return e=Jn(e),e.tag=3,e}function Xm(e,t,s,l){var u=s.type.getDerivedStateFromError;if(typeof u=="function"){var h=l.value;e.payload=function(){return u(h)},e.callback=function(){Ym(t,s,l)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Ym(t,s,l),typeof u!="function"&&(ra===null?ra=new Set([this]):ra.add(this));var w=l.stack;this.componentDidCatch(l.value,{componentStack:w!==null?w:""})})}function lb(e,t,s,l,u){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=s.alternate,t!==null&&wi(t,s,u,!0),s=Kt.current,s!==null){switch(s.tag){case 13:return mn===null?dc():s.alternate===null&&Ke===0&&(Ke=3),s.flags&=-257,s.flags|=65536,s.lanes=u,l===gu?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([l]):t.add(l),hc(e,l,u)),!1;case 22:return s.flags|=65536,l===gu?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([l]):s.add(l)),hc(e,l,u)),!1}throw Error(r(435,s.tag))}return hc(e,l,u),dc(),!1}if(De)return t=Kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,l!==uu&&(e=Error(r(422),{cause:l}),bi(Yt(e,s)))):(l!==uu&&(t=Error(r(423),{cause:l}),bi(Yt(t,s))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Yt(l,s),u=Pu(e.stateNode,l,u),vu(e,u),Ke!==4&&(Ke=2)),!1;var h=Error(r(520),{cause:l});if(h=Yt(h,s),Pi===null?Pi=[h]:Pi.push(h),Ke!==4&&(Ke=2),t===null)return!0;l=Yt(l,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=u&-u,s.lanes|=e,e=Pu(s.stateNode,l,e),vu(s,e),!1;case 1:if(t=s.type,h=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(ra===null||!ra.has(h))))return s.flags|=65536,u&=-u,s.lanes|=u,u=Gm(u),Xm(u,e,s,l),vu(s,u),!1}s=s.return}while(s!==null);return!1}var Fm=Error(r(461)),it=!1;function ut(e,t,s,l){t.child=e===null?Bm(t,null,s,l):js(t,e.child,s,l)}function Km(e,t,s,l,u){s=s.render;var h=t.ref;if("ref"in l){var x={};for(var w in l)w!=="ref"&&(x[w]=l[w])}else x=l;return Ma(t),l=Nu(e,t,s,x,h,u),w=Tu(),e!==null&&!it?(Eu(e,t,u),Ln(e,t,u)):(De&&w&&ru(t),t.flags|=1,ut(e,t,l,u),t.child)}function $m(e,t,s,l,u){if(e===null){var h=s.type;return typeof h=="function"&&!su(h)&&h.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=h,Zm(e,t,h,l,u)):(e=Fl(s.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!Zu(e,u)){var x=h.memoizedProps;if(s=s.compare,s=s!==null?s:gi,s(x,l)&&e.ref===t.ref)return Ln(e,t,u)}return t.flags|=1,e=En(h,l),e.ref=t.ref,e.return=t,t.child=e}function Zm(e,t,s,l,u){if(e!==null){var h=e.memoizedProps;if(gi(h,l)&&e.ref===t.ref)if(it=!1,t.pendingProps=l=h,Zu(e,u))(e.flags&131072)!==0&&(it=!0);else return t.lanes=e.lanes,Ln(e,t,u)}return qu(e,t,s,l,u)}function Qm(e,t,s){var l=t.pendingProps,u=l.children,h=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((t.flags&128)!==0){if(l=h!==null?h.baseLanes|s:s,e!==null){for(u=t.child=e.child,h=0;u!==null;)h=h|u.lanes|u.childLanes,u=u.sibling;t.childLanes=h&~l}else t.childLanes=0,t.child=null;return Jm(e,t,l,s)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Jl(t,h!==null?h.cachePool:null),h!==null?Zh(t,h):wu(),Vm(t);else return t.lanes=t.childLanes=536870912,Jm(e,t,h!==null?h.baseLanes|s:s,s)}else h!==null?(Jl(t,h.cachePool),Zh(t,h),ta(),t.memoizedState=null):(e!==null&&Jl(t,null),wu(),ta());return ut(e,t,u,s),t.child}function Jm(e,t,s,l){var u=pu();return u=u===null?null:{parent:nt._currentValue,pool:u},t.memoizedState={baseLanes:s,cachePool:u},e!==null&&Jl(t,null),wu(),Vm(t),e!==null&&wi(e,t,l,!0),null}function mr(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function qu(e,t,s,l,u){return Ma(t),s=Nu(e,t,s,l,void 0,u),l=Tu(),e!==null&&!it?(Eu(e,t,u),Ln(e,t,u)):(De&&l&&ru(t),t.flags|=1,ut(e,t,s,u),t.child)}function Wm(e,t,s,l,u,h){return Ma(t),t.updateQueue=null,s=Jh(t,l,s,u),Qh(e),l=Tu(),e!==null&&!it?(Eu(e,t,h),Ln(e,t,h)):(De&&l&&ru(t),t.flags|=1,ut(e,t,s,h),t.child)}function Im(e,t,s,l,u){if(Ma(t),t.stateNode===null){var h=hs,x=s.contextType;typeof x=="object"&&x!==null&&(h=mt(x)),h=new s(l,h),t.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Hu,t.stateNode=h,h._reactInternals=t,h=t.stateNode,h.props=l,h.state=t.memoizedState,h.refs={},yu(t),x=s.contextType,h.context=typeof x=="object"&&x!==null?mt(x):hs,h.state=t.memoizedState,x=s.getDerivedStateFromProps,typeof x=="function"&&(ku(t,s,x,l),h.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(x=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),x!==h.state&&Hu.enqueueReplaceState(h,h.state,null),Ci(t,l,h,u),Ai(),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){h=t.stateNode;var w=t.memoizedProps,A=Ua(s,w);h.props=A;var B=h.context,q=s.contextType;x=hs,typeof q=="object"&&q!==null&&(x=mt(q));var F=s.getDerivedStateFromProps;q=typeof F=="function"||typeof h.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,q||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(w||B!==x)&&km(t,h,l,x),Qn=!1;var V=t.memoizedState;h.state=V,Ci(t,l,h,u),Ai(),B=t.memoizedState,w||V!==B||Qn?(typeof F=="function"&&(ku(t,s,F,l),B=t.memoizedState),(A=Qn||_m(t,s,A,l,V,B,x))?(q||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=B),h.props=l,h.state=B,h.context=x,l=A):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{h=t.stateNode,xu(e,t),x=t.memoizedProps,q=Ua(s,x),h.props=q,F=t.pendingProps,V=h.context,B=s.contextType,A=hs,typeof B=="object"&&B!==null&&(A=mt(B)),w=s.getDerivedStateFromProps,(B=typeof w=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x!==F||V!==A)&&km(t,h,l,A),Qn=!1,V=t.memoizedState,h.state=V,Ci(t,l,h,u),Ai();var _=t.memoizedState;x!==F||V!==_||Qn||e!==null&&e.dependencies!==null&&Zl(e.dependencies)?(typeof w=="function"&&(ku(t,s,w,l),_=t.memoizedState),(q=Qn||_m(t,s,q,l,V,_,A)||e!==null&&e.dependencies!==null&&Zl(e.dependencies))?(B||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,_,A),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,_,A)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=_),h.props=l,h.state=_,h.context=A,l=q):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),l=!1)}return h=l,mr(e,t),l=(t.flags&128)!==0,h||l?(h=t.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:h.render(),t.flags|=1,e!==null&&l?(t.child=js(t,e.child,null,u),t.child=js(t,null,s,u)):ut(e,t,s,u),t.memoizedState=h.state,e=t.child):e=Ln(e,t,u),e}function e0(e,t,s,l){return vi(),t.flags|=256,ut(e,t,s,l),t.child}var Yu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gu(e){return{baseLanes:e,cachePool:Ph()}}function Xu(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=$t),e}function t0(e,t,s){var l=t.pendingProps,u=!1,h=(t.flags&128)!==0,x;if((x=h)||(x=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),x&&(u=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(De){if(u?ea(t):ta(),De){var w=Fe,A;if(A=w){e:{for(A=w,w=hn;A.nodeType!==8;){if(!w){w=null;break e}if(A=un(A.nextSibling),A===null){w=null;break e}}w=A}w!==null?(t.memoizedState={dehydrated:w,treeContext:Ea!==null?{id:An,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},A=Lt(18,null,null,0),A.stateNode=w,A.return=t,t.child=A,wt=t,Fe=null,A=!0):A=!1}A||Ra(t)}if(w=t.memoizedState,w!==null&&(w=w.dehydrated,w!==null))return Cc(w)?t.lanes=32:t.lanes=536870912,null;On(t)}return w=l.children,l=l.fallback,u?(ta(),u=t.mode,w=pr({mode:"hidden",children:w},u),l=Ta(l,u,s,null),w.return=t,l.return=t,w.sibling=l,t.child=w,u=t.child,u.memoizedState=Gu(s),u.childLanes=Xu(e,x,s),t.memoizedState=Yu,l):(ea(t),Fu(t,w))}if(A=e.memoizedState,A!==null&&(w=A.dehydrated,w!==null)){if(h)t.flags&256?(ea(t),t.flags&=-257,t=Ku(e,t,s)):t.memoizedState!==null?(ta(),t.child=e.child,t.flags|=128,t=null):(ta(),u=l.fallback,w=t.mode,l=pr({mode:"visible",children:l.children},w),u=Ta(u,w,s,null),u.flags|=2,l.return=t,u.return=t,l.sibling=u,t.child=l,js(t,e.child,null,s),l=t.child,l.memoizedState=Gu(s),l.childLanes=Xu(e,x,s),t.memoizedState=Yu,t=u);else if(ea(t),Cc(w)){if(x=w.nextSibling&&w.nextSibling.dataset,x)var B=x.dgst;x=B,l=Error(r(419)),l.stack="",l.digest=x,bi({value:l,source:null,stack:null}),t=Ku(e,t,s)}else if(it||wi(e,t,s,!1),x=(s&e.childLanes)!==0,it||x){if(x=_e,x!==null&&(l=s&-s,l=(l&42)!==0?1:Ro(l),l=(l&(x.suspendedLanes|s))!==0?0:l,l!==0&&l!==A.retryLane))throw A.retryLane=l,fs(e,l),_t(x,e,l),Fm;w.data==="$?"||dc(),t=Ku(e,t,s)}else w.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,Fe=un(w.nextSibling),wt=t,De=!0,Ca=null,hn=!1,e!==null&&(Xt[Ft++]=An,Xt[Ft++]=Cn,Xt[Ft++]=Ea,An=e.id,Cn=e.overflow,Ea=t),t=Fu(t,l.children),t.flags|=4096);return t}return u?(ta(),u=l.fallback,w=t.mode,A=e.child,B=A.sibling,l=En(A,{mode:"hidden",children:l.children}),l.subtreeFlags=A.subtreeFlags&65011712,B!==null?u=En(B,u):(u=Ta(u,w,s,null),u.flags|=2),u.return=t,l.return=t,l.sibling=u,t.child=l,l=u,u=t.child,w=e.child.memoizedState,w===null?w=Gu(s):(A=w.cachePool,A!==null?(B=nt._currentValue,A=A.parent!==B?{parent:B,pool:B}:A):A=Ph(),w={baseLanes:w.baseLanes|s,cachePool:A}),u.memoizedState=w,u.childLanes=Xu(e,x,s),t.memoizedState=Yu,l):(ea(t),s=e.child,e=s.sibling,s=En(s,{mode:"visible",children:l.children}),s.return=t,s.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=s,t.memoizedState=null,s)}function Fu(e,t){return t=pr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function pr(e,t){return e=Lt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Ku(e,t,s){return js(t,e.child,null,s),e=Fu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function n0(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),du(e.return,t,s)}function $u(e,t,s,l,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=s,h.tailMode=u)}function a0(e,t,s){var l=t.pendingProps,u=l.revealOrder,h=l.tail;if(ut(e,t,l.children,s),l=at.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&n0(e,s,t);else if(e.tag===19)n0(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}switch(J(at,l),u){case"forwards":for(s=t.child,u=null;s!==null;)e=s.alternate,e!==null&&dr(e)===null&&(u=s),s=s.sibling;s=u,s===null?(u=t.child,t.child=null):(u=s.sibling,s.sibling=null),$u(t,!1,u,s,h);break;case"backwards":for(s=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&dr(e)===null){t.child=u;break}e=u.sibling,u.sibling=s,s=u,u=e}$u(t,!0,s,null,h);break;case"together":$u(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ln(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),la|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(wi(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,s=En(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=En(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Zu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Zl(e)))}function rb(e,t,s){switch(t.tag){case 3:Be(t,t.stateNode.containerInfo),Zn(t,nt,e.memoizedState.cache),vi();break;case 27:case 5:$a(t);break;case 4:Be(t,t.stateNode.containerInfo);break;case 10:Zn(t,t.type,t.memoizedProps.value);break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ea(t),t.flags|=128,null):(s&t.child.childLanes)!==0?t0(e,t,s):(ea(t),e=Ln(e,t,s),e!==null?e.sibling:null);ea(t);break;case 19:var u=(e.flags&128)!==0;if(l=(s&t.childLanes)!==0,l||(wi(e,t,s,!1),l=(s&t.childLanes)!==0),u){if(l)return a0(e,t,s);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),J(at,at.current),l)break;return null;case 22:case 23:return t.lanes=0,Qm(e,t,s);case 24:Zn(t,nt,e.memoizedState.cache)}return Ln(e,t,s)}function s0(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)it=!0;else{if(!Zu(e,s)&&(t.flags&128)===0)return it=!1,rb(e,t,s);it=(e.flags&131072)!==0}else it=!1,De&&(t.flags&1048576)!==0&&Uh(t,$l,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var l=t.elementType,u=l._init;if(l=u(l._payload),t.type=l,typeof l=="function")su(l)?(e=Ua(l,e),t.tag=1,t=Im(null,t,l,e,s)):(t.tag=0,t=qu(null,t,l,e,s));else{if(l!=null){if(u=l.$$typeof,u===H){t.tag=11,t=Km(null,t,l,e,s);break e}else if(u===G){t.tag=14,t=$m(null,t,l,e,s);break e}}throw t=qe(l)||l,Error(r(306,t,""))}}return t;case 0:return qu(e,t,t.type,t.pendingProps,s);case 1:return l=t.type,u=Ua(l,t.pendingProps),Im(e,t,l,u,s);case 3:e:{if(Be(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var h=t.memoizedState;u=h.element,xu(e,t),Ci(t,l,null,s);var x=t.memoizedState;if(l=x.cache,Zn(t,nt,l),l!==h.cache&&fu(t,[nt],s,!0),Ai(),l=x.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){t=e0(e,t,l,s);break e}else if(l!==u){u=Yt(Error(r(424)),t),bi(u),t=e0(e,t,l,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Fe=un(e.firstChild),wt=t,De=!0,Ca=null,hn=!0,s=Bm(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(vi(),l===u){t=Ln(e,t,s);break e}ut(e,t,l,s)}t=t.child}return t;case 26:return mr(e,t),e===null?(s=op(t.type,null,t.pendingProps,null))?t.memoizedState=s:De||(s=t.type,e=t.pendingProps,l=Rr(fe.current).createElement(s),l[ht]=t,l[jt]=e,dt(l,s,e),st(l),t.stateNode=l):t.memoizedState=op(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $a(t),e===null&&De&&(l=t.stateNode=ip(t.type,t.pendingProps,fe.current),wt=t,hn=!0,u=Fe,ca(t.type)?(Rc=u,Fe=un(l.firstChild)):Fe=u),ut(e,t,t.pendingProps.children,s),mr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&De&&((u=l=Fe)&&(l=zb(l,t.type,t.pendingProps,hn),l!==null?(t.stateNode=l,wt=t,Fe=un(l.firstChild),hn=!1,u=!0):u=!1),u||Ra(t)),$a(t),u=t.type,h=t.pendingProps,x=e!==null?e.memoizedProps:null,l=h.children,Tc(u,h)?l=null:x!==null&&Tc(u,x)&&(t.flags|=32),t.memoizedState!==null&&(u=Nu(e,t,I1,null,null,s),Qi._currentValue=u),mr(e,t),ut(e,t,l,s),t.child;case 6:return e===null&&De&&((e=s=Fe)&&(s=Bb(s,t.pendingProps,hn),s!==null?(t.stateNode=s,wt=t,Fe=null,e=!0):e=!1),e||Ra(t)),null;case 13:return t0(e,t,s);case 4:return Be(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=js(t,null,l,s):ut(e,t,l,s),t.child;case 11:return Km(e,t,t.type,t.pendingProps,s);case 7:return ut(e,t,t.pendingProps,s),t.child;case 8:return ut(e,t,t.pendingProps.children,s),t.child;case 12:return ut(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,Zn(t,t.type,l.value),ut(e,t,l.children,s),t.child;case 9:return u=t.type._context,l=t.pendingProps.children,Ma(t),u=mt(u),l=l(u),t.flags|=1,ut(e,t,l,s),t.child;case 14:return $m(e,t,t.type,t.pendingProps,s);case 15:return Zm(e,t,t.type,t.pendingProps,s);case 19:return a0(e,t,s);case 31:return l=t.pendingProps,s=t.mode,l={mode:l.mode,children:l.children},e===null?(s=pr(l,s),s.ref=t.ref,t.child=s,s.return=t,t=s):(s=En(e.child,l),s.ref=t.ref,t.child=s,s.return=t,t=s),t;case 22:return Qm(e,t,s);case 24:return Ma(t),l=mt(nt),e===null?(u=pu(),u===null&&(u=_e,h=hu(),u.pooledCache=h,h.refCount++,h!==null&&(u.pooledCacheLanes|=s),u=h),t.memoizedState={parent:l,cache:u},yu(t),Zn(t,nt,u)):((e.lanes&s)!==0&&(xu(e,t),Ci(t,null,null,s),Ai()),u=e.memoizedState,h=t.memoizedState,u.parent!==l?(u={parent:l,cache:l},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Zn(t,nt,l)):(l=h.cache,Zn(t,nt,l),l!==u.cache&&fu(t,[nt],s,!0))),ut(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Un(e){e.flags|=4}function i0(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hp(t)){if(t=Kt.current,t!==null&&((Te&4194048)===Te?mn!==null:(Te&62914560)!==Te&&(Te&536870912)===0||t!==mn))throw Ti=gu,qh;e.flags|=8192}}function gr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Vf():536870912,e.lanes|=t,As|=t)}function zi(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(t)for(var u=e.child;u!==null;)s|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)s|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=s,t}function ob(e,t,s){var l=t.pendingProps;switch(ou(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return Ge(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Dn(nt),sn(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(xi(t)?Un(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Vh())),Ge(t),null;case 26:return s=t.memoizedState,e===null?(Un(t),s!==null?(Ge(t),i0(t,s)):(Ge(t),t.flags&=-16777217)):s?s!==e.memoizedState?(Un(t),Ge(t),i0(t,s)):(Ge(t),t.flags&=-16777217):(e.memoizedProps!==l&&Un(t),Ge(t),t.flags&=-16777217),null;case 27:Za(t),s=fe.current;var u=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Un(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ge(t),null}e=ne.current,xi(t)?zh(t):(e=ip(u,l,s),t.stateNode=e,Un(t))}return Ge(t),null;case 5:if(Za(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Un(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ge(t),null}if(e=ne.current,xi(t))zh(t);else{switch(u=Rr(fe.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?u.createElement("select",{is:l.is}):u.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?u.createElement(s,{is:l.is}):u.createElement(s)}}e[ht]=t,e[jt]=l;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)e.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=e;e:switch(dt(e,s,l),s){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Un(t)}}return Ge(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Un(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=fe.current,xi(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,u=wt,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[ht]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||W0(e.nodeValue,s)),e||Ra(t)}else e=Rr(e).createTextNode(l),e[ht]=t,t.stateNode=e}return Ge(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=xi(t),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[ht]=t}else vi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ge(t),u=!1}else u=Vh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(On(t),t):(On(t),null)}if(On(t),(t.flags&128)!==0)return t.lanes=s,t;if(s=l!==null,e=e!==null&&e.memoizedState!==null,s){l=t.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool);var h=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==u&&(l.flags|=2048)}return s!==e&&s&&(t.child.flags|=8192),gr(t,t.updateQueue),Ge(t),null;case 4:return sn(),e===null&&bc(t.stateNode.containerInfo),Ge(t),null;case 10:return Dn(t.type),Ge(t),null;case 19:if(W(at),u=t.memoizedState,u===null)return Ge(t),null;if(l=(t.flags&128)!==0,h=u.rendering,h===null)if(l)zi(u,!1);else{if(Ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=dr(e),h!==null){for(t.flags|=128,zi(u,!1),e=h.updateQueue,t.updateQueue=e,gr(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)Lh(s,e),s=s.sibling;return J(at,at.current&1|2),t.child}e=e.sibling}u.tail!==null&&Ht()>vr&&(t.flags|=128,l=!0,zi(u,!1),t.lanes=4194304)}else{if(!l)if(e=dr(h),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,gr(t,e),zi(u,!0),u.tail===null&&u.tailMode==="hidden"&&!h.alternate&&!De)return Ge(t),null}else 2*Ht()-u.renderingStartTime>vr&&s!==536870912&&(t.flags|=128,l=!0,zi(u,!1),t.lanes=4194304);u.isBackwards?(h.sibling=t.child,t.child=h):(e=u.last,e!==null?e.sibling=h:t.child=h,u.last=h)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Ht(),t.sibling=null,e=at.current,J(at,l?e&1|2:e&1),t):(Ge(t),null);case 22:case 23:return On(t),Su(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(s&536870912)!==0&&(t.flags&128)===0&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),s=t.updateQueue,s!==null&&gr(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==s&&(t.flags|=2048),e!==null&&W(Oa),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Dn(nt),Ge(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function ub(e,t){switch(ou(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dn(nt),sn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Za(t),null;case 13:if(On(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(at),null;case 4:return sn(),null;case 10:return Dn(t.type),null;case 22:case 23:return On(t),Su(),e!==null&&W(Oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Dn(nt),null;case 25:return null;default:return null}}function l0(e,t){switch(ou(t),t.tag){case 3:Dn(nt),sn();break;case 26:case 27:case 5:Za(t);break;case 4:sn();break;case 13:On(t);break;case 19:W(at);break;case 10:Dn(t.type);break;case 22:case 23:On(t),Su(),e!==null&&W(Oa);break;case 24:Dn(nt)}}function Bi(e,t){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var u=l.next;s=u;do{if((s.tag&e)===e){l=void 0;var h=s.create,x=s.inst;l=h(),x.destroy=l}s=s.next}while(s!==u)}}catch(w){Ve(t,t.return,w)}}function na(e,t,s){try{var l=t.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var h=u.next;l=h;do{if((l.tag&e)===e){var x=l.inst,w=x.destroy;if(w!==void 0){x.destroy=void 0,u=t;var A=s,B=w;try{B()}catch(q){Ve(u,A,q)}}}l=l.next}while(l!==h)}}catch(q){Ve(t,t.return,q)}}function r0(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{$h(t,s)}catch(l){Ve(e,e.return,l)}}}function o0(e,t,s){s.props=Ua(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){Ve(e,t,l)}}function Vi(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(u){Ve(e,t,u)}}function pn(e,t){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(u){Ve(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(u){Ve(e,t,u)}else s.current=null}function u0(e){var t=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(u){Ve(e,e.return,u)}}function Qu(e,t,s){try{var l=e.stateNode;Db(l,e.type,s,t),l[jt]=t}catch(u){Ve(e,e.return,u)}}function c0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ca(e.type)||e.tag===4}function Ju(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||c0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ca(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wu(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=Cr));else if(l!==4&&(l===27&&ca(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Wu(e,t,s),e=e.sibling;e!==null;)Wu(e,t,s),e=e.sibling}function yr(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(l===27&&ca(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(yr(e,t,s),e=e.sibling;e!==null;)yr(e,t,s),e=e.sibling}function d0(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);dt(t,l,s),t[ht]=e,t[jt]=s}catch(h){Ve(e,e.return,h)}}var zn=!1,Je=!1,Iu=!1,f0=typeof WeakSet=="function"?WeakSet:Set,lt=null;function cb(e,t){if(e=e.containerInfo,jc=zr,e=jh(e),Jo(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var u=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{s.nodeType,h.nodeType}catch(le){s=null;break e}var x=0,w=-1,A=-1,B=0,q=0,F=e,V=null;t:for(;;){for(var _;F!==s||u!==0&&F.nodeType!==3||(w=x+u),F!==h||l!==0&&F.nodeType!==3||(A=x+l),F.nodeType===3&&(x+=F.nodeValue.length),(_=F.firstChild)!==null;)V=F,F=_;for(;;){if(F===e)break t;if(V===s&&++B===u&&(w=x),V===h&&++q===l&&(A=x),(_=F.nextSibling)!==null)break;F=V,V=F.parentNode}F=_}s=w===-1||A===-1?null:{start:w,end:A}}else s=null}s=s||{start:0,end:0}}else s=null;for(Nc={focusedElem:e,selectionRange:s},zr=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){switch(t=lt,h=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,s=t,u=h.memoizedProps,h=h.memoizedState,l=s.stateNode;try{var ue=Ua(s.type,u,s.elementType===s.type);e=l.getSnapshotBeforeUpdate(ue,h),l.__reactInternalSnapshotBeforeUpdate=e}catch(le){Ve(s,s.return,le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)Ac(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ac(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}}function h0(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:aa(e,s),l&4&&Bi(5,s);break;case 1:if(aa(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(x){Ve(s,s.return,x)}else{var u=Ua(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Ve(s,s.return,x)}}l&64&&r0(s),l&512&&Vi(s,s.return);break;case 3:if(aa(e,s),l&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{$h(e,t)}catch(x){Ve(s,s.return,x)}}break;case 27:t===null&&l&4&&d0(s);case 26:case 5:aa(e,s),t===null&&l&4&&u0(s),l&512&&Vi(s,s.return);break;case 12:aa(e,s);break;case 13:aa(e,s),l&4&&g0(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=vb.bind(null,s),Vb(e,s))));break;case 22:if(l=s.memoizedState!==null||zn,!l){t=t!==null&&t.memoizedState!==null||Je,u=zn;var h=Je;zn=l,(Je=t)&&!h?sa(e,s,(s.subtreeFlags&8772)!==0):aa(e,s),zn=u,Je=h}break;case 30:break;default:aa(e,s)}}function m0(e){var t=e.alternate;t!==null&&(e.alternate=null,m0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Oo(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ke=null,Et=!1;function Bn(e,t,s){for(s=s.child;s!==null;)p0(e,t,s),s=s.sibling}function p0(e,t,s){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(vt,s)}catch(h){}switch(s.tag){case 26:Je||pn(s,t),Bn(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Je||pn(s,t);var l=ke,u=Et;ca(s.type)&&(ke=s.stateNode,Et=!1),Bn(e,t,s),Fi(s.stateNode),ke=l,Et=u;break;case 5:Je||pn(s,t);case 6:if(l=ke,u=Et,ke=null,Bn(e,t,s),ke=l,Et=u,ke!==null)if(Et)try{(ke.nodeType===9?ke.body:ke.nodeName==="HTML"?ke.ownerDocument.body:ke).removeChild(s.stateNode)}catch(h){Ve(s,t,h)}else try{ke.removeChild(s.stateNode)}catch(h){Ve(s,t,h)}break;case 18:ke!==null&&(Et?(e=ke,ap(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),el(e)):ap(ke,s.stateNode));break;case 4:l=ke,u=Et,ke=s.stateNode.containerInfo,Et=!0,Bn(e,t,s),ke=l,Et=u;break;case 0:case 11:case 14:case 15:Je||na(2,s,t),Je||na(4,s,t),Bn(e,t,s);break;case 1:Je||(pn(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&o0(s,t,l)),Bn(e,t,s);break;case 21:Bn(e,t,s);break;case 22:Je=(l=Je)||s.memoizedState!==null,Bn(e,t,s),Je=l;break;default:Bn(e,t,s)}}function g0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{el(e)}catch(s){Ve(t,t.return,s)}}function db(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new f0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new f0),t;default:throw Error(r(435,e.tag))}}function ec(e,t){var s=db(e);t.forEach(function(l){var u=bb.bind(null,e,l);s.has(l)||(s.add(l),l.then(u,u))})}function Ut(e,t){var s=t.deletions;if(s!==null)for(var l=0;l<s.length;l++){var u=s[l],h=e,x=t,w=x;e:for(;w!==null;){switch(w.tag){case 27:if(ca(w.type)){ke=w.stateNode,Et=!1;break e}break;case 5:ke=w.stateNode,Et=!1;break e;case 3:case 4:ke=w.stateNode.containerInfo,Et=!0;break e}w=w.return}if(ke===null)throw Error(r(160));p0(h,x,u),ke=null,Et=!1,h=u.alternate,h!==null&&(h.return=null),u.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)y0(t,e),t=t.sibling}var on=null;function y0(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ut(t,e),zt(e),l&4&&(na(3,e,e.return),Bi(3,e),na(5,e,e.return));break;case 1:Ut(t,e),zt(e),l&512&&(Je||s===null||pn(s,s.return)),l&64&&zn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var u=on;if(Ut(t,e),zt(e),l&512&&(Je||s===null||pn(s,s.return)),l&4){var h=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":h=u.getElementsByTagName("title")[0],(!h||h[ri]||h[ht]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=u.createElement(l),u.head.insertBefore(h,u.querySelector("head > title"))),dt(h,l,s),h[ht]=e,st(h),l=h;break e;case"link":var x=dp("link","href",u).get(l+(s.href||""));if(x){for(var w=0;w<x.length;w++)if(h=x[w],h.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&h.getAttribute("rel")===(s.rel==null?null:s.rel)&&h.getAttribute("title")===(s.title==null?null:s.title)&&h.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){x.splice(w,1);break t}}h=u.createElement(l),dt(h,l,s),u.head.appendChild(h);break;case"meta":if(x=dp("meta","content",u).get(l+(s.content||""))){for(w=0;w<x.length;w++)if(h=x[w],h.getAttribute("content")===(s.content==null?null:""+s.content)&&h.getAttribute("name")===(s.name==null?null:s.name)&&h.getAttribute("property")===(s.property==null?null:s.property)&&h.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&h.getAttribute("charset")===(s.charSet==null?null:s.charSet)){x.splice(w,1);break t}}h=u.createElement(l),dt(h,l,s),u.head.appendChild(h);break;default:throw Error(r(468,l))}h[ht]=e,st(h),l=h}e.stateNode=l}else fp(u,e.type,e.stateNode);else e.stateNode=cp(u,l,e.memoizedProps);else h!==l?(h===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):h.count--,l===null?fp(u,e.type,e.stateNode):cp(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Qu(e,e.memoizedProps,s.memoizedProps)}break;case 27:Ut(t,e),zt(e),l&512&&(Je||s===null||pn(s,s.return)),s!==null&&l&4&&Qu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Ut(t,e),zt(e),l&512&&(Je||s===null||pn(s,s.return)),e.flags&32){u=e.stateNode;try{is(u,"")}catch(_){Ve(e,e.return,_)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,Qu(e,u,s!==null?s.memoizedProps:u)),l&1024&&(Iu=!0);break;case 6:if(Ut(t,e),zt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(_){Ve(e,e.return,_)}}break;case 3:if(Or=null,u=on,on=Dr(t.containerInfo),Ut(t,e),on=u,zt(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{el(t.containerInfo)}catch(_){Ve(e,e.return,_)}Iu&&(Iu=!1,x0(e));break;case 4:l=on,on=Dr(e.stateNode.containerInfo),Ut(t,e),zt(e),on=l;break;case 12:Ut(t,e),zt(e);break;case 13:Ut(t,e),zt(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(lc=Ht()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ec(e,l)));break;case 22:u=e.memoizedState!==null;var A=s!==null&&s.memoizedState!==null,B=zn,q=Je;if(zn=B||u,Je=q||A,Ut(t,e),Je=q,zn=B,zt(e),l&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(s===null||A||zn||Je||za(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){A=s=t;try{if(h=A.stateNode,u)x=h.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{w=A.stateNode;var F=A.memoizedProps.style,V=F!=null&&F.hasOwnProperty("display")?F.display:null;w.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(_){Ve(A,A.return,_)}}}else if(t.tag===6){if(s===null){A=t;try{A.stateNode.nodeValue=u?"":A.memoizedProps}catch(_){Ve(A,A.return,_)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,ec(e,s))));break;case 19:Ut(t,e),zt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ec(e,l)));break;case 30:break;case 21:break;default:Ut(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(c0(l)){s=l;break}l=l.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var u=s.stateNode,h=Ju(e);yr(e,h,u);break;case 5:var x=s.stateNode;s.flags&32&&(is(x,""),s.flags&=-33);var w=Ju(e);yr(e,w,x);break;case 3:case 4:var A=s.stateNode.containerInfo,B=Ju(e);Wu(e,B,A);break;default:throw Error(r(161))}}catch(q){Ve(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function x0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;x0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function aa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)h0(e,t.alternate,t),t=t.sibling}function za(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:na(4,t,t.return),za(t);break;case 1:pn(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&o0(t,t.return,s),za(t);break;case 27:Fi(t.stateNode);case 26:case 5:pn(t,t.return),za(t);break;case 22:t.memoizedState===null&&za(t);break;case 30:za(t);break;default:za(t)}e=e.sibling}}function sa(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,u=e,h=t,x=h.flags;switch(h.tag){case 0:case 11:case 15:sa(u,h,s),Bi(4,h);break;case 1:if(sa(u,h,s),l=h,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(B){Ve(l,l.return,B)}if(l=h,u=l.updateQueue,u!==null){var w=l.stateNode;try{var A=u.shared.hiddenCallbacks;if(A!==null)for(u.shared.hiddenCallbacks=null,u=0;u<A.length;u++)Kh(A[u],w)}catch(B){Ve(l,l.return,B)}}s&&x&64&&r0(h),Vi(h,h.return);break;case 27:d0(h);case 26:case 5:sa(u,h,s),s&&l===null&&x&4&&u0(h),Vi(h,h.return);break;case 12:sa(u,h,s);break;case 13:sa(u,h,s),s&&x&4&&g0(u,h);break;case 22:h.memoizedState===null&&sa(u,h,s),Vi(h,h.return);break;case 30:break;default:sa(u,h,s)}t=t.sibling}}function tc(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Si(s))}function nc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e))}function gn(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)v0(e,t,s,l),t=t.sibling}function v0(e,t,s,l){var u=t.flags;switch(t.tag){case 0:case 11:case 15:gn(e,t,s,l),u&2048&&Bi(9,t);break;case 1:gn(e,t,s,l);break;case 3:gn(e,t,s,l),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e)));break;case 12:if(u&2048){gn(e,t,s,l),e=t.stateNode;try{var h=t.memoizedProps,x=h.id,w=h.onPostCommit;typeof w=="function"&&w(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Ve(t,t.return,A)}}else gn(e,t,s,l);break;case 13:gn(e,t,s,l);break;case 23:break;case 22:h=t.stateNode,x=t.alternate,t.memoizedState!==null?h._visibility&2?gn(e,t,s,l):_i(e,t):h._visibility&2?gn(e,t,s,l):(h._visibility|=2,Ns(e,t,s,l,(t.subtreeFlags&10256)!==0)),u&2048&&tc(x,t);break;case 24:gn(e,t,s,l),u&2048&&nc(t.alternate,t);break;default:gn(e,t,s,l)}}function Ns(e,t,s,l,u){for(u=u&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var h=e,x=t,w=s,A=l,B=x.flags;switch(x.tag){case 0:case 11:case 15:Ns(h,x,w,A,u),Bi(8,x);break;case 23:break;case 22:var q=x.stateNode;x.memoizedState!==null?q._visibility&2?Ns(h,x,w,A,u):_i(h,x):(q._visibility|=2,Ns(h,x,w,A,u)),u&&B&2048&&tc(x.alternate,x);break;case 24:Ns(h,x,w,A,u),u&&B&2048&&nc(x.alternate,x);break;default:Ns(h,x,w,A,u)}t=t.sibling}}function _i(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,l=t,u=l.flags;switch(l.tag){case 22:_i(s,l),u&2048&&tc(l.alternate,l);break;case 24:_i(s,l),u&2048&&nc(l.alternate,l);break;default:_i(s,l)}t=t.sibling}}var ki=8192;function Ts(e){if(e.subtreeFlags&ki)for(e=e.child;e!==null;)b0(e),e=e.sibling}function b0(e){switch(e.tag){case 26:Ts(e),e.flags&ki&&e.memoizedState!==null&&Qb(on,e.memoizedState,e.memoizedProps);break;case 5:Ts(e);break;case 3:case 4:var t=on;on=Dr(e.stateNode.containerInfo),Ts(e),on=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=ki,ki=16777216,Ts(e),ki=t):Ts(e));break;default:Ts(e)}}function w0(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];lt=l,j0(l,e)}w0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)S0(e),e=e.sibling}function S0(e){switch(e.tag){case 0:case 11:case 15:Hi(e),e.flags&2048&&na(9,e,e.return);break;case 3:Hi(e);break;case 12:Hi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xr(e)):Hi(e);break;default:Hi(e)}}function xr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];lt=l,j0(l,e)}w0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:na(8,t,t.return),xr(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,xr(t));break;default:xr(t)}e=e.sibling}}function j0(e,t){for(;lt!==null;){var s=lt;switch(s.tag){case 0:case 11:case 15:na(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Si(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,lt=l;else e:for(s=e;lt!==null;){l=lt;var u=l.sibling,h=l.return;if(m0(l),l===s){lt=null;break e}if(u!==null){u.return=h,lt=u;break e}lt=h}}}var fb={getCacheForType:function(e){var t=mt(nt),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s}},hb=typeof WeakMap=="function"?WeakMap:Map,Me=0,_e=null,Se=null,Te=0,Oe=0,Bt=null,ia=!1,Es=!1,ac=!1,Vn=0,Ke=0,la=0,Ba=0,sc=0,$t=0,As=0,Pi=null,At=null,ic=!1,lc=0,vr=1/0,br=null,ra=null,ct=0,oa=null,Cs=null,Rs=0,rc=0,oc=null,N0=null,qi=0,uc=null;function Vt(){if((Me&2)!==0&&Te!==0)return Te&-Te;if(P.T!==null){var e=gs;return e!==0?e:gc()}return Hf()}function T0(){$t===0&&($t=(Te&536870912)===0||De?Bf():536870912);var e=Kt.current;return e!==null&&(e.flags|=32),$t}function _t(e,t,s){(e===_e&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(Ds(e,0),ua(e,Te,$t,!1)),li(e,s),((Me&2)===0||e!==_e)&&(e===_e&&((Me&2)===0&&(Ba|=s),Ke===4&&ua(e,Te,$t,!1)),yn(e))}function E0(e,t,s){if((Me&6)!==0)throw Error(r(327));var l=!s&&(t&124)===0&&(t&e.expiredLanes)===0||ii(e,t),u=l?gb(e,t):fc(e,t,!0),h=l;do{if(u===0){Es&&!l&&ua(e,t,0,!1);break}else{if(s=e.current.alternate,h&&!mb(s)){u=fc(e,t,!1),h=!1;continue}if(u===2){if(h=t,e.errorRecoveryDisabledLanes&h)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var w=e;u=Pi;var A=w.current.memoizedState.isDehydrated;if(A&&(Ds(w,x).flags|=256),x=fc(w,x,!1),x!==2){if(ac&&!A){w.errorRecoveryDisabledLanes|=h,Ba|=h,u=4;break e}h=At,At=u,h!==null&&(At===null?At=h:At.push.apply(At,h))}u=x}if(h=!1,u!==2)continue}}if(u===1){Ds(e,0),ua(e,t,0,!0);break}e:{switch(l=e,h=u,h){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:ua(l,t,$t,!ia);break e;case 2:At=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=lc+300-Ht(),10<u)){if(ua(l,t,$t,!ia),Ml(l,0,!0)!==0)break e;l.timeoutHandle=tp(A0.bind(null,l,s,At,br,ic,t,$t,Ba,As,ia,h,2,-0,0),u);break e}A0(l,s,At,br,ic,t,$t,Ba,As,ia,h,0,-0,0)}}break}while(!0);yn(e)}function A0(e,t,s,l,u,h,x,w,A,B,q,F,V,_){if(e.timeoutHandle=-1,F=t.subtreeFlags,(F&8192||(F&16785408)===16785408)&&(Zi={stylesheets:null,count:0,unsuspend:Zb},b0(t),F=Jb(),F!==null)){e.cancelPendingCommit=F(U0.bind(null,e,t,h,s,l,u,x,w,A,q,1,V,_)),ua(e,h,x,!B);return}U0(e,t,h,s,l,u,x,w,A)}function mb(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var u=s[l],h=u.getSnapshot;u=u.value;try{if(!Ot(h(),u))return!1}catch(x){return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ua(e,t,s,l){t&=~sc,t&=~Ba,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var u=t;0<u;){var h=31-Mt(u),x=1<<h;l[h]=-1,u&=~x}s!==0&&_f(e,s,t)}function wr(){return(Me&6)===0?(Yi(0),!1):!0}function cc(){if(Se!==null){if(Oe===0)var e=Se.return;else e=Se,Rn=Da=null,Au(e),Ss=null,Li=0,e=Se;for(;e!==null;)l0(e.alternate,e),e=e.return;Se=null}}function Ds(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,Ob(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),cc(),_e=e,Se=s=En(e.current,null),Te=t,Oe=0,Bt=null,ia=!1,Es=ii(e,t),ac=!1,As=$t=sc=Ba=la=Ke=0,At=Pi=null,ic=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var u=31-Mt(l),h=1<<u;t|=e[u],l&=~h}return Vn=t,Yl(),s}function C0(e,t){xe=null,P.H=or,t===Ni||t===Wl?(t=Xh(),Oe=3):t===qh?(t=Xh(),Oe=4):Oe=t===Fm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bt=t,Se===null&&(Ke=1,hr(e,Yt(t,e.current)))}function R0(){var e=P.H;return P.H=or,e===null?or:e}function D0(){var e=P.A;return P.A=fb,e}function dc(){Ke=4,ia||(Te&4194048)!==Te&&Kt.current!==null||(Es=!0),(la&134217727)===0&&(Ba&134217727)===0||_e===null||ua(_e,Te,$t,!1)}function fc(e,t,s){var l=Me;Me|=2;var u=R0(),h=D0();(_e!==e||Te!==t)&&(br=null,Ds(e,t)),t=!1;var x=Ke;e:do try{if(Oe!==0&&Se!==null){var w=Se,A=Bt;switch(Oe){case 8:cc(),x=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(t=!0);var B=Oe;if(Oe=0,Bt=null,Ms(e,w,A,B),s&&Es){x=0;break e}break;default:B=Oe,Oe=0,Bt=null,Ms(e,w,A,B)}}pb(),x=Ke;break}catch(q){C0(e,q)}while(!0);return t&&e.shellSuspendCounter++,Rn=Da=null,Me=l,P.H=u,P.A=h,Se===null&&(_e=null,Te=0,Yl()),x}function pb(){for(;Se!==null;)M0(Se)}function gb(e,t){var s=Me;Me|=2;var l=R0(),u=D0();_e!==e||Te!==t?(br=null,vr=Ht()+500,Ds(e,t)):Es=ii(e,t);e:do try{if(Oe!==0&&Se!==null){t=Se;var h=Bt;t:switch(Oe){case 1:Oe=0,Bt=null,Ms(e,t,h,1);break;case 2:case 9:if(Yh(h)){Oe=0,Bt=null,O0(t);break}t=function(){Oe!==2&&Oe!==9||_e!==e||(Oe=7),yn(e)},h.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:Yh(h)?(Oe=0,Bt=null,O0(t)):(Oe=0,Bt=null,Ms(e,t,h,7));break;case 5:var x=null;switch(Se.tag){case 26:x=Se.memoizedState;case 5:case 27:var w=Se;if(!x||hp(x)){Oe=0,Bt=null;var A=w.sibling;if(A!==null)Se=A;else{var B=w.return;B!==null?(Se=B,Sr(B)):Se=null}break t}}Oe=0,Bt=null,Ms(e,t,h,5);break;case 6:Oe=0,Bt=null,Ms(e,t,h,6);break;case 8:cc(),Ke=6;break e;default:throw Error(r(462))}}yb();break}catch(q){C0(e,q)}while(!0);return Rn=Da=null,P.H=l,P.A=u,Me=s,Se!==null?0:(_e=null,Te=0,Yl(),Ke)}function yb(){for(;Se!==null&&!To();)M0(Se)}function M0(e){var t=s0(e.alternate,e,Vn);e.memoizedProps=e.pendingProps,t===null?Sr(e):Se=t}function O0(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=Wm(s,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Wm(s,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:Au(t);default:l0(s,t),t=Se=Lh(t,Vn),t=s0(s,t,Vn)}e.memoizedProps=e.pendingProps,t===null?Sr(e):Se=t}function Ms(e,t,s,l){Rn=Da=null,Au(t),Ss=null,Li=0;var u=t.return;try{if(lb(e,u,t,s,Te)){Ke=1,hr(e,Yt(s,e.current)),Se=null;return}}catch(h){if(u!==null)throw Se=u,h;Ke=1,hr(e,Yt(s,e.current)),Se=null;return}t.flags&32768?(De||l===1?e=!0:Es||(Te&536870912)!==0?e=!1:(ia=e=!0,(l===2||l===9||l===3||l===6)&&(l=Kt.current,l!==null&&l.tag===13&&(l.flags|=16384))),L0(t,e)):Sr(t)}function Sr(e){var t=e;do{if((t.flags&32768)!==0){L0(t,ia);return}e=t.return;var s=ob(t.alternate,t,Vn);if(s!==null){Se=s;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Ke===0&&(Ke=5)}function L0(e,t){do{var s=ub(e.alternate,e);if(s!==null){s.flags&=32767,Se=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){Se=e;return}Se=e=s}while(e!==null);Ke=6,Se=null}function U0(e,t,s,l,u,h,x,w,A){e.cancelPendingCommit=null;do jr();while(ct!==0);if((Me&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(h=t.lanes|t.childLanes,h|=nu,Zv(e,s,h,x,w,A),e===_e&&(Se=_e=null,Te=0),Cs=t,oa=e,Rs=s,rc=h,oc=u,N0=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,wb(Ja,function(){return k0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=P.T,P.T=null,u=Q.p,Q.p=2,x=Me,Me|=4;try{cb(e,t,s)}finally{Me=x,Q.p=u,P.T=l}}ct=1,z0(),B0(),V0()}}function z0(){if(ct===1){ct=0;var e=oa,t=Cs,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var l=Q.p;Q.p=2;var u=Me;Me|=4;try{y0(t,e);var h=Nc,x=jh(e.containerInfo),w=h.focusedElem,A=h.selectionRange;if(x!==w&&w&&w.ownerDocument&&Sh(w.ownerDocument.documentElement,w)){if(A!==null&&Jo(w)){var B=A.start,q=A.end;if(q===void 0&&(q=B),"selectionStart"in w)w.selectionStart=B,w.selectionEnd=Math.min(q,w.value.length);else{var F=w.ownerDocument||document,V=F&&F.defaultView||window;if(V.getSelection){var _=V.getSelection(),ue=w.textContent.length,le=Math.min(A.start,ue),ze=A.end===void 0?le:Math.min(A.end,ue);!_.extend&&le>ze&&(x=ze,ze=le,le=x);var O=wh(w,le),R=wh(w,ze);if(O&&R&&(_.rangeCount!==1||_.anchorNode!==O.node||_.anchorOffset!==O.offset||_.focusNode!==R.node||_.focusOffset!==R.offset)){var z=F.createRange();z.setStart(O.node,O.offset),_.removeAllRanges(),le>ze?(_.addRange(z),_.extend(R.node,R.offset)):(z.setEnd(R.node,R.offset),_.addRange(z))}}}}for(F=[],_=w;_=_.parentNode;)_.nodeType===1&&F.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<F.length;w++){var X=F[w];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}zr=!!jc,Nc=jc=null}finally{Me=u,Q.p=l,P.T=s}}e.current=t,ct=2}}function B0(){if(ct===2){ct=0;var e=oa,t=Cs,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var l=Q.p;Q.p=2;var u=Me;Me|=4;try{h0(e,t.alternate,t)}finally{Me=u,Q.p=l,P.T=s}}ct=3}}function V0(){if(ct===4||ct===3){ct=0,Eo();var e=oa,t=Cs,s=Rs,l=N0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,Cs=oa=null,_0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(ra=null),Do(s),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(vt,t,void 0,(t.current.flags&128)===128)}catch(A){}if(l!==null){t=P.T,u=Q.p,Q.p=2,P.T=null;try{for(var h=e.onRecoverableError,x=0;x<l.length;x++){var w=l[x];h(w.value,{componentStack:w.stack})}}finally{P.T=t,Q.p=u}}(Rs&3)!==0&&jr(),yn(e),u=e.pendingLanes,(s&4194090)!==0&&(u&42)!==0?e===uc?qi++:(qi=0,uc=e):qi=0,Yi(0)}}function _0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Si(t)))}function jr(e){return z0(),B0(),V0(),k0()}function k0(){if(ct!==5)return!1;var e=oa,t=rc;rc=0;var s=Do(Rs),l=P.T,u=Q.p;try{Q.p=32>s?32:s,P.T=null,s=oc,oc=null;var h=oa,x=Rs;if(ct=0,Cs=oa=null,Rs=0,(Me&6)!==0)throw Error(r(331));var w=Me;if(Me|=4,S0(h.current),v0(h,h.current,x,s),Me=w,Yi(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(vt,h)}catch(A){}return!0}finally{Q.p=u,P.T=l,_0(e,t)}}function H0(e,t,s){t=Yt(s,t),t=Pu(e.stateNode,t,2),e=Wn(e,t,2),e!==null&&(li(e,2),yn(e))}function Ve(e,t,s){if(e.tag===3)H0(e,e,s);else for(;t!==null;){if(t.tag===3){H0(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ra===null||!ra.has(l))){e=Yt(s,e),s=Gm(2),l=Wn(t,s,2),l!==null&&(Xm(s,l,t,e),li(l,2),yn(l));break}}t=t.return}}function hc(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new hb;var u=new Set;l.set(t,u)}else u=l.get(t),u===void 0&&(u=new Set,l.set(t,u));u.has(s)||(ac=!0,u.add(s),e=xb.bind(null,e,t,s),t.then(e,e))}function xb(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,_e===e&&(Te&s)===s&&(Ke===4||Ke===3&&(Te&62914560)===Te&&300>Ht()-lc?(Me&2)===0&&Ds(e,0):sc|=s,As===Te&&(As=0)),yn(e)}function P0(e,t){t===0&&(t=Vf()),e=fs(e,t),e!==null&&(li(e,t),yn(e))}function vb(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),P0(e,s)}function bb(e,t){var s=0;switch(e.tag){case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(s=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),P0(e,s)}function wb(e,t){return ni(e,t)}var Nr=null,Os=null,mc=!1,Tr=!1,pc=!1,Va=0;function yn(e){e!==Os&&e.next===null&&(Os===null?Nr=Os=e:Os=Os.next=e),Tr=!0,mc||(mc=!0,jb())}function Yi(e,t){if(!pc&&Tr){pc=!0;do for(var s=!1,l=Nr;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var h=0;else{var x=l.suspendedLanes,w=l.pingedLanes;h=(1<<31-Mt(42|e)+1)-1,h&=u&~(x&~w),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(s=!0,X0(l,h))}else h=Te,h=Ml(l,l===_e?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(h&3)===0||ii(l,h)||(s=!0,X0(l,h));l=l.next}while(s);pc=!1}}function Sb(){q0()}function q0(){Tr=mc=!1;var e=0;Va!==0&&(Mb()&&(e=Va),Va=0);for(var t=Ht(),s=null,l=Nr;l!==null;){var u=l.next,h=Y0(l,t);h===0?(l.next=null,s===null?Nr=u:s.next=u,u===null&&(Os=s)):(s=l,(e!==0||(h&3)!==0)&&(Tr=!0)),l=u}Yi(e)}function Y0(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var x=31-Mt(h),w=1<<x,A=u[x];A===-1?((w&s)===0||(w&l)!==0)&&(u[x]=$v(w,t)):A<=t&&(e.expiredLanes|=w),h&=~w}if(t=_e,s=Te,s=Ml(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qa(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||ii(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&Qa(l),Do(s)){case 2:case 8:s=si;break;case 32:s=Ja;break;case 268435456:s=Ee;break;default:s=Ja}return l=G0.bind(null,e),s=ni(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&Qa(l),e.callbackPriority=2,e.callbackNode=null,2}function G0(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(jr()&&e.callbackNode!==s)return null;var l=Te;return l=Ml(e,e===_e?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(E0(e,l,t),Y0(e,Ht()),e.callbackNode!=null&&e.callbackNode===s?G0.bind(null,e):null)}function X0(e,t){if(jr())return null;E0(e,t,!0)}function jb(){Lb(function(){(Me&6)!==0?ni(ai,Sb):q0()})}function gc(){return Va===0&&(Va=Bf()),Va}function F0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Bl(""+e)}function K0(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function Nb(e,t,s,l,u){if(t==="submit"&&s&&s.stateNode===u){var h=F0((u[jt]||null).action),x=l.submitter;x&&(t=(t=x[jt]||null)?F0(t.formAction):x.getAttribute("formAction"),t!==null&&(h=t,x=null));var w=new Hl("action","action",null,l,u);e.push({event:w,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Va!==0){var A=x?K0(u,x):new FormData(u);Bu(s,{pending:!0,data:A,method:u.method,action:h},null,A)}}else typeof h=="function"&&(w.preventDefault(),A=x?K0(u,x):new FormData(u),Bu(s,{pending:!0,data:A,method:u.method,action:h},h,A))},currentTarget:u}]})}}for(var yc=0;yc<tu.length;yc++){var xc=tu[yc],Tb=xc.toLowerCase(),Eb=xc[0].toUpperCase()+xc.slice(1);rn(Tb,"on"+Eb)}rn(Eh,"onAnimationEnd"),rn(Ah,"onAnimationIteration"),rn(Ch,"onAnimationStart"),rn("dblclick","onDoubleClick"),rn("focusin","onFocus"),rn("focusout","onBlur"),rn(Y1,"onTransitionRun"),rn(G1,"onTransitionStart"),rn(X1,"onTransitionCancel"),rn(Rh,"onTransitionEnd"),ns("onMouseEnter",["mouseout","mouseover"]),ns("onMouseLeave",["mouseout","mouseover"]),ns("onPointerEnter",["pointerout","pointerover"]),ns("onPointerLeave",["pointerout","pointerover"]),wa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wa("onBeforeInput",["compositionend","keypress","textInput","paste"]),wa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ab=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gi));function $0(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],u=l.event;l=l.listeners;e:{var h=void 0;if(t)for(var x=l.length-1;0<=x;x--){var w=l[x],A=w.instance,B=w.currentTarget;if(w=w.listener,A!==h&&u.isPropagationStopped())break e;h=w,u.currentTarget=B;try{h(u)}catch(q){fr(q)}u.currentTarget=null,h=A}else for(x=0;x<l.length;x++){if(w=l[x],A=w.instance,B=w.currentTarget,w=w.listener,A!==h&&u.isPropagationStopped())break e;h=w,u.currentTarget=B;try{h(u)}catch(q){fr(q)}u.currentTarget=null,h=A}}}}function je(e,t){var s=t[Mo];s===void 0&&(s=t[Mo]=new Set);var l=e+"__bubble";s.has(l)||(Z0(t,e,2,!1),s.add(l))}function vc(e,t,s){var l=0;t&&(l|=4),Z0(s,e,l,t)}var Er="_reactListening"+Math.random().toString(36).slice(2);function bc(e){if(!e[Er]){e[Er]=!0,qf.forEach(function(s){s!=="selectionchange"&&(Ab.has(s)||vc(s,!1,e),vc(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Er]||(t[Er]=!0,vc("selectionchange",!1,t))}}function Z0(e,t,s,l){switch(vp(t)){case 2:var u=e2;break;case 8:u=t2;break;default:u=Uc}s=u.bind(null,t,s,e),u=void 0,!qo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(t,s,{capture:!0,passive:u}):e.addEventListener(t,s,!0):u!==void 0?e.addEventListener(t,s,{passive:u}):e.addEventListener(t,s,!1)}function wc(e,t,s,l,u){var h=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var w=l.stateNode.containerInfo;if(w===u)break;if(x===4)for(x=l.return;x!==null;){var A=x.tag;if((A===3||A===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;w!==null;){if(x=Ia(w),x===null)return;if(A=x.tag,A===5||A===6||A===26||A===27){l=h=x;continue e}w=w.parentNode}}l=l.return}nh(function(){var B=h,q=Ho(s),F=[];e:{var V=Dh.get(e);if(V!==void 0){var _=Hl,ue=e;switch(e){case"keypress":if(_l(s)===0)break e;case"keydown":case"keyup":_=w1;break;case"focusin":ue="focus",_=Fo;break;case"focusout":ue="blur",_=Fo;break;case"beforeblur":case"afterblur":_=Fo;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=ih;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=u1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=N1;break;case Eh:case Ah:case Ch:_=f1;break;case Rh:_=E1;break;case"scroll":case"scrollend":_=r1;break;case"wheel":_=C1;break;case"copy":case"cut":case"paste":_=m1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=rh;break;case"toggle":case"beforetoggle":_=D1}var le=(t&4)!==0,ze=!le&&(e==="scroll"||e==="scrollend"),O=le?V!==null?V+"Capture":null:V;le=[];for(var R=B,z;R!==null;){var X=R;if(z=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||z===null||O===null||(X=ui(R,O),X!=null&&le.push(Xi(R,X,z))),ze)break;R=R.return}0<le.length&&(V=new _(V,ue,null,s,q),F.push({event:V,listeners:le}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",V&&s!==ko&&(ue=s.relatedTarget||s.fromElement)&&(Ia(ue)||ue[Wa]))break e;if((_||V)&&(V=q.window===q?q:(V=q.ownerDocument)?V.defaultView||V.parentWindow:window,_?(ue=s.relatedTarget||s.toElement,_=B,ue=ue?Ia(ue):null,ue!==null&&(ze=f(ue),le=ue.tag,ue!==ze||le!==5&&le!==27&&le!==6)&&(ue=null)):(_=null,ue=B),_!==ue)){if(le=ih,X="onMouseLeave",O="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(le=rh,X="onPointerLeave",O="onPointerEnter",R="pointer"),ze=_==null?V:oi(_),z=ue==null?V:oi(ue),V=new le(X,R+"leave",_,s,q),V.target=ze,V.relatedTarget=z,X=null,Ia(q)===B&&(le=new le(O,R+"enter",ue,s,q),le.target=z,le.relatedTarget=ze,X=le),ze=X,_&&ue)t:{for(le=_,O=ue,R=0,z=le;z;z=Ls(z))R++;for(z=0,X=O;X;X=Ls(X))z++;for(;0<R-z;)le=Ls(le),R--;for(;0<z-R;)O=Ls(O),z--;for(;R--;){if(le===O||O!==null&&le===O.alternate)break t;le=Ls(le),O=Ls(O)}le=null}else le=null;_!==null&&Q0(F,V,_,le,!1),ue!==null&&ze!==null&&Q0(F,ze,ue,le,!0)}}e:{if(V=B?oi(B):window,_=V.nodeName&&V.nodeName.toLowerCase(),_==="select"||_==="input"&&V.type==="file")var te=ph;else if(hh(V))if(gh)te=H1;else{te=_1;var we=V1}else _=V.nodeName,!_||_.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?B&&_o(B.elementType)&&(te=ph):te=k1;if(te&&(te=te(e,B))){mh(F,te,s,q);break e}we&&we(e,V,B),e==="focusout"&&B&&V.type==="number"&&B.memoizedProps.value!=null&&Vo(V,"number",V.value)}switch(we=B?oi(B):window,e){case"focusin":(hh(we)||we.contentEditable==="true")&&(us=we,Wo=B,yi=null);break;case"focusout":yi=Wo=us=null;break;case"mousedown":Io=!0;break;case"contextmenu":case"mouseup":case"dragend":Io=!1,Nh(F,s,q);break;case"selectionchange":if(q1)break;case"keydown":case"keyup":Nh(F,s,q)}var ae;if($o)e:{switch(e){case"compositionstart":var re="onCompositionStart";break e;case"compositionend":re="onCompositionEnd";break e;case"compositionupdate":re="onCompositionUpdate";break e}re=void 0}else os?dh(e,s)&&(re="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(re="onCompositionStart");re&&(oh&&s.locale!=="ko"&&(os||re!=="onCompositionStart"?re==="onCompositionEnd"&&os&&(ae=ah()):($n=q,Yo="value"in $n?$n.value:$n.textContent,os=!0)),we=Ar(B,re),0<we.length&&(re=new lh(re,e,null,s,q),F.push({event:re,listeners:we}),ae?re.data=ae:(ae=fh(s),ae!==null&&(re.data=ae)))),(ae=O1?L1(e,s):U1(e,s))&&(re=Ar(B,"onBeforeInput"),0<re.length&&(we=new lh("onBeforeInput","beforeinput",null,s,q),F.push({event:we,listeners:re}),we.data=ae)),Nb(F,e,B,s,q)}$0(F,t)})}function Xi(e,t,s){return{instance:e,listener:t,currentTarget:s}}function Ar(e,t){for(var s=t+"Capture",l=[];e!==null;){var u=e,h=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||h===null||(u=ui(e,s),u!=null&&l.unshift(Xi(e,u,h)),u=ui(e,t),u!=null&&l.push(Xi(e,u,h))),e.tag===3)return l;e=e.return}return[]}function Ls(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Q0(e,t,s,l,u){for(var h=t._reactName,x=[];s!==null&&s!==l;){var w=s,A=w.alternate,B=w.stateNode;if(w=w.tag,A!==null&&A===l)break;w!==5&&w!==26&&w!==27||B===null||(A=B,u?(B=ui(s,h),B!=null&&x.unshift(Xi(s,B,A))):u||(B=ui(s,h),B!=null&&x.push(Xi(s,B,A)))),s=s.return}x.length!==0&&e.push({event:t,listeners:x})}var Cb=/\r\n?/g,Rb=/\u0000|\uFFFD/g;function J0(e){return(typeof e=="string"?e:""+e).replace(Cb,`
|
|
49
|
+
`).replace(Rb,"")}function W0(e,t){return t=J0(t),J0(e)===t}function Cr(){}function Ue(e,t,s,l,u,h){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||is(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&is(e,""+l);break;case"className":Ll(e,"class",l);break;case"tabIndex":Ll(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ll(e,s,l);break;case"style":eh(e,l,h);break;case"data":if(t!=="object"){Ll(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=Bl(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(s==="formAction"?(t!=="input"&&Ue(e,t,"name",u.name,u,null),Ue(e,t,"formEncType",u.formEncType,u,null),Ue(e,t,"formMethod",u.formMethod,u,null),Ue(e,t,"formTarget",u.formTarget,u,null)):(Ue(e,t,"encType",u.encType,u,null),Ue(e,t,"method",u.method,u,null),Ue(e,t,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=Bl(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=Cr);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(s=l.__html,s!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=Bl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":je("beforetoggle",e),je("toggle",e),Ol(e,"popover",l);break;case"xlinkActuate":Nn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Nn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Nn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Nn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Nn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Nn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Nn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Nn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Nn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ol(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=i1.get(s)||s,Ol(e,s,l))}}function Sc(e,t,s,l,u,h){switch(s){case"style":eh(e,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(s=l.__html,s!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=s}}break;case"children":typeof l=="string"?is(e,l):(typeof l=="number"||typeof l=="bigint")&&is(e,""+l);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Cr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yf.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),t=s.slice(2,u?s.length-7:void 0),h=e[jt]||null,h=h!=null?h[s]:null,typeof h=="function"&&e.removeEventListener(t,h,u),typeof l=="function")){typeof h!="function"&&h!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,l,u);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):Ol(e,s,l)}}}function dt(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var l=!1,u=!1,h;for(h in s)if(s.hasOwnProperty(h)){var x=s[h];if(x!=null)switch(h){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,h,x,s,null)}}u&&Ue(e,t,"srcSet",s.srcSet,s,null),l&&Ue(e,t,"src",s.src,s,null);return;case"input":je("invalid",e);var w=h=x=u=null,A=null,B=null;for(l in s)if(s.hasOwnProperty(l)){var q=s[l];if(q!=null)switch(l){case"name":u=q;break;case"type":x=q;break;case"checked":A=q;break;case"defaultChecked":B=q;break;case"value":h=q;break;case"defaultValue":w=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:Ue(e,t,l,q,s,null)}}Qf(e,h,w,A,B,x,u,!1),Ul(e);return;case"select":je("invalid",e),l=x=h=null;for(u in s)if(s.hasOwnProperty(u)&&(w=s[u],w!=null))switch(u){case"value":h=w;break;case"defaultValue":x=w;break;case"multiple":l=w;default:Ue(e,t,u,w,s,null)}t=h,s=x,e.multiple=!!l,t!=null?ss(e,!!l,t,!1):s!=null&&ss(e,!!l,s,!0);return;case"textarea":je("invalid",e),h=u=l=null;for(x in s)if(s.hasOwnProperty(x)&&(w=s[x],w!=null))switch(x){case"value":l=w;break;case"defaultValue":u=w;break;case"children":h=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:Ue(e,t,x,w,s,null)}Wf(e,l,u,h),Ul(e);return;case"option":for(A in s)if(s.hasOwnProperty(A)&&(l=s[A],l!=null))switch(A){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ue(e,t,A,l,s,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(l=0;l<Gi.length;l++)je(Gi[l],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in s)if(s.hasOwnProperty(B)&&(l=s[B],l!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,B,l,s,null)}return;default:if(_o(t)){for(q in s)s.hasOwnProperty(q)&&(l=s[q],l!==void 0&&Sc(e,t,q,l,s,void 0));return}}for(w in s)s.hasOwnProperty(w)&&(l=s[w],l!=null&&Ue(e,t,w,l,s,null))}function Db(e,t,s,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,h=null,x=null,w=null,A=null,B=null,q=null;for(_ in s){var F=s[_];if(s.hasOwnProperty(_)&&F!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":A=F;default:l.hasOwnProperty(_)||Ue(e,t,_,null,l,F)}}for(var V in l){var _=l[V];if(F=s[V],l.hasOwnProperty(V)&&(_!=null||F!=null))switch(V){case"type":h=_;break;case"name":u=_;break;case"checked":B=_;break;case"defaultChecked":q=_;break;case"value":x=_;break;case"defaultValue":w=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(137,t));break;default:_!==F&&Ue(e,t,V,_,l,F)}}Bo(e,x,w,A,B,q,h,u);return;case"select":_=x=w=V=null;for(h in s)if(A=s[h],s.hasOwnProperty(h)&&A!=null)switch(h){case"value":break;case"multiple":_=A;default:l.hasOwnProperty(h)||Ue(e,t,h,null,l,A)}for(u in l)if(h=l[u],A=s[u],l.hasOwnProperty(u)&&(h!=null||A!=null))switch(u){case"value":V=h;break;case"defaultValue":w=h;break;case"multiple":x=h;default:h!==A&&Ue(e,t,u,h,l,A)}t=w,s=x,l=_,V!=null?ss(e,!!s,V,!1):!!l!=!!s&&(t!=null?ss(e,!!s,t,!0):ss(e,!!s,s?[]:"",!1));return;case"textarea":_=V=null;for(w in s)if(u=s[w],s.hasOwnProperty(w)&&u!=null&&!l.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Ue(e,t,w,null,l,u)}for(x in l)if(u=l[x],h=s[x],l.hasOwnProperty(x)&&(u!=null||h!=null))switch(x){case"value":V=u;break;case"defaultValue":_=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==h&&Ue(e,t,x,u,l,h)}Jf(e,V,_);return;case"option":for(var ue in s)if(V=s[ue],s.hasOwnProperty(ue)&&V!=null&&!l.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:Ue(e,t,ue,null,l,V)}for(A in l)if(V=l[A],_=s[A],l.hasOwnProperty(A)&&V!==_&&(V!=null||_!=null))switch(A){case"selected":e.selected=V&&typeof V!="function"&&typeof V!="symbol";break;default:Ue(e,t,A,V,l,_)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var le in s)V=s[le],s.hasOwnProperty(le)&&V!=null&&!l.hasOwnProperty(le)&&Ue(e,t,le,null,l,V);for(B in l)if(V=l[B],_=s[B],l.hasOwnProperty(B)&&V!==_&&(V!=null||_!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,t));break;default:Ue(e,t,B,V,l,_)}return;default:if(_o(t)){for(var ze in s)V=s[ze],s.hasOwnProperty(ze)&&V!==void 0&&!l.hasOwnProperty(ze)&&Sc(e,t,ze,void 0,l,V);for(q in l)V=l[q],_=s[q],!l.hasOwnProperty(q)||V===_||V===void 0&&_===void 0||Sc(e,t,q,V,l,_);return}}for(var O in s)V=s[O],s.hasOwnProperty(O)&&V!=null&&!l.hasOwnProperty(O)&&Ue(e,t,O,null,l,V);for(F in l)V=l[F],_=s[F],!l.hasOwnProperty(F)||V===_||V==null&&_==null||Ue(e,t,F,V,l,_)}var jc=null,Nc=null;function Rr(e){return e.nodeType===9?e:e.ownerDocument}function I0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ep(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Tc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ec=null;function Mb(){var e=window.event;return e&&e.type==="popstate"?e===Ec?!1:(Ec=e,!0):(Ec=null,!1)}var tp=typeof setTimeout=="function"?setTimeout:void 0,Ob=typeof clearTimeout=="function"?clearTimeout:void 0,np=typeof Promise=="function"?Promise:void 0,Lb=typeof queueMicrotask=="function"?queueMicrotask:typeof np!="undefined"?function(e){return np.resolve(null).then(e).catch(Ub)}:tp;function Ub(e){setTimeout(function(){throw e})}function ca(e){return e==="head"}function ap(e,t){var s=t,l=0,u=0;do{var h=s.nextSibling;if(e.removeChild(s),h&&h.nodeType===8)if(s=h.data,s==="/$"){if(0<l&&8>l){s=l;var x=e.ownerDocument;if(s&1&&Fi(x.documentElement),s&2&&Fi(x.body),s&4)for(s=x.head,Fi(s),x=s.firstChild;x;){var w=x.nextSibling,A=x.nodeName;x[ri]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&x.rel.toLowerCase()==="stylesheet"||s.removeChild(x),x=w}}if(u===0){e.removeChild(h),el(t);return}u--}else s==="$"||s==="$?"||s==="$!"?u++:l=s.charCodeAt(0)-48;else l=0;s=h}while(s);el(t)}function Ac(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Ac(s),Oo(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function zb(e,t,s,l){for(;e.nodeType===1;){var u=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ri])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var h=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=un(e.nextSibling),e===null)break}return null}function Bb(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=un(e.nextSibling),e===null))return null;return e}function Cc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Vb(e,t){var s=e.ownerDocument;if(e.data!=="$?"||s.readyState==="complete")t();else{var l=function(){t(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function un(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Rc=null;function sp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}function ip(e,t,s){switch(t=Rr(s),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Fi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Oo(e)}var Zt=new Map,lp=new Set;function Dr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _n=Q.d;Q.d={f:_b,r:kb,D:Hb,C:Pb,L:qb,m:Yb,X:Xb,S:Gb,M:Fb};function _b(){var e=_n.f(),t=wr();return e||t}function kb(e){var t=es(e);t!==null&&t.tag===5&&t.type==="form"?Em(t):_n.r(e)}var Us=typeof document=="undefined"?null:document;function rp(e,t,s){var l=Us;if(l&&typeof t=="string"&&t){var u=qt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),lp.has(u)||(lp.add(u),e={rel:e,crossOrigin:s,href:t},l.querySelector(u)===null&&(t=l.createElement("link"),dt(t,"link",e),st(t),l.head.appendChild(t)))}}function Hb(e){_n.D(e),rp("dns-prefetch",e,null)}function Pb(e,t){_n.C(e,t),rp("preconnect",e,t)}function qb(e,t,s){_n.L(e,t,s);var l=Us;if(l&&e&&t){var u='link[rel="preload"][as="'+qt(t)+'"]';t==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+qt(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+qt(s.imageSizes)+'"]')):u+='[href="'+qt(e)+'"]';var h=u;switch(t){case"style":h=zs(e);break;case"script":h=Bs(e)}Zt.has(h)||(e=y({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Zt.set(h,e),l.querySelector(u)!==null||t==="style"&&l.querySelector(Ki(h))||t==="script"&&l.querySelector($i(h))||(t=l.createElement("link"),dt(t,"link",e),st(t),l.head.appendChild(t)))}}function Yb(e,t){_n.m(e,t);var s=Us;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+qt(l)+'"][href="'+qt(e)+'"]',h=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Bs(e)}if(!Zt.has(h)&&(e=y({rel:"modulepreload",href:e},t),Zt.set(h,e),s.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector($i(h)))return}l=s.createElement("link"),dt(l,"link",e),st(l),s.head.appendChild(l)}}}function Gb(e,t,s){_n.S(e,t,s);var l=Us;if(l&&e){var u=ts(l).hoistableStyles,h=zs(e);t=t||"default";var x=u.get(h);if(!x){var w={loading:0,preload:null};if(x=l.querySelector(Ki(h)))w.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Zt.get(h))&&Dc(e,s);var A=x=l.createElement("link");st(A),dt(A,"link",e),A._p=new Promise(function(B,q){A.onload=B,A.onerror=q}),A.addEventListener("load",function(){w.loading|=1}),A.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Mr(x,t,l)}x={type:"stylesheet",instance:x,count:1,state:w},u.set(h,x)}}}function Xb(e,t){_n.X(e,t);var s=Us;if(s&&e){var l=ts(s).hoistableScripts,u=Bs(e),h=l.get(u);h||(h=s.querySelector($i(u)),h||(e=y({src:e,async:!0},t),(t=Zt.get(u))&&Mc(e,t),h=s.createElement("script"),st(h),dt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(u,h))}}function Fb(e,t){_n.M(e,t);var s=Us;if(s&&e){var l=ts(s).hoistableScripts,u=Bs(e),h=l.get(u);h||(h=s.querySelector($i(u)),h||(e=y({src:e,async:!0,type:"module"},t),(t=Zt.get(u))&&Mc(e,t),h=s.createElement("script"),st(h),dt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(u,h))}}function op(e,t,s,l){var u=(u=fe.current)?Dr(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=zs(s.href),s=ts(u).hoistableStyles,l=s.get(t),l||(l={type:"style",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=zs(s.href);var h=ts(u).hoistableStyles,x=h.get(e);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,x),(h=u.querySelector(Ki(e)))&&!h._p&&(x.instance=h,x.state.loading=5),Zt.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Zt.set(e,s),h||Kb(u,e,s,x.state))),t&&l===null)throw Error(r(528,""));return x}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Bs(s),s=ts(u).hoistableScripts,l=s.get(t),l||(l={type:"script",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function zs(e){return'href="'+qt(e)+'"'}function Ki(e){return'link[rel="stylesheet"]['+e+"]"}function up(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Kb(e,t,s,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),dt(t,"link",s),st(t),e.head.appendChild(t))}function Bs(e){return'[src="'+qt(e)+'"]'}function $i(e){return"script[async]"+e}function cp(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+qt(s.href)+'"]');if(l)return t.instance=l,st(l),l;var u=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),st(l),dt(l,"style",u),Mr(l,s.precedence,e),t.instance=l;case"stylesheet":u=zs(s.href);var h=e.querySelector(Ki(u));if(h)return t.state.loading|=4,t.instance=h,st(h),h;l=up(s),(u=Zt.get(u))&&Dc(l,u),h=(e.ownerDocument||e).createElement("link"),st(h);var x=h;return x._p=new Promise(function(w,A){x.onload=w,x.onerror=A}),dt(h,"link",l),t.state.loading|=4,Mr(h,s.precedence,e),t.instance=h;case"script":return h=Bs(s.src),(u=e.querySelector($i(h)))?(t.instance=u,st(u),u):(l=s,(u=Zt.get(h))&&(l=y({},s),Mc(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),st(u),dt(u,"link",l),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Mr(l,s.precedence,e));return t.instance}function Mr(e,t,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,h=u,x=0;x<l.length;x++){var w=l[x];if(w.dataset.precedence===t)h=w;else if(h!==u)break}h?h.parentNode.insertBefore(e,h.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function Dc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Mc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Or=null;function dp(e,t,s){if(Or===null){var l=new Map,u=Or=new Map;u.set(s,l)}else u=Or,l=u.get(s),l||(l=new Map,u.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),u=0;u<s.length;u++){var h=s[u];if(!(h[ri]||h[ht]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var x=h.getAttribute(t)||"";x=e+x;var w=l.get(x);w?w.push(h):l.set(x,[h])}}return l}function fp(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function $b(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Zi=null;function Zb(){}function Qb(e,t,s){if(Zi===null)throw Error(r(475));var l=Zi;if(t.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var u=zs(s.href),h=e.querySelector(Ki(u));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=Lr.bind(l),e.then(l,l)),t.state.loading|=4,t.instance=h,st(h);return}h=e.ownerDocument||e,s=up(s),(u=Zt.get(u))&&Dc(s,u),h=h.createElement("link"),st(h);var x=h;x._p=new Promise(function(w,A){x.onload=w,x.onerror=A}),dt(h,"link",s),t.instance=h}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(l.count++,t=Lr.bind(l),e.addEventListener("load",t),e.addEventListener("error",t))}}function Jb(){if(Zi===null)throw Error(r(475));var e=Zi;return e.stylesheets&&e.count===0&&Oc(e,e.stylesheets),0<e.count?function(t){var s=setTimeout(function(){if(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(s)}}:null}function Lr(){if(this.count--,this.count===0){if(this.stylesheets)Oc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ur=null;function Oc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ur=new Map,t.forEach(Wb,e),Ur=null,Lr.call(e))}function Wb(e,t){if(!(t.state.loading&4)){var s=Ur.get(e);if(s)var l=s.get(null);else{s=new Map,Ur.set(e,s);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<u.length;h++){var x=u[h];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),l=x)}l&&s.set(null,l)}u=t.instance,x=u.getAttribute("data-precedence"),h=s.get(x)||l,h===l&&s.set(null,u),s.set(x,u),this.count++,l=Lr.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),h?h.parentNode.insertBefore(u,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Qi={$$typeof:M,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Ib(e,t,s,l,u,h,x,w){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Co(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Co(0),this.hiddenUpdates=Co(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=h,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function mp(e,t,s,l,u,h,x,w,A,B,q,F){return e=new Ib(e,t,s,x,w,A,B,F),t=1,h===!0&&(t|=24),h=Lt(3,null,null,t),e.current=h,h.stateNode=e,t=hu(),t.refCount++,e.pooledCache=t,t.refCount++,h.memoizedState={element:l,isDehydrated:s,cache:t},yu(h),e}function pp(e){return e?(e=hs,e):hs}function gp(e,t,s,l,u,h){u=pp(u),l.context===null?l.context=u:l.pendingContext=u,l=Jn(t),l.payload={element:s},h=h===void 0?null:h,h!==null&&(l.callback=h),s=Wn(e,l,t),s!==null&&(_t(s,e,t),Ei(s,e,t))}function yp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function Lc(e,t){yp(e,t),(e=e.alternate)&&yp(e,t)}function xp(e){if(e.tag===13){var t=fs(e,67108864);t!==null&&_t(t,e,67108864),Lc(e,67108864)}}var zr=!0;function e2(e,t,s,l){var u=P.T;P.T=null;var h=Q.p;try{Q.p=2,Uc(e,t,s,l)}finally{Q.p=h,P.T=u}}function t2(e,t,s,l){var u=P.T;P.T=null;var h=Q.p;try{Q.p=8,Uc(e,t,s,l)}finally{Q.p=h,P.T=u}}function Uc(e,t,s,l){if(zr){var u=zc(l);if(u===null)wc(e,t,l,Br,s),bp(e,l);else if(a2(u,e,t,s,l))l.stopPropagation();else if(bp(e,l),t&4&&-1<n2.indexOf(e)){for(;u!==null;){var h=es(u);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var x=ba(h.pendingLanes);if(x!==0){var w=h;for(w.pendingLanes|=2,w.entangledLanes|=2;x;){var A=1<<31-Mt(x);w.entanglements[1]|=A,x&=~A}yn(h),(Me&6)===0&&(vr=Ht()+500,Yi(0))}}break;case 13:w=fs(h,2),w!==null&&_t(w,h,2),wr(),Lc(h,2)}if(h=zc(l),h===null&&wc(e,t,l,Br,s),h===u)break;u=h}u!==null&&l.stopPropagation()}else wc(e,t,l,null,s)}}function zc(e){return e=Ho(e),Bc(e)}var Br=null;function Bc(e){if(Br=null,e=Ia(e),e!==null){var t=f(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Br=e,null}function vp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ao()){case ai:return 2;case si:return 8;case Ja:case I:return 32;case Ee:return 268435456;default:return 32}default:return 32}}var Vc=!1,da=null,fa=null,ha=null,Ji=new Map,Wi=new Map,ma=[],n2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function bp(e,t){switch(e){case"focusin":case"focusout":da=null;break;case"dragenter":case"dragleave":fa=null;break;case"mouseover":case"mouseout":ha=null;break;case"pointerover":case"pointerout":Ji.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wi.delete(t.pointerId)}}function Ii(e,t,s,l,u,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:s,eventSystemFlags:l,nativeEvent:h,targetContainers:[u]},t!==null&&(t=es(t),t!==null&&xp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function a2(e,t,s,l,u){switch(t){case"focusin":return da=Ii(da,e,t,s,l,u),!0;case"dragenter":return fa=Ii(fa,e,t,s,l,u),!0;case"mouseover":return ha=Ii(ha,e,t,s,l,u),!0;case"pointerover":var h=u.pointerId;return Ji.set(h,Ii(Ji.get(h)||null,e,t,s,l,u)),!0;case"gotpointercapture":return h=u.pointerId,Wi.set(h,Ii(Wi.get(h)||null,e,t,s,l,u)),!0}return!1}function wp(e){var t=Ia(e.target);if(t!==null){var s=f(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,Qv(e.priority,function(){if(s.tag===13){var l=Vt();l=Ro(l);var u=fs(s,l);u!==null&&_t(u,s,l),Lc(s,l)}});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=zc(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);ko=l,s.target.dispatchEvent(l),ko=null}else return t=es(s),t!==null&&xp(t),e.blockedOn=s,!1;t.shift()}return!0}function Sp(e,t,s){Vr(e)&&s.delete(t)}function s2(){Vc=!1,da!==null&&Vr(da)&&(da=null),fa!==null&&Vr(fa)&&(fa=null),ha!==null&&Vr(ha)&&(ha=null),Ji.forEach(Sp),Wi.forEach(Sp)}function _r(e,t){e.blockedOn===t&&(e.blockedOn=null,Vc||(Vc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,s2)))}var kr=null;function jp(e){kr!==e&&(kr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){kr===e&&(kr=null);for(var t=0;t<e.length;t+=3){var s=e[t],l=e[t+1],u=e[t+2];if(typeof l!="function"){if(Bc(l||s)===null)continue;break}var h=es(s);h!==null&&(e.splice(t,3),t-=3,Bu(h,{pending:!0,data:u,method:s.method,action:l},l,u))}}))}function el(e){function t(A){return _r(A,e)}da!==null&&_r(da,e),fa!==null&&_r(fa,e),ha!==null&&_r(ha,e),Ji.forEach(t),Wi.forEach(t);for(var s=0;s<ma.length;s++){var l=ma[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ma.length&&(s=ma[0],s.blockedOn===null);)wp(s),s.blockedOn===null&&ma.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var u=s[l],h=s[l+1],x=u[jt]||null;if(typeof h=="function")x||jp(s);else if(x){var w=null;if(h&&h.hasAttribute("formAction")){if(u=h,x=h[jt]||null)w=x.formAction;else if(Bc(u)!==null)continue}else w=x.action;typeof w=="function"?s[l+1]=w:(s.splice(l,3),l-=3),jp(s)}}}function _c(e){this._internalRoot=e}Hr.prototype.render=_c.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var s=t.current,l=Vt();gp(s,l,e,t,null,null)},Hr.prototype.unmount=_c.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gp(e.current,2,null,e,null,null),wr(),t[Wa]=null}};function Hr(e){this._internalRoot=e}Hr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hf();e={blockedOn:null,target:e,priority:t};for(var s=0;s<ma.length&&t!==0&&t<ma[s].priority;s++);ma.splice(s,0,e),s===0&&wp(e)}};var Np=a.version;if(Np!=="19.1.1")throw Error(r(527,Np,"19.1.1"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var i2={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Pr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pr.isDisabled&&Pr.supportsFiber)try{vt=Pr.inject(i2),bt=Pr}catch(e){}}return nl.createRoot=function(e,t){if(!o(e))throw Error(r(299));var s=!1,l="",u=Hm,h=Pm,x=qm,w=null;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(h=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(w=t.unstable_transitionCallbacks)),t=mp(e,1,!1,null,null,s,l,u,h,x,w,null),e[Wa]=t.current,bc(e),new _c(t)},nl.hydrateRoot=function(e,t,s){if(!o(e))throw Error(r(299));var l=!1,u="",h=Hm,x=Pm,w=qm,A=null,B=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(w=s.onRecoverableError),s.unstable_transitionCallbacks!==void 0&&(A=s.unstable_transitionCallbacks),s.formState!==void 0&&(B=s.formState)),t=mp(e,1,!0,t,s!=null?s:null,l,u,h,x,w,A,B),t.context=pp(null),s=t.current,l=Vt(),l=Ro(l),u=Jn(l),u.callback=null,Wn(s,u,l),s=l,t.current.lanes=s,li(t,s),yn(t),e[Wa]=t.current,bc(e),new Hr(t)},nl.version="19.1.1",nl}var _p;function w2(){if(_p)return Gc.exports;_p=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Gc.exports=b2(),Gc.exports}var S2=w2();function Ty(n,a){return function(){return n.apply(a,arguments)}}const{toString:j2}=Object.prototype,{getPrototypeOf:Xd}=Object,{iterator:mo,toStringTag:Ey}=Symbol,po=(n=>a=>{const i=j2.call(a);return n[i]||(n[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),dn=n=>(n=n.toLowerCase(),a=>po(a)===n),go=n=>a=>typeof a===n,{isArray:Ks}=Array,Gs=go("undefined");function vl(n){return n!==null&&!Gs(n)&&n.constructor!==null&&!Gs(n.constructor)&&Rt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Ay=dn("ArrayBuffer");function N2(n){let a;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?a=ArrayBuffer.isView(n):a=n&&n.buffer&&Ay(n.buffer),a}const T2=go("string"),Rt=go("function"),Cy=go("number"),bl=n=>n!==null&&typeof n=="object",E2=n=>n===!0||n===!1,Qr=n=>{if(po(n)!=="object")return!1;const a=Xd(n);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Ey in n)&&!(mo in n)},A2=n=>{if(!bl(n)||vl(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch(a){return!1}},C2=dn("Date"),R2=dn("File"),D2=dn("Blob"),M2=dn("FileList"),O2=n=>bl(n)&&Rt(n.pipe),L2=n=>{let a;return n&&(typeof FormData=="function"&&n instanceof FormData||Rt(n.append)&&((a=po(n))==="formdata"||a==="object"&&Rt(n.toString)&&n.toString()==="[object FormData]"))},U2=dn("URLSearchParams"),[z2,B2,V2,_2]=["ReadableStream","Request","Response","Headers"].map(dn),k2=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wl(n,a,{allOwnKeys:i=!1}={}){if(n===null||typeof n=="undefined")return;let r,o;if(typeof n!="object"&&(n=[n]),Ks(n))for(r=0,o=n.length;r<o;r++)a.call(null,n[r],r,n);else{if(vl(n))return;const f=i?Object.getOwnPropertyNames(n):Object.keys(n),d=f.length;let p;for(r=0;r<d;r++)p=f[r],a.call(null,n[p],p,n)}}function Ry(n,a){if(vl(n))return null;a=a.toLowerCase();const i=Object.keys(n);let r=i.length,o;for(;r-- >0;)if(o=i[r],a===o.toLowerCase())return o;return null}const Pa=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Dy=n=>!Gs(n)&&n!==Pa;function pd(){const{caseless:n,skipUndefined:a}=Dy(this)&&this||{},i={},r=(o,f)=>{const d=n&&Ry(i,f)||f;Qr(i[d])&&Qr(o)?i[d]=pd(i[d],o):Qr(o)?i[d]=pd({},o):Ks(o)?i[d]=o.slice():(!a||!Gs(o))&&(i[d]=o)};for(let o=0,f=arguments.length;o<f;o++)arguments[o]&&wl(arguments[o],r);return i}const H2=(n,a,i,{allOwnKeys:r}={})=>(wl(a,(o,f)=>{i&&Rt(o)?n[f]=Ty(o,i):n[f]=o},{allOwnKeys:r}),n),P2=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),q2=(n,a,i,r)=>{n.prototype=Object.create(a.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:a.prototype}),i&&Object.assign(n.prototype,i)},Y2=(n,a,i,r)=>{let o,f,d;const p={};if(a=a||{},n==null)return a;do{for(o=Object.getOwnPropertyNames(n),f=o.length;f-- >0;)d=o[f],(!r||r(d,n,a))&&!p[d]&&(a[d]=n[d],p[d]=!0);n=i!==!1&&Xd(n)}while(n&&(!i||i(n,a))&&n!==Object.prototype);return a},G2=(n,a,i)=>{n=String(n),(i===void 0||i>n.length)&&(i=n.length),i-=a.length;const r=n.indexOf(a,i);return r!==-1&&r===i},X2=n=>{if(!n)return null;if(Ks(n))return n;let a=n.length;if(!Cy(a))return null;const i=new Array(a);for(;a-- >0;)i[a]=n[a];return i},F2=(n=>a=>n&&a instanceof n)(typeof Uint8Array!="undefined"&&Xd(Uint8Array)),K2=(n,a)=>{const r=(n&&n[mo]).call(n);let o;for(;(o=r.next())&&!o.done;){const f=o.value;a.call(n,f[0],f[1])}},$2=(n,a)=>{let i;const r=[];for(;(i=n.exec(a))!==null;)r.push(i);return r},Z2=dn("HTMLFormElement"),Q2=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,r,o){return r.toUpperCase()+o}),kp=(({hasOwnProperty:n})=>(a,i)=>n.call(a,i))(Object.prototype),J2=dn("RegExp"),My=(n,a)=>{const i=Object.getOwnPropertyDescriptors(n),r={};wl(i,(o,f)=>{let d;(d=a(o,f,n))!==!1&&(r[f]=d||o)}),Object.defineProperties(n,r)},W2=n=>{My(n,(a,i)=>{if(Rt(n)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=n[i];if(Rt(r)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},I2=(n,a)=>{const i={},r=o=>{o.forEach(f=>{i[f]=!0})};return Ks(n)?r(n):r(String(n).split(a)),i},ew=()=>{},tw=(n,a)=>n!=null&&Number.isFinite(n=+n)?n:a;function nw(n){return!!(n&&Rt(n.append)&&n[Ey]==="FormData"&&n[mo])}const aw=n=>{const a=new Array(10),i=(r,o)=>{if(bl(r)){if(a.indexOf(r)>=0)return;if(vl(r))return r;if(!("toJSON"in r)){a[o]=r;const f=Ks(r)?[]:{};return wl(r,(d,p)=>{const g=i(d,o+1);!Gs(g)&&(f[p]=g)}),a[o]=void 0,f}}return r};return i(n,0)},sw=dn("AsyncFunction"),iw=n=>n&&(bl(n)||Rt(n))&&Rt(n.then)&&Rt(n.catch),Oy=((n,a)=>n?setImmediate:a?((i,r)=>(Pa.addEventListener("message",({source:o,data:f})=>{o===Pa&&f===i&&r.length&&r.shift()()},!1),o=>{r.push(o),Pa.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Rt(Pa.postMessage)),lw=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Pa):typeof process!="undefined"&&process.nextTick||Oy,rw=n=>n!=null&&Rt(n[mo]),k={isArray:Ks,isArrayBuffer:Ay,isBuffer:vl,isFormData:L2,isArrayBufferView:N2,isString:T2,isNumber:Cy,isBoolean:E2,isObject:bl,isPlainObject:Qr,isEmptyObject:A2,isReadableStream:z2,isRequest:B2,isResponse:V2,isHeaders:_2,isUndefined:Gs,isDate:C2,isFile:R2,isBlob:D2,isRegExp:J2,isFunction:Rt,isStream:O2,isURLSearchParams:U2,isTypedArray:F2,isFileList:M2,forEach:wl,merge:pd,extend:H2,trim:k2,stripBOM:P2,inherits:q2,toFlatObject:Y2,kindOf:po,kindOfTest:dn,endsWith:G2,toArray:X2,forEachEntry:K2,matchAll:$2,isHTMLForm:Z2,hasOwnProperty:kp,hasOwnProp:kp,reduceDescriptors:My,freezeMethods:W2,toObjectSet:I2,toCamelCase:Q2,noop:ew,toFiniteNumber:tw,findKey:Ry,global:Pa,isContextDefined:Dy,isSpecCompliantForm:nw,toJSONObject:aw,isAsyncFn:sw,isThenable:iw,setImmediate:Oy,asap:lw,isIterable:rw};function pe(n,a,i,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",a&&(this.code=a),i&&(this.config=i),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}k.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const Ly=pe.prototype,Uy={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Uy[n]={value:n}});Object.defineProperties(pe,Uy);Object.defineProperty(Ly,"isAxiosError",{value:!0});pe.from=(n,a,i,r,o,f)=>{const d=Object.create(Ly);k.toFlatObject(n,d,function(y){return y!==Error.prototype},m=>m!=="isAxiosError");const p=n&&n.message?n.message:"Error",g=a==null&&n?n.code:a;return pe.call(d,p,g,i,r,o),n&&d.cause==null&&Object.defineProperty(d,"cause",{value:n,configurable:!0}),d.name=n&&n.name||"Error",f&&Object.assign(d,f),d};const ow=null;function gd(n){return k.isPlainObject(n)||k.isArray(n)}function zy(n){return k.endsWith(n,"[]")?n.slice(0,-2):n}function Hp(n,a,i){return n?n.concat(a).map(function(o,f){return o=zy(o),!i&&f?"["+o+"]":o}).join(i?".":""):a}function uw(n){return k.isArray(n)&&!n.some(gd)}const cw=k.toFlatObject(k,{},null,function(a){return/^is[A-Z]/.test(a)});function yo(n,a,i){if(!k.isObject(n))throw new TypeError("target must be an object");a=a||new FormData,i=k.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,T){return!k.isUndefined(T[E])});const r=i.metaTokens,o=i.visitor||y,f=i.dots,d=i.indexes,g=(i.Blob||typeof Blob!="undefined"&&Blob)&&k.isSpecCompliantForm(a);if(!k.isFunction(o))throw new TypeError("visitor must be a function");function m(N){if(N===null)return"";if(k.isDate(N))return N.toISOString();if(k.isBoolean(N))return N.toString();if(!g&&k.isBlob(N))throw new pe("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(N)||k.isTypedArray(N)?g&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function y(N,E,T){let D=N;if(N&&!T&&typeof N=="object"){if(k.endsWith(E,"{}"))E=r?E:E.slice(0,-2),N=JSON.stringify(N);else if(k.isArray(N)&&uw(N)||(k.isFileList(N)||k.endsWith(E,"[]"))&&(D=k.toArray(N)))return E=zy(E),D.forEach(function(M,H){!(k.isUndefined(M)||M===null)&&a.append(d===!0?Hp([E],H,f):d===null?E:E+"[]",m(M))}),!1}return gd(N)?!0:(a.append(Hp(T,E,f),m(N)),!1)}const v=[],b=Object.assign(cw,{defaultVisitor:y,convertValue:m,isVisitable:gd});function j(N,E){if(!k.isUndefined(N)){if(v.indexOf(N)!==-1)throw Error("Circular reference detected in "+E.join("."));v.push(N),k.forEach(N,function(D,U){(!(k.isUndefined(D)||D===null)&&o.call(a,D,k.isString(U)?U.trim():U,E,b))===!0&&j(D,E?E.concat(U):[U])}),v.pop()}}if(!k.isObject(n))throw new TypeError("data must be an object");return j(n),a}function Pp(n){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return a[r]})}function Fd(n,a){this._pairs=[],n&&yo(n,this,a)}const By=Fd.prototype;By.append=function(a,i){this._pairs.push([a,i])};By.toString=function(a){const i=a?function(r){return a.call(this,r,Pp)}:Pp;return this._pairs.map(function(o){return i(o[0])+"="+i(o[1])},"").join("&")};function dw(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vy(n,a,i){if(!a)return n;const r=i&&i.encode||dw;k.isFunction(i)&&(i={serialize:i});const o=i&&i.serialize;let f;if(o?f=o(a,i):f=k.isURLSearchParams(a)?a.toString():new Fd(a,i).toString(r),f){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+f}return n}class qp{constructor(){this.handlers=[]}use(a,i,r){return this.handlers.push({fulfilled:a,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){k.forEach(this.handlers,function(r){r!==null&&a(r)})}}const _y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fw=typeof URLSearchParams!="undefined"?URLSearchParams:Fd,hw=typeof FormData!="undefined"?FormData:null,mw=typeof Blob!="undefined"?Blob:null,pw={isBrowser:!0,classes:{URLSearchParams:fw,FormData:hw,Blob:mw},protocols:["http","https","file","blob","url","data"]},Kd=typeof window!="undefined"&&typeof document!="undefined",yd=typeof navigator=="object"&&navigator||void 0,gw=Kd&&(!yd||["ReactNative","NativeScript","NS"].indexOf(yd.product)<0),yw=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xw=Kd&&window.location.href||"http://localhost",vw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kd,hasStandardBrowserEnv:gw,hasStandardBrowserWebWorkerEnv:yw,navigator:yd,origin:xw},Symbol.toStringTag,{value:"Module"})),gt=K(K({},vw),pw);function bw(n,a){return yo(n,new gt.classes.URLSearchParams,K({visitor:function(i,r,o,f){return gt.isNode&&k.isBuffer(i)?(this.append(r,i.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)}},a))}function ww(n){return k.matchAll(/\w+|\[(\w*)]/g,n).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Sw(n){const a={},i=Object.keys(n);let r;const o=i.length;let f;for(r=0;r<o;r++)f=i[r],a[f]=n[f];return a}function ky(n){function a(i,r,o,f){let d=i[f++];if(d==="__proto__")return!0;const p=Number.isFinite(+d),g=f>=i.length;return d=!d&&k.isArray(o)?o.length:d,g?(k.hasOwnProp(o,d)?o[d]=[o[d],r]:o[d]=r,!p):((!o[d]||!k.isObject(o[d]))&&(o[d]=[]),a(i,r,o[d],f)&&k.isArray(o[d])&&(o[d]=Sw(o[d])),!p)}if(k.isFormData(n)&&k.isFunction(n.entries)){const i={};return k.forEachEntry(n,(r,o)=>{a(ww(r),o,i,0)}),i}return null}function jw(n,a,i){if(k.isString(n))try{return(a||JSON.parse)(n),k.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(i||JSON.stringify)(n)}const Sl={transitional:_y,adapter:["xhr","http","fetch"],transformRequest:[function(a,i){const r=i.getContentType()||"",o=r.indexOf("application/json")>-1,f=k.isObject(a);if(f&&k.isHTMLForm(a)&&(a=new FormData(a)),k.isFormData(a))return o?JSON.stringify(ky(a)):a;if(k.isArrayBuffer(a)||k.isBuffer(a)||k.isStream(a)||k.isFile(a)||k.isBlob(a)||k.isReadableStream(a))return a;if(k.isArrayBufferView(a))return a.buffer;if(k.isURLSearchParams(a))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let p;if(f){if(r.indexOf("application/x-www-form-urlencoded")>-1)return bw(a,this.formSerializer).toString();if((p=k.isFileList(a))||r.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return yo(p?{"files[]":a}:a,g&&new g,this.formSerializer)}}return f||o?(i.setContentType("application/json",!1),jw(a)):a}],transformResponse:[function(a){const i=this.transitional||Sl.transitional,r=i&&i.forcedJSONParsing,o=this.responseType==="json";if(k.isResponse(a)||k.isReadableStream(a))return a;if(a&&k.isString(a)&&(r&&!this.responseType||o)){const d=!(i&&i.silentJSONParsing)&&o;try{return JSON.parse(a,this.parseReviver)}catch(p){if(d)throw p.name==="SyntaxError"?pe.from(p,pe.ERR_BAD_RESPONSE,this,null,this.response):p}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],n=>{Sl.headers[n]={}});const Nw=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Tw=n=>{const a={};let i,r,o;return n&&n.split(`
|
|
50
|
+
`).forEach(function(d){o=d.indexOf(":"),i=d.substring(0,o).trim().toLowerCase(),r=d.substring(o+1).trim(),!(!i||a[i]&&Nw[i])&&(i==="set-cookie"?a[i]?a[i].push(r):a[i]=[r]:a[i]=a[i]?a[i]+", "+r:r)}),a},Yp=Symbol("internals");function al(n){return n&&String(n).trim().toLowerCase()}function Jr(n){return n===!1||n==null?n:k.isArray(n)?n.map(Jr):String(n)}function Ew(n){const a=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(n);)a[r[1]]=r[2];return a}const Aw=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function $c(n,a,i,r,o){if(k.isFunction(r))return r.call(this,a,i);if(o&&(a=i),!!k.isString(a)){if(k.isString(r))return a.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(a)}}function Cw(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,i,r)=>i.toUpperCase()+r)}function Rw(n,a){const i=k.toCamelCase(" "+a);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+i,{value:function(o,f,d){return this[r].call(this,a,o,f,d)},configurable:!0})})}let Dt=class{constructor(a){a&&this.set(a)}set(a,i,r){const o=this;function f(p,g,m){const y=al(g);if(!y)throw new Error("header name must be a non-empty string");const v=k.findKey(o,y);(!v||o[v]===void 0||m===!0||m===void 0&&o[v]!==!1)&&(o[v||g]=Jr(p))}const d=(p,g)=>k.forEach(p,(m,y)=>f(m,y,g));if(k.isPlainObject(a)||a instanceof this.constructor)d(a,i);else if(k.isString(a)&&(a=a.trim())&&!Aw(a))d(Tw(a),i);else if(k.isObject(a)&&k.isIterable(a)){let p={},g,m;for(const y of a){if(!k.isArray(y))throw TypeError("Object iterator must return a key-value pair");p[m=y[0]]=(g=p[m])?k.isArray(g)?[...g,y[1]]:[g,y[1]]:y[1]}d(p,i)}else a!=null&&f(i,a,r);return this}get(a,i){if(a=al(a),a){const r=k.findKey(this,a);if(r){const o=this[r];if(!i)return o;if(i===!0)return Ew(o);if(k.isFunction(i))return i.call(this,o,r);if(k.isRegExp(i))return i.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,i){if(a=al(a),a){const r=k.findKey(this,a);return!!(r&&this[r]!==void 0&&(!i||$c(this,this[r],r,i)))}return!1}delete(a,i){const r=this;let o=!1;function f(d){if(d=al(d),d){const p=k.findKey(r,d);p&&(!i||$c(r,r[p],p,i))&&(delete r[p],o=!0)}}return k.isArray(a)?a.forEach(f):f(a),o}clear(a){const i=Object.keys(this);let r=i.length,o=!1;for(;r--;){const f=i[r];(!a||$c(this,this[f],f,a,!0))&&(delete this[f],o=!0)}return o}normalize(a){const i=this,r={};return k.forEach(this,(o,f)=>{const d=k.findKey(r,f);if(d){i[d]=Jr(o),delete i[f];return}const p=a?Cw(f):String(f).trim();p!==f&&delete i[f],i[p]=Jr(o),r[p]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const i=Object.create(null);return k.forEach(this,(r,o)=>{r!=null&&r!==!1&&(i[o]=a&&k.isArray(r)?r.join(", "):r)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,i])=>a+": "+i).join(`
|
|
51
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...i){const r=new this(a);return i.forEach(o=>r.set(o)),r}static accessor(a){const r=(this[Yp]=this[Yp]={accessors:{}}).accessors,o=this.prototype;function f(d){const p=al(d);r[p]||(Rw(o,d),r[p]=!0)}return k.isArray(a)?a.forEach(f):f(a),this}};Dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(Dt.prototype,({value:n},a)=>{let i=a[0].toUpperCase()+a.slice(1);return{get:()=>n,set(r){this[i]=r}}});k.freezeMethods(Dt);function Zc(n,a){const i=this||Sl,r=a||i,o=Dt.from(r.headers);let f=r.data;return k.forEach(n,function(p){f=p.call(i,f,o.normalize(),a?a.status:void 0)}),o.normalize(),f}function Hy(n){return!!(n&&n.__CANCEL__)}function $s(n,a,i){pe.call(this,n==null?"canceled":n,pe.ERR_CANCELED,a,i),this.name="CanceledError"}k.inherits($s,pe,{__CANCEL__:!0});function Py(n,a,i){const r=i.config.validateStatus;!i.status||!r||r(i.status)?n(i):a(new pe("Request failed with status code "+i.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function Dw(n){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return a&&a[1]||""}function Mw(n,a){n=n||10;const i=new Array(n),r=new Array(n);let o=0,f=0,d;return a=a!==void 0?a:1e3,function(g){const m=Date.now(),y=r[f];d||(d=m),i[o]=g,r[o]=m;let v=f,b=0;for(;v!==o;)b+=i[v++],v=v%n;if(o=(o+1)%n,o===f&&(f=(f+1)%n),m-d<a)return;const j=y&&m-y;return j?Math.round(b*1e3/j):void 0}}function Ow(n,a){let i=0,r=1e3/a,o,f;const d=(m,y=Date.now())=>{i=y,o=null,f&&(clearTimeout(f),f=null),n(...m)};return[(...m)=>{const y=Date.now(),v=y-i;v>=r?d(m,y):(o=m,f||(f=setTimeout(()=>{f=null,d(o)},r-v)))},()=>o&&d(o)]}const io=(n,a,i=3)=>{let r=0;const o=Mw(50,250);return Ow(f=>{const d=f.loaded,p=f.lengthComputable?f.total:void 0,g=d-r,m=o(g),y=d<=p;r=d;const v={loaded:d,total:p,progress:p?d/p:void 0,bytes:g,rate:m||void 0,estimated:m&&p&&y?(p-d)/m:void 0,event:f,lengthComputable:p!=null,[a?"download":"upload"]:!0};n(v)},i)},Gp=(n,a)=>{const i=n!=null;return[r=>a[0]({lengthComputable:i,total:n,loaded:r}),a[1]]},Xp=n=>(...a)=>k.asap(()=>n(...a)),Lw=gt.hasStandardBrowserEnv?((n,a)=>i=>(i=new URL(i,gt.origin),n.protocol===i.protocol&&n.host===i.host&&(a||n.port===i.port)))(new URL(gt.origin),gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent)):()=>!0,Uw=gt.hasStandardBrowserEnv?{write(n,a,i,r,o,f){const d=[n+"="+encodeURIComponent(a)];k.isNumber(i)&&d.push("expires="+new Date(i).toGMTString()),k.isString(r)&&d.push("path="+r),k.isString(o)&&d.push("domain="+o),f===!0&&d.push("secure"),document.cookie=d.join("; ")},read(n){const a=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function zw(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Bw(n,a){return a?n.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):n}function qy(n,a,i){let r=!zw(a);return n&&(r||i==!1)?Bw(n,a):a}const Fp=n=>n instanceof Dt?K({},n):n;function Ka(n,a){a=a||{};const i={};function r(m,y,v,b){return k.isPlainObject(m)&&k.isPlainObject(y)?k.merge.call({caseless:b},m,y):k.isPlainObject(y)?k.merge({},y):k.isArray(y)?y.slice():y}function o(m,y,v,b){if(k.isUndefined(y)){if(!k.isUndefined(m))return r(void 0,m,v,b)}else return r(m,y,v,b)}function f(m,y){if(!k.isUndefined(y))return r(void 0,y)}function d(m,y){if(k.isUndefined(y)){if(!k.isUndefined(m))return r(void 0,m)}else return r(void 0,y)}function p(m,y,v){if(v in a)return r(m,y);if(v in n)return r(void 0,m)}const g={url:f,method:f,data:f,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:p,headers:(m,y,v)=>o(Fp(m),Fp(y),v,!0)};return k.forEach(Object.keys(K(K({},n),a)),function(y){const v=g[y]||o,b=v(n[y],a[y],y);k.isUndefined(b)&&v!==p||(i[y]=b)}),i}const Yy=n=>{const a=Ka({},n);let{data:i,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:f,headers:d,auth:p}=a;if(a.headers=d=Dt.from(d),a.url=Vy(qy(a.baseURL,a.url,a.allowAbsoluteUrls),n.params,n.paramsSerializer),p&&d.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),k.isFormData(i)){if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(k.isFunction(i.getHeaders)){const g=i.getHeaders(),m=["content-type","content-length"];Object.entries(g).forEach(([y,v])=>{m.includes(y.toLowerCase())&&d.set(y,v)})}}if(gt.hasStandardBrowserEnv&&(r&&k.isFunction(r)&&(r=r(a)),r||r!==!1&&Lw(a.url))){const g=o&&f&&Uw.read(f);g&&d.set(o,g)}return a},Vw=typeof XMLHttpRequest!="undefined",_w=Vw&&function(n){return new Promise(function(i,r){const o=Yy(n);let f=o.data;const d=Dt.from(o.headers).normalize();let{responseType:p,onUploadProgress:g,onDownloadProgress:m}=o,y,v,b,j,N;function E(){j&&j(),N&&N(),o.cancelToken&&o.cancelToken.unsubscribe(y),o.signal&&o.signal.removeEventListener("abort",y)}let T=new XMLHttpRequest;T.open(o.method.toUpperCase(),o.url,!0),T.timeout=o.timeout;function D(){if(!T)return;const M=Dt.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),L={data:!p||p==="text"||p==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:M,config:n,request:T};Py(function(G){i(G),E()},function(G){r(G),E()},L),T=null}"onloadend"in T?T.onloadend=D:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(D)},T.onabort=function(){T&&(r(new pe("Request aborted",pe.ECONNABORTED,n,T)),T=null)},T.onerror=function(H){const L=H&&H.message?H.message:"Network Error",$=new pe(L,pe.ERR_NETWORK,n,T);$.event=H||null,r($),T=null},T.ontimeout=function(){let H=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const L=o.transitional||_y;o.timeoutErrorMessage&&(H=o.timeoutErrorMessage),r(new pe(H,L.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,n,T)),T=null},f===void 0&&d.setContentType(null),"setRequestHeader"in T&&k.forEach(d.toJSON(),function(H,L){T.setRequestHeader(L,H)}),k.isUndefined(o.withCredentials)||(T.withCredentials=!!o.withCredentials),p&&p!=="json"&&(T.responseType=o.responseType),m&&([b,N]=io(m,!0),T.addEventListener("progress",b)),g&&T.upload&&([v,j]=io(g),T.upload.addEventListener("progress",v),T.upload.addEventListener("loadend",j)),(o.cancelToken||o.signal)&&(y=M=>{T&&(r(!M||M.type?new $s(null,n,T):M),T.abort(),T=null)},o.cancelToken&&o.cancelToken.subscribe(y),o.signal&&(o.signal.aborted?y():o.signal.addEventListener("abort",y)));const U=Dw(o.url);if(U&>.protocols.indexOf(U)===-1){r(new pe("Unsupported protocol "+U+":",pe.ERR_BAD_REQUEST,n));return}T.send(f||null)})},kw=(n,a)=>{const{length:i}=n=n?n.filter(Boolean):[];if(a||i){let r=new AbortController,o;const f=function(m){if(!o){o=!0,p();const y=m instanceof Error?m:this.reason;r.abort(y instanceof pe?y:new $s(y instanceof Error?y.message:y))}};let d=a&&setTimeout(()=>{d=null,f(new pe(`timeout ${a} of ms exceeded`,pe.ETIMEDOUT))},a);const p=()=>{n&&(d&&clearTimeout(d),d=null,n.forEach(m=>{m.unsubscribe?m.unsubscribe(f):m.removeEventListener("abort",f)}),n=null)};n.forEach(m=>m.addEventListener("abort",f));const{signal:g}=r;return g.unsubscribe=()=>k.asap(p),g}},Hw=function*(n,a){let i=n.byteLength;if(i<a){yield n;return}let r=0,o;for(;r<i;)o=r+a,yield n.slice(r,o),r=o},Pw=function(n,a){return Hc(this,null,function*(){try{for(var i=Cp(qw(n)),r,o,f;r=!(o=yield new _a(i.next())).done;r=!1){const d=o.value;yield*Pc(Hw(d,a))}}catch(o){f=[o]}finally{try{r&&(o=i.return)&&(yield new _a(o.call(i)))}finally{if(f)throw f[0]}}})},qw=function(n){return Hc(this,null,function*(){if(n[Symbol.asyncIterator]){yield*Pc(n);return}const a=n.getReader();try{for(;;){const{done:i,value:r}=yield new _a(a.read());if(i)break;yield r}}finally{yield new _a(a.cancel())}})},Kp=(n,a,i,r)=>{const o=Pw(n,a);let f=0,d,p=m=>{d||(d=!0,r&&r(m))};return new ReadableStream({pull(m){return ve(this,null,function*(){try{const{done:y,value:v}=yield o.next();if(y){p(),m.close();return}let b=v.byteLength;if(i){let j=f+=b;i(j)}m.enqueue(new Uint8Array(v))}catch(y){throw p(y),y}})},cancel(m){return p(m),o.return()}},{highWaterMark:2})},$p=64*1024,{isFunction:Gr}=k,Gy=(({fetch:n,Request:a,Response:i})=>({fetch:n,Request:a,Response:i}))(k.global),{ReadableStream:Zp,TextEncoder:Qp}=k.global,Jp=(n,...a)=>{try{return!!n(...a)}catch(i){return!1}},Yw=n=>{const{fetch:a,Request:i,Response:r}=Object.assign({},Gy,n),o=Gr(a),f=Gr(i),d=Gr(r);if(!o)return!1;const p=o&&Gr(Zp),g=o&&(typeof Qp=="function"?(N=>E=>N.encode(E))(new Qp):N=>ve(null,null,function*(){return new Uint8Array(yield new i(N).arrayBuffer())})),m=f&&p&&Jp(()=>{let N=!1;const E=new i(gt.origin,{body:new Zp,method:"POST",get duplex(){return N=!0,"half"}}).headers.has("Content-Type");return N&&!E}),y=d&&p&&Jp(()=>k.isReadableStream(new r("").body)),v={stream:y&&(N=>N.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(N=>{!v[N]&&(v[N]=(E,T)=>{let D=E&&E[N];if(D)return D.call(E);throw new pe(`Response type '${N}' is not supported`,pe.ERR_NOT_SUPPORT,T)})});const b=N=>ve(null,null,function*(){if(N==null)return 0;if(k.isBlob(N))return N.size;if(k.isSpecCompliantForm(N))return(yield new i(gt.origin,{method:"POST",body:N}).arrayBuffer()).byteLength;if(k.isArrayBufferView(N)||k.isArrayBuffer(N))return N.byteLength;if(k.isURLSearchParams(N)&&(N=N+""),k.isString(N))return(yield g(N)).byteLength}),j=(N,E)=>ve(null,null,function*(){const T=k.toFiniteNumber(N.getContentLength());return T==null?b(E):T});return N=>ve(null,null,function*(){let{url:E,method:T,data:D,signal:U,cancelToken:M,timeout:H,onDownloadProgress:L,onUploadProgress:$,responseType:G,headers:Z,withCredentials:se="same-origin",fetchOptions:he}=Yy(N);G=G?(G+"").toLowerCase():"text";let me=kw([U,M&&M.toAbortSignal()],H),de=null;const Re=me&&me.unsubscribe&&(()=>{me.unsubscribe()});let qe;try{if($&&m&&T!=="get"&&T!=="head"&&(qe=yield j(Z,D))!==0){let C=new i(E,{method:"POST",body:D,duplex:"half"}),Y;if(k.isFormData(D)&&(Y=C.headers.get("content-type"))&&Z.setContentType(Y),C.body){const[W,J]=Gp(qe,io(Xp($)));D=Kp(C.body,$p,W,J)}}k.isString(se)||(se=se?"include":"omit");const be=f&&"credentials"in i.prototype,P=oe(K({},he),{signal:me,method:T.toUpperCase(),headers:Z.normalize().toJSON(),body:D,duplex:"half",credentials:be?se:void 0});de=f&&new i(E,P);let Q=yield f?a(de,he):a(E,P);const ee=y&&(G==="stream"||G==="response");if(y&&(L||ee&&Re)){const C={};["status","statusText","headers"].forEach(ne=>{C[ne]=Q[ne]});const Y=k.toFiniteNumber(Q.headers.get("content-length")),[W,J]=L&&Gp(Y,io(Xp(L),!0))||[];Q=new r(Kp(Q.body,$p,W,()=>{J&&J(),Re&&Re()}),C)}G=G||"text";let ye=yield v[k.findKey(v,G)||"text"](Q,N);return!ee&&Re&&Re(),yield new Promise((C,Y)=>{Py(C,Y,{data:ye,headers:Dt.from(Q.headers),status:Q.status,statusText:Q.statusText,config:N,request:de})})}catch(be){throw Re&&Re(),be&&be.name==="TypeError"&&/Load failed|fetch/i.test(be.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,N,de),{cause:be.cause||be}):pe.from(be,be&&be.code,N,de)}})},Gw=new Map,Xy=n=>{let a=k.merge.call({skipUndefined:!0},Gy,n?n.env:null);const{fetch:i,Request:r,Response:o}=a,f=[r,o,i];let d=f.length,p=d,g,m,y=Gw;for(;p--;)g=f[p],m=y.get(g),m===void 0&&y.set(g,m=p?new Map:Yw(a)),y=m;return m};Xy();const xd={http:ow,xhr:_w,fetch:{get:Xy}};k.forEach(xd,(n,a)=>{if(n){try{Object.defineProperty(n,"name",{value:a})}catch(i){}Object.defineProperty(n,"adapterName",{value:a})}});const Wp=n=>`- ${n}`,Xw=n=>k.isFunction(n)||n===null||n===!1,Fy={getAdapter:(n,a)=>{n=k.isArray(n)?n:[n];const{length:i}=n;let r,o;const f={};for(let d=0;d<i;d++){r=n[d];let p;if(o=r,!Xw(r)&&(o=xd[(p=String(r)).toLowerCase()],o===void 0))throw new pe(`Unknown adapter '${p}'`);if(o&&(k.isFunction(o)||(o=o.get(a))))break;f[p||"#"+d]=o}if(!o){const d=Object.entries(f).map(([g,m])=>`adapter ${g} `+(m===!1?"is not supported by the environment":"is not available in the build"));let p=i?d.length>1?`since :
|
|
52
|
+
`+d.map(Wp).join(`
|
|
53
|
+
`):" "+Wp(d[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return o},adapters:xd};function Qc(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new $s(null,n)}function Ip(n){return Qc(n),n.headers=Dt.from(n.headers),n.data=Zc.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Fy.getAdapter(n.adapter||Sl.adapter,n)(n).then(function(r){return Qc(n),r.data=Zc.call(n,n.transformResponse,r),r.headers=Dt.from(r.headers),r},function(r){return Hy(r)||(Qc(n),r&&r.response&&(r.response.data=Zc.call(n,n.transformResponse,r.response),r.response.headers=Dt.from(r.response.headers))),Promise.reject(r)})}const Ky="1.12.0",xo={};["object","boolean","number","function","string","symbol"].forEach((n,a)=>{xo[n]=function(r){return typeof r===n||"a"+(a<1?"n ":" ")+n}});const eg={};xo.transitional=function(a,i,r){function o(f,d){return"[Axios v"+Ky+"] Transitional option '"+f+"'"+d+(r?". "+r:"")}return(f,d,p)=>{if(a===!1)throw new pe(o(d," has been removed"+(i?" in "+i:"")),pe.ERR_DEPRECATED);return i&&!eg[d]&&(eg[d]=!0,console.warn(o(d," has been deprecated since v"+i+" and will be removed in the near future"))),a?a(f,d,p):!0}};xo.spelling=function(a){return(i,r)=>(console.warn(`${r} is likely a misspelling of ${a}`),!0)};function Fw(n,a,i){if(typeof n!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let o=r.length;for(;o-- >0;){const f=r[o],d=a[f];if(d){const p=n[f],g=p===void 0||d(p,f,n);if(g!==!0)throw new pe("option "+f+" must be "+g,pe.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new pe("Unknown option "+f,pe.ERR_BAD_OPTION)}}const Wr={assertOptions:Fw,validators:xo},xn=Wr.validators;let Ga=class{constructor(a){this.defaults=a||{},this.interceptors={request:new qp,response:new qp}}request(a,i){return ve(this,null,function*(){try{return yield this._request(a,i)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const f=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?f&&!String(r.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
54
|
+
`+f):r.stack=f}catch(d){}}throw r}})}_request(a,i){typeof a=="string"?(i=i||{},i.url=a):i=a||{},i=Ka(this.defaults,i);const{transitional:r,paramsSerializer:o,headers:f}=i;r!==void 0&&Wr.assertOptions(r,{silentJSONParsing:xn.transitional(xn.boolean),forcedJSONParsing:xn.transitional(xn.boolean),clarifyTimeoutError:xn.transitional(xn.boolean)},!1),o!=null&&(k.isFunction(o)?i.paramsSerializer={serialize:o}:Wr.assertOptions(o,{encode:xn.function,serialize:xn.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),Wr.assertOptions(i,{baseUrl:xn.spelling("baseURL"),withXsrfToken:xn.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let d=f&&k.merge(f.common,f[i.method]);f&&k.forEach(["delete","get","head","post","put","patch","common"],N=>{delete f[N]}),i.headers=Dt.concat(d,f);const p=[];let g=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(i)===!1||(g=g&&E.synchronous,p.unshift(E.fulfilled,E.rejected))});const m=[];this.interceptors.response.forEach(function(E){m.push(E.fulfilled,E.rejected)});let y,v=0,b;if(!g){const N=[Ip.bind(this),void 0];for(N.unshift(...p),N.push(...m),b=N.length,y=Promise.resolve(i);v<b;)y=y.then(N[v++],N[v++]);return y}b=p.length;let j=i;for(v=0;v<b;){const N=p[v++],E=p[v++];try{j=N(j)}catch(T){E.call(this,T);break}}try{y=Ip.call(this,j)}catch(N){return Promise.reject(N)}for(v=0,b=m.length;v<b;)y=y.then(m[v++],m[v++]);return y}getUri(a){a=Ka(this.defaults,a);const i=qy(a.baseURL,a.url,a.allowAbsoluteUrls);return Vy(i,a.params,a.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(a){Ga.prototype[a]=function(i,r){return this.request(Ka(r||{},{method:a,url:i,data:(r||{}).data}))}});k.forEach(["post","put","patch"],function(a){function i(r){return function(f,d,p){return this.request(Ka(p||{},{method:a,headers:r?{"Content-Type":"multipart/form-data"}:{},url:f,data:d}))}}Ga.prototype[a]=i(),Ga.prototype[a+"Form"]=i(!0)});let Kw=class $y{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(f){i=f});const r=this;this.promise.then(o=>{if(!r._listeners)return;let f=r._listeners.length;for(;f-- >0;)r._listeners[f](o);r._listeners=null}),this.promise.then=o=>{let f;const d=new Promise(p=>{r.subscribe(p),f=p}).then(o);return d.cancel=function(){r.unsubscribe(f)},d},a(function(f,d,p){r.reason||(r.reason=new $s(f,d,p),i(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const i=this._listeners.indexOf(a);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const a=new AbortController,i=r=>{a.abort(r)};return this.subscribe(i),a.signal.unsubscribe=()=>this.unsubscribe(i),a.signal}static source(){let a;return{token:new $y(function(o){a=o}),cancel:a}}};function $w(n){return function(i){return n.apply(null,i)}}function Zw(n){return k.isObject(n)&&n.isAxiosError===!0}const vd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vd).forEach(([n,a])=>{vd[a]=n});function Zy(n){const a=new Ga(n),i=Ty(Ga.prototype.request,a);return k.extend(i,Ga.prototype,a,{allOwnKeys:!0}),k.extend(i,a,null,{allOwnKeys:!0}),i.create=function(o){return Zy(Ka(n,o))},i}const ie=Zy(Sl);ie.Axios=Ga;ie.CanceledError=$s;ie.CancelToken=Kw;ie.isCancel=Hy;ie.VERSION=Ky;ie.toFormData=yo;ie.AxiosError=pe;ie.Cancel=ie.CanceledError;ie.all=function(a){return Promise.all(a)};ie.spread=$w;ie.isAxiosError=Zw;ie.mergeConfig=Ka;ie.AxiosHeaders=Dt;ie.formToJSON=n=>ky(k.isHTMLForm(n)?new FormData(n):n);ie.getAdapter=Fy.getAdapter;ie.HttpStatusCode=vd;ie.default=ie;const{Axios:eA,AxiosError:tA,CanceledError:nA,isCancel:aA,CancelToken:sA,VERSION:iA,all:lA,Cancel:rA,isAxiosError:oA,spread:uA,toFormData:cA,AxiosHeaders:dA,HttpStatusCode:fA,formToJSON:hA,getAdapter:mA,mergeConfig:pA}=ie;/**
|
|
55
|
+
* react-router v7.8.0
|
|
56
|
+
*
|
|
57
|
+
* Copyright (c) Remix Software Inc.
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the MIT license found in the
|
|
60
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
61
|
+
*
|
|
62
|
+
* @license MIT
|
|
63
|
+
*/var tg="popstate";function Qw(n={}){function a(r,o){let{pathname:f,search:d,hash:p}=r.location;return bd("",{pathname:f,search:d,hash:p},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function i(r,o){return typeof o=="string"?o:fl(o)}return Ww(a,i,null,n)}function Pe(n,a){if(n===!1||n===null||typeof n=="undefined")throw new Error(a)}function nn(n,a){if(!n){typeof console!="undefined"&&console.warn(a);try{throw new Error(a)}catch(i){}}}function Jw(){return Math.random().toString(36).substring(2,10)}function ng(n,a){return{usr:n.state,key:n.key,idx:a}}function bd(n,a,i=null,r){return oe(K({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof a=="string"?Zs(a):a),{state:i,key:a&&a.key||r||Jw()})}function fl({pathname:n="/",search:a="",hash:i=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Zs(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substring(i),n=n.substring(0,i));let r=n.indexOf("?");r>=0&&(a.search=n.substring(r),n=n.substring(0,r)),n&&(a.pathname=n)}return a}function Ww(n,a,i,r={}){let{window:o=document.defaultView,v5Compat:f=!1}=r,d=o.history,p="POP",g=null,m=y();m==null&&(m=0,d.replaceState(oe(K({},d.state),{idx:m}),""));function y(){return(d.state||{idx:null}).idx}function v(){p="POP";let T=y(),D=T==null?null:T-m;m=T,g&&g({action:p,location:E.location,delta:D})}function b(T,D){p="PUSH";let U=bd(E.location,T,D);m=y()+1;let M=ng(U,m),H=E.createHref(U);try{d.pushState(M,"",H)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;o.location.assign(H)}f&&g&&g({action:p,location:E.location,delta:1})}function j(T,D){p="REPLACE";let U=bd(E.location,T,D);m=y();let M=ng(U,m),H=E.createHref(U);d.replaceState(M,"",H),f&&g&&g({action:p,location:E.location,delta:0})}function N(T){return Iw(T)}let E={get action(){return p},get location(){return n(o,d)},listen(T){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(tg,v),g=T,()=>{o.removeEventListener(tg,v),g=null}},createHref(T){return a(o,T)},createURL:N,encodeLocation(T){let D=N(T);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:b,replace:j,go(T){return d.go(T)}};return E}function Iw(n,a=!1){let i="http://localhost";typeof window!="undefined"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(i,"No window.location.(origin|href) available to create URL");let r=typeof n=="string"?n:fl(n);return r=r.replace(/ $/,"%20"),!a&&r.startsWith("//")&&(r=i+r),new URL(r,i)}function Qy(n,a,i="/"){return eS(n,a,i,!1)}function eS(n,a,i,r){let o=typeof a=="string"?Zs(a):a,f=Pn(o.pathname||"/",i);if(f==null)return null;let d=Jy(n);tS(d);let p=null;for(let g=0;p==null&&g<d.length;++g){let m=fS(f);p=cS(d[g],m,r)}return p}function Jy(n,a=[],i=[],r=""){let o=(f,d,p)=>{let g={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:d,route:f};g.relativePath.startsWith("/")&&(Pe(g.relativePath.startsWith(r),`Absolute route path "${g.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(r.length));let m=Hn([r,g.relativePath]),y=i.concat(g);f.children&&f.children.length>0&&(Pe(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Jy(f.children,a,y,m)),!(f.path==null&&!f.index)&&a.push({path:m,score:oS(m,f.index),routesMeta:y})};return n.forEach((f,d)=>{var p;if(f.path===""||!((p=f.path)!=null&&p.includes("?")))o(f,d);else for(let g of Wy(f.path))o(f,d,g)}),a}function Wy(n){let a=n.split("/");if(a.length===0)return[];let[i,...r]=a,o=i.endsWith("?"),f=i.replace(/\?$/,"");if(r.length===0)return o?[f,""]:[f];let d=Wy(r.join("/")),p=[];return p.push(...d.map(g=>g===""?f:[f,g].join("/"))),o&&p.push(...d),p.map(g=>n.startsWith("/")&&g===""?"/":g)}function tS(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:uS(a.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var nS=/^:[\w-]+$/,aS=3,sS=2,iS=1,lS=10,rS=-2,ag=n=>n==="*";function oS(n,a){let i=n.split("/"),r=i.length;return i.some(ag)&&(r+=rS),a&&(r+=sS),i.filter(o=>!ag(o)).reduce((o,f)=>o+(nS.test(f)?aS:f===""?iS:lS),r)}function uS(n,a){return n.length===a.length&&n.slice(0,-1).every((r,o)=>r===a[o])?n[n.length-1]-a[a.length-1]:0}function cS(n,a,i=!1){let{routesMeta:r}=n,o={},f="/",d=[];for(let p=0;p<r.length;++p){let g=r[p],m=p===r.length-1,y=f==="/"?a:a.slice(f.length)||"/",v=lo({path:g.relativePath,caseSensitive:g.caseSensitive,end:m},y),b=g.route;if(!v&&m&&i&&!r[r.length-1].route.index&&(v=lo({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!v)return null;Object.assign(o,v.params),d.push({params:o,pathname:Hn([f,v.pathname]),pathnameBase:gS(Hn([f,v.pathnameBase])),route:b}),v.pathnameBase!=="/"&&(f=Hn([f,v.pathnameBase]))}return d}function lo(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,r]=dS(n.path,n.caseSensitive,n.end),o=a.match(i);if(!o)return null;let f=o[0],d=f.replace(/(.)\/+$/,"$1"),p=o.slice(1);return{params:r.reduce((m,{paramName:y,isOptional:v},b)=>{if(y==="*"){let N=p[b]||"";d=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const j=p[b];return v&&!j?m[y]=void 0:m[y]=(j||"").replace(/%2F/g,"/"),m},{}),pathname:f,pathnameBase:d,pattern:n}}function dS(n,a=!1,i=!0){nn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let r=[],o="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,g)=>(r.push({paramName:p,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),o+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":n!==""&&n!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,a?void 0:"i"),r]}function fS(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return nn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Pn(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,r=n.charAt(i);return r&&r!=="/"?null:n.slice(i)||"/"}function hS(n,a="/"){let{pathname:i,search:r="",hash:o=""}=typeof n=="string"?Zs(n):n;return{pathname:i?i.startsWith("/")?i:mS(i,a):a,search:yS(r),hash:xS(o)}}function mS(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function Jc(n,a,i,r){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pS(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function $d(n){let a=pS(n);return a.map((i,r)=>r===a.length-1?i.pathname:i.pathnameBase)}function Zd(n,a,i,r=!1){let o;typeof n=="string"?o=Zs(n):(o=K({},n),Pe(!o.pathname||!o.pathname.includes("?"),Jc("?","pathname","search",o)),Pe(!o.pathname||!o.pathname.includes("#"),Jc("#","pathname","hash",o)),Pe(!o.search||!o.search.includes("#"),Jc("#","search","hash",o)));let f=n===""||o.pathname==="",d=f?"/":o.pathname,p;if(d==null)p=i;else{let v=a.length-1;if(!r&&d.startsWith("..")){let b=d.split("/");for(;b[0]==="..";)b.shift(),v-=1;o.pathname=b.join("/")}p=v>=0?a[v]:"/"}let g=hS(o,p),m=d&&d!=="/"&&d.endsWith("/"),y=(f||d===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(m||y)&&(g.pathname+="/"),g}var Hn=n=>n.join("/").replace(/\/\/+/g,"/"),gS=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),yS=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,xS=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function vS(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var Iy=["POST","PUT","PATCH","DELETE"];new Set(Iy);var bS=["GET",...Iy];new Set(bS);var Qs=S.createContext(null);Qs.displayName="DataRouter";var vo=S.createContext(null);vo.displayName="DataRouterState";S.createContext(!1);var ex=S.createContext({isTransitioning:!1});ex.displayName="ViewTransition";var wS=S.createContext(new Map);wS.displayName="Fetchers";var SS=S.createContext(null);SS.displayName="Await";var fn=S.createContext(null);fn.displayName="Navigation";var jl=S.createContext(null);jl.displayName="Location";var jn=S.createContext({outlet:null,matches:[],isDataRoute:!1});jn.displayName="Route";var Qd=S.createContext(null);Qd.displayName="RouteError";function jS(n,{relative:a}={}){Pe(Js(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=S.useContext(fn),{hash:o,pathname:f,search:d}=Nl(n,{relative:a}),p=f;return i!=="/"&&(p=f==="/"?i:Hn([i,f])),r.createHref({pathname:p,search:d,hash:o})}function Js(){return S.useContext(jl)!=null}function an(){return Pe(Js(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(jl).location}var tx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function nx(n){S.useContext(fn).static||S.useLayoutEffect(n)}function Xn(){let{isDataRoute:n}=S.useContext(jn);return n?BS():NS()}function NS(){Pe(Js(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Qs),{basename:a,navigator:i}=S.useContext(fn),{matches:r}=S.useContext(jn),{pathname:o}=an(),f=JSON.stringify($d(r)),d=S.useRef(!1);return nx(()=>{d.current=!0}),S.useCallback((g,m={})=>{if(nn(d.current,tx),!d.current)return;if(typeof g=="number"){i.go(g);return}let y=Zd(g,JSON.parse(f),o,m.relative==="path");n==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:Hn([a,y.pathname])),(m.replace?i.replace:i.push)(y,m.state,m)},[a,i,f,o,n])}S.createContext(null);function Nl(n,{relative:a}={}){let{matches:i}=S.useContext(jn),{pathname:r}=an(),o=JSON.stringify($d(i));return S.useMemo(()=>Zd(n,JSON.parse(o),r,a==="path"),[n,o,r,a])}function TS(n,a){return ax(n,a)}function ax(n,a,i,r){var D;Pe(Js(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(fn),{matches:f}=S.useContext(jn),d=f[f.length-1],p=d?d.params:{},g=d?d.pathname:"/",m=d?d.pathnameBase:"/",y=d&&d.route;{let U=y&&y.path||"";sx(g,!y||U.endsWith("*")||U.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${U}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
64
|
+
|
|
65
|
+
Please change the parent <Route path="${U}"> to <Route path="${U==="/"?"*":`${U}/*`}">.`)}let v=an(),b;if(a){let U=typeof a=="string"?Zs(a):a;Pe(m==="/"||((D=U.pathname)==null?void 0:D.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${U.pathname}" was given in the \`location\` prop.`),b=U}else b=v;let j=b.pathname||"/",N=j;if(m!=="/"){let U=m.replace(/^\//,"").split("/");N="/"+j.replace(/^\//,"").split("/").slice(U.length).join("/")}let E=Qy(n,{pathname:N});nn(y||E!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),nn(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let T=DS(E&&E.map(U=>Object.assign({},U,{params:Object.assign({},p,U.params),pathname:Hn([m,o.encodeLocation?o.encodeLocation(U.pathname).pathname:U.pathname]),pathnameBase:U.pathnameBase==="/"?m:Hn([m,o.encodeLocation?o.encodeLocation(U.pathnameBase).pathname:U.pathnameBase])})),f,i,r);return a&&T?S.createElement(jl.Provider,{value:{location:K({pathname:"/",search:"",hash:"",state:null,key:"default"},b),navigationType:"POP"}},T):T}function ES(){let n=zS(),a=vS(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},f={padding:"2px 4px",backgroundColor:r},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:o},i):null,d)}var AS=S.createElement(ES,null),CS=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){console.error("React Router caught the following error during render",n,a)}render(){return this.state.error!==void 0?S.createElement(jn.Provider,{value:this.props.routeContext},S.createElement(Qd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function RS({routeContext:n,match:a,children:i}){let r=S.useContext(Qs);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(jn.Provider,{value:n},i)}function DS(n,a=[],i=null,r=null){if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(a.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let o=n,f=i==null?void 0:i.errors;if(f!=null){let g=o.findIndex(m=>m.route.id&&(f==null?void 0:f[m.route.id])!==void 0);Pe(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),o=o.slice(0,Math.min(o.length,g+1))}let d=!1,p=-1;if(i)for(let g=0;g<o.length;g++){let m=o[g];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(p=g),m.route.id){let{loaderData:y,errors:v}=i,b=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||b){d=!0,p>=0?o=o.slice(0,p+1):o=[o[0]];break}}}return o.reduceRight((g,m,y)=>{let v,b=!1,j=null,N=null;i&&(v=f&&m.route.id?f[m.route.id]:void 0,j=m.route.errorElement||AS,d&&(p<0&&y===0?(sx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,N=null):p===y&&(b=!0,N=m.route.hydrateFallbackElement||null)));let E=a.concat(o.slice(0,y+1)),T=()=>{let D;return v?D=j:b?D=N:m.route.Component?D=S.createElement(m.route.Component,null):m.route.element?D=m.route.element:D=g,S.createElement(RS,{match:m,routeContext:{outlet:g,matches:E,isDataRoute:i!=null},children:D})};return i&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?S.createElement(CS,{location:i.location,revalidation:i.revalidation,component:j,error:v,children:T(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):T()},null)}function Jd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function MS(n){let a=S.useContext(Qs);return Pe(a,Jd(n)),a}function OS(n){let a=S.useContext(vo);return Pe(a,Jd(n)),a}function LS(n){let a=S.useContext(jn);return Pe(a,Jd(n)),a}function Wd(n){let a=LS(n),i=a.matches[a.matches.length-1];return Pe(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function US(){return Wd("useRouteId")}function zS(){var r;let n=S.useContext(Qd),a=OS("useRouteError"),i=Wd("useRouteError");return n!==void 0?n:(r=a.errors)==null?void 0:r[i]}function BS(){let{router:n}=MS("useNavigate"),a=Wd("useNavigate"),i=S.useRef(!1);return nx(()=>{i.current=!0}),S.useCallback((d,...p)=>ve(null,[d,...p],function*(o,f={}){nn(i.current,tx),i.current&&(typeof o=="number"?n.navigate(o):yield n.navigate(o,K({fromRouteId:a},f)))}),[n,a])}var sg={};function sx(n,a,i){!a&&!sg[n]&&(sg[n]=!0,nn(!1,i))}S.memo(VS);function VS({routes:n,future:a,state:i}){return ax(n,void 0,i,a)}function ig({to:n,replace:a,state:i,relative:r}){Pe(Js(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=S.useContext(fn);nn(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=S.useContext(jn),{pathname:d}=an(),p=Xn(),g=Zd(n,$d(f),d,r==="path"),m=JSON.stringify(g);return S.useEffect(()=>{p(JSON.parse(m),{replace:a,state:i,relative:r})},[p,m,r,a,i]),null}function kt(n){Pe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _S({basename:n="/",children:a=null,location:i,navigationType:r="POP",navigator:o,static:f=!1}){Pe(!Js(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=n.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:d,navigator:o,static:f,future:{}}),[d,o,f]);typeof i=="string"&&(i=Zs(i));let{pathname:g="/",search:m="",hash:y="",state:v=null,key:b="default"}=i,j=S.useMemo(()=>{let N=Pn(g,d);return N==null?null:{location:{pathname:N,search:m,hash:y,state:v,key:b},navigationType:r}},[d,g,m,y,v,b,r]);return nn(j!=null,`<Router basename="${d}"> is not able to match the URL "${g}${m}${y}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:S.createElement(fn.Provider,{value:p},S.createElement(jl.Provider,{children:a,value:j}))}function kS({children:n,location:a}){return TS(wd(n),a)}function wd(n,a=[]){let i=[];return S.Children.forEach(n,(r,o)=>{if(!S.isValidElement(r))return;let f=[...a,o];if(r.type===S.Fragment){i.push.apply(i,wd(r.props.children,f));return}Pe(r.type===kt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let d={id:r.props.id||f.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(d.children=wd(r.props.children,f)),i.push(d)}),i}var Ir="get",eo="application/x-www-form-urlencoded";function bo(n){return n!=null&&typeof n.tagName=="string"}function HS(n){return bo(n)&&n.tagName.toLowerCase()==="button"}function PS(n){return bo(n)&&n.tagName.toLowerCase()==="form"}function qS(n){return bo(n)&&n.tagName.toLowerCase()==="input"}function YS(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function GS(n,a){return n.button===0&&(!a||a==="_self")&&!YS(n)}function Sd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,i)=>{let r=n[i];return a.concat(Array.isArray(r)?r.map(o=>[i,o]):[[i,r]])},[]))}function XS(n,a){let i=Sd(n);return a&&a.forEach((r,o)=>{i.has(o)||a.getAll(o).forEach(f=>{i.append(o,f)})}),i}var Xr=null;function FS(){if(Xr===null)try{new FormData(document.createElement("form"),0),Xr=!1}catch(n){Xr=!0}return Xr}var KS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wc(n){return n!=null&&!KS.has(n)?(nn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${eo}"`),null):n}function $S(n,a){let i,r,o,f,d;if(PS(n)){let p=n.getAttribute("action");r=p?Pn(p,a):null,i=n.getAttribute("method")||Ir,o=Wc(n.getAttribute("enctype"))||eo,f=new FormData(n)}else if(HS(n)||qS(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||p.getAttribute("action");if(r=g?Pn(g,a):null,i=n.getAttribute("formmethod")||p.getAttribute("method")||Ir,o=Wc(n.getAttribute("formenctype"))||Wc(p.getAttribute("enctype"))||eo,f=new FormData(p,n),!FS()){let{name:m,type:y,value:v}=n;if(y==="image"){let b=m?`${m}.`:"";f.append(`${b}x`,"0"),f.append(`${b}y`,"0")}else m&&f.append(m,v)}}else{if(bo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Ir,r=null,o=eo,d=n}return f&&o==="text/plain"&&(d=f,f=void 0),{action:r,method:i.toLowerCase(),encType:o,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Id(n,a){if(n===!1||n===null||typeof n=="undefined")throw new Error(a)}function ZS(n,a,i){let r=typeof n=="string"?new URL(n,typeof window=="undefined"?"server://singlefetch/":window.location.origin):n;return r.pathname==="/"?r.pathname=`_root.${i}`:a&&Pn(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${i}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${i}`,r}function QS(n,a){return ve(this,null,function*(){if(n.id in a)return a[n.id];try{let i=yield import(n.module);return a[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}})}function JS(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}function WS(n,a,i){return ve(this,null,function*(){let r=yield Promise.all(n.map(o=>ve(null,null,function*(){let f=a.routes[o.route.id];if(f){let d=yield QS(f,i);return d.links?d.links():[]}return[]})));return nj(r.flat(1).filter(JS).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?oe(K({},o),{rel:"prefetch",as:"style"}):oe(K({},o),{rel:"prefetch"})))})}function lg(n,a,i,r,o,f){let d=(g,m)=>i[m]?g.route.id!==i[m].route.id:!0,p=(g,m)=>{var y;return i[m].pathname!==g.pathname||((y=i[m].route.path)==null?void 0:y.endsWith("*"))&&i[m].params["*"]!==g.params["*"]};return f==="assets"?a.filter((g,m)=>d(g,m)||p(g,m)):f==="data"?a.filter((g,m)=>{var v;let y=r.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(d(g,m)||p(g,m))return!0;if(g.route.shouldRevalidate){let b=g.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function IS(n,a,{includeHydrateFallback:i}={}){return ej(n.map(r=>{let o=a.routes[r.route.id];if(!o)return[];let f=[o.module];return o.clientActionModule&&(f=f.concat(o.clientActionModule)),o.clientLoaderModule&&(f=f.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(f=f.concat(o.hydrateFallbackModule)),o.imports&&(f=f.concat(o.imports)),f}).flat(1))}function ej(n){return[...new Set(n)]}function tj(n){let a={},i=Object.keys(n).sort();for(let r of i)a[r]=n[r];return a}function nj(n,a){let i=new Set;return new Set(a),n.reduce((r,o)=>{let f=JSON.stringify(tj(o));return i.has(f)||(i.add(f),r.push({key:f,link:o})),r},[])}function ix(){let n=S.useContext(Qs);return Id(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function aj(){let n=S.useContext(vo);return Id(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var ef=S.createContext(void 0);ef.displayName="FrameworkContext";function lx(){let n=S.useContext(ef);return Id(n,"You must render this element inside a <HydratedRouter> element"),n}function sj(n,a){let i=S.useContext(ef),[r,o]=S.useState(!1),[f,d]=S.useState(!1),{onFocus:p,onBlur:g,onMouseEnter:m,onMouseLeave:y,onTouchStart:v}=a,b=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let E=D=>{D.forEach(U=>{d(U.isIntersecting)})},T=new IntersectionObserver(E,{threshold:.5});return b.current&&T.observe(b.current),()=>{T.disconnect()}}},[n]),S.useEffect(()=>{if(r){let E=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(E)}}},[r]);let j=()=>{o(!0)},N=()=>{o(!1),d(!1)};return i?n!=="intent"?[f,b,{}]:[f,b,{onFocus:sl(p,j),onBlur:sl(g,N),onMouseEnter:sl(m,j),onMouseLeave:sl(y,N),onTouchStart:sl(v,j)}]:[!1,b,{}]}function sl(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function ij(i){var r=i,{page:n}=r,a=ot(r,["page"]);let{router:o}=ix(),f=S.useMemo(()=>Qy(o.routes,n,o.basename),[o.routes,n,o.basename]);return f?S.createElement(rj,K({page:n,matches:f},a)):null}function lj(n){let{manifest:a,routeModules:i}=lx(),[r,o]=S.useState([]);return S.useEffect(()=>{let f=!1;return WS(n,a,i).then(d=>{f||o(d)}),()=>{f=!0}},[n,a,i]),r}function rj(r){var o=r,{page:n,matches:a}=o,i=ot(o,["page","matches"]);let f=an(),{manifest:d,routeModules:p}=lx(),{basename:g}=ix(),{loaderData:m,matches:y}=aj(),v=S.useMemo(()=>lg(n,a,y,d,f,"data"),[n,a,y,d,f]),b=S.useMemo(()=>lg(n,a,y,d,f,"assets"),[n,a,y,d,f]),j=S.useMemo(()=>{if(n===f.pathname+f.search+f.hash)return[];let T=new Set,D=!1;if(a.forEach(M=>{var L;let H=d.routes[M.route.id];!H||!H.hasLoader||(!v.some($=>$.route.id===M.route.id)&&M.route.id in m&&((L=p[M.route.id])!=null&&L.shouldRevalidate)||H.hasClientLoader?D=!0:T.add(M.route.id))}),T.size===0)return[];let U=ZS(n,g,"data");return D&&T.size>0&&U.searchParams.set("_routes",a.filter(M=>T.has(M.route.id)).map(M=>M.route.id).join(",")),[U.pathname+U.search]},[g,m,f,d,v,a,n,p]),N=S.useMemo(()=>IS(b,d),[b,d]),E=lj(b);return S.createElement(S.Fragment,null,j.map(T=>S.createElement("link",K({key:T,rel:"prefetch",as:"fetch",href:T},i))),N.map(T=>S.createElement("link",K({key:T,rel:"modulepreload",href:T},i))),E.map(({key:T,link:D})=>S.createElement("link",K({key:T,nonce:i.nonce},D))))}function oj(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var rx=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";try{rx&&(window.__reactRouterVersion="7.8.0")}catch(n){}function uj({basename:n,children:a,window:i}){let r=S.useRef();r.current==null&&(r.current=Qw({window:i,v5Compat:!0}));let o=r.current,[f,d]=S.useState({action:o.action,location:o.location}),p=S.useCallback(g=>{S.startTransition(()=>d(g))},[d]);return S.useLayoutEffect(()=>o.listen(p),[o,p]),S.createElement(_S,{basename:n,children:a,location:f.location,navigationType:f.action,navigator:o})}var ox=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kn=S.forwardRef(function(N,j){var E=N,{onClick:a,discover:i="render",prefetch:r="none",relative:o,reloadDocument:f,replace:d,state:p,target:g,to:m,preventScrollReset:y,viewTransition:v}=E,b=ot(E,["onClick","discover","prefetch","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"]);let{basename:T}=S.useContext(fn),D=typeof m=="string"&&ox.test(m),U,M=!1;if(typeof m=="string"&&D&&(U=m,rx))try{let me=new URL(window.location.href),de=m.startsWith("//")?new URL(me.protocol+m):new URL(m),Re=Pn(de.pathname,T);de.origin===me.origin&&Re!=null?m=Re+de.search+de.hash:M=!0}catch(me){nn(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let H=jS(m,{relative:o}),[L,$,G]=sj(r,b),Z=hj(m,{replace:d,state:p,target:g,preventScrollReset:y,relative:o,viewTransition:v});function se(me){a&&a(me),me.defaultPrevented||Z(me)}let he=S.createElement("a",oe(K(K({},b),G),{href:U||H,onClick:M||f?a:se,ref:oj(j,$),target:g,"data-discover":!D&&i==="render"?"true":void 0}));return L&&!D?S.createElement(S.Fragment,null,he,S.createElement(ij,{page:H})):he});kn.displayName="Link";var cj=S.forwardRef(function(v,y){var b=v,{"aria-current":a="page",caseSensitive:i=!1,className:r="",end:o=!1,style:f,to:d,viewTransition:p,children:g}=b,m=ot(b,["aria-current","caseSensitive","className","end","style","to","viewTransition","children"]);let j=Nl(d,{relative:m.relative}),N=an(),E=S.useContext(vo),{navigator:T,basename:D}=S.useContext(fn),U=E!=null&&xj(j)&&p===!0,M=T.encodeLocation?T.encodeLocation(j).pathname:j.pathname,H=N.pathname,L=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;i||(H=H.toLowerCase(),L=L?L.toLowerCase():null,M=M.toLowerCase()),L&&D&&(L=Pn(L,D)||L);const $=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let G=H===M||!o&&H.startsWith(M)&&H.charAt($)==="/",Z=L!=null&&(L===M||!o&&L.startsWith(M)&&L.charAt(M.length)==="/"),se={isActive:G,isPending:Z,isTransitioning:U},he=G?a:void 0,me;typeof r=="function"?me=r(se):me=[r,G?"active":null,Z?"pending":null,U?"transitioning":null].filter(Boolean).join(" ");let de=typeof f=="function"?f(se):f;return S.createElement(kn,oe(K({},m),{"aria-current":he,className:me,ref:y,style:de,to:d,viewTransition:p}),typeof g=="function"?g(se):g)});cj.displayName="NavLink";var dj=S.forwardRef((N,j)=>{var E=N,{discover:n="render",fetcherKey:a,navigate:i,reloadDocument:r,replace:o,state:f,method:d=Ir,action:p,onSubmit:g,relative:m,preventScrollReset:y,viewTransition:v}=E,b=ot(E,["discover","fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"]);let T=gj(),D=yj(p,{relative:m}),U=d.toLowerCase()==="get"?"get":"post",M=typeof p=="string"&&ox.test(p),H=L=>{if(g&&g(L),L.defaultPrevented)return;L.preventDefault();let $=L.nativeEvent.submitter,G=($==null?void 0:$.getAttribute("formmethod"))||d;T($||L.currentTarget,{fetcherKey:a,method:G,navigate:i,replace:o,state:f,relative:m,preventScrollReset:y,viewTransition:v})};return S.createElement("form",oe(K({ref:j,method:U,action:D,onSubmit:r?g:H},b),{"data-discover":!M&&n==="render"?"true":void 0}))});dj.displayName="Form";function fj(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ux(n){let a=S.useContext(Qs);return Pe(a,fj(n)),a}function hj(n,{target:a,replace:i,state:r,preventScrollReset:o,relative:f,viewTransition:d}={}){let p=Xn(),g=an(),m=Nl(n,{relative:f});return S.useCallback(y=>{if(GS(y,a)){y.preventDefault();let v=i!==void 0?i:fl(g)===fl(m);p(n,{replace:v,state:r,preventScrollReset:o,relative:f,viewTransition:d})}},[g,p,m,i,r,a,n,o,f,d])}function cx(n){nn(typeof URLSearchParams!="undefined","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=S.useRef(Sd(n)),i=S.useRef(!1),r=an(),o=S.useMemo(()=>XS(r.search,i.current?null:a.current),[r.search]),f=Xn(),d=S.useCallback((p,g)=>{const m=Sd(typeof p=="function"?p(new URLSearchParams(o)):p);i.current=!0,f("?"+m,g)},[f,o]);return[o,d]}var mj=0,pj=()=>`__${String(++mj)}__`;function gj(){let{router:n}=ux("useSubmit"),{basename:a}=S.useContext(fn),i=US();return S.useCallback((f,...d)=>ve(null,[f,...d],function*(r,o={}){let{action:p,method:g,encType:m,formData:y,body:v}=$S(r,a);if(o.navigate===!1){let b=o.fetcherKey||pj();yield n.fetch(b,i,o.action||p,{preventScrollReset:o.preventScrollReset,formData:y,body:v,formMethod:o.method||g,formEncType:o.encType||m,flushSync:o.flushSync})}else yield n.navigate(o.action||p,{preventScrollReset:o.preventScrollReset,formData:y,body:v,formMethod:o.method||g,formEncType:o.encType||m,replace:o.replace,state:o.state,fromRouteId:i,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[n,a,i])}function yj(n,{relative:a}={}){let{basename:i}=S.useContext(fn),r=S.useContext(jn);Pe(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),f=K({},Nl(n||".",{relative:a})),d=an();if(n==null){f.search=d.search;let p=new URLSearchParams(f.search),g=p.getAll("index");if(g.some(y=>y==="")){p.delete("index"),g.filter(v=>v).forEach(v=>p.append("index",v));let y=p.toString();f.search=y?`?${y}`:""}}return(!n||n===".")&&o.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(f.pathname=f.pathname==="/"?i:Hn([i,f.pathname])),fl(f)}function xj(n,{relative:a}={}){let i=S.useContext(ex);Pe(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ux("useViewTransitionState"),o=Nl(n,{relative:a});if(!i.isTransitioning)return!1;let f=Pn(i.currentLocation.pathname,r)||i.currentLocation.pathname,d=Pn(i.nextLocation.pathname,r)||i.nextLocation.pathname;return lo(o.pathname,d)!=null||lo(o.pathname,f)!=null}const vj=()=>{const n=new Date().getFullYear();return c.jsx("footer",{className:"bg-gray-800 text-gray-300 py-6",children:c.jsx("div",{className:"container mx-auto px-4",children:c.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center",children:[c.jsxs("div",{className:"mb-4 md:mb-0",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("img",{src:"/AXioDB.png",alt:"AxioDB Logo",className:"h-8 w-8 mr-2"}),c.jsx("span",{className:"font-bold text-white text-lg",children:"AxioDB"})]}),c.jsx("p",{className:"text-sm mt-2",children:"High-performance document database"})]}),c.jsxs("div",{className:"text-sm",children:[c.jsxs("div",{className:"flex space-x-6",children:[c.jsx("a",{href:"/support",className:"hover:text-white transition-colors",children:"Support"}),c.jsx("a",{href:"/api",className:"hover:text-white transition-colors",children:"API"}),c.jsx("a",{href:"/status",className:"hover:text-white transition-colors",children:"Status"})]}),c.jsxs("p",{className:"mt-4 text-xs text-center md:text-right",children:["© ",n," AxioDB, Inc. All rights reserved."]})]})]})})})},rg=n=>{let a;const i=new Set,r=(m,y)=>{const v=typeof m=="function"?m(a):m;if(!Object.is(v,a)){const b=a;a=(y!=null?y:typeof v!="object"||v===null)?v:Object.assign({},a,v),i.forEach(j=>j(a,b))}},o=()=>a,p={setState:r,getState:o,getInitialState:()=>g,subscribe:m=>(i.add(m),()=>i.delete(m))},g=a=n(r,o,p);return p},bj=n=>n?rg(n):rg,wj=n=>n;function Sj(n,a=wj){const i=Yr.useSyncExternalStore(n.subscribe,Yr.useCallback(()=>a(n.getState()),[n,a]),Yr.useCallback(()=>a(n.getInitialState()),[n,a]));return Yr.useDebugValue(i),i}const og=n=>{const a=bj(n),i=r=>Sj(a,r);return Object.assign(i,a),i},dx=n=>n?og(n):og,ro=dx(n=>({Rootname:"",setRootname:a=>n({Rootname:a})})),qn=dx(n=>({username:null,role:null,permissions:[],mustChangePassword:!1,isAuthenticated:!1,isLoading:!0,setSession:({username:a,role:i,permissions:r,mustChangePassword:o})=>n({username:a,role:i,permissions:r||[],mustChangePassword:!!o,isAuthenticated:!0,isLoading:!1}),clearSession:()=>n({username:null,role:null,permissions:[],mustChangePassword:!1,isAuthenticated:!1,isLoading:!1})})),Ze=window.location.origin,Qt=`${Ze}/api/auth`,en={login:(n,a)=>ie.post(`${Qt}/login`,{username:n,password:a}),logout:()=>ie.post(`${Qt}/logout`),fetchMe:()=>ie.get(`${Qt}/me`),changePassword:(n,a)=>ie.patch(`${Qt}/change-password`,{currentPassword:n,newPassword:a}),listUsers:()=>ie.get(`${Qt}/users`),createUser:(n,a,i)=>ie.post(`${Qt}/users`,{username:n,password:a,role:i}),updateUserRole:(n,a)=>ie.patch(`${Qt}/users/${encodeURIComponent(n)}/role`,{role:a}),resetUserPassword:(n,a)=>ie.patch(`${Qt}/users/${encodeURIComponent(n)}/reset-password`,{newPassword:a}),deleteUser:n=>ie.delete(`${Qt}/users/${encodeURIComponent(n)}`),listRoles:()=>ie.get(`${Qt}/roles`),createRole:(n,a)=>ie.post(`${Qt}/roles`,{roleName:n,permissions:a}),listPermissions:()=>ie.get(`${Qt}/roles/permissions`)},jj=({isOpen:n,onToggle:a,onClose:i})=>{const r=Xn(),{username:o,role:f,clearSession:d}=qn(m=>m),p=()=>ve(null,null,function*(){try{yield en.logout()}finally{d(),i(),r("/login",{replace:!0})}}),g=()=>{i(),r("/force-password-change")};return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{onClick:a,className:"flex items-center space-x-2 text-blue-100 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors",children:[c.jsx("span",{className:"w-7 h-7 rounded-full bg-blue-500 flex items-center justify-center text-xs font-bold text-white uppercase",children:o?o.charAt(0):"?"}),c.jsx("span",{className:"hidden sm:inline",children:o})]}),n&&c.jsxs("div",{className:"absolute right-0 mt-2 w-52 bg-white rounded-md shadow-lg py-1 z-50 animate-fadeIn",children:[c.jsxs("div",{className:"px-4 py-2 border-b border-gray-100",children:[c.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:o}),c.jsx("p",{className:"text-xs text-gray-500",children:f})]}),c.jsx("button",{onClick:g,className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"Change Password"}),c.jsx("button",{onClick:p,className:"w-full text-left px-4 py-2 text-sm text-red-600 hover:bg-gray-100",children:"Logout"})]})]})},Nj=()=>{const[n,a]=S.useState(!1),{Rootname:i}=ro(m=>m),{setRootname:r}=ro(m=>m),{isAuthenticated:o,permissions:f}=qn(m=>m),d=an();S.useEffect(()=>{ie.get(`${Ze}/api/db/databases`).then(m=>{var y;m.status===200&&r((y=m.data.data.RootName)!=null?y:"AxioDB")}).catch(()=>{})},[]),S.useEffect(()=>{a(!1)},[d.pathname]);const p=()=>{a(m=>!m)},g=f.includes("user:view");return c.jsx("header",{className:"bg-gradient-to-r from-blue-700 to-indigo-800 shadow-lg",children:c.jsx("nav",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:c.jsxs("div",{className:"flex items-center justify-between h-16",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsxs(kn,{to:"/",className:"flex items-center",children:[c.jsx("img",{src:"/AXioDB.png",alt:"AxioDB Logo",className:"h-9 w-9"}),c.jsxs("span",{className:"ml-2 text-white font-bold text-xl tracking-tight",children:[i," Admin Hub"]})]})}),c.jsx("div",{className:"hidden md:block ml-10",children:c.jsxs("div",{className:"flex space-x-4",children:[c.jsx(kn,{to:"/",className:"text-blue-100 hover:bg-blue-600 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors",children:"Dashboard"}),c.jsx(kn,{to:"/operations",className:"text-blue-100 hover:bg-blue-600 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors",children:"Operations"}),c.jsx(kn,{to:"/import",className:"text-blue-100 hover:bg-blue-600 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors",children:"Import DB"}),g&&c.jsx(kn,{to:"/users",className:"text-blue-100 hover:bg-blue-600 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors",children:"Users"}),c.jsx(kn,{to:"/support",className:"text-blue-100 hover:bg-blue-600 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors",children:"Support"}),c.jsx(kn,{to:"/status",className:"text-blue-100 hover:bg-blue-600 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors",children:"Status"})]})})]}),o&&c.jsx(jj,{isOpen:n,onToggle:p,onClose:()=>a(!1)})]})})})};function Tj(n,a){return S.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},n),S.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"}))}const Ej=S.forwardRef(Tj);function Aj(n,a){return S.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},n),S.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"}))}const Cj=S.forwardRef(Aj);function Rj(n,a){return S.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},n),S.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))}const fx=S.forwardRef(Rj);function Dj(n,a){return S.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},n),S.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"}))}const Mj=S.forwardRef(Dj);function Oj(n,a){return S.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},n),S.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"}))}const Lj=S.forwardRef(Oj);function Uj(n,a){return S.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},n),S.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))}const zj=S.forwardRef(Uj);function Bj(n,a){return S.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:a},n),S.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const Vj=S.forwardRef(Bj);function _j(n,a){return S.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:a},n),S.createElement("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}const kj=S.forwardRef(_j),Hj=({treeDB:n})=>{const[a,i]=S.useState(!0),[r,o]=S.useState({}),[f,d]=S.useState([]),p=m=>{o(y=>oe(K({},y),{[m]:!y[m]}))};S.useEffect(()=>{const m=()=>{if(!n||!Array.isArray(n)){d([]),i(!1);return}const y=n.map((v,b)=>{const j=`db${b+1}`;return{id:j,name:v.name,type:"database",children:Array.isArray(v.collections)?v.collections.map((N,E)=>({id:`${j}_col${E+1}`,name:N.name||N,type:"collection",documentCount:N.documentCount||0,size:"0 MB"})):[]}});y.length>0&&o({[y[0].id]:!0}),d(y),i(!1)};setTimeout(()=>{m()},500)},[n]);const g=m=>{const y=r[m.id];return c.jsxs("div",{children:[c.jsxs("div",{className:`flex items-center py-2 px-3 ${m.type==="database"?"bg-blue-50 hover:bg-blue-100 border-b border-blue-100":"hover:bg-gray-50 pl-10"} cursor-pointer transition-colors`,onClick:()=>m.children&&p(m.id),children:[m.children?c.jsx("div",{className:"mr-1",children:y?c.jsx(Vj,{className:"h-4 w-4 text-gray-500"}):c.jsx(kj,{className:"h-4 w-4 text-gray-500"})}):c.jsx("div",{className:"w-4 mr-1"}),m.type==="database"?c.jsx(fx,{className:"h-5 w-5 text-blue-600 mr-2"}):c.jsx(Lj,{className:"h-5 w-5 text-yellow-600 mr-2"}),c.jsx("div",{className:"flex-grow",children:c.jsx("span",{className:"font-medium",children:m.name})}),m.type==="collection"&&c.jsx("div",{className:"text-xs text-gray-500",children:c.jsxs("span",{className:"mr-2",children:[m.documentCount," docs"]})})]}),m.children&&y&&c.jsx("div",{className:"border-l border-gray-200 ml-5",children:m.children.map(g)})]},m.id)};return c.jsxs("div",{className:"bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow",children:[c.jsxs("div",{className:"border-b border-gray-200 py-4 px-6",children:[c.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Database Structure"}),c.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Overview of databases and collections"})]}),c.jsx("div",{className:"overflow-y-auto",style:{maxHeight:"400px"},children:a?c.jsx("div",{className:"p-6 space-y-3",children:[1,2,3].map(m=>c.jsxs("div",{className:"animate-pulse",children:[c.jsx("div",{className:"h-6 bg-gray-200 rounded w-3/4 mb-2"}),c.jsxs("div",{className:"pl-6 space-y-2",children:[c.jsx("div",{className:"h-5 bg-gray-100 rounded w-2/3"}),c.jsx("div",{className:"h-5 bg-gray-100 rounded w-2/3"}),c.jsx("div",{className:"h-5 bg-gray-100 rounded w-2/3"})]})]},m))}):c.jsx("div",{children:f.map(g)})})]})},Pj=({CacheStorageInfo:n})=>{const[a,i]=S.useState(!0);S.useEffect(()=>{(()=>{setTimeout(()=>{i(!1)},800)})()},[]);const r=n.Storage/n.Max*100;return c.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow",children:[c.jsxs("div",{className:"flex justify-between mb-3",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"In-Memory Cache"}),a?c.jsx("div",{className:"h-8 mt-2 bg-gray-200 rounded animate-pulse w-24"}):c.jsxs("p",{className:"text-3xl font-bold text-orange-600 mt-2",children:[n.Storage," ",c.jsx("span",{className:"text-lg",children:n.Unit})]}),c.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["of ",n.Max," ",n.Unit," allocated"]})]}),c.jsx("div",{className:"p-3 bg-orange-100 rounded-full",children:c.jsx(Ej,{className:"h-8 w-8 text-orange-600"})})]}),c.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2.5 mt-2",children:c.jsx("div",{className:"bg-orange-600 h-2.5 rounded-full",style:{width:`${a?0:r}%`}})})]})},qj=({storageInfo:n})=>{const[a,i]=S.useState(!0);S.useEffect(()=>{(()=>{setTimeout(()=>{i(!1)},800)})()},[]);const r=(n==null?void 0:n.total)/(n==null?void 0:n.machine)*100;return c.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow",children:[c.jsxs("div",{className:"flex justify-between mb-3",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Storage Used"}),a?c.jsx("div",{className:"h-8 mt-2 bg-gray-200 rounded animate-pulse w-24"}):c.jsxs("p",{className:"text-3xl font-bold text-green-600 mt-2",children:[n==null?void 0:n.total," ",c.jsx("span",{className:"text-lg",children:n==null?void 0:n.matrixUnit})]}),c.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["of ",n==null?void 0:n.machine," ",n==null?void 0:n.matrixUnit," available"]})]}),c.jsx("div",{className:"p-3 bg-green-100 rounded-full",children:c.jsx(zj,{className:"h-8 w-8 text-green-600"})})]}),c.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2.5 mt-2",children:c.jsx("div",{className:"bg-green-600 h-2.5 rounded-full",style:{width:`${a?0:r}%`}})})]})},Yj=({totalCollections:n})=>{const[a,i]=S.useState(!0);return S.useEffect(()=>{(()=>{setTimeout(()=>{i(!1)},600)})()},[]),c.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow",children:c.jsxs("div",{className:"flex justify-between",children:[c.jsx("div",{children:a?c.jsx("div",{className:"h-8 mt-2 bg-gray-200 rounded animate-pulse w-16"}):c.jsxs("p",{className:"text-2xl font-bold text-indigo-600 mt-2",children:[n," ",n<=1?"Collection":"Collections"]})}),c.jsx("div",{className:"p-3 bg-indigo-100 rounded-full",children:c.jsx(Cj,{className:"h-8 w-8 text-indigo-600"})})]})})},Gj=({totalDatabases:n})=>{const[a,i]=S.useState(!0);return S.useEffect(()=>{setTimeout(()=>{i(!1)},1e3)},[]),c.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow",children:c.jsxs("div",{className:"flex justify-between",children:[c.jsx("div",{children:a?c.jsx("div",{className:"h-8 mt-2 bg-gray-200 rounded animate-pulse w-16 text-center"}):c.jsx("p",{className:"text-2xl font-bold text-blue-600 mt-2 text-center",children:n<=1?`${n} Database`:`${n} Databases`})}),c.jsx("div",{className:"p-3 bg-blue-100 rounded-full",children:c.jsx(fx,{className:"h-8 w-8 text-blue-600"})})]})})},Xj=({totalDocuments:n})=>{const[a,i]=S.useState(!0);return S.useEffect(()=>{(()=>{setTimeout(()=>{i(!1)},700)})()},[]),c.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow",children:c.jsxs("div",{className:"flex justify-between",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Total Documents"}),a?c.jsx("div",{className:"h-8 mt-2 bg-gray-200 rounded animate-pulse w-20"}):c.jsx("p",{className:"text-3xl font-bold text-purple-600 mt-2",children:n}),c.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Across all collections"})]}),c.jsx("div",{className:"p-3 bg-purple-100 rounded-full",children:c.jsx(Mj,{className:"h-8 w-8 text-purple-600"})})]})})},Fj=()=>{const[n,a]=S.useState(!0),[i,r]=S.useState(null);return S.useEffect(()=>{ie.get(`${Ze}/api/dashboard-stats`).then(o=>{o.status===200&&(r(o.data.data),a(!1))})},[]),c.jsxs("div",{className:"container mx-auto px-4 py-6",children:[c.jsx("div",{className:"mb-6",children:c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Dashboard"})}),n?c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6 mb-8",children:[1,2,3,4,5].map(o=>c.jsx("div",{className:"h-32 bg-gray-200 rounded-lg animate-pulse"},o))}):c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6 mb-8",children:[c.jsx(Gj,{totalDatabases:(i==null?void 0:i.totalDatabases)||0}),c.jsx(Yj,{totalCollections:(i==null?void 0:i.totalCollections)||0}),c.jsx(Xj,{totalDocuments:(i==null?void 0:i.totalDocuments)||0}),c.jsx(qj,{storageInfo:(i==null?void 0:i.storageInfo)||{}}),c.jsx(Pj,{CacheStorageInfo:(i==null?void 0:i.cacheStorage)||{}})]}),c.jsx("div",{className:"mb-8",children:c.jsx(Hj,{treeDB:(i==null?void 0:i.nodeTree)||[]})})]})},Kj=({isOpen:n,onClose:a,onDatabaseCreated:i})=>{const[r,o]=S.useState(""),[f,d]=S.useState(!1),[p,g]=S.useState(""),m=()=>{o(""),g(""),d(!1),a()},y=v=>ve(null,null,function*(){var b,j;if(v.preventDefault(),!r.trim()){g("Database name is required");return}if(!/^[a-zA-Z0-9_]+$/.test(r)){g("Database name can only contain letters, numbers, and underscores");return}d(!0),g("");try{const N=yield ie.post(`${Ze}/api/db/create-database`,{name:r});if(N.data.statusCode===200||N.data.statusCode===201)i(r),d(!1),m();else throw d(!1),new Error("Failed to create database")}catch(N){console.error("Error creating database:",N),g(((j=(b=N.response)==null?void 0:b.data)==null?void 0:j.message)||"Failed to create database. Please try again."),d(!1)}});return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 animate-fadeIn",children:c.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6",children:[c.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Create New Database"}),c.jsxs("form",{onSubmit:y,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"databaseName",className:"block text-sm font-medium text-gray-700 mb-1",children:"Database Name"}),c.jsx("input",{type:"text",id:"databaseName",value:r,onChange:v=>o(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter database name",disabled:f}),p&&c.jsx("p",{className:"mt-2 text-sm text-red-600",children:p})]}),c.jsxs("div",{className:"flex justify-end space-x-4 mt-6",children:[c.jsx("button",{type:"button",onClick:m,className:"px-4 py-2 text-gray-700 hover:text-gray-900 transition-colors",disabled:f,children:"Cancel"}),c.jsx("button",{type:"submit",className:`px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors flex items-center ${f?"opacity-75 cursor-not-allowed":""}`,disabled:f,children:f?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Creating..."]}):"Create Database"})]})]})]})}):null},$j=({isOpen:n,dbName:a,onClose:i,onConfirmDelete:r})=>{const[o,f]=S.useState(!1);if(!n)return null;const d=()=>ve(null,null,function*(){var p,g;f(!0);try{const m=yield ie.delete(`${Ze}/api/db/delete-database`,{params:{dbName:a}});if(m.status===200)console.log("Database deleted successfully:",m.data),r();else throw new Error("Failed to delete database")}catch(m){console.error("Error deleting database:",m),alert(((g=(p=m.response)==null?void 0:p.data)==null?void 0:g.message)||"Failed to delete database. Please try again.")}finally{f(!1)}});return c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:c.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6 animate-fadeIn",children:[c.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Confirm Deletion"}),c.jsxs("p",{className:"text-gray-700 mb-6",children:['Are you sure you want to delete the database "',a,'"? This action cannot be undone.']}),c.jsxs("div",{className:"flex justify-end space-x-4",children:[c.jsx("button",{onClick:i,disabled:o,className:"px-4 py-2 text-gray-700 hover:text-gray-900 transition-colors",children:"Cancel"}),c.jsx("button",{onClick:d,disabled:o,className:`px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 transition-colors flex items-center ${o?"opacity-75 cursor-not-allowed":""}`,children:o?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Deleting..."]}):"Delete"})]})]})})},Zj=({databases:n,onDeleteClick:a,loading:i})=>{const r=Xn(),[o,f]=S.useState({}),d=m=>{f(y=>oe(K({},y),{[m]:!1}))},p=m=>{r(`/collections?database=${encodeURIComponent(m)}`)},g=m=>ve(null,null,function*(){var y,v;try{console.log("Starting export for database:",m),console.log("API URL:",`${Ze}/api/db/export-database/?dbName=${encodeURIComponent(m)}`);const b=yield ie.get(`${Ze}/api/db/export-database/?dbName=${encodeURIComponent(m)}`,{responseType:"blob"});if(console.log("Response status:",b.status),console.log("Response headers:",b.headers),console.log("Response data type:",typeof b.data),console.log("Response data size:",(y=b.data)==null?void 0:y.size),b.data instanceof Blob&&b.data.type==="application/json"){const D=yield b.data.text();console.error("Received JSON error response:",D),alert(`Export failed: ${D}`);return}if(!b.data||b.data.size===0){console.error("Empty response received"),alert("Export failed: Empty file received");return}const j=window.URL.createObjectURL(b.data),N=document.createElement("a");N.href=j;const E=b.headers["content-disposition"];let T=`${m}.tar.gz`;if(E){const D=E.match(/filename="(.+)"/);D&&(T=D[1])}console.log("Downloading file as:",T),N.setAttribute("download",T),document.body.appendChild(N),N.click(),N.remove(),window.URL.revokeObjectURL(j),console.log("Download initiated successfully")}catch(b){if(console.error("Error exporting database:",b),b.response)if(console.error("Error response data:",b.response.data),console.error("Error response status:",b.response.status),console.error("Error response headers:",b.response.headers),b.response.data instanceof Blob)try{const j=yield b.response.data.text();console.error("Error response text:",j),alert(`Export failed: ${j}`)}catch(j){console.error("Could not read error response:",j),alert("Failed to export database. Please try again.")}else alert(`Export failed: ${((v=b.response.data)==null?void 0:v.message)||b.message}`);else alert("Failed to export database. Please try again.")}});return c.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[c.jsxs("div",{className:"border-b border-gray-200 bg-gray-50 px-6 py-4",children:[c.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Your Databases"}),c.jsxs("p",{className:"text-sm text-gray-500",children:["Total: ",i?"Loading...":n==null?void 0:n.TotalDatabases]})]}),i?c.jsx("div",{className:"p-6",children:[1,2,3].map(m=>c.jsxs("div",{className:"animate-pulse flex items-center justify-between py-4 border-b border-gray-100",children:[c.jsxs("div",{children:[c.jsx("div",{className:"h-6 bg-gray-200 rounded w-48 mb-2"}),c.jsx("div",{className:"h-4 bg-gray-100 rounded w-32"})]}),c.jsx("div",{className:"h-8 bg-gray-200 rounded w-24"})]},m))}):c.jsx("ul",{className:"divide-y divide-gray-200",children:n!=null&&n.ListOfDatabases&&(n==null?void 0:n.ListOfDatabases.length)>0?n.ListOfDatabases.map((m,y)=>c.jsxs("li",{className:`px-6 py-4 flex items-center justify-between hover:bg-gray-50 transition-all duration-300 ${o[m]?"animate-slideIn":"animate-fadeIn"}`,onAnimationEnd:()=>d(m),children:[c.jsxs("div",{children:[c.jsx("h4",{className:"text-lg font-medium text-gray-900",children:m}),c.jsxs("p",{className:"text-sm text-gray-500",children:["Path: ",n.AllDatabasesPaths[y]]})]}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx("button",{onClick:()=>p(m),className:"text-blue-600 hover:text-blue-800 px-3 py-1 rounded border border-blue-200 hover:border-blue-400 transition-colors",children:"View Collections"}),c.jsx("button",{onClick:()=>g(m),className:"text-green-600 hover:text-green-800 px-3 py-1 rounded border border-green-200 hover:border-green-400 transition-colors",children:"Export DB"}),c.jsx("button",{onClick:()=>a(m),className:"text-red-600 hover:text-red-800 px-3 py-1 rounded border border-red-200 hover:border-red-400 transition-colors",children:"Delete"})]})]},m)):c.jsx("li",{className:"px-6 py-8 text-center text-gray-500",children:'No databases found. Click "Create Database" to add one.'})})]})},Qj=()=>{const[n,a]=S.useState(!0),[i,r]=S.useState([]),[o,f]=S.useState(!1),[d,p]=S.useState(!1),[g,m]=S.useState(""),{Rootname:y}=ro(N=>N);S.useEffect(()=>{ve(null,null,function*(){try{const E=yield ie.get(`${Ze}/api/db/databases`);E.status===200&&(r(E.data.data),a(!1))}catch(E){console.error("Error fetching databases:",E),a(!1),r([])}})},[]);const v=N=>{m(N),f(!0)},b=()=>{r(N=>oe(K({},N),{ListOfDatabases:N.ListOfDatabases.filter(E=>E!==g),TotalDatabases:`${N.ListOfDatabases.length-1} Databases`})),f(!1),m("")},j=N=>{r(E=>oe(K({},E),{ListOfDatabases:[...E.ListOfDatabases,N],TotalDatabases:`${E.ListOfDatabases.length+1} Databases`,AllDatabasesPaths:[...E.AllDatabasesPaths,`${E.CurrentPath}/${N}`]}))};return c.jsxs("div",{className:"container mx-auto px-4 py-6",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Databases"}),c.jsxs("p",{className:"text-gray-600",children:["Manage your ",y," databases"]})]}),c.jsxs("button",{onClick:()=>p(!0),className:"bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-lg flex items-center transition-colors",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})}),"Create Database"]})]}),c.jsx(Zj,{databases:i,onDeleteClick:v,loading:n}),c.jsx(Kj,{isOpen:d,onClose:()=>p(!1),onDatabaseCreated:j}),c.jsx($j,{isOpen:o,dbName:g,onClose:()=>f(!1),onConfirmDelete:b})]})},Jj=({isOpen:n,onClose:a,onCollectionCreated:i,databaseName:r})=>{const[o,f]=S.useState(""),[d,p]=S.useState(!1),[g,m]=S.useState(""),[y,v]=S.useState(!1),[b,j]=S.useState(""),N=()=>{f(""),p(!1),m(""),j(""),v(!1),a()},E=T=>ve(null,null,function*(){var D,U;if(T.preventDefault(),!o.trim()){j("Collection name is required");return}if(!/^[a-zA-Z0-9_]+$/.test(o)){j("Collection name can only contain letters, numbers, and underscores");return}if(d&&!g.trim()){j("Encryption key is required when encryption is enabled");return}v(!0),j("");try{const M=yield ie.post(`${Ze}/api/collection/create-collection`,{dbName:r,collectionName:o,crypto:d,key:d?g:""});if(M.data.statusCode===200||M.data.statusCode===201)i({name:o,documentCount:0,size:"N/A"}),N();else throw new Error("Failed to create collection")}catch(M){console.error("Error creating collection:",M),j(((U=(D=M.response)==null?void 0:D.data)==null?void 0:U.message)||"Failed to create collection. Please try again."),v(!1)}});return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 animate-fadeIn",children:c.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6",children:[c.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Create New Collection"}),c.jsxs("form",{onSubmit:E,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"databaseName",className:"block text-sm font-medium text-gray-700 mb-1",children:"Database Name"}),c.jsx("input",{type:"text",id:"databaseName",value:r,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm bg-gray-100 cursor-not-allowed",disabled:!0})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"collectionName",className:"block text-sm font-medium text-gray-700 mb-1",children:"Collection Name"}),c.jsx("input",{type:"text",id:"collectionName",value:o,onChange:T=>f(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter collection name",disabled:y})]}),c.jsx("div",{className:"mb-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("label",{htmlFor:"enableCrypto",className:"text-sm font-medium text-gray-700",children:"Enable Encryption"}),c.jsxs("div",{className:"relative inline-block w-10 mr-2 align-middle select-none",children:[c.jsx("input",{type:"checkbox",id:"enableCrypto",checked:d,onChange:()=>p(!d),className:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer",disabled:y}),c.jsx("label",{htmlFor:"enableCrypto",className:`toggle-label block overflow-hidden h-6 rounded-full cursor-pointer ${d?"bg-green-500":"bg-gray-300"}`})]})]})}),d&&c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"cryptoKey",className:"block text-sm font-medium text-gray-700 mb-1",children:"Encryption Key"}),c.jsx("input",{type:"password",id:"cryptoKey",value:g,onChange:T=>m(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter encryption key",disabled:y})]}),b&&c.jsx("p",{className:"mt-2 text-sm text-red-600",children:b}),c.jsxs("div",{className:"flex justify-end space-x-4 mt-6",children:[c.jsx("button",{type:"button",onClick:N,className:"px-4 py-2 text-gray-700 hover:text-gray-900 transition-colors",disabled:y,children:"Cancel"}),c.jsx("button",{type:"submit",className:`px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors flex items-center ${y?"opacity-75 cursor-not-allowed":""}`,disabled:y,children:y?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Creating..."]}):"Create Collection"})]})]})]})}):null},Wj=({isOpen:n,onClose:a,onCollectionDeleted:i,databaseName:r,collectionName:o})=>{const[f,d]=S.useState(!1),[p,g]=S.useState(""),m=()=>{g(""),d(!1),a()},y=()=>ve(null,null,function*(){var v,b;d(!0),g("");try{if((yield ie.delete(`${Ze}/api/collection/delete-collection/?dbName=${r}&collectionName=${o}`)).data.statusCode===200)i(o),m();else throw new Error("Failed to delete collection")}catch(j){console.error("Error deleting collection:",j),g(((b=(v=j.response)==null?void 0:v.data)==null?void 0:b.message)||"Failed to delete collection. Please try again."),d(!1)}});return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 animate-fadeIn",children:c.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6",children:[c.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Delete Collection"}),c.jsxs("p",{className:"mb-6 text-gray-600",children:["Are you sure you want to delete the collection"," ",c.jsx("span",{className:"font-semibold",children:o})," from database"," ",c.jsx("span",{className:"font-semibold",children:r}),"? This action cannot be undone."]}),p&&c.jsx("p",{className:"mb-4 text-sm text-red-600",children:p}),c.jsxs("div",{className:"flex justify-end space-x-4 mt-6",children:[c.jsx("button",{type:"button",onClick:m,className:"px-4 py-2 text-gray-700 hover:text-gray-900 transition-colors",disabled:f,children:"Cancel"}),c.jsx("button",{type:"button",onClick:y,className:`px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 transition-colors flex items-center ${f?"opacity-75 cursor-not-allowed":""}`,disabled:f,children:f?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Deleting..."]}):"Delete Collection"})]})]})}):null},Ij=()=>{const[n]=cx(),a=Xn(),[i,r]=S.useState(!0),[o,f]=S.useState([]),[d,p]=S.useState([]),[g,m]=S.useState(!1),[y,v]=S.useState(!1),[b,j]=S.useState(""),N=n.get("database"),{Rootname:E}=ro(L=>L),T=()=>ve(null,null,function*(){try{const L=yield ie.get(`${Ze}/api/collection/all/?databaseName=${N}`);if(L.status===200){const $=L.data.data||{};if($.ListOfCollections&&Array.isArray($.ListOfCollections)){const G=$.CollectionSizeMap||[],Z=$.collectionMetaStatus||[];p(Z);const se=$.ListOfCollections.map(he=>{const me=G.find(Re=>{const qe=Re.folderPath.split("/");return qe[qe.length-1]===he}),de=Z.find(Re=>Re.name===he);return{name:he,documentCount:me?me.fileCount:0,isEncrypted:(de==null?void 0:de.isEncrypted)||!1,isSchemaNeeded:(de==null?void 0:de.isSchemaNeeded)||!1,schema:(de==null?void 0:de.schema)||{}}});f(se)}else f([]);r(!1)}}catch(L){console.error("Error fetching collections:",L),r(!1),f([])}});S.useEffect(()=>{if(!N){a("/databases");return}T()},[N,a]);const D=()=>{a("/operations")},U=()=>{T()},M=L=>{j(L),v(!0)},H=()=>{T()};return c.jsxs("div",{className:"container mx-auto px-4 py-6",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsxs("div",{children:[c.jsx("div",{className:"flex items-center mb-2",children:c.jsx("button",{onClick:D,className:"text-blue-600 hover:text-blue-800 mr-3",children:"← Back to Databases"})}),c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Collections"}),c.jsxs("p",{className:"text-gray-600",children:["Collections in database:"," ",c.jsx("span",{className:"font-medium",children:N})]})]}),c.jsxs("button",{onClick:()=>m(!0),className:"bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-lg flex items-center transition-colors",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})}),"Create Collection"]})]}),c.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[c.jsxs("div",{className:"border-b border-gray-200 bg-gray-50 px-6 py-4",children:[c.jsxs("h3",{className:"text-lg font-medium text-gray-900",children:["Collections in ",N]}),c.jsxs("p",{className:"text-sm text-gray-500",children:["Total:"," ",i?"Loading...":o.length>0?`${o.length} Collections`:"0 Collections"]})]}),i?c.jsx("div",{className:"p-6",children:[1,2,3].map(L=>c.jsxs("div",{className:"animate-pulse flex items-center justify-between py-4 border-b border-gray-100",children:[c.jsxs("div",{children:[c.jsx("div",{className:"h-6 bg-gray-200 rounded w-48 mb-2"}),c.jsx("div",{className:"h-4 bg-gray-100 rounded w-32"})]}),c.jsx("div",{className:"h-8 bg-gray-200 rounded w-24"})]},L))}):c.jsx("ul",{className:"divide-y divide-gray-200",children:o.length>0?o.map(L=>c.jsxs("li",{className:"px-6 py-4 flex items-center justify-between hover:bg-gray-50 transition-colors",children:[c.jsxs("div",{children:[c.jsxs("h4",{className:"text-lg font-medium text-gray-900 flex items-center",children:[L.name,L.isEncrypted?c.jsx("span",{className:"ml-2 text-green-600",title:"Encrypted Collection",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})}):c.jsx("span",{className:"ml-2 text-gray-400",title:"Unencrypted Collection",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{d:"M10 2a5 5 0 00-5 5v2a2 2 0 00-2 2v5a2 2 0 002 2h10a2 2 0 002-2v-5a2 2 0 00-2-2H7V7a3 3 0 015.905-.75 1 1 0 001.937-.5A5.002 5.002 0 0010 2z"})})})]}),c.jsxs("p",{className:"text-sm text-gray-500",children:[L.documentCount," documents"]})]}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx("button",{onClick:()=>a(`/collections/documents?database=${N}&collection=${L.name}`),className:"text-blue-600 hover:text-blue-800 px-3 py-1 rounded border border-blue-200 hover:border-blue-400 transition-colors",children:"View Documents"}),c.jsx("button",{onClick:()=>M(L.name),className:"text-red-600 hover:text-red-800 px-3 py-1 rounded border border-red-200 hover:border-red-400 transition-colors",children:"Delete"})]})]},L.name)):c.jsx("li",{className:"px-6 py-8 text-center text-gray-500",children:'No collections found in this database. Click "Create Collection" to add one.'})})]}),g&&c.jsx(Jj,{isOpen:g,onClose:()=>m(!1),onCollectionCreated:U,databaseName:N}),y&&c.jsx(Wj,{isOpen:y,onClose:()=>v(!1),onCollectionDeleted:H,databaseName:N,collectionName:b})]})},eN=({isOpen:n,onClose:a,onDocumentInserted:i,databaseName:r,collectionName:o,onSuccess:f})=>{const[d,p]=S.useState(`{
|
|
66
|
+
|
|
67
|
+
}`),[g,m]=S.useState(""),[y,v]=S.useState(!1),b=j=>ve(null,null,function*(){var N;j.preventDefault(),m("");try{const E=JSON.parse(d);v(!0);const T=yield ie.post(`${Ze}/api/operation/create/?dbName=${r}&collectionName=${o}`,K({},E));if(T.status===200||T.status===201){const D=(N=T.data.data)==null?void 0:N.documentId,U=oe(K({},E),{documentId:D||`doc_${Date.now()}`,updatedAt:new Date().toISOString()});i(U),a(),typeof f=="function"&&f()}else throw new Error("Failed to insert document")}catch(E){E instanceof SyntaxError?m("Invalid JSON format. Please check your input."):m(`Error inserting document: ${E.message}`),v(!1)}});return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 overflow-y-auto h-full w-full z-50 flex justify-center items-center backdrop-blur-sm",children:c.jsxs("div",{className:"relative bg-white rounded-lg shadow-2xl max-w-2xl w-full mx-4 max-h-[90vh] flex flex-col",children:[c.jsxs("div",{className:"flex justify-between items-center p-5 border-b",children:[c.jsxs("h3",{className:"text-xl font-semibold text-gray-900 flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 mr-2 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Insert New Document"]}),c.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-500 transition-colors",children:c.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),c.jsxs("div",{className:"p-6 overflow-y-auto flex-grow",children:[c.jsxs("div",{className:"mb-4 flex items-center space-x-2 bg-blue-50 p-3 rounded-md",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-blue-500",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),c.jsxs("p",{className:"text-sm text-blue-700",children:["Enter the document data in JSON format to insert into"," ",c.jsx("span",{className:"font-semibold",children:o})]})]}),g&&c.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 text-red-700",children:c.jsx("p",{children:g})}),c.jsxs("form",{onSubmit:b,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Document Data (JSON)"}),c.jsx("textarea",{value:d,onChange:j=>p(j.target.value),className:"w-full h-64 p-3 border border-gray-300 rounded-md font-mono text-sm focus:ring-blue-500 focus:border-blue-500 shadow-inner bg-gray-50",placeholder:"Enter JSON document data",required:!0}),c.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"The documentId and updatedAt fields will be automatically generated."})]}),c.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[c.jsx("button",{type:"button",onClick:a,className:"px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors",children:"Cancel"}),c.jsx("button",{type:"submit",disabled:y,className:`px-4 py-2 rounded-md text-white flex items-center ${y?"bg-green-500":"bg-green-600 hover:bg-green-700"} transition-colors shadow-md`,children:y?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin h-5 w-5 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Inserting..."]}):"Insert Document"})]})]})]})]})}):null},tN=({isOpen:n,onClose:a,onDocumentUpdated:i,document:r,databaseName:o,collectionName:f})=>{const[d,p]=S.useState(""),[g,m]=S.useState(""),[y,v]=S.useState(!1);S.useEffect(()=>{if(r){const j=r,{documentId:N,updatedAt:E}=j,T=ot(j,["documentId","updatedAt"]);p(JSON.stringify(T,null,2))}},[r]);const b=j=>ve(null,null,function*(){var N;j.preventDefault(),m("");try{const E=JSON.parse(d);v(!0);const T=yield ie.put(`${Ze}/api/operation/update/by-id/?dbName=${o}&collectionName=${f}&documentId=${r.documentId}`,K({},E));if(T.status===200){const D=((N=T.data.data)==null?void 0:N.document)||oe(K({},E),{documentId:r.documentId,updatedAt:new Date().toISOString()});i(D),a()}else throw new Error("Failed to update document")}catch(E){E instanceof SyntaxError?m("Invalid JSON format. Please check your input."):m(`Error updating document: ${E.message}`),v(!1)}});return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 overflow-y-auto h-full w-full z-50 flex justify-center items-center backdrop-blur-sm",children:c.jsxs("div",{className:"relative bg-white rounded-lg shadow-2xl max-w-2xl w-full mx-4 max-h-[90vh] flex flex-col",children:[c.jsxs("div",{className:"flex justify-between items-center p-5 border-b",children:[c.jsxs("h3",{className:"text-xl font-semibold text-gray-900 flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 mr-2 text-indigo-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Update Document"]}),c.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-500 transition-colors",children:c.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),c.jsxs("div",{className:"p-6 overflow-y-auto flex-grow",children:[c.jsxs("div",{className:"mb-4 flex items-center space-x-2 bg-indigo-50 p-3 rounded-md",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-indigo-500",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),c.jsx("p",{className:"text-sm text-indigo-700",children:"Edit the document data in JSON format"})]}),g&&c.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 text-red-700",children:c.jsx("p",{children:g})}),c.jsxs("form",{onSubmit:b,children:[c.jsxs("div",{className:"mb-4",children:[c.jsxs("div",{className:"flex justify-between items-center mb-2",children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Document Data (JSON)"}),c.jsxs("div",{className:"flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-1 text-yellow-500",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})}),c.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:["ID: ",r.documentId]})]})]}),c.jsx("textarea",{value:d,onChange:j=>p(j.target.value),className:"w-full h-64 p-3 border border-gray-300 rounded-md font-mono text-sm focus:ring-indigo-500 focus:border-indigo-500 shadow-inner bg-gray-50",placeholder:"Enter JSON document data",required:!0}),c.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"You cannot change the document's ID. The updatedAt field will be automatically updated."})]}),c.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[c.jsx("button",{type:"button",onClick:a,className:"px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors",children:"Cancel"}),c.jsx("button",{type:"submit",disabled:y,className:`px-4 py-2 rounded-md text-white flex items-center ${y?"bg-indigo-500":"bg-indigo-600 hover:bg-indigo-700"} transition-colors shadow-md`,children:y?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin h-5 w-5 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Updating..."]}):"Update Document"})]})]})]})]})}):null},nN=({isOpen:n,onClose:a,onDocumentDeleted:i,documentId:r,databaseName:o,collectionName:f})=>{const[d,p]=S.useState(!1),[g,m]=S.useState(""),y=()=>ve(null,null,function*(){try{if(p(!0),(yield ie.delete(`${Ze}/api/operation/delete/by-id/?dbName=${o}&collectionName=${f}&documentId=${r}`)).status===200)i(r),a();else throw new Error("Failed to delete document")}catch(v){m(`Error deleting document: ${v.message}`),p(!1)}});return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 overflow-y-auto h-full w-full z-50 flex justify-center items-center backdrop-blur-sm",children:c.jsxs("div",{className:"relative bg-white rounded-lg shadow-2xl max-w-md w-full mx-4",children:[c.jsxs("div",{className:"flex justify-between items-center p-5 border-b",children:[c.jsxs("h3",{className:"text-xl font-semibold text-gray-900 flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 mr-2 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete Document"]}),c.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-500 transition-colors",children:c.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),c.jsxs("div",{className:"p-6",children:[c.jsx("div",{className:"bg-red-50 p-4 rounded-md mb-5",children:c.jsxs("div",{className:"flex",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("svg",{className:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),c.jsxs("div",{className:"ml-3",children:[c.jsx("h3",{className:"text-sm font-medium text-red-800",children:"Are you sure you want to delete this document?"}),c.jsx("div",{className:"mt-2 text-sm text-red-700",children:c.jsx("p",{children:"This action cannot be undone."})})]})]})}),c.jsxs("div",{className:"mb-5",children:[c.jsx("p",{className:"text-gray-700 mb-2",children:c.jsx("span",{className:"font-medium",children:"Document ID:"})}),c.jsx("div",{className:"bg-gray-50 p-2 rounded border border-gray-200 font-mono text-sm break-all",children:r})]}),c.jsxs("div",{className:"mb-5",children:[c.jsxs("p",{className:"text-gray-700 mb-1",children:[c.jsx("span",{className:"font-medium",children:"Collection:"})," ",f]}),c.jsxs("p",{className:"text-gray-700",children:[c.jsx("span",{className:"font-medium",children:"Database:"})," ",o]})]}),g&&c.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 text-red-700",children:c.jsx("p",{children:g})}),c.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[c.jsx("button",{type:"button",onClick:a,className:"px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors",children:"Cancel"}),c.jsx("button",{onClick:y,disabled:d,className:`px-4 py-2 rounded-md text-white flex items-center ${d?"bg-red-500":"bg-red-600 hover:bg-red-700"} transition-colors shadow-md`,children:d?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin h-5 w-5 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Deleting..."]}):"Delete Document"})]})]})]})}):null},aN=({isOpen:n,onClose:a,databaseName:i,collectionName:r,onAggregationResults:o})=>{const[f,d]=S.useState('[{ "$match": {} }]'),[p,g]=S.useState(!1),[m,y]=S.useState(null),v=()=>ve(null,null,function*(){var j,N;try{g(!0),y(null);const E=JSON.parse(f),T=yield ie.post(`${Ze}/api/operation/aggregate/?dbName=${i}&collectionName=${r}`,{aggregation:E},{headers:{"Content-Type":"application/json"}});if(T.data&&T.data.data){const D=T.data.data.documents||T.data.data;o(D,E),a()}}catch(E){console.error("Aggregation error:",E),y(((N=(j=E.response)==null?void 0:j.data)==null?void 0:N.message)||E.message||"Failed to run aggregation")}finally{g(!1)}}),b=()=>{y(null),a()};return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:c.jsxs("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-3xl max-h-[90vh] flex flex-col",children:[c.jsxs("div",{className:"px-6 py-4 border-b border-gray-200 flex justify-between items-center bg-gradient-to-r from-indigo-50 to-blue-50",children:[c.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Run Aggregation Pipeline"}),c.jsx("button",{onClick:b,className:"text-gray-500 hover:text-gray-700 focus:outline-none",children:c.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),c.jsxs("div",{className:"flex-1 overflow-auto p-6",children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Enter your MongoDB aggregation pipeline as a JSON array. Example:"}),c.jsx("div",{className:"bg-gray-50 p-3 rounded-md text-xs font-mono mb-4 border border-gray-200",children:'[{ "$match": { "field": "value" } }, { "$sort": { "field": 1 } }]'}),c.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["Running on ",c.jsx("span",{className:"font-semibold",children:r})," ","in database ",c.jsx("span",{className:"font-semibold",children:i})]})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Aggregation Pipeline"}),c.jsx("textarea",{className:"w-full h-64 px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 font-mono text-sm",value:f,onChange:j=>d(j.target.value),placeholder:'[{ "$match": {} }]'})]}),m&&c.jsx("div",{className:"bg-red-50 border-l-4 border-red-500 p-4 mb-4",children:c.jsxs("div",{className:"flex",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("svg",{className:"h-5 w-5 text-red-500",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),c.jsx("div",{className:"ml-3",children:c.jsx("p",{className:"text-sm text-red-700",children:m})})]})})]}),c.jsxs("div",{className:"px-6 py-4 border-t border-gray-200 flex justify-end",children:[c.jsx("button",{onClick:b,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-md mr-3",children:"Cancel"}),c.jsx("button",{onClick:v,disabled:p,className:`px-4 py-2 text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 rounded-md flex items-center ${p?"opacity-70 cursor-not-allowed":""}`,children:p?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Processing..."]}):c.jsxs(c.Fragment,{children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),"Run Aggregation"]})})]})]})}):null},ug=()=>{const[n]=cx(),a=Xn(),[i,r]=S.useState(!0),[o,f]=S.useState([]),[d,p]=S.useState(!0),[g,m]=S.useState(1),y=S.useRef(),v=n.get("database"),b=n.get("collection"),[j,N]=S.useState(!1),[E,T]=S.useState(!1),[D,U]=S.useState(!1),[M,H]=S.useState(!1),[L,$]=S.useState(null),[G,Z]=S.useState(!1),[se,he]=S.useState([]),[me,de]=S.useState([]),[Re,qe]=S.useState(""),[be,P]=S.useState(!1),[Q,ee]=S.useState(""),[ye,C]=S.useState(""),Y=S.useRef(null),W=S.useRef(null),J=S.useCallback((I=1,Ee=!1)=>ve(null,null,function*(){try{r(!0);const Ye=yield ie.get(`${Ze}/api/operation/all/?dbName=${v}&collectionName=${b}&page=${I}`);if(Ye.status===200){const ln=Ye.data.data.data.documents||[];f(Ee?ln:vt=>[...vt,...ln]),p(ln.length===10)}r(!1)}catch(Ye){console.error("Error fetching documents:",Ye),r(!1)}}),[v,b]),ne=S.useCallback((I,Ee=1,Ye=!1)=>ve(null,null,function*(){try{r(!0);const ln=yield ie.post(`${Ze}/api/operation/all/by-query/?dbName=${v}&collectionName=${b}&page=${Ee}`,{query:I},{headers:{"Content-Type":"application/json"}});if(ln.status===200){const vt=ln.data.data.data.documents||[];f(Ye?vt:bt=>[...bt,...vt]),p(vt.length===10)}r(!1)}catch(ln){console.error("Error fetching documents by query:",ln),r(!1)}}),[v,b]);S.useEffect(()=>{if(!v||!b){a("/collections");return}Z(!1),he([]),P(!1),qe(""),ee(""),C(""),Y.current&&clearTimeout(Y.current),W.current&&clearTimeout(W.current),m(1),f([]),J(1,!0)},[v,b,a,J]);const Ne=S.useCallback(I=>{i||G||(y.current&&y.current.disconnect(),y.current=new IntersectionObserver(Ee=>{Ee[0].isIntersecting&&d&&(m(Ye=>Ye+1),be&&Re?ne(Re,g+1):J(g+1))}),I&&y.current.observe(I))},[i,d,J,ne,g,G,be,Re]);S.useEffect(()=>()=>{Y.current&&clearTimeout(Y.current),W.current&&clearTimeout(W.current)},[]);const fe=()=>{a(`/collections?database=${v}`)},xt=I=>{f(Ee=>[I,...Ee])},Be=I=>{$(I),T(!0)},sn=I=>{$(I),U(!0)},$a=()=>ve(null,null,function*(){try{r(!0);const I=yield ie.post(`${Ze}/api/operation/aggregate/?dbName=${v}&collectionName=${b}`,{aggregation:se},{headers:{"Content-Type":"application/json"}});I.data&&I.data.data&&de(I.data.data.documents||I.data.data),r(!1)}catch(I){console.error("Error re-running aggregation:",I),r(!1)}}),Za=I=>{f(Ee=>Ee.map(Ye=>Ye.documentId===I.documentId?I:Ye)),G&&$a()},ti=I=>{f(Ee=>Ee.filter(Ye=>Ye.documentId!==I)),G&&$a()},ni=(I,Ee)=>{de(I),he(Ee),Z(!0)},Qa=()=>{Z(!1),he([]),de([]),be&&Re?ne(Re,1,!0):J(1,!0)},To=I=>{ee(I),Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>{Ht(I)},500)},Eo=I=>{C(I),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{Ao(I)},300)},Ht=I=>{try{if(!I.trim()){P(!1),qe(""),Z(!1),m(1),f([]),J(1,!0);return}const Ee=JSON.parse(I);qe(Ee),P(!0),Z(!1),m(1),f([]),ne(Ee,1,!0)}catch(Ee){console.warn("Invalid JSON query, treating as text search:",Ee)}},Ao=I=>{if(!I.trim()){Q.trim()||(P(!1),qe(""),Z(!1),m(1),f([]),J(1,!0));return}const Ee={documentId:I.trim()};qe(Ee),P(!0),Z(!1),m(1),f([]),ne(Ee,1,!0)},ai=()=>{ee(""),C(""),qe(""),P(!1),Z(!1),m(1),f([]),J(1,!0)},si=I=>new Date(I).toLocaleString(),Ja=I=>{try{return!Array.isArray(I)||I.length===0?"No conditions":I.map((Ye,ln)=>{const vt=Object.keys(Ye)[0];return`${vt.replace("$","")}: ${JSON.stringify(Ye[vt]).substring(0,30)}${JSON.stringify(Ye[vt]).length>30?"...":""}`}).join(", ")}catch(Ee){return"Invalid pipeline"}};return c.jsxs("div",{className:"container mx-auto px-4 py-6 max-w-7xl",children:[c.jsxs("div",{className:"bg-white rounded-lg shadow-lg overflow-hidden mb-8",children:[c.jsxs("div",{className:"flex justify-between items-center p-6 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-200",children:[c.jsxs("div",{children:[c.jsx("div",{className:"flex items-center mb-2",children:c.jsxs("button",{onClick:fe,className:"text-blue-600 hover:text-blue-800 flex items-center transition-colors font-medium",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-1",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"})}),"Back to Collections"]})}),c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Documents"}),c.jsxs("div",{className:"flex items-center mt-1 text-gray-600",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2 text-indigo-500",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{d:"M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 002-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z"})}),c.jsx("span",{className:"font-medium",children:b}),c.jsx("span",{className:"mx-2",children:"in"}),c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2 text-indigo-500",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{d:"M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM11 13a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})}),c.jsx("span",{className:"font-medium",children:v})]})]}),c.jsxs("div",{className:"flex space-x-3",children:[c.jsxs("button",{onClick:()=>H(!0),className:"bg-indigo-600 hover:bg-indigo-700 text-white py-2 px-5 rounded-lg flex items-center transition-colors shadow-md",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 0l-2 2a1 1 0 101.414 1.414L8 10.414l1.293 1.293a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Run Aggregate"]}),c.jsxs("button",{onClick:()=>N(!0),className:"bg-green-600 hover:bg-green-700 text-white py-2 px-5 rounded-lg flex items-center transition-colors shadow-md",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})}),"Insert Document"]})]})]}),c.jsx("div",{className:"px-6 py-4 border-b border-gray-200 bg-gray-50",children:c.jsxs("div",{className:"max-w-6xl",children:[c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[c.jsxs("div",{className:"lg:col-span-2",children:[c.jsx("label",{htmlFor:"search-query",className:"block text-sm font-medium text-gray-700 mb-2",children:c.jsxs("span",{className:"flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-1 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),"JSON Query Search"]})}),c.jsx("input",{type:"text",id:"search-query",value:Q,onChange:I=>To(I.target.value),placeholder:'e.g., {"name": "John"}, {"age": {"$gte": 18}}, or {} for all',className:"w-full px-3 py-2.5 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm font-mono transition-colors"}),c.jsx("div",{className:"mt-1 text-xs text-gray-500",children:"Auto-searches as you type • MongoDB-style syntax • Leave empty to show all"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"document-id-search",className:"block text-sm font-medium text-gray-700 mb-2",children:c.jsxs("span",{className:"flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-1 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),"Document ID"]})}),c.jsx("input",{type:"text",id:"document-id-search",value:ye,onChange:I=>Eo(I.target.value),placeholder:"Enter document ID",className:"w-full px-3 py-2.5 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-green-500 text-sm font-mono transition-colors"}),c.jsx("div",{className:"mt-1 text-xs text-gray-500",children:"Find by specific ID"})]})]}),be&&c.jsx("div",{className:"mt-3 p-3 bg-blue-50 border border-blue-200 rounded-md",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"text-sm text-blue-800",children:[c.jsx("span",{className:"font-medium",children:"Active Search:"})," ",c.jsx("code",{className:"bg-blue-100 px-2 py-1 rounded text-xs ml-1",children:JSON.stringify(Re)})]}),c.jsxs("button",{onClick:ai,className:"text-blue-600 hover:text-blue-800 text-sm flex items-center transition-colors",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Clear All"]})]})})]})}),G&&c.jsxs("div",{className:"bg-indigo-50 px-6 py-3 border-b border-indigo-100 flex justify-between items-center",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-indigo-600 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),c.jsxs("div",{children:[c.jsx("span",{className:"text-sm font-medium text-indigo-800",children:"Aggregation Results"}),c.jsxs("p",{className:"text-xs text-indigo-600 mt-0.5",children:["Pipeline: ",Ja(se)]})]})]}),c.jsxs("button",{onClick:Qa,className:"text-indigo-700 hover:text-indigo-900 text-sm font-medium flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Clear Aggregation"]})]}),c.jsxs("div",{className:"p-6",children:[i&&o.length===0&&!G?c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3,4,5,6].map(I=>c.jsxs("div",{className:"animate-pulse bg-white rounded-lg border border-gray-200 shadow-sm p-4",children:[c.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-3"}),c.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/2 mb-2"}),c.jsx("div",{className:"h-20 bg-gray-100 rounded mb-3"}),c.jsxs("div",{className:"flex justify-end",children:[c.jsx("div",{className:"h-8 bg-gray-200 rounded w-16 mr-2"}),c.jsx("div",{className:"h-8 bg-gray-200 rounded w-16"})]})]},I))}):G?me.length>0?c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:me.map((I,Ee)=>c.jsx("div",{className:"bg-white rounded-lg border border-gray-200 shadow-sm hover:shadow-md transition-shadow overflow-hidden",children:c.jsxs("div",{className:"p-4",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-indigo-500 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 0l-2 2a1 1 0 101.414 1.414L8 10.414l1.293 1.293a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),c.jsx("div",{className:"font-mono text-indigo-700 font-semibold",children:c.jsx("span",{className:"text-sm",children:I.documentId?`ID: ${I.documentId}`:`Result #${Ee+1}`})})]}),I.updatedAt&&c.jsx("span",{className:"text-xs text-gray-500",title:I.updatedAt,children:si(I.updatedAt)})]}),c.jsx("div",{className:"bg-gray-50 rounded p-3 mb-3 h-48 overflow-y-auto",children:c.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap break-words text-gray-800",children:JSON.stringify(Object.fromEntries(Object.entries(I).filter(([Ye])=>!["documentId","updatedAt"].includes(Ye))),null,2)})}),I.documentId&&c.jsxs("div",{className:"flex justify-end space-x-2",children:[c.jsx("button",{onClick:()=>Be(I),className:"text-indigo-600 hover:text-indigo-900 bg-indigo-50 hover:bg-indigo-100 px-3 py-1 rounded-md text-sm transition-colors",children:"Update"}),c.jsx("button",{onClick:()=>sn(I),className:"text-red-600 hover:text-red-900 bg-red-50 hover:bg-red-100 px-3 py-1 rounded-md text-sm transition-colors",children:"Delete"})]})]})},Ee))}):c.jsxs("div",{className:"text-center py-12",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16 text-gray-300 mx-auto mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),c.jsx("p",{className:"text-gray-500 mb-2",children:"No documents match your aggregation pipeline"}),c.jsx("button",{onClick:Qa,className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Clear Aggregation"})]}):o.length>0?c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:o.map((I,Ee)=>c.jsx("div",{ref:!G&&Ee===o.length-1?Ne:null,className:"bg-white rounded-lg border border-gray-200 shadow-sm hover:shadow-md transition-shadow overflow-hidden",children:c.jsxs("div",{className:"p-4",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-yellow-500 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})}),c.jsx("div",{className:"font-mono text-indigo-700 font-semibold",title:I.documentId,children:c.jsxs("span",{className:"text-sm",children:["ID: ",I.documentId]})})]}),c.jsx("span",{className:"text-xs text-gray-500",title:I.updatedAt,children:si(I.updatedAt)})]}),c.jsx("div",{className:"bg-gray-50 rounded p-3 mb-3 h-48 overflow-y-auto",children:c.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap break-words text-gray-800",children:JSON.stringify(Object.fromEntries(Object.entries(I).filter(([Ye])=>!["documentId","updatedAt"].includes(Ye))),null,2)})}),c.jsxs("div",{className:"flex justify-end space-x-2",children:[c.jsx("button",{onClick:()=>Be(I),className:"text-indigo-600 hover:text-indigo-900 bg-indigo-50 hover:bg-indigo-100 px-3 py-1 rounded-md text-sm transition-colors",children:"Update"}),c.jsx("button",{onClick:()=>sn(I),className:"text-red-600 hover:text-red-900 bg-red-50 hover:bg-red-100 px-3 py-1 rounded-md text-sm transition-colors",children:"Delete"})]})]})},I.documentId))}):c.jsxs("div",{className:"text-center py-12",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16 text-gray-300 mx-auto mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),c.jsx("p",{className:"text-gray-500 mb-4",children:be?"No documents match your search query":"No documents found in this collection"}),be?c.jsxs("div",{className:"space-y-2",children:[c.jsx("button",{onClick:ai,className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Clear Search & Show All Documents"}),c.jsxs("p",{className:"text-xs text-gray-400",children:["Try adjusting your query or use "," to show all documents"]})]}):c.jsx("button",{onClick:()=>N(!0),className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Insert Your First Document"})]}),i&&o.length>0&&!G&&c.jsx("div",{className:"flex justify-center items-center py-4",children:c.jsxs("svg",{className:"animate-spin h-6 w-6 text-indigo-500",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),!i&&!d&&o.length>0&&!G&&c.jsx("div",{className:"text-center py-4 text-gray-500 text-sm border-t border-gray-100 mt-6",children:"You've reached the end of the results."}),G&&me.length>0&&c.jsxs("div",{className:"text-center py-4 text-gray-500 text-sm border-t border-gray-100 mt-6",children:["Showing all ",me.length," aggregation results."]})]})]}),j&&c.jsx(eN,{isOpen:j,onClose:()=>N(!1),onDocumentInserted:xt,databaseName:v,collectionName:b,onSuccess:()=>J(1,!0)}),E&&L&&c.jsx(tN,{isOpen:E,onClose:()=>T(!1),onDocumentUpdated:Za,document:L,databaseName:v,collectionName:b}),D&&L&&c.jsx(nN,{isOpen:D,onClose:()=>U(!1),onDocumentDeleted:ti,documentId:L.documentId,databaseName:v,collectionName:b}),M&&c.jsx(aN,{isOpen:M,onClose:()=>H(!1),databaseName:v,collectionName:b,onAggregationResults:ni})]})},sN=()=>{const[n,a]=S.useState([]),[i,r]=S.useState(!0),[o,f]=S.useState(null),[d,p]=S.useState({});S.useEffect(()=>{ve(null,null,function*(){try{r(!0);const b=yield ie.get(`${Ze}/api/routes`);if(b.data&&b.data.data&&Array.isArray(b.data.data)){a(b.data.data);const j={};b.data.data.forEach(N=>{j[N.groupName]=!0}),p(j)}else throw new Error("Invalid API response format");r(!1)}catch(b){console.error("Error fetching API routes:",b),f("Failed to load API reference. Please try again later."),r(!1)}})},[]);const g=v=>{p(b=>oe(K({},b),{[v]:!b[v]}))},m=v=>{switch(v){case"GET":return"bg-blue-600";case"POST":return"bg-green-600";case"PUT":return"bg-amber-600";case"DELETE":return"bg-red-600";default:return"bg-gray-600"}},y=v=>c.jsx("pre",{className:"mt-2 p-3 bg-gray-800 text-gray-200 rounded-md overflow-x-auto text-sm",children:JSON.stringify(v,null,2)});return i?c.jsxs("div",{className:"container mx-auto px-4 py-8",children:[c.jsx("h1",{className:"text-2xl font-bold mb-6",children:"API Reference"}),c.jsx("div",{className:"flex justify-center items-center py-12",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500"})})]}):o?c.jsxs("div",{className:"container mx-auto px-4 py-8",children:[c.jsx("h1",{className:"text-2xl font-bold mb-6",children:"API Reference"}),c.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded",children:c.jsx("p",{children:o})})]}):c.jsxs("div",{className:"container mx-auto px-4 py-8",children:[c.jsx("h1",{className:"text-2xl font-bold mb-2",children:"API Reference"}),c.jsx("p",{className:"text-gray-600 mb-6",children:"Complete documentation for the AxioDB REST API"}),n.length===0&&!i&&!o?c.jsx("div",{className:"bg-yellow-100 border border-yellow-400 text-yellow-700 px-4 py-3 rounded",children:c.jsx("p",{children:"No API routes found. The server might not have returned any routes."})}):c.jsx("div",{className:"space-y-6",children:n.map(v=>c.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[c.jsxs("div",{className:"bg-gray-50 px-4 py-3 flex justify-between items-center cursor-pointer",onClick:()=>g(v.groupName),children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-medium text-gray-900",children:v.groupName}),c.jsx("p",{className:"text-sm text-gray-500",children:v.description})]}),c.jsx("div",{className:"text-gray-500",children:d[v.groupName]?c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z",clipRule:"evenodd"})}):c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z",clipRule:"evenodd"})})})]}),d[v.groupName]&&c.jsx("div",{className:"divide-y divide-gray-200",children:v.Paths.map((b,j)=>c.jsx("div",{className:"p-4 hover:bg-gray-50",children:c.jsxs("div",{className:"flex items-start",children:[c.jsx("span",{className:`${m(b.method)} text-white text-xs font-bold px-2 py-1 rounded mr-3 min-w-16 text-center`,children:b.method}),c.jsxs("div",{className:"flex-1",children:[c.jsx("div",{className:"font-mono text-sm bg-gray-100 p-2 rounded mb-2 overflow-x-auto",children:b.path}),c.jsx("p",{className:"text-gray-700 mb-2",children:b.description}),b.payload&&c.jsxs("div",{children:[c.jsx("h4",{className:"text-sm font-semibold text-gray-700 mt-2 mb-1",children:"Payload:"}),y(b.payload)]})]})]})},j))})]},v.groupName))})]})},iN=()=>{var d,p,g,m,y,v,b,j,N,E;const[n,a]=S.useState(null),[i,r]=S.useState(!0),[o,f]=S.useState(null);return S.useEffect(()=>{ve(null,null,function*(){try{const D=yield ie.get(`${Ze}/api/info`);D.status===200&&a(D.data.data)}catch(D){console.error("Error fetching author info:",D),f("Failed to load author information")}finally{r(!1)}})},[]),i?c.jsx("div",{className:"container mx-auto px-4 py-6",children:c.jsx("div",{className:"max-w-4xl mx-auto",children:c.jsx("div",{className:"bg-white rounded-lg shadow-lg p-8",children:c.jsxs("div",{className:"animate-pulse",children:[c.jsx("div",{className:"h-8 bg-gray-300 rounded w-1/3 mb-6"}),c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-4 bg-gray-300 rounded w-full"}),c.jsx("div",{className:"h-4 bg-gray-300 rounded w-2/3"}),c.jsx("div",{className:"h-4 bg-gray-300 rounded w-1/2"})]})]})})})}):o?c.jsx("div",{className:"container mx-auto px-4 py-6",children:c.jsx("div",{className:"max-w-4xl mx-auto",children:c.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),c.jsxs("div",{className:"ml-3",children:[c.jsx("h3",{className:"text-sm font-medium text-red-800",children:"Error"}),c.jsx("p",{className:"text-sm text-red-700 mt-1",children:o})]})]})})})}):c.jsx("div",{className:"container mx-auto px-4 py-6",children:c.jsxs("div",{className:"max-w-4xl mx-auto",children:[c.jsxs("div",{className:"text-center mb-8",children:[c.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Need Help with AxioDB?"}),c.jsx("p",{className:"text-xl text-gray-600",children:"Get in touch with the developer for support and assistance"})]}),c.jsxs("div",{className:"bg-white rounded-xl shadow-xl overflow-hidden",children:[c.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-purple-600 px-8 py-12 text-white",children:c.jsxs("div",{className:"flex items-center space-x-6",children:[c.jsxs("div",{className:"w-20 h-20 rounded-full overflow-hidden border-4 border-white border-opacity-30",children:[c.jsx("img",{src:`https://github.com/${(p=(d=n==null?void 0:n.AuthorDetails)==null?void 0:d.github)==null?void 0:p.split("/").pop()}.png`,alt:`${(g=n==null?void 0:n.AuthorDetails)==null?void 0:g.name}'s GitHub Avatar`,className:"w-full h-full object-cover",onError:T=>{T.target.style.display="none",T.target.nextElementSibling.style.display="flex"}}),c.jsx("div",{className:"w-full h-full bg-white bg-opacity-20 rounded-full hidden items-center justify-center",children:c.jsx("svg",{className:"w-10 h-10 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})})]}),c.jsxs("div",{children:[c.jsx("h2",{className:"text-2xl font-bold",children:((m=n==null?void 0:n.AuthorDetails)==null?void 0:m.name)||"Loading..."}),c.jsx("p",{className:"text-blue-100 text-lg",children:((y=n==null?void 0:n.AuthorDetails)==null?void 0:y.Designation)||"Software Engineer"}),c.jsxs("p",{className:"text-blue-100",children:[((v=n==null?void 0:n.AuthorDetails)==null?void 0:v.Country)||"India"," • Solo Developer"]})]})]})}),c.jsx("div",{className:"px-8 py-8",children:c.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"Contact Information"}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("a",{href:`mailto:${(b=n==null?void 0:n.AuthorDetails)==null?void 0:b.Email}`,className:"flex items-center p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",children:[c.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-full flex items-center justify-center mr-4",children:c.jsx("svg",{className:"w-5 h-5 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 4.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900",children:"Email"}),c.jsx("p",{className:"text-gray-600",children:(j=n==null?void 0:n.AuthorDetails)==null?void 0:j.Email})]})]}),c.jsxs("a",{href:(N=n==null?void 0:n.AuthorDetails)==null?void 0:N.LinkedIn,target:"_blank",rel:"noopener noreferrer",className:"flex items-center p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",children:[c.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center mr-4",children:c.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:c.jsx("path",{fillRule:"evenodd",d:"M16.338 16.338H13.67V12.16c0-.995-.017-2.277-1.387-2.277-1.39 0-1.601 1.086-1.601 2.207v4.248H8.014v-8.59h2.559v1.174h.037c.356-.675 1.227-1.387 2.526-1.387 2.703 0 3.203 1.778 3.203 4.092v4.711zM5.005 6.575a1.548 1.548 0 11-.003-3.096 1.548 1.548 0 01.003 3.096zm-1.337 9.763H6.34v-8.59H3.667v8.59zM17.668 1H2.328C1.595 1 1 1.581 1 2.298v15.403C1 18.418 1.595 19 2.328 19h15.34c.734 0 1.332-.582 1.332-1.299V2.298C19 1.581 18.402 1 17.668 1z",clipRule:"evenodd"})})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900",children:"LinkedIn"}),c.jsx("p",{className:"text-gray-600",children:"Connect on LinkedIn"})]})]}),c.jsxs("a",{href:(E=n==null?void 0:n.AuthorDetails)==null?void 0:E.github,target:"_blank",rel:"noopener noreferrer",className:"flex items-center p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",children:[c.jsx("div",{className:"w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center mr-4",children:c.jsx("svg",{className:"w-5 h-5 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:c.jsx("path",{fillRule:"evenodd",d:"M10 0C4.477 0 0 4.484 0 10.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0110 4.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.942.359.31.678.921.678 1.856 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0020 10.017C20 4.484 15.522 0 10 0z",clipRule:"evenodd"})})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900",children:"GitHub"}),c.jsx("p",{className:"text-gray-600",children:"View source code"})]})]})]})]}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"Project Details"}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg",children:[c.jsx("p",{className:"font-medium text-blue-900",children:"Package Name"}),c.jsx("p",{className:"text-blue-700",children:(n==null?void 0:n.Package_Name)||"axiodb"})]}),c.jsxs("div",{className:"p-4 bg-green-50 rounded-lg",children:[c.jsx("p",{className:"font-medium text-green-900",children:"Version"}),c.jsx("p",{className:"text-green-700",children:(n==null?void 0:n.AxioDB_Version)||"2.30.92"})]}),c.jsxs("div",{className:"p-4 bg-purple-50 rounded-lg",children:[c.jsx("p",{className:"font-medium text-purple-900",children:"License"}),c.jsx("p",{className:"text-purple-700",children:(n==null?void 0:n.License)||"MIT"})]})]})]})]})})]}),c.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-xl p-8 mt-8",children:c.jsxs("div",{className:"flex items-start",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("svg",{className:"h-8 w-8 text-yellow-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),c.jsxs("div",{className:"ml-4",children:[c.jsx("h3",{className:"text-xl font-semibold text-yellow-900 mb-4",children:"Reporting Issues"}),c.jsxs("div",{className:"prose text-yellow-800",children:[c.jsx("p",{className:"mb-4",children:"If you encounter any issues with AxioDB, please help me resolve them quickly by providing detailed information:"}),c.jsxs("ul",{className:"list-disc list-inside space-y-2 mb-4",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Detailed Description:"})," What exactly happened and what did you expect?"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Steps to Reproduce:"})," Please provide step-by-step instructions to reproduce the error"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Environment:"})," Operating system, Node.js version, AxioDB version"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Error Messages:"})," Copy the complete error message and stack trace"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Code Sample:"})," Minimal code that reproduces the issue"]})]}),c.jsxs("div",{className:"bg-yellow-100 rounded-lg p-4 mt-4",children:[c.jsx("p",{className:"font-medium text-yellow-900",children:"Note:"}),c.jsx("p",{className:"text-yellow-800 mt-1",children:"As a solo developer, I appreciate your patience. I'll respond to issues as soon as possible and work diligently to resolve them. Your detailed bug reports help me fix issues faster!"})]})]})]})]})}),c.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-6 mt-6",children:c.jsxs("div",{className:"flex items-center",children:[c.jsx("svg",{className:"h-6 w-6 text-blue-600 mr-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-semibold text-blue-900",children:"Expected Response Time"}),c.jsx("p",{className:"text-blue-700 mt-1",children:"I typically respond within 24-48 hours. For critical issues, I'll prioritize and respond as soon as possible."})]})]})})]})})},lN=()=>{var b,j,N,E,T,D,U;const[n,a]=S.useState(null),[i,r]=S.useState(!0),[o,f]=S.useState(null),[d,p]=S.useState(null),g=()=>ve(null,null,function*(){try{f(null);const M=yield ie.get(`${Ze}/api/health`);M.status===200&&(a(M.data),p(new Date))}catch(M){console.error("Error fetching health status:",M),f("Failed to fetch server status")}finally{r(!1)}});S.useEffect(()=>{g();const M=setInterval(()=>{g()},3e4);return()=>clearInterval(M)},[]);const m=M=>new Date(M).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"}),v=(M=>{switch(M==null?void 0:M.toLowerCase()){case"ok":return{bg:"bg-green-50",border:"border-green-200",text:"text-green-800",icon:"text-green-600",badge:"bg-green-100 text-green-800"};case"warning":return{bg:"bg-yellow-50",border:"border-yellow-200",text:"text-yellow-800",icon:"text-yellow-600",badge:"bg-yellow-100 text-yellow-800"};case"error":case"down":return{bg:"bg-red-50",border:"border-red-200",text:"text-red-800",icon:"text-red-600",badge:"bg-red-100 text-red-800"};default:return{bg:"bg-gray-50",border:"border-gray-200",text:"text-gray-800",icon:"text-gray-600",badge:"bg-gray-100 text-gray-800"}}})(((b=n==null?void 0:n.data)==null?void 0:b.status)||(o?"error":"unknown"));return i?c.jsx("div",{className:"container mx-auto px-4 py-6",children:c.jsxs("div",{className:"max-w-4xl mx-auto",children:[c.jsxs("div",{className:"text-center mb-8",children:[c.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"AxioDB Status"}),c.jsx("p",{className:"text-xl text-gray-600",children:"Checking server health..."})]}),c.jsx("div",{className:"bg-white rounded-xl shadow-lg p-8",children:c.jsxs("div",{className:"animate-pulse",children:[c.jsx("div",{className:"flex items-center justify-center mb-6",children:c.jsx("div",{className:"h-16 w-16 bg-gray-300 rounded-full"})}),c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"h-6 bg-gray-300 rounded w-1/3 mx-auto"}),c.jsx("div",{className:"h-4 bg-gray-300 rounded w-1/2 mx-auto"}),c.jsx("div",{className:"h-4 bg-gray-300 rounded w-2/3 mx-auto"})]})]})})]})}):c.jsx("div",{className:"container mx-auto px-4 py-6",children:c.jsxs("div",{className:"max-w-4xl mx-auto",children:[c.jsxs("div",{className:"text-center mb-8",children:[c.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"AxioDB Status"}),c.jsx("p",{className:"text-xl text-gray-600",children:"Real-time server health monitoring"})]}),c.jsx("div",{className:`${v.bg} ${v.border} border rounded-xl shadow-lg overflow-hidden mb-8`,children:c.jsxs("div",{className:"p-8",children:[c.jsx("div",{className:"flex items-center justify-center mb-6",children:o?c.jsx("div",{className:`w-16 h-16 ${v.icon} flex items-center justify-center`,children:c.jsx("svg",{className:"w-12 h-12",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})})}):((j=n==null?void 0:n.data)==null?void 0:j.status)==="ok"?c.jsx("div",{className:`w-16 h-16 ${v.icon} flex items-center justify-center`,children:c.jsx("svg",{className:"w-12 h-12",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}):c.jsx("div",{className:`w-16 h-16 ${v.icon} flex items-center justify-center`,children:c.jsx("svg",{className:"w-12 h-12",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"flex items-center justify-center mb-4",children:c.jsxs("span",{className:`inline-flex items-center px-4 py-2 rounded-full text-sm font-medium ${v.badge}`,children:[c.jsx("span",{className:`w-2 h-2 ${((N=n==null?void 0:n.data)==null?void 0:N.status)==="ok"?"bg-green-400":"bg-red-400"} rounded-full mr-2 ${((E=n==null?void 0:n.data)==null?void 0:E.status)==="ok"?"animate-pulse":""}`}),o?"Server Unreachable":((D=(T=n==null?void 0:n.data)==null?void 0:T.status)==null?void 0:D.toUpperCase())||"UNKNOWN"]})}),c.jsx("h2",{className:`text-2xl font-bold ${v.text} mb-2`,children:o?"Connection Failed":(n==null?void 0:n.message)||"Status Unknown"}),((U=n==null?void 0:n.data)==null?void 0:U.timestamp)&&c.jsxs("p",{className:`${v.text} text-lg`,children:["Server Time: ",m(n.data.timestamp)]})]})]})}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-8",children:[c.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[c.jsxs("div",{className:"flex items-center mb-4",children:[c.jsx("div",{className:"w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center mr-3",children:c.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),c.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Response Time"})]}),c.jsx("p",{className:"text-2xl font-bold text-blue-600",children:o?"N/A":"< 100ms"}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"API response latency"})]}),c.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[c.jsxs("div",{className:"flex items-center mb-4",children:[c.jsx("div",{className:"w-8 h-8 bg-green-100 rounded-full flex items-center justify-center mr-3",children:c.jsx("svg",{className:"w-4 h-4 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),c.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Status Code"})]}),c.jsx("p",{className:"text-2xl font-bold text-green-600",children:(n==null?void 0:n.statusCode)||(o?"Error":"N/A")}),c.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"HTTP response status"})]})]}),c.jsx("div",{className:"bg-white rounded-lg shadow-md p-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Auto-Refresh"}),c.jsxs("p",{className:"text-sm text-gray-600",children:["Status updates automatically every 30 seconds",d&&c.jsxs(c.Fragment,{children:[c.jsx("br",{}),"Last updated: ",d.toLocaleTimeString()]})]})]}),c.jsxs("button",{onClick:()=>{r(!0),g()},disabled:i,className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[c.jsx("svg",{className:`w-4 h-4 mr-2 ${i?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),i?"Refreshing...":"Refresh Now"]})]})}),c.jsx("div",{className:"bg-gray-50 rounded-lg p-6 mt-8",children:c.jsxs("div",{className:"text-center",children:[c.jsx("h4",{className:"text-sm font-semibold text-gray-900 mb-2",children:"Service Information"}),c.jsxs("p",{className:"text-xs text-gray-600",children:["This page monitors the health and availability of the AxioDB server. If you notice any issues, please visit the"," ",c.jsx("a",{href:"/support",className:"text-blue-600 hover:text-blue-800",children:"support page"})," ","for assistance."]})]})})]})})},tf=S.createContext({});function nf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const af=typeof window!="undefined",hx=af?S.useLayoutEffect:S.useEffect,wo=S.createContext(null);function sf(n,a){n.indexOf(a)===-1&&n.push(a)}function lf(n,a){const i=n.indexOf(a);i>-1&&n.splice(i,1)}const Yn=(n,a,i)=>i>a?a:i<n?n:i;let rf=()=>{};const Gn={},mx=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function px(n){return typeof n=="object"&&n!==null}const gx=n=>/^0[^.\s]+$/u.test(n);function of(n){let a;return()=>(a===void 0&&(a=n()),a)}const tn=n=>n,rN=(n,a)=>i=>a(n(i)),Tl=(...n)=>n.reduce(rN),hl=(n,a,i)=>{const r=a-n;return r===0?1:(i-n)/r};class uf{constructor(){this.subscriptions=[]}add(a){return sf(this.subscriptions,a),()=>lf(this.subscriptions,a)}notify(a,i,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](a,i,r);else for(let f=0;f<o;f++){const d=this.subscriptions[f];d&&d(a,i,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const bn=n=>n*1e3,wn=n=>n/1e3;function yx(n,a){return a?n*(1e3/a):0}const xx=(n,a,i)=>(((1-3*i+3*a)*n+(3*i-6*a))*n+3*a)*n,oN=1e-7,uN=12;function cN(n,a,i,r,o){let f,d,p=0;do d=a+(i-a)/2,f=xx(d,r,o)-n,f>0?i=d:a=d;while(Math.abs(f)>oN&&++p<uN);return d}function El(n,a,i,r){if(n===a&&i===r)return tn;const o=f=>cN(f,0,1,n,i);return f=>f===0||f===1?f:xx(o(f),a,r)}const vx=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,bx=n=>a=>1-n(1-a),wx=El(.33,1.53,.69,.99),cf=bx(wx),Sx=vx(cf),jx=n=>(n*=2)<1?.5*cf(n):.5*(2-Math.pow(2,-10*(n-1))),df=n=>1-Math.sin(Math.acos(n)),Nx=bx(df),Tx=vx(df),dN=El(.42,0,1,1),fN=El(0,0,.58,1),Ex=El(.42,0,.58,1),hN=n=>Array.isArray(n)&&typeof n[0]!="number",Ax=n=>Array.isArray(n)&&typeof n[0]=="number",mN={linear:tn,easeIn:dN,easeInOut:Ex,easeOut:fN,circIn:df,circInOut:Tx,circOut:Nx,backIn:cf,backInOut:Sx,backOut:wx,anticipate:jx},pN=n=>typeof n=="string",cg=n=>{if(Ax(n)){rf(n.length===4);const[a,i,r,o]=n;return El(a,i,r,o)}else if(pN(n))return mN[n];return n},Fr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function gN(n,a){let i=new Set,r=new Set,o=!1,f=!1;const d=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function g(y){d.has(y)&&(m.schedule(y),n()),y(p)}const m={schedule:(y,v=!1,b=!1)=>{const N=b&&o?i:r;return v&&d.add(y),N.has(y)||N.add(y),y},cancel:y=>{r.delete(y),d.delete(y)},process:y=>{if(p=y,o){f=!0;return}o=!0,[i,r]=[r,i],i.forEach(g),i.clear(),o=!1,f&&(f=!1,m.process(y))}};return m}const yN=40;function Cx(n,a){let i=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},f=()=>i=!0,d=Fr.reduce((M,H)=>(M[H]=gN(f),M),{}),{setup:p,read:g,resolveKeyframes:m,preUpdate:y,update:v,preRender:b,render:j,postRender:N}=d,E=()=>{const M=Gn.useManualTiming?o.timestamp:performance.now();i=!1,Gn.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(M-o.timestamp,yN),1)),o.timestamp=M,o.isProcessing=!0,p.process(o),g.process(o),m.process(o),y.process(o),v.process(o),b.process(o),j.process(o),N.process(o),o.isProcessing=!1,i&&a&&(r=!1,n(E))},T=()=>{i=!0,r=!0,o.isProcessing||n(E)};return{schedule:Fr.reduce((M,H)=>{const L=d[H];return M[H]=($,G=!1,Z=!1)=>(i||T(),L.schedule($,G,Z)),M},{}),cancel:M=>{for(let H=0;H<Fr.length;H++)d[Fr[H]].cancel(M)},state:o,steps:d}}const{schedule:He,cancel:ya,state:ft,steps:Ic}=Cx(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:tn,!0);let to;function xN(){to=void 0}const Ct={now:()=>(to===void 0&&Ct.set(ft.isProcessing||Gn.useManualTiming?ft.timestamp:performance.now()),to),set:n=>{to=n,queueMicrotask(xN)}},Rx=n=>a=>typeof a=="string"&&a.startsWith(n),ff=Rx("--"),vN=Rx("var(--"),hf=n=>vN(n)?bN.test(n.split("/*")[0].trim()):!1,bN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ws={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},ml=oe(K({},Ws),{transform:n=>Yn(0,1,n)}),Kr=oe(K({},Ws),{default:1}),rl=n=>Math.round(n*1e5)/1e5,mf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wN(n){return n==null}const SN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pf=(n,a)=>i=>!!(typeof i=="string"&&SN.test(i)&&i.startsWith(n)||a&&!wN(i)&&Object.prototype.hasOwnProperty.call(i,a)),Dx=(n,a,i)=>r=>{if(typeof r!="string")return r;const[o,f,d,p]=r.match(mf);return{[n]:parseFloat(o),[a]:parseFloat(f),[i]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},jN=n=>Yn(0,255,n),ed=oe(K({},Ws),{transform:n=>Math.round(jN(n))}),qa={test:pf("rgb","red"),parse:Dx("red","green","blue"),transform:({red:n,green:a,blue:i,alpha:r=1})=>"rgba("+ed.transform(n)+", "+ed.transform(a)+", "+ed.transform(i)+", "+rl(ml.transform(r))+")"};function NN(n){let a="",i="",r="",o="";return n.length>5?(a=n.substring(1,3),i=n.substring(3,5),r=n.substring(5,7),o=n.substring(7,9)):(a=n.substring(1,2),i=n.substring(2,3),r=n.substring(3,4),o=n.substring(4,5),a+=a,i+=i,r+=r,o+=o),{red:parseInt(a,16),green:parseInt(i,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const jd={test:pf("#"),parse:NN,transform:qa.transform},Al=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),ga=Al("deg"),Sn=Al("%"),ce=Al("px"),TN=Al("vh"),EN=Al("vw"),dg=oe(K({},Sn),{parse:n=>Sn.parse(n)/100,transform:n=>Sn.transform(n*100)}),_s={test:pf("hsl","hue"),parse:Dx("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:i,alpha:r=1})=>"hsla("+Math.round(n)+", "+Sn.transform(rl(a))+", "+Sn.transform(rl(i))+", "+rl(ml.transform(r))+")"},tt={test:n=>qa.test(n)||jd.test(n)||_s.test(n),parse:n=>qa.test(n)?qa.parse(n):_s.test(n)?_s.parse(n):jd.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?qa.transform(n):_s.transform(n),getAnimatableNone:n=>{const a=tt.parse(n);return a.alpha=0,tt.transform(a)}},AN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function CN(n){var a,i;return isNaN(n)&&typeof n=="string"&&(((a=n.match(mf))==null?void 0:a.length)||0)+(((i=n.match(AN))==null?void 0:i.length)||0)>0}const Mx="number",Ox="color",RN="var",DN="var(",fg="${}",MN=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pl(n){const a=n.toString(),i=[],r={color:[],number:[],var:[]},o=[];let f=0;const p=a.replace(MN,g=>(tt.test(g)?(r.color.push(f),o.push(Ox),i.push(tt.parse(g))):g.startsWith(DN)?(r.var.push(f),o.push(RN),i.push(g)):(r.number.push(f),o.push(Mx),i.push(parseFloat(g))),++f,fg)).split(fg);return{values:i,split:p,indexes:r,types:o}}function Lx(n){return pl(n).values}function Ux(n){const{split:a,types:i}=pl(n),r=a.length;return o=>{let f="";for(let d=0;d<r;d++)if(f+=a[d],o[d]!==void 0){const p=i[d];p===Mx?f+=rl(o[d]):p===Ox?f+=tt.transform(o[d]):f+=o[d]}return f}}const ON=n=>typeof n=="number"?0:tt.test(n)?tt.getAnimatableNone(n):n;function LN(n){const a=Lx(n);return Ux(n)(a.map(ON))}const xa={test:CN,parse:Lx,createTransformer:Ux,getAnimatableNone:LN};function td(n,a,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(a-n)*6*i:i<1/2?a:i<2/3?n+(a-n)*(2/3-i)*6:n}function UN({hue:n,saturation:a,lightness:i,alpha:r}){n/=360,a/=100,i/=100;let o=0,f=0,d=0;if(!a)o=f=d=i;else{const p=i<.5?i*(1+a):i+a-i*a,g=2*i-p;o=td(g,p,n+1/3),f=td(g,p,n),d=td(g,p,n-1/3)}return{red:Math.round(o*255),green:Math.round(f*255),blue:Math.round(d*255),alpha:r}}function oo(n,a){return i=>i>0?a:n}const Xe=(n,a,i)=>n+(a-n)*i,nd=(n,a,i)=>{const r=n*n,o=i*(a*a-r)+r;return o<0?0:Math.sqrt(o)},zN=[jd,qa,_s],BN=n=>zN.find(a=>a.test(n));function hg(n){const a=BN(n);if(!a)return!1;let i=a.parse(n);return a===_s&&(i=UN(i)),i}const mg=(n,a)=>{const i=hg(n),r=hg(a);if(!i||!r)return oo(n,a);const o=K({},i);return f=>(o.red=nd(i.red,r.red,f),o.green=nd(i.green,r.green,f),o.blue=nd(i.blue,r.blue,f),o.alpha=Xe(i.alpha,r.alpha,f),qa.transform(o))},Nd=new Set(["none","hidden"]);function VN(n,a){return Nd.has(n)?i=>i<=0?n:a:i=>i>=1?a:n}function _N(n,a){return i=>Xe(n,a,i)}function gf(n){return typeof n=="number"?_N:typeof n=="string"?hf(n)?oo:tt.test(n)?mg:PN:Array.isArray(n)?zx:typeof n=="object"?tt.test(n)?mg:kN:oo}function zx(n,a){const i=[...n],r=i.length,o=n.map((f,d)=>gf(f)(f,a[d]));return f=>{for(let d=0;d<r;d++)i[d]=o[d](f);return i}}function kN(n,a){const i=K(K({},n),a),r={};for(const o in i)n[o]!==void 0&&a[o]!==void 0&&(r[o]=gf(n[o])(n[o],a[o]));return o=>{for(const f in r)i[f]=r[f](o);return i}}function HN(n,a){var o;const i=[],r={color:0,var:0,number:0};for(let f=0;f<a.values.length;f++){const d=a.types[f],p=n.indexes[d][r[d]],g=(o=n.values[p])!=null?o:0;i[f]=g,r[d]++}return i}const PN=(n,a)=>{const i=xa.createTransformer(a),r=pl(n),o=pl(a);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Nd.has(n)&&!o.values.length||Nd.has(a)&&!r.values.length?VN(n,a):Tl(zx(HN(r,o),o.values),i):oo(n,a)};function Bx(n,a,i){return typeof n=="number"&&typeof a=="number"&&typeof i=="number"?Xe(n,a,i):gf(n)(n,a)}const qN=n=>{const a=({timestamp:i})=>n(i);return{start:(i=!0)=>He.update(a,i),stop:()=>ya(a),now:()=>ft.isProcessing?ft.timestamp:Ct.now()}},Vx=(n,a,i=10)=>{let r="";const o=Math.max(Math.round(a/i),2);for(let f=0;f<o;f++)r+=Math.round(n(f/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},uo=2e4;function yf(n){let a=0;const i=50;let r=n.next(a);for(;!r.done&&a<uo;)a+=i,r=n.next(a);return a>=uo?1/0:a}function YN(n,a=100,i){const r=i(oe(K({},n),{keyframes:[0,a]})),o=Math.min(yf(r),uo);return{type:"keyframes",ease:f=>r.next(o*f).value/a,duration:wn(o)}}const GN=5;function _x(n,a,i){const r=Math.max(a-GN,0);return yx(i-n(r),a-r)}const $e={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ad=.001;function XN({duration:n=$e.duration,bounce:a=$e.bounce,velocity:i=$e.velocity,mass:r=$e.mass}){let o,f,d=1-a;d=Yn($e.minDamping,$e.maxDamping,d),n=Yn($e.minDuration,$e.maxDuration,wn(n)),d<1?(o=m=>{const y=m*d,v=y*n,b=y-i,j=Td(m,d),N=Math.exp(-v);return ad-b/j*N},f=m=>{const v=m*d*n,b=v*i+i,j=Math.pow(d,2)*Math.pow(m,2)*n,N=Math.exp(-v),E=Td(Math.pow(m,2),d);return(-o(m)+ad>0?-1:1)*((b-j)*N)/E}):(o=m=>{const y=Math.exp(-m*n),v=(m-i)*n+1;return-ad+y*v},f=m=>{const y=Math.exp(-m*n),v=(i-m)*(n*n);return y*v});const p=5/n,g=KN(o,f,p);if(n=bn(n),isNaN(g))return{stiffness:$e.stiffness,damping:$e.damping,duration:n};{const m=Math.pow(g,2)*r;return{stiffness:m,damping:d*2*Math.sqrt(r*m),duration:n}}}const FN=12;function KN(n,a,i){let r=i;for(let o=1;o<FN;o++)r=r-n(r)/a(r);return r}function Td(n,a){return n*Math.sqrt(1-a*a)}const $N=["duration","bounce"],ZN=["stiffness","damping","mass"];function pg(n,a){return a.some(i=>n[i]!==void 0)}function QN(n){let a=K({velocity:$e.velocity,stiffness:$e.stiffness,damping:$e.damping,mass:$e.mass,isResolvedFromDuration:!1},n);if(!pg(n,ZN)&&pg(n,$N))if(n.visualDuration){const i=n.visualDuration,r=2*Math.PI/(i*1.2),o=r*r,f=2*Yn(.05,1,1-(n.bounce||0))*Math.sqrt(o);a=oe(K({},a),{mass:$e.mass,stiffness:o,damping:f})}else{const i=XN(n);a=oe(K(K({},a),i),{mass:$e.mass}),a.isResolvedFromDuration=!0}return a}function co(n=$e.visualDuration,a=$e.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:r,restDelta:o}=i;const f=i.keyframes[0],d=i.keyframes[i.keyframes.length-1],p={done:!1,value:f},{stiffness:g,damping:m,mass:y,duration:v,velocity:b,isResolvedFromDuration:j}=QN(oe(K({},i),{velocity:-wn(i.velocity||0)})),N=b||0,E=m/(2*Math.sqrt(g*y)),T=d-f,D=wn(Math.sqrt(g/y)),U=Math.abs(T)<5;r||(r=U?$e.restSpeed.granular:$e.restSpeed.default),o||(o=U?$e.restDelta.granular:$e.restDelta.default);let M;if(E<1){const L=Td(D,E);M=$=>{const G=Math.exp(-E*D*$);return d-G*((N+E*D*T)/L*Math.sin(L*$)+T*Math.cos(L*$))}}else if(E===1)M=L=>d-Math.exp(-D*L)*(T+(N+D*T)*L);else{const L=D*Math.sqrt(E*E-1);M=$=>{const G=Math.exp(-E*D*$),Z=Math.min(L*$,300);return d-G*((N+E*D*T)*Math.sinh(Z)+L*T*Math.cosh(Z))/L}}const H={calculatedDuration:j&&v||null,next:L=>{const $=M(L);if(j)p.done=L>=v;else{let G=L===0?N:0;E<1&&(G=L===0?bn(N):_x(M,L,$));const Z=Math.abs(G)<=r,se=Math.abs(d-$)<=o;p.done=Z&&se}return p.value=p.done?d:$,p},toString:()=>{const L=Math.min(yf(H),uo),$=Vx(G=>H.next(L*G).value,L,30);return L+"ms "+$},toTransition:()=>{}};return H}co.applyToOptions=n=>{const a=YN(n,100,co);return n.ease=a.ease,n.duration=bn(a.duration),n.type="keyframes",n};function Ed({keyframes:n,velocity:a=0,power:i=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:f=500,modifyTarget:d,min:p,max:g,restDelta:m=.5,restSpeed:y}){const v=n[0],b={done:!1,value:v},j=Z=>p!==void 0&&Z<p||g!==void 0&&Z>g,N=Z=>p===void 0?g:g===void 0||Math.abs(p-Z)<Math.abs(g-Z)?p:g;let E=i*a;const T=v+E,D=d===void 0?T:d(T);D!==T&&(E=D-v);const U=Z=>-E*Math.exp(-Z/r),M=Z=>D+U(Z),H=Z=>{const se=U(Z),he=M(Z);b.done=Math.abs(se)<=m,b.value=b.done?D:he};let L,$;const G=Z=>{j(b.value)&&(L=Z,$=co({keyframes:[b.value,N(b.value)],velocity:_x(M,Z,b.value),damping:o,stiffness:f,restDelta:m,restSpeed:y}))};return G(0),{calculatedDuration:null,next:Z=>{let se=!1;return!$&&L===void 0&&(se=!0,H(Z),G(Z)),L!==void 0&&Z>=L?$.next(Z-L):(!se&&H(Z),b)}}}function JN(n,a,i){const r=[],o=i||Gn.mix||Bx,f=n.length-1;for(let d=0;d<f;d++){let p=o(n[d],n[d+1]);if(a){const g=Array.isArray(a)?a[d]||tn:a;p=Tl(g,p)}r.push(p)}return r}function WN(n,a,{clamp:i=!0,ease:r,mixer:o}={}){const f=n.length;if(rf(f===a.length),f===1)return()=>a[0];if(f===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[f-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=JN(a,r,o),g=p.length,m=y=>{if(d&&y<n[0])return a[0];let v=0;if(g>1)for(;v<n.length-2&&!(y<n[v+1]);v++);const b=hl(n[v],n[v+1],y);return p[v](b)};return i?y=>m(Yn(n[0],n[f-1],y)):m}function IN(n,a){const i=n[n.length-1];for(let r=1;r<=a;r++){const o=hl(0,a,r);n.push(Xe(i,1,o))}}function e4(n){const a=[0];return IN(a,n.length-1),a}function t4(n,a){return n.map(i=>i*a)}function n4(n,a){return n.map(()=>a||Ex).splice(0,n.length-1)}function ol({duration:n=300,keyframes:a,times:i,ease:r="easeInOut"}){const o=hN(r)?r.map(cg):cg(r),f={done:!1,value:a[0]},d=t4(i&&i.length===a.length?i:e4(a),n),p=WN(d,a,{ease:Array.isArray(o)?o:n4(a,o)});return{calculatedDuration:n,next:g=>(f.value=p(g),f.done=g>=n,f)}}const a4=n=>n!==null;function xf(n,{repeat:a,repeatType:i="loop"},r,o=1){const f=n.filter(a4),p=o<0||a&&i!=="loop"&&a%2===1?0:f.length-1;return!p||r===void 0?f[p]:r}const s4={decay:Ed,inertia:Ed,tween:ol,keyframes:ol,spring:co};function kx(n){typeof n.type=="string"&&(n.type=s4[n.type])}class vf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(a=>{this.resolve=a})}notifyFinished(){this.resolve()}then(a,i){return this.finished.then(a,i)}}const i4=n=>n/100;class bf extends vf{constructor(a){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:i}=this.options;i&&i.updatedAt!==Ct.now()&&this.tick(Ct.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=a,this.initAnimation(),this.play(),a.autoplay===!1&&this.pause()}initAnimation(){const{options:a}=this;kx(a);const{type:i=ol,repeat:r=0,repeatDelay:o=0,repeatType:f,velocity:d=0}=a;let{keyframes:p}=a;const g=i||ol;g!==ol&&typeof p[0]!="number"&&(this.mixKeyframes=Tl(i4,Bx(p[0],p[1])),p=[0,100]);const m=g(oe(K({},a),{keyframes:p}));f==="mirror"&&(this.mirroredGenerator=g(oe(K({},a),{keyframes:[...p].reverse(),velocity:-d}))),m.calculatedDuration===null&&(m.calculatedDuration=yf(m));const{calculatedDuration:y}=m;this.calculatedDuration=y,this.resolvedDuration=y+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=m}updateTime(a){const i=Math.round(a-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=i}tick(a,i=!1){const{generator:r,totalDuration:o,mixKeyframes:f,mirroredGenerator:d,resolvedDuration:p,calculatedDuration:g}=this;if(this.startTime===null)return r.next(0);const{delay:m=0,keyframes:y,repeat:v,repeatType:b,repeatDelay:j,type:N,onUpdate:E,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-o/this.speed,this.startTime)),i?this.currentTime=a:this.updateTime(a);const D=this.currentTime-m*(this.playbackSpeed>=0?1:-1),U=this.playbackSpeed>=0?D<0:D>o;this.currentTime=Math.max(D,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let M=this.currentTime,H=r;if(v){const Z=Math.min(this.currentTime,o)/p;let se=Math.floor(Z),he=Z%1;!he&&Z>=1&&(he=1),he===1&&se--,se=Math.min(se,v+1),!!(se%2)&&(b==="reverse"?(he=1-he,j&&(he-=j/p)):b==="mirror"&&(H=d)),M=Yn(0,1,he)*p}const L=U?{done:!1,value:y[0]}:H.next(M);f&&(L.value=f(L.value));let{done:$}=L;!U&&g!==null&&($=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const G=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&$);return G&&N!==Ed&&(L.value=xf(y,this.options,T,this.speed)),E&&E(L.value),G&&this.finish(),L}then(a,i){return this.finished.then(a,i)}get duration(){return wn(this.calculatedDuration)}get time(){return wn(this.currentTime)}set time(a){var i;a=bn(a),this.currentTime=a,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.playbackSpeed),(i=this.driver)==null||i.start(!1)}get speed(){return this.playbackSpeed}set speed(a){this.updateTime(Ct.now());const i=this.playbackSpeed!==a;this.playbackSpeed=a,i&&(this.time=wn(this.currentTime))}play(){var o,f;if(this.isStopped)return;const{driver:a=qN,startTime:i}=this.options;this.driver||(this.driver=a(d=>this.tick(d))),(f=(o=this.options).onPlay)==null||f.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=i!=null?i:r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ct.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var a,i;this.notifyFinished(),this.teardown(),this.state="finished",(i=(a=this.options).onComplete)==null||i.call(a)}cancel(){var a,i;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(i=(a=this.options).onCancel)==null||i.call(a)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}attachTimeline(a){var i;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(i=this.driver)==null||i.stop(),a.observe(this)}}function l4(n){var a;for(let i=1;i<n.length;i++)(a=n[i])!=null||(n[i]=n[i-1])}const Ya=n=>n*180/Math.PI,Ad=n=>{const a=Ya(Math.atan2(n[1],n[0]));return Cd(a)},r4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:Ad,rotateZ:Ad,skewX:n=>Ya(Math.atan(n[1])),skewY:n=>Ya(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},Cd=n=>(n=n%360,n<0&&(n+=360),n),gg=Ad,yg=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),xg=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),o4={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yg,scaleY:xg,scale:n=>(yg(n)+xg(n))/2,rotateX:n=>Cd(Ya(Math.atan2(n[6],n[5]))),rotateY:n=>Cd(Ya(Math.atan2(-n[2],n[0]))),rotateZ:gg,rotate:gg,skewX:n=>Ya(Math.atan(n[4])),skewY:n=>Ya(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function Rd(n){return n.includes("scale")?1:0}function Dd(n,a){if(!n||n==="none")return Rd(a);const i=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(i)r=o4,o=i;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=r4,o=p}if(!o)return Rd(a);const f=r[a],d=o[1].split(",").map(c4);return typeof f=="function"?f(d):d[f]}const u4=(n,a)=>{const{transform:i="none"}=getComputedStyle(n);return Dd(i,a)};function c4(n){return parseFloat(n.trim())}const Is=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ei=new Set(Is),vg=n=>n===Ws||n===ce,d4=new Set(["x","y","z"]),f4=Is.filter(n=>!d4.has(n));function h4(n){const a=[];return f4.forEach(i=>{const r=n.getValue(i);r!==void 0&&(a.push([i,r.get()]),r.set(i.startsWith("scale")?1:0))}),a}const Xa={width:({x:n},{paddingLeft:a="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),height:({y:n},{paddingTop:a="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:(n,{transform:a})=>Dd(a,"x"),y:(n,{transform:a})=>Dd(a,"y")};Xa.translateX=Xa.x;Xa.translateY=Xa.y;const Fa=new Set;let Md=!1,Od=!1,Ld=!1;function Hx(){if(Od){const n=Array.from(Fa).filter(r=>r.needsMeasurement),a=new Set(n.map(r=>r.element)),i=new Map;a.forEach(r=>{const o=h4(r);o.length&&(i.set(r,o),r.render())}),n.forEach(r=>r.measureInitialState()),a.forEach(r=>{r.render();const o=i.get(r);o&&o.forEach(([f,d])=>{var p;(p=r.getValue(f))==null||p.set(d)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Od=!1,Md=!1,Fa.forEach(n=>n.complete(Ld)),Fa.clear()}function Px(){Fa.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(Od=!0)})}function m4(){Ld=!0,Px(),Hx(),Ld=!1}class wf{constructor(a,i,r,o,f,d=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...a],this.onComplete=i,this.name=r,this.motionValue=o,this.element=f,this.isAsync=d}scheduleResolve(){this.state="scheduled",this.isAsync?(Fa.add(this),Md||(Md=!0,He.read(Px),He.resolveKeyframes(Hx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:i,element:r,motionValue:o}=this;if(a[0]===null){const f=o==null?void 0:o.get(),d=a[a.length-1];if(f!==void 0)a[0]=f;else if(r&&i){const p=r.readValue(i,d);p!=null&&(a[0]=p)}a[0]===void 0&&(a[0]=d),o&&f===void 0&&o.set(a[0])}l4(a)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(a=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,a),Fa.delete(this)}cancel(){this.state==="scheduled"&&(Fa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const p4=n=>n.startsWith("--");function g4(n,a,i){p4(a)?n.style.setProperty(a,i):n.style[a]=i}const y4=of(()=>window.ScrollTimeline!==void 0),x4={};function v4(n,a){const i=of(n);return()=>{var r;return(r=x4[a])!=null?r:i()}}const qx=v4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(n){return!1}return!0},"linearEasing"),ll=([n,a,i,r])=>`cubic-bezier(${n}, ${a}, ${i}, ${r})`,bg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ll([0,.65,.55,1]),circOut:ll([.55,0,1,.45]),backIn:ll([.31,.01,.66,-.59]),backOut:ll([.33,1.53,.69,.99])};function Yx(n,a){if(n)return typeof n=="function"?qx()?Vx(n,a):"ease-out":Ax(n)?ll(n):Array.isArray(n)?n.map(i=>Yx(i,a)||bg.easeOut):bg[n]}function b4(n,a,i,{delay:r=0,duration:o=300,repeat:f=0,repeatType:d="loop",ease:p="easeOut",times:g}={},m=void 0){const y={[a]:i};g&&(y.offset=g);const v=Yx(p,o);Array.isArray(v)&&(y.easing=v);const b={delay:r,duration:o,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:f+1,direction:d==="reverse"?"alternate":"normal"};return m&&(b.pseudoElement=m),n.animate(y,b)}function Gx(n){return typeof n=="function"&&"applyToOptions"in n}function w4(i){var r=i,{type:n}=r,a=ot(r,["type"]);var o,f;return Gx(n)&&qx()?n.applyToOptions(a):((o=a.duration)!=null||(a.duration=300),(f=a.ease)!=null||(a.ease="easeOut"),a)}class S4 extends vf{constructor(a){if(super(),this.finishedTime=null,this.isStopped=!1,!a)return;const{element:i,name:r,keyframes:o,pseudoElement:f,allowFlatten:d=!1,finalKeyframe:p,onComplete:g}=a;this.isPseudoElement=!!f,this.allowFlatten=d,this.options=a,rf(typeof a.type!="string");const m=w4(a);this.animation=b4(i,r,o,m,f),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!f){const y=xf(o,this.options,p,this.speed);this.updateMotionValue?this.updateMotionValue(y):g4(i,r,y),this.animation.cancel()}g==null||g(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var a,i;(i=(a=this.animation).finish)==null||i.call(a)}cancel(){try{this.animation.cancel()}catch(a){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:a}=this;a==="idle"||a==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var a,i;this.isPseudoElement||(i=(a=this.animation).commitStyles)==null||i.call(a)}get duration(){var i,r;const a=((r=(i=this.animation.effect)==null?void 0:i.getComputedTiming)==null?void 0:r.call(i).duration)||0;return wn(Number(a))}get time(){return wn(Number(this.animation.currentTime)||0)}set time(a){this.finishedTime=null,this.animation.currentTime=bn(a)}get speed(){return this.animation.playbackRate}set speed(a){a<0&&(this.finishedTime=null),this.animation.playbackRate=a}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(a){this.animation.startTime=a}attachTimeline({timeline:a,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,a&&y4()?(this.animation.timeline=a,tn):i(this)}}const Xx={anticipate:jx,backInOut:Sx,circInOut:Tx};function j4(n){return n in Xx}function N4(n){typeof n.ease=="string"&&j4(n.ease)&&(n.ease=Xx[n.ease])}const wg=10;class T4 extends S4{constructor(a){N4(a),kx(a),super(a),a.startTime&&(this.startTime=a.startTime),this.options=a}updateMotionValue(a){var y;const m=this.options,{motionValue:i,onUpdate:r,onComplete:o,element:f}=m,d=ot(m,["motionValue","onUpdate","onComplete","element"]);if(!i)return;if(a!==void 0){i.set(a);return}const p=new bf(oe(K({},d),{autoplay:!1})),g=bn((y=this.finishedTime)!=null?y:this.time);i.setWithVelocity(p.sample(g-wg).value,p.sample(g).value,wg),p.stop()}}const Sg=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(xa.test(n)||n==="0")&&!n.startsWith("url("));function E4(n){const a=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==a)return!0}function A4(n,a,i,r){const o=n[0];if(o===null)return!1;if(a==="display"||a==="visibility")return!0;const f=n[n.length-1],d=Sg(o,a),p=Sg(f,a);return!d||!p?!1:E4(n)||(i==="spring"||Gx(i))&&r}function Ud(n){n.duration=0,n.type}const C4=new Set(["opacity","clipPath","filter","transform"]),R4=of(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function D4(n){var y;const{motionValue:a,name:i,repeatDelay:r,repeatType:o,damping:f,type:d}=n;if(!(((y=a==null?void 0:a.owner)==null?void 0:y.current)instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:m}=a.owner.getProps();return R4()&&i&&C4.has(i)&&(i!=="transform"||!m)&&!g&&!r&&o!=="mirror"&&f!==0&&d!=="inertia"}const M4=40;class O4 extends vf{constructor(b){var j=b,{autoplay:a=!0,delay:i=0,type:r="keyframes",repeat:o=0,repeatDelay:f=0,repeatType:d="loop",keyframes:p,name:g,motionValue:m,element:y}=j,v=ot(j,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var T;super(),this.stop=()=>{var D,U;this._animation&&(this._animation.stop(),(D=this.stopTimeline)==null||D.call(this)),(U=this.keyframeResolver)==null||U.cancel()},this.createdAt=Ct.now();const N=K({autoplay:a,delay:i,type:r,repeat:o,repeatDelay:f,repeatType:d,name:g,motionValue:m,element:y},v),E=(y==null?void 0:y.KeyframeResolver)||wf;this.keyframeResolver=new E(p,(D,U,M)=>this.onKeyframesResolved(D,U,N,!M),g,m,y),(T=this.keyframeResolver)==null||T.scheduleResolve()}onKeyframesResolved(a,i,r,o){this.keyframeResolver=void 0;const{name:f,type:d,velocity:p,delay:g,isHandoff:m,onUpdate:y}=r;this.resolvedAt=Ct.now(),A4(a,f,d,p)||((Gn.instantAnimations||!g)&&(y==null||y(xf(a,r,i))),a[0]=a[a.length-1],Ud(r),r.repeat=0);const v=o?this.resolvedAt?this.resolvedAt-this.createdAt>M4?this.resolvedAt:this.createdAt:this.createdAt:void 0,b=oe(K({startTime:v,finalKeyframe:i},r),{keyframes:a}),j=!m&&D4(b)?new T4(oe(K({},b),{element:b.motionValue.owner.current})):new bf(b);j.finished.then(()=>this.notifyFinished()).catch(tn),this.pendingTimeline&&(this.stopTimeline=j.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=j}get finished(){return this._animation?this.animation.finished:this._finished}then(a,i){return this.finished.finally(a).then(()=>{})}get animation(){var a;return this._animation||((a=this.keyframeResolver)==null||a.resume(),m4()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(a){this.animation.time=a}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(a){this.animation.speed=a}get startTime(){return this.animation.startTime}attachTimeline(a){return this._animation?this.stopTimeline=this.animation.attachTimeline(a):this.pendingTimeline=a,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var a;this._animation&&this.animation.cancel(),(a=this.keyframeResolver)==null||a.cancel()}}const L4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function U4(n){const a=L4.exec(n);if(!a)return[,];const[,i,r,o]=a;return[`--${i!=null?i:r}`,o]}function Fx(n,a,i=1){const[r,o]=U4(n);if(!r)return;const f=window.getComputedStyle(a).getPropertyValue(r);if(f){const d=f.trim();return mx(d)?parseFloat(d):d}return hf(o)?Fx(o,a,i+1):o}function Sf(n,a){var i,r;return(r=(i=n==null?void 0:n[a])!=null?i:n==null?void 0:n.default)!=null?r:n}const Kx=new Set(["width","height","top","left","right","bottom",...Is]),z4={test:n=>n==="auto",parse:n=>n},$x=n=>a=>a.test(n),Zx=[Ws,ce,Sn,ga,EN,TN,z4],jg=n=>Zx.find($x(n));function B4(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||gx(n):!0}const V4=new Set(["brightness","contrast","saturate","opacity"]);function _4(n){const[a,i]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[r]=i.match(mf)||[];if(!r)return n;const o=i.replace(r,"");let f=V4.has(a)?1:0;return r!==i&&(f*=100),a+"("+f+o+")"}const k4=/\b([a-z-]*)\(.*?\)/gu,zd=oe(K({},xa),{getAnimatableNone:n=>{const a=n.match(k4);return a?a.map(_4).join(" "):n}}),Ng=oe(K({},Ws),{transform:Math.round}),H4={rotate:ga,rotateX:ga,rotateY:ga,rotateZ:ga,scale:Kr,scaleX:Kr,scaleY:Kr,scaleZ:Kr,skew:ga,skewX:ga,skewY:ga,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:ml,originX:dg,originY:dg,originZ:ce},jf=oe(K({borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,backgroundPositionX:ce,backgroundPositionY:ce},H4),{zIndex:Ng,fillOpacity:ml,strokeOpacity:ml,numOctaves:Ng}),P4=oe(K({},jf),{color:tt,backgroundColor:tt,outlineColor:tt,fill:tt,stroke:tt,borderColor:tt,borderTopColor:tt,borderRightColor:tt,borderBottomColor:tt,borderLeftColor:tt,filter:zd,WebkitFilter:zd}),Qx=n=>P4[n];function Jx(n,a){let i=Qx(n);return i!==zd&&(i=xa),i.getAnimatableNone?i.getAnimatableNone(a):void 0}const q4=new Set(["auto","none","0"]);function Y4(n,a,i){let r=0,o;for(;r<n.length&&!o;){const f=n[r];typeof f=="string"&&!q4.has(f)&&pl(f).values.length&&(o=n[r]),r++}if(o&&i)for(const f of a)n[f]=Jx(i,o)}class G4 extends wf{constructor(a,i,r,o,f){super(a,i,r,o,f,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:i,name:r}=this;if(!i||!i.current)return;super.readKeyframes();for(let g=0;g<a.length;g++){let m=a[g];if(typeof m=="string"&&(m=m.trim(),hf(m))){const y=Fx(m,i.current);y!==void 0&&(a[g]=y),g===a.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!Kx.has(r)||a.length!==2)return;const[o,f]=a,d=jg(o),p=jg(f);if(d!==p)if(vg(d)&&vg(p))for(let g=0;g<a.length;g++){const m=a[g];typeof m=="string"&&(a[g]=parseFloat(m))}else Xa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:i}=this,r=[];for(let o=0;o<a.length;o++)(a[o]===null||B4(a[o]))&&r.push(o);r.length&&Y4(a,r,i)}measureInitialState(){const{element:a,unresolvedKeyframes:i,name:r}=this;if(!a||!a.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Xa[r](a.measureViewportBox(),window.getComputedStyle(a.current)),i[0]=this.measuredOrigin;const o=i[i.length-1];o!==void 0&&a.getValue(r,o).jump(o,!1)}measureEndState(){var p;const{element:a,name:i,unresolvedKeyframes:r}=this;if(!a||!a.current)return;const o=a.getValue(i);o&&o.jump(this.measuredOrigin,!1);const f=r.length-1,d=r[f];r[f]=Xa[i](a.measureViewportBox(),window.getComputedStyle(a.current)),d!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=d),(p=this.removedTransforms)!=null&&p.length&&this.removedTransforms.forEach(([g,m])=>{a.getValue(g).set(m)}),this.resolveNoneKeyframes()}}function X4(n,a,i){var r;if(n instanceof EventTarget)return[n];if(typeof n=="string"){let o=document;const f=(r=i==null?void 0:i[n])!=null?r:o.querySelectorAll(n);return f?Array.from(f):[]}return Array.from(n)}const Wx=(n,a)=>a&&typeof n=="number"?a.transform(n):n;function Ix(n){return px(n)&&"offsetHeight"in n}const Tg=30,F4=n=>!isNaN(parseFloat(n));class K4{constructor(a,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var f;const o=Ct.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((f=this.events.change)==null||f.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty()},this.hasAnimated=!1,this.setCurrent(a),this.owner=i.owner}setCurrent(a){this.current=a,this.updatedAt=Ct.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=F4(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,i){this.events[a]||(this.events[a]=new uf);const r=this.events[a].add(i);return a==="change"?()=>{r(),He.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,i){this.passiveEffect=a,this.stopPassiveEffect=i}set(a){this.passiveEffect?this.passiveEffect(a,this.updateAndNotify):this.updateAndNotify(a)}setWithVelocity(a,i,r){this.set(i),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-r}jump(a,i=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var a;(a=this.events.change)==null||a.notify(this.current)}addDependent(a){this.dependents||(this.dependents=new Set),this.dependents.add(a)}removeDependent(a){this.dependents&&this.dependents.delete(a)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=Ct.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Tg)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Tg);return yx(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(a){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=a(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var a,i;(a=this.dependents)==null||a.clear(),(i=this.events.destroy)==null||i.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xs(n,a){return new K4(n,a)}const{schedule:Nf}=Cx(queueMicrotask,!1),cn={x:!1,y:!1};function ev(){return cn.x||cn.y}function $4(n){return n==="x"||n==="y"?cn[n]?null:(cn[n]=!0,()=>{cn[n]=!1}):cn.x||cn.y?null:(cn.x=cn.y=!0,()=>{cn.x=cn.y=!1})}function tv(n,a){const i=X4(n),r=new AbortController,o=oe(K({passive:!0},a),{signal:r.signal});return[i,o,()=>r.abort()]}function Eg(n){return!(n.pointerType==="touch"||ev())}function Z4(n,a,i={}){const[r,o,f]=tv(n,i),d=p=>{if(!Eg(p))return;const{target:g}=p,m=a(g,p);if(typeof m!="function"||!g)return;const y=v=>{Eg(v)&&(m(v),g.removeEventListener("pointerleave",y))};g.addEventListener("pointerleave",y,o)};return r.forEach(p=>{p.addEventListener("pointerenter",d,o)}),f}const nv=(n,a)=>a?n===a?!0:nv(n,a.parentElement):!1,Tf=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,Q4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function J4(n){return Q4.has(n.tagName)||n.tabIndex!==-1}const no=new WeakSet;function Ag(n){return a=>{a.key==="Enter"&&n(a)}}function sd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const W4=(n,a)=>{const i=n.currentTarget;if(!i)return;const r=Ag(()=>{if(no.has(i))return;sd(i,"down");const o=Ag(()=>{sd(i,"up")}),f=()=>sd(i,"cancel");i.addEventListener("keyup",o,a),i.addEventListener("blur",f,a)});i.addEventListener("keydown",r,a),i.addEventListener("blur",()=>i.removeEventListener("keydown",r),a)};function Cg(n){return Tf(n)&&!ev()}function I4(n,a,i={}){const[r,o,f]=tv(n,i),d=p=>{const g=p.currentTarget;if(!Cg(p))return;no.add(g);const m=a(g,p),y=(j,N)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",b),no.has(g)&&no.delete(g),Cg(j)&&typeof m=="function"&&m(j,{success:N})},v=j=>{y(j,g===window||g===document||i.useGlobalTarget||nv(g,j.target))},b=j=>{y(j,!1)};window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",b,o)};return r.forEach(p=>{(i.useGlobalTarget?window:p).addEventListener("pointerdown",d,o),Ix(p)&&(p.addEventListener("focus",m=>W4(m,o)),!J4(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),f}function av(n){return px(n)&&"ownerSVGElement"in n}function eT(n){return av(n)&&n.tagName==="svg"}const yt=n=>!!(n&&n.getVelocity),tT=[...Zx,tt,xa],nT=n=>tT.find($x(n)),Ef=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class aT extends S.Component{getSnapshotBeforeUpdate(a){const i=this.props.childRef.current;if(i&&a.isPresent&&!this.props.isPresent){const r=i.offsetParent,o=Ix(r)&&r.offsetWidth||0,f=this.props.sizeRef.current;f.height=i.offsetHeight||0,f.width=i.offsetWidth||0,f.top=i.offsetTop,f.left=i.offsetLeft,f.right=o-f.width-f.left}return null}componentDidUpdate(){}render(){return this.props.children}}function sT({children:n,isPresent:a,anchorX:i,root:r}){const o=S.useId(),f=S.useRef(null),d=S.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:p}=S.useContext(Ef);return S.useInsertionEffect(()=>{const{width:g,height:m,top:y,left:v,right:b}=d.current;if(a||!f.current||!g||!m)return;const j=i==="left"?`left: ${v}`:`right: ${b}`;f.current.dataset.motionPopId=o;const N=document.createElement("style");p&&(N.nonce=p);const E=r!=null?r:document.head;return E.appendChild(N),N.sheet&&N.sheet.insertRule(`
|
|
68
|
+
[data-motion-pop-id="${o}"] {
|
|
69
|
+
position: absolute !important;
|
|
70
|
+
width: ${g}px !important;
|
|
71
|
+
height: ${m}px !important;
|
|
72
|
+
${j}px !important;
|
|
73
|
+
top: ${y}px !important;
|
|
74
|
+
}
|
|
75
|
+
`),()=>{E.contains(N)&&E.removeChild(N)}},[a]),c.jsx(aT,{isPresent:a,childRef:f,sizeRef:d,children:S.cloneElement(n,{ref:f})})}const iT=({children:n,initial:a,isPresent:i,onExitComplete:r,custom:o,presenceAffectsLayout:f,mode:d,anchorX:p,root:g})=>{const m=nf(lT),y=S.useId();let v=!0,b=S.useMemo(()=>(v=!1,{id:y,initial:a,isPresent:i,custom:o,onExitComplete:j=>{m.set(j,!0);for(const N of m.values())if(!N)return;r&&r()},register:j=>(m.set(j,!1),()=>m.delete(j))}),[i,m,r]);return f&&v&&(b=K({},b)),S.useMemo(()=>{m.forEach((j,N)=>m.set(N,!1))},[i]),S.useEffect(()=>{!i&&!m.size&&r&&r()},[i]),d==="popLayout"&&(n=c.jsx(sT,{isPresent:i,anchorX:p,root:g,children:n})),c.jsx(wo.Provider,{value:b,children:n})};function lT(){return new Map}function sv(n=!0){const a=S.useContext(wo);if(a===null)return[!0,null];const{isPresent:i,onExitComplete:r,register:o}=a,f=S.useId();S.useEffect(()=>{if(n)return o(f)},[n]);const d=S.useCallback(()=>n&&r&&r(f),[f,r,n]);return!i&&r?[!1,d]:[!0]}const $r=n=>n.key||"";function Rg(n){const a=[];return S.Children.forEach(n,i=>{S.isValidElement(i)&&a.push(i)}),a}const id=({children:n,custom:a,initial:i=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:f="sync",propagate:d=!1,anchorX:p="left",root:g})=>{const[m,y]=sv(d),v=S.useMemo(()=>Rg(n),[n]),b=d&&!m?[]:v.map($r),j=S.useRef(!0),N=S.useRef(v),E=nf(()=>new Map),[T,D]=S.useState(v),[U,M]=S.useState(v);hx(()=>{j.current=!1,N.current=v;for(let $=0;$<U.length;$++){const G=$r(U[$]);b.includes(G)?E.delete(G):E.get(G)!==!0&&E.set(G,!1)}},[U,b.length,b.join("-")]);const H=[];if(v!==T){let $=[...v];for(let G=0;G<U.length;G++){const Z=U[G],se=$r(Z);b.includes(se)||($.splice(G,0,Z),H.push(Z))}return f==="wait"&&H.length&&($=H),M(Rg($)),D(v),null}const{forceRender:L}=S.useContext(tf);return c.jsx(c.Fragment,{children:U.map($=>{const G=$r($),Z=d&&!m?!1:v===U||b.includes(G),se=()=>{if(E.has(G))E.set(G,!0);else return;let he=!0;E.forEach(me=>{me||(he=!1)}),he&&(L==null||L(),M(N.current),d&&(y==null||y()),r&&r())};return c.jsx(iT,{isPresent:Z,initial:!j.current||i?void 0:!1,custom:a,presenceAffectsLayout:o,mode:f,root:g,onExitComplete:Z?void 0:se,anchorX:p,children:$},G)})})},iv=S.createContext({strict:!1}),Dg={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Fs={};for(const n in Dg)Fs[n]={isEnabled:a=>Dg[n].some(i=>!!a[i])};function rT(n){for(const a in n)Fs[a]=K(K({},Fs[a]),n[a])}const oT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function fo(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||oT.has(n)}let lv=n=>!fo(n);function uT(n){typeof n=="function"&&(lv=a=>a.startsWith("on")?!fo(a):n(a))}try{uT(require("@emotion/is-prop-valid").default)}catch(n){}function cT(n,a,i){const r={};for(const o in n)o==="values"&&typeof n.values=="object"||(lv(o)||i===!0&&fo(o)||!a&&!fo(o)||n.draggable&&o.startsWith("onDrag"))&&(r[o]=n[o]);return r}const So=S.createContext({});function jo(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function gl(n){return typeof n=="string"||Array.isArray(n)}const Af=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cf=["initial",...Af];function No(n){return jo(n.animate)||Cf.some(a=>gl(n[a]))}function rv(n){return!!(No(n)||n.variants)}function dT(n,a){if(No(n)){const{initial:i,animate:r}=n;return{initial:i===!1||gl(i)?i:void 0,animate:gl(r)?r:void 0}}return n.inherit!==!1?a:{}}function fT(n){const{initial:a,animate:i}=dT(n,S.useContext(So));return S.useMemo(()=>({initial:a,animate:i}),[Mg(a),Mg(i)])}function Mg(n){return Array.isArray(n)?n.join(" "):n}const yl={};function hT(n){for(const a in n)yl[a]=n[a],ff(a)&&(yl[a].isCSSVariable=!0)}function ov(n,{layout:a,layoutId:i}){return ei.has(n)||n.startsWith("origin")||(a||i!==void 0)&&(!!yl[n]||n==="opacity")}const mT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pT=Is.length;function gT(n,a,i){let r="",o=!0;for(let f=0;f<pT;f++){const d=Is[f],p=n[d];if(p===void 0)continue;let g=!0;if(typeof p=="number"?g=p===(d.startsWith("scale")?1:0):g=parseFloat(p)===0,!g||i){const m=Wx(p,jf[d]);if(!g){o=!1;const y=mT[d]||d;r+=`${y}(${m}) `}i&&(a[d]=m)}}return r=r.trim(),i?r=i(a,o?"":r):o&&(r="none"),r}function Rf(n,a,i){const{style:r,vars:o,transformOrigin:f}=n;let d=!1,p=!1;for(const g in a){const m=a[g];if(ei.has(g)){d=!0;continue}else if(ff(g)){o[g]=m;continue}else{const y=Wx(m,jf[g]);g.startsWith("origin")?(p=!0,f[g]=y):r[g]=y}}if(a.transform||(d||i?r.transform=gT(a,n.transform,i):r.transform&&(r.transform="none")),p){const{originX:g="50%",originY:m="50%",originZ:y=0}=f;r.transformOrigin=`${g} ${m} ${y}`}}const Df=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uv(n,a,i){for(const r in a)!yt(a[r])&&!ov(r,i)&&(n[r]=a[r])}function yT({transformTemplate:n},a){return S.useMemo(()=>{const i=Df();return Rf(i,a,n),Object.assign({},i.vars,i.style)},[a])}function xT(n,a){const i=n.style||{},r={};return uv(r,i,n),Object.assign(r,yT(n,a)),r}function vT(n,a){const i={},r=xT(n,a);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=r,i}const bT={offset:"stroke-dashoffset",array:"stroke-dasharray"},wT={offset:"strokeDashoffset",array:"strokeDasharray"};function ST(n,a,i=1,r=0,o=!0){n.pathLength=1;const f=o?bT:wT;n[f.offset]=ce.transform(-r);const d=ce.transform(a),p=ce.transform(i);n[f.array]=`${d} ${p}`}function cv(n,v,g,m,y){var b=v,{attrX:a,attrY:i,attrScale:r,pathLength:o,pathSpacing:f=1,pathOffset:d=0}=b,p=ot(b,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var E,T;if(Rf(n,p,m),g){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:j,style:N}=n;j.transform&&(N.transform=j.transform,delete j.transform),(N.transform||j.transformOrigin)&&(N.transformOrigin=(E=j.transformOrigin)!=null?E:"50% 50%",delete j.transformOrigin),N.transform&&(N.transformBox=(T=y==null?void 0:y.transformBox)!=null?T:"fill-box",delete j.transformBox),a!==void 0&&(j.x=a),i!==void 0&&(j.y=i),r!==void 0&&(j.scale=r),o!==void 0&&ST(j,o,f,d,!1)}const dv=()=>oe(K({},Df()),{attrs:{}}),fv=n=>typeof n=="string"&&n.toLowerCase()==="svg";function jT(n,a,i,r){const o=S.useMemo(()=>{const f=dv();return cv(f,a,fv(r),n.transformTemplate,n.style),oe(K({},f.attrs),{style:K({},f.style)})},[a]);if(n.style){const f={};uv(f,n.style,n),o.style=K(K({},f),o.style)}return o}const NT=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Mf(n){return typeof n!="string"||n.includes("-")?!1:!!(NT.indexOf(n)>-1||/[A-Z]/u.test(n))}function TT(n,a,i,{latestValues:r},o,f=!1){const p=(Mf(n)?jT:vT)(a,r,o,n),g=cT(a,typeof n=="string",f),m=n!==S.Fragment?oe(K(K({},g),p),{ref:i}):{},{children:y}=a,v=S.useMemo(()=>yt(y)?y.get():y,[y]);return S.createElement(n,oe(K({},m),{children:v}))}function Og(n){const a=[{},{}];return n==null||n.values.forEach((i,r)=>{a[0][r]=i.get(),a[1][r]=i.getVelocity()}),a}function Of(n,a,i,r){if(typeof a=="function"){const[o,f]=Og(r);a=a(i!==void 0?i:n.custom,o,f)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[o,f]=Og(r);a=a(i!==void 0?i:n.custom,o,f)}return a}function ao(n){return yt(n)?n.get():n}function ET({scrapeMotionValuesFromProps:n,createRenderState:a},i,r,o){return{latestValues:AT(i,r,o,n),renderState:a()}}function AT(n,a,i,r){const o={},f=r(n,{});for(const j in f)o[j]=ao(f[j]);let{initial:d,animate:p}=n;const g=No(n),m=rv(n);a&&m&&!g&&n.inherit!==!1&&(d===void 0&&(d=a.initial),p===void 0&&(p=a.animate));let y=i?i.initial===!1:!1;y=y||d===!1;const v=y?p:d;if(v&&typeof v!="boolean"&&!jo(v)){const j=Array.isArray(v)?v:[v];for(let N=0;N<j.length;N++){const E=Of(n,j[N]);if(E){const b=E,{transitionEnd:T,transition:D}=b,U=ot(b,["transitionEnd","transition"]);for(const M in U){let H=U[M];if(Array.isArray(H)){const L=y?H.length-1:0;H=H[L]}H!==null&&(o[M]=H)}for(const M in T)o[M]=T[M]}}}return o}const hv=n=>(a,i)=>{const r=S.useContext(So),o=S.useContext(wo),f=()=>ET(n,a,r,o);return i?f():nf(f)};function Lf(n,a,i){var f;const{style:r}=n,o={};for(const d in r)(yt(r[d])||a.style&&yt(a.style[d])||ov(d,n)||((f=i==null?void 0:i.getValue(d))==null?void 0:f.liveStyle)!==void 0)&&(o[d]=r[d]);return o}const CT=hv({scrapeMotionValuesFromProps:Lf,createRenderState:Df});function mv(n,a,i){const r=Lf(n,a,i);for(const o in n)if(yt(n[o])||yt(a[o])){const f=Is.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[f]=n[o]}return r}const RT=hv({scrapeMotionValuesFromProps:mv,createRenderState:dv}),DT=Symbol.for("motionComponentSymbol");function ks(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function MT(n,a,i){return S.useCallback(r=>{r&&n.onMount&&n.onMount(r),a&&(r?a.mount(r):a.unmount()),i&&(typeof i=="function"?i(r):ks(i)&&(i.current=r))},[a])}const Uf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),OT="framerAppearId",pv="data-"+Uf(OT),gv=S.createContext({});function LT(n,a,i,r,o){var E,T;const{visualElement:f}=S.useContext(So),d=S.useContext(iv),p=S.useContext(wo),g=S.useContext(Ef).reducedMotion,m=S.useRef(null);r=r||d.renderer,!m.current&&r&&(m.current=r(n,{visualState:a,parent:f,props:i,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g}));const y=m.current,v=S.useContext(gv);y&&!y.projection&&o&&(y.type==="html"||y.type==="svg")&&UT(m.current,i,o,v);const b=S.useRef(!1);S.useInsertionEffect(()=>{y&&b.current&&y.update(i,p)});const j=i[pv],N=S.useRef(!!j&&!((E=window.MotionHandoffIsComplete)!=null&&E.call(window,j))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,j)));return hx(()=>{y&&(b.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),N.current&&y.animationState&&y.animationState.animateChanges())}),S.useEffect(()=>{y&&(!N.current&&y.animationState&&y.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var D;(D=window.MotionHandoffMarkAsComplete)==null||D.call(window,j)}),N.current=!1),y.enteringChildren=void 0)}),y}function UT(n,a,i,r){const{layoutId:o,layout:f,drag:d,dragConstraints:p,layoutScroll:g,layoutRoot:m,layoutCrossfade:y}=a;n.projection=new i(n.latestValues,a["data-framer-portal-id"]?void 0:yv(n.parent)),n.projection.setOptions({layoutId:o,layout:f,alwaysMeasureLayout:!!d||p&&ks(p),visualElement:n,animationType:typeof f=="string"?f:"both",initialPromotionConfig:r,crossfade:y,layoutScroll:g,layoutRoot:m})}function yv(n){if(n)return n.options.allowProjection!==!1?n.projection:yv(n.parent)}function ld(n,{forwardMotionProps:a=!1}={},i,r){var p,g;i&&rT(i);const o=Mf(n)?RT:CT;function f(m,y){let v;const b=oe(K(K({},S.useContext(Ef)),m),{layoutId:zT(m)}),{isStatic:j}=b,N=fT(m),E=o(m,j);if(!j&&af){BT();const T=VT(b);v=T.MeasureLayout,N.visualElement=LT(n,E,b,r,T.ProjectionNode)}return c.jsxs(So.Provider,{value:N,children:[v&&N.visualElement?c.jsx(v,K({visualElement:N.visualElement},b)):null,TT(n,m,MT(E,N.visualElement,y),E,j,a)]})}f.displayName=`motion.${typeof n=="string"?n:`create(${(g=(p=n.displayName)!=null?p:n.name)!=null?g:""})`}`;const d=S.forwardRef(f);return d[DT]=n,d}function zT({layoutId:n}){const a=S.useContext(tf).id;return a&&n!==void 0?a+"-"+n:n}function BT(n,a){S.useContext(iv).strict}function VT(n){const{drag:a,layout:i}=Fs;if(!a&&!i)return{};const r=K(K({},a),i);return{MeasureLayout:a!=null&&a.isEnabled(n)||i!=null&&i.isEnabled(n)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function _T(n,a){if(typeof Proxy=="undefined")return ld;const i=new Map,r=(f,d)=>ld(f,d,n,a),o=(f,d)=>r(f,d);return new Proxy(o,{get:(f,d)=>d==="create"?r:(i.has(d)||i.set(d,ld(d,void 0,n,a)),i.get(d))})}function xv({top:n,left:a,right:i,bottom:r}){return{x:{min:a,max:i},y:{min:n,max:r}}}function kT({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function HT(n,a){if(!a)return n;const i=a({x:n.left,y:n.top}),r=a({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:r.y,right:r.x}}function rd(n){return n===void 0||n===1}function Bd({scale:n,scaleX:a,scaleY:i}){return!rd(n)||!rd(a)||!rd(i)}function Ha(n){return Bd(n)||vv(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function vv(n){return Lg(n.x)||Lg(n.y)}function Lg(n){return n&&n!=="0%"}function ho(n,a,i){const r=n-i,o=a*r;return i+o}function Ug(n,a,i,r,o){return o!==void 0&&(n=ho(n,o,r)),ho(n,i,r)+a}function Vd(n,a=0,i=1,r,o){n.min=Ug(n.min,a,i,r,o),n.max=Ug(n.max,a,i,r,o)}function bv(n,{x:a,y:i}){Vd(n.x,a.translate,a.scale,a.originPoint),Vd(n.y,i.translate,i.scale,i.originPoint)}const zg=.999999999999,Bg=1.0000000000001;function PT(n,a,i,r=!1){const o=i.length;if(!o)return;a.x=a.y=1;let f,d;for(let p=0;p<o;p++){f=i[p],d=f.projectionDelta;const{visualElement:g}=f.options;g&&g.props.style&&g.props.style.display==="contents"||(r&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Ps(n,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,bv(n,d)),r&&Ha(f.latestValues)&&Ps(n,f.latestValues))}a.x<Bg&&a.x>zg&&(a.x=1),a.y<Bg&&a.y>zg&&(a.y=1)}function Hs(n,a){n.min=n.min+a,n.max=n.max+a}function Vg(n,a,i,r,o=.5){const f=Xe(n.min,n.max,o);Vd(n,a,i,f,r)}function Ps(n,a){Vg(n.x,a.x,a.scaleX,a.scale,a.originX),Vg(n.y,a.y,a.scaleY,a.scale,a.originY)}function wv(n,a){return xv(HT(n.getBoundingClientRect(),a))}function qT(n,a,i){const r=wv(n,i),{scroll:o}=a;return o&&(Hs(r.x,o.offset.x),Hs(r.y,o.offset.y)),r}const _g=()=>({translate:0,scale:1,origin:0,originPoint:0}),qs=()=>({x:_g(),y:_g()}),kg=()=>({min:0,max:0}),We=()=>({x:kg(),y:kg()}),_d={current:null},Sv={current:!1};function YT(){if(Sv.current=!0,!!af)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>_d.current=n.matches;n.addEventListener("change",a),a()}else _d.current=!1}const GT=new WeakMap;function XT(n,a,i){for(const r in a){const o=a[r],f=i[r];if(yt(o))n.addValue(r,o);else if(yt(f))n.addValue(r,Xs(o,{owner:n}));else if(f!==o)if(n.hasValue(r)){const d=n.getValue(r);d.liveStyle===!0?d.jump(o):d.hasAnimated||d.set(o)}else{const d=n.getStaticValue(r);n.addValue(r,Xs(d!==void 0?d:o,{owner:n}))}}for(const r in i)a[r]===void 0&&n.removeValue(r);return a}const Hg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class FT{scrapeMotionValuesFromProps(a,i,r){return{}}constructor({parent:a,props:i,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:f,visualState:d},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=wf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const j=Ct.now();this.renderScheduledAt<j&&(this.renderScheduledAt=j,He.render(this.render,!1,!0))};const{latestValues:g,renderState:m}=d;this.latestValues=g,this.baseTarget=K({},g),this.initialValues=i.initial?K({},g):{},this.renderState=m,this.parent=a,this.props=i,this.presenceContext=r,this.depth=a?a.depth+1:0,this.reducedMotionConfig=o,this.options=p,this.blockInitialAnimation=!!f,this.isControllingVariants=No(i),this.isVariantNode=rv(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const b=this.scrapeMotionValuesFromProps(i,{},this),{willChange:y}=b,v=ot(b,["willChange"]);for(const j in v){const N=v[j];g[j]!==void 0&&yt(N)&&N.set(g[j])}}mount(a){var i;this.current=a,GT.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),Sv.current||YT(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_d.current,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var a;this.projection&&this.projection.unmount(),ya(this.notifyUpdate),ya(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(a=this.parent)==null||a.removeChild(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const r=this.features[i];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(a){var i;this.children.add(a),(i=this.enteringChildren)!=null||(this.enteringChildren=new Set),this.enteringChildren.add(a)}removeChild(a){this.children.delete(a),this.enteringChildren&&this.enteringChildren.delete(a)}bindToMotionValue(a,i){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const r=ei.has(a);r&&this.onBindTransform&&this.onBindTransform();const o=i.on("change",d=>{this.latestValues[a]=d,this.props.onUpdate&&He.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let f;window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,a,i)),this.valueSubscriptions.set(a,()=>{o(),f&&f(),i.owner&&i.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Fs){const i=Fs[a];if(!i)continue;const{isEnabled:r,Feature:o}=i;if(!this.features[a]&&o&&r(this.props)&&(this.features[a]=new o(this)),this.features[a]){const f=this.features[a];f.isMounted?f.update():(f.mount(),f.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):We()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,i){this.latestValues[a]=i}update(a,i){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let r=0;r<Hg.length;r++){const o=Hg[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const f="on"+o,d=a[f];d&&(this.propEventSubscriptions[o]=this.on(o,d))}this.prevMotionValues=XT(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(a),()=>i.variantChildren.delete(a)}addValue(a,i){const r=this.values.get(a);i!==r&&(r&&this.removeValue(a),this.bindToMotionValue(a,i),this.values.set(a,i),this.latestValues[a]=i.get())}removeValue(a){this.values.delete(a);const i=this.valueSubscriptions.get(a);i&&(i(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,i){if(this.props.values&&this.props.values[a])return this.props.values[a];let r=this.values.get(a);return r===void 0&&i!==void 0&&(r=Xs(i===null?void 0:i,{owner:this}),this.addValue(a,r)),r}readValue(a,i){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!=null?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(mx(r)||gx(r))?r=parseFloat(r):!nT(r)&&xa.test(i)&&(r=Jx(a,i)),this.setBaseTarget(a,yt(r)?r.get():r)),yt(r)?r.get():r}setBaseTarget(a,i){this.baseTarget[a]=i}getBaseTarget(a){var f;const{initial:i}=this.props;let r;if(typeof i=="string"||typeof i=="object"){const d=Of(this.props,i,(f=this.presenceContext)==null?void 0:f.custom);d&&(r=d[a])}if(i&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,a);return o!==void 0&&!yt(o)?o:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,i){return this.events[a]||(this.events[a]=new uf),this.events[a].add(i)}notify(a,...i){this.events[a]&&this.events[a].notify(...i)}scheduleRenderMicrotask(){Nf.render(this.render)}}class jv extends FT{constructor(){super(...arguments),this.KeyframeResolver=G4}sortInstanceNodePosition(a,i){return a.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(a,i){return a.style?a.style[i]:void 0}removeValueFromRenderState(a,{vars:i,style:r}){delete i[a],delete r[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;yt(a)&&(this.childSubscription=a.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function Nv(n,{style:a,vars:i},r,o){const f=n.style;let d;for(d in a)f[d]=a[d];o==null||o.applyProjectionStyles(f,r);for(d in i)f.setProperty(d,i[d])}function KT(n){return window.getComputedStyle(n)}class $T extends jv{constructor(){super(...arguments),this.type="html",this.renderInstance=Nv}readValueFromInstance(a,i){var r;if(ei.has(i))return(r=this.projection)!=null&&r.isProjecting?Rd(i):u4(a,i);{const o=KT(a),f=(ff(i)?o.getPropertyValue(i):o[i])||0;return typeof f=="string"?f.trim():f}}measureInstanceViewportBox(a,{transformPagePoint:i}){return wv(a,i)}build(a,i,r){Rf(a,i,r.transformTemplate)}scrapeMotionValuesFromProps(a,i,r){return Lf(a,i,r)}}const Tv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ZT(n,a,i,r){Nv(n,a,void 0,r);for(const o in a.attrs)n.setAttribute(Tv.has(o)?o:Uf(o),a.attrs[o])}class QT extends jv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=We}getBaseTargetFromProps(a,i){return a[i]}readValueFromInstance(a,i){if(ei.has(i)){const r=Qx(i);return r&&r.default||0}return i=Tv.has(i)?i:Uf(i),a.getAttribute(i)}scrapeMotionValuesFromProps(a,i,r){return mv(a,i,r)}build(a,i,r){cv(a,i,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(a,i,r,o){ZT(a,i,r,o)}mount(a){this.isSVGTag=fv(a.tagName),super.mount(a)}}const JT=(n,a)=>Mf(n)?new QT(a):new $T(a,{allowProjection:n!==S.Fragment});function Ys(n,a,i){const r=n.getProps();return Of(r,a,i!==void 0?i:r.custom,n)}const kd=n=>Array.isArray(n);function WT(n,a,i){n.hasValue(a)?n.getValue(a).set(i):n.addValue(a,Xs(i))}function IT(n){return kd(n)?n[n.length-1]||0:n}function e3(n,a){let d=Ys(n,a)||{},{transitionEnd:r={},transition:o={}}=d,f=ot(d,["transitionEnd","transition"]);f=K(K({},f),r);for(const p in f){const g=IT(f[p]);WT(n,p,g)}}function t3(n){return!!(yt(n)&&n.add)}function Hd(n,a){const i=n.getValue("willChange");if(t3(i))return i.add(a);if(!i&&Gn.WillChange){const r=new Gn.WillChange("auto");n.addValue("willChange",r),r.add(a)}}function Ev(n){return n.props[pv]}const n3=n=>n!==null;function a3(n,{repeat:a,repeatType:i="loop"},r){const o=n.filter(n3),f=a&&i!=="loop"&&a%2===1?0:o.length-1;return o[f]}const s3={type:"spring",stiffness:500,damping:25,restSpeed:10},i3=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),l3={type:"keyframes",duration:.8},r3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},o3=(n,{keyframes:a})=>a.length>2?l3:ei.has(n)?n.startsWith("scale")?i3(a[1]):s3:r3;function u3(v){var b=v,{when:n,delay:a,delayChildren:i,staggerChildren:r,staggerDirection:o,repeat:f,repeatType:d,repeatDelay:p,from:g,elapsed:m}=b,y=ot(b,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(y).length}const zf=(n,a,i,r={},o,f)=>d=>{const p=Sf(r,n)||{},g=p.delay||r.delay||0;let{elapsed:m=0}=r;m=m-bn(g);const y=oe(K({keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:a.getVelocity()},p),{delay:-m,onUpdate:b=>{a.set(b),p.onUpdate&&p.onUpdate(b)},onComplete:()=>{d(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:f?void 0:o});u3(p)||Object.assign(y,o3(n,y)),y.duration&&(y.duration=bn(y.duration)),y.repeatDelay&&(y.repeatDelay=bn(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(Ud(y),y.delay===0&&(v=!0)),(Gn.instantAnimations||Gn.skipAnimations)&&(v=!0,Ud(y),y.delay=0),y.allowFlatten=!p.type&&!p.ease,v&&!f&&a.get()!==void 0){const b=a3(y.keyframes,p);if(b!==void 0){He.update(()=>{y.onUpdate(b),y.onComplete()});return}}return p.isSync?new bf(y):new O4(y)};function c3({protectedKeys:n,needsAnimating:a},i){const r=n.hasOwnProperty(i)&&a[i]!==!0;return a[i]=!1,r}function Av(n,a,{delay:i=0,transitionOverride:r,type:o}={}){var v;let y=a,{transition:f=n.getDefaultTransition(),transitionEnd:d}=y,p=ot(y,["transition","transitionEnd"]);r&&(f=r);const g=[],m=o&&n.animationState&&n.animationState.getState()[o];for(const b in p){const j=n.getValue(b,(v=n.latestValues[b])!=null?v:null),N=p[b];if(N===void 0||m&&c3(m,b))continue;const E=K({delay:i},Sf(f||{},b)),T=j.get();if(T!==void 0&&!j.isAnimating&&!Array.isArray(N)&&N===T&&!E.velocity)continue;let D=!1;if(window.MotionHandoffAnimation){const M=Ev(n);if(M){const H=window.MotionHandoffAnimation(M,b,He);H!==null&&(E.startTime=H,D=!0)}}Hd(n,b),j.start(zf(b,j,N,n.shouldReduceMotion&&Kx.has(b)?{type:!1}:E,n,D));const U=j.animation;U&&g.push(U)}return d&&Promise.all(g).then(()=>{He.update(()=>{d&&e3(n,d)})}),g}function Cv(n,a,i,r=0,o=1){const f=Array.from(n).sort((m,y)=>m.sortNodePosition(y)).indexOf(a),d=n.size,p=(d-1)*r;return typeof i=="function"?i(f,d):o===1?f*r:p-f*r}function Pd(n,a,i={}){var g;const r=Ys(n,a,i.type==="exit"?(g=n.presenceContext)==null?void 0:g.custom:void 0);let{transition:o=n.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(o=i.transitionOverride);const f=r?()=>Promise.all(Av(n,r,i)):()=>Promise.resolve(),d=n.variantChildren&&n.variantChildren.size?(m=0)=>{const{delayChildren:y=0,staggerChildren:v,staggerDirection:b}=o;return d3(n,a,m,y,v,b,i)}:()=>Promise.resolve(),{when:p}=o;if(p){const[m,y]=p==="beforeChildren"?[f,d]:[d,f];return m().then(()=>y())}else return Promise.all([f(),d(i.delay)])}function d3(n,a,i=0,r=0,o=0,f=1,d){const p=[];for(const g of n.variantChildren)g.notify("AnimationStart",a),p.push(Pd(g,a,oe(K({},d),{delay:i+(typeof r=="function"?0:r)+Cv(n.variantChildren,g,r,o,f)})).then(()=>g.notify("AnimationComplete",a)));return Promise.all(p)}function f3(n,a,i={}){n.notify("AnimationStart",a);let r;if(Array.isArray(a)){const o=a.map(f=>Pd(n,f,i));r=Promise.all(o)}else if(typeof a=="string")r=Pd(n,a,i);else{const o=typeof a=="function"?Ys(n,a,i.custom):a;r=Promise.all(Av(n,o,i))}return r.then(()=>{n.notify("AnimationComplete",a)})}function Rv(n,a){if(!Array.isArray(a))return!1;const i=a.length;if(i!==n.length)return!1;for(let r=0;r<i;r++)if(a[r]!==n[r])return!1;return!0}const h3=Cf.length;function Dv(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?Dv(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const a={};for(let i=0;i<h3;i++){const r=Cf[i],o=n.props[r];(gl(o)||o===!1)&&(a[r]=o)}return a}const m3=[...Af].reverse(),p3=Af.length;function g3(n){return a=>Promise.all(a.map(({animation:i,options:r})=>f3(n,i,r)))}function y3(n){let a=g3(n),i=Pg(),r=!0;const o=g=>(m,y)=>{var b;const v=Ys(n,y,g==="exit"?(b=n.presenceContext)==null?void 0:b.custom:void 0);if(v){const j=v,{transition:N,transitionEnd:E}=j,T=ot(j,["transition","transitionEnd"]);m=K(K(K({},m),T),E)}return m};function f(g){a=g(n)}function d(g){const{props:m}=n,y=Dv(n.parent)||{},v=[],b=new Set;let j={},N=1/0;for(let T=0;T<p3;T++){const D=m3[T],U=i[D],M=m[D]!==void 0?m[D]:y[D],H=gl(M),L=D===g?U.isActive:null;L===!1&&(N=T);let $=M===y[D]&&M!==m[D]&&H;if($&&r&&n.manuallyAnimateOnMount&&($=!1),U.protectedKeys=K({},j),!U.isActive&&L===null||!M&&!U.prevProp||jo(M)||typeof M=="boolean")continue;const G=x3(U.prevProp,M);let Z=G||D===g&&U.isActive&&!$&&H||T>N&&H,se=!1;const he=Array.isArray(M)?M:[M];let me=he.reduce(o(D),{});L===!1&&(me={});const{prevResolvedValues:de={}}=U,Re=K(K({},de),me),qe=Q=>{Z=!0,b.has(Q)&&(se=!0,b.delete(Q)),U.needsAnimating[Q]=!0;const ee=n.getValue(Q);ee&&(ee.liveStyle=!1)};for(const Q in Re){const ee=me[Q],ye=de[Q];if(j.hasOwnProperty(Q))continue;let C=!1;kd(ee)&&kd(ye)?C=!Rv(ee,ye):C=ee!==ye,C?ee!=null?qe(Q):b.add(Q):ee!==void 0&&b.has(Q)?qe(Q):U.protectedKeys[Q]=!0}U.prevProp=M,U.prevResolvedValues=me,U.isActive&&(j=K(K({},j),me)),r&&n.blockInitialAnimation&&(Z=!1);const be=$&&G;Z&&(!be||se)&&v.push(...he.map(Q=>{const ee={type:D};if(typeof Q=="string"&&r&&!be&&n.manuallyAnimateOnMount&&n.parent){const{parent:ye}=n,C=Ys(ye,Q);if(ye.enteringChildren&&C){const{delayChildren:Y}=C.transition||{};ee.delay=Cv(ye.enteringChildren,n,Y)}}return{animation:Q,options:ee}}))}if(b.size){const T={};if(typeof m.initial!="boolean"){const D=Ys(n,Array.isArray(m.initial)?m.initial[0]:m.initial);D&&D.transition&&(T.transition=D.transition)}b.forEach(D=>{const U=n.getBaseTarget(D),M=n.getValue(D);M&&(M.liveStyle=!0),T[D]=U!=null?U:null}),v.push({animation:T})}let E=!!v.length;return r&&(m.initial===!1||m.initial===m.animate)&&!n.manuallyAnimateOnMount&&(E=!1),r=!1,E?a(v):Promise.resolve()}function p(g,m){var v;if(i[g].isActive===m)return Promise.resolve();(v=n.variantChildren)==null||v.forEach(b=>{var j;return(j=b.animationState)==null?void 0:j.setActive(g,m)}),i[g].isActive=m;const y=d(g);for(const b in i)i[b].protectedKeys={};return y}return{animateChanges:d,setActive:p,setAnimateFunction:f,getState:()=>i,reset:()=>{i=Pg(),r=!0}}}function x3(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!Rv(a,n):!1}function ka(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pg(){return{animate:ka(!0),whileInView:ka(),whileHover:ka(),whileTap:ka(),whileDrag:ka(),whileFocus:ka(),exit:ka()}}class va{constructor(a){this.isMounted=!1,this.node=a}update(){}}class v3 extends va{constructor(a){super(a),a.animationState||(a.animationState=y3(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();jo(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:i}=this.node.prevProps||{};a!==i&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)==null||a.call(this)}}let b3=0;class w3 extends va{constructor(){super(...arguments),this.id=b3++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===r)return;const o=this.node.animationState.setActive("exit",!a);i&&!a&&o.then(()=>{i(this.id)})}mount(){const{register:a,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),a&&(this.unmount=a(this.id))}unmount(){}}const S3={animation:{Feature:v3},exit:{Feature:w3}};function xl(n,a,i,r={passive:!0}){return n.addEventListener(a,i,r),()=>n.removeEventListener(a,i)}function Cl(n){return{point:{x:n.pageX,y:n.pageY}}}const j3=n=>a=>Tf(a)&&n(a,Cl(a));function ul(n,a,i,r){return xl(n,a,j3(i),r)}const Mv=1e-4,N3=1-Mv,T3=1+Mv,Ov=.01,E3=0-Ov,A3=0+Ov;function St(n){return n.max-n.min}function C3(n,a,i){return Math.abs(n-a)<=i}function qg(n,a,i,r=.5){n.origin=r,n.originPoint=Xe(a.min,a.max,n.origin),n.scale=St(i)/St(a),n.translate=Xe(i.min,i.max,n.origin)-n.originPoint,(n.scale>=N3&&n.scale<=T3||isNaN(n.scale))&&(n.scale=1),(n.translate>=E3&&n.translate<=A3||isNaN(n.translate))&&(n.translate=0)}function cl(n,a,i,r){qg(n.x,a.x,i.x,r?r.originX:void 0),qg(n.y,a.y,i.y,r?r.originY:void 0)}function Yg(n,a,i){n.min=i.min+a.min,n.max=n.min+St(a)}function R3(n,a,i){Yg(n.x,a.x,i.x),Yg(n.y,a.y,i.y)}function Gg(n,a,i){n.min=a.min-i.min,n.max=n.min+St(a)}function dl(n,a,i){Gg(n.x,a.x,i.x),Gg(n.y,a.y,i.y)}function It(n){return[n("x"),n("y")]}const Lv=({current:n})=>n?n.ownerDocument.defaultView:null,Xg=(n,a)=>Math.abs(n-a);function D3(n,a){const i=Xg(n.x,a.x),r=Xg(n.y,a.y);return Math.sqrt(kc(i,2)+kc(r,2))}class Uv{constructor(a,i,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:f=!1,distanceThreshold:d=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ud(this.lastMoveEventInfo,this.history),j=this.startEvent!==null,N=D3(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!j&&!N)return;const{point:E}=b,{timestamp:T}=ft;this.history.push(oe(K({},E),{timestamp:T}));const{onStart:D,onMove:U}=this.handlers;j||(D&&D(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),U&&U(this.lastMoveEvent,b)},this.handlePointerMove=(b,j)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=od(j,this.transformPagePoint),He.update(this.updatePoint,!0)},this.handlePointerUp=(b,j)=>{this.end();const{onEnd:N,onSessionEnd:E,resumeAnimation:T}=this.handlers;if(this.dragSnapToOrigin&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=ud(b.type==="pointercancel"?this.lastMoveEventInfo:od(j,this.transformPagePoint),this.history);this.startEvent&&N&&N(b,D),E&&E(b,D)},!Tf(a))return;this.dragSnapToOrigin=f,this.handlers=i,this.transformPagePoint=r,this.distanceThreshold=d,this.contextWindow=o||window;const p=Cl(a),g=od(p,this.transformPagePoint),{point:m}=g,{timestamp:y}=ft;this.history=[oe(K({},m),{timestamp:y})];const{onSessionStart:v}=i;v&&v(a,ud(g,this.history)),this.removeListeners=Tl(ul(this.contextWindow,"pointermove",this.handlePointerMove),ul(this.contextWindow,"pointerup",this.handlePointerUp),ul(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),ya(this.updatePoint)}}function od(n,a){return a?{point:a(n.point)}:n}function Fg(n,a){return{x:n.x-a.x,y:n.y-a.y}}function ud({point:n},a){return{point:n,delta:Fg(n,zv(a)),offset:Fg(n,M3(a)),velocity:O3(a,.1)}}function M3(n){return n[0]}function zv(n){return n[n.length-1]}function O3(n,a){if(n.length<2)return{x:0,y:0};let i=n.length-1,r=null;const o=zv(n);for(;i>=0&&(r=n[i],!(o.timestamp-r.timestamp>bn(a)));)i--;if(!r)return{x:0,y:0};const f=wn(o.timestamp-r.timestamp);if(f===0)return{x:0,y:0};const d={x:(o.x-r.x)/f,y:(o.y-r.y)/f};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}function L3(n,{min:a,max:i},r){return a!==void 0&&n<a?n=r?Xe(a,n,r.min):Math.max(n,a):i!==void 0&&n>i&&(n=r?Xe(i,n,r.max):Math.min(n,i)),n}function Kg(n,a,i){return{min:a!==void 0?n.min+a:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function U3(n,{top:a,left:i,bottom:r,right:o}){return{x:Kg(n.x,i,o),y:Kg(n.y,a,r)}}function $g(n,a){let i=a.min-n.min,r=a.max-n.max;return a.max-a.min<n.max-n.min&&([i,r]=[r,i]),{min:i,max:r}}function z3(n,a){return{x:$g(n.x,a.x),y:$g(n.y,a.y)}}function B3(n,a){let i=.5;const r=St(n),o=St(a);return o>r?i=hl(a.min,a.max-r,n.min):r>o&&(i=hl(n.min,n.max-o,a.min)),Yn(0,1,i)}function V3(n,a){const i={};return a.min!==void 0&&(i.min=a.min-n.min),a.max!==void 0&&(i.max=a.max-n.min),i}const qd=.35;function _3(n=qd){return n===!1?n=0:n===!0&&(n=qd),{x:Zg(n,"left","right"),y:Zg(n,"top","bottom")}}function Zg(n,a,i){return{min:Qg(n,a),max:Qg(n,i)}}function Qg(n,a){return typeof n=="number"?n:n[a]||0}const k3=new WeakMap;class H3{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=We(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=a}start(a,{snapToCursor:i=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const f=v=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(Cl(v).point)},d=(v,b)=>{const{drag:j,dragPropagation:N,onDragStart:E}=this.getProps();if(j&&!N&&(this.openDragLock&&this.openDragLock(),this.openDragLock=$4(j),!this.openDragLock))return;this.latestPointerEvent=v,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),It(D=>{let U=this.getAxisMotionValue(D).get()||0;if(Sn.test(U)){const{projection:M}=this.visualElement;if(M&&M.layout){const H=M.layout.layoutBox[D];H&&(U=St(H)*(parseFloat(U)/100))}}this.originPoint[D]=U}),E&&He.postRender(()=>E(v,b)),Hd(this.visualElement,"transform");const{animationState:T}=this.visualElement;T&&T.setActive("whileDrag",!0)},p=(v,b)=>{this.latestPointerEvent=v,this.latestPanInfo=b;const{dragPropagation:j,dragDirectionLock:N,onDirectionLock:E,onDrag:T}=this.getProps();if(!j&&!this.openDragLock)return;const{offset:D}=b;if(N&&this.currentDirection===null){this.currentDirection=P3(D),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",b.point,D),this.updateAxis("y",b.point,D),this.visualElement.render(),T&&T(v,b)},g=(v,b)=>{this.latestPointerEvent=v,this.latestPanInfo=b,this.stop(v,b),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>It(v=>{var b;return this.getAnimationState(v)==="paused"&&((b=this.getAxisMotionValue(v).animation)==null?void 0:b.play())}),{dragSnapToOrigin:y}=this.getProps();this.panSession=new Uv(a,{onSessionStart:f,onStart:d,onMove:p,onSessionEnd:g,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:r,contextWindow:Lv(this.visualElement)})}stop(a,i){const r=a||this.latestPointerEvent,o=i||this.latestPanInfo,f=this.isDragging;if(this.cancel(),!f||!o||!r)return;const{velocity:d}=o;this.startAnimation(d);const{onDragEnd:p}=this.getProps();p&&He.postRender(()=>p(r,o))}cancel(){this.isDragging=!1;const{projection:a,animationState:i}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(a,i,r){const{drag:o}=this.getProps();if(!r||!Zr(a,o,this.currentDirection))return;const f=this.getAxisMotionValue(a);let d=this.originPoint[a]+r[a];this.constraints&&this.constraints[a]&&(d=L3(d,this.constraints[a],this.elastic[a])),f.set(d)}resolveConstraints(){var f;const{dragConstraints:a,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(f=this.visualElement.projection)==null?void 0:f.layout,o=this.constraints;a&&ks(a)?this.constraints||(this.constraints=this.resolveRefConstraints()):a&&r?this.constraints=U3(r.layoutBox,a):this.constraints=!1,this.elastic=_3(i),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&It(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=V3(r.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:i}=this.getProps();if(!a||!ks(a))return!1;const r=a.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const f=qT(r,o.root,this.visualElement.getTransformPagePoint());let d=z3(o.layout.layoutBox,f);if(i){const p=i(kT(d));this.hasMutatedConstraints=!!p,p&&(d=xv(p))}return d}startAnimation(a){const{drag:i,dragMomentum:r,dragElastic:o,dragTransition:f,dragSnapToOrigin:d,onDragTransitionEnd:p}=this.getProps(),g=this.constraints||{},m=It(y=>{if(!Zr(y,i,this.currentDirection))return;let v=g&&g[y]||{};d&&(v={min:0,max:0});const b=o?200:1e6,j=o?40:1e7,N=K(K({type:"inertia",velocity:r?a[y]:0,bounceStiffness:b,bounceDamping:j,timeConstant:750,restDelta:1,restSpeed:10},f),v);return this.startAxisValueAnimation(y,N)});return Promise.all(m).then(p)}startAxisValueAnimation(a,i){const r=this.getAxisMotionValue(a);return Hd(this.visualElement,a),r.start(zf(a,r,0,i,this.visualElement,!1))}stopAnimation(){It(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){It(a=>{var i;return(i=this.getAxisMotionValue(a).animation)==null?void 0:i.pause()})}getAnimationState(a){var i;return(i=this.getAxisMotionValue(a).animation)==null?void 0:i.state}getAxisMotionValue(a){const i=`_drag${a.toUpperCase()}`,r=this.visualElement.getProps(),o=r[i];return o||this.visualElement.getValue(a,(r.initial?r.initial[a]:void 0)||0)}snapToCursor(a){It(i=>{const{drag:r}=this.getProps();if(!Zr(i,r,this.currentDirection))return;const{projection:o}=this.visualElement,f=this.getAxisMotionValue(i);if(o&&o.layout){const{min:d,max:p}=o.layout.layoutBox[i];f.set(a[i]-Xe(d,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:i}=this.getProps(),{projection:r}=this.visualElement;if(!ks(i)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};It(d=>{const p=this.getAxisMotionValue(d);if(p&&this.constraints!==!1){const g=p.get();o[d]=B3({min:g,max:g},this.constraints[d])}});const{transformTemplate:f}=this.visualElement.getProps();this.visualElement.current.style.transform=f?f({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),It(d=>{if(!Zr(d,a,null))return;const p=this.getAxisMotionValue(d),{min:g,max:m}=this.constraints[d];p.set(Xe(g,m,o[d]))})}addListeners(){if(!this.visualElement.current)return;k3.set(this.visualElement,this);const a=this.visualElement.current,i=ul(a,"pointerdown",g=>{const{drag:m,dragListener:y=!0}=this.getProps();m&&y&&this.start(g)}),r=()=>{const{dragConstraints:g}=this.getProps();ks(g)&&g.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,f=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),He.read(r);const d=xl(window,"resize",()=>this.scalePositionWithinConstraints()),p=o.addEventListener("didUpdate",({delta:g,hasLayoutChanged:m})=>{this.isDragging&&m&&(It(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=g[y].translate,v.set(v.get()+g[y].translate))}),this.visualElement.render())});return()=>{d(),i(),f(),p&&p()}}getProps(){const a=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:f=!1,dragElastic:d=qd,dragMomentum:p=!0}=a;return oe(K({},a),{drag:i,dragDirectionLock:r,dragPropagation:o,dragConstraints:f,dragElastic:d,dragMomentum:p})}}function Zr(n,a,i){return(a===!0||a===n)&&(i===null||i===n)}function P3(n,a=10){let i=null;return Math.abs(n.y)>a?i="y":Math.abs(n.x)>a&&(i="x"),i}class q3 extends va{constructor(a){super(a),this.removeGroupControls=tn,this.removeListeners=tn,this.controls=new H3(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Jg=n=>(a,i)=>{n&&He.postRender(()=>n(a,i))};class Y3 extends va{constructor(){super(...arguments),this.removePointerDownListener=tn}onPointerDown(a){this.session=new Uv(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Lv(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:i,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Jg(a),onStart:Jg(i),onMove:r,onEnd:(f,d)=>{delete this.session,o&&He.postRender(()=>o(f,d))}}}mount(){this.removePointerDownListener=ul(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const so={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wg(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const il={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(ce.test(n))n=parseFloat(n);else return n;const i=Wg(n,a.target.x),r=Wg(n,a.target.y);return`${i}% ${r}%`}},G3={correct:(n,{treeScale:a,projectionDelta:i})=>{const r=n,o=xa.parse(n);if(o.length>5)return r;const f=xa.createTransformer(n),d=typeof o[0]!="number"?1:0,p=i.x.scale*a.x,g=i.y.scale*a.y;o[0+d]/=p,o[1+d]/=g;const m=Xe(p,g,.5);return typeof o[2+d]=="number"&&(o[2+d]/=m),typeof o[3+d]=="number"&&(o[3+d]/=m),f(o)}};let cd=!1;class X3 extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:r,layoutId:o}=this.props,{projection:f}=a;hT(F3),f&&(i.group&&i.group.add(f),r&&r.register&&o&&r.register(f),cd&&f.root.didUpdate(),f.addEventListener("animationComplete",()=>{this.safeToRemove()}),f.setOptions(oe(K({},f.options),{onExitComplete:()=>this.safeToRemove()}))),so.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:i,visualElement:r,drag:o,isPresent:f}=this.props,{projection:d}=r;return d&&(d.isPresent=f,cd=!0,o||a.layoutDependency!==i||i===void 0||a.isPresent!==f?d.willUpdate():this.safeToRemove(),a.isPresent!==f&&(f?d.promote():d.relegate()||He.postRender(()=>{const p=d.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Nf.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:r}=this.props,{projection:o}=a;cd=!0,o&&(o.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function Bv(n){const[a,i]=sv(),r=S.useContext(tf);return c.jsx(X3,oe(K({},n),{layoutGroup:r,switchLayoutGroup:S.useContext(gv),isPresent:a,safeToRemove:i}))}const F3={borderRadius:oe(K({},il),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:il,borderTopRightRadius:il,borderBottomLeftRadius:il,borderBottomRightRadius:il,boxShadow:G3};function K3(n,a,i){const r=yt(n)?n:Xs(n);return r.start(zf("",r,a,i)),r.animation}const $3=(n,a)=>n.depth-a.depth;class Z3{constructor(){this.children=[],this.isDirty=!1}add(a){sf(this.children,a),this.isDirty=!0}remove(a){lf(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort($3),this.isDirty=!1,this.children.forEach(a)}}function Q3(n,a){const i=Ct.now(),r=({timestamp:o})=>{const f=o-i;f>=a&&(ya(r),n(f-a))};return He.setup(r,!0),()=>ya(r)}const Vv=["TopLeft","TopRight","BottomLeft","BottomRight"],J3=Vv.length,Ig=n=>typeof n=="string"?parseFloat(n):n,ey=n=>typeof n=="number"||ce.test(n);function W3(n,a,i,r,o,f){var d,p,g,m;o?(n.opacity=Xe(0,(d=i.opacity)!=null?d:1,I3(r)),n.opacityExit=Xe((p=a.opacity)!=null?p:1,0,eE(r))):f&&(n.opacity=Xe((g=a.opacity)!=null?g:1,(m=i.opacity)!=null?m:1,r));for(let y=0;y<J3;y++){const v=`border${Vv[y]}Radius`;let b=ty(a,v),j=ty(i,v);if(b===void 0&&j===void 0)continue;b||(b=0),j||(j=0),b===0||j===0||ey(b)===ey(j)?(n[v]=Math.max(Xe(Ig(b),Ig(j),r),0),(Sn.test(j)||Sn.test(b))&&(n[v]+="%")):n[v]=j}(a.rotate||i.rotate)&&(n.rotate=Xe(a.rotate||0,i.rotate||0,r))}function ty(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const I3=_v(0,.5,Nx),eE=_v(.5,.95,tn);function _v(n,a,i){return r=>r<n?0:r>a?1:i(hl(n,a,r))}function ny(n,a){n.min=a.min,n.max=a.max}function Jt(n,a){ny(n.x,a.x),ny(n.y,a.y)}function ay(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function sy(n,a,i,r,o){return n-=a,n=ho(n,1/i,r),o!==void 0&&(n=ho(n,1/o,r)),n}function tE(n,a=0,i=1,r=.5,o,f=n,d=n){if(Sn.test(a)&&(a=parseFloat(a),a=Xe(d.min,d.max,a/100)-d.min),typeof a!="number")return;let p=Xe(f.min,f.max,r);n===f&&(p-=a),n.min=sy(n.min,a,i,p,o),n.max=sy(n.max,a,i,p,o)}function iy(n,a,[i,r,o],f,d){tE(n,a[i],a[r],a[o],a.scale,f,d)}const nE=["x","scaleX","originX"],aE=["y","scaleY","originY"];function ly(n,a,i,r){iy(n.x,a,nE,i?i.x:void 0,r?r.x:void 0),iy(n.y,a,aE,i?i.y:void 0,r?r.y:void 0)}function ry(n){return n.translate===0&&n.scale===1}function kv(n){return ry(n.x)&&ry(n.y)}function oy(n,a){return n.min===a.min&&n.max===a.max}function sE(n,a){return oy(n.x,a.x)&&oy(n.y,a.y)}function uy(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function Hv(n,a){return uy(n.x,a.x)&&uy(n.y,a.y)}function cy(n){return St(n.x)/St(n.y)}function dy(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class iE{constructor(){this.members=[]}add(a){sf(this.members,a),a.scheduleRender()}remove(a){if(lf(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(a){const i=this.members.findIndex(o=>a===o);if(i===0)return!1;let r;for(let o=i;o>=0;o--){const f=this.members[o];if(f.isPresent!==!1){r=f;break}}return r?(this.promote(r),!0):!1}promote(a,i){const r=this.lead;if(a!==r&&(this.prevLead=r,this.lead=a,a.show(),r)){r.instance&&r.scheduleRender(),a.scheduleRender(),a.resumeFrom=r,i&&(a.resumeFrom.preserveOpacity=!0),r.snapshot&&(a.snapshot=r.snapshot,a.snapshot.latestValues=r.animationValues||r.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:o}=a.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:i,resumingFrom:r}=a;i.onExitComplete&&i.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function lE(n,a,i){let r="";const o=n.x.translate/a.x,f=n.y.translate/a.y,d=(i==null?void 0:i.z)||0;if((o||f||d)&&(r=`translate3d(${o}px, ${f}px, ${d}px) `),(a.x!==1||a.y!==1)&&(r+=`scale(${1/a.x}, ${1/a.y}) `),i){const{transformPerspective:m,rotate:y,rotateX:v,rotateY:b,skewX:j,skewY:N}=i;m&&(r=`perspective(${m}px) ${r}`),y&&(r+=`rotate(${y}deg) `),v&&(r+=`rotateX(${v}deg) `),b&&(r+=`rotateY(${b}deg) `),j&&(r+=`skewX(${j}deg) `),N&&(r+=`skewY(${N}deg) `)}const p=n.x.scale*a.x,g=n.y.scale*a.y;return(p!==1||g!==1)&&(r+=`scale(${p}, ${g})`),r||"none"}const dd=["","X","Y","Z"],rE=1e3;let oE=0;function fd(n,a,i,r){const{latestValues:o}=a;o[n]&&(i[n]=o[n],a.setStaticValue(n,0),r&&(r[n]=0))}function Pv(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const i=Ev(a);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:o,layoutId:f}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",He,!(o||f))}const{parent:r}=n;r&&!r.hasCheckedOptimisedAppear&&Pv(r)}function qv({attachResizeListener:n,defaultParent:a,measureScroll:i,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(d={},p=a==null?void 0:a()){this.id=oE++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(dE),this.nodes.forEach(pE),this.nodes.forEach(gE),this.nodes.forEach(fE)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let g=0;g<this.path.length;g++)this.path[g].shouldResetTransform=!0;this.root===this&&(this.nodes=new Z3)}addEventListener(d,p){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new uf),this.eventHandlers.get(d).add(p)}notifyListeners(d,...p){const g=this.eventHandlers.get(d);g&&g.notify(...p)}hasListeners(d){return this.eventHandlers.has(d)}mount(d){if(this.instance)return;this.isSVG=av(d)&&!eT(d),this.instance=d;const{layoutId:p,layout:g,visualElement:m}=this.options;if(m&&!m.current&&m.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(g||p)&&(this.isLayoutDirty=!0),n){let y,v=0;const b=()=>this.root.updateBlockedByResize=!1;He.read(()=>{v=window.innerWidth}),n(d,()=>{const j=window.innerWidth;j!==v&&(v=j,this.root.updateBlockedByResize=!0,y&&y(),y=Q3(b,250),so.hasAnimatedSinceResize&&(so.hasAnimatedSinceResize=!1,this.nodes.forEach(my)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&m&&(p||g)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:v,hasRelativeLayoutChanged:b,layout:j})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const N=this.options.transition||m.getDefaultTransition()||wE,{onLayoutAnimationStart:E,onLayoutAnimationComplete:T}=m.getProps(),D=!this.targetLayout||!Hv(this.targetLayout,j),U=!v&&b;if(this.options.layoutRoot||this.resumeFrom||U||v&&(D||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const M=oe(K({},Sf(N,"layout")),{onPlay:E,onComplete:T});(m.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M),this.setAnimationOrigin(y,U)}else v||my(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=j})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ya(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yE),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const v=this.path[y];v.shouldResetTransform=!0,v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:p,layout:g}=this.options;if(p===void 0&&!g)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(fy);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(hy);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(mE),this.nodes.forEach(uE),this.nodes.forEach(cE)):this.nodes.forEach(hy),this.clearAllSnapshots();const p=Ct.now();ft.delta=Yn(0,1e3/60,p-ft.timestamp),ft.timestamp=p,ft.isProcessing=!0,Ic.update.process(ft),Ic.preRender.process(ft),Ic.render.process(ft),ft.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hE),this.sharedNodes.forEach(xE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,He.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){He.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!St(this.snapshot.measuredBox.x)&&!St(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let g=0;g<this.path.length;g++)this.path[g].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=We(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(p=!1),p&&this.instance){const g=r(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:g,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:g}}}resetTransform(){if(!o)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!kv(this.projectionDelta),g=this.getTransformTemplate(),m=g?g(this.latestValues,""):void 0,y=m!==this.prevTransformTemplateValue;d&&this.instance&&(p||Ha(this.latestValues)||y)&&(o(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const p=this.measurePageBox();let g=this.removeElementScroll(p);return d&&(g=this.removeTransform(g)),SE(g),{animationId:this.root.animationId,measuredBox:p,layoutBox:g,latestValues:{},source:this.id}}measurePageBox(){var m;const{visualElement:d}=this.options;if(!d)return We();const p=d.measureViewportBox();if(!(((m=this.scroll)==null?void 0:m.wasRoot)||this.path.some(jE))){const{scroll:y}=this.root;y&&(Hs(p.x,y.offset.x),Hs(p.y,y.offset.y))}return p}removeElementScroll(d){var g;const p=We();if(Jt(p,d),(g=this.scroll)!=null&&g.wasRoot)return p;for(let m=0;m<this.path.length;m++){const y=this.path[m],{scroll:v,options:b}=y;y!==this.root&&v&&b.layoutScroll&&(v.wasRoot&&Jt(p,d),Hs(p.x,v.offset.x),Hs(p.y,v.offset.y))}return p}applyTransform(d,p=!1){const g=We();Jt(g,d);for(let m=0;m<this.path.length;m++){const y=this.path[m];!p&&y.options.layoutScroll&&y.scroll&&y!==y.root&&Ps(g,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),Ha(y.latestValues)&&Ps(g,y.latestValues)}return Ha(this.latestValues)&&Ps(g,this.latestValues),g}removeTransform(d){const p=We();Jt(p,d);for(let g=0;g<this.path.length;g++){const m=this.path[g];if(!m.instance||!Ha(m.latestValues))continue;Bd(m.latestValues)&&m.updateSnapshot();const y=We(),v=m.measurePageBox();Jt(y,v),ly(p,m.latestValues,m.snapshot?m.snapshot.layoutBox:void 0,y)}return Ha(this.latestValues)&&ly(p,this.latestValues),p}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options=oe(K(K({},this.options),d),{crossfade:d.crossfade!==void 0?d.crossfade:!0})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ft.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var b;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==p;if(!(d||g&&this.isSharedProjectionDirty||this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:v}=this.options;if(!(!this.layout||!(y||v))){if(this.resolvedRelativeTargetAt=ft.timestamp,!this.targetDelta&&!this.relativeTarget){const j=this.getClosestProjectingParent();j&&j.layout&&this.animationProgress!==1?(this.relativeParent=j,this.forceRelativeParentToResolveTarget(),this.relativeTarget=We(),this.relativeTargetOrigin=We(),dl(this.relativeTargetOrigin,this.layout.layoutBox,j.layout.layoutBox),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=We(),this.targetWithTransforms=We()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),R3(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Jt(this.target,this.layout.layoutBox),bv(this.target,this.targetDelta)):Jt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const j=this.getClosestProjectingParent();j&&!!j.resumingFrom==!!this.resumingFrom&&!j.options.layoutScroll&&j.target&&this.animationProgress!==1?(this.relativeParent=j,this.forceRelativeParentToResolveTarget(),this.relativeTarget=We(),this.relativeTargetOrigin=We(),dl(this.relativeTargetOrigin,this.target,j.target),Jt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Bd(this.parent.latestValues)||vv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var N;const d=this.getLead(),p=!!this.resumingFrom||this!==d;let g=!0;if((this.isProjectionDirty||(N=this.parent)!=null&&N.isProjectionDirty)&&(g=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===ft.timestamp&&(g=!1),g)return;const{layout:m,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||y))return;Jt(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,b=this.treeScale.y;PT(this.layoutCorrected,this.treeScale,this.path,p),d.layout&&!d.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(d.target=d.layout.layoutBox,d.targetWithTransforms=We());const{target:j}=d;if(!j){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ay(this.prevProjectionDelta.x,this.projectionDelta.x),ay(this.prevProjectionDelta.y,this.projectionDelta.y)),cl(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==b||!dy(this.projectionDelta.x,this.prevProjectionDelta.x)||!dy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",j))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var p;if((p=this.options.visualElement)==null||p.scheduleRender(),d){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=qs(),this.projectionDelta=qs(),this.projectionDeltaWithTransform=qs()}setAnimationOrigin(d,p=!1){const g=this.snapshot,m=g?g.latestValues:{},y=K({},this.latestValues),v=qs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const b=We(),j=g?g.source:void 0,N=this.layout?this.layout.source:void 0,E=j!==N,T=this.getStack(),D=!T||T.members.length<=1,U=!!(E&&!D&&this.options.crossfade===!0&&!this.path.some(bE));this.animationProgress=0;let M;this.mixTargetDelta=H=>{const L=H/1e3;py(v.x,d.x,L),py(v.y,d.y,L),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(dl(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vE(this.relativeTarget,this.relativeTargetOrigin,b,L),M&&sE(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=We()),Jt(M,this.relativeTarget)),E&&(this.animationValues=y,W3(y,m,this.latestValues,L,U,D)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){var p,g,m;this.notifyListeners("animationStart"),(p=this.currentAnimation)==null||p.stop(),(m=(g=this.resumingFrom)==null?void 0:g.currentAnimation)==null||m.stop(),this.pendingAnimation&&(ya(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=He.update(()=>{so.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Xs(0)),this.currentAnimation=K3(this.motionValue,[0,1e3],oe(K({},d),{velocity:0,isSync:!0,onUpdate:y=>{this.mixTargetDelta(y),d.onUpdate&&d.onUpdate(y)},onStop:()=>{},onComplete:()=>{d.onComplete&&d.onComplete(),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(rE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:p,target:g,layout:m,latestValues:y}=d;if(!(!p||!g||!m)){if(this!==d&&this.layout&&m&&Yv(this.options.animationType,this.layout.layoutBox,m.layoutBox)){g=this.target||We();const v=St(this.layout.layoutBox.x);g.x.min=d.target.x.min,g.x.max=g.x.min+v;const b=St(this.layout.layoutBox.y);g.y.min=d.target.y.min,g.y.max=g.y.min+b}Jt(p,g),Ps(p,y),cl(this.projectionDeltaWithTransform,this.layoutCorrected,p,y)}}registerSharedNode(d,p){this.sharedNodes.has(d)||this.sharedNodes.set(d,new iE),this.sharedNodes.get(d).add(p);const m=p.options.initialPromotionConfig;p.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(p):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var p;const{layoutId:d}=this.options;return d?((p=this.getStack())==null?void 0:p.lead)||this:this}getPrevLead(){var p;const{layoutId:d}=this.options;return d?(p=this.getStack())==null?void 0:p.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:p,preserveFollowOpacity:g}={}){const m=this.getStack();m&&m.promote(this,g),d&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let p=!1;const{latestValues:g}=d;if((g.z||g.rotate||g.rotateX||g.rotateY||g.rotateZ||g.skewX||g.skewY)&&(p=!0),!p)return;const m={};g.z&&fd("z",d,m,this.animationValues);for(let y=0;y<dd.length;y++)fd(`rotate${dd[y]}`,d,m,this.animationValues),fd(`skew${dd[y]}`,d,m,this.animationValues);d.render();for(const y in m)d.setStaticValue(y,m[y]),this.animationValues&&(this.animationValues[y]=m[y]);d.scheduleRender()}applyProjectionStyles(d,p){var N,E;if(!this.instance||this.isSVG)return;if(!this.isVisible){d.visibility="hidden";return}const g=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,d.visibility="",d.opacity="",d.pointerEvents=ao(p==null?void 0:p.pointerEvents)||"",d.transform=g?g(this.latestValues,""):"none";return}const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=ao(p==null?void 0:p.pointerEvents)||""),this.hasProjected&&!Ha(this.latestValues)&&(d.transform=g?g({},""):"none",this.hasProjected=!1);return}d.visibility="";const y=m.animationValues||m.latestValues;this.applyTransformsToTarget();let v=lE(this.projectionDeltaWithTransform,this.treeScale,y);g&&(v=g(y,v)),d.transform=v;const{x:b,y:j}=this.projectionDelta;d.transformOrigin=`${b.origin*100}% ${j.origin*100}% 0`,m.animationValues?d.opacity=m===this?(E=(N=y.opacity)!=null?N:this.latestValues.opacity)!=null?E:1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:d.opacity=m===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const T in yl){if(y[T]===void 0)continue;const{correct:D,applyTo:U,isCSSVariable:M}=yl[T],H=v==="none"?y[T]:D(y[T],m);if(U){const L=U.length;for(let $=0;$<L;$++)d[U[$]]=H}else M?this.options.visualElement.renderState.vars[T]=H:d[T]=H}this.options.layoutId&&(d.pointerEvents=m===this?ao(p==null?void 0:p.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var p;return(p=d.currentAnimation)==null?void 0:p.stop()}),this.root.nodes.forEach(fy),this.root.sharedNodes.clear()}}}function uE(n){n.updateLayout()}function cE(n){var i;const a=((i=n.resumeFrom)==null?void 0:i.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&a&&n.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=n.layout,{animationType:f}=n.options,d=a.source!==n.layout.source;f==="size"?It(v=>{const b=d?a.measuredBox[v]:a.layoutBox[v],j=St(b);b.min=r[v].min,b.max=b.min+j}):Yv(f,a.layoutBox,r)&&It(v=>{const b=d?a.measuredBox[v]:a.layoutBox[v],j=St(r[v]);b.max=b.min+j,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[v].max=n.relativeTarget[v].min+j)});const p=qs();cl(p,r,a.layoutBox);const g=qs();d?cl(g,n.applyTransform(o,!0),a.measuredBox):cl(g,r,a.layoutBox);const m=!kv(p);let y=!1;if(!n.resumeFrom){const v=n.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:b,layout:j}=v;if(b&&j){const N=We();dl(N,a.layoutBox,b.layoutBox);const E=We();dl(E,r,j.layoutBox),Hv(N,E)||(y=!0),v.options.layoutRoot&&(n.relativeTarget=E,n.relativeTargetOrigin=N,n.relativeParent=v)}}}n.notifyListeners("didUpdate",{layout:r,snapshot:a,delta:g,layoutDelta:p,hasLayoutChanged:m,hasRelativeLayoutChanged:y})}else if(n.isLead()){const{onExitComplete:r}=n.options;r&&r()}n.options.transition=void 0}function dE(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function fE(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function hE(n){n.clearSnapshot()}function fy(n){n.clearMeasurements()}function hy(n){n.isLayoutDirty=!1}function mE(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function my(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function pE(n){n.resolveTargetDelta()}function gE(n){n.calcProjection()}function yE(n){n.resetSkewAndRotation()}function xE(n){n.removeLeadSnapshot()}function py(n,a,i){n.translate=Xe(a.translate,0,i),n.scale=Xe(a.scale,1,i),n.origin=a.origin,n.originPoint=a.originPoint}function gy(n,a,i,r){n.min=Xe(a.min,i.min,r),n.max=Xe(a.max,i.max,r)}function vE(n,a,i,r){gy(n.x,a.x,i.x,r),gy(n.y,a.y,i.y,r)}function bE(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const wE={duration:.45,ease:[.4,0,.1,1]},yy=n=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),xy=yy("applewebkit/")&&!yy("chrome/")?Math.round:tn;function vy(n){n.min=xy(n.min),n.max=xy(n.max)}function SE(n){vy(n.x),vy(n.y)}function Yv(n,a,i){return n==="position"||n==="preserve-aspect"&&!C3(cy(a),cy(i),.2)}function jE(n){var a;return n!==n.root&&((a=n.scroll)==null?void 0:a.wasRoot)}const NE=qv({attachResizeListener:(n,a)=>xl(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hd={current:void 0},Gv=qv({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!hd.current){const n=new NE({});n.mount(window),n.setOptions({layoutScroll:!0}),hd.current=n}return hd.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),TE={pan:{Feature:Y3},drag:{Feature:q3,ProjectionNode:Gv,MeasureLayout:Bv}};function by(n,a,i){const{props:r}=n;n.animationState&&r.whileHover&&n.animationState.setActive("whileHover",i==="Start");const o="onHover"+i,f=r[o];f&&He.postRender(()=>f(a,Cl(a)))}class EE extends va{mount(){const{current:a}=this.node;a&&(this.unmount=Z4(a,(i,r)=>(by(this.node,r,"Start"),o=>by(this.node,o,"End"))))}unmount(){}}class AE extends va{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch(i){a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Tl(xl(this.node.current,"focus",()=>this.onFocus()),xl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function wy(n,a,i){const{props:r}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&r.whileTap&&n.animationState.setActive("whileTap",i==="Start");const o="onTap"+(i==="End"?"":i),f=r[o];f&&He.postRender(()=>f(a,Cl(a)))}class CE extends va{mount(){const{current:a}=this.node;a&&(this.unmount=I4(a,(i,r)=>(wy(this.node,r,"Start"),(o,{success:f})=>wy(this.node,o,f?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Yd=new WeakMap,md=new WeakMap,RE=n=>{const a=Yd.get(n.target);a&&a(n)},DE=n=>{n.forEach(RE)};function ME(i){var r=i,{root:n}=r,a=ot(r,["root"]);const o=n||document;md.has(o)||md.set(o,{});const f=md.get(o),d=JSON.stringify(a);return f[d]||(f[d]=new IntersectionObserver(DE,K({root:n},a))),f[d]}function OE(n,a,i){const r=ME(a);return Yd.set(n,i),r.observe(n),()=>{Yd.delete(n),r.unobserve(n)}}const LE={some:0,all:1};class UE extends va{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:i,margin:r,amount:o="some",once:f}=a,d={root:i?i.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:LE[o]},p=g=>{const{isIntersecting:m}=g;if(this.isInView===m||(this.isInView=m,f&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:y,onViewportLeave:v}=this.node.getProps(),b=m?y:v;b&&b(g)};return OE(this.node.current,d,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;const{props:a,prevProps:i}=this.node;["amount","margin","root"].some(zE(a,i))&&this.startObserver()}unmount(){}}function zE({viewport:n={}},{viewport:a={}}={}){return i=>n[i]!==a[i]}const BE={inView:{Feature:UE},tap:{Feature:CE},focus:{Feature:AE},hover:{Feature:EE}},VE={layout:{ProjectionNode:Gv,MeasureLayout:Bv}},_E=K(K(K(K({},S3),BE),TE),VE),Wt=_T(_E,JT),kE=()=>{const[n,a]=S.useState(null),[i,r]=S.useState(!1),[o,f]=S.useState(!1),[d,p]=S.useState(0),[g,m]=S.useState(null),[y,v]=S.useState(""),b=S.useCallback(U=>{U.preventDefault(),U.stopPropagation(),U.type==="dragenter"||U.type==="dragover"?r(!0):U.type==="dragleave"&&r(!1)},[]),j=S.useCallback(U=>{if(U.preventDefault(),U.stopPropagation(),r(!1),U.dataTransfer.files&&U.dataTransfer.files[0]){const M=U.dataTransfer.files[0];N(M)&&(a(M),m(null),v(""))}},[]),N=U=>{const M=["application/zip","application/x-zip-compressed","application/x-tar","application/gzip","application/x-gzip"],H=[".zip",".tar",".tar.gz",".tgz"],L=U.name.toLowerCase();return M.includes(U.type)||H.some(G=>L.endsWith(G))?U.size>100*1024*1024?(v("File size must be less than 100MB"),m("error"),!1):!0:(v("Please select a valid ZIP or TAR file"),m("error"),!1)},E=U=>{const M=U.target.files[0];M&&N(M)&&(a(M),m(null),v(""))},T=()=>ve(null,null,function*(){var M,H;if(!n){v("Please select a file"),m("error");return}f(!0),p(0),m(null),v("");const U=new FormData;U.append("file",n);try{(yield ie.post(`${Ze}/api/db/import-database/`,U,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:$=>{const G=Math.round($.loaded*100/$.total);p(G)}})).status===200&&(m("success"),a(null),p(100))}catch(L){console.error("Upload failed:",L),m("error"),v(((H=(M=L.response)==null?void 0:M.data)==null?void 0:H.message)||"Failed to import database. Please try again.")}finally{f(!1)}}),D=()=>{a(null),m(null),v(""),p(0)};return c.jsx("div",{className:"container mx-auto px-4 py-8",children:c.jsxs(Wt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"max-w-2xl mx-auto",children:[c.jsxs("div",{className:"text-center mb-8",children:[c.jsx(Wt.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring",stiffness:200},className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:c.jsx("svg",{className:"w-8 h-8 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})})}),c.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Import Database"}),c.jsx("p",{className:"text-gray-600",children:"Upload a ZIP or TAR file containing your exported database"})]}),c.jsx(Wt.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.3,duration:.5},className:"mb-6",children:c.jsxs("div",{className:`relative border-2 border-dashed rounded-xl p-8 transition-all duration-300 ${i?"border-blue-500 bg-blue-50":n?"border-green-500 bg-green-50":"border-gray-300 hover:border-gray-400"}`,onDragEnter:b,onDragLeave:b,onDragOver:b,onDrop:j,children:[c.jsx("input",{type:"file",id:"file-upload",className:"sr-only",accept:".zip,.tar,.tar.gz,.tgz",onChange:E,disabled:o}),c.jsx(id,{mode:"wait",children:n?c.jsxs(Wt.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"flex items-center justify-between bg-white rounded-lg p-4 shadow-sm",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mr-3",children:c.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-gray-900",children:n.name}),c.jsxs("p",{className:"text-sm text-gray-500",children:[(n.size/1024/1024).toFixed(2)," MB"]})]})]}),!o&&c.jsx("button",{onClick:D,className:"text-red-500 hover:text-red-700 transition-colors",children:c.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]},"file-selected"):c.jsxs(Wt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"text-center",children:[c.jsx(Wt.div,{animate:i?{scale:1.1}:{scale:1},transition:{type:"spring",stiffness:300},children:c.jsx("svg",{className:"w-12 h-12 text-gray-400 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}),c.jsx("p",{className:"text-lg font-medium text-gray-700 mb-2",children:i?"Drop your file here":"Drag and drop your file here"}),c.jsx("p",{className:"text-gray-500 mb-4",children:"or"}),c.jsxs("label",{htmlFor:"file-upload",className:"bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg cursor-pointer transition-colors inline-flex items-center",children:[c.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),"Choose File"]}),c.jsx("p",{className:"text-sm text-gray-500 mt-4",children:"Supports ZIP and TAR files (max 100MB)"})]},"upload-prompt")})]})}),c.jsx(id,{children:o&&c.jsx(Wt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mb-6",children:c.jsxs("div",{className:"bg-white rounded-lg p-4 shadow-sm border",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Uploading..."}),c.jsxs("span",{className:"text-sm text-gray-500",children:[d,"%"]})]}),c.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:c.jsx(Wt.div,{className:"bg-blue-600 h-2 rounded-full",initial:{width:0},animate:{width:`${d}%`},transition:{duration:.3}})})]})})}),c.jsx(id,{children:g&&c.jsxs(Wt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:`mb-6 p-4 rounded-lg ${g==="success"?"bg-green-50 border border-green-200":"bg-red-50 border border-red-200"}`,children:[c.jsxs("div",{className:"flex items-center",children:[g==="success"?c.jsx("svg",{className:"w-5 h-5 text-green-600 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}):c.jsx("svg",{className:"w-5 h-5 text-red-600 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),c.jsx("p",{className:`font-medium ${g==="success"?"text-green-800":"text-red-800"}`,children:g==="success"?"Database imported successfully!":"Import failed"})]}),y&&c.jsx("p",{className:"text-red-700 mt-1 text-sm",children:y})]})}),c.jsx(Wt.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.4,duration:.5},className:"text-center",children:c.jsx("button",{onClick:T,disabled:!n||o,className:`w-full py-4 px-6 rounded-lg font-medium transition-all duration-300 ${!n||o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-blue-600 hover:bg-blue-700 text-white hover:shadow-lg transform hover:scale-105"}`,children:o?c.jsxs("div",{className:"flex items-center justify-center",children:[c.jsx(Wt.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full mr-2"}),"Importing Database..."]}):c.jsxs("div",{className:"flex items-center justify-center",children:[c.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Import Database"]})})}),c.jsxs(Wt.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.5,duration:.5},className:"mt-8 bg-gray-50 rounded-lg p-6",children:[c.jsx("h3",{className:"font-medium text-gray-900 mb-3",children:"Import Guidelines"}),c.jsxs("ul",{className:"space-y-2 text-sm text-gray-600",children:[c.jsxs("li",{className:"flex items-start",children:[c.jsx("svg",{className:"w-4 h-4 text-blue-500 mr-2 mt-0.5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),"Only ZIP and TAR compressed files are supported"]}),c.jsxs("li",{className:"flex items-start",children:[c.jsx("svg",{className:"w-4 h-4 text-blue-500 mr-2 mt-0.5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),"Only use files exported from AxioDB"]}),c.jsxs("li",{className:"flex items-start",children:[c.jsx("svg",{className:"w-4 h-4 text-blue-500 mr-2 mt-0.5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),"Importing will create a new database in your system"]})]})]})]})})},HE=()=>{const[n,a]=S.useState(""),[i,r]=S.useState(""),[o,f]=S.useState(""),[d,p]=S.useState(!1),g=Xn(),m=qn(v=>v.setSession),y=v=>ve(null,null,function*(){var b,j;if(v.preventDefault(),!n.trim()||!i){f("Username and password are required");return}p(!0),f("");try{const N=yield en.login(n,i),{username:E,role:T,permissions:D,mustChangePassword:U}=N.data.data;m({username:E,role:T,permissions:D,mustChangePassword:U}),g(U?"/force-password-change":"/",{replace:!0})}catch(N){f(((j=(b=N.response)==null?void 0:b.data)==null?void 0:j.message)||"Login failed. Please try again."),p(!1)}});return c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-blue-700 to-indigo-800 px-4",children:c.jsxs("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full p-8 animate-fadeIn",children:[c.jsxs("div",{className:"flex flex-col items-center mb-6",children:[c.jsx("img",{src:"/AXioDB.png",alt:"AxioDB Logo",className:"h-12 w-12 mb-3"}),c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"AxioDB Control Hub"}),c.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Sign in to manage your databases"})]}),c.jsxs("form",{onSubmit:y,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-gray-700 mb-1",children:"Username"}),c.jsx("input",{type:"text",id:"username",value:n,onChange:v=>a(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter your username",disabled:d,autoFocus:!0})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),c.jsx("input",{type:"password",id:"password",value:i,onChange:v=>r(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter your password",disabled:d})]}),o&&c.jsx("p",{className:"mb-4 text-sm text-red-600",children:o}),c.jsx("button",{type:"submit",className:`w-full px-4 py-2 bg-blue-700 text-white rounded hover:bg-blue-800 transition-colors flex items-center justify-center ${d?"opacity-75 cursor-not-allowed":""}`,disabled:d,children:d?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Signing in..."]}):"Sign In"})]})]})})},Sy=4,PE=()=>{const[n,a]=S.useState(""),[i,r]=S.useState(""),[o,f]=S.useState(""),[d,p]=S.useState(""),[g,m]=S.useState(!1),y=Xn(),v=qn(j=>j.setSession),b=j=>ve(null,null,function*(){var N,E;if(j.preventDefault(),!n||!i||!o){p("All fields are required");return}if(i.length<Sy){p(`New password must be at least ${Sy} characters`);return}if(i!==o){p("New password and confirmation do not match");return}m(!0),p("");try{const T=yield en.changePassword(n,i),{username:D,role:U,permissions:M,mustChangePassword:H}=T.data.data;v({username:D,role:U,permissions:M,mustChangePassword:H}),y("/",{replace:!0})}catch(T){p(((E=(N=T.response)==null?void 0:N.data)==null?void 0:E.message)||"Failed to change password. Please try again."),m(!1)}});return c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-blue-700 to-indigo-800 px-4",children:c.jsxs("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full p-8 animate-fadeIn",children:[c.jsx("h1",{className:"text-xl font-bold text-gray-900 mb-1",children:"Change Your Password"}),c.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"For security, you must set a new password before continuing."}),c.jsxs("form",{onSubmit:b,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"currentPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"Current Password"}),c.jsx("input",{type:"password",id:"currentPassword",value:n,onChange:j=>a(j.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:g,autoFocus:!0})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"newPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"New Password"}),c.jsx("input",{type:"password",id:"newPassword",value:i,onChange:j=>r(j.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:g})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"Confirm New Password"}),c.jsx("input",{type:"password",id:"confirmPassword",value:o,onChange:j=>f(j.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:g})]}),d&&c.jsx("p",{className:"mb-4 text-sm text-red-600",children:d}),c.jsx("button",{type:"submit",className:`w-full px-4 py-2 bg-blue-700 text-white rounded hover:bg-blue-800 transition-colors flex items-center justify-center ${g?"opacity-75 cursor-not-allowed":""}`,disabled:g,children:g?"Updating...":"Update Password"})]})]})})},jy=4,qE=({isOpen:n,onClose:a,onUserCreated:i,roles:r})=>{var T;const[o,f]=S.useState(""),[d,p]=S.useState(""),[g,m]=S.useState(""),[y,v]=S.useState(!1),[b,j]=S.useState(""),N=()=>{f(""),p(""),m(""),j(""),v(!1),a()},E=D=>ve(null,null,function*(){var M,H,L;if(D.preventDefault(),!o.trim()){j("Username is required");return}if(!/^[a-zA-Z0-9_]+$/.test(o)){j("Username can only contain letters, numbers, and underscores");return}if(!d||d.length<jy){j(`Password must be at least ${jy} characters`);return}const U=g||((M=r==null?void 0:r[0])==null?void 0:M.roleName);if(!U){j("Role is required");return}v(!0),j("");try{yield en.createUser(o,d,U),i(),N()}catch($){j(((L=(H=$.response)==null?void 0:H.data)==null?void 0:L.message)||"Failed to create user. Please try again."),v(!1)}});return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 animate-fadeIn",children:c.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6",children:[c.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Create New User"}),c.jsxs("form",{onSubmit:E,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"newUsername",className:"block text-sm font-medium text-gray-700 mb-1",children:"Username"}),c.jsx("input",{type:"text",id:"newUsername",value:o,onChange:D=>f(D.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter username",disabled:y})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"newPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"Temporary Password"}),c.jsx("input",{type:"password",id:"newPassword",value:d,onChange:D=>p(D.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter a temporary password",disabled:y}),c.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"The user will be required to change this on first login."})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"newUserRole",className:"block text-sm font-medium text-gray-700 mb-1",children:"Role"}),c.jsx("select",{id:"newUserRole",value:g||((T=r==null?void 0:r[0])==null?void 0:T.roleName)||"",onChange:D=>m(D.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",disabled:y,children:r==null?void 0:r.map(D=>c.jsx("option",{value:D.roleName,children:D.roleName},D.roleName))})]}),b&&c.jsx("p",{className:"mt-2 text-sm text-red-600",children:b}),c.jsxs("div",{className:"flex justify-end space-x-4 mt-6",children:[c.jsx("button",{type:"button",onClick:N,className:"px-4 py-2 text-gray-700 hover:text-gray-900 transition-colors",disabled:y,children:"Cancel"}),c.jsx("button",{type:"submit",className:`px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors flex items-center ${y?"opacity-75 cursor-not-allowed":""}`,disabled:y,children:y?c.jsxs(c.Fragment,{children:[c.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Creating..."]}):"Create User"})]})]})]})}):null},YE=({isOpen:n,onClose:a,onRoleCreated:i})=>{const[r,o]=S.useState(""),[f,d]=S.useState([]),[p,g]=S.useState([]),[m,y]=S.useState(!1),[v,b]=S.useState(!1),[j,N]=S.useState("");S.useEffect(()=>{n&&(y(!0),en.listPermissions().then(H=>d(H.data.data||[])).catch(()=>N("Failed to load permission catalogue")).finally(()=>y(!1)))},[n]);const E=()=>{o(""),g([]),N(""),b(!1),a()},T=H=>{g(L=>L.includes(H)?L.filter($=>$!==H):[...L,H])},D=(H,L)=>{g($=>L?$.filter(G=>!H.includes(G)):[...new Set([...$,...H])])},U=f.reduce((H,L)=>(H[L.group]=H[L.group]||[],H[L.group].push(L),H),{}),M=H=>ve(null,null,function*(){var L,$;if(H.preventDefault(),!r.trim()){N("Role name is required");return}if(p.length===0){N("Select at least one permission");return}b(!0),N("");try{yield en.createRole(r,p),i(),E()}catch(G){N((($=(L=G.response)==null?void 0:L.data)==null?void 0:$.message)||"Failed to create role. Please try again."),b(!1)}});return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 animate-fadeIn",children:c.jsxs("div",{className:"bg-white rounded-lg max-w-lg w-full p-6 max-h-[85vh] overflow-y-auto",children:[c.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Create New Role"}),c.jsxs("form",{onSubmit:M,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"roleName",className:"block text-sm font-medium text-gray-700 mb-1",children:"Role Name"}),c.jsx("input",{type:"text",id:"roleName",value:r,onChange:H=>o(H.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"e.g. Auditor",disabled:v})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("span",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Permissions"}),m?c.jsxs("div",{className:"animate-pulse space-y-2",children:[c.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),c.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3"})]}):c.jsx("div",{className:"space-y-3",children:Object.entries(U).map(([H,L])=>{const $=L.map(Z=>Z.key),G=$.every(Z=>p.includes(Z));return c.jsxs("div",{className:"border border-gray-200 rounded-md p-3",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("span",{className:"text-sm font-semibold text-gray-800",children:H}),c.jsx("button",{type:"button",onClick:()=>D($,G),className:"text-xs text-blue-600 hover:text-blue-800",children:G?"Clear all":"Select all"})]}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-1",children:L.map(Z=>c.jsxs("label",{className:"flex items-center space-x-2 text-sm text-gray-700",title:Z.description,children:[c.jsx("input",{type:"checkbox",checked:p.includes(Z.key),onChange:()=>T(Z.key),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),c.jsx("span",{children:Z.key})]},Z.key))})]},H)})})]}),j&&c.jsx("p",{className:"mt-2 text-sm text-red-600",children:j}),c.jsxs("div",{className:"flex justify-end space-x-4 mt-6",children:[c.jsx("button",{type:"button",onClick:E,className:"px-4 py-2 text-gray-700 hover:text-gray-900 transition-colors",disabled:v,children:"Cancel"}),c.jsx("button",{type:"submit",className:`px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors ${v?"opacity-75 cursor-not-allowed":""}`,disabled:v,children:v?"Creating...":"Create Role"})]})]})]})}):null},Ny=4,GE=({isOpen:n,username:a,onClose:i,onPasswordReset:r})=>{const[o,f]=S.useState(""),[d,p]=S.useState(!1),[g,m]=S.useState(""),y=()=>{f(""),m(""),p(!1),i()},v=b=>ve(null,null,function*(){var j,N;if(b.preventDefault(),!o||o.length<Ny){m(`New password must be at least ${Ny} characters`);return}p(!0),m("");try{yield en.resetUserPassword(a,o),r(),y()}catch(E){m(((N=(j=E.response)==null?void 0:j.data)==null?void 0:N.message)||"Failed to reset password. Please try again."),p(!1)}});return n?c.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 animate-fadeIn",children:c.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6",children:[c.jsxs("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:["Reset Password for ",a]}),c.jsxs("form",{onSubmit:v,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{htmlFor:"resetNewPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"New Password"}),c.jsx("input",{type:"password",id:"resetNewPassword",value:o,onChange:b=>f(b.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Enter a new temporary password",disabled:d}),c.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"The user will be required to change this on their next login."})]}),g&&c.jsx("p",{className:"mt-2 text-sm text-red-600",children:g}),c.jsxs("div",{className:"flex justify-end space-x-4 mt-6",children:[c.jsx("button",{type:"button",onClick:y,className:"px-4 py-2 text-gray-700 hover:text-gray-900 transition-colors",disabled:d,children:"Cancel"}),c.jsx("button",{type:"submit",className:`px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors ${d?"opacity-75 cursor-not-allowed":""}`,disabled:d,children:d?"Resetting...":"Reset Password"})]})]})]})}):null},XE=()=>{const n=qn(G=>G.permissions),[a,i]=S.useState([]),[r,o]=S.useState([]),[f,d]=S.useState(!0),[p,g]=S.useState(""),[m,y]=S.useState(!1),[v,b]=S.useState(!1),[j,N]=S.useState(null),E=n.includes("user:create"),T=n.includes("user:delete"),D=n.includes("user:update-role"),U=n.includes("user:reset-password"),M=n.includes("role:create"),H=()=>ve(null,null,function*(){var G,Z;d(!0),g("");try{const[se,he]=yield Promise.all([en.listUsers(),en.listRoles()]);i(se.data.data||[]),o(he.data.data||[])}catch(se){g(((Z=(G=se.response)==null?void 0:G.data)==null?void 0:Z.message)||"Failed to load users and roles")}finally{d(!1)}});S.useEffect(()=>{H()},[]);const L=(G,Z)=>ve(null,null,function*(){var se,he;try{yield en.updateUserRole(G,Z),H()}catch(me){g(((he=(se=me.response)==null?void 0:se.data)==null?void 0:he.message)||"Failed to update role")}}),$=G=>ve(null,null,function*(){var Z,se;if(window.confirm(`Delete user "${G}"? This cannot be undone.`))try{yield en.deleteUser(G),H()}catch(he){g(((se=(Z=he.response)==null?void 0:Z.data)==null?void 0:se.message)||"Failed to delete user")}});return c.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-6",children:"User & Role Management"}),p&&c.jsx("p",{className:"mb-4 text-sm text-red-600",children:p}),c.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-8",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Users"}),E&&c.jsx("button",{onClick:()=>y(!0),className:"px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors text-sm",children:"+ Create User"})]}),f?c.jsxs("div",{className:"animate-pulse space-y-3",children:[c.jsx("div",{className:"h-10 bg-gray-200 rounded"}),c.jsx("div",{className:"h-10 bg-gray-200 rounded"})]}):c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase",children:"Username"}),c.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase",children:"Role"}),c.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase",children:"Status"}),c.jsx("th",{className:"px-4 py-2 text-right text-xs font-medium text-gray-500 uppercase",children:"Actions"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-100",children:a.map(G=>c.jsxs("tr",{children:[c.jsx("td",{className:"px-4 py-3 text-sm text-gray-900",children:G.username}),c.jsx("td",{className:"px-4 py-3 text-sm",children:D?c.jsx("select",{value:G.role,onChange:Z=>L(G.username,Z.target.value),className:"border border-gray-300 rounded-md px-2 py-1 text-sm",children:r.map(Z=>c.jsx("option",{value:Z.roleName,children:Z.roleName},Z.roleName))}):c.jsx("span",{className:"inline-block px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 rounded",children:G.role})}),c.jsx("td",{className:"px-4 py-3 text-sm",children:G.mustChangePassword?c.jsx("span",{className:"inline-block px-2 py-1 text-xs font-medium bg-yellow-100 text-yellow-800 rounded",children:"Must change password"}):c.jsx("span",{className:"inline-block px-2 py-1 text-xs font-medium bg-green-100 text-green-800 rounded",children:"Active"})}),c.jsxs("td",{className:"px-4 py-3 text-sm text-right space-x-3 whitespace-nowrap",children:[U&&c.jsx("button",{onClick:()=>N(G.username),className:"text-blue-600 hover:text-blue-800",children:"Reset Password"}),T&&c.jsx("button",{onClick:()=>$(G.username),className:"text-red-600 hover:text-red-800",children:"Delete"})]})]},G.username))})]})})]}),c.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Roles"}),M&&c.jsx("button",{onClick:()=>b(!0),className:"px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 transition-colors text-sm",children:"+ Create Role"})]}),c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase",children:"Role Name"}),c.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase",children:"Permissions"}),c.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase",children:"Type"})]})}),c.jsx("tbody",{className:"divide-y divide-gray-100",children:r.map(G=>c.jsxs("tr",{children:[c.jsx("td",{className:"px-4 py-3 text-sm text-gray-900 font-medium",children:G.roleName}),c.jsxs("td",{className:"px-4 py-3 text-sm text-gray-600",children:[G.permissions.length," permissions"]}),c.jsx("td",{className:"px-4 py-3 text-sm",children:G.isSystemRole?c.jsx("span",{className:"inline-block px-2 py-1 text-xs font-medium bg-gray-100 text-gray-700 rounded",children:"System"}):c.jsx("span",{className:"inline-block px-2 py-1 text-xs font-medium bg-purple-100 text-purple-800 rounded",children:"Custom"})})]},G.roleName))})]})})]}),c.jsx(qE,{isOpen:m,onClose:()=>y(!1),onUserCreated:H,roles:r}),c.jsx(YE,{isOpen:v,onClose:()=>b(!1),onRoleCreated:H}),c.jsx(GE,{isOpen:!!j,username:j,onClose:()=>N(null),onPasswordReset:H})]})},FE=()=>c.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-16 text-center",children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Access Denied"}),c.jsx("p",{className:"text-gray-600",children:"Your role does not have permission to view this page."})]}),vn=({children:n,requiredPermission:a})=>{const{isAuthenticated:i,isLoading:r,mustChangePassword:o,permissions:f}=qn(p=>p),d=an();return r?c.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:c.jsx("div",{className:"animate-spin h-8 w-8 border-4 border-blue-600 border-t-transparent rounded-full"})}):i?o&&d.pathname!=="/force-password-change"?c.jsx(ig,{to:"/force-password-change",replace:!0}):a&&!f.includes(a)?c.jsx(FE,{}):n:c.jsx(ig,{to:"/login",replace:!0})},KE=["/login","/force-password-change"];function $E(){const n=an(),a=qn(o=>o.setSession),i=qn(o=>o.clearSession),r=!KE.includes(n.pathname);return S.useEffect(()=>{en.fetchMe().then(o=>{const{username:f,role:d,permissions:p,mustChangePassword:g}=o.data.data;a({username:f,role:d,permissions:p,mustChangePassword:g})}).catch(()=>{i()})},[]),c.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col",children:[r&&c.jsx(Nj,{}),c.jsx("main",{className:"flex-grow",children:c.jsxs(kS,{children:[c.jsx(kt,{path:"/login",element:c.jsx(HE,{})}),c.jsx(kt,{path:"/force-password-change",element:c.jsx(PE,{})}),c.jsx(kt,{path:"/",element:c.jsx(vn,{children:c.jsx(Fj,{})})}),c.jsx(kt,{path:"/operations",element:c.jsx(vn,{children:c.jsx(Qj,{})})}),c.jsx(kt,{path:"/collections",element:c.jsx(vn,{children:c.jsx(Ij,{})})}),c.jsx(kt,{path:"/documents",element:c.jsx(vn,{children:c.jsx(ug,{})})}),c.jsx(kt,{path:"/api",element:c.jsx(vn,{children:c.jsx(sN,{})})}),c.jsx(kt,{path:"/support",element:c.jsx(vn,{children:c.jsx(iN,{})})}),c.jsx(kt,{path:"/status",element:c.jsx(vn,{children:c.jsx(lN,{})})}),c.jsx(kt,{path:"/import",element:c.jsx(vn,{children:c.jsx(kE,{})})}),c.jsx(kt,{path:"/collections/documents",element:c.jsx(vn,{children:c.jsx(ug,{})})}),c.jsx(kt,{path:"/users",element:c.jsx(vn,{requiredPermission:"user:view",children:c.jsx(XE,{})})})]})}),r&&c.jsx(vj,{})]})}function ZE(){return c.jsx(uj,{children:c.jsx($E,{})})}ie.defaults.withCredentials=!0;ie.interceptors.response.use(n=>n,n=>{var a;return((a=n.response)==null?void 0:a.status)===401&&qn.getState().clearSession(),Promise.reject(n)});S2.createRoot(document.getElementById("root")).render(c.jsx(S.StrictMode,{children:c.jsx(ZE,{})}))});export default QE();
|