@xpert-ai/chatkit-wps-addin 0.11.2 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var wg=Object.defineProperty;var Qd=r=>{throw TypeError(r)};var Rg=(r,u,s)=>u in r?wg(r,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[u]=s;var St=(r,u,s)=>Rg(r,typeof u!="symbol"?u+"":u,s),Kd=(r,u,s)=>u.has(r)||Qd("Cannot "+s);var ei=(r,u,s)=>(Kd(r,u,"read from private field"),s?s.call(r):u.get(r)),Ru=(r,u,s)=>u.has(r)?Qd("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(r):u.set(r,s),Uu=(r,u,s,c)=>(Kd(r,u,"write to private field"),c?c.call(r,s):u.set(r,s),s);import{g as ea,a as li,b as Ug,r as Ng}from"./wps-api-DgiVmik0.js";function Hg(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var dr={exports:{}},ni={};/**
1
+ var Rp=Object.defineProperty;var Qd=r=>{throw TypeError(r)};var Up=(r,u,s)=>u in r?Rp(r,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[u]=s;var St=(r,u,s)=>Up(r,typeof u!="symbol"?u+"":u,s),Kd=(r,u,s)=>u.has(r)||Qd("Cannot "+s);var ei=(r,u,s)=>(Kd(r,u,"read from private field"),s?s.call(r):u.get(r)),Ru=(r,u,s)=>u.has(r)?Qd("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(r):u.set(r,s),Uu=(r,u,s,c)=>(Kd(r,u,"write to private field"),c?c.call(r,s):u.set(r,s),s);import{g as ea,a as li,b as Np,r as Hp}from"./wps-api-DgiVmik0.js";function Bp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var dr={exports:{}},ni={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var wg=Object.defineProperty;var Qd=r=>{throw TypeError(r)};var Rg=(r,u,s)=>u in
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Vd;function Bg(){if(Vd)return ni;Vd=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function s(c,f,d){var y=null;if(d!==void 0&&(y=""+d),f.key!==void 0&&(y=""+f.key),"key"in f){d={};for(var g in f)g!=="key"&&(d[g]=f[g])}else d=f;return f=d.ref,{$$typeof:r,type:c,key:y,ref:f!==void 0?f:null,props:d}}return ni.Fragment=u,ni.jsx=s,ni.jsxs=s,ni}var Zd;function Lg(){return Zd||(Zd=1,dr.exports=Bg()),dr.exports}var K=Lg(),mr={exports:{}},V={};/**
9
+ */var Vd;function Lp(){if(Vd)return ni;Vd=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function s(c,f,d){var y=null;if(d!==void 0&&(y=""+d),f.key!==void 0&&(y=""+f.key),"key"in f){d={};for(var p in f)p!=="key"&&(d[p]=f[p])}else d=f;return f=d.ref,{$$typeof:r,type:c,key:y,ref:f!==void 0?f:null,props:d}}return ni.Fragment=u,ni.jsx=s,ni.jsxs=s,ni}var Zd;function jp(){return Zd||(Zd=1,dr.exports=Lp()),dr.exports}var K=jp(),mr={exports:{}},V={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var wg=Object.defineProperty;var Qd=r=>{throw TypeError(r)};var Rg=(r,u,s)=>u in
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Jd;function jg(){if(Jd)return V;Jd=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),y=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),W=Symbol.iterator;function ct(v){return v===null||typeof v!="object"?null:(v=W&&v[W]||v["@@iterator"],typeof v=="function"?v:null)}var Et={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ut=Object.assign,Mt={};function Tt(v,w,N){this.props=v,this.context=w,this.refs=Mt,this.updater=N||Et}Tt.prototype.isReactComponent={},Tt.prototype.setState=function(v,w){if(typeof v!="object"&&typeof v!="function"&&v!=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,v,w,"setState")},Tt.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function Ut(){}Ut.prototype=Tt.prototype;function Nt(v,w,N){this.props=v,this.context=w,this.refs=Mt,this.updater=N||Et}var ee=Nt.prototype=new Ut;ee.constructor=Nt,ut(ee,Tt.prototype),ee.isPureReactComponent=!0;var le=Array.isArray;function Xt(){}var $={H:null,A:null,T:null,S:null},Ct=Object.prototype.hasOwnProperty;function Xe(v,w,N){var L=N.ref;return{$$typeof:r,type:v,key:w,ref:L!==void 0?L:null,props:N}}function pn(v,w){return Xe(v.type,w,v.props)}function Ge(v){return typeof v=="object"&&v!==null&&v.$$typeof===r}function ne(v){var w={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(N){return w[N]})}var Jl=/\/+/g;function $e(v,w){return typeof v=="object"&&v!==null&&v.key!=null?ne(""+v.key):w.toString(36)}function He(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(Xt,Xt):(v.status="pending",v.then(function(w){v.status==="pending"&&(v.status="fulfilled",v.value=w)},function(w){v.status==="pending"&&(v.status="rejected",v.reason=w)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function z(v,w,N,L,Z){var F=typeof v;(F==="undefined"||F==="boolean")&&(v=null);var rt=!1;if(v===null)rt=!0;else switch(F){case"bigint":case"string":case"number":rt=!0;break;case"object":switch(v.$$typeof){case r:case u:rt=!0;break;case H:return rt=v._init,z(rt(v._payload),w,N,L,Z)}}if(rt)return Z=Z(v),rt=L===""?"."+$e(v,0):L,le(Z)?(N="",rt!=null&&(N=rt.replace(Jl,"$&/")+"/"),z(Z,w,N,"",function(ca){return ca})):Z!=null&&(Ge(Z)&&(Z=pn(Z,N+(Z.key==null||v&&v.key===Z.key?"":(""+Z.key).replace(Jl,"$&/")+"/")+rt)),w.push(Z)),1;rt=0;var Pt=L===""?".":L+":";if(le(v))for(var Dt=0;Dt<v.length;Dt++)L=v[Dt],F=Pt+$e(L,Dt),rt+=z(L,w,N,F,Z);else if(Dt=ct(v),typeof Dt=="function")for(v=Dt.call(v),Dt=0;!(L=v.next()).done;)L=L.value,F=Pt+$e(L,Dt++),rt+=z(L,w,N,F,Z);else if(F==="object"){if(typeof v.then=="function")return z(He(v),w,N,L,Z);throw w=String(v),Error("Objects are not valid as a React child (found: "+(w==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":w)+"). If you meant to render a collection of children, use an array instead.")}return rt}function U(v,w,N){if(v==null)return v;var L=[],Z=0;return z(v,L,"","",function(F){return w.call(N,F,Z++)}),L}function Q(v){if(v._status===-1){var w=v._result;w=w(),w.then(function(N){(v._status===0||v._status===-1)&&(v._status=1,v._result=N)},function(N){(v._status===0||v._status===-1)&&(v._status=2,v._result=N)}),v._status===-1&&(v._status=0,v._result=w)}if(v._status===1)return v._result.default;throw v._result}var ht=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var w=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(w))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},pt={map:U,forEach:function(v,w,N){U(v,function(){w.apply(this,arguments)},N)},count:function(v){var w=0;return U(v,function(){w++}),w},toArray:function(v){return U(v,function(w){return w})||[]},only:function(v){if(!Ge(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return V.Activity=R,V.Children=pt,V.Component=Tt,V.Fragment=s,V.Profiler=f,V.PureComponent=Nt,V.StrictMode=c,V.Suspense=E,V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,V.__COMPILER_RUNTIME={__proto__:null,c:function(v){return $.H.useMemoCache(v)}},V.cache=function(v){return function(){return v.apply(null,arguments)}},V.cacheSignal=function(){return null},V.cloneElement=function(v,w,N){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var L=ut({},v.props),Z=v.key;if(w!=null)for(F in w.key!==void 0&&(Z=""+w.key),w)!Ct.call(w,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&w.ref===void 0||(L[F]=w[F]);var F=arguments.length-2;if(F===1)L.children=N;else if(1<F){for(var rt=Array(F),Pt=0;Pt<F;Pt++)rt[Pt]=arguments[Pt+2];L.children=rt}return Xe(v.type,Z,L)},V.createContext=function(v){return v={$$typeof:y,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:d,_context:v},v},V.createElement=function(v,w,N){var L,Z={},F=null;if(w!=null)for(L in w.key!==void 0&&(F=""+w.key),w)Ct.call(w,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(Z[L]=w[L]);var rt=arguments.length-2;if(rt===1)Z.children=N;else if(1<rt){for(var Pt=Array(rt),Dt=0;Dt<rt;Dt++)Pt[Dt]=arguments[Dt+2];Z.children=Pt}if(v&&v.defaultProps)for(L in rt=v.defaultProps,rt)Z[L]===void 0&&(Z[L]=rt[L]);return Xe(v,F,Z)},V.createRef=function(){return{current:null}},V.forwardRef=function(v){return{$$typeof:g,render:v}},V.isValidElement=Ge,V.lazy=function(v){return{$$typeof:H,_payload:{_status:-1,_result:v},_init:Q}},V.memo=function(v,w){return{$$typeof:b,type:v,compare:w===void 0?null:w}},V.startTransition=function(v){var w=$.T,N={};$.T=N;try{var L=v(),Z=$.S;Z!==null&&Z(N,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(Xt,ht)}catch(F){ht(F)}finally{w!==null&&N.types!==null&&(w.types=N.types),$.T=w}},V.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},V.use=function(v){return $.H.use(v)},V.useActionState=function(v,w,N){return $.H.useActionState(v,w,N)},V.useCallback=function(v,w){return $.H.useCallback(v,w)},V.useContext=function(v){return $.H.useContext(v)},V.useDebugValue=function(){},V.useDeferredValue=function(v,w){return $.H.useDeferredValue(v,w)},V.useEffect=function(v,w){return $.H.useEffect(v,w)},V.useEffectEvent=function(v){return $.H.useEffectEvent(v)},V.useId=function(){return $.H.useId()},V.useImperativeHandle=function(v,w,N){return $.H.useImperativeHandle(v,w,N)},V.useInsertionEffect=function(v,w){return $.H.useInsertionEffect(v,w)},V.useLayoutEffect=function(v,w){return $.H.useLayoutEffect(v,w)},V.useMemo=function(v,w){return $.H.useMemo(v,w)},V.useOptimistic=function(v,w){return $.H.useOptimistic(v,w)},V.useReducer=function(v,w,N){return $.H.useReducer(v,w,N)},V.useRef=function(v){return $.H.useRef(v)},V.useState=function(v){return $.H.useState(v)},V.useSyncExternalStore=function(v,w,N){return $.H.useSyncExternalStore(v,w,N)},V.useTransition=function(){return $.H.useTransition()},V.version="19.2.3",V}var kd;function Rr(){return kd||(kd=1,mr.exports=jg()),mr.exports}var bt=Rr();const Wd=Hg(bt);var yr={exports:{}},ai={},pr={exports:{}},gr={};/**
17
+ */var Jd;function qp(){if(Jd)return V;Jd=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),y=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),W=Symbol.iterator;function ct(v){return v===null||typeof v!="object"?null:(v=W&&v[W]||v["@@iterator"],typeof v=="function"?v:null)}var Et={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ut=Object.assign,Mt={};function Tt(v,w,N){this.props=v,this.context=w,this.refs=Mt,this.updater=N||Et}Tt.prototype.isReactComponent={},Tt.prototype.setState=function(v,w){if(typeof v!="object"&&typeof v!="function"&&v!=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,v,w,"setState")},Tt.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function Ut(){}Ut.prototype=Tt.prototype;function Nt(v,w,N){this.props=v,this.context=w,this.refs=Mt,this.updater=N||Et}var le=Nt.prototype=new Ut;le.constructor=Nt,ut(le,Tt.prototype),le.isPureReactComponent=!0;var ne=Array.isArray;function Xt(){}var $={H:null,A:null,T:null,S:null},Ct=Object.prototype.hasOwnProperty;function Xe(v,w,N){var L=N.ref;return{$$typeof:r,type:v,key:w,ref:L!==void 0?L:null,props:N}}function gn(v,w){return Xe(v.type,w,v.props)}function Ge(v){return typeof v=="object"&&v!==null&&v.$$typeof===r}function ae(v){var w={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(N){return w[N]})}var Jl=/\/+/g;function $e(v,w){return typeof v=="object"&&v!==null&&v.key!=null?ae(""+v.key):w.toString(36)}function Le(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(Xt,Xt):(v.status="pending",v.then(function(w){v.status==="pending"&&(v.status="fulfilled",v.value=w)},function(w){v.status==="pending"&&(v.status="rejected",v.reason=w)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function z(v,w,N,L,Z){var F=typeof v;(F==="undefined"||F==="boolean")&&(v=null);var rt=!1;if(v===null)rt=!0;else switch(F){case"bigint":case"string":case"number":rt=!0;break;case"object":switch(v.$$typeof){case r:case u:rt=!0;break;case H:return rt=v._init,z(rt(v._payload),w,N,L,Z)}}if(rt)return Z=Z(v),rt=L===""?"."+$e(v,0):L,ne(Z)?(N="",rt!=null&&(N=rt.replace(Jl,"$&/")+"/"),z(Z,w,N,"",function(ca){return ca})):Z!=null&&(Ge(Z)&&(Z=gn(Z,N+(Z.key==null||v&&v.key===Z.key?"":(""+Z.key).replace(Jl,"$&/")+"/")+rt)),w.push(Z)),1;rt=0;var Pt=L===""?".":L+":";if(ne(v))for(var Dt=0;Dt<v.length;Dt++)L=v[Dt],F=Pt+$e(L,Dt),rt+=z(L,w,N,F,Z);else if(Dt=ct(v),typeof Dt=="function")for(v=Dt.call(v),Dt=0;!(L=v.next()).done;)L=L.value,F=Pt+$e(L,Dt++),rt+=z(L,w,N,F,Z);else if(F==="object"){if(typeof v.then=="function")return z(Le(v),w,N,L,Z);throw w=String(v),Error("Objects are not valid as a React child (found: "+(w==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":w)+"). If you meant to render a collection of children, use an array instead.")}return rt}function U(v,w,N){if(v==null)return v;var L=[],Z=0;return z(v,L,"","",function(F){return w.call(N,F,Z++)}),L}function Q(v){if(v._status===-1){var w=v._result;w=w(),w.then(function(N){(v._status===0||v._status===-1)&&(v._status=1,v._result=N)},function(N){(v._status===0||v._status===-1)&&(v._status=2,v._result=N)}),v._status===-1&&(v._status=0,v._result=w)}if(v._status===1)return v._result.default;throw v._result}var dt=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var w=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(w))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},pt={map:U,forEach:function(v,w,N){U(v,function(){w.apply(this,arguments)},N)},count:function(v){var w=0;return U(v,function(){w++}),w},toArray:function(v){return U(v,function(w){return w})||[]},only:function(v){if(!Ge(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return V.Activity=R,V.Children=pt,V.Component=Tt,V.Fragment=s,V.Profiler=f,V.PureComponent=Nt,V.StrictMode=c,V.Suspense=E,V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,V.__COMPILER_RUNTIME={__proto__:null,c:function(v){return $.H.useMemoCache(v)}},V.cache=function(v){return function(){return v.apply(null,arguments)}},V.cacheSignal=function(){return null},V.cloneElement=function(v,w,N){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var L=ut({},v.props),Z=v.key;if(w!=null)for(F in w.key!==void 0&&(Z=""+w.key),w)!Ct.call(w,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&w.ref===void 0||(L[F]=w[F]);var F=arguments.length-2;if(F===1)L.children=N;else if(1<F){for(var rt=Array(F),Pt=0;Pt<F;Pt++)rt[Pt]=arguments[Pt+2];L.children=rt}return Xe(v.type,Z,L)},V.createContext=function(v){return v={$$typeof:y,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:d,_context:v},v},V.createElement=function(v,w,N){var L,Z={},F=null;if(w!=null)for(L in w.key!==void 0&&(F=""+w.key),w)Ct.call(w,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(Z[L]=w[L]);var rt=arguments.length-2;if(rt===1)Z.children=N;else if(1<rt){for(var Pt=Array(rt),Dt=0;Dt<rt;Dt++)Pt[Dt]=arguments[Dt+2];Z.children=Pt}if(v&&v.defaultProps)for(L in rt=v.defaultProps,rt)Z[L]===void 0&&(Z[L]=rt[L]);return Xe(v,F,Z)},V.createRef=function(){return{current:null}},V.forwardRef=function(v){return{$$typeof:p,render:v}},V.isValidElement=Ge,V.lazy=function(v){return{$$typeof:H,_payload:{_status:-1,_result:v},_init:Q}},V.memo=function(v,w){return{$$typeof:b,type:v,compare:w===void 0?null:w}},V.startTransition=function(v){var w=$.T,N={};$.T=N;try{var L=v(),Z=$.S;Z!==null&&Z(N,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(Xt,dt)}catch(F){dt(F)}finally{w!==null&&N.types!==null&&(w.types=N.types),$.T=w}},V.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},V.use=function(v){return $.H.use(v)},V.useActionState=function(v,w,N){return $.H.useActionState(v,w,N)},V.useCallback=function(v,w){return $.H.useCallback(v,w)},V.useContext=function(v){return $.H.useContext(v)},V.useDebugValue=function(){},V.useDeferredValue=function(v,w){return $.H.useDeferredValue(v,w)},V.useEffect=function(v,w){return $.H.useEffect(v,w)},V.useEffectEvent=function(v){return $.H.useEffectEvent(v)},V.useId=function(){return $.H.useId()},V.useImperativeHandle=function(v,w,N){return $.H.useImperativeHandle(v,w,N)},V.useInsertionEffect=function(v,w){return $.H.useInsertionEffect(v,w)},V.useLayoutEffect=function(v,w){return $.H.useLayoutEffect(v,w)},V.useMemo=function(v,w){return $.H.useMemo(v,w)},V.useOptimistic=function(v,w){return $.H.useOptimistic(v,w)},V.useReducer=function(v,w,N){return $.H.useReducer(v,w,N)},V.useRef=function(v){return $.H.useRef(v)},V.useState=function(v){return $.H.useState(v)},V.useSyncExternalStore=function(v,w,N){return $.H.useSyncExternalStore(v,w,N)},V.useTransition=function(){return $.H.useTransition()},V.version="19.2.3",V}var kd;function Rr(){return kd||(kd=1,mr.exports=qp()),mr.exports}var bt=Rr();const Wd=Bp(bt);var yr={exports:{}},ai={},gr={exports:{}},pr={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var wg=Object.defineProperty;var Qd=r=>{throw TypeError(r)};var Rg=(r,u,s)=>u in
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var $d;function qg(){return $d||($d=1,(function(r){function u(z,U){var Q=z.length;z.push(U);t:for(;0<Q;){var ht=Q-1>>>1,pt=z[ht];if(0<f(pt,U))z[ht]=U,z[Q]=pt,Q=ht;else break t}}function s(z){return z.length===0?null:z[0]}function c(z){if(z.length===0)return null;var U=z[0],Q=z.pop();if(Q!==U){z[0]=Q;t:for(var ht=0,pt=z.length,v=pt>>>1;ht<v;){var w=2*(ht+1)-1,N=z[w],L=w+1,Z=z[L];if(0>f(N,Q))L<pt&&0>f(Z,N)?(z[ht]=Z,z[L]=Q,ht=L):(z[ht]=N,z[w]=Q,ht=w);else if(L<pt&&0>f(Z,Q))z[ht]=Z,z[L]=Q,ht=L;else break t}}return U}function f(z,U){var Q=z.sortIndex-U.sortIndex;return Q!==0?Q:z.id-U.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var y=Date,g=y.now();r.unstable_now=function(){return y.now()-g}}var E=[],b=[],H=1,R=null,W=3,ct=!1,Et=!1,ut=!1,Mt=!1,Tt=typeof setTimeout=="function"?setTimeout:null,Ut=typeof clearTimeout=="function"?clearTimeout:null,Nt=typeof setImmediate<"u"?setImmediate:null;function ee(z){for(var U=s(b);U!==null;){if(U.callback===null)c(b);else if(U.startTime<=z)c(b),U.sortIndex=U.expirationTime,u(E,U);else break;U=s(b)}}function le(z){if(ut=!1,ee(z),!Et)if(s(E)!==null)Et=!0,Xt||(Xt=!0,ne());else{var U=s(b);U!==null&&He(le,U.startTime-z)}}var Xt=!1,$=-1,Ct=5,Xe=-1;function pn(){return Mt?!0:!(r.unstable_now()-Xe<Ct)}function Ge(){if(Mt=!1,Xt){var z=r.unstable_now();Xe=z;var U=!0;try{t:{Et=!1,ut&&(ut=!1,Ut($),$=-1),ct=!0;var Q=W;try{e:{for(ee(z),R=s(E);R!==null&&!(R.expirationTime>z&&pn());){var ht=R.callback;if(typeof ht=="function"){R.callback=null,W=R.priorityLevel;var pt=ht(R.expirationTime<=z);if(z=r.unstable_now(),typeof pt=="function"){R.callback=pt,ee(z),U=!0;break e}R===s(E)&&c(E),ee(z)}else c(E);R=s(E)}if(R!==null)U=!0;else{var v=s(b);v!==null&&He(le,v.startTime-z),U=!1}}break t}finally{R=null,W=Q,ct=!1}U=void 0}}finally{U?ne():Xt=!1}}}var ne;if(typeof Nt=="function")ne=function(){Nt(Ge)};else if(typeof MessageChannel<"u"){var Jl=new MessageChannel,$e=Jl.port2;Jl.port1.onmessage=Ge,ne=function(){$e.postMessage(null)}}else ne=function(){Tt(Ge,0)};function He(z,U){$=Tt(function(){z(r.unstable_now())},U)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(z){z.callback=null},r.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ct=0<z?Math.floor(1e3/z):5},r.unstable_getCurrentPriorityLevel=function(){return W},r.unstable_next=function(z){switch(W){case 1:case 2:case 3:var U=3;break;default:U=W}var Q=W;W=U;try{return z()}finally{W=Q}},r.unstable_requestPaint=function(){Mt=!0},r.unstable_runWithPriority=function(z,U){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var Q=W;W=z;try{return U()}finally{W=Q}},r.unstable_scheduleCallback=function(z,U,Q){var ht=r.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?ht+Q:ht):Q=ht,z){case 1:var pt=-1;break;case 2:pt=250;break;case 5:pt=1073741823;break;case 4:pt=1e4;break;default:pt=5e3}return pt=Q+pt,z={id:H++,callback:U,priorityLevel:z,startTime:Q,expirationTime:pt,sortIndex:-1},Q>ht?(z.sortIndex=Q,u(b,z),s(E)===null&&z===s(b)&&(ut?(Ut($),$=-1):ut=!0,He(le,Q-ht))):(z.sortIndex=pt,u(E,z),Et||ct||(Et=!0,Xt||(Xt=!0,ne()))),z},r.unstable_shouldYield=pn,r.unstable_wrapCallback=function(z){var U=W;return function(){var Q=W;W=U;try{return z.apply(this,arguments)}finally{W=Q}}}})(gr)),gr}var Fd;function Yg(){return Fd||(Fd=1,pr.exports=qg()),pr.exports}var vr={exports:{}},Ft={};/**
25
+ */var $d;function Yp(){return $d||($d=1,(function(r){function u(z,U){var Q=z.length;z.push(U);t:for(;0<Q;){var dt=Q-1>>>1,pt=z[dt];if(0<f(pt,U))z[dt]=U,z[Q]=pt,Q=dt;else break t}}function s(z){return z.length===0?null:z[0]}function c(z){if(z.length===0)return null;var U=z[0],Q=z.pop();if(Q!==U){z[0]=Q;t:for(var dt=0,pt=z.length,v=pt>>>1;dt<v;){var w=2*(dt+1)-1,N=z[w],L=w+1,Z=z[L];if(0>f(N,Q))L<pt&&0>f(Z,N)?(z[dt]=Z,z[L]=Q,dt=L):(z[dt]=N,z[w]=Q,dt=w);else if(L<pt&&0>f(Z,Q))z[dt]=Z,z[L]=Q,dt=L;else break t}}return U}function f(z,U){var Q=z.sortIndex-U.sortIndex;return Q!==0?Q:z.id-U.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var y=Date,p=y.now();r.unstable_now=function(){return y.now()-p}}var E=[],b=[],H=1,R=null,W=3,ct=!1,Et=!1,ut=!1,Mt=!1,Tt=typeof setTimeout=="function"?setTimeout:null,Ut=typeof clearTimeout=="function"?clearTimeout:null,Nt=typeof setImmediate<"u"?setImmediate:null;function le(z){for(var U=s(b);U!==null;){if(U.callback===null)c(b);else if(U.startTime<=z)c(b),U.sortIndex=U.expirationTime,u(E,U);else break;U=s(b)}}function ne(z){if(ut=!1,le(z),!Et)if(s(E)!==null)Et=!0,Xt||(Xt=!0,ae());else{var U=s(b);U!==null&&Le(ne,U.startTime-z)}}var Xt=!1,$=-1,Ct=5,Xe=-1;function gn(){return Mt?!0:!(r.unstable_now()-Xe<Ct)}function Ge(){if(Mt=!1,Xt){var z=r.unstable_now();Xe=z;var U=!0;try{t:{Et=!1,ut&&(ut=!1,Ut($),$=-1),ct=!0;var Q=W;try{e:{for(le(z),R=s(E);R!==null&&!(R.expirationTime>z&&gn());){var dt=R.callback;if(typeof dt=="function"){R.callback=null,W=R.priorityLevel;var pt=dt(R.expirationTime<=z);if(z=r.unstable_now(),typeof pt=="function"){R.callback=pt,le(z),U=!0;break e}R===s(E)&&c(E),le(z)}else c(E);R=s(E)}if(R!==null)U=!0;else{var v=s(b);v!==null&&Le(ne,v.startTime-z),U=!1}}break t}finally{R=null,W=Q,ct=!1}U=void 0}}finally{U?ae():Xt=!1}}}var ae;if(typeof Nt=="function")ae=function(){Nt(Ge)};else if(typeof MessageChannel<"u"){var Jl=new MessageChannel,$e=Jl.port2;Jl.port1.onmessage=Ge,ae=function(){$e.postMessage(null)}}else ae=function(){Tt(Ge,0)};function Le(z,U){$=Tt(function(){z(r.unstable_now())},U)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(z){z.callback=null},r.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ct=0<z?Math.floor(1e3/z):5},r.unstable_getCurrentPriorityLevel=function(){return W},r.unstable_next=function(z){switch(W){case 1:case 2:case 3:var U=3;break;default:U=W}var Q=W;W=U;try{return z()}finally{W=Q}},r.unstable_requestPaint=function(){Mt=!0},r.unstable_runWithPriority=function(z,U){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var Q=W;W=z;try{return U()}finally{W=Q}},r.unstable_scheduleCallback=function(z,U,Q){var dt=r.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?dt+Q:dt):Q=dt,z){case 1:var pt=-1;break;case 2:pt=250;break;case 5:pt=1073741823;break;case 4:pt=1e4;break;default:pt=5e3}return pt=Q+pt,z={id:H++,callback:U,priorityLevel:z,startTime:Q,expirationTime:pt,sortIndex:-1},Q>dt?(z.sortIndex=Q,u(b,z),s(E)===null&&z===s(b)&&(ut?(Ut($),$=-1):ut=!0,Le(ne,Q-dt))):(z.sortIndex=pt,u(E,z),Et||ct||(Et=!0,Xt||(Xt=!0,ae()))),z},r.unstable_shouldYield=gn,r.unstable_wrapCallback=function(z){var U=W;return function(){var Q=W;W=U;try{return z.apply(this,arguments)}finally{W=Q}}}})(pr)),pr}var Fd;function Xp(){return Fd||(Fd=1,gr.exports=Yp()),gr.exports}var vr={exports:{}},Ft={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var wg=Object.defineProperty;var Qd=r=>{throw TypeError(r)};var Rg=(r,u,s)=>u in
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Id;function Xg(){if(Id)return Ft;Id=1;var r=Rr();function u(E){var b="https://react.dev/errors/"+E;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var H=2;H<arguments.length;H++)b+="&args[]="+encodeURIComponent(arguments[H])}return"Minified React error #"+E+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var c={d:{f:s,r:function(){throw Error(u(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(E,b,H){var R=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:R==null?null:""+R,children:E,containerInfo:b,implementation:H}}var y=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(E,b){if(E==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return Ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Ft.createPortal=function(E,b){var H=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(u(299));return d(E,b,null,H)},Ft.flushSync=function(E){var b=y.T,H=c.p;try{if(y.T=null,c.p=2,E)return E()}finally{y.T=b,c.p=H,c.d.f()}},Ft.preconnect=function(E,b){typeof E=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,c.d.C(E,b))},Ft.prefetchDNS=function(E){typeof E=="string"&&c.d.D(E)},Ft.preinit=function(E,b){if(typeof E=="string"&&b&&typeof b.as=="string"){var H=b.as,R=g(H,b.crossOrigin),W=typeof b.integrity=="string"?b.integrity:void 0,ct=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;H==="style"?c.d.S(E,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:R,integrity:W,fetchPriority:ct}):H==="script"&&c.d.X(E,{crossOrigin:R,integrity:W,fetchPriority:ct,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},Ft.preinitModule=function(E,b){if(typeof E=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var H=g(b.as,b.crossOrigin);c.d.M(E,{crossOrigin:H,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&c.d.M(E)},Ft.preload=function(E,b){if(typeof E=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var H=b.as,R=g(H,b.crossOrigin);c.d.L(E,H,{crossOrigin:R,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},Ft.preloadModule=function(E,b){if(typeof E=="string")if(b){var H=g(b.as,b.crossOrigin);c.d.m(E,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:H,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else c.d.m(E)},Ft.requestFormReset=function(E){c.d.r(E)},Ft.unstable_batchedUpdates=function(E,b){return E(b)},Ft.useFormState=function(E,b,H){return y.H.useFormState(E,b,H)},Ft.useFormStatus=function(){return y.H.useHostTransitionStatus()},Ft.version="19.2.3",Ft}var Pd;function Gg(){if(Pd)return vr.exports;Pd=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),vr.exports=Xg(),vr.exports}/**
33
+ */var Id;function Gp(){if(Id)return Ft;Id=1;var r=Rr();function u(E){var b="https://react.dev/errors/"+E;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var H=2;H<arguments.length;H++)b+="&args[]="+encodeURIComponent(arguments[H])}return"Minified React error #"+E+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var c={d:{f:s,r:function(){throw Error(u(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(E,b,H){var R=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:R==null?null:""+R,children:E,containerInfo:b,implementation:H}}var y=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(E,b){if(E==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return Ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Ft.createPortal=function(E,b){var H=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(u(299));return d(E,b,null,H)},Ft.flushSync=function(E){var b=y.T,H=c.p;try{if(y.T=null,c.p=2,E)return E()}finally{y.T=b,c.p=H,c.d.f()}},Ft.preconnect=function(E,b){typeof E=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,c.d.C(E,b))},Ft.prefetchDNS=function(E){typeof E=="string"&&c.d.D(E)},Ft.preinit=function(E,b){if(typeof E=="string"&&b&&typeof b.as=="string"){var H=b.as,R=p(H,b.crossOrigin),W=typeof b.integrity=="string"?b.integrity:void 0,ct=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;H==="style"?c.d.S(E,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:R,integrity:W,fetchPriority:ct}):H==="script"&&c.d.X(E,{crossOrigin:R,integrity:W,fetchPriority:ct,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},Ft.preinitModule=function(E,b){if(typeof E=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var H=p(b.as,b.crossOrigin);c.d.M(E,{crossOrigin:H,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&c.d.M(E)},Ft.preload=function(E,b){if(typeof E=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var H=b.as,R=p(H,b.crossOrigin);c.d.L(E,H,{crossOrigin:R,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},Ft.preloadModule=function(E,b){if(typeof E=="string")if(b){var H=p(b.as,b.crossOrigin);c.d.m(E,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:H,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else c.d.m(E)},Ft.requestFormReset=function(E){c.d.r(E)},Ft.unstable_batchedUpdates=function(E,b){return E(b)},Ft.useFormState=function(E,b,H){return y.H.useFormState(E,b,H)},Ft.useFormStatus=function(){return y.H.useHostTransitionStatus()},Ft.version="19.2.3",Ft}var Pd;function Qp(){if(Pd)return vr.exports;Pd=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),vr.exports=Gp(),vr.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,20 +38,20 @@ var wg=Object.defineProperty;var Qd=r=>{throw TypeError(r)};var Rg=(r,u,s)=>u in
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var tm;function Qg(){if(tm)return ai;tm=1;var r=Yg(),u=Rr(),s=Gg();function c(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function d(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function y(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function g(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function E(t){if(d(t)!==t)throw Error(c(188))}function b(t){var e=t.alternate;if(!e){if(e=d(t),e===null)throw Error(c(188));return e!==t?null:t}for(var l=t,n=e;;){var a=l.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===l)return E(a),t;if(i===n)return E(a),e;i=i.sibling}throw Error(c(188))}if(l.return!==n.return)l=a,n=i;else{for(var o=!1,h=a.child;h;){if(h===l){o=!0,l=a,n=i;break}if(h===n){o=!0,n=a,l=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===l){o=!0,l=i,n=a;break}if(h===n){o=!0,n=i,l=a;break}h=h.sibling}if(!o)throw Error(c(189))}}if(l.alternate!==n)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?t:e}function H(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=H(t),e!==null)return e;t=t.sibling}return null}var R=Object.assign,W=Symbol.for("react.element"),ct=Symbol.for("react.transitional.element"),Et=Symbol.for("react.portal"),ut=Symbol.for("react.fragment"),Mt=Symbol.for("react.strict_mode"),Tt=Symbol.for("react.profiler"),Ut=Symbol.for("react.consumer"),Nt=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),Xt=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),Ct=Symbol.for("react.lazy"),Xe=Symbol.for("react.activity"),pn=Symbol.for("react.memo_cache_sentinel"),Ge=Symbol.iterator;function ne(t){return t===null||typeof t!="object"?null:(t=Ge&&t[Ge]||t["@@iterator"],typeof t=="function"?t:null)}var Jl=Symbol.for("react.client.reference");function $e(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Jl?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ut:return"Fragment";case Tt:return"Profiler";case Mt:return"StrictMode";case le:return"Suspense";case Xt:return"SuspenseList";case Xe:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case Et:return"Portal";case Nt:return t.displayName||"Context";case Ut:return(t._context.displayName||"Context")+".Consumer";case ee:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case $:return e=t.displayName||null,e!==null?e:$e(t.type)||"Memo";case Ct:e=t._payload,t=t._init;try{return $e(t(e))}catch{}}return null}var He=Array.isArray,z=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},ht=[],pt=-1;function v(t){return{current:t}}function w(t){0>pt||(t.current=ht[pt],ht[pt]=null,pt--)}function N(t,e){pt++,ht[pt]=t.current,t.current=e}var L=v(null),Z=v(null),F=v(null),rt=v(null);function Pt(t,e){switch(N(F,e),N(Z,t),N(L,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?hd(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=hd(e),t=dd(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}w(L),N(L,t)}function Dt(){w(L),w(Z),w(F)}function ca(t){t.memoizedState!==null&&N(rt,t);var e=L.current,l=dd(e,t.type);e!==l&&(N(Z,t),N(L,l))}function mi(t){Z.current===t&&(w(L),w(Z)),rt.current===t&&(w(rt),Fa._currentValue=Q)}var Wu,Yr;function kl(t){if(Wu===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);Wu=e&&e[1]||"",Yr=-1<l.stack.indexOf(`
41
+ */var tm;function Kp(){if(tm)return ai;tm=1;var r=Xp(),u=Rr(),s=Qp();function c(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function d(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function y(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function E(t){if(d(t)!==t)throw Error(c(188))}function b(t){var e=t.alternate;if(!e){if(e=d(t),e===null)throw Error(c(188));return e!==t?null:t}for(var l=t,n=e;;){var a=l.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===l)return E(a),t;if(i===n)return E(a),e;i=i.sibling}throw Error(c(188))}if(l.return!==n.return)l=a,n=i;else{for(var o=!1,h=a.child;h;){if(h===l){o=!0,l=a,n=i;break}if(h===n){o=!0,n=a,l=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===l){o=!0,l=i,n=a;break}if(h===n){o=!0,n=i,l=a;break}h=h.sibling}if(!o)throw Error(c(189))}}if(l.alternate!==n)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?t:e}function H(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=H(t),e!==null)return e;t=t.sibling}return null}var R=Object.assign,W=Symbol.for("react.element"),ct=Symbol.for("react.transitional.element"),Et=Symbol.for("react.portal"),ut=Symbol.for("react.fragment"),Mt=Symbol.for("react.strict_mode"),Tt=Symbol.for("react.profiler"),Ut=Symbol.for("react.consumer"),Nt=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),Xt=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),Ct=Symbol.for("react.lazy"),Xe=Symbol.for("react.activity"),gn=Symbol.for("react.memo_cache_sentinel"),Ge=Symbol.iterator;function ae(t){return t===null||typeof t!="object"?null:(t=Ge&&t[Ge]||t["@@iterator"],typeof t=="function"?t:null)}var Jl=Symbol.for("react.client.reference");function $e(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Jl?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ut:return"Fragment";case Tt:return"Profiler";case Mt:return"StrictMode";case ne:return"Suspense";case Xt:return"SuspenseList";case Xe:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case Et:return"Portal";case Nt:return t.displayName||"Context";case Ut:return(t._context.displayName||"Context")+".Consumer";case le:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case $:return e=t.displayName||null,e!==null?e:$e(t.type)||"Memo";case Ct:e=t._payload,t=t._init;try{return $e(t(e))}catch{}}return null}var Le=Array.isArray,z=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},dt=[],pt=-1;function v(t){return{current:t}}function w(t){0>pt||(t.current=dt[pt],dt[pt]=null,pt--)}function N(t,e){pt++,dt[pt]=t.current,t.current=e}var L=v(null),Z=v(null),F=v(null),rt=v(null);function Pt(t,e){switch(N(F,e),N(Z,t),N(L,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?hd(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=hd(e),t=dd(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}w(L),N(L,t)}function Dt(){w(L),w(Z),w(F)}function ca(t){t.memoizedState!==null&&N(rt,t);var e=L.current,l=dd(e,t.type);e!==l&&(N(Z,t),N(L,l))}function mi(t){Z.current===t&&(w(L),w(Z)),rt.current===t&&(w(rt),Fa._currentValue=Q)}var Wu,Yr;function kl(t){if(Wu===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);Wu=e&&e[1]||"",Yr=-1<l.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
43
  `+Wu+t+Yr}var $u=!1;function Fu(t,e){if(!t||$u)return"";$u=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(e){var D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(x){var _=x}Reflect.construct(t,[],D)}else{try{D.call()}catch(x){_=x}t.call(D.prototype)}}else{try{throw Error()}catch(x){_=x}(D=t())&&typeof D.catch=="function"&&D.catch(function(){})}}catch(x){if(x&&_&&typeof x.stack=="string")return[x.stack,_.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var m=o.split(`
44
44
  `),A=h.split(`
45
45
  `);for(a=n=0;n<m.length&&!m[n].includes("DetermineComponentFrameRoot");)n++;for(;a<A.length&&!A[a].includes("DetermineComponentFrameRoot");)a++;if(n===m.length||a===A.length)for(n=m.length-1,a=A.length-1;1<=n&&0<=a&&m[n]!==A[a];)a--;for(;1<=n&&0<=a;n--,a--)if(m[n]!==A[a]){if(n!==1||a!==1)do if(n--,a--,0>a||m[n]!==A[a]){var M=`
46
- `+m[n].replace(" at new "," at ");return t.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",t.displayName)),M}while(1<=n&&0<=a);break}}}finally{$u=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?kl(l):""}function cy(t,e){switch(t.tag){case 26:case 27:case 5:return kl(t.type);case 16:return kl("Lazy");case 13:return t.child!==e&&e!==null?kl("Suspense Fallback"):kl("Suspense");case 19:return kl("SuspenseList");case 0:case 15:return Fu(t.type,!1);case 11:return Fu(t.type.render,!1);case 1:return Fu(t.type,!0);case 31:return kl("Activity");default:return""}}function Xr(t){try{var e="",l=null;do e+=cy(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
46
+ `+m[n].replace(" at new "," at ");return t.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",t.displayName)),M}while(1<=n&&0<=a);break}}}finally{$u=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?kl(l):""}function ry(t,e){switch(t.tag){case 26:case 27:case 5:return kl(t.type);case 16:return kl("Lazy");case 13:return t.child!==e&&e!==null?kl("Suspense Fallback"):kl("Suspense");case 19:return kl("SuspenseList");case 0:case 15:return Fu(t.type,!1);case 11:return Fu(t.type.render,!1);case 1:return Fu(t.type,!0);case 31:return kl("Activity");default:return""}}function Xr(t){try{var e="",l=null;do e+=ry(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
47
47
  Error generating stack: `+n.message+`
48
- `+n.stack}}var Iu=Object.prototype.hasOwnProperty,Pu=r.unstable_scheduleCallback,ts=r.unstable_cancelCallback,ry=r.unstable_shouldYield,oy=r.unstable_requestPaint,he=r.unstable_now,fy=r.unstable_getCurrentPriorityLevel,Gr=r.unstable_ImmediatePriority,Qr=r.unstable_UserBlockingPriority,yi=r.unstable_NormalPriority,hy=r.unstable_LowPriority,Kr=r.unstable_IdlePriority,dy=r.log,my=r.unstable_setDisableYieldValue,ra=null,de=null;function gl(t){if(typeof dy=="function"&&my(t),de&&typeof de.setStrictMode=="function")try{de.setStrictMode(ra,t)}catch{}}var me=Math.clz32?Math.clz32:gy,yy=Math.log,py=Math.LN2;function gy(t){return t>>>=0,t===0?32:31-(yy(t)/py|0)|0}var pi=256,gi=262144,vi=4194304;function Wl(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Si(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var a=0,i=t.suspendedLanes,o=t.pingedLanes;t=t.warmLanes;var h=n&134217727;return h!==0?(n=h&~i,n!==0?a=Wl(n):(o&=h,o!==0?a=Wl(o):l||(l=h&~t,l!==0&&(a=Wl(l))))):(h=n&~i,h!==0?a=Wl(h):o!==0?a=Wl(o):l||(l=n&~t,l!==0&&(a=Wl(l)))),a===0?0:e!==0&&e!==a&&(e&i)===0&&(i=a&-a,l=e&-e,i>=l||i===32&&(l&4194048)!==0)?e:a}function oa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function vy(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Vr(){var t=vi;return vi<<=1,(vi&62914560)===0&&(vi=4194304),t}function es(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function fa(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Sy(t,e,l,n,a,i){var o=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var h=t.entanglements,m=t.expirationTimes,A=t.hiddenUpdates;for(l=o&~l;0<l;){var M=31-me(l),D=1<<M;h[M]=0,m[M]=-1;var _=A[M];if(_!==null)for(A[M]=null,M=0;M<_.length;M++){var x=_[M];x!==null&&(x.lane&=-536870913)}l&=~D}n!==0&&Zr(t,n,0),i!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=i&~(o&~e))}function Zr(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-me(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|l&261930}function Jr(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var n=31-me(l),a=1<<n;a&e|t[n]&e&&(t[n]|=e),l&=~a}}function kr(t,e){var l=e&-e;return l=(l&42)!==0?1:ls(l),(l&(t.suspendedLanes|e))!==0?0:l}function ls(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ns(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Wr(){var t=U.p;return t!==0?t:(t=window.event,t===void 0?32:Bd(t.type))}function $r(t,e){var l=U.p;try{return U.p=t,e()}finally{U.p=l}}var vl=Math.random().toString(36).slice(2),Kt="__reactFiber$"+vl,ae="__reactProps$"+vl,gn="__reactContainer$"+vl,as="__reactEvents$"+vl,by="__reactListeners$"+vl,Ey="__reactHandles$"+vl,Fr="__reactResources$"+vl,ha="__reactMarker$"+vl;function is(t){delete t[Kt],delete t[ae],delete t[as],delete t[by],delete t[Ey]}function vn(t){var e=t[Kt];if(e)return e;for(var l=t.parentNode;l;){if(e=l[gn]||l[Kt]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=bd(t);t!==null;){if(l=t[Kt])return l;t=bd(t)}return e}t=l,l=t.parentNode}return null}function Sn(t){if(t=t[Kt]||t[gn]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function da(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(c(33))}function bn(t){var e=t[Fr];return e||(e=t[Fr]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Gt(t){t[ha]=!0}var Ir=new Set,Pr={};function $l(t,e){En(t,e),En(t+"Capture",e)}function En(t,e){for(Pr[t]=e,t=0;t<e.length;t++)Ir.add(e[t])}var Ty=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]*$"),to={},eo={};function Ay(t){return Iu.call(eo,t)?!0:Iu.call(to,t)?!1:Ty.test(t)?eo[t]=!0:(to[t]=!0,!1)}function bi(t,e,l){if(Ay(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var n=e.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function Ei(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function Fe(t,e,l,n){if(n===null)t.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+n)}}function Ae(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function lo(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function _y(t,e,l){var n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(o){l=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function us(t){if(!t._valueTracker){var e=lo(t)?"checked":"value";t._valueTracker=_y(t,e,""+t[e])}}function no(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=lo(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}function Ti(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var xy=/[\n"\\]/g;function _e(t){return t.replace(xy,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function ss(t,e,l,n,a,i,o,h){t.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.type=o:t.removeAttribute("type"),e!=null?o==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ae(e)):t.value!==""+Ae(e)&&(t.value=""+Ae(e)):o!=="submit"&&o!=="reset"||t.removeAttribute("value"),e!=null?cs(t,o,Ae(e)):l!=null?cs(t,o,Ae(l)):n!=null&&t.removeAttribute("value"),a==null&&i!=null&&(t.defaultChecked=!!i),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.name=""+Ae(h):t.removeAttribute("name")}function ao(t,e,l,n,a,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){us(t);return}l=l!=null?""+Ae(l):"",e=e!=null?""+Ae(e):l,h||e===t.value||(t.value=e),t.defaultValue=e}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=h?t.checked:!!n,t.defaultChecked=!!n,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(t.name=o),us(t)}function cs(t,e,l){e==="number"&&Ti(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Tn(t,e,l,n){if(t=t.options,e){e={};for(var a=0;a<l.length;a++)e["$"+l[a]]=!0;for(l=0;l<t.length;l++)a=e.hasOwnProperty("$"+t[l].value),t[l].selected!==a&&(t[l].selected=a),a&&n&&(t[l].defaultSelected=!0)}else{for(l=""+Ae(l),e=null,a=0;a<t.length;a++){if(t[a].value===l){t[a].selected=!0,n&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function io(t,e,l){if(e!=null&&(e=""+Ae(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+Ae(l):""}function uo(t,e,l,n){if(e==null){if(n!=null){if(l!=null)throw Error(c(92));if(He(n)){if(1<n.length)throw Error(c(93));n=n[0]}l=n}l==null&&(l=""),e=l}l=Ae(e),t.defaultValue=l,n=t.textContent,n===l&&n!==""&&n!==null&&(t.value=n),us(t)}function An(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var My=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 so(t,e,l){var n=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":n?t.setProperty(e,l):typeof l!="number"||l===0||My.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function co(t,e,l){if(e!=null&&typeof e!="object")throw Error(c(62));if(t=t.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||e!=null&&e.hasOwnProperty(n)||(n.indexOf("--")===0?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="");for(var a in e)n=e[a],e.hasOwnProperty(a)&&l[a]!==n&&so(t,a,n)}else for(var i in e)e.hasOwnProperty(i)&&so(t,i,e[i])}function rs(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Cy=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"]]),zy=/^[\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 Ai(t){return zy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ie(){}var os=null;function fs(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _n=null,xn=null;function ro(t){var e=Sn(t);if(e&&(t=e.stateNode)){var l=t[ae]||null;t:switch(t=e.stateNode,e.type){case"input":if(ss(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+_e(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var n=l[e];if(n!==t&&n.form===t.form){var a=n[ae]||null;if(!a)throw Error(c(90));ss(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<l.length;e++)n=l[e],n.form===t.form&&no(n)}break t;case"textarea":io(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&Tn(t,!!l.multiple,e,!1)}}}var hs=!1;function oo(t,e,l){if(hs)return t(e,l);hs=!0;try{var n=t(e);return n}finally{if(hs=!1,(_n!==null||xn!==null)&&(ou(),_n&&(e=_n,t=xn,xn=_n=null,ro(e),t)))for(e=0;e<t.length;e++)ro(t[e])}}function ma(t,e){var l=t.stateNode;if(l===null)return null;var n=l[ae]||null;if(n===null)return null;l=n[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(c(231,e,typeof l));return l}var Pe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ds=!1;if(Pe)try{var ya={};Object.defineProperty(ya,"passive",{get:function(){ds=!0}}),window.addEventListener("test",ya,ya),window.removeEventListener("test",ya,ya)}catch{ds=!1}var Sl=null,ms=null,_i=null;function fo(){if(_i)return _i;var t,e=ms,l=e.length,n,a="value"in Sl?Sl.value:Sl.textContent,i=a.length;for(t=0;t<l&&e[t]===a[t];t++);var o=l-t;for(n=1;n<=o&&e[l-n]===a[i-n];n++);return _i=a.slice(t,1<n?1-n:void 0)}function xi(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Mi(){return!0}function ho(){return!1}function ie(t){function e(l,n,a,i,o){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in t)t.hasOwnProperty(h)&&(l=t[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Mi:ho,this.isPropagationStopped=ho,this}return R(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Mi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Mi)},persist:function(){},isPersistent:Mi}),e}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ci=ie(Fl),pa=R({},Fl,{view:0,detail:0}),Oy=ie(pa),ys,ps,ga,zi=R({},pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vs,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ga&&(ga&&t.type==="mousemove"?(ys=t.screenX-ga.screenX,ps=t.screenY-ga.screenY):ps=ys=0,ga=t),ys)},movementY:function(t){return"movementY"in t?t.movementY:ps}}),mo=ie(zi),Dy=R({},zi,{dataTransfer:0}),wy=ie(Dy),Ry=R({},pa,{relatedTarget:0}),gs=ie(Ry),Uy=R({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),Ny=ie(Uy),Hy=R({},Fl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),By=ie(Hy),Ly=R({},Fl,{data:0}),yo=ie(Ly),jy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qy={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"},Yy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Yy[t])?!!e[t]:!1}function vs(){return Xy}var Gy=R({},pa,{key:function(t){if(t.key){var e=jy[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=xi(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vs,charCode:function(t){return t.type==="keypress"?xi(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?xi(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Qy=ie(Gy),Ky=R({},zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),po=ie(Ky),Vy=R({},pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vs}),Zy=ie(Vy),Jy=R({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ky=ie(Jy),Wy=R({},zi,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),$y=ie(Wy),Fy=R({},Fl,{newState:0,oldState:0}),Iy=ie(Fy),Py=[9,13,27,32],Ss=Pe&&"CompositionEvent"in window,va=null;Pe&&"documentMode"in document&&(va=document.documentMode);var tp=Pe&&"TextEvent"in window&&!va,go=Pe&&(!Ss||va&&8<va&&11>=va),vo=" ",So=!1;function bo(t,e){switch(t){case"keyup":return Py.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eo(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Mn=!1;function ep(t,e){switch(t){case"compositionend":return Eo(e);case"keypress":return e.which!==32?null:(So=!0,vo);case"textInput":return t=e.data,t===vo&&So?null:t;default:return null}}function lp(t,e){if(Mn)return t==="compositionend"||!Ss&&bo(t,e)?(t=fo(),_i=ms=Sl=null,Mn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return go&&e.locale!=="ko"?null:e.data;default:return null}}var np={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 To(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!np[t.type]:e==="textarea"}function Ao(t,e,l,n){_n?xn?xn.push(n):xn=[n]:_n=n,e=gu(e,"onChange"),0<e.length&&(l=new Ci("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var Sa=null,ba=null;function ap(t){ud(t,0)}function Oi(t){var e=da(t);if(no(e))return t}function _o(t,e){if(t==="change")return e}var xo=!1;if(Pe){var bs;if(Pe){var Es="oninput"in document;if(!Es){var Mo=document.createElement("div");Mo.setAttribute("oninput","return;"),Es=typeof Mo.oninput=="function"}bs=Es}else bs=!1;xo=bs&&(!document.documentMode||9<document.documentMode)}function Co(){Sa&&(Sa.detachEvent("onpropertychange",zo),ba=Sa=null)}function zo(t){if(t.propertyName==="value"&&Oi(ba)){var e=[];Ao(e,ba,t,fs(t)),oo(ap,e)}}function ip(t,e,l){t==="focusin"?(Co(),Sa=e,ba=l,Sa.attachEvent("onpropertychange",zo)):t==="focusout"&&Co()}function up(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Oi(ba)}function sp(t,e){if(t==="click")return Oi(e)}function cp(t,e){if(t==="input"||t==="change")return Oi(e)}function rp(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ye=typeof Object.is=="function"?Object.is:rp;function Ea(t,e){if(ye(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),n=Object.keys(e);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!Iu.call(e,a)||!ye(t[a],e[a]))return!1}return!0}function Oo(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Do(t,e){var l=Oo(t);t=0;for(var n;l;){if(l.nodeType===3){if(n=t+l.textContent.length,t<=e&&n>=e)return{node:l,offset:e-t};t=n}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Oo(l)}}function wo(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?wo(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Ro(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ti(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Ti(t.document)}return e}function Ts(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var op=Pe&&"documentMode"in document&&11>=document.documentMode,Cn=null,As=null,Ta=null,_s=!1;function Uo(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;_s||Cn==null||Cn!==Ti(n)||(n=Cn,"selectionStart"in n&&Ts(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ta&&Ea(Ta,n)||(Ta=n,n=gu(As,"onSelect"),0<n.length&&(e=new Ci("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=Cn)))}function Il(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var zn={animationend:Il("Animation","AnimationEnd"),animationiteration:Il("Animation","AnimationIteration"),animationstart:Il("Animation","AnimationStart"),transitionrun:Il("Transition","TransitionRun"),transitionstart:Il("Transition","TransitionStart"),transitioncancel:Il("Transition","TransitionCancel"),transitionend:Il("Transition","TransitionEnd")},xs={},No={};Pe&&(No=document.createElement("div").style,"AnimationEvent"in window||(delete zn.animationend.animation,delete zn.animationiteration.animation,delete zn.animationstart.animation),"TransitionEvent"in window||delete zn.transitionend.transition);function Pl(t){if(xs[t])return xs[t];if(!zn[t])return t;var e=zn[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in No)return xs[t]=e[l];return t}var Ho=Pl("animationend"),Bo=Pl("animationiteration"),Lo=Pl("animationstart"),fp=Pl("transitionrun"),hp=Pl("transitionstart"),dp=Pl("transitioncancel"),jo=Pl("transitionend"),qo=new Map,Ms="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(" ");Ms.push("scrollEnd");function Be(t,e){qo.set(t,e),$l(e,[t])}var Di=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},xe=[],On=0,Cs=0;function wi(){for(var t=On,e=Cs=On=0;e<t;){var l=xe[e];xe[e++]=null;var n=xe[e];xe[e++]=null;var a=xe[e];xe[e++]=null;var i=xe[e];if(xe[e++]=null,n!==null&&a!==null){var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}i!==0&&Yo(l,a,i)}}function Ri(t,e,l,n){xe[On++]=t,xe[On++]=e,xe[On++]=l,xe[On++]=n,Cs|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function zs(t,e,l,n){return Ri(t,e,l,n),Ui(t)}function tn(t,e){return Ri(t,null,null,e),Ui(t)}function Yo(t,e,l){t.lanes|=l;var n=t.alternate;n!==null&&(n.lanes|=l);for(var a=!1,i=t.return;i!==null;)i.childLanes|=l,n=i.alternate,n!==null&&(n.childLanes|=l),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(a=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,a&&e!==null&&(a=31-me(l),t=i.hiddenUpdates,n=t[a],n===null?t[a]=[e]:n.push(e),e.lane=l|536870912),i):null}function Ui(t){if(50<Ka)throw Ka=0,Lc=null,Error(c(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Dn={};function mp(t,e,l,n){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pe(t,e,l,n){return new mp(t,e,l,n)}function Os(t){return t=t.prototype,!(!t||!t.isReactComponent)}function tl(t,e){var l=t.alternate;return l===null?(l=pe(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Xo(t,e){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Ni(t,e,l,n,a,i){var o=0;if(n=t,typeof t=="function")Os(t)&&(o=1);else if(typeof t=="string")o=Sg(t,l,L.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case Xe:return t=pe(31,l,e,a),t.elementType=Xe,t.lanes=i,t;case ut:return en(l.children,a,i,e);case Mt:o=8,a|=24;break;case Tt:return t=pe(12,l,e,a|2),t.elementType=Tt,t.lanes=i,t;case le:return t=pe(13,l,e,a),t.elementType=le,t.lanes=i,t;case Xt:return t=pe(19,l,e,a),t.elementType=Xt,t.lanes=i,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Nt:o=10;break t;case Ut:o=9;break t;case ee:o=11;break t;case $:o=14;break t;case Ct:o=16,n=null;break t}o=29,l=Error(c(130,t===null?"null":typeof t,"")),n=null}return e=pe(o,l,e,a),e.elementType=t,e.type=n,e.lanes=i,e}function en(t,e,l,n){return t=pe(7,t,n,e),t.lanes=l,t}function Ds(t,e,l){return t=pe(6,t,null,e),t.lanes=l,t}function Go(t){var e=pe(18,null,null,0);return e.stateNode=t,e}function ws(t,e,l){return e=pe(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Qo=new WeakMap;function Me(t,e){if(typeof t=="object"&&t!==null){var l=Qo.get(t);return l!==void 0?l:(e={value:t,source:e,stack:Xr(e)},Qo.set(t,e),e)}return{value:t,source:e,stack:Xr(e)}}var wn=[],Rn=0,Hi=null,Aa=0,Ce=[],ze=0,bl=null,Qe=1,Ke="";function el(t,e){wn[Rn++]=Aa,wn[Rn++]=Hi,Hi=t,Aa=e}function Ko(t,e,l){Ce[ze++]=Qe,Ce[ze++]=Ke,Ce[ze++]=bl,bl=t;var n=Qe;t=Ke;var a=32-me(n)-1;n&=~(1<<a),l+=1;var i=32-me(e)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,Qe=1<<32-me(e)+a|l<<a|n,Ke=i+t}else Qe=1<<i|l<<a|n,Ke=t}function Rs(t){t.return!==null&&(el(t,1),Ko(t,1,0))}function Us(t){for(;t===Hi;)Hi=wn[--Rn],wn[Rn]=null,Aa=wn[--Rn],wn[Rn]=null;for(;t===bl;)bl=Ce[--ze],Ce[ze]=null,Ke=Ce[--ze],Ce[ze]=null,Qe=Ce[--ze],Ce[ze]=null}function Vo(t,e){Ce[ze++]=Qe,Ce[ze++]=Ke,Ce[ze++]=bl,Qe=e.id,Ke=e.overflow,bl=t}var Vt=null,At=null,lt=!1,El=null,Oe=!1,Ns=Error(c(519));function Tl(t){var e=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _a(Me(e,t)),Ns}function Zo(t){var e=t.stateNode,l=t.type,n=t.memoizedProps;switch(e[Kt]=t,e[ae]=n,l){case"dialog":P("cancel",e),P("close",e);break;case"iframe":case"object":case"embed":P("load",e);break;case"video":case"audio":for(l=0;l<Za.length;l++)P(Za[l],e);break;case"source":P("error",e);break;case"img":case"image":case"link":P("error",e),P("load",e);break;case"details":P("toggle",e);break;case"input":P("invalid",e),ao(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":P("invalid",e);break;case"textarea":P("invalid",e),uo(e,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||n.suppressHydrationWarning===!0||od(e.textContent,l)?(n.popover!=null&&(P("beforetoggle",e),P("toggle",e)),n.onScroll!=null&&P("scroll",e),n.onScrollEnd!=null&&P("scrollend",e),n.onClick!=null&&(e.onclick=Ie),e=!0):e=!1,e||Tl(t,!0)}function Jo(t){for(Vt=t.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:Oe=!1;return;case 27:case 3:Oe=!0;return;default:Vt=Vt.return}}function Un(t){if(t!==Vt)return!1;if(!lt)return Jo(t),lt=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Ic(t.type,t.memoizedProps)),l=!l),l&&At&&Tl(t),Jo(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));At=Sd(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));At=Sd(t)}else e===27?(e=At,Bl(t.type)?(t=nr,nr=null,At=t):At=e):At=Vt?we(t.stateNode.nextSibling):null;return!0}function ln(){At=Vt=null,lt=!1}function Hs(){var t=El;return t!==null&&(re===null?re=t:re.push.apply(re,t),El=null),t}function _a(t){El===null?El=[t]:El.push(t)}var Bs=v(null),nn=null,ll=null;function Al(t,e,l){N(Bs,e._currentValue),e._currentValue=l}function nl(t){t._currentValue=Bs.current,w(Bs)}function Ls(t,e,l){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===l)break;t=t.return}}function js(t,e,l,n){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var i=a.dependencies;if(i!==null){var o=a.child;i=i.firstContext;t:for(;i!==null;){var h=i;i=a;for(var m=0;m<e.length;m++)if(h.context===e[m]){i.lanes|=l,h=i.alternate,h!==null&&(h.lanes|=l),Ls(i.return,l,t),n||(o=null);break t}i=h.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(c(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),Ls(o,l,t),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function Nn(t,e,l,n){t=null;for(var a=e,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var h=a.type;ye(a.pendingProps.value,o.value)||(t!==null?t.push(h):t=[h])}}else if(a===rt.current){if(o=a.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(Fa):t=[Fa])}a=a.return}t!==null&&js(e,t,l,n),e.flags|=262144}function Bi(t){for(t=t.firstContext;t!==null;){if(!ye(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function an(t){nn=t,ll=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Zt(t){return ko(nn,t)}function Li(t,e){return nn===null&&an(t),ko(t,e)}function ko(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},ll===null){if(t===null)throw Error(c(308));ll=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else ll=ll.next=e;return l}var yp=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},pp=r.unstable_scheduleCallback,gp=r.unstable_NormalPriority,Ht={$$typeof:Nt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qs(){return{controller:new yp,data:new Map,refCount:0}}function xa(t){t.refCount--,t.refCount===0&&pp(gp,function(){t.controller.abort()})}var Ma=null,Ys=0,Hn=0,Bn=null;function vp(t,e){if(Ma===null){var l=Ma=[];Ys=0,Hn=Qc(),Bn={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Ys++,e.then(Wo,Wo),e}function Wo(){if(--Ys===0&&Ma!==null){Bn!==null&&(Bn.status="fulfilled");var t=Ma;Ma=null,Hn=0,Bn=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Sp(t,e){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return t.then(function(){n.status="fulfilled",n.value=e;for(var a=0;a<l.length;a++)(0,l[a])(e)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var $o=z.S;z.S=function(t,e){Nh=he(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&vp(t,e),$o!==null&&$o(t,e)};var un=v(null);function Xs(){var t=un.current;return t!==null?t:gt.pooledCache}function ji(t,e){e===null?N(un,un.current):N(un,e.pool)}function Fo(){var t=Xs();return t===null?null:{parent:Ht._currentValue,pool:t}}var Ln=Error(c(460)),Gs=Error(c(474)),qi=Error(c(542)),Yi={then:function(){}};function Io(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Po(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(Ie,Ie),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ef(t),t;default:if(typeof e.status=="string")e.then(Ie,Ie);else{if(t=gt,t!==null&&100<t.shellSuspendCounter)throw Error(c(482));t=e,t.status="pending",t.then(function(n){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=n}},function(n){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=n}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ef(t),t}throw cn=e,Ln}}function sn(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(cn=l,Ln):l}}var cn=null;function tf(){if(cn===null)throw Error(c(459));var t=cn;return cn=null,t}function ef(t){if(t===Ln||t===qi)throw Error(c(483))}var jn=null,Ca=0;function Xi(t){var e=Ca;return Ca+=1,jn===null&&(jn=[]),Po(jn,t,e)}function za(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Gi(t,e){throw e.$$typeof===W?Error(c(525)):(t=Object.prototype.toString.call(e),Error(c(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function lf(t){function e(S,p){if(t){var T=S.deletions;T===null?(S.deletions=[p],S.flags|=16):T.push(p)}}function l(S,p){if(!t)return null;for(;p!==null;)e(S,p),p=p.sibling;return null}function n(S){for(var p=new Map;S!==null;)S.key!==null?p.set(S.key,S):p.set(S.index,S),S=S.sibling;return p}function a(S,p){return S=tl(S,p),S.index=0,S.sibling=null,S}function i(S,p,T){return S.index=T,t?(T=S.alternate,T!==null?(T=T.index,T<p?(S.flags|=67108866,p):T):(S.flags|=67108866,p)):(S.flags|=1048576,p)}function o(S){return t&&S.alternate===null&&(S.flags|=67108866),S}function h(S,p,T,O){return p===null||p.tag!==6?(p=Ds(T,S.mode,O),p.return=S,p):(p=a(p,T),p.return=S,p)}function m(S,p,T,O){var q=T.type;return q===ut?M(S,p,T.props.children,O,T.key):p!==null&&(p.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===Ct&&sn(q)===p.type)?(p=a(p,T.props),za(p,T),p.return=S,p):(p=Ni(T.type,T.key,T.props,null,S.mode,O),za(p,T),p.return=S,p)}function A(S,p,T,O){return p===null||p.tag!==4||p.stateNode.containerInfo!==T.containerInfo||p.stateNode.implementation!==T.implementation?(p=ws(T,S.mode,O),p.return=S,p):(p=a(p,T.children||[]),p.return=S,p)}function M(S,p,T,O,q){return p===null||p.tag!==7?(p=en(T,S.mode,O,q),p.return=S,p):(p=a(p,T),p.return=S,p)}function D(S,p,T){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=Ds(""+p,S.mode,T),p.return=S,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ct:return T=Ni(p.type,p.key,p.props,null,S.mode,T),za(T,p),T.return=S,T;case Et:return p=ws(p,S.mode,T),p.return=S,p;case Ct:return p=sn(p),D(S,p,T)}if(He(p)||ne(p))return p=en(p,S.mode,T,null),p.return=S,p;if(typeof p.then=="function")return D(S,Xi(p),T);if(p.$$typeof===Nt)return D(S,Li(S,p),T);Gi(S,p)}return null}function _(S,p,T,O){var q=p!==null?p.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return q!==null?null:h(S,p,""+T,O);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ct:return T.key===q?m(S,p,T,O):null;case Et:return T.key===q?A(S,p,T,O):null;case Ct:return T=sn(T),_(S,p,T,O)}if(He(T)||ne(T))return q!==null?null:M(S,p,T,O,null);if(typeof T.then=="function")return _(S,p,Xi(T),O);if(T.$$typeof===Nt)return _(S,p,Li(S,T),O);Gi(S,T)}return null}function x(S,p,T,O,q){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return S=S.get(T)||null,h(p,S,""+O,q);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case ct:return S=S.get(O.key===null?T:O.key)||null,m(p,S,O,q);case Et:return S=S.get(O.key===null?T:O.key)||null,A(p,S,O,q);case Ct:return O=sn(O),x(S,p,T,O,q)}if(He(O)||ne(O))return S=S.get(T)||null,M(p,S,O,q,null);if(typeof O.then=="function")return x(S,p,T,Xi(O),q);if(O.$$typeof===Nt)return x(S,p,T,Li(p,O),q);Gi(p,O)}return null}function B(S,p,T,O){for(var q=null,nt=null,j=p,k=p=0,et=null;j!==null&&k<T.length;k++){j.index>k?(et=j,j=null):et=j.sibling;var at=_(S,j,T[k],O);if(at===null){j===null&&(j=et);break}t&&j&&at.alternate===null&&e(S,j),p=i(at,p,k),nt===null?q=at:nt.sibling=at,nt=at,j=et}if(k===T.length)return l(S,j),lt&&el(S,k),q;if(j===null){for(;k<T.length;k++)j=D(S,T[k],O),j!==null&&(p=i(j,p,k),nt===null?q=j:nt.sibling=j,nt=j);return lt&&el(S,k),q}for(j=n(j);k<T.length;k++)et=x(j,S,k,T[k],O),et!==null&&(t&&et.alternate!==null&&j.delete(et.key===null?k:et.key),p=i(et,p,k),nt===null?q=et:nt.sibling=et,nt=et);return t&&j.forEach(function(Xl){return e(S,Xl)}),lt&&el(S,k),q}function X(S,p,T,O){if(T==null)throw Error(c(151));for(var q=null,nt=null,j=p,k=p=0,et=null,at=T.next();j!==null&&!at.done;k++,at=T.next()){j.index>k?(et=j,j=null):et=j.sibling;var Xl=_(S,j,at.value,O);if(Xl===null){j===null&&(j=et);break}t&&j&&Xl.alternate===null&&e(S,j),p=i(Xl,p,k),nt===null?q=Xl:nt.sibling=Xl,nt=Xl,j=et}if(at.done)return l(S,j),lt&&el(S,k),q;if(j===null){for(;!at.done;k++,at=T.next())at=D(S,at.value,O),at!==null&&(p=i(at,p,k),nt===null?q=at:nt.sibling=at,nt=at);return lt&&el(S,k),q}for(j=n(j);!at.done;k++,at=T.next())at=x(j,S,k,at.value,O),at!==null&&(t&&at.alternate!==null&&j.delete(at.key===null?k:at.key),p=i(at,p,k),nt===null?q=at:nt.sibling=at,nt=at);return t&&j.forEach(function(Dg){return e(S,Dg)}),lt&&el(S,k),q}function yt(S,p,T,O){if(typeof T=="object"&&T!==null&&T.type===ut&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ct:t:{for(var q=T.key;p!==null;){if(p.key===q){if(q=T.type,q===ut){if(p.tag===7){l(S,p.sibling),O=a(p,T.props.children),O.return=S,S=O;break t}}else if(p.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===Ct&&sn(q)===p.type){l(S,p.sibling),O=a(p,T.props),za(O,T),O.return=S,S=O;break t}l(S,p);break}else e(S,p);p=p.sibling}T.type===ut?(O=en(T.props.children,S.mode,O,T.key),O.return=S,S=O):(O=Ni(T.type,T.key,T.props,null,S.mode,O),za(O,T),O.return=S,S=O)}return o(S);case Et:t:{for(q=T.key;p!==null;){if(p.key===q)if(p.tag===4&&p.stateNode.containerInfo===T.containerInfo&&p.stateNode.implementation===T.implementation){l(S,p.sibling),O=a(p,T.children||[]),O.return=S,S=O;break t}else{l(S,p);break}else e(S,p);p=p.sibling}O=ws(T,S.mode,O),O.return=S,S=O}return o(S);case Ct:return T=sn(T),yt(S,p,T,O)}if(He(T))return B(S,p,T,O);if(ne(T)){if(q=ne(T),typeof q!="function")throw Error(c(150));return T=q.call(T),X(S,p,T,O)}if(typeof T.then=="function")return yt(S,p,Xi(T),O);if(T.$$typeof===Nt)return yt(S,p,Li(S,T),O);Gi(S,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,p!==null&&p.tag===6?(l(S,p.sibling),O=a(p,T),O.return=S,S=O):(l(S,p),O=Ds(T,S.mode,O),O.return=S,S=O),o(S)):l(S,p)}return function(S,p,T,O){try{Ca=0;var q=yt(S,p,T,O);return jn=null,q}catch(j){if(j===Ln||j===qi)throw j;var nt=pe(29,j,null,S.mode);return nt.lanes=O,nt.return=S,nt}finally{}}}var rn=lf(!0),nf=lf(!1),_l=!1;function Qs(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ks(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function xl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ml(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(st&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=Ui(t),Yo(t,null,l),e}return Ri(t,n,e,l),Ui(t)}function Oa(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Jr(t,l)}}function Vs(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?a=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?a=i=e:i=i.next=e}else a=i=e;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var Zs=!1;function Da(){if(Zs){var t=Bn;if(t!==null)throw t}}function wa(t,e,l,n){Zs=!1;var a=t.updateQueue;_l=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var m=h,A=m.next;m.next=null,o===null?i=A:o.next=A,o=m;var M=t.alternate;M!==null&&(M=M.updateQueue,h=M.lastBaseUpdate,h!==o&&(h===null?M.firstBaseUpdate=A:h.next=A,M.lastBaseUpdate=m))}if(i!==null){var D=a.baseState;o=0,M=A=m=null,h=i;do{var _=h.lane&-536870913,x=_!==h.lane;if(x?(tt&_)===_:(n&_)===_){_!==0&&_===Hn&&(Zs=!0),M!==null&&(M=M.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});t:{var B=t,X=h;_=e;var yt=l;switch(X.tag){case 1:if(B=X.payload,typeof B=="function"){D=B.call(yt,D,_);break t}D=B;break t;case 3:B.flags=B.flags&-65537|128;case 0:if(B=X.payload,_=typeof B=="function"?B.call(yt,D,_):B,_==null)break t;D=R({},D,_);break t;case 2:_l=!0}}_=h.callback,_!==null&&(t.flags|=64,x&&(t.flags|=8192),x=a.callbacks,x===null?a.callbacks=[_]:x.push(_))}else x={lane:_,tag:h.tag,payload:h.payload,callback:h.callback,next:null},M===null?(A=M=x,m=D):M=M.next=x,o|=_;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;x=h,h=x.next,x.next=null,a.lastBaseUpdate=x,a.shared.pending=null}}while(!0);M===null&&(m=D),a.baseState=m,a.firstBaseUpdate=A,a.lastBaseUpdate=M,i===null&&(a.shared.lanes=0),wl|=o,t.lanes=o,t.memoizedState=D}}function af(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function uf(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)af(l[t],e)}var qn=v(null),Qi=v(0);function sf(t,e){t=hl,N(Qi,t),N(qn,e),hl=t|e.baseLanes}function Js(){N(Qi,hl),N(qn,qn.current)}function ks(){hl=Qi.current,w(qn),w(Qi)}var ge=v(null),De=null;function Cl(t){var e=t.alternate;N(wt,wt.current&1),N(ge,t),De===null&&(e===null||qn.current!==null||e.memoizedState!==null)&&(De=t)}function Ws(t){N(wt,wt.current),N(ge,t),De===null&&(De=t)}function cf(t){t.tag===22?(N(wt,wt.current),N(ge,t),De===null&&(De=t)):zl()}function zl(){N(wt,wt.current),N(ge,ge.current)}function ve(t){w(ge),De===t&&(De=null),w(wt)}var wt=v(0);function Ki(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||er(l)||lr(l)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var al=0,J=null,dt=null,Bt=null,Vi=!1,Yn=!1,on=!1,Zi=0,Ra=0,Xn=null,bp=0;function zt(){throw Error(c(321))}function $s(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!ye(t[l],e[l]))return!1;return!0}function Fs(t,e,l,n,a,i){return al=i,J=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,z.H=t===null||t.memoizedState===null?Vf:hc,on=!1,i=l(n,a),on=!1,Yn&&(i=of(e,l,n,a)),rf(t),i}function rf(t){z.H=Ha;var e=dt!==null&&dt.next!==null;if(al=0,Bt=dt=J=null,Vi=!1,Ra=0,Xn=null,e)throw Error(c(300));t===null||Lt||(t=t.dependencies,t!==null&&Bi(t)&&(Lt=!0))}function of(t,e,l,n){J=t;var a=0;do{if(Yn&&(Xn=null),Ra=0,Yn=!1,25<=a)throw Error(c(301));if(a+=1,Bt=dt=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}z.H=Zf,i=e(l,n)}while(Yn);return i}function Ep(){var t=z.H,e=t.useState()[0];return e=typeof e.then=="function"?Ua(e):e,t=t.useState()[0],(dt!==null?dt.memoizedState:null)!==t&&(J.flags|=1024),e}function Is(){var t=Zi!==0;return Zi=0,t}function Ps(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function tc(t){if(Vi){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Vi=!1}al=0,Bt=dt=J=null,Yn=!1,Ra=Zi=0,Xn=null}function te(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?J.memoizedState=Bt=t:Bt=Bt.next=t,Bt}function Rt(){if(dt===null){var t=J.alternate;t=t!==null?t.memoizedState:null}else t=dt.next;var e=Bt===null?J.memoizedState:Bt.next;if(e!==null)Bt=e,dt=t;else{if(t===null)throw J.alternate===null?Error(c(467)):Error(c(310));dt=t,t={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Bt===null?J.memoizedState=Bt=t:Bt=Bt.next=t}return Bt}function Ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ua(t){var e=Ra;return Ra+=1,Xn===null&&(Xn=[]),t=Po(Xn,t,e),e=J,(Bt===null?e.memoizedState:Bt.next)===null&&(e=e.alternate,z.H=e===null||e.memoizedState===null?Vf:hc),t}function ki(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ua(t);if(t.$$typeof===Nt)return Zt(t)}throw Error(c(438,String(t)))}function ec(t){var e=null,l=J.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var n=J.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(e={data:n.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=Ji(),J.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),n=0;n<t;n++)l[n]=pn;return e.index++,l}function il(t,e){return typeof e=="function"?e(t):e}function Wi(t){var e=Rt();return lc(e,dt,t)}function lc(t,e,l){var n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=l;var a=t.baseQueue,i=n.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}e.baseQueue=a=i,n.pending=null}if(i=t.baseState,a===null)t.memoizedState=i;else{e=a.next;var h=o=null,m=null,A=e,M=!1;do{var D=A.lane&-536870913;if(D!==A.lane?(tt&D)===D:(al&D)===D){var _=A.revertLane;if(_===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),D===Hn&&(M=!0);else if((al&_)===_){A=A.next,_===Hn&&(M=!0);continue}else D={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},m===null?(h=m=D,o=i):m=m.next=D,J.lanes|=_,wl|=_;D=A.action,on&&l(i,D),i=A.hasEagerState?A.eagerState:l(i,D)}else _={lane:D,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},m===null?(h=m=_,o=i):m=m.next=_,J.lanes|=D,wl|=D;A=A.next}while(A!==null&&A!==e);if(m===null?o=i:m.next=h,!ye(i,t.memoizedState)&&(Lt=!0,M&&(l=Bn,l!==null)))throw l;t.memoizedState=i,t.baseState=o,t.baseQueue=m,n.lastRenderedState=i}return a===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function nc(t){var e=Rt(),l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=t;var n=l.dispatch,a=l.pending,i=e.memoizedState;if(a!==null){l.pending=null;var o=a=a.next;do i=t(i,o.action),o=o.next;while(o!==a);ye(i,e.memoizedState)||(Lt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),l.lastRenderedState=i}return[i,n]}function ff(t,e,l){var n=J,a=Rt(),i=lt;if(i){if(l===void 0)throw Error(c(407));l=l()}else l=e();var o=!ye((dt||a).memoizedState,l);if(o&&(a.memoizedState=l,Lt=!0),a=a.queue,uc(mf.bind(null,n,a,t),[t]),a.getSnapshot!==e||o||Bt!==null&&Bt.memoizedState.tag&1){if(n.flags|=2048,Gn(9,{destroy:void 0},df.bind(null,n,a,l,e),null),gt===null)throw Error(c(349));i||(al&127)!==0||hf(n,e,l)}return l}function hf(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=J.updateQueue,e===null?(e=Ji(),J.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function df(t,e,l,n){e.value=l,e.getSnapshot=n,yf(e)&&pf(t)}function mf(t,e,l){return l(function(){yf(e)&&pf(t)})}function yf(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!ye(t,l)}catch{return!0}}function pf(t){var e=tn(t,2);e!==null&&oe(e,t,2)}function ac(t){var e=te();if(typeof t=="function"){var l=t;if(t=l(),on){gl(!0);try{l()}finally{gl(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:t},e}function gf(t,e,l,n){return t.baseState=l,lc(t,dt,typeof n=="function"?n:il)}function Tp(t,e,l,n,a){if(Ii(t))throw Error(c(485));if(t=e.action,t!==null){var i={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};z.T!==null?l(!0):i.isTransition=!1,n(i),l=e.pending,l===null?(i.next=e.pending=i,vf(e,i)):(i.next=l.next,e.pending=l.next=i)}}function vf(t,e){var l=e.action,n=e.payload,a=t.state;if(e.isTransition){var i=z.T,o={};z.T=o;try{var h=l(a,n),m=z.S;m!==null&&m(o,h),Sf(t,e,h)}catch(A){ic(t,e,A)}finally{i!==null&&o.types!==null&&(i.types=o.types),z.T=i}}else try{i=l(a,n),Sf(t,e,i)}catch(A){ic(t,e,A)}}function Sf(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){bf(t,e,n)},function(n){return ic(t,e,n)}):bf(t,e,l)}function bf(t,e,l){e.status="fulfilled",e.value=l,Ef(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,vf(t,l)))}function ic(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,Ef(e),e=e.next;while(e!==n)}t.action=null}function Ef(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Tf(t,e){return e}function Af(t,e){if(lt){var l=gt.formState;if(l!==null){t:{var n=J;if(lt){if(At){e:{for(var a=At,i=Oe;a.nodeType!==8;){if(!i){a=null;break e}if(a=we(a.nextSibling),a===null){a=null;break e}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){At=we(a.nextSibling),n=a.data==="F!";break t}}Tl(n)}n=!1}n&&(e=l[0])}}return l=te(),l.memoizedState=l.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tf,lastRenderedState:e},l.queue=n,l=Gf.bind(null,J,n),n.dispatch=l,n=ac(!1),i=fc.bind(null,J,!1,n.queue),n=te(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=Tp.bind(null,J,a,i,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function _f(t){var e=Rt();return xf(e,dt,t)}function xf(t,e,l){if(e=lc(t,e,Tf)[0],t=Wi(il)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=Ua(e)}catch(o){throw o===Ln?qi:o}else n=e;e=Rt();var a=e.queue,i=a.dispatch;return l!==e.memoizedState&&(J.flags|=2048,Gn(9,{destroy:void 0},Ap.bind(null,a,l),null)),[n,i,t]}function Ap(t,e){t.action=e}function Mf(t){var e=Rt(),l=dt;if(l!==null)return xf(e,l,t);Rt(),e=e.memoizedState,l=Rt();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function Gn(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=J.updateQueue,e===null&&(e=Ji(),J.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(n=l.next,l.next=t,t.next=n,e.lastEffect=t),t}function Cf(){return Rt().memoizedState}function $i(t,e,l,n){var a=te();J.flags|=t,a.memoizedState=Gn(1|e,{destroy:void 0},l,n===void 0?null:n)}function Fi(t,e,l,n){var a=Rt();n=n===void 0?null:n;var i=a.memoizedState.inst;dt!==null&&n!==null&&$s(n,dt.memoizedState.deps)?a.memoizedState=Gn(e,i,l,n):(J.flags|=t,a.memoizedState=Gn(1|e,i,l,n))}function zf(t,e){$i(8390656,8,t,e)}function uc(t,e){Fi(2048,8,t,e)}function _p(t){J.flags|=4;var e=J.updateQueue;if(e===null)e=Ji(),J.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function Of(t){var e=Rt().memoizedState;return _p({ref:e,nextImpl:t}),function(){if((st&2)!==0)throw Error(c(440));return e.impl.apply(void 0,arguments)}}function Df(t,e){return Fi(4,2,t,e)}function wf(t,e){return Fi(4,4,t,e)}function Rf(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Uf(t,e,l){l=l!=null?l.concat([t]):null,Fi(4,4,Rf.bind(null,e,t),l)}function sc(){}function Nf(t,e){var l=Rt();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&$s(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function Hf(t,e){var l=Rt();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&$s(e,n[1]))return n[0];if(n=t(),on){gl(!0);try{t()}finally{gl(!1)}}return l.memoizedState=[n,e],n}function cc(t,e,l){return l===void 0||(al&1073741824)!==0&&(tt&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=Bh(),J.lanes|=t,wl|=t,l)}function Bf(t,e,l,n){return ye(l,e)?l:qn.current!==null?(t=cc(t,l,n),ye(t,e)||(Lt=!0),t):(al&42)===0||(al&1073741824)!==0&&(tt&261930)===0?(Lt=!0,t.memoizedState=l):(t=Bh(),J.lanes|=t,wl|=t,e)}function Lf(t,e,l,n,a){var i=U.p;U.p=i!==0&&8>i?i:8;var o=z.T,h={};z.T=h,fc(t,!1,e,l);try{var m=a(),A=z.S;if(A!==null&&A(h,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var M=Sp(m,n);Na(t,e,M,Ee(t))}else Na(t,e,n,Ee(t))}catch(D){Na(t,e,{then:function(){},status:"rejected",reason:D},Ee())}finally{U.p=i,o!==null&&h.types!==null&&(o.types=h.types),z.T=o}}function xp(){}function rc(t,e,l,n){if(t.tag!==5)throw Error(c(476));var a=jf(t).queue;Lf(t,a,e,Q,l===null?xp:function(){return qf(t),l(n)})}function jf(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:Q},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function qf(t){var e=jf(t);e.next===null&&(e=t.alternate.memoizedState),Na(t,e.next.queue,{},Ee())}function oc(){return Zt(Fa)}function Yf(){return Rt().memoizedState}function Xf(){return Rt().memoizedState}function Mp(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=Ee();t=xl(l);var n=Ml(e,t,l);n!==null&&(oe(n,e,l),Oa(n,e,l)),e={cache:qs()},t.payload=e;return}e=e.return}}function Cp(t,e,l){var n=Ee();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ii(t)?Qf(e,l):(l=zs(t,e,l,n),l!==null&&(oe(l,t,n),Kf(l,e,n)))}function Gf(t,e,l){var n=Ee();Na(t,e,l,n)}function Na(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ii(t))Qf(e,a);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,h=i(o,l);if(a.hasEagerState=!0,a.eagerState=h,ye(h,o))return Ri(t,e,a,0),gt===null&&wi(),!1}catch{}finally{}if(l=zs(t,e,a,n),l!==null)return oe(l,t,n),Kf(l,e,n),!0}return!1}function fc(t,e,l,n){if(n={lane:2,revertLane:Qc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ii(t)){if(e)throw Error(c(479))}else e=zs(t,l,n,2),e!==null&&oe(e,t,2)}function Ii(t){var e=t.alternate;return t===J||e!==null&&e===J}function Qf(t,e){Yn=Vi=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Kf(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Jr(t,l)}}var Ha={readContext:Zt,use:ki,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};Ha.useEffectEvent=zt;var Vf={readContext:Zt,use:ki,useCallback:function(t,e){return te().memoizedState=[t,e===void 0?null:e],t},useContext:Zt,useEffect:zf,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,$i(4194308,4,Rf.bind(null,e,t),l)},useLayoutEffect:function(t,e){return $i(4194308,4,t,e)},useInsertionEffect:function(t,e){$i(4,2,t,e)},useMemo:function(t,e){var l=te();e=e===void 0?null:e;var n=t();if(on){gl(!0);try{t()}finally{gl(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=te();if(l!==void 0){var a=l(e);if(on){gl(!0);try{l(e)}finally{gl(!1)}}}else a=e;return n.memoizedState=n.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},n.queue=t,t=t.dispatch=Cp.bind(null,J,t),[n.memoizedState,t]},useRef:function(t){var e=te();return t={current:t},e.memoizedState=t},useState:function(t){t=ac(t);var e=t.queue,l=Gf.bind(null,J,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:sc,useDeferredValue:function(t,e){var l=te();return cc(l,t,e)},useTransition:function(){var t=ac(!1);return t=Lf.bind(null,J,t.queue,!0,!1),te().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=J,a=te();if(lt){if(l===void 0)throw Error(c(407));l=l()}else{if(l=e(),gt===null)throw Error(c(349));(tt&127)!==0||hf(n,e,l)}a.memoizedState=l;var i={value:l,getSnapshot:e};return a.queue=i,zf(mf.bind(null,n,i,t),[t]),n.flags|=2048,Gn(9,{destroy:void 0},df.bind(null,n,i,l,e),null),l},useId:function(){var t=te(),e=gt.identifierPrefix;if(lt){var l=Ke,n=Qe;l=(n&~(1<<32-me(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Zi++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=bp++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:oc,useFormState:Af,useActionState:Af,useOptimistic:function(t){var e=te();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=fc.bind(null,J,!0,l),l.dispatch=e,[t,e]},useMemoCache:ec,useCacheRefresh:function(){return te().memoizedState=Mp.bind(null,J)},useEffectEvent:function(t){var e=te(),l={impl:t};return e.memoizedState=l,function(){if((st&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},hc={readContext:Zt,use:ki,useCallback:Nf,useContext:Zt,useEffect:uc,useImperativeHandle:Uf,useInsertionEffect:Df,useLayoutEffect:wf,useMemo:Hf,useReducer:Wi,useRef:Cf,useState:function(){return Wi(il)},useDebugValue:sc,useDeferredValue:function(t,e){var l=Rt();return Bf(l,dt.memoizedState,t,e)},useTransition:function(){var t=Wi(il)[0],e=Rt().memoizedState;return[typeof t=="boolean"?t:Ua(t),e]},useSyncExternalStore:ff,useId:Yf,useHostTransitionStatus:oc,useFormState:_f,useActionState:_f,useOptimistic:function(t,e){var l=Rt();return gf(l,dt,t,e)},useMemoCache:ec,useCacheRefresh:Xf};hc.useEffectEvent=Of;var Zf={readContext:Zt,use:ki,useCallback:Nf,useContext:Zt,useEffect:uc,useImperativeHandle:Uf,useInsertionEffect:Df,useLayoutEffect:wf,useMemo:Hf,useReducer:nc,useRef:Cf,useState:function(){return nc(il)},useDebugValue:sc,useDeferredValue:function(t,e){var l=Rt();return dt===null?cc(l,t,e):Bf(l,dt.memoizedState,t,e)},useTransition:function(){var t=nc(il)[0],e=Rt().memoizedState;return[typeof t=="boolean"?t:Ua(t),e]},useSyncExternalStore:ff,useId:Yf,useHostTransitionStatus:oc,useFormState:Mf,useActionState:Mf,useOptimistic:function(t,e){var l=Rt();return dt!==null?gf(l,dt,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:ec,useCacheRefresh:Xf};Zf.useEffectEvent=Of;function dc(t,e,l,n){e=t.memoizedState,l=l(n,e),l=l==null?e:R({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var mc={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=Ee(),a=xl(n);a.payload=e,l!=null&&(a.callback=l),e=Ml(t,a,n),e!==null&&(oe(e,t,n),Oa(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=Ee(),a=xl(n);a.tag=1,a.payload=e,l!=null&&(a.callback=l),e=Ml(t,a,n),e!==null&&(oe(e,t,n),Oa(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=Ee(),n=xl(l);n.tag=2,e!=null&&(n.callback=e),e=Ml(t,n,l),e!==null&&(oe(e,t,l),Oa(e,t,l))}};function Jf(t,e,l,n,a,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,o):e.prototype&&e.prototype.isPureReactComponent?!Ea(l,n)||!Ea(a,i):!0}function kf(t,e,l,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,n),e.state!==t&&mc.enqueueReplaceState(e,e.state,null)}function fn(t,e){var l=e;if("ref"in e){l={};for(var n in e)n!=="ref"&&(l[n]=e[n])}if(t=t.defaultProps){l===e&&(l=R({},l));for(var a in t)l[a]===void 0&&(l[a]=t[a])}return l}function Wf(t){Di(t)}function $f(t){console.error(t)}function Ff(t){Di(t)}function Pi(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function If(t,e,l){try{var n=t.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function yc(t,e,l){return l=xl(l),l.tag=3,l.payload={element:null},l.callback=function(){Pi(t,e)},l}function Pf(t){return t=xl(t),t.tag=3,t}function th(t,e,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var i=n.value;t.payload=function(){return a(i)},t.callback=function(){If(e,l,n)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(t.callback=function(){If(e,l,n),typeof a!="function"&&(Rl===null?Rl=new Set([this]):Rl.add(this));var h=n.stack;this.componentDidCatch(n.value,{componentStack:h!==null?h:""})})}function zp(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&Nn(e,l,a,!0),l=ge.current,l!==null){switch(l.tag){case 31:case 13:return De===null?fu():l.alternate===null&&Ot===0&&(Ot=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===Yi?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),Yc(t,n,a)),!1;case 22:return l.flags|=65536,n===Yi?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([n]):l.add(n)),Yc(t,n,a)),!1}throw Error(c(435,l.tag))}return Yc(t,n,a),fu(),!1}if(lt)return e=ge.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==Ns&&(t=Error(c(422),{cause:n}),_a(Me(t,l)))):(n!==Ns&&(e=Error(c(423),{cause:n}),_a(Me(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=Me(n,l),a=yc(t.stateNode,n,a),Vs(t,a),Ot!==4&&(Ot=2)),!1;var i=Error(c(520),{cause:n});if(i=Me(i,l),Qa===null?Qa=[i]:Qa.push(i),Ot!==4&&(Ot=2),e===null)return!0;n=Me(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=yc(l.stateNode,n,t),Vs(l,t),!1;case 1:if(e=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Rl===null||!Rl.has(i))))return l.flags|=65536,a&=-a,l.lanes|=a,a=Pf(a),th(a,t,l,n),Vs(l,a),!1}l=l.return}while(l!==null);return!1}var pc=Error(c(461)),Lt=!1;function Jt(t,e,l,n){e.child=t===null?nf(e,null,l,n):rn(e,t.child,l,n)}function eh(t,e,l,n,a){l=l.render;var i=e.ref;if("ref"in n){var o={};for(var h in n)h!=="ref"&&(o[h]=n[h])}else o=n;return an(e),n=Fs(t,e,l,o,i,a),h=Is(),t!==null&&!Lt?(Ps(t,e,a),ul(t,e,a)):(lt&&h&&Rs(e),e.flags|=1,Jt(t,e,n,a),e.child)}function lh(t,e,l,n,a){if(t===null){var i=l.type;return typeof i=="function"&&!Os(i)&&i.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=i,nh(t,e,i,n,a)):(t=Ni(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!_c(t,a)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:Ea,l(o,n)&&t.ref===e.ref)return ul(t,e,a)}return e.flags|=1,t=tl(i,n),t.ref=e.ref,t.return=e,e.child=t}function nh(t,e,l,n,a){if(t!==null){var i=t.memoizedProps;if(Ea(i,n)&&t.ref===e.ref)if(Lt=!1,e.pendingProps=n=i,_c(t,a))(t.flags&131072)!==0&&(Lt=!0);else return e.lanes=t.lanes,ul(t,e,a)}return gc(t,e,l,n,a)}function ah(t,e,l,n){var a=n.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((e.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,t!==null){for(n=e.child=t.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~i}else n=0,e.child=null;return ih(t,e,i,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&ji(e,i!==null?i.cachePool:null),i!==null?sf(e,i):Js(),cf(e);else return n=e.lanes=536870912,ih(t,e,i!==null?i.baseLanes|l:l,l,n)}else i!==null?(ji(e,i.cachePool),sf(e,i),zl(),e.memoizedState=null):(t!==null&&ji(e,null),Js(),zl());return Jt(t,e,a,l),e.child}function Ba(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function ih(t,e,l,n,a){var i=Xs();return i=i===null?null:{parent:Ht._currentValue,pool:i},e.memoizedState={baseLanes:l,cachePool:i},t!==null&&ji(e,null),Js(),cf(e),t!==null&&Nn(t,e,n,!0),e.childLanes=a,null}function tu(t,e){return e=lu({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function uh(t,e,l){return rn(e,t.child,null,l),t=tu(e,e.pendingProps),t.flags|=2,ve(e),e.memoizedState=null,t}function Op(t,e,l){var n=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(lt){if(n.mode==="hidden")return t=tu(e,n),e.lanes=536870912,Ba(null,t);if(Ws(e),(t=At)?(t=vd(t,Oe),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:bl!==null?{id:Qe,overflow:Ke}:null,retryLane:536870912,hydrationErrors:null},l=Go(t),l.return=e,e.child=l,Vt=e,At=null)):t=null,t===null)throw Tl(e);return e.lanes=536870912,null}return tu(e,n)}var i=t.memoizedState;if(i!==null){var o=i.dehydrated;if(Ws(e),a)if(e.flags&256)e.flags&=-257,e=uh(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(c(558));else if(Lt||Nn(t,e,l,!1),a=(l&t.childLanes)!==0,Lt||a){if(n=gt,n!==null&&(o=kr(n,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,tn(t,o),oe(n,t,o),pc;fu(),e=uh(t,e,l)}else t=i.treeContext,At=we(o.nextSibling),Vt=e,lt=!0,El=null,Oe=!1,t!==null&&Vo(e,t),e=tu(e,n),e.flags|=4096;return e}return t=tl(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function eu(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function gc(t,e,l,n,a){return an(e),l=Fs(t,e,l,n,void 0,a),n=Is(),t!==null&&!Lt?(Ps(t,e,a),ul(t,e,a)):(lt&&n&&Rs(e),e.flags|=1,Jt(t,e,l,a),e.child)}function sh(t,e,l,n,a,i){return an(e),e.updateQueue=null,l=of(e,n,l,a),rf(t),n=Is(),t!==null&&!Lt?(Ps(t,e,i),ul(t,e,i)):(lt&&n&&Rs(e),e.flags|=1,Jt(t,e,l,i),e.child)}function ch(t,e,l,n,a){if(an(e),e.stateNode===null){var i=Dn,o=l.contextType;typeof o=="object"&&o!==null&&(i=Zt(o)),i=new l(n,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=mc,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=n,i.state=e.memoizedState,i.refs={},Qs(e),o=l.contextType,i.context=typeof o=="object"&&o!==null?Zt(o):Dn,i.state=e.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(dc(e,l,o,n),i.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&mc.enqueueReplaceState(i,i.state,null),wa(e,n,i,a),Da(),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){i=e.stateNode;var h=e.memoizedProps,m=fn(l,h);i.props=m;var A=i.context,M=l.contextType;o=Dn,typeof M=="object"&&M!==null&&(o=Zt(M));var D=l.getDerivedStateFromProps;M=typeof D=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=e.pendingProps!==h,M||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||A!==o)&&kf(e,i,n,o),_l=!1;var _=e.memoizedState;i.state=_,wa(e,n,i,a),Da(),A=e.memoizedState,h||_!==A||_l?(typeof D=="function"&&(dc(e,l,D,n),A=e.memoizedState),(m=_l||Jf(e,l,m,n,_,A,o))?(M||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=A),i.props=n,i.state=A,i.context=o,n=m):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{i=e.stateNode,Ks(t,e),o=e.memoizedProps,M=fn(l,o),i.props=M,D=e.pendingProps,_=i.context,A=l.contextType,m=Dn,typeof A=="object"&&A!==null&&(m=Zt(A)),h=l.getDerivedStateFromProps,(A=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==D||_!==m)&&kf(e,i,n,m),_l=!1,_=e.memoizedState,i.state=_,wa(e,n,i,a),Da();var x=e.memoizedState;o!==D||_!==x||_l||t!==null&&t.dependencies!==null&&Bi(t.dependencies)?(typeof h=="function"&&(dc(e,l,h,n),x=e.memoizedState),(M=_l||Jf(e,l,M,n,_,x,m)||t!==null&&t.dependencies!==null&&Bi(t.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,x,m),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,x,m)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=x),i.props=n,i.state=x,i.context=m,n=M):(typeof i.componentDidUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),n=!1)}return i=n,eu(t,e),n=(e.flags&128)!==0,i||n?(i=e.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:i.render(),e.flags|=1,t!==null&&n?(e.child=rn(e,t.child,null,a),e.child=rn(e,null,l,a)):Jt(t,e,l,a),e.memoizedState=i.state,t=e.child):t=ul(t,e,a),t}function rh(t,e,l,n){return ln(),e.flags|=256,Jt(t,e,l,n),e.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(t){return{baseLanes:t,cachePool:Fo()}}function bc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=be),t}function oh(t,e,l){var n=e.pendingProps,a=!1,i=(e.flags&128)!==0,o;if((o=i)||(o=t!==null&&t.memoizedState===null?!1:(wt.current&2)!==0),o&&(a=!0,e.flags&=-129),o=(e.flags&32)!==0,e.flags&=-33,t===null){if(lt){if(a?Cl(e):zl(),(t=At)?(t=vd(t,Oe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:bl!==null?{id:Qe,overflow:Ke}:null,retryLane:536870912,hydrationErrors:null},l=Go(t),l.return=e,e.child=l,Vt=e,At=null)):t=null,t===null)throw Tl(e);return lr(t)?e.lanes=32:e.lanes=536870912,null}var h=n.children;return n=n.fallback,a?(zl(),a=e.mode,h=lu({mode:"hidden",children:h},a),n=en(n,a,l,null),h.return=e,n.return=e,h.sibling=n,e.child=h,n=e.child,n.memoizedState=Sc(l),n.childLanes=bc(t,o,l),e.memoizedState=vc,Ba(null,n)):(Cl(e),Ec(e,h))}var m=t.memoizedState;if(m!==null&&(h=m.dehydrated,h!==null)){if(i)e.flags&256?(Cl(e),e.flags&=-257,e=Tc(t,e,l)):e.memoizedState!==null?(zl(),e.child=t.child,e.flags|=128,e=null):(zl(),h=n.fallback,a=e.mode,n=lu({mode:"visible",children:n.children},a),h=en(h,a,l,null),h.flags|=2,n.return=e,h.return=e,n.sibling=h,e.child=n,rn(e,t.child,null,l),n=e.child,n.memoizedState=Sc(l),n.childLanes=bc(t,o,l),e.memoizedState=vc,e=Ba(null,n));else if(Cl(e),lr(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var A=o.dgst;o=A,n=Error(c(419)),n.stack="",n.digest=o,_a({value:n,source:null,stack:null}),e=Tc(t,e,l)}else if(Lt||Nn(t,e,l,!1),o=(l&t.childLanes)!==0,Lt||o){if(o=gt,o!==null&&(n=kr(o,l),n!==0&&n!==m.retryLane))throw m.retryLane=n,tn(t,n),oe(o,t,n),pc;er(h)||fu(),e=Tc(t,e,l)}else er(h)?(e.flags|=192,e.child=t.child,e=null):(t=m.treeContext,At=we(h.nextSibling),Vt=e,lt=!0,El=null,Oe=!1,t!==null&&Vo(e,t),e=Ec(e,n.children),e.flags|=4096);return e}return a?(zl(),h=n.fallback,a=e.mode,m=t.child,A=m.sibling,n=tl(m,{mode:"hidden",children:n.children}),n.subtreeFlags=m.subtreeFlags&65011712,A!==null?h=tl(A,h):(h=en(h,a,l,null),h.flags|=2),h.return=e,n.return=e,n.sibling=h,e.child=n,Ba(null,n),n=e.child,h=t.child.memoizedState,h===null?h=Sc(l):(a=h.cachePool,a!==null?(m=Ht._currentValue,a=a.parent!==m?{parent:m,pool:m}:a):a=Fo(),h={baseLanes:h.baseLanes|l,cachePool:a}),n.memoizedState=h,n.childLanes=bc(t,o,l),e.memoizedState=vc,Ba(t.child,n)):(Cl(e),l=t.child,t=l.sibling,l=tl(l,{mode:"visible",children:n.children}),l.return=e,l.sibling=null,t!==null&&(o=e.deletions,o===null?(e.deletions=[t],e.flags|=16):o.push(t)),e.child=l,e.memoizedState=null,l)}function Ec(t,e){return e=lu({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function lu(t,e){return t=pe(22,t,null,e),t.lanes=0,t}function Tc(t,e,l){return rn(e,t.child,null,l),t=Ec(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function fh(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Ls(t.return,e,l)}function Ac(t,e,l,n,a,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=l,o.tailMode=a,o.treeForkCount=i)}function hh(t,e,l){var n=e.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var o=wt.current,h=(o&2)!==0;if(h?(o=o&1|2,e.flags|=128):o&=1,N(wt,o),Jt(t,e,n,l),n=lt?Aa:0,!h&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&fh(t,l,e);else if(t.tag===19)fh(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(a){case"forwards":for(l=e.child,a=null;l!==null;)t=l.alternate,t!==null&&Ki(t)===null&&(a=l),l=l.sibling;l=a,l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),Ac(e,!1,a,l,i,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&Ki(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}Ac(e,!0,l,null,i,n);break;case"together":Ac(e,!1,null,null,void 0,n);break;default:e.memoizedState=null}return e.child}function ul(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),wl|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(Nn(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(c(153));if(e.child!==null){for(t=e.child,l=tl(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=tl(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function _c(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Bi(t)))}function Dp(t,e,l){switch(e.tag){case 3:Pt(e,e.stateNode.containerInfo),Al(e,Ht,t.memoizedState.cache),ln();break;case 27:case 5:ca(e);break;case 4:Pt(e,e.stateNode.containerInfo);break;case 10:Al(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Ws(e),null;break;case 13:var n=e.memoizedState;if(n!==null)return n.dehydrated!==null?(Cl(e),e.flags|=128,null):(l&e.child.childLanes)!==0?oh(t,e,l):(Cl(e),t=ul(t,e,l),t!==null?t.sibling:null);Cl(e);break;case 19:var a=(t.flags&128)!==0;if(n=(l&e.childLanes)!==0,n||(Nn(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return hh(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),N(wt,wt.current),n)break;return null;case 22:return e.lanes=0,ah(t,e,l,e.pendingProps);case 24:Al(e,Ht,t.memoizedState.cache)}return ul(t,e,l)}function dh(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Lt=!0;else{if(!_c(t,l)&&(e.flags&128)===0)return Lt=!1,Dp(t,e,l);Lt=(t.flags&131072)!==0}else Lt=!1,lt&&(e.flags&1048576)!==0&&Ko(e,Aa,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=sn(e.elementType),e.type=t,typeof t=="function")Os(t)?(n=fn(t,n),e.tag=1,e=ch(null,e,t,n,l)):(e.tag=0,e=gc(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===ee){e.tag=11,e=eh(null,e,t,n,l);break t}else if(a===$){e.tag=14,e=lh(null,e,t,n,l);break t}}throw e=$e(t)||t,Error(c(306,e,""))}}return e;case 0:return gc(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=fn(n,e.pendingProps),ch(t,e,n,a,l);case 3:t:{if(Pt(e,e.stateNode.containerInfo),t===null)throw Error(c(387));n=e.pendingProps;var i=e.memoizedState;a=i.element,Ks(t,e),wa(e,n,null,l);var o=e.memoizedState;if(n=o.cache,Al(e,Ht,n),n!==i.cache&&js(e,[Ht],l,!0),Da(),n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=rh(t,e,n,l);break t}else if(n!==a){a=Me(Error(c(424)),e),_a(a),e=rh(t,e,n,l);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(At=we(t.firstChild),Vt=e,lt=!0,El=null,Oe=!0,l=nf(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ln(),n===a){e=ul(t,e,l);break t}Jt(t,e,n,l)}e=e.child}return e;case 26:return eu(t,e),t===null?(l=_d(e.type,null,e.pendingProps,null))?e.memoizedState=l:lt||(l=e.type,t=e.pendingProps,n=vu(F.current).createElement(l),n[Kt]=e,n[ae]=t,kt(n,l,t),Gt(n),e.stateNode=n):e.memoizedState=_d(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return ca(e),t===null&&lt&&(n=e.stateNode=Ed(e.type,e.pendingProps,F.current),Vt=e,Oe=!0,a=At,Bl(e.type)?(nr=a,At=we(n.firstChild)):At=a),Jt(t,e,e.pendingProps.children,l),eu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&lt&&((a=n=At)&&(n=ug(n,e.type,e.pendingProps,Oe),n!==null?(e.stateNode=n,Vt=e,At=we(n.firstChild),Oe=!1,a=!0):a=!1),a||Tl(e)),ca(e),a=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,n=i.children,Ic(a,i)?n=null:o!==null&&Ic(a,o)&&(e.flags|=32),e.memoizedState!==null&&(a=Fs(t,e,Ep,null,null,l),Fa._currentValue=a),eu(t,e),Jt(t,e,n,l),e.child;case 6:return t===null&&lt&&((t=l=At)&&(l=sg(l,e.pendingProps,Oe),l!==null?(e.stateNode=l,Vt=e,At=null,t=!0):t=!1),t||Tl(e)),null;case 13:return oh(t,e,l);case 4:return Pt(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=rn(e,null,n,l):Jt(t,e,n,l),e.child;case 11:return eh(t,e,e.type,e.pendingProps,l);case 7:return Jt(t,e,e.pendingProps,l),e.child;case 8:return Jt(t,e,e.pendingProps.children,l),e.child;case 12:return Jt(t,e,e.pendingProps.children,l),e.child;case 10:return n=e.pendingProps,Al(e,e.type,n.value),Jt(t,e,n.children,l),e.child;case 9:return a=e.type._context,n=e.pendingProps.children,an(e),a=Zt(a),n=n(a),e.flags|=1,Jt(t,e,n,l),e.child;case 14:return lh(t,e,e.type,e.pendingProps,l);case 15:return nh(t,e,e.type,e.pendingProps,l);case 19:return hh(t,e,l);case 31:return Op(t,e,l);case 22:return ah(t,e,l,e.pendingProps);case 24:return an(e),n=Zt(Ht),t===null?(a=Xs(),a===null&&(a=gt,i=qs(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=l),a=i),e.memoizedState={parent:n,cache:a},Qs(e),Al(e,Ht,a)):((t.lanes&l)!==0&&(Ks(t,e),wa(e,null,null,l),Da()),a=t.memoizedState,i=e.memoizedState,a.parent!==n?(a={parent:n,cache:n},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),Al(e,Ht,n)):(n=i.cache,Al(e,Ht,n),n!==a.cache&&js(e,[Ht],l,!0))),Jt(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(c(156,e.tag))}function sl(t){t.flags|=4}function xc(t,e,l,n,a){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(Yh())t.flags|=8192;else throw cn=Yi,Gs}else t.flags&=-16777217}function mh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Od(e))if(Yh())t.flags|=8192;else throw cn=Yi,Gs}function nu(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Vr():536870912,t.lanes|=e,Zn|=e)}function La(t,e){if(!lt)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function _t(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,n=0;if(e)for(var a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=n,t.childLanes=l,e}function wp(t,e,l){var n=e.pendingProps;switch(Us(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(e),null;case 1:return _t(e),null;case 3:return l=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),nl(Ht),Dt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Un(e)?sl(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Hs())),_t(e),null;case 26:var a=e.type,i=e.memoizedState;return t===null?(sl(e),i!==null?(_t(e),mh(e,i)):(_t(e),xc(e,a,null,n,l))):i?i!==t.memoizedState?(sl(e),_t(e),mh(e,i)):(_t(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&sl(e),_t(e),xc(e,a,t,n,l)),null;case 27:if(mi(e),l=F.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&sl(e);else{if(!n){if(e.stateNode===null)throw Error(c(166));return _t(e),null}t=L.current,Un(e)?Zo(e):(t=Ed(a,n,l),e.stateNode=t,sl(e))}return _t(e),null;case 5:if(mi(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&sl(e);else{if(!n){if(e.stateNode===null)throw Error(c(166));return _t(e),null}if(i=L.current,Un(e))Zo(e);else{var o=vu(F.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?o.createElement(a,{is:n.is}):o.createElement(a)}}i[Kt]=e,i[ae]=n;t:for(o=e.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break t;for(;o.sibling===null;){if(o.return===null||o.return===e)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}e.stateNode=i;t:switch(kt(i,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&sl(e)}}return _t(e),xc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&sl(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(c(166));if(t=F.current,Un(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,a=Vt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}t[Kt]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||od(t.nodeValue,l)),t||Tl(e,!0)}else t=vu(t).createTextNode(n),t[Kt]=e,e.stateNode=t}return _t(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=Un(e),l!==null){if(t===null){if(!n)throw Error(c(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(557));t[Kt]=e}else ln(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;_t(e),t=!1}else l=Hs(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(ve(e),e):(ve(e),null);if((e.flags&128)!==0)throw Error(c(558))}return _t(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=Un(e),n!==null&&n.dehydrated!==null){if(t===null){if(!a)throw Error(c(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[Kt]=e}else ln(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;_t(e),a=!1}else a=Hs(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(ve(e),e):(ve(e),null)}return ve(e),(e.flags&128)!==0?(e.lanes=l,e):(l=n!==null,t=t!==null&&t.memoizedState!==null,l&&(n=e.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==a&&(n.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),nu(e,e.updateQueue),_t(e),null);case 4:return Dt(),t===null&&Jc(e.stateNode.containerInfo),_t(e),null;case 10:return nl(e.type),_t(e),null;case 19:if(w(wt),n=e.memoizedState,n===null)return _t(e),null;if(a=(e.flags&128)!==0,i=n.rendering,i===null)if(a)La(n,!1);else{if(Ot!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=Ki(t),i!==null){for(e.flags|=128,La(n,!1),t=i.updateQueue,e.updateQueue=t,nu(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Xo(l,t),l=l.sibling;return N(wt,wt.current&1|2),lt&&el(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&he()>cu&&(e.flags|=128,a=!0,La(n,!1),e.lanes=4194304)}else{if(!a)if(t=Ki(i),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,nu(e,t),La(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!lt)return _t(e),null}else 2*he()-n.renderingStartTime>cu&&l!==536870912&&(e.flags|=128,a=!0,La(n,!1),e.lanes=4194304);n.isBackwards?(i.sibling=e.child,e.child=i):(t=n.last,t!==null?t.sibling=i:e.child=i,n.last=i)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=he(),t.sibling=null,l=wt.current,N(wt,a?l&1|2:l&1),lt&&el(e,n.treeForkCount),t):(_t(e),null);case 22:case 23:return ve(e),ks(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(l&536870912)!==0&&(e.flags&128)===0&&(_t(e),e.subtreeFlags&6&&(e.flags|=8192)):_t(e),l=e.updateQueue,l!==null&&nu(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==l&&(e.flags|=2048),t!==null&&w(un),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),nl(Ht),_t(e),null;case 25:return null;case 30:return null}throw Error(c(156,e.tag))}function Rp(t,e){switch(Us(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return nl(Ht),Dt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return mi(e),null;case 31:if(e.memoizedState!==null){if(ve(e),e.alternate===null)throw Error(c(340));ln()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(ve(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));ln()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return w(wt),null;case 4:return Dt(),null;case 10:return nl(e.type),null;case 22:case 23:return ve(e),ks(),t!==null&&w(un),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return nl(Ht),null;case 25:return null;default:return null}}function yh(t,e){switch(Us(e),e.tag){case 3:nl(Ht),Dt();break;case 26:case 27:case 5:mi(e);break;case 4:Dt();break;case 31:e.memoizedState!==null&&ve(e);break;case 13:ve(e);break;case 19:w(wt);break;case 10:nl(e.type);break;case 22:case 23:ve(e),ks(),t!==null&&w(un);break;case 24:nl(Ht)}}function ja(t,e){try{var l=e.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&t)===t){n=void 0;var i=l.create,o=l.inst;n=i(),o.destroy=n}l=l.next}while(l!==a)}}catch(h){ft(e,e.return,h)}}function Ol(t,e,l){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&t)===t){var o=n.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,a=e;var m=l,A=h;try{A()}catch(M){ft(a,m,M)}}}n=n.next}while(n!==i)}}catch(M){ft(e,e.return,M)}}function ph(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{uf(e,l)}catch(n){ft(t,t.return,n)}}}function gh(t,e,l){l.props=fn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){ft(t,e,n)}}function qa(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(a){ft(t,e,a)}}function Ve(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){ft(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){ft(t,e,a)}else l.current=null}function vh(t){var e=t.type,l=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break t;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){ft(t,t.return,a)}}function Mc(t,e,l){try{var n=t.stateNode;tg(n,t.type,l,e),n[ae]=e}catch(a){ft(t,t.return,a)}}function Sh(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Bl(t.type)||t.tag===4}function Cc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Sh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Bl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function zc(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=Ie));else if(n!==4&&(n===27&&Bl(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(zc(t,e,l),t=t.sibling;t!==null;)zc(t,e,l),t=t.sibling}function au(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(n!==4&&(n===27&&Bl(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(au(t,e,l),t=t.sibling;t!==null;)au(t,e,l),t=t.sibling}function bh(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);kt(e,n,l),e[Kt]=t,e[ae]=l}catch(i){ft(t,t.return,i)}}var cl=!1,jt=!1,Oc=!1,Eh=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function Up(t,e){if(t=t.containerInfo,$c=xu,t=Ro(t),Ts(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break t}var o=0,h=-1,m=-1,A=0,M=0,D=t,_=null;e:for(;;){for(var x;D!==l||a!==0&&D.nodeType!==3||(h=o+a),D!==i||n!==0&&D.nodeType!==3||(m=o+n),D.nodeType===3&&(o+=D.nodeValue.length),(x=D.firstChild)!==null;)_=D,D=x;for(;;){if(D===t)break e;if(_===l&&++A===a&&(h=o),_===i&&++M===n&&(m=o),(x=D.nextSibling)!==null)break;D=_,_=D.parentNode}D=x}l=h===-1||m===-1?null:{start:h,end:m}}else l=null}l=l||{start:0,end:0}}else l=null;for(Fc={focusedElem:t,selectionRange:l},xu=!1,Qt=e;Qt!==null;)if(e=Qt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Qt=t;else for(;Qt!==null;){switch(e=Qt,i=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)a=t[l],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&i!==null){t=void 0,l=e,a=i.memoizedProps,i=i.memoizedState,n=l.stateNode;try{var B=fn(l.type,a);t=n.getSnapshotBeforeUpdate(B,i),n.__reactInternalSnapshotBeforeUpdate=t}catch(X){ft(l,l.return,X)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,l=t.nodeType,l===9)tr(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":tr(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(c(163))}if(t=e.sibling,t!==null){t.return=e.return,Qt=t;break}Qt=e.return}}function Th(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:ol(t,l),n&4&&ja(5,l);break;case 1:if(ol(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(o){ft(l,l.return,o)}else{var a=fn(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(o){ft(l,l.return,o)}}n&64&&ph(l),n&512&&qa(l,l.return);break;case 3:if(ol(t,l),n&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{uf(t,e)}catch(o){ft(l,l.return,o)}}break;case 27:e===null&&n&4&&bh(l);case 26:case 5:ol(t,l),e===null&&n&4&&vh(l),n&512&&qa(l,l.return);break;case 12:ol(t,l);break;case 31:ol(t,l),n&4&&xh(t,l);break;case 13:ol(t,l),n&4&&Mh(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Gp.bind(null,l),cg(t,l))));break;case 22:if(n=l.memoizedState!==null||cl,!n){e=e!==null&&e.memoizedState!==null||jt,a=cl;var i=jt;cl=n,(jt=e)&&!i?fl(t,l,(l.subtreeFlags&8772)!==0):ol(t,l),cl=a,jt=i}break;case 30:break;default:ol(t,l)}}function Ah(t){var e=t.alternate;e!==null&&(t.alternate=null,Ah(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&is(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var xt=null,ue=!1;function rl(t,e,l){for(l=l.child;l!==null;)_h(t,e,l),l=l.sibling}function _h(t,e,l){if(de&&typeof de.onCommitFiberUnmount=="function")try{de.onCommitFiberUnmount(ra,l)}catch{}switch(l.tag){case 26:jt||Ve(l,e),rl(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:jt||Ve(l,e);var n=xt,a=ue;Bl(l.type)&&(xt=l.stateNode,ue=!1),rl(t,e,l),ka(l.stateNode),xt=n,ue=a;break;case 5:jt||Ve(l,e);case 6:if(n=xt,a=ue,xt=null,rl(t,e,l),xt=n,ue=a,xt!==null)if(ue)try{(xt.nodeType===9?xt.body:xt.nodeName==="HTML"?xt.ownerDocument.body:xt).removeChild(l.stateNode)}catch(i){ft(l,e,i)}else try{xt.removeChild(l.stateNode)}catch(i){ft(l,e,i)}break;case 18:xt!==null&&(ue?(t=xt,pd(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),ta(t)):pd(xt,l.stateNode));break;case 4:n=xt,a=ue,xt=l.stateNode.containerInfo,ue=!0,rl(t,e,l),xt=n,ue=a;break;case 0:case 11:case 14:case 15:Ol(2,l,e),jt||Ol(4,l,e),rl(t,e,l);break;case 1:jt||(Ve(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&gh(l,e,n)),rl(t,e,l);break;case 21:rl(t,e,l);break;case 22:jt=(n=jt)||l.memoizedState!==null,rl(t,e,l),jt=n;break;default:rl(t,e,l)}}function xh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ta(t)}catch(l){ft(e,e.return,l)}}}function Mh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ta(t)}catch(l){ft(e,e.return,l)}}function Np(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Eh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Eh),e;default:throw Error(c(435,t.tag))}}function iu(t,e){var l=Np(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=Qp.bind(null,t,n);n.then(a,a)}})}function se(t,e){var l=e.deletions;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n],i=t,o=e,h=o;t:for(;h!==null;){switch(h.tag){case 27:if(Bl(h.type)){xt=h.stateNode,ue=!1;break t}break;case 5:xt=h.stateNode,ue=!1;break t;case 3:case 4:xt=h.stateNode.containerInfo,ue=!0;break t}h=h.return}if(xt===null)throw Error(c(160));_h(i,o,a),xt=null,ue=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Ch(e,t),e=e.sibling}var Le=null;function Ch(t,e){var l=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:se(e,t),ce(t),n&4&&(Ol(3,t,t.return),ja(3,t),Ol(5,t,t.return));break;case 1:se(e,t),ce(t),n&512&&(jt||l===null||Ve(l,l.return)),n&64&&cl&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var a=Le;if(se(e,t),ce(t),n&512&&(jt||l===null||Ve(l,l.return)),n&4){var i=l!==null?l.memoizedState:null;if(n=t.memoizedState,l===null)if(n===null)if(t.stateNode===null){t:{n=t.type,l=t.memoizedProps,a=a.ownerDocument||a;e:switch(n){case"title":i=a.getElementsByTagName("title")[0],(!i||i[ha]||i[Kt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(n),a.head.insertBefore(i,a.querySelector("head > title"))),kt(i,n,l),i[Kt]=t,Gt(i),n=i;break t;case"link":var o=Cd("link","href",a).get(n+(l.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){o.splice(h,1);break e}}i=a.createElement(n),kt(i,n,l),a.head.appendChild(i);break;case"meta":if(o=Cd("meta","content",a).get(n+(l.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){o.splice(h,1);break e}}i=a.createElement(n),kt(i,n,l),a.head.appendChild(i);break;default:throw Error(c(468,n))}i[Kt]=t,Gt(i),n=i}t.stateNode=n}else zd(a,t.type,t.stateNode);else t.stateNode=Md(a,n,t.memoizedProps);else i!==n?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,n===null?zd(a,t.type,t.stateNode):Md(a,n,t.memoizedProps)):n===null&&t.stateNode!==null&&Mc(t,t.memoizedProps,l.memoizedProps)}break;case 27:se(e,t),ce(t),n&512&&(jt||l===null||Ve(l,l.return)),l!==null&&n&4&&Mc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(se(e,t),ce(t),n&512&&(jt||l===null||Ve(l,l.return)),t.flags&32){a=t.stateNode;try{An(a,"")}catch(B){ft(t,t.return,B)}}n&4&&t.stateNode!=null&&(a=t.memoizedProps,Mc(t,a,l!==null?l.memoizedProps:a)),n&1024&&(Oc=!0);break;case 6:if(se(e,t),ce(t),n&4){if(t.stateNode===null)throw Error(c(162));n=t.memoizedProps,l=t.stateNode;try{l.nodeValue=n}catch(B){ft(t,t.return,B)}}break;case 3:if(Eu=null,a=Le,Le=Su(e.containerInfo),se(e,t),Le=a,ce(t),n&4&&l!==null&&l.memoizedState.isDehydrated)try{ta(e.containerInfo)}catch(B){ft(t,t.return,B)}Oc&&(Oc=!1,zh(t));break;case 4:n=Le,Le=Su(t.stateNode.containerInfo),se(e,t),ce(t),Le=n;break;case 12:se(e,t),ce(t);break;case 31:se(e,t),ce(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,iu(t,n)));break;case 13:se(e,t),ce(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(su=he()),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,iu(t,n)));break;case 22:a=t.memoizedState!==null;var m=l!==null&&l.memoizedState!==null,A=cl,M=jt;if(cl=A||a,jt=M||m,se(e,t),jt=M,cl=A,ce(t),n&8192)t:for(e=t.stateNode,e._visibility=a?e._visibility&-2:e._visibility|1,a&&(l===null||m||cl||jt||hn(t)),l=null,e=t;;){if(e.tag===5||e.tag===26){if(l===null){m=l=e;try{if(i=m.stateNode,a)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=m.stateNode;var D=m.memoizedProps.style,_=D!=null&&D.hasOwnProperty("display")?D.display:null;h.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(B){ft(m,m.return,B)}}}else if(e.tag===6){if(l===null){m=e;try{m.stateNode.nodeValue=a?"":m.memoizedProps}catch(B){ft(m,m.return,B)}}}else if(e.tag===18){if(l===null){m=e;try{var x=m.stateNode;a?gd(x,!0):gd(m.stateNode,!1)}catch(B){ft(m,m.return,B)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;l===e&&(l=null),e=e.return}l===e&&(l=null),e.sibling.return=e.return,e=e.sibling}n&4&&(n=t.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,iu(t,l))));break;case 19:se(e,t),ce(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,iu(t,n)));break;case 30:break;case 21:break;default:se(e,t),ce(t)}}function ce(t){var e=t.flags;if(e&2){try{for(var l,n=t.return;n!==null;){if(Sh(n)){l=n;break}n=n.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var a=l.stateNode,i=Cc(t);au(t,i,a);break;case 5:var o=l.stateNode;l.flags&32&&(An(o,""),l.flags&=-33);var h=Cc(t);au(t,h,o);break;case 3:case 4:var m=l.stateNode.containerInfo,A=Cc(t);zc(t,A,m);break;default:throw Error(c(161))}}catch(M){ft(t,t.return,M)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function zh(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;zh(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function ol(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Th(t,e.alternate,e),e=e.sibling}function hn(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Ol(4,e,e.return),hn(e);break;case 1:Ve(e,e.return);var l=e.stateNode;typeof l.componentWillUnmount=="function"&&gh(e,e.return,l),hn(e);break;case 27:ka(e.stateNode);case 26:case 5:Ve(e,e.return),hn(e);break;case 22:e.memoizedState===null&&hn(e);break;case 30:hn(e);break;default:hn(e)}t=t.sibling}}function fl(t,e,l){for(l=l&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var n=e.alternate,a=t,i=e,o=i.flags;switch(i.tag){case 0:case 11:case 15:fl(a,i,l),ja(4,i);break;case 1:if(fl(a,i,l),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(A){ft(n,n.return,A)}if(n=i,a=n.updateQueue,a!==null){var h=n.stateNode;try{var m=a.shared.hiddenCallbacks;if(m!==null)for(a.shared.hiddenCallbacks=null,a=0;a<m.length;a++)af(m[a],h)}catch(A){ft(n,n.return,A)}}l&&o&64&&ph(i),qa(i,i.return);break;case 27:bh(i);case 26:case 5:fl(a,i,l),l&&n===null&&o&4&&vh(i),qa(i,i.return);break;case 12:fl(a,i,l);break;case 31:fl(a,i,l),l&&o&4&&xh(a,i);break;case 13:fl(a,i,l),l&&o&4&&Mh(a,i);break;case 22:i.memoizedState===null&&fl(a,i,l),qa(i,i.return);break;case 30:break;default:fl(a,i,l)}e=e.sibling}}function Dc(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&xa(l))}function wc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&xa(t))}function je(t,e,l,n){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Oh(t,e,l,n),e=e.sibling}function Oh(t,e,l,n){var a=e.flags;switch(e.tag){case 0:case 11:case 15:je(t,e,l,n),a&2048&&ja(9,e);break;case 1:je(t,e,l,n);break;case 3:je(t,e,l,n),a&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&xa(t)));break;case 12:if(a&2048){je(t,e,l,n),t=e.stateNode;try{var i=e.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(m){ft(e,e.return,m)}}else je(t,e,l,n);break;case 31:je(t,e,l,n);break;case 13:je(t,e,l,n);break;case 23:break;case 22:i=e.stateNode,o=e.alternate,e.memoizedState!==null?i._visibility&2?je(t,e,l,n):Ya(t,e):i._visibility&2?je(t,e,l,n):(i._visibility|=2,Qn(t,e,l,n,(e.subtreeFlags&10256)!==0||!1)),a&2048&&Dc(o,e);break;case 24:je(t,e,l,n),a&2048&&wc(e.alternate,e);break;default:je(t,e,l,n)}}function Qn(t,e,l,n,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var i=t,o=e,h=l,m=n,A=o.flags;switch(o.tag){case 0:case 11:case 15:Qn(i,o,h,m,a),ja(8,o);break;case 23:break;case 22:var M=o.stateNode;o.memoizedState!==null?M._visibility&2?Qn(i,o,h,m,a):Ya(i,o):(M._visibility|=2,Qn(i,o,h,m,a)),a&&A&2048&&Dc(o.alternate,o);break;case 24:Qn(i,o,h,m,a),a&&A&2048&&wc(o.alternate,o);break;default:Qn(i,o,h,m,a)}e=e.sibling}}function Ya(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,n=e,a=n.flags;switch(n.tag){case 22:Ya(l,n),a&2048&&Dc(n.alternate,n);break;case 24:Ya(l,n),a&2048&&wc(n.alternate,n);break;default:Ya(l,n)}e=e.sibling}}var Xa=8192;function Kn(t,e,l){if(t.subtreeFlags&Xa)for(t=t.child;t!==null;)Dh(t,e,l),t=t.sibling}function Dh(t,e,l){switch(t.tag){case 26:Kn(t,e,l),t.flags&Xa&&t.memoizedState!==null&&bg(l,Le,t.memoizedState,t.memoizedProps);break;case 5:Kn(t,e,l);break;case 3:case 4:var n=Le;Le=Su(t.stateNode.containerInfo),Kn(t,e,l),Le=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=Xa,Xa=16777216,Kn(t,e,l),Xa=n):Kn(t,e,l));break;default:Kn(t,e,l)}}function wh(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Ga(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Qt=n,Uh(n,t)}wh(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rh(t),t=t.sibling}function Rh(t){switch(t.tag){case 0:case 11:case 15:Ga(t),t.flags&2048&&Ol(9,t,t.return);break;case 3:Ga(t);break;case 12:Ga(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,uu(t)):Ga(t);break;default:Ga(t)}}function uu(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Qt=n,Uh(n,t)}wh(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Ol(8,e,e.return),uu(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,uu(e));break;default:uu(e)}t=t.sibling}}function Uh(t,e){for(;Qt!==null;){var l=Qt;switch(l.tag){case 0:case 11:case 15:Ol(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:xa(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Qt=n;else t:for(l=t;Qt!==null;){n=Qt;var a=n.sibling,i=n.return;if(Ah(n),n===l){Qt=null;break t}if(a!==null){a.return=i,Qt=a;break t}Qt=i}}}var Hp={getCacheForType:function(t){var e=Zt(Ht),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return Zt(Ht).controller.signal}},Bp=typeof WeakMap=="function"?WeakMap:Map,st=0,gt=null,I=null,tt=0,ot=0,Se=null,Dl=!1,Vn=!1,Rc=!1,hl=0,Ot=0,wl=0,dn=0,Uc=0,be=0,Zn=0,Qa=null,re=null,Nc=!1,su=0,Nh=0,cu=1/0,ru=null,Rl=null,Yt=0,Ul=null,Jn=null,dl=0,Hc=0,Bc=null,Hh=null,Ka=0,Lc=null;function Ee(){return(st&2)!==0&&tt!==0?tt&-tt:z.T!==null?Qc():Wr()}function Bh(){if(be===0)if((tt&536870912)===0||lt){var t=gi;gi<<=1,(gi&3932160)===0&&(gi=262144),be=t}else be=536870912;return t=ge.current,t!==null&&(t.flags|=32),be}function oe(t,e,l){(t===gt&&(ot===2||ot===9)||t.cancelPendingCommit!==null)&&(kn(t,0),Nl(t,tt,be,!1)),fa(t,l),((st&2)===0||t!==gt)&&(t===gt&&((st&2)===0&&(dn|=l),Ot===4&&Nl(t,tt,be,!1)),Ze(t))}function Lh(t,e,l){if((st&6)!==0)throw Error(c(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||oa(t,e),a=n?qp(t,e):qc(t,e,!0),i=n;do{if(a===0){Vn&&!n&&Nl(t,e,0,!1);break}else{if(l=t.current.alternate,i&&!Lp(l)){a=qc(t,e,!1),i=!1;continue}if(a===2){if(i=e,t.errorRecoveryDisabledLanes&i)var o=0;else o=t.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){e=o;t:{var h=t;a=Qa;var m=h.current.memoizedState.isDehydrated;if(m&&(kn(h,o).flags|=256),o=qc(h,o,!1),o!==2){if(Rc&&!m){h.errorRecoveryDisabledLanes|=i,dn|=i,a=4;break t}i=re,re=a,i!==null&&(re===null?re=i:re.push.apply(re,i))}a=o}if(i=!1,a!==2)continue}}if(a===1){kn(t,0),Nl(t,e,0,!0);break}t:{switch(n=t,i=a,i){case 0:case 1:throw Error(c(345));case 4:if((e&4194048)!==e)break;case 6:Nl(n,e,be,!Dl);break t;case 2:re=null;break;case 3:case 5:break;default:throw Error(c(329))}if((e&62914560)===e&&(a=su+300-he(),10<a)){if(Nl(n,e,be,!Dl),Si(n,0,!0)!==0)break t;dl=e,n.timeoutHandle=md(jh.bind(null,n,l,re,ru,Nc,e,be,dn,Zn,Dl,i,"Throttled",-0,0),a);break t}jh(n,l,re,ru,Nc,e,be,dn,Zn,Dl,i,null,-0,0)}}break}while(!0);Ze(t)}function jh(t,e,l,n,a,i,o,h,m,A,M,D,_,x){if(t.timeoutHandle=-1,D=e.subtreeFlags,D&8192||(D&16785408)===16785408){D={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ie},Dh(e,i,D);var B=(i&62914560)===i?su-he():(i&4194048)===i?Nh-he():0;if(B=Eg(D,B),B!==null){dl=i,t.cancelPendingCommit=B(Zh.bind(null,t,e,i,l,n,a,o,h,m,M,D,null,_,x)),Nl(t,i,o,!A);return}}Zh(t,e,i,l,n,a,o,h,m)}function Lp(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],i=a.getSnapshot;a=a.value;try{if(!ye(i(),a))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Nl(t,e,l,n){e&=~Uc,e&=~dn,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var a=e;0<a;){var i=31-me(a),o=1<<i;n[i]=-1,a&=~o}l!==0&&Zr(t,l,e)}function ou(){return(st&6)===0?(Va(0),!1):!0}function jc(){if(I!==null){if(ot===0)var t=I.return;else t=I,ll=nn=null,tc(t),jn=null,Ca=0,t=I;for(;t!==null;)yh(t.alternate,t),t=t.return;I=null}}function kn(t,e){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,ng(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),dl=0,jc(),gt=t,I=l=tl(t.current,null),tt=e,ot=0,Se=null,Dl=!1,Vn=oa(t,e),Rc=!1,Zn=be=Uc=dn=wl=Ot=0,re=Qa=null,Nc=!1,(e&8)!==0&&(e|=e&32);var n=t.entangledLanes;if(n!==0)for(t=t.entanglements,n&=e;0<n;){var a=31-me(n),i=1<<a;e|=t[a],n&=~i}return hl=e,wi(),l}function qh(t,e){J=null,z.H=Ha,e===Ln||e===qi?(e=tf(),ot=3):e===Gs?(e=tf(),ot=4):ot=e===pc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,Se=e,I===null&&(Ot=1,Pi(t,Me(e,t.current)))}function Yh(){var t=ge.current;return t===null?!0:(tt&4194048)===tt?De===null:(tt&62914560)===tt||(tt&536870912)!==0?t===De:!1}function Xh(){var t=z.H;return z.H=Ha,t===null?Ha:t}function Gh(){var t=z.A;return z.A=Hp,t}function fu(){Ot=4,Dl||(tt&4194048)!==tt&&ge.current!==null||(Vn=!0),(wl&134217727)===0&&(dn&134217727)===0||gt===null||Nl(gt,tt,be,!1)}function qc(t,e,l){var n=st;st|=2;var a=Xh(),i=Gh();(gt!==t||tt!==e)&&(ru=null,kn(t,e)),e=!1;var o=Ot;t:do try{if(ot!==0&&I!==null){var h=I,m=Se;switch(ot){case 8:jc(),o=6;break t;case 3:case 2:case 9:case 6:ge.current===null&&(e=!0);var A=ot;if(ot=0,Se=null,Wn(t,h,m,A),l&&Vn){o=0;break t}break;default:A=ot,ot=0,Se=null,Wn(t,h,m,A)}}jp(),o=Ot;break}catch(M){qh(t,M)}while(!0);return e&&t.shellSuspendCounter++,ll=nn=null,st=n,z.H=a,z.A=i,I===null&&(gt=null,tt=0,wi()),o}function jp(){for(;I!==null;)Qh(I)}function qp(t,e){var l=st;st|=2;var n=Xh(),a=Gh();gt!==t||tt!==e?(ru=null,cu=he()+500,kn(t,e)):Vn=oa(t,e);t:do try{if(ot!==0&&I!==null){e=I;var i=Se;e:switch(ot){case 1:ot=0,Se=null,Wn(t,e,i,1);break;case 2:case 9:if(Io(i)){ot=0,Se=null,Kh(e);break}e=function(){ot!==2&&ot!==9||gt!==t||(ot=7),Ze(t)},i.then(e,e);break t;case 3:ot=7;break t;case 4:ot=5;break t;case 7:Io(i)?(ot=0,Se=null,Kh(e)):(ot=0,Se=null,Wn(t,e,i,7));break;case 5:var o=null;switch(I.tag){case 26:o=I.memoizedState;case 5:case 27:var h=I;if(o?Od(o):h.stateNode.complete){ot=0,Se=null;var m=h.sibling;if(m!==null)I=m;else{var A=h.return;A!==null?(I=A,hu(A)):I=null}break e}}ot=0,Se=null,Wn(t,e,i,5);break;case 6:ot=0,Se=null,Wn(t,e,i,6);break;case 8:jc(),Ot=6;break t;default:throw Error(c(462))}}Yp();break}catch(M){qh(t,M)}while(!0);return ll=nn=null,z.H=n,z.A=a,st=l,I!==null?0:(gt=null,tt=0,wi(),Ot)}function Yp(){for(;I!==null&&!ry();)Qh(I)}function Qh(t){var e=dh(t.alternate,t,hl);t.memoizedProps=t.pendingProps,e===null?hu(t):I=e}function Kh(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=sh(l,e,e.pendingProps,e.type,void 0,tt);break;case 11:e=sh(l,e,e.pendingProps,e.type.render,e.ref,tt);break;case 5:tc(e);default:yh(l,e),e=I=Xo(e,hl),e=dh(l,e,hl)}t.memoizedProps=t.pendingProps,e===null?hu(t):I=e}function Wn(t,e,l,n){ll=nn=null,tc(e),jn=null,Ca=0;var a=e.return;try{if(zp(t,a,e,l,tt)){Ot=1,Pi(t,Me(l,t.current)),I=null;return}}catch(i){if(a!==null)throw I=a,i;Ot=1,Pi(t,Me(l,t.current)),I=null;return}e.flags&32768?(lt||n===1?t=!0:Vn||(tt&536870912)!==0?t=!1:(Dl=t=!0,(n===2||n===9||n===3||n===6)&&(n=ge.current,n!==null&&n.tag===13&&(n.flags|=16384))),Vh(e,t)):hu(e)}function hu(t){var e=t;do{if((e.flags&32768)!==0){Vh(e,Dl);return}t=e.return;var l=wp(e.alternate,e,hl);if(l!==null){I=l;return}if(e=e.sibling,e!==null){I=e;return}I=e=t}while(e!==null);Ot===0&&(Ot=5)}function Vh(t,e){do{var l=Rp(t.alternate,t);if(l!==null){l.flags&=32767,I=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){I=t;return}I=t=l}while(t!==null);Ot=6,I=null}function Zh(t,e,l,n,a,i,o,h,m){t.cancelPendingCommit=null;do du();while(Yt!==0);if((st&6)!==0)throw Error(c(327));if(e!==null){if(e===t.current)throw Error(c(177));if(i=e.lanes|e.childLanes,i|=Cs,Sy(t,l,i,o,h,m),t===gt&&(I=gt=null,tt=0),Jn=e,Ul=t,dl=l,Hc=i,Bc=a,Hh=n,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Kp(yi,function(){return Fh(),null})):(t.callbackNode=null,t.callbackPriority=0),n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=z.T,z.T=null,a=U.p,U.p=2,o=st,st|=4;try{Up(t,e,l)}finally{st=o,U.p=a,z.T=n}}Yt=1,Jh(),kh(),Wh()}}function Jh(){if(Yt===1){Yt=0;var t=Ul,e=Jn,l=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var n=U.p;U.p=2;var a=st;st|=4;try{Ch(e,t);var i=Fc,o=Ro(t.containerInfo),h=i.focusedElem,m=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&wo(h.ownerDocument.documentElement,h)){if(m!==null&&Ts(h)){var A=m.start,M=m.end;if(M===void 0&&(M=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(M,h.value.length);else{var D=h.ownerDocument||document,_=D&&D.defaultView||window;if(_.getSelection){var x=_.getSelection(),B=h.textContent.length,X=Math.min(m.start,B),yt=m.end===void 0?X:Math.min(m.end,B);!x.extend&&X>yt&&(o=yt,yt=X,X=o);var S=Do(h,X),p=Do(h,yt);if(S&&p&&(x.rangeCount!==1||x.anchorNode!==S.node||x.anchorOffset!==S.offset||x.focusNode!==p.node||x.focusOffset!==p.offset)){var T=D.createRange();T.setStart(S.node,S.offset),x.removeAllRanges(),X>yt?(x.addRange(T),x.extend(p.node,p.offset)):(T.setEnd(p.node,p.offset),x.addRange(T))}}}}for(D=[],x=h;x=x.parentNode;)x.nodeType===1&&D.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<D.length;h++){var O=D[h];O.element.scrollLeft=O.left,O.element.scrollTop=O.top}}xu=!!$c,Fc=$c=null}finally{st=a,U.p=n,z.T=l}}t.current=e,Yt=2}}function kh(){if(Yt===2){Yt=0;var t=Ul,e=Jn,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var n=U.p;U.p=2;var a=st;st|=4;try{Th(t,e.alternate,e)}finally{st=a,U.p=n,z.T=l}}Yt=3}}function Wh(){if(Yt===4||Yt===3){Yt=0,oy();var t=Ul,e=Jn,l=dl,n=Hh;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Yt=5:(Yt=0,Jn=Ul=null,$h(t,t.pendingLanes));var a=t.pendingLanes;if(a===0&&(Rl=null),ns(l),e=e.stateNode,de&&typeof de.onCommitFiberRoot=="function")try{de.onCommitFiberRoot(ra,e,void 0,(e.current.flags&128)===128)}catch{}if(n!==null){e=z.T,a=U.p,U.p=2,z.T=null;try{for(var i=t.onRecoverableError,o=0;o<n.length;o++){var h=n[o];i(h.value,{componentStack:h.stack})}}finally{z.T=e,U.p=a}}(dl&3)!==0&&du(),Ze(t),a=t.pendingLanes,(l&261930)!==0&&(a&42)!==0?t===Lc?Ka++:(Ka=0,Lc=t):Ka=0,Va(0)}}function $h(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,xa(e)))}function du(){return Jh(),kh(),Wh(),Fh()}function Fh(){if(Yt!==5)return!1;var t=Ul,e=Hc;Hc=0;var l=ns(dl),n=z.T,a=U.p;try{U.p=32>l?32:l,z.T=null,l=Bc,Bc=null;var i=Ul,o=dl;if(Yt=0,Jn=Ul=null,dl=0,(st&6)!==0)throw Error(c(331));var h=st;if(st|=4,Rh(i.current),Oh(i,i.current,o,l),st=h,Va(0,!1),de&&typeof de.onPostCommitFiberRoot=="function")try{de.onPostCommitFiberRoot(ra,i)}catch{}return!0}finally{U.p=a,z.T=n,$h(t,e)}}function Ih(t,e,l){e=Me(l,e),e=yc(t.stateNode,e,2),t=Ml(t,e,2),t!==null&&(fa(t,2),Ze(t))}function ft(t,e,l){if(t.tag===3)Ih(t,t,l);else for(;e!==null;){if(e.tag===3){Ih(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Rl===null||!Rl.has(n))){t=Me(l,t),l=Pf(2),n=Ml(e,l,2),n!==null&&(th(l,n,e,t),fa(n,2),Ze(n));break}}e=e.return}}function Yc(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new Bp;var a=new Set;n.set(e,a)}else a=n.get(e),a===void 0&&(a=new Set,n.set(e,a));a.has(l)||(Rc=!0,a.add(l),t=Xp.bind(null,t,e,l),e.then(t,t))}function Xp(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,gt===t&&(tt&l)===l&&(Ot===4||Ot===3&&(tt&62914560)===tt&&300>he()-su?(st&2)===0&&kn(t,0):Uc|=l,Zn===tt&&(Zn=0)),Ze(t)}function Ph(t,e){e===0&&(e=Vr()),t=tn(t,e),t!==null&&(fa(t,e),Ze(t))}function Gp(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Ph(t,l)}function Qp(t,e){var l=0;switch(t.tag){case 31:case 13:var n=t.stateNode,a=t.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(e),Ph(t,l)}function Kp(t,e){return Pu(t,e)}var mu=null,$n=null,Xc=!1,yu=!1,Gc=!1,Hl=0;function Ze(t){t!==$n&&t.next===null&&($n===null?mu=$n=t:$n=$n.next=t),yu=!0,Xc||(Xc=!0,Zp())}function Va(t,e){if(!Gc&&yu){Gc=!0;do for(var l=!1,n=mu;n!==null;){if(t!==0){var a=n.pendingLanes;if(a===0)var i=0;else{var o=n.suspendedLanes,h=n.pingedLanes;i=(1<<31-me(42|t)+1)-1,i&=a&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,nd(n,i))}else i=tt,i=Si(n,n===gt?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||oa(n,i)||(l=!0,nd(n,i));n=n.next}while(l);Gc=!1}}function Vp(){td()}function td(){yu=Xc=!1;var t=0;Hl!==0&&lg()&&(t=Hl);for(var e=he(),l=null,n=mu;n!==null;){var a=n.next,i=ed(n,e);i===0?(n.next=null,l===null?mu=a:l.next=a,a===null&&($n=l)):(l=n,(t!==0||(i&3)!==0)&&(yu=!0)),n=a}Yt!==0&&Yt!==5||Va(t),Hl!==0&&(Hl=0)}function ed(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,a=t.expirationTimes,i=t.pendingLanes&-62914561;0<i;){var o=31-me(i),h=1<<o,m=a[o];m===-1?((h&l)===0||(h&n)!==0)&&(a[o]=vy(h,e)):m<=e&&(t.expiredLanes|=h),i&=~h}if(e=gt,l=tt,l=Si(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(ot===2||ot===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&ts(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||oa(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&ts(n),ns(l)){case 2:case 8:l=Qr;break;case 32:l=yi;break;case 268435456:l=Kr;break;default:l=yi}return n=ld.bind(null,t),l=Pu(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&ts(n),t.callbackPriority=2,t.callbackNode=null,2}function ld(t,e){if(Yt!==0&&Yt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(du()&&t.callbackNode!==l)return null;var n=tt;return n=Si(t,t===gt?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(Lh(t,n,e),ed(t,he()),t.callbackNode!=null&&t.callbackNode===l?ld.bind(null,t):null)}function nd(t,e){if(du())return null;Lh(t,e,!0)}function Zp(){ag(function(){(st&6)!==0?Pu(Gr,Vp):td()})}function Qc(){if(Hl===0){var t=Hn;t===0&&(t=pi,pi<<=1,(pi&261888)===0&&(pi=256)),Hl=t}return Hl}function ad(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ai(""+t)}function id(t,e){var l=e.ownerDocument.createElement("input");return l.name=e.name,l.value=e.value,t.id&&l.setAttribute("form",t.id),e.parentNode.insertBefore(l,e),t=new FormData(t),l.parentNode.removeChild(l),t}function Jp(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var i=ad((a[ae]||null).action),o=n.submitter;o&&(e=(e=o[ae]||null)?ad(e.formAction):o.getAttribute("formAction"),e!==null&&(i=e,o=null));var h=new Ci("action","action",null,n,a);t.push({event:h,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Hl!==0){var m=o?id(a,o):new FormData(a);rc(l,{pending:!0,data:m,method:a.method,action:i},null,m)}}else typeof i=="function"&&(h.preventDefault(),m=o?id(a,o):new FormData(a),rc(l,{pending:!0,data:m,method:a.method,action:i},i,m))},currentTarget:a}]})}}for(var Kc=0;Kc<Ms.length;Kc++){var Vc=Ms[Kc],kp=Vc.toLowerCase(),Wp=Vc[0].toUpperCase()+Vc.slice(1);Be(kp,"on"+Wp)}Be(Ho,"onAnimationEnd"),Be(Bo,"onAnimationIteration"),Be(Lo,"onAnimationStart"),Be("dblclick","onDoubleClick"),Be("focusin","onFocus"),Be("focusout","onBlur"),Be(fp,"onTransitionRun"),Be(hp,"onTransitionStart"),Be(dp,"onTransitionCancel"),Be(jo,"onTransitionEnd"),En("onMouseEnter",["mouseout","mouseover"]),En("onMouseLeave",["mouseout","mouseover"]),En("onPointerEnter",["pointerout","pointerover"]),En("onPointerLeave",["pointerout","pointerover"]),$l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$l("onBeforeInput",["compositionend","keypress","textInput","paste"]),$l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Za="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(" "),$p=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Za));function ud(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var n=t[l],a=n.event;n=n.listeners;t:{var i=void 0;if(e)for(var o=n.length-1;0<=o;o--){var h=n[o],m=h.instance,A=h.currentTarget;if(h=h.listener,m!==i&&a.isPropagationStopped())break t;i=h,a.currentTarget=A;try{i(a)}catch(M){Di(M)}a.currentTarget=null,i=m}else for(o=0;o<n.length;o++){if(h=n[o],m=h.instance,A=h.currentTarget,h=h.listener,m!==i&&a.isPropagationStopped())break t;i=h,a.currentTarget=A;try{i(a)}catch(M){Di(M)}a.currentTarget=null,i=m}}}}function P(t,e){var l=e[as];l===void 0&&(l=e[as]=new Set);var n=t+"__bubble";l.has(n)||(sd(e,t,2,!1),l.add(n))}function Zc(t,e,l){var n=0;e&&(n|=4),sd(l,t,n,e)}var pu="_reactListening"+Math.random().toString(36).slice(2);function Jc(t){if(!t[pu]){t[pu]=!0,Ir.forEach(function(l){l!=="selectionchange"&&($p.has(l)||Zc(l,!1,t),Zc(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[pu]||(e[pu]=!0,Zc("selectionchange",!1,e))}}function sd(t,e,l,n){switch(Bd(e)){case 2:var a=_g;break;case 8:a=xg;break;default:a=cr}l=a.bind(null,e,l,t),a=void 0,!ds||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),n?a!==void 0?t.addEventListener(e,l,{capture:!0,passive:a}):t.addEventListener(e,l,!0):a!==void 0?t.addEventListener(e,l,{passive:a}):t.addEventListener(e,l,!1)}function kc(t,e,l,n,a){var i=n;if((e&1)===0&&(e&2)===0&&n!==null)t:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var h=n.stateNode.containerInfo;if(h===a)break;if(o===4)for(o=n.return;o!==null;){var m=o.tag;if((m===3||m===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;h!==null;){if(o=vn(h),o===null)return;if(m=o.tag,m===5||m===6||m===26||m===27){n=i=o;continue t}h=h.parentNode}}n=n.return}oo(function(){var A=i,M=fs(l),D=[];t:{var _=qo.get(t);if(_!==void 0){var x=Ci,B=t;switch(t){case"keypress":if(xi(l)===0)break t;case"keydown":case"keyup":x=Qy;break;case"focusin":B="focus",x=gs;break;case"focusout":B="blur",x=gs;break;case"beforeblur":case"afterblur":x=gs;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=mo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=wy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Zy;break;case Ho:case Bo:case Lo:x=Ny;break;case jo:x=ky;break;case"scroll":case"scrollend":x=Oy;break;case"wheel":x=$y;break;case"copy":case"cut":case"paste":x=By;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=po;break;case"toggle":case"beforetoggle":x=Iy}var X=(e&4)!==0,yt=!X&&(t==="scroll"||t==="scrollend"),S=X?_!==null?_+"Capture":null:_;X=[];for(var p=A,T;p!==null;){var O=p;if(T=O.stateNode,O=O.tag,O!==5&&O!==26&&O!==27||T===null||S===null||(O=ma(p,S),O!=null&&X.push(Ja(p,O,T))),yt)break;p=p.return}0<X.length&&(_=new x(_,B,null,l,M),D.push({event:_,listeners:X}))}}if((e&7)===0){t:{if(_=t==="mouseover"||t==="pointerover",x=t==="mouseout"||t==="pointerout",_&&l!==os&&(B=l.relatedTarget||l.fromElement)&&(vn(B)||B[gn]))break t;if((x||_)&&(_=M.window===M?M:(_=M.ownerDocument)?_.defaultView||_.parentWindow:window,x?(B=l.relatedTarget||l.toElement,x=A,B=B?vn(B):null,B!==null&&(yt=d(B),X=B.tag,B!==yt||X!==5&&X!==27&&X!==6)&&(B=null)):(x=null,B=A),x!==B)){if(X=mo,O="onMouseLeave",S="onMouseEnter",p="mouse",(t==="pointerout"||t==="pointerover")&&(X=po,O="onPointerLeave",S="onPointerEnter",p="pointer"),yt=x==null?_:da(x),T=B==null?_:da(B),_=new X(O,p+"leave",x,l,M),_.target=yt,_.relatedTarget=T,O=null,vn(M)===A&&(X=new X(S,p+"enter",B,l,M),X.target=T,X.relatedTarget=yt,O=X),yt=O,x&&B)e:{for(X=Fp,S=x,p=B,T=0,O=S;O;O=X(O))T++;O=0;for(var q=p;q;q=X(q))O++;for(;0<T-O;)S=X(S),T--;for(;0<O-T;)p=X(p),O--;for(;T--;){if(S===p||p!==null&&S===p.alternate){X=S;break e}S=X(S),p=X(p)}X=null}else X=null;x!==null&&cd(D,_,x,X,!1),B!==null&&yt!==null&&cd(D,yt,B,X,!0)}}t:{if(_=A?da(A):window,x=_.nodeName&&_.nodeName.toLowerCase(),x==="select"||x==="input"&&_.type==="file")var nt=_o;else if(To(_))if(xo)nt=cp;else{nt=up;var j=ip}else x=_.nodeName,!x||x.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?A&&rs(A.elementType)&&(nt=_o):nt=sp;if(nt&&(nt=nt(t,A))){Ao(D,nt,l,M);break t}j&&j(t,_,A),t==="focusout"&&A&&_.type==="number"&&A.memoizedProps.value!=null&&cs(_,"number",_.value)}switch(j=A?da(A):window,t){case"focusin":(To(j)||j.contentEditable==="true")&&(Cn=j,As=A,Ta=null);break;case"focusout":Ta=As=Cn=null;break;case"mousedown":_s=!0;break;case"contextmenu":case"mouseup":case"dragend":_s=!1,Uo(D,l,M);break;case"selectionchange":if(op)break;case"keydown":case"keyup":Uo(D,l,M)}var k;if(Ss)t:{switch(t){case"compositionstart":var et="onCompositionStart";break t;case"compositionend":et="onCompositionEnd";break t;case"compositionupdate":et="onCompositionUpdate";break t}et=void 0}else Mn?bo(t,l)&&(et="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(et="onCompositionStart");et&&(go&&l.locale!=="ko"&&(Mn||et!=="onCompositionStart"?et==="onCompositionEnd"&&Mn&&(k=fo()):(Sl=M,ms="value"in Sl?Sl.value:Sl.textContent,Mn=!0)),j=gu(A,et),0<j.length&&(et=new yo(et,t,null,l,M),D.push({event:et,listeners:j}),k?et.data=k:(k=Eo(l),k!==null&&(et.data=k)))),(k=tp?ep(t,l):lp(t,l))&&(et=gu(A,"onBeforeInput"),0<et.length&&(j=new yo("onBeforeInput","beforeinput",null,l,M),D.push({event:j,listeners:et}),j.data=k)),Jp(D,t,A,l,M)}ud(D,e)})}function Ja(t,e,l){return{instance:t,listener:e,currentTarget:l}}function gu(t,e){for(var l=e+"Capture",n=[];t!==null;){var a=t,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=ma(t,l),a!=null&&n.unshift(Ja(t,a,i)),a=ma(t,e),a!=null&&n.push(Ja(t,a,i))),t.tag===3)return n;t=t.return}return[]}function Fp(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function cd(t,e,l,n,a){for(var i=e._reactName,o=[];l!==null&&l!==n;){var h=l,m=h.alternate,A=h.stateNode;if(h=h.tag,m!==null&&m===n)break;h!==5&&h!==26&&h!==27||A===null||(m=A,a?(A=ma(l,i),A!=null&&o.unshift(Ja(l,A,m))):a||(A=ma(l,i),A!=null&&o.push(Ja(l,A,m)))),l=l.return}o.length!==0&&t.push({event:e,listeners:o})}var Ip=/\r\n?/g,Pp=/\u0000|\uFFFD/g;function rd(t){return(typeof t=="string"?t:""+t).replace(Ip,`
49
- `).replace(Pp,"")}function od(t,e){return e=rd(e),rd(t)===e}function mt(t,e,l,n,a,i){switch(l){case"children":typeof n=="string"?e==="body"||e==="textarea"&&n===""||An(t,n):(typeof n=="number"||typeof n=="bigint")&&e!=="body"&&An(t,""+n);break;case"className":Ei(t,"class",n);break;case"tabIndex":Ei(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ei(t,l,n);break;case"style":co(t,n,i);break;case"data":if(e!=="object"){Ei(t,"data",n);break}case"src":case"href":if(n===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Ai(""+n),t.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){t.setAttribute(l,"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 i=="function"&&(l==="formAction"?(e!=="input"&&mt(t,e,"name",a.name,a,null),mt(t,e,"formEncType",a.formEncType,a,null),mt(t,e,"formMethod",a.formMethod,a,null),mt(t,e,"formTarget",a.formTarget,a,null)):(mt(t,e,"encType",a.encType,a,null),mt(t,e,"method",a.method,a,null),mt(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Ai(""+n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=Ie);break;case"onScroll":n!=null&&P("scroll",t);break;case"onScrollEnd":n!=null&&P("scrollend",t);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(c(60));t.innerHTML=l}}break;case"multiple":t.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":t.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){t.removeAttribute("xlink:href");break}l=Ai(""+n),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""+n):t.removeAttribute(l);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":n&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":n===!0?t.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?t.setAttribute(l,n):t.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?t.removeAttribute(l):t.setAttribute(l,n);break;case"popover":P("beforetoggle",t),P("toggle",t),bi(t,"popover",n);break;case"xlinkActuate":Fe(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Fe(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Fe(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Fe(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Fe(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Fe(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":bi(t,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Cy.get(l)||l,bi(t,l,n))}}function Wc(t,e,l,n,a,i){switch(l){case"style":co(t,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(c(60));t.innerHTML=l}}break;case"children":typeof n=="string"?An(t,n):(typeof n=="number"||typeof n=="bigint")&&An(t,""+n);break;case"onScroll":n!=null&&P("scroll",t);break;case"onScrollEnd":n!=null&&P("scrollend",t);break;case"onClick":n!=null&&(t.onclick=Ie);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Pr.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),e=l.slice(2,a?l.length-7:void 0),i=t[ae]||null,i=i!=null?i[l]:null,typeof i=="function"&&t.removeEventListener(e,i,a),typeof n=="function")){typeof i!="function"&&i!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(e,n,a);break t}l in t?t[l]=n:n===!0?t.setAttribute(l,""):bi(t,l,n)}}}function kt(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":P("error",t),P("load",t);var n=!1,a=!1,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,e));default:mt(t,e,i,o,l,null)}}a&&mt(t,e,"srcSet",l.srcSet,l,null),n&&mt(t,e,"src",l.src,l,null);return;case"input":P("invalid",t);var h=i=o=a=null,m=null,A=null;for(n in l)if(l.hasOwnProperty(n)){var M=l[n];if(M!=null)switch(n){case"name":a=M;break;case"type":o=M;break;case"checked":m=M;break;case"defaultChecked":A=M;break;case"value":i=M;break;case"defaultValue":h=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(c(137,e));break;default:mt(t,e,n,M,l,null)}}ao(t,i,h,m,A,o,a,!1);return;case"select":P("invalid",t),n=o=i=null;for(a in l)if(l.hasOwnProperty(a)&&(h=l[a],h!=null))switch(a){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":n=h;default:mt(t,e,a,h,l,null)}e=i,l=o,t.multiple=!!n,e!=null?Tn(t,!!n,e,!1):l!=null&&Tn(t,!!n,l,!0);return;case"textarea":P("invalid",t),i=a=n=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":n=h;break;case"defaultValue":a=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:mt(t,e,o,h,l,null)}uo(t,n,a,i);return;case"option":for(m in l)if(l.hasOwnProperty(m)&&(n=l[m],n!=null))switch(m){case"selected":t.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:mt(t,e,m,n,l,null)}return;case"dialog":P("beforetoggle",t),P("toggle",t),P("cancel",t),P("close",t);break;case"iframe":case"object":P("load",t);break;case"video":case"audio":for(n=0;n<Za.length;n++)P(Za[n],t);break;case"image":P("error",t),P("load",t);break;case"details":P("toggle",t);break;case"embed":case"source":case"link":P("error",t),P("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in l)if(l.hasOwnProperty(A)&&(n=l[A],n!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,e));default:mt(t,e,A,n,l,null)}return;default:if(rs(e)){for(M in l)l.hasOwnProperty(M)&&(n=l[M],n!==void 0&&Wc(t,e,M,n,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(n=l[h],n!=null&&mt(t,e,h,n,l,null))}function tg(t,e,l,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,o=null,h=null,m=null,A=null,M=null;for(x in l){var D=l[x];if(l.hasOwnProperty(x)&&D!=null)switch(x){case"checked":break;case"value":break;case"defaultValue":m=D;default:n.hasOwnProperty(x)||mt(t,e,x,null,n,D)}}for(var _ in n){var x=n[_];if(D=l[_],n.hasOwnProperty(_)&&(x!=null||D!=null))switch(_){case"type":i=x;break;case"name":a=x;break;case"checked":A=x;break;case"defaultChecked":M=x;break;case"value":o=x;break;case"defaultValue":h=x;break;case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(c(137,e));break;default:x!==D&&mt(t,e,_,x,n,D)}}ss(t,o,h,m,A,M,i,a);return;case"select":x=o=h=_=null;for(i in l)if(m=l[i],l.hasOwnProperty(i)&&m!=null)switch(i){case"value":break;case"multiple":x=m;default:n.hasOwnProperty(i)||mt(t,e,i,null,n,m)}for(a in n)if(i=n[a],m=l[a],n.hasOwnProperty(a)&&(i!=null||m!=null))switch(a){case"value":_=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==m&&mt(t,e,a,i,n,m)}e=h,l=o,n=x,_!=null?Tn(t,!!l,_,!1):!!n!=!!l&&(e!=null?Tn(t,!!l,e,!0):Tn(t,!!l,l?[]:"",!1));return;case"textarea":x=_=null;for(h in l)if(a=l[h],l.hasOwnProperty(h)&&a!=null&&!n.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:mt(t,e,h,null,n,a)}for(o in n)if(a=n[o],i=l[o],n.hasOwnProperty(o)&&(a!=null||i!=null))switch(o){case"value":_=a;break;case"defaultValue":x=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(c(91));break;default:a!==i&&mt(t,e,o,a,n,i)}io(t,_,x);return;case"option":for(var B in l)if(_=l[B],l.hasOwnProperty(B)&&_!=null&&!n.hasOwnProperty(B))switch(B){case"selected":t.selected=!1;break;default:mt(t,e,B,null,n,_)}for(m in n)if(_=n[m],x=l[m],n.hasOwnProperty(m)&&_!==x&&(_!=null||x!=null))switch(m){case"selected":t.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:mt(t,e,m,_,n,x)}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 X in l)_=l[X],l.hasOwnProperty(X)&&_!=null&&!n.hasOwnProperty(X)&&mt(t,e,X,null,n,_);for(A in n)if(_=n[A],x=l[A],n.hasOwnProperty(A)&&_!==x&&(_!=null||x!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,e));break;default:mt(t,e,A,_,n,x)}return;default:if(rs(e)){for(var yt in l)_=l[yt],l.hasOwnProperty(yt)&&_!==void 0&&!n.hasOwnProperty(yt)&&Wc(t,e,yt,void 0,n,_);for(M in n)_=n[M],x=l[M],!n.hasOwnProperty(M)||_===x||_===void 0&&x===void 0||Wc(t,e,M,_,n,x);return}}for(var S in l)_=l[S],l.hasOwnProperty(S)&&_!=null&&!n.hasOwnProperty(S)&&mt(t,e,S,null,n,_);for(D in n)_=n[D],x=l[D],!n.hasOwnProperty(D)||_===x||_==null&&x==null||mt(t,e,D,_,n,x)}function fd(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eg(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],i=a.transferSize,o=a.initiatorType,h=a.duration;if(i&&h&&fd(o)){for(o=0,h=a.responseEnd,n+=1;n<l.length;n++){var m=l[n],A=m.startTime;if(A>h)break;var M=m.transferSize,D=m.initiatorType;M&&fd(D)&&(m=m.responseEnd,o+=M*(m<h?1:(h-A)/(m-A)))}if(--n,e+=8*(i+o)/(a.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var $c=null,Fc=null;function vu(t){return t.nodeType===9?t:t.ownerDocument}function hd(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dd(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Ic(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Pc=null;function lg(){var t=window.event;return t&&t.type==="popstate"?t===Pc?!1:(Pc=t,!0):(Pc=null,!1)}var md=typeof setTimeout=="function"?setTimeout:void 0,ng=typeof clearTimeout=="function"?clearTimeout:void 0,yd=typeof Promise=="function"?Promise:void 0,ag=typeof queueMicrotask=="function"?queueMicrotask:typeof yd<"u"?function(t){return yd.resolve(null).then(t).catch(ig)}:md;function ig(t){setTimeout(function(){throw t})}function Bl(t){return t==="head"}function pd(t,e){var l=e,n=0;do{var a=l.nextSibling;if(t.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){t.removeChild(a),ta(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")ka(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,ka(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[ha]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&ka(t.ownerDocument.body);l=a}while(l);ta(e)}function gd(t,e){var l=t;t=0;do{var n=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=n}while(l)}function tr(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":tr(l),is(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function ug(t,e,l,n){for(;t.nodeType===1;){var a=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(n){if(!t[ha])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=we(t.nextSibling),t===null)break}return null}function sg(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=we(t.nextSibling),t===null))return null;return t}function vd(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=we(t.nextSibling),t===null))return null;return t}function er(t){return t.data==="$?"||t.data==="$~"}function lr(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function cg(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var n=function(){e(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),t._reactRetry=n}}function we(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var nr=null;function Sd(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return we(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function bd(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function Ed(t,e,l){switch(e=vu(l),t){case"html":if(t=e.documentElement,!t)throw Error(c(452));return t;case"head":if(t=e.head,!t)throw Error(c(453));return t;case"body":if(t=e.body,!t)throw Error(c(454));return t;default:throw Error(c(451))}}function ka(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);is(t)}var Re=new Map,Td=new Set;function Su(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ml=U.d;U.d={f:rg,r:og,D:fg,C:hg,L:dg,m:mg,X:pg,S:yg,M:gg};function rg(){var t=ml.f(),e=ou();return t||e}function og(t){var e=Sn(t);e!==null&&e.tag===5&&e.type==="form"?qf(e):ml.r(t)}var Fn=typeof document>"u"?null:document;function Ad(t,e,l){var n=Fn;if(n&&typeof e=="string"&&e){var a=_e(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),Td.has(a)||(Td.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),kt(e,"link",t),Gt(e),n.head.appendChild(e)))}}function fg(t){ml.D(t),Ad("dns-prefetch",t,null)}function hg(t,e){ml.C(t,e),Ad("preconnect",t,e)}function dg(t,e,l){ml.L(t,e,l);var n=Fn;if(n&&t&&e){var a='link[rel="preload"][as="'+_e(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+_e(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+_e(l.imageSizes)+'"]')):a+='[href="'+_e(t)+'"]';var i=a;switch(e){case"style":i=In(t);break;case"script":i=Pn(t)}Re.has(i)||(t=R({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Re.set(i,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(Wa(i))||e==="script"&&n.querySelector($a(i))||(e=n.createElement("link"),kt(e,"link",t),Gt(e),n.head.appendChild(e)))}}function mg(t,e){ml.m(t,e);var l=Fn;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+_e(n)+'"][href="'+_e(t)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Pn(t)}if(!Re.has(i)&&(t=R({rel:"modulepreload",href:t},e),Re.set(i,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector($a(i)))return}n=l.createElement("link"),kt(n,"link",t),Gt(n),l.head.appendChild(n)}}}function yg(t,e,l){ml.S(t,e,l);var n=Fn;if(n&&t){var a=bn(n).hoistableStyles,i=In(t);e=e||"default";var o=a.get(i);if(!o){var h={loading:0,preload:null};if(o=n.querySelector(Wa(i)))h.loading=5;else{t=R({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Re.get(i))&&ar(t,l);var m=o=n.createElement("link");Gt(m),kt(m,"link",t),m._p=new Promise(function(A,M){m.onload=A,m.onerror=M}),m.addEventListener("load",function(){h.loading|=1}),m.addEventListener("error",function(){h.loading|=2}),h.loading|=4,bu(o,e,n)}o={type:"stylesheet",instance:o,count:1,state:h},a.set(i,o)}}}function pg(t,e){ml.X(t,e);var l=Fn;if(l&&t){var n=bn(l).hoistableScripts,a=Pn(t),i=n.get(a);i||(i=l.querySelector($a(a)),i||(t=R({src:t,async:!0},e),(e=Re.get(a))&&ir(t,e),i=l.createElement("script"),Gt(i),kt(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function gg(t,e){ml.M(t,e);var l=Fn;if(l&&t){var n=bn(l).hoistableScripts,a=Pn(t),i=n.get(a);i||(i=l.querySelector($a(a)),i||(t=R({src:t,async:!0,type:"module"},e),(e=Re.get(a))&&ir(t,e),i=l.createElement("script"),Gt(i),kt(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function _d(t,e,l,n){var a=(a=F.current)?Su(a):null;if(!a)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=In(l.href),l=bn(a).hoistableStyles,n=l.get(e),n||(n={type:"style",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=In(l.href);var i=bn(a).hoistableStyles,o=i.get(t);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,o),(i=a.querySelector(Wa(t)))&&!i._p&&(o.instance=i,o.state.loading=5),Re.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Re.set(t,l),i||vg(a,t,l,o.state))),e&&n===null)throw Error(c(528,""));return o}if(e&&n!==null)throw Error(c(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Pn(l),l=bn(a).hoistableScripts,n=l.get(e),n||(n={type:"script",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function In(t){return'href="'+_e(t)+'"'}function Wa(t){return'link[rel="stylesheet"]['+t+"]"}function xd(t){return R({},t,{"data-precedence":t.precedence,precedence:null})}function vg(t,e,l,n){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=t.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),kt(e,"link",l),Gt(e),t.head.appendChild(e))}function Pn(t){return'[src="'+_e(t)+'"]'}function $a(t){return"script[async]"+t}function Md(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+_e(l.href)+'"]');if(n)return e.instance=n,Gt(n),n;var a=R({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),Gt(n),kt(n,"style",a),bu(n,l.precedence,t),e.instance=n;case"stylesheet":a=In(l.href);var i=t.querySelector(Wa(a));if(i)return e.state.loading|=4,e.instance=i,Gt(i),i;n=xd(l),(a=Re.get(a))&&ar(n,a),i=(t.ownerDocument||t).createElement("link"),Gt(i);var o=i;return o._p=new Promise(function(h,m){o.onload=h,o.onerror=m}),kt(i,"link",n),e.state.loading|=4,bu(i,l.precedence,t),e.instance=i;case"script":return i=Pn(l.src),(a=t.querySelector($a(i)))?(e.instance=a,Gt(a),a):(n=l,(a=Re.get(i))&&(n=R({},l),ir(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),Gt(a),kt(a,"link",n),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,bu(n,l.precedence,t));return e.instance}function bu(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,o=0;o<n.length;o++){var h=n[o];if(h.dataset.precedence===e)i=h;else if(i!==a)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function ar(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function ir(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Eu=null;function Cd(t,e,l){if(Eu===null){var n=new Map,a=Eu=new Map;a.set(l,n)}else a=Eu,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(t))return n;for(n.set(t,null),l=l.getElementsByTagName(t),a=0;a<l.length;a++){var i=l[a];if(!(i[ha]||i[Kt]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(e)||"";o=t+o;var h=n.get(o);h?h.push(i):n.set(o,[i])}}return n}function zd(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function Sg(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Od(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function bg(t,e,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=In(n.href),i=e.querySelector(Wa(a));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Tu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=i,Gt(i);return}i=e.ownerDocument||e,n=xd(n),(a=Re.get(a))&&ar(n,a),i=i.createElement("link"),Gt(i);var o=i;o._p=new Promise(function(h,m){o.onload=h,o.onerror=m}),kt(i,"link",n),l.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Tu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var ur=0;function Eg(t,e){return t.stylesheets&&t.count===0&&_u(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&_u(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&ur===0&&(ur=62500*eg());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&_u(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>ur?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Tu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_u(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Au=null;function _u(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Au=new Map,e.forEach(Tg,t),Au=null,Tu.call(t))}function Tg(t,e){if(!(e.state.loading&4)){var l=Au.get(t);if(l)var n=l.get(null);else{l=new Map,Au.set(t,l);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var o=a[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),n=o)}n&&l.set(null,n)}a=e.instance,o=a.getAttribute("data-precedence"),i=l.get(o)||n,i===n&&l.set(null,a),l.set(o,a),this.count++,n=Tu.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var Fa={$$typeof:Nt,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function Ag(t,e,l,n,a,i,o,h,m){this.tag=1,this.containerInfo=t,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=es(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=es(0),this.hiddenUpdates=es(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function Dd(t,e,l,n,a,i,o,h,m,A,M,D){return t=new Ag(t,e,l,o,m,A,M,D,h),e=1,i===!0&&(e|=24),i=pe(3,null,null,e),t.current=i,i.stateNode=t,e=qs(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:n,isDehydrated:l,cache:e},Qs(i),t}function wd(t){return t?(t=Dn,t):Dn}function Rd(t,e,l,n,a,i){a=wd(a),n.context===null?n.context=a:n.pendingContext=a,n=xl(e),n.payload={element:l},i=i===void 0?null:i,i!==null&&(n.callback=i),l=Ml(t,n,e),l!==null&&(oe(l,t,e),Oa(l,t,e))}function Ud(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function sr(t,e){Ud(t,e),(t=t.alternate)&&Ud(t,e)}function Nd(t){if(t.tag===13||t.tag===31){var e=tn(t,67108864);e!==null&&oe(e,t,67108864),sr(t,67108864)}}function Hd(t){if(t.tag===13||t.tag===31){var e=Ee();e=ls(e);var l=tn(t,e);l!==null&&oe(l,t,e),sr(t,e)}}var xu=!0;function _g(t,e,l,n){var a=z.T;z.T=null;var i=U.p;try{U.p=2,cr(t,e,l,n)}finally{U.p=i,z.T=a}}function xg(t,e,l,n){var a=z.T;z.T=null;var i=U.p;try{U.p=8,cr(t,e,l,n)}finally{U.p=i,z.T=a}}function cr(t,e,l,n){if(xu){var a=rr(n);if(a===null)kc(t,e,n,Mu,l),Ld(t,n);else if(Cg(a,t,e,l,n))n.stopPropagation();else if(Ld(t,n),e&4&&-1<Mg.indexOf(t)){for(;a!==null;){var i=Sn(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Wl(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var m=1<<31-me(o);h.entanglements[1]|=m,o&=~m}Ze(i),(st&6)===0&&(cu=he()+500,Va(0))}}break;case 31:case 13:h=tn(i,2),h!==null&&oe(h,i,2),ou(),sr(i,2)}if(i=rr(n),i===null&&kc(t,e,n,Mu,l),i===a)break;a=i}a!==null&&n.stopPropagation()}else kc(t,e,n,null,l)}}function rr(t){return t=fs(t),or(t)}var Mu=null;function or(t){if(Mu=null,t=vn(t),t!==null){var e=d(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=y(e),t!==null)return t;t=null}else if(l===31){if(t=g(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Mu=t,null}function Bd(t){switch(t){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(fy()){case Gr:return 2;case Qr:return 8;case yi:case hy:return 32;case Kr:return 268435456;default:return 32}default:return 32}}var fr=!1,Ll=null,jl=null,ql=null,Ia=new Map,Pa=new Map,Yl=[],Mg="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 Ld(t,e){switch(t){case"focusin":case"focusout":Ll=null;break;case"dragenter":case"dragleave":jl=null;break;case"mouseover":case"mouseout":ql=null;break;case"pointerover":case"pointerout":Ia.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pa.delete(e.pointerId)}}function ti(t,e,l,n,a,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:l,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},e!==null&&(e=Sn(e),e!==null&&Nd(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Cg(t,e,l,n,a){switch(e){case"focusin":return Ll=ti(Ll,t,e,l,n,a),!0;case"dragenter":return jl=ti(jl,t,e,l,n,a),!0;case"mouseover":return ql=ti(ql,t,e,l,n,a),!0;case"pointerover":var i=a.pointerId;return Ia.set(i,ti(Ia.get(i)||null,t,e,l,n,a)),!0;case"gotpointercapture":return i=a.pointerId,Pa.set(i,ti(Pa.get(i)||null,t,e,l,n,a)),!0}return!1}function jd(t){var e=vn(t.target);if(e!==null){var l=d(e);if(l!==null){if(e=l.tag,e===13){if(e=y(l),e!==null){t.blockedOn=e,$r(t.priority,function(){Hd(l)});return}}else if(e===31){if(e=g(l),e!==null){t.blockedOn=e,$r(t.priority,function(){Hd(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Cu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=rr(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);os=n,l.target.dispatchEvent(n),os=null}else return e=Sn(l),e!==null&&Nd(e),t.blockedOn=l,!1;e.shift()}return!0}function qd(t,e,l){Cu(t)&&l.delete(e)}function zg(){fr=!1,Ll!==null&&Cu(Ll)&&(Ll=null),jl!==null&&Cu(jl)&&(jl=null),ql!==null&&Cu(ql)&&(ql=null),Ia.forEach(qd),Pa.forEach(qd)}function zu(t,e){t.blockedOn===e&&(t.blockedOn=null,fr||(fr=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,zg)))}var Ou=null;function Yd(t){Ou!==t&&(Ou=t,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Ou===t&&(Ou=null);for(var e=0;e<t.length;e+=3){var l=t[e],n=t[e+1],a=t[e+2];if(typeof n!="function"){if(or(n||l)===null)continue;break}var i=Sn(l);i!==null&&(t.splice(e,3),e-=3,rc(i,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function ta(t){function e(m){return zu(m,t)}Ll!==null&&zu(Ll,t),jl!==null&&zu(jl,t),ql!==null&&zu(ql,t),Ia.forEach(e),Pa.forEach(e);for(var l=0;l<Yl.length;l++){var n=Yl[l];n.blockedOn===t&&(n.blockedOn=null)}for(;0<Yl.length&&(l=Yl[0],l.blockedOn===null);)jd(l),l.blockedOn===null&&Yl.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],i=l[n+1],o=a[ae]||null;if(typeof i=="function")o||Yd(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[ae]||null)h=o.formAction;else if(or(a)!==null)continue}else h=o.action;typeof h=="function"?l[n+1]=h:(l.splice(n,3),n-=3),Yd(l)}}}function Xd(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function hr(t){this._internalRoot=t}Du.prototype.render=hr.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(c(409));var l=e.current,n=Ee();Rd(l,n,t,e,null,null)},Du.prototype.unmount=hr.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Rd(t.current,2,null,t,null,null),ou(),e[gn]=null}};function Du(t){this._internalRoot=t}Du.prototype.unstable_scheduleHydration=function(t){if(t){var e=Wr();t={blockedOn:null,target:t,priority:e};for(var l=0;l<Yl.length&&e!==0&&e<Yl[l].priority;l++);Yl.splice(l,0,t),l===0&&jd(t)}};var Gd=u.version;if(Gd!=="19.2.3")throw Error(c(527,Gd,"19.2.3"));U.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(c(188)):(t=Object.keys(t).join(","),Error(c(268,t)));return t=b(e),t=t!==null?H(t):null,t=t===null?null:t.stateNode,t};var Og={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{ra=wu.inject(Og),de=wu}catch{}}return ai.createRoot=function(t,e){if(!f(t))throw Error(c(299));var l=!1,n="",a=Wf,i=$f,o=Ff;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(o=e.onRecoverableError)),e=Dd(t,1,!1,null,null,l,n,null,a,i,o,Xd),t[gn]=e.current,Jc(t),new hr(e)},ai.hydrateRoot=function(t,e,l){if(!f(t))throw Error(c(299));var n=!1,a="",i=Wf,o=$f,h=Ff,m=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(m=l.formState)),e=Dd(t,1,!0,e,l??null,n,a,m,i,o,h,Xd),e.context=wd(null),l=e.current,n=Ee(),n=ls(n),a=xl(n),a.callback=null,Ml(l,a,n),l=n,e.current.lanes=l,fa(e,l),Ze(e),t[gn]=e.current,Jc(t),new Du(e)},ai.version="19.2.3",ai}var em;function Kg(){if(em)return yr.exports;em=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),yr.exports=Qg(),yr.exports}var Vg=Kg();function lm(r){return r!==null&&typeof r=="object"&&[null,Object.prototype].includes(Object.getPrototypeOf(r))||Array.isArray(r)}function Ar(r,u,s=new WeakMap){if(Object.is(r,u))return!0;if(typeof r=="function"&&typeof u=="function")return typeof r==typeof u;if(!lm(r)||!lm(u))return!1;const c=s.get(r);if(c&&c===u)return!0;if(s.set(r,u),Array.isArray(r)||Array.isArray(u)){if(!Array.isArray(r)||!Array.isArray(u)||r.length!==u.length)return!1;for(let y=0;y<r.length;y++)if(!Ar(r[y],u[y],s))return!1;return!0}const f=Object.keys(r),d=Object.keys(u);if(f.length!==d.length)return!1;for(let y=0;y<f.length;y++){const g=f[y];if(!Object.prototype.hasOwnProperty.call(u,g))return!1;const E=r[g],b=u[g];if(!Ar(E,b,s))return!1}return!0}function Zg(r){const u=[],s=(d,y)=>y.reduce((g,E)=>g==null?g:g[E],d),c=(d,y)=>(...g)=>{const E=s(r.current,d),b=E==null?void 0:E[y];if(typeof b=="function")return b.apply(E,g)},f=d=>{if(typeof d=="function"){const y=u[u.length-1],g=u.slice(0,-1);return c(g,y)}if(Array.isArray(d)){const y=u.length,g=new Array(d.length);for(let E=0;E<d.length;E++)u[y]=E,g[E]=f(d[E]);return u.length=y,g}if(d&&typeof d=="object"){const y=u.length,g={};for(const E of Object.keys(d))u[y]=E,g[E]=f(d[E]);return u.length=y,g}return d};return f(r.current)}function Jg(r){const u=Wd.useRef(r);u.current=r;const s=Wd.useRef(null);return(!s.current||!Ar(s.current.snapshot,r))&&(s.current={snapshot:r,shaped:Zg(u)}),s.current.shaped}const kg=Object.freeze(["focusComposer","setThreadId","sendUserMessage","setComposerValue","setRuntimeCapabilities","fetchUpdates","sendCustomAction"]);function Wg(r){const u=bt.useRef(null),s=Jg(r),c=bt.useMemo(()=>kg.reduce((y,g)=>(y[g]=(...E)=>{if(!u.current){console.warn("ChatKit element is not mounted");return}return u.current[g](...E)},y),{}),[]),f=bt.useCallback(y=>{u.current=y},[]),d=bt.useMemo(()=>{const y={},g={};for(const[E,b]of Object.entries(s))/^on[A-Z]/.test(E)&&E!=="onClientTool"?g[E]=b:y[E]=b;return{setInstance:f,options:y,handlers:g}},[s,f]);return bt.useMemo(()=>({...c,control:d,ref:u}),[c,d])}class $g{constructor(){St(this,"callbacks",new Map)}on(u,s){this.callbacks.has(u)||this.callbacks.set(u,new Set),this.callbacks.get(u).add(s)}emit(u,...s){var f;const c=s[0];(f=this.callbacks.get(u))==null||f.forEach(d=>d(c))}off(u,s){var c;s?(c=this.callbacks.get(u))==null||c.delete(s):this.callbacks.delete(u)}allOff(){this.callbacks.clear()}}async function Fg(r,u){const s=r.getReader();let c;for(;!(c=await s.read()).done;)u(c.value)}function Ig(r){let u,s,c,f=!1;return function(y){u===void 0?(u=y,s=0,c=-1):u=t0(u,y);const g=u.length;let E=0;for(;s<g;){f&&(u[s]===10&&(E=++s),f=!1);let b=-1;for(;s<g&&b===-1;++s)switch(u[s]){case 58:c===-1&&(c=s-E);break;case 13:f=!0;case 10:b=s;break}if(b===-1)break;r(u.subarray(E,b),c),E=s,c=-1}E===g?u=void 0:E!==0&&(u=u.subarray(E),s-=E)}}function Pg(r,u,s){let c=nm();const f=new TextDecoder;return function(y,g){if(y.length===0)s==null||s(c),c=nm();else if(g>0){const E=f.decode(y.subarray(0,g)),b=g+(y[g+1]===32?2:1),H=f.decode(y.subarray(b));switch(E){case"data":c.data=c.data?c.data+`
50
- `+H:H;break;case"event":c.event=H;break;case"id":r(c.id=H);break;case"retry":const R=parseInt(H,10);isNaN(R)||u(c.retry=R);break}}}}function t0(r,u){const s=new Uint8Array(r.length+u.length);return s.set(r),s.set(u,r.length),s}function nm(){return{data:"",event:"",id:"",retry:void 0}}var e0=function(r,u){var s={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&u.indexOf(c)<0&&(s[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,c=Object.getOwnPropertySymbols(r);f<c.length;f++)u.indexOf(c[f])<0&&Object.prototype.propertyIsEnumerable.call(r,c[f])&&(s[c[f]]=r[c[f]]);return s};const _r="text/event-stream",l0=1e3,am="last-event-id";function n0(r,u){var{signal:s,headers:c,onopen:f,onmessage:d,onclose:y,onerror:g,openWhenHidden:E,fetch:b}=u,H=e0(u,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((R,W)=>{const ct=Object.assign({},c);ct.accept||(ct.accept=_r);let Et;function ut(){Et.abort(),document.hidden||le()}E||document.addEventListener("visibilitychange",ut);let Mt=l0,Tt=0;function Ut(){document.removeEventListener("visibilitychange",ut),window.clearTimeout(Tt),Et.abort()}s==null||s.addEventListener("abort",()=>{Ut(),R()});const Nt=b??window.fetch,ee=f??a0;async function le(){var Xt;Et=new AbortController;try{const $=await Nt(r,Object.assign(Object.assign({},H),{headers:ct,signal:Et.signal}));await ee($),await Fg($.body,Ig(Pg(Ct=>{Ct?ct[am]=Ct:delete ct[am]},Ct=>{Mt=Ct},d))),y==null||y(),Ut(),R()}catch($){if(!Et.signal.aborted)try{const Ct=(Xt=g==null?void 0:g($))!==null&&Xt!==void 0?Xt:Mt;window.clearTimeout(Tt),Tt=window.setTimeout(le,Ct)}catch(Ct){Ut(),W(Ct)}}}le()})}function a0(r){const u=r.headers.get("content-type");if(!(u!=null&&u.startsWith(_r)))throw new Error(`Expected content-type to be ${_r}, Actual: ${u}`)}const ia="__chatkit_error__";class Gu extends Error{constructor(s,c,f){super(s);St(this,"status");St(this,"statusText");St(this,"metadata");this.name="HttpError",this.statusText=c.statusText,this.status=c.status,this.metadata=f}static fromPossibleFrameSafeError(s){if(s instanceof Gu)return s;if(s&&typeof s=="object"&&ia in s&&s[ia]==="HttpError"){const c=s,f=new Gu(c.message,{status:c.status,statusText:c.statusText},c.metadata);return f.stack=c.stack,f}return null}}var Am;Am=ia;const qr=class qr{constructor(u,s,c){St(this,Am,"HttpError");St(this,"message");St(this,"stack");St(this,"status");St(this,"statusText");St(this,"metadata");this.message=u,this.stack=new Error(u).stack,this.status=s.status,this.statusText=s.statusText,this.metadata=c}static fromHttpError(u){return new qr(u.message,{status:u.status,statusText:u.statusText},u.metadata)}};let Qu=qr;const i0=1e3,u0=1e4,s0=5,c0=(r,u=u0,s=i0)=>{const c=Math.min(u,s*2**r);return Math.floor(c*(.5+Math.random()*.5))};class im extends Error{constructor(u){super(),this.cause=u}}const r0=async(r,u)=>{let s=0;const{onopen:c,...f}=u;await n0(r,{...f,onopen:async d=>{var g;if(c==null||c(d),d.ok&&((g=d.headers.get("content-type"))!=null&&g.startsWith("text/event-stream"))){s=0;return}const y=new Qu(`Streaming failed: ${d.statusText}`,d);throw d.status>=400&&d.status<500?y:new im(y)},onerror:d=>{if(d instanceof im){if(s>=s0)throw d.cause;return s+=1,c0(s)}throw d}})};function xm(){const r=globalThis.crypto;if(typeof(r==null?void 0:r.randomUUID)=="function")return r.randomUUID();if(typeof(r==null?void 0:r.getRandomValues)=="function"){const u=new Uint8Array(16);return r.getRandomValues(u),u[6]=u[6]&15|64,u[8]=u[8]&63|128,[...u].map(s=>s.toString(16).padStart(2,"0")).join("").replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/,"$1-$2-$3-$4-$5")}return null}function Sr(){return xm()??`ck_${Date.now()}_${Math.random().toString(16).slice(2)}`}function o0(r,{channelId:u,expectedOrigin:s,expectedSource:c}){const f=r.data;if(!f||typeof f!="object"||!("__xpaiChatKit"in f)||f.__xpaiChatKit!==!0||s!=="*"&&r.origin!==s)return!1;if(r.source===c)return!0;const d=u==null?void 0:u.trim();return d?"channelId"in f&&f.channelId===d:!1}let f0=class Mm extends Error{constructor(s){super(s);St(this,"_name");this.name="IntegrationError",this._name=this.name}static fromPossibleFrameSafeError(s){if(s&&typeof s=="object"&&ia in s&&s[ia]==="IntegrationError"){const c=s,f=new Mm(c.message);return f.stack=c.stack,f}return null}};var _m;_m=ia;class h0{constructor(u){St(this,_m,"IntegrationError");St(this,"message");St(this,"stack");this.message=u,this.stack=new Error(u).stack}}class d0{constructor({handlers:u,target:s,targetOrigin:c,channelId:f,fetch:d=window.fetch}){St(this,"targetOrigin");St(this,"target");St(this,"channelId");St(this,"commandHandlers");St(this,"_fetch");St(this,"emitter",new $g);St(this,"handlers",new Map);St(this,"fetchEventSourceHandlers",new Map);St(this,"abortControllers",new Map);St(this,"commands",new Proxy({},{get:(u,s)=>(c,f)=>new Promise((d,y)=>{const g=Sr();this.handlers.set(g,{resolve:d,reject:y,stack:new Error().stack||""}),this.sendMessage({type:"command",nonce:g,command:`on${s.charAt(0).toUpperCase()}${s.slice(1)}`,data:c},f)})}));St(this,"handleMessage",async u=>{var c,f,d,y;if(!o0(u,{channelId:this.channelId,expectedOrigin:this.targetOrigin,expectedSource:this.target()}))return;const s=u.data;switch(s.type){case"event":{this.emitter.emit(s.event,s.data);break}case"fetch":{try{if(s.formData){const H=new FormData;for(const[R,W]of Object.entries(s.formData))H.append(R,W);s.params.body=H}const g=new AbortController;this.abortControllers.set(s.nonce,g),s.params.signal=g.signal;const E=await this._fetch(s.url,s.params);if(!E.ok){const H=await E.json().then(R=>R.message||E.statusText).catch(()=>E.statusText);throw new Qu(H,E)}const b=await E.json().catch(()=>({}));this.sendMessage({type:"response",response:b,nonce:s.nonce})}catch(g){this.sendMessage({type:"response",error:g,nonce:s.nonce})}break}case"fetchEventSource":{try{const g=new AbortController;this.abortControllers.set(s.nonce,g),await r0(s.url,{...s.params,signal:g.signal,fetch:this._fetch,onmessage:E=>{this.sendMessage({type:"fetchEventSourceMessage",message:E,nonce:s.nonce})}}),this.sendMessage({type:"response",response:void 0,nonce:s.nonce})}catch(g){this.sendMessage({type:"response",error:g,nonce:s.nonce})}break}case"command":{if(!this.canReceiveCommand(s.command)){this.sendMessage({type:"response",error:new h0(`Command ${s.command} not supported`),nonce:s.nonce});return}try{const g=await((f=(c=this.commandHandlers)[s.command])==null?void 0:f.call(c,s.data));this.sendMessage({type:"response",response:g,nonce:s.nonce})}catch(g){this.sendMessage({type:"response",error:g,nonce:s.nonce})}break}case"response":{const g=this.handlers.get(s.nonce);if(!g){console.error("No handler found for nonce",s.nonce);return}if(s.error){const E=f0.fromPossibleFrameSafeError(s.error),b=Gu.fromPossibleFrameSafeError(s.error);E?(E.stack=g.stack,g.reject(E)):b?g.reject(b):g.reject(s.error)}else g.resolve(s.response);this.handlers.delete(s.nonce);break}case"fetchEventSourceMessage":{if(!this.fetchEventSourceHandlers.get(s.nonce)){console.error("No handler found for nonce",s.nonce);return}(y=(d=this.fetchEventSourceHandlers.get(s.nonce))==null?void 0:d.onmessage)==null||y.call(d,s.message);break}case"abortSignal":{const g=this.abortControllers.get(s.nonce);g&&(g.abort(s.reason),this.abortControllers.delete(s.nonce));break}}});this.commandHandlers=u,this.target=s,this.targetOrigin=c,this.channelId=(f==null?void 0:f.trim())||void 0,this._fetch=((...y)=>d(...y))}setTargetOrigin(u){this.targetOrigin=u}sendMessage(u,s){var f;const c={__xpaiChatKit:!0,...this.channelId?{channelId:this.channelId}:{},...u};(f=this.target())==null||f.postMessage(c,this.targetOrigin,s)}connect(){window.addEventListener("message",this.handleMessage)}disconnect(){window.removeEventListener("message",this.handleMessage)}fetch(u,s){return new Promise((c,f)=>{const d=Sr();this.handlers.set(d,{resolve:c,reject:f,stack:new Error().stack||""});let y;if(s.body instanceof FormData){y={};for(const[g,E]of s.body.entries())y[g]=E;s.body=void 0}s.signal&&(s.signal.addEventListener("abort",()=>{var g;this.sendMessage({type:"abortSignal",nonce:d,reason:(g=s.signal)==null?void 0:g.reason})}),s.signal=void 0),this.sendMessage({type:"fetch",nonce:d,params:s,formData:y,url:u})})}fetchEventSource(u,s){return new Promise((c,f)=>{const{onmessage:d,signal:y,...g}=s,E=Sr();this.handlers.set(E,{resolve:c,reject:f,stack:new Error().stack||""}),this.fetchEventSourceHandlers.set(E,{onmessage:d}),y&&y.addEventListener("abort",()=>{this.sendMessage({type:"abortSignal",nonce:E,reason:y.reason})}),this.sendMessage({type:"fetchEventSource",nonce:E,params:g,url:u})})}emit(...[u,s,c]){this.sendMessage({type:"event",event:u,data:s},c)}on(...[u,s]){this.emitter.on(u,s)}destroy(){window.removeEventListener("message",this.handleMessage),this.emitter.allOff(),this.handlers.clear()}}const m0=r=>btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),y0=r=>{if(r===void 0)throw new TypeError("encodeBase64: `undefined` cannot be encoded to valid JSON. Pass null instead.");const u=JSON.stringify(r),s=new TextEncoder().encode(u);let c="";for(const f of s)c+=String.fromCharCode(f);return m0(c)};class It extends Error{}function p0(r){return r.message}const g0=["command.setOptions","command.sendUserMessage","command.setComposerValue","command.setRuntimeCapabilities","command.setThreadId","command.focusComposer","command.fetchUpdates","command.sendCustomAction","command.showHistory","command.hideHistory","event.ready","event.error","event.log","event.response.start","event.response.end","event.response.stop","event.thread.change","event.project.change","event.connectors.change","event.tool.change","event.thread.load.start","event.thread.load.end","event.deeplink","event.effect","error.StreamError","error.StreamEventParsingError","error.WidgetItemError","error.InitialThreadLoadError","error.FileAttachmentError","error.HistoryViewError","error.FatalAppError","error.IntegrationError","error.EntitySearchError","error.DomainVerificationRequestError","backend.threads.get_by_id","backend.threads.list","backend.threads.update","backend.threads.delete","backend.threads.create","backend.threads.add_user_message","backend.threads.add_client_tool_output","backend.threads.retry_after_item","backend.threads.custom_action","backend.attachments.create","backend.attachments.get_preview","backend.attachments.delete","backend.items.list","backend.items.feedback","thread.item.generated_image","thread.item.user_message","thread.item.assistant_message","thread.item.client_tool_call","thread.item.widget","thread.item.task","thread.item.workflow","thread.item.end_of_turn","thread.item.image_generation","widget.Basic","widget.Card","widget.ListView","widget.ListViewItem","widget.Badge","widget.Box","widget.Row","widget.Col","widget.Button","widget.Caption","widget.Chart","widget.Checkbox","widget.DatePicker","widget.Divider","widget.Form","widget.Icon","widget.Image","widget.Input","widget.Label","widget.Markdown","widget.RadioGroup","widget.Select","widget.Spacer","widget.Text","widget.Textarea","widget.Title","widget.Transition"],v0=["command.shareThread","command.setTrainingOptOut","event.thread.restore","event.message.share","event.image.download","event.history.open","event.history.close","event.log.chatgpt","error.HttpError","error.NetworkError","error.UnhandledError","error.UnhandledPromiseRejectionError","error.StreamEventHandlingError","error.StreamStopError","error.ThreadRenderingError","error.IntlError","error.AppError","backend.threads.stop","backend.threads.share","backend.threads.create_from_shared","backend.threads.init","backend.attachments.process","widget.CardCarousel","widget.Favicon","widget.CardLinkItem","widget.Map"],S0={chatkit:{allow:[...g0,"thread.item.image_generation"],deny:v0}},um=r=>{const u=S0[r],s=new Set(u.allow);for(const b of u.deny??[])s.delete(b);const c=new Set,f=new Set,d=new Set,y=new Set,g=new Set,E=new Set;for(const b of s){if(b.startsWith("command.")){c.add(b.slice(8));continue}if(b.startsWith("event.")){f.add(b.slice(6));continue}if(b.startsWith("backend.")){d.add(b.slice(8));continue}if(b.startsWith("thread.item.")&&y.add(b.slice(12)),b.startsWith("error.")){g.add(b.slice(6));continue}if(b.startsWith("widget.")){E.add(b.slice(7));continue}}return{commands:c,events:f,backend:d,threadItems:y,errors:g,widgets:E}};function b0(r){if(!r||typeof r!="object"||!("width"in r)||typeof r.width!="number"||!Number.isFinite(r.width)||r.width<=0||!("height"in r)||typeof r.height!="number"||!Number.isFinite(r.height)||r.height<=0||!("regions"in r)||!Array.isArray(r.regions)||r.regions.length>128)return null;const u=[];for(const s of r.regions){if(!s||typeof s!="object"||typeof s.x!="number"||!Number.isFinite(s.x)||s.x<0||typeof s.y!="number"||!Number.isFinite(s.y)||s.y<0||typeof s.width!="number"||!Number.isFinite(s.width)||s.width<=0||typeof s.height!="number"||!Number.isFinite(s.height)||s.height<=0||s.x+s.width>r.width+1||s.y+s.height>Math.min(r.height,96)+1)return null;u.push({x:s.x,y:s.y,width:s.width,height:s.height})}return{width:r.width,height:r.height,regions:u}}class E0{constructor(u,s){this.wrapper=u,this.enabled=s,this.size={width:0,height:0},this.layer=document.createElement("div"),this.layer.setAttribute("aria-hidden","true"),this.layer.dataset.slot="chatkit-window-drag",this.layer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden;",u.append(this.layer),this.observer=new ResizeObserver(()=>{(this.wrapper.clientWidth!==this.size.width||this.wrapper.clientHeight!==this.size.height)&&this.clear()}),this.observer.observe(u)}update(u){if(this.clear(),!this.enabled())return;const s=b0(u);if(!(!s||Math.abs(s.width-this.wrapper.clientWidth)>1||Math.abs(s.height-this.wrapper.clientHeight)>1)){this.size={width:s.width,height:s.height};for(const c of s.regions){const f=document.createElement("div");f.style.cssText=`position:absolute;left:${c.x}px;top:${c.y}px;width:${c.width}px;height:${c.height}px;pointer-events:auto;user-select:none;-webkit-app-region:drag;`,this.layer.append(f)}}}clear(){this.layer.replaceChildren()}destroy(){this.observer.disconnect(),this.layer.remove()}}class T0 extends d0{canReceiveCommand(u){return!0}}const A0=["idle","running-right","running-left","waving","jumping","failed","waiting","running","review"],ii={columns:8,rows:9,cellWidth:192,cellHeight:208,animations:{idle:{row:0,frames:6,frameDurations:[280,110,110,140,140,320]},"running-right":{row:1,frames:8,frameDurations:[120,120,120,120,120,120,120,220]},"running-left":{row:2,frames:8,frameDurations:[120,120,120,120,120,120,120,220]},waving:{row:3,frames:4,frameDurations:[140,140,140,280]},jumping:{row:4,frames:5,frameDurations:[140,140,140,140,280]},failed:{row:5,frames:8,frameDurations:[140,140,140,140,140,140,140,240]},waiting:{row:6,frames:6,frameDurations:[150,150,150,150,150,260]},running:{row:7,frames:6,frameDurations:[120,120,120,120,120,220]},review:{row:8,frames:6,frameDurations:[150,150,150,150,150,280]}}},Nu={top:0,right:0,bottom:0,left:0},sm="chatkit:pet:position:v1",_0="/pets/boba/spritesheet.webp",xr={type:"sprite-atlas",src:_0},cm={pin:"bottom-right",draggable:!0,scale:.25,persist:!0,zIndex:40};function x0(r,u){return{row:(u==null?void 0:u.row)??r.row,frames:(u==null?void 0:u.frames)??r.frames,frameDurations:u!=null&&u.frameDurations&&u.frameDurations.length>0?u.frameDurations:r.frameDurations}}function M0(r,u=1){var c;const s={};for(const f of A0)s[f]=x0(ii.animations[f],(c=r==null?void 0:r.animations)==null?void 0:c[f]);return{columns:(r==null?void 0:r.columns)??ii.columns,rows:(r==null?void 0:r.rows)??(u===2?11:ii.rows),cellWidth:(r==null?void 0:r.cellWidth)??ii.cellWidth,cellHeight:(r==null?void 0:r.cellHeight)??ii.cellHeight,animations:s}}function C0(r){return r&&r.src?r:xr}function hi(r){return r?r===!0?{character:xr,position:cm,behavior:"auto",ariaLabel:"Animated pet",imageRendering:"auto"}:r.enabled===!1?null:{character:C0(r.character),position:{...cm,...r.position},behavior:r.behavior??"auto",ariaLabel:r.ariaLabel??"Animated pet",imageRendering:r.imageRendering??"auto"}:null}function z0(r){return r.src?{kind:"atlas",src:r.src,atlas:M0(r.atlas,r.spriteVersionNumber)}:null}function br(r){return typeof r=="number"?{top:r,right:r,bottom:r,left:r}:{top:(r==null?void 0:r.top)??Nu.top,right:(r==null?void 0:r.right)??Nu.right,bottom:(r==null?void 0:r.bottom)??Nu.bottom,left:(r==null?void 0:r.left)??Nu.left}}function Ue(r,u,s,c){const f=c.left,d=c.top,y=Math.max(f,s.width-u.width-c.right),g=Math.max(d,s.height-u.height-c.bottom);return{x:Math.min(y,Math.max(f,r.x)),y:Math.min(g,Math.max(d,r.y))}}function O0(r,u,s,c){const f=(s.width-u.width)/2,d=(s.height-u.height)/2,y=s.width-u.width-c.right,g=s.height-u.height-c.bottom;switch(r){case"top-left":return Ue({x:c.left,y:c.top},u,s,c);case"top":return Ue({x:f,y:c.top},u,s,c);case"top-right":return Ue({x:y,y:c.top},u,s,c);case"left":return Ue({x:c.left,y:d},u,s,c);case"center":return Ue({x:f,y:d},u,s,c);case"right":return Ue({x:y,y:d},u,s,c);case"bottom-left":return Ue({x:c.left,y:g},u,s,c);case"bottom":return Ue({x:f,y:g},u,s,c);case"bottom-right":default:return Ue({x:y,y:g},u,s,c)}}const Mr=(r,u=new WeakSet)=>{if(typeof r=="function")return"[ChatKitMethod]";if(typeof r!="object"||r===null||u.has(r))return r;if(u.add(r),Array.isArray(r))return r.map(c=>Mr(c,u));const s={};for(const[c,f]of Object.entries(r))typeof f!="function"?s[c]=Mr(f,u):s[c]="[ChatKitMethod]";return s},Hu=2,D0=.5,w0=1.5,R0=3,U0=2e3,rm=12,N0=320,Je=12,la=8,H0='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',om={"en-US":{closePetMenuItem:"Close pet",hideMessage:"Hide message",expandMessage:"Expand message",collapseMessage:"Collapse message",restoreMessage:"Show message",replyButton:"Reply",replyPlaceholder:"Reply...",sendButton:"Send",sendingButton:"Sending...",sendFailed:"Failed to send"},"zh-CN":{closePetMenuItem:"关闭宠物",hideMessage:"隐藏消息",expandMessage:"展开消息",collapseMessage:"收起消息",restoreMessage:"显示消息",replyButton:"回复",replyPlaceholder:"输入回复...",sendButton:"发送",sendingButton:"发送中...",sendFailed:"发送失败"}};function Bu(r){r.stopPropagation()}function na(){const r=window.visualViewport;return{width:(r==null?void 0:r.width)||window.innerWidth||320,height:(r==null?void 0:r.height)||window.innerHeight||480}}function B0(r,u){if(!u)return null;try{const s=window.localStorage.getItem(r);if(!s)return null;const c=JSON.parse(s);return!c||typeof c!="object"||typeof c.x!="number"||typeof c.y!="number"?null:{x:c.x,y:c.y}}catch{return null}}function L0(r,u,s){if(u)try{window.localStorage.setItem(r,JSON.stringify(s))}catch{}}function j0(r){return r.replace(/["\\]/g,"\\$&")}function fm(r){return Math.max(.1,r)*D0}function Ql(r,u,s){return Math.min(s,Math.max(u,r))}function q0(){if(typeof window<"u")try{const r=window.localStorage.getItem("chatkit:locale");if(r)return r}catch{}return typeof navigator<"u"?navigator.language:null}function hm(r){const u=(r??q0()??"").trim().toLowerCase();return u==="zh-cn"||u==="zh-hans"||u.startsWith("zh")?"zh-CN":"en-US"}function Y0(r){switch(r){case"compact":return{padding:"8px 10px",gap:6,marginTop:3,toggleSize:30,actionSize:22};case"spacious":return{padding:"14px 16px",gap:10,marginTop:6,toggleSize:38,actionSize:28};case"normal":default:return{padding:"12px 14px",gap:8,marginTop:4,toggleSize:34,actionSize:26}}}function X0(r){switch(r){case"pill":return 24;case"round":return 16;case"sharp":return 0;case"soft":default:return 12}}function ui(r){var g,E;const u=typeof r=="string"?null:r,s=((g=u==null?void 0:u.typography)==null?void 0:g.baseSize)??16,c=(u==null?void 0:u.density)??"normal",f=c==="compact"?-1:c==="spacious"?1:0,d=Ql(s-2+f,11,17);return{...Y0(c),bodySize:d,titleSize:d+1,iconSize:Ql(d+2,13,19),radius:X0(u==null?void 0:u.radius),fontFamily:((E=u==null?void 0:u.typography)==null?void 0:E.fontFamily)??H0}}function G0(r){return r==="idle"||r==="running-right"||r==="running-left"||r==="waving"||r==="jumping"||r==="failed"||r==="waiting"||r==="running"||r==="review"}function Q0(r){if(!r||typeof r!="object"||Array.isArray(r))return null;const u=r;return G0(u.state)?{state:u.state}:null}function K0(r){if(!r||typeof r!="object"||Array.isArray(r))return null;const u=r;return u.pet===null||typeof u.pet=="boolean"?{pet:u.pet}:u.pet&&typeof u.pet=="object"&&!Array.isArray(u.pet)?{pet:u.pet}:null}function V0(r){return r==="running"||r==="completed"||r==="failed"}function dm(r){return r?[r.threadId,r.messageId||r.updatedAt||r.message].join(":"):null}function mm(r){return r?[r.threadId,r.messageId??""].join(":"):null}function Z0(r){if(r===null)return{summary:null};if(!r||typeof r!="object"||Array.isArray(r))return null;const u=r;return typeof u.threadId!="string"||!u.threadId.trim()||typeof u.title!="string"||!u.title.trim()||typeof u.message!="string"||!u.message.trim()||!V0(u.status)?null:{summary:{threadId:u.threadId,title:u.title,message:u.message,status:u.status,...typeof u.messageId=="string"&&u.messageId.trim()?{messageId:u.messageId}:{},...typeof u.updatedAt=="string"&&u.updatedAt.trim()?{updatedAt:u.updatedAt}:{}}}}function J0(r){if(!r||typeof r!="object"||Array.isArray(r))return null;const u=r;return u.name!=="thread.summary"?null:Z0(u.data??null)}class k0{constructor(u,s){this.overlayElement=null,this.petElement=null,this.contextMenuElement=null,this.summaryElement=null,this.summaryToggleElement=null,this.mediaElement=null,this.options=null,this.theme=null,this.resolved=null,this.summary=null,this.summaryRenderKey=null,this.dismissedSummaryKey=null,this.isSummaryCollapsed=!1,this.isSummaryExpanded=!1,this.isSummaryHovering=!1,this.isReplyOpen=!1,this.isReplySubmitting=!1,this.replyError=null,this.replyDraft="",this.replyInputElement=null,this.copyLocale=hm(),this.copy=om[this.copyLocale],this.currentState="waiting",this.lastAutoState="waiting",this.transient=null,this.position=null,this.dragPosition=null,this.dragOffset={x:0,y:0},this.lastDragPosition=null,this.lastDragClientX=null,this.dragAnimation=null,this.activePointerId=null,this.isDragging=!1,this.isHovering=!1,this.movedDuringDrag=!1,this.prefersReducedMotion=!1,this.frame=0,this.completed=!1,this.activeAnimationName=null,this.activeAnimationMode=null,this.frameTimer=null,this.restingDelayTimer=null,this.mediaQuery=null,this.connected=!1,this.handleViewportChange=()=>{this.closeContextMenu(),this.render()},this.handleReducedMotionChange=()=>{var c;this.prefersReducedMotion=!!((c=this.mediaQuery)!=null&&c.matches),this.prefersReducedMotion&&(this.transient=null),this.render()},this.handlePointerEnter=()=>{this.clearRestingDelayTimer(),this.isHovering=!0,this.rescheduleAnimation()},this.handlePointerLeave=()=>{this.isDragging||this.enterRestingAfterDelay()},this.handleContextMenu=c=>{c.preventDefault(),c.stopPropagation(),this.openContextMenu({x:c.clientX,y:c.clientY})},this.handleContextMenuEvent=c=>{c.preventDefault(),c.stopPropagation()},this.handleContextMenuOutsidePointerDown=c=>{const f=this.contextMenuElement;f&&c.composedPath().includes(f)||this.closeContextMenu()},this.handleContextMenuKeyDown=c=>{c.key==="Escape"&&(c.preventDefault(),this.closeContextMenu())},this.handleClosePetMenuItemClick=c=>{var f;c.preventDefault(),c.stopPropagation(),this.closeContextMenu(),(f=this.onClose)==null||f.call(this)},this.handleSummaryPointerEnter=()=>{this.isSummaryHovering=!0,this.render()},this.handleSummaryPointerLeave=()=>{this.isSummaryHovering=!1,this.isReplyOpen||this.render()},this.handleSummaryClick=()=>{var f,d;const c=(f=this.summary)==null?void 0:f.threadId.trim();c&&((d=this.onThreadSummaryActivate)==null||d.call(this,c))},this.handleSummaryDelete=()=>{const c=dm(this.summary);c&&(this.dismissedSummaryKey=c),this.isSummaryCollapsed=!1,this.isReplyOpen=!1,this.replyDraft="",this.replyError=null,this.removeSummaryElements()},this.handleSummaryCollapseToggle=()=>{this.isSummaryCollapsed=!this.isSummaryCollapsed,this.isSummaryExpanded=!1,this.isReplyOpen=!1,this.replyError=null,this.render()},this.handleSummaryExpandToggle=()=>{this.isSummaryExpanded=!this.isSummaryExpanded,this.render()},this.handleReplyOpen=()=>{this.isReplyOpen=!0,this.replyError=null,this.render()},this.handleReplyInput=c=>{const f=c.currentTarget;f instanceof HTMLInputElement&&(this.replyDraft=f.value,this.replyError=null)},this.handleReplySubmit=c=>{c.preventDefault(),this.submitReply()},this.handleReplyKeyDown=c=>{c.key==="Escape"&&(c.preventDefault(),this.isReplyOpen=!1,this.replyError=null,this.render())},this.handlePointerDown=c=>{var y,g;if(c.button!==0||c.ctrlKey||this.isDragging||(this.closeContextMenu(),!((y=this.options)!=null&&y.position.draggable)))return;c.preventDefault();const f=(g=this.petElement)==null?void 0:g.getBoundingClientRect();if(!f)return;const d={x:f.left,y:f.top};this.dragOffset={x:c.clientX-f.left,y:c.clientY-f.top},this.lastDragPosition=d,this.lastDragClientX=c.clientX,this.dragAnimation=null,this.movedDuringDrag=!1,this.dragPosition=d,this.isDragging=!0,this.activePointerId=c.pointerId,this.clearRestingDelayTimer(),this.isHovering=!0,this.captureActivePointer(),this.installDragListeners(),this.rescheduleAnimation()},this.handlePointerMove=c=>{if(!this.isActiveDragPointer(c))return;const f=this.getNextDragPosition(c),d=this.lastDragPosition;if(d&&(Math.abs(d.x-f.x)>Hu||Math.abs(d.y-f.y)>Hu)&&(this.movedDuringDrag=!0),this.lastDragClientX!==null){const y=c.clientX-this.lastDragClientX;y>Hu?this.dragAnimation="running-right":y<-Hu&&(this.dragAnimation="running-left")}this.lastDragClientX=c.clientX,this.lastDragPosition=f,this.dragPosition=f,this.render()},this.handlePointerUp=c=>{if(!this.isActiveDragPointer(c))return;const f=this.lastDragPosition??this.getNextDragPosition(c);this.finishDrag(f,c)},this.handleLostPointerCapture=c=>{if(!this.isActiveDragPointer(c))return;const f=this.lastDragPosition??this.getNextDragPosition(c);this.finishDrag(f,c)},this.handleClick=()=>{var c;this.movedDuringDrag||((c=this.onActivate)==null||c.call(this),!this.prefersReducedMotion&&(this.transient={name:"waving"},this.render()))},this.root=u,this.onActivate=s==null?void 0:s.onActivate,this.onClose=s==null?void 0:s.onClose,this.onReply=s==null?void 0:s.onReply,this.onThreadSummaryActivate=s==null?void 0:s.onThreadSummaryActivate,this.connect()}connect(){this.connected||(this.connected=!0,this.installViewportListeners(),this.installReducedMotionListener(),this.render())}setOptions(u,s){this.closeContextMenu();const c=hi(u);if(this.options=c,this.theme=s??null,!c){this.isDragging=!1,this.isHovering=!1,this.position=null,this.dragPosition=null,this.dragAnimation=null,this.lastDragPosition=null,this.lastDragClientX=null,this.transient=null,this.resolved=null,this.clearRestingDelayTimer(),this.removeDragListeners(),this.removeOverlay();return}this.position=B0(sm,c.position.persist),c.behavior==="auto"&&!this.prefersReducedMotion&&(this.transient={name:"waving"}),this.resolveCharacter(),this.render()}setState(u){var c;const s=this.lastAutoState;this.lastAutoState=u,this.currentState=u,((c=this.options)==null?void 0:c.behavior)==="auto"&&!this.prefersReducedMotion&&u==="idle"&&(s==="running"||s==="review")&&!this.transient?this.transient={name:"jumping"}:u!=="idle"&&(this.transient=null),this.render()}setLocale(u){const s=hm(u);s!==this.copyLocale&&(this.copyLocale=s,this.copy=om[s],this.summaryRenderKey=null,this.closeContextMenu(),this.render())}setThreadSummary(u){const s=mm(this.summary),c=mm(u);if(this.summary=u,!u){this.isSummaryCollapsed=!1,this.isSummaryExpanded=!1,this.isSummaryHovering=!1,this.isReplyOpen=!1,this.isReplySubmitting=!1,this.replyError=null,this.replyDraft="",this.summaryRenderKey=null,this.removeSummaryElements();return}s!==c&&(this.isSummaryCollapsed=!1,this.isSummaryExpanded=!1,this.isSummaryHovering=!1,this.isReplyOpen=!1,this.isReplySubmitting=!1,this.replyError=null,this.replyDraft=""),this.render()}setThreadSummaryStatus(u){!this.summary||this.summary.status===u||(this.summary={...this.summary,status:u},this.render())}destroy(){var u,s,c,f;this.connected&&(this.connected=!1,this.clearRestingDelayTimer(),this.clearTimers(),this.removeDragListeners(),this.removeOverlay(),window.removeEventListener("resize",this.handleViewportChange),(u=window.visualViewport)==null||u.removeEventListener("resize",this.handleViewportChange),(s=window.visualViewport)==null||s.removeEventListener("scroll",this.handleViewportChange),(f=(c=this.mediaQuery)==null?void 0:c.removeEventListener)==null||f.call(c,"change",this.handleReducedMotionChange),this.mediaQuery=null)}installViewportListeners(){var u,s;window.addEventListener("resize",this.handleViewportChange),(u=window.visualViewport)==null||u.addEventListener("resize",this.handleViewportChange),(s=window.visualViewport)==null||s.addEventListener("scroll",this.handleViewportChange)}installReducedMotionListener(){var u,s;window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-reduced-motion: reduce)"),this.prefersReducedMotion=this.mediaQuery.matches,(s=(u=this.mediaQuery).addEventListener)==null||s.call(u,"change",this.handleReducedMotionChange))}resolveCharacter(){if(!this.options){this.resolved=null;return}const u=this.options.character;this.resolved=z0(u)}ensureOverlay(){if(this.overlayElement&&this.petElement)return;const u=document.createElement("div");u.setAttribute("data-chatkit-host-pet-layer",""),u.style.position="fixed",u.style.inset="0",u.style.pointerEvents="none",u.style.overflow="visible";const s=document.createElement("style");s.textContent=`
48
+ `+n.stack}}var Iu=Object.prototype.hasOwnProperty,Pu=r.unstable_scheduleCallback,ts=r.unstable_cancelCallback,oy=r.unstable_shouldYield,fy=r.unstable_requestPaint,de=r.unstable_now,hy=r.unstable_getCurrentPriorityLevel,Gr=r.unstable_ImmediatePriority,Qr=r.unstable_UserBlockingPriority,yi=r.unstable_NormalPriority,dy=r.unstable_LowPriority,Kr=r.unstable_IdlePriority,my=r.log,yy=r.unstable_setDisableYieldValue,ra=null,me=null;function pl(t){if(typeof my=="function"&&yy(t),me&&typeof me.setStrictMode=="function")try{me.setStrictMode(ra,t)}catch{}}var ye=Math.clz32?Math.clz32:vy,gy=Math.log,py=Math.LN2;function vy(t){return t>>>=0,t===0?32:31-(gy(t)/py|0)|0}var gi=256,pi=262144,vi=4194304;function Wl(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Si(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var a=0,i=t.suspendedLanes,o=t.pingedLanes;t=t.warmLanes;var h=n&134217727;return h!==0?(n=h&~i,n!==0?a=Wl(n):(o&=h,o!==0?a=Wl(o):l||(l=h&~t,l!==0&&(a=Wl(l))))):(h=n&~i,h!==0?a=Wl(h):o!==0?a=Wl(o):l||(l=n&~t,l!==0&&(a=Wl(l)))),a===0?0:e!==0&&e!==a&&(e&i)===0&&(i=a&-a,l=e&-e,i>=l||i===32&&(l&4194048)!==0)?e:a}function oa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Sy(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Vr(){var t=vi;return vi<<=1,(vi&62914560)===0&&(vi=4194304),t}function es(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function fa(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function by(t,e,l,n,a,i){var o=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var h=t.entanglements,m=t.expirationTimes,A=t.hiddenUpdates;for(l=o&~l;0<l;){var M=31-ye(l),D=1<<M;h[M]=0,m[M]=-1;var _=A[M];if(_!==null)for(A[M]=null,M=0;M<_.length;M++){var x=_[M];x!==null&&(x.lane&=-536870913)}l&=~D}n!==0&&Zr(t,n,0),i!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=i&~(o&~e))}function Zr(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-ye(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|l&261930}function Jr(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var n=31-ye(l),a=1<<n;a&e|t[n]&e&&(t[n]|=e),l&=~a}}function kr(t,e){var l=e&-e;return l=(l&42)!==0?1:ls(l),(l&(t.suspendedLanes|e))!==0?0:l}function ls(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ns(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Wr(){var t=U.p;return t!==0?t:(t=window.event,t===void 0?32:Bd(t.type))}function $r(t,e){var l=U.p;try{return U.p=t,e()}finally{U.p=l}}var vl=Math.random().toString(36).slice(2),Vt="__reactFiber$"+vl,ie="__reactProps$"+vl,pn="__reactContainer$"+vl,as="__reactEvents$"+vl,Ey="__reactListeners$"+vl,Ty="__reactHandles$"+vl,Fr="__reactResources$"+vl,ha="__reactMarker$"+vl;function is(t){delete t[Vt],delete t[ie],delete t[as],delete t[Ey],delete t[Ty]}function vn(t){var e=t[Vt];if(e)return e;for(var l=t.parentNode;l;){if(e=l[pn]||l[Vt]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=bd(t);t!==null;){if(l=t[Vt])return l;t=bd(t)}return e}t=l,l=t.parentNode}return null}function Sn(t){if(t=t[Vt]||t[pn]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function da(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(c(33))}function bn(t){var e=t[Fr];return e||(e=t[Fr]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Gt(t){t[ha]=!0}var Ir=new Set,Pr={};function $l(t,e){En(t,e),En(t+"Capture",e)}function En(t,e){for(Pr[t]=e,t=0;t<e.length;t++)Ir.add(e[t])}var Ay=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]*$"),to={},eo={};function _y(t){return Iu.call(eo,t)?!0:Iu.call(to,t)?!1:Ay.test(t)?eo[t]=!0:(to[t]=!0,!1)}function bi(t,e,l){if(_y(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var n=e.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function Ei(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function Fe(t,e,l,n){if(n===null)t.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+n)}}function Ae(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function lo(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function xy(t,e,l){var n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(o){l=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function us(t){if(!t._valueTracker){var e=lo(t)?"checked":"value";t._valueTracker=xy(t,e,""+t[e])}}function no(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=lo(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}function Ti(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var My=/[\n"\\]/g;function _e(t){return t.replace(My,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function ss(t,e,l,n,a,i,o,h){t.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.type=o:t.removeAttribute("type"),e!=null?o==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ae(e)):t.value!==""+Ae(e)&&(t.value=""+Ae(e)):o!=="submit"&&o!=="reset"||t.removeAttribute("value"),e!=null?cs(t,o,Ae(e)):l!=null?cs(t,o,Ae(l)):n!=null&&t.removeAttribute("value"),a==null&&i!=null&&(t.defaultChecked=!!i),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.name=""+Ae(h):t.removeAttribute("name")}function ao(t,e,l,n,a,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){us(t);return}l=l!=null?""+Ae(l):"",e=e!=null?""+Ae(e):l,h||e===t.value||(t.value=e),t.defaultValue=e}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=h?t.checked:!!n,t.defaultChecked=!!n,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(t.name=o),us(t)}function cs(t,e,l){e==="number"&&Ti(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Tn(t,e,l,n){if(t=t.options,e){e={};for(var a=0;a<l.length;a++)e["$"+l[a]]=!0;for(l=0;l<t.length;l++)a=e.hasOwnProperty("$"+t[l].value),t[l].selected!==a&&(t[l].selected=a),a&&n&&(t[l].defaultSelected=!0)}else{for(l=""+Ae(l),e=null,a=0;a<t.length;a++){if(t[a].value===l){t[a].selected=!0,n&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function io(t,e,l){if(e!=null&&(e=""+Ae(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+Ae(l):""}function uo(t,e,l,n){if(e==null){if(n!=null){if(l!=null)throw Error(c(92));if(Le(n)){if(1<n.length)throw Error(c(93));n=n[0]}l=n}l==null&&(l=""),e=l}l=Ae(e),t.defaultValue=l,n=t.textContent,n===l&&n!==""&&n!==null&&(t.value=n),us(t)}function An(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var Cy=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 so(t,e,l){var n=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":n?t.setProperty(e,l):typeof l!="number"||l===0||Cy.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function co(t,e,l){if(e!=null&&typeof e!="object")throw Error(c(62));if(t=t.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||e!=null&&e.hasOwnProperty(n)||(n.indexOf("--")===0?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="");for(var a in e)n=e[a],e.hasOwnProperty(a)&&l[a]!==n&&so(t,a,n)}else for(var i in e)e.hasOwnProperty(i)&&so(t,i,e[i])}function rs(t){if(t.indexOf("-")===-1)return!1;switch(t){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 zy=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"]]),Oy=/^[\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 Ai(t){return Oy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ie(){}var os=null;function fs(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _n=null,xn=null;function ro(t){var e=Sn(t);if(e&&(t=e.stateNode)){var l=t[ie]||null;t:switch(t=e.stateNode,e.type){case"input":if(ss(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+_e(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var n=l[e];if(n!==t&&n.form===t.form){var a=n[ie]||null;if(!a)throw Error(c(90));ss(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<l.length;e++)n=l[e],n.form===t.form&&no(n)}break t;case"textarea":io(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&Tn(t,!!l.multiple,e,!1)}}}var hs=!1;function oo(t,e,l){if(hs)return t(e,l);hs=!0;try{var n=t(e);return n}finally{if(hs=!1,(_n!==null||xn!==null)&&(ou(),_n&&(e=_n,t=xn,xn=_n=null,ro(e),t)))for(e=0;e<t.length;e++)ro(t[e])}}function ma(t,e){var l=t.stateNode;if(l===null)return null;var n=l[ie]||null;if(n===null)return null;l=n[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(c(231,e,typeof l));return l}var Pe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ds=!1;if(Pe)try{var ya={};Object.defineProperty(ya,"passive",{get:function(){ds=!0}}),window.addEventListener("test",ya,ya),window.removeEventListener("test",ya,ya)}catch{ds=!1}var Sl=null,ms=null,_i=null;function fo(){if(_i)return _i;var t,e=ms,l=e.length,n,a="value"in Sl?Sl.value:Sl.textContent,i=a.length;for(t=0;t<l&&e[t]===a[t];t++);var o=l-t;for(n=1;n<=o&&e[l-n]===a[i-n];n++);return _i=a.slice(t,1<n?1-n:void 0)}function xi(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Mi(){return!0}function ho(){return!1}function ue(t){function e(l,n,a,i,o){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in t)t.hasOwnProperty(h)&&(l=t[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Mi:ho,this.isPropagationStopped=ho,this}return R(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Mi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Mi)},persist:function(){},isPersistent:Mi}),e}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ci=ue(Fl),ga=R({},Fl,{view:0,detail:0}),Dy=ue(ga),ys,gs,pa,zi=R({},ga,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vs,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==pa&&(pa&&t.type==="mousemove"?(ys=t.screenX-pa.screenX,gs=t.screenY-pa.screenY):gs=ys=0,pa=t),ys)},movementY:function(t){return"movementY"in t?t.movementY:gs}}),mo=ue(zi),wy=R({},zi,{dataTransfer:0}),Ry=ue(wy),Uy=R({},ga,{relatedTarget:0}),ps=ue(Uy),Ny=R({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),Hy=ue(Ny),By=R({},Fl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ly=ue(By),jy=R({},Fl,{data:0}),yo=ue(jy),qy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yy={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"},Xy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Xy[t])?!!e[t]:!1}function vs(){return Gy}var Qy=R({},ga,{key:function(t){if(t.key){var e=qy[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=xi(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Yy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vs,charCode:function(t){return t.type==="keypress"?xi(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?xi(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Ky=ue(Qy),Vy=R({},zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),go=ue(Vy),Zy=R({},ga,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vs}),Jy=ue(Zy),ky=R({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wy=ue(ky),$y=R({},zi,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Fy=ue($y),Iy=R({},Fl,{newState:0,oldState:0}),Py=ue(Iy),tg=[9,13,27,32],Ss=Pe&&"CompositionEvent"in window,va=null;Pe&&"documentMode"in document&&(va=document.documentMode);var eg=Pe&&"TextEvent"in window&&!va,po=Pe&&(!Ss||va&&8<va&&11>=va),vo=" ",So=!1;function bo(t,e){switch(t){case"keyup":return tg.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eo(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Mn=!1;function lg(t,e){switch(t){case"compositionend":return Eo(e);case"keypress":return e.which!==32?null:(So=!0,vo);case"textInput":return t=e.data,t===vo&&So?null:t;default:return null}}function ng(t,e){if(Mn)return t==="compositionend"||!Ss&&bo(t,e)?(t=fo(),_i=ms=Sl=null,Mn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return po&&e.locale!=="ko"?null:e.data;default:return null}}var ag={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 To(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!ag[t.type]:e==="textarea"}function Ao(t,e,l,n){_n?xn?xn.push(n):xn=[n]:_n=n,e=pu(e,"onChange"),0<e.length&&(l=new Ci("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var Sa=null,ba=null;function ig(t){ud(t,0)}function Oi(t){var e=da(t);if(no(e))return t}function _o(t,e){if(t==="change")return e}var xo=!1;if(Pe){var bs;if(Pe){var Es="oninput"in document;if(!Es){var Mo=document.createElement("div");Mo.setAttribute("oninput","return;"),Es=typeof Mo.oninput=="function"}bs=Es}else bs=!1;xo=bs&&(!document.documentMode||9<document.documentMode)}function Co(){Sa&&(Sa.detachEvent("onpropertychange",zo),ba=Sa=null)}function zo(t){if(t.propertyName==="value"&&Oi(ba)){var e=[];Ao(e,ba,t,fs(t)),oo(ig,e)}}function ug(t,e,l){t==="focusin"?(Co(),Sa=e,ba=l,Sa.attachEvent("onpropertychange",zo)):t==="focusout"&&Co()}function sg(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Oi(ba)}function cg(t,e){if(t==="click")return Oi(e)}function rg(t,e){if(t==="input"||t==="change")return Oi(e)}function og(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ge=typeof Object.is=="function"?Object.is:og;function Ea(t,e){if(ge(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),n=Object.keys(e);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!Iu.call(e,a)||!ge(t[a],e[a]))return!1}return!0}function Oo(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Do(t,e){var l=Oo(t);t=0;for(var n;l;){if(l.nodeType===3){if(n=t+l.textContent.length,t<=e&&n>=e)return{node:l,offset:e-t};t=n}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Oo(l)}}function wo(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?wo(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Ro(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ti(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Ti(t.document)}return e}function Ts(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var fg=Pe&&"documentMode"in document&&11>=document.documentMode,Cn=null,As=null,Ta=null,_s=!1;function Uo(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;_s||Cn==null||Cn!==Ti(n)||(n=Cn,"selectionStart"in n&&Ts(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ta&&Ea(Ta,n)||(Ta=n,n=pu(As,"onSelect"),0<n.length&&(e=new Ci("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=Cn)))}function Il(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var zn={animationend:Il("Animation","AnimationEnd"),animationiteration:Il("Animation","AnimationIteration"),animationstart:Il("Animation","AnimationStart"),transitionrun:Il("Transition","TransitionRun"),transitionstart:Il("Transition","TransitionStart"),transitioncancel:Il("Transition","TransitionCancel"),transitionend:Il("Transition","TransitionEnd")},xs={},No={};Pe&&(No=document.createElement("div").style,"AnimationEvent"in window||(delete zn.animationend.animation,delete zn.animationiteration.animation,delete zn.animationstart.animation),"TransitionEvent"in window||delete zn.transitionend.transition);function Pl(t){if(xs[t])return xs[t];if(!zn[t])return t;var e=zn[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in No)return xs[t]=e[l];return t}var Ho=Pl("animationend"),Bo=Pl("animationiteration"),Lo=Pl("animationstart"),hg=Pl("transitionrun"),dg=Pl("transitionstart"),mg=Pl("transitioncancel"),jo=Pl("transitionend"),qo=new Map,Ms="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(" ");Ms.push("scrollEnd");function je(t,e){qo.set(t,e),$l(e,[t])}var Di=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},xe=[],On=0,Cs=0;function wi(){for(var t=On,e=Cs=On=0;e<t;){var l=xe[e];xe[e++]=null;var n=xe[e];xe[e++]=null;var a=xe[e];xe[e++]=null;var i=xe[e];if(xe[e++]=null,n!==null&&a!==null){var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}i!==0&&Yo(l,a,i)}}function Ri(t,e,l,n){xe[On++]=t,xe[On++]=e,xe[On++]=l,xe[On++]=n,Cs|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function zs(t,e,l,n){return Ri(t,e,l,n),Ui(t)}function tn(t,e){return Ri(t,null,null,e),Ui(t)}function Yo(t,e,l){t.lanes|=l;var n=t.alternate;n!==null&&(n.lanes|=l);for(var a=!1,i=t.return;i!==null;)i.childLanes|=l,n=i.alternate,n!==null&&(n.childLanes|=l),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(a=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,a&&e!==null&&(a=31-ye(l),t=i.hiddenUpdates,n=t[a],n===null?t[a]=[e]:n.push(e),e.lane=l|536870912),i):null}function Ui(t){if(50<Ka)throw Ka=0,Lc=null,Error(c(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Dn={};function yg(t,e,l,n){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pe(t,e,l,n){return new yg(t,e,l,n)}function Os(t){return t=t.prototype,!(!t||!t.isReactComponent)}function tl(t,e){var l=t.alternate;return l===null?(l=pe(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Xo(t,e){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Ni(t,e,l,n,a,i){var o=0;if(n=t,typeof t=="function")Os(t)&&(o=1);else if(typeof t=="string")o=bp(t,l,L.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case Xe:return t=pe(31,l,e,a),t.elementType=Xe,t.lanes=i,t;case ut:return en(l.children,a,i,e);case Mt:o=8,a|=24;break;case Tt:return t=pe(12,l,e,a|2),t.elementType=Tt,t.lanes=i,t;case ne:return t=pe(13,l,e,a),t.elementType=ne,t.lanes=i,t;case Xt:return t=pe(19,l,e,a),t.elementType=Xt,t.lanes=i,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Nt:o=10;break t;case Ut:o=9;break t;case le:o=11;break t;case $:o=14;break t;case Ct:o=16,n=null;break t}o=29,l=Error(c(130,t===null?"null":typeof t,"")),n=null}return e=pe(o,l,e,a),e.elementType=t,e.type=n,e.lanes=i,e}function en(t,e,l,n){return t=pe(7,t,n,e),t.lanes=l,t}function Ds(t,e,l){return t=pe(6,t,null,e),t.lanes=l,t}function Go(t){var e=pe(18,null,null,0);return e.stateNode=t,e}function ws(t,e,l){return e=pe(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Qo=new WeakMap;function Me(t,e){if(typeof t=="object"&&t!==null){var l=Qo.get(t);return l!==void 0?l:(e={value:t,source:e,stack:Xr(e)},Qo.set(t,e),e)}return{value:t,source:e,stack:Xr(e)}}var wn=[],Rn=0,Hi=null,Aa=0,Ce=[],ze=0,bl=null,Qe=1,Ke="";function el(t,e){wn[Rn++]=Aa,wn[Rn++]=Hi,Hi=t,Aa=e}function Ko(t,e,l){Ce[ze++]=Qe,Ce[ze++]=Ke,Ce[ze++]=bl,bl=t;var n=Qe;t=Ke;var a=32-ye(n)-1;n&=~(1<<a),l+=1;var i=32-ye(e)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,Qe=1<<32-ye(e)+a|l<<a|n,Ke=i+t}else Qe=1<<i|l<<a|n,Ke=t}function Rs(t){t.return!==null&&(el(t,1),Ko(t,1,0))}function Us(t){for(;t===Hi;)Hi=wn[--Rn],wn[Rn]=null,Aa=wn[--Rn],wn[Rn]=null;for(;t===bl;)bl=Ce[--ze],Ce[ze]=null,Ke=Ce[--ze],Ce[ze]=null,Qe=Ce[--ze],Ce[ze]=null}function Vo(t,e){Ce[ze++]=Qe,Ce[ze++]=Ke,Ce[ze++]=bl,Qe=e.id,Ke=e.overflow,bl=t}var Zt=null,At=null,lt=!1,El=null,Oe=!1,Ns=Error(c(519));function Tl(t){var e=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _a(Me(e,t)),Ns}function Zo(t){var e=t.stateNode,l=t.type,n=t.memoizedProps;switch(e[Vt]=t,e[ie]=n,l){case"dialog":P("cancel",e),P("close",e);break;case"iframe":case"object":case"embed":P("load",e);break;case"video":case"audio":for(l=0;l<Za.length;l++)P(Za[l],e);break;case"source":P("error",e);break;case"img":case"image":case"link":P("error",e),P("load",e);break;case"details":P("toggle",e);break;case"input":P("invalid",e),ao(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":P("invalid",e);break;case"textarea":P("invalid",e),uo(e,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||n.suppressHydrationWarning===!0||od(e.textContent,l)?(n.popover!=null&&(P("beforetoggle",e),P("toggle",e)),n.onScroll!=null&&P("scroll",e),n.onScrollEnd!=null&&P("scrollend",e),n.onClick!=null&&(e.onclick=Ie),e=!0):e=!1,e||Tl(t,!0)}function Jo(t){for(Zt=t.return;Zt;)switch(Zt.tag){case 5:case 31:case 13:Oe=!1;return;case 27:case 3:Oe=!0;return;default:Zt=Zt.return}}function Un(t){if(t!==Zt)return!1;if(!lt)return Jo(t),lt=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Ic(t.type,t.memoizedProps)),l=!l),l&&At&&Tl(t),Jo(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));At=Sd(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));At=Sd(t)}else e===27?(e=At,Bl(t.type)?(t=nr,nr=null,At=t):At=e):At=Zt?we(t.stateNode.nextSibling):null;return!0}function ln(){At=Zt=null,lt=!1}function Hs(){var t=El;return t!==null&&(oe===null?oe=t:oe.push.apply(oe,t),El=null),t}function _a(t){El===null?El=[t]:El.push(t)}var Bs=v(null),nn=null,ll=null;function Al(t,e,l){N(Bs,e._currentValue),e._currentValue=l}function nl(t){t._currentValue=Bs.current,w(Bs)}function Ls(t,e,l){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===l)break;t=t.return}}function js(t,e,l,n){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var i=a.dependencies;if(i!==null){var o=a.child;i=i.firstContext;t:for(;i!==null;){var h=i;i=a;for(var m=0;m<e.length;m++)if(h.context===e[m]){i.lanes|=l,h=i.alternate,h!==null&&(h.lanes|=l),Ls(i.return,l,t),n||(o=null);break t}i=h.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(c(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),Ls(o,l,t),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function Nn(t,e,l,n){t=null;for(var a=e,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var h=a.type;ge(a.pendingProps.value,o.value)||(t!==null?t.push(h):t=[h])}}else if(a===rt.current){if(o=a.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(Fa):t=[Fa])}a=a.return}t!==null&&js(e,t,l,n),e.flags|=262144}function Bi(t){for(t=t.firstContext;t!==null;){if(!ge(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function an(t){nn=t,ll=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Jt(t){return ko(nn,t)}function Li(t,e){return nn===null&&an(t),ko(t,e)}function ko(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},ll===null){if(t===null)throw Error(c(308));ll=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else ll=ll.next=e;return l}var gg=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},pg=r.unstable_scheduleCallback,vg=r.unstable_NormalPriority,Ht={$$typeof:Nt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qs(){return{controller:new gg,data:new Map,refCount:0}}function xa(t){t.refCount--,t.refCount===0&&pg(vg,function(){t.controller.abort()})}var Ma=null,Ys=0,Hn=0,Bn=null;function Sg(t,e){if(Ma===null){var l=Ma=[];Ys=0,Hn=Qc(),Bn={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Ys++,e.then(Wo,Wo),e}function Wo(){if(--Ys===0&&Ma!==null){Bn!==null&&(Bn.status="fulfilled");var t=Ma;Ma=null,Hn=0,Bn=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function bg(t,e){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return t.then(function(){n.status="fulfilled",n.value=e;for(var a=0;a<l.length;a++)(0,l[a])(e)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var $o=z.S;z.S=function(t,e){Nh=de(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Sg(t,e),$o!==null&&$o(t,e)};var un=v(null);function Xs(){var t=un.current;return t!==null?t:vt.pooledCache}function ji(t,e){e===null?N(un,un.current):N(un,e.pool)}function Fo(){var t=Xs();return t===null?null:{parent:Ht._currentValue,pool:t}}var Ln=Error(c(460)),Gs=Error(c(474)),qi=Error(c(542)),Yi={then:function(){}};function Io(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Po(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(Ie,Ie),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ef(t),t;default:if(typeof e.status=="string")e.then(Ie,Ie);else{if(t=vt,t!==null&&100<t.shellSuspendCounter)throw Error(c(482));t=e,t.status="pending",t.then(function(n){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=n}},function(n){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=n}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ef(t),t}throw cn=e,Ln}}function sn(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(cn=l,Ln):l}}var cn=null;function tf(){if(cn===null)throw Error(c(459));var t=cn;return cn=null,t}function ef(t){if(t===Ln||t===qi)throw Error(c(483))}var jn=null,Ca=0;function Xi(t){var e=Ca;return Ca+=1,jn===null&&(jn=[]),Po(jn,t,e)}function za(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Gi(t,e){throw e.$$typeof===W?Error(c(525)):(t=Object.prototype.toString.call(e),Error(c(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function lf(t){function e(S,g){if(t){var T=S.deletions;T===null?(S.deletions=[g],S.flags|=16):T.push(g)}}function l(S,g){if(!t)return null;for(;g!==null;)e(S,g),g=g.sibling;return null}function n(S){for(var g=new Map;S!==null;)S.key!==null?g.set(S.key,S):g.set(S.index,S),S=S.sibling;return g}function a(S,g){return S=tl(S,g),S.index=0,S.sibling=null,S}function i(S,g,T){return S.index=T,t?(T=S.alternate,T!==null?(T=T.index,T<g?(S.flags|=67108866,g):T):(S.flags|=67108866,g)):(S.flags|=1048576,g)}function o(S){return t&&S.alternate===null&&(S.flags|=67108866),S}function h(S,g,T,O){return g===null||g.tag!==6?(g=Ds(T,S.mode,O),g.return=S,g):(g=a(g,T),g.return=S,g)}function m(S,g,T,O){var q=T.type;return q===ut?M(S,g,T.props.children,O,T.key):g!==null&&(g.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===Ct&&sn(q)===g.type)?(g=a(g,T.props),za(g,T),g.return=S,g):(g=Ni(T.type,T.key,T.props,null,S.mode,O),za(g,T),g.return=S,g)}function A(S,g,T,O){return g===null||g.tag!==4||g.stateNode.containerInfo!==T.containerInfo||g.stateNode.implementation!==T.implementation?(g=ws(T,S.mode,O),g.return=S,g):(g=a(g,T.children||[]),g.return=S,g)}function M(S,g,T,O,q){return g===null||g.tag!==7?(g=en(T,S.mode,O,q),g.return=S,g):(g=a(g,T),g.return=S,g)}function D(S,g,T){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Ds(""+g,S.mode,T),g.return=S,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ct:return T=Ni(g.type,g.key,g.props,null,S.mode,T),za(T,g),T.return=S,T;case Et:return g=ws(g,S.mode,T),g.return=S,g;case Ct:return g=sn(g),D(S,g,T)}if(Le(g)||ae(g))return g=en(g,S.mode,T,null),g.return=S,g;if(typeof g.then=="function")return D(S,Xi(g),T);if(g.$$typeof===Nt)return D(S,Li(S,g),T);Gi(S,g)}return null}function _(S,g,T,O){var q=g!==null?g.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return q!==null?null:h(S,g,""+T,O);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ct:return T.key===q?m(S,g,T,O):null;case Et:return T.key===q?A(S,g,T,O):null;case Ct:return T=sn(T),_(S,g,T,O)}if(Le(T)||ae(T))return q!==null?null:M(S,g,T,O,null);if(typeof T.then=="function")return _(S,g,Xi(T),O);if(T.$$typeof===Nt)return _(S,g,Li(S,T),O);Gi(S,T)}return null}function x(S,g,T,O,q){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return S=S.get(T)||null,h(g,S,""+O,q);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case ct:return S=S.get(O.key===null?T:O.key)||null,m(g,S,O,q);case Et:return S=S.get(O.key===null?T:O.key)||null,A(g,S,O,q);case Ct:return O=sn(O),x(S,g,T,O,q)}if(Le(O)||ae(O))return S=S.get(T)||null,M(g,S,O,q,null);if(typeof O.then=="function")return x(S,g,T,Xi(O),q);if(O.$$typeof===Nt)return x(S,g,T,Li(g,O),q);Gi(g,O)}return null}function B(S,g,T,O){for(var q=null,nt=null,j=g,k=g=0,et=null;j!==null&&k<T.length;k++){j.index>k?(et=j,j=null):et=j.sibling;var at=_(S,j,T[k],O);if(at===null){j===null&&(j=et);break}t&&j&&at.alternate===null&&e(S,j),g=i(at,g,k),nt===null?q=at:nt.sibling=at,nt=at,j=et}if(k===T.length)return l(S,j),lt&&el(S,k),q;if(j===null){for(;k<T.length;k++)j=D(S,T[k],O),j!==null&&(g=i(j,g,k),nt===null?q=j:nt.sibling=j,nt=j);return lt&&el(S,k),q}for(j=n(j);k<T.length;k++)et=x(j,S,k,T[k],O),et!==null&&(t&&et.alternate!==null&&j.delete(et.key===null?k:et.key),g=i(et,g,k),nt===null?q=et:nt.sibling=et,nt=et);return t&&j.forEach(function(Xl){return e(S,Xl)}),lt&&el(S,k),q}function X(S,g,T,O){if(T==null)throw Error(c(151));for(var q=null,nt=null,j=g,k=g=0,et=null,at=T.next();j!==null&&!at.done;k++,at=T.next()){j.index>k?(et=j,j=null):et=j.sibling;var Xl=_(S,j,at.value,O);if(Xl===null){j===null&&(j=et);break}t&&j&&Xl.alternate===null&&e(S,j),g=i(Xl,g,k),nt===null?q=Xl:nt.sibling=Xl,nt=Xl,j=et}if(at.done)return l(S,j),lt&&el(S,k),q;if(j===null){for(;!at.done;k++,at=T.next())at=D(S,at.value,O),at!==null&&(g=i(at,g,k),nt===null?q=at:nt.sibling=at,nt=at);return lt&&el(S,k),q}for(j=n(j);!at.done;k++,at=T.next())at=x(j,S,k,at.value,O),at!==null&&(t&&at.alternate!==null&&j.delete(at.key===null?k:at.key),g=i(at,g,k),nt===null?q=at:nt.sibling=at,nt=at);return t&&j.forEach(function(wp){return e(S,wp)}),lt&&el(S,k),q}function gt(S,g,T,O){if(typeof T=="object"&&T!==null&&T.type===ut&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ct:t:{for(var q=T.key;g!==null;){if(g.key===q){if(q=T.type,q===ut){if(g.tag===7){l(S,g.sibling),O=a(g,T.props.children),O.return=S,S=O;break t}}else if(g.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===Ct&&sn(q)===g.type){l(S,g.sibling),O=a(g,T.props),za(O,T),O.return=S,S=O;break t}l(S,g);break}else e(S,g);g=g.sibling}T.type===ut?(O=en(T.props.children,S.mode,O,T.key),O.return=S,S=O):(O=Ni(T.type,T.key,T.props,null,S.mode,O),za(O,T),O.return=S,S=O)}return o(S);case Et:t:{for(q=T.key;g!==null;){if(g.key===q)if(g.tag===4&&g.stateNode.containerInfo===T.containerInfo&&g.stateNode.implementation===T.implementation){l(S,g.sibling),O=a(g,T.children||[]),O.return=S,S=O;break t}else{l(S,g);break}else e(S,g);g=g.sibling}O=ws(T,S.mode,O),O.return=S,S=O}return o(S);case Ct:return T=sn(T),gt(S,g,T,O)}if(Le(T))return B(S,g,T,O);if(ae(T)){if(q=ae(T),typeof q!="function")throw Error(c(150));return T=q.call(T),X(S,g,T,O)}if(typeof T.then=="function")return gt(S,g,Xi(T),O);if(T.$$typeof===Nt)return gt(S,g,Li(S,T),O);Gi(S,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,g!==null&&g.tag===6?(l(S,g.sibling),O=a(g,T),O.return=S,S=O):(l(S,g),O=Ds(T,S.mode,O),O.return=S,S=O),o(S)):l(S,g)}return function(S,g,T,O){try{Ca=0;var q=gt(S,g,T,O);return jn=null,q}catch(j){if(j===Ln||j===qi)throw j;var nt=pe(29,j,null,S.mode);return nt.lanes=O,nt.return=S,nt}finally{}}}var rn=lf(!0),nf=lf(!1),_l=!1;function Qs(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ks(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function xl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ml(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(st&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=Ui(t),Yo(t,null,l),e}return Ri(t,n,e,l),Ui(t)}function Oa(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Jr(t,l)}}function Vs(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?a=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?a=i=e:i=i.next=e}else a=i=e;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var Zs=!1;function Da(){if(Zs){var t=Bn;if(t!==null)throw t}}function wa(t,e,l,n){Zs=!1;var a=t.updateQueue;_l=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var m=h,A=m.next;m.next=null,o===null?i=A:o.next=A,o=m;var M=t.alternate;M!==null&&(M=M.updateQueue,h=M.lastBaseUpdate,h!==o&&(h===null?M.firstBaseUpdate=A:h.next=A,M.lastBaseUpdate=m))}if(i!==null){var D=a.baseState;o=0,M=A=m=null,h=i;do{var _=h.lane&-536870913,x=_!==h.lane;if(x?(tt&_)===_:(n&_)===_){_!==0&&_===Hn&&(Zs=!0),M!==null&&(M=M.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});t:{var B=t,X=h;_=e;var gt=l;switch(X.tag){case 1:if(B=X.payload,typeof B=="function"){D=B.call(gt,D,_);break t}D=B;break t;case 3:B.flags=B.flags&-65537|128;case 0:if(B=X.payload,_=typeof B=="function"?B.call(gt,D,_):B,_==null)break t;D=R({},D,_);break t;case 2:_l=!0}}_=h.callback,_!==null&&(t.flags|=64,x&&(t.flags|=8192),x=a.callbacks,x===null?a.callbacks=[_]:x.push(_))}else x={lane:_,tag:h.tag,payload:h.payload,callback:h.callback,next:null},M===null?(A=M=x,m=D):M=M.next=x,o|=_;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;x=h,h=x.next,x.next=null,a.lastBaseUpdate=x,a.shared.pending=null}}while(!0);M===null&&(m=D),a.baseState=m,a.firstBaseUpdate=A,a.lastBaseUpdate=M,i===null&&(a.shared.lanes=0),wl|=o,t.lanes=o,t.memoizedState=D}}function af(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function uf(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)af(l[t],e)}var qn=v(null),Qi=v(0);function sf(t,e){t=hl,N(Qi,t),N(qn,e),hl=t|e.baseLanes}function Js(){N(Qi,hl),N(qn,qn.current)}function ks(){hl=Qi.current,w(qn),w(Qi)}var ve=v(null),De=null;function Cl(t){var e=t.alternate;N(wt,wt.current&1),N(ve,t),De===null&&(e===null||qn.current!==null||e.memoizedState!==null)&&(De=t)}function Ws(t){N(wt,wt.current),N(ve,t),De===null&&(De=t)}function cf(t){t.tag===22?(N(wt,wt.current),N(ve,t),De===null&&(De=t)):zl()}function zl(){N(wt,wt.current),N(ve,ve.current)}function Se(t){w(ve),De===t&&(De=null),w(wt)}var wt=v(0);function Ki(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||er(l)||lr(l)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var al=0,J=null,mt=null,Bt=null,Vi=!1,Yn=!1,on=!1,Zi=0,Ra=0,Xn=null,Eg=0;function zt(){throw Error(c(321))}function $s(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!ge(t[l],e[l]))return!1;return!0}function Fs(t,e,l,n,a,i){return al=i,J=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,z.H=t===null||t.memoizedState===null?Vf:hc,on=!1,i=l(n,a),on=!1,Yn&&(i=of(e,l,n,a)),rf(t),i}function rf(t){z.H=Ha;var e=mt!==null&&mt.next!==null;if(al=0,Bt=mt=J=null,Vi=!1,Ra=0,Xn=null,e)throw Error(c(300));t===null||Lt||(t=t.dependencies,t!==null&&Bi(t)&&(Lt=!0))}function of(t,e,l,n){J=t;var a=0;do{if(Yn&&(Xn=null),Ra=0,Yn=!1,25<=a)throw Error(c(301));if(a+=1,Bt=mt=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}z.H=Zf,i=e(l,n)}while(Yn);return i}function Tg(){var t=z.H,e=t.useState()[0];return e=typeof e.then=="function"?Ua(e):e,t=t.useState()[0],(mt!==null?mt.memoizedState:null)!==t&&(J.flags|=1024),e}function Is(){var t=Zi!==0;return Zi=0,t}function Ps(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function tc(t){if(Vi){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Vi=!1}al=0,Bt=mt=J=null,Yn=!1,Ra=Zi=0,Xn=null}function te(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?J.memoizedState=Bt=t:Bt=Bt.next=t,Bt}function Rt(){if(mt===null){var t=J.alternate;t=t!==null?t.memoizedState:null}else t=mt.next;var e=Bt===null?J.memoizedState:Bt.next;if(e!==null)Bt=e,mt=t;else{if(t===null)throw J.alternate===null?Error(c(467)):Error(c(310));mt=t,t={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Bt===null?J.memoizedState=Bt=t:Bt=Bt.next=t}return Bt}function Ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ua(t){var e=Ra;return Ra+=1,Xn===null&&(Xn=[]),t=Po(Xn,t,e),e=J,(Bt===null?e.memoizedState:Bt.next)===null&&(e=e.alternate,z.H=e===null||e.memoizedState===null?Vf:hc),t}function ki(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ua(t);if(t.$$typeof===Nt)return Jt(t)}throw Error(c(438,String(t)))}function ec(t){var e=null,l=J.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var n=J.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(e={data:n.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=Ji(),J.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),n=0;n<t;n++)l[n]=gn;return e.index++,l}function il(t,e){return typeof e=="function"?e(t):e}function Wi(t){var e=Rt();return lc(e,mt,t)}function lc(t,e,l){var n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=l;var a=t.baseQueue,i=n.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}e.baseQueue=a=i,n.pending=null}if(i=t.baseState,a===null)t.memoizedState=i;else{e=a.next;var h=o=null,m=null,A=e,M=!1;do{var D=A.lane&-536870913;if(D!==A.lane?(tt&D)===D:(al&D)===D){var _=A.revertLane;if(_===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),D===Hn&&(M=!0);else if((al&_)===_){A=A.next,_===Hn&&(M=!0);continue}else D={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},m===null?(h=m=D,o=i):m=m.next=D,J.lanes|=_,wl|=_;D=A.action,on&&l(i,D),i=A.hasEagerState?A.eagerState:l(i,D)}else _={lane:D,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},m===null?(h=m=_,o=i):m=m.next=_,J.lanes|=D,wl|=D;A=A.next}while(A!==null&&A!==e);if(m===null?o=i:m.next=h,!ge(i,t.memoizedState)&&(Lt=!0,M&&(l=Bn,l!==null)))throw l;t.memoizedState=i,t.baseState=o,t.baseQueue=m,n.lastRenderedState=i}return a===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function nc(t){var e=Rt(),l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=t;var n=l.dispatch,a=l.pending,i=e.memoizedState;if(a!==null){l.pending=null;var o=a=a.next;do i=t(i,o.action),o=o.next;while(o!==a);ge(i,e.memoizedState)||(Lt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),l.lastRenderedState=i}return[i,n]}function ff(t,e,l){var n=J,a=Rt(),i=lt;if(i){if(l===void 0)throw Error(c(407));l=l()}else l=e();var o=!ge((mt||a).memoizedState,l);if(o&&(a.memoizedState=l,Lt=!0),a=a.queue,uc(mf.bind(null,n,a,t),[t]),a.getSnapshot!==e||o||Bt!==null&&Bt.memoizedState.tag&1){if(n.flags|=2048,Gn(9,{destroy:void 0},df.bind(null,n,a,l,e),null),vt===null)throw Error(c(349));i||(al&127)!==0||hf(n,e,l)}return l}function hf(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=J.updateQueue,e===null?(e=Ji(),J.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function df(t,e,l,n){e.value=l,e.getSnapshot=n,yf(e)&&gf(t)}function mf(t,e,l){return l(function(){yf(e)&&gf(t)})}function yf(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!ge(t,l)}catch{return!0}}function gf(t){var e=tn(t,2);e!==null&&fe(e,t,2)}function ac(t){var e=te();if(typeof t=="function"){var l=t;if(t=l(),on){pl(!0);try{l()}finally{pl(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:t},e}function pf(t,e,l,n){return t.baseState=l,lc(t,mt,typeof n=="function"?n:il)}function Ag(t,e,l,n,a){if(Ii(t))throw Error(c(485));if(t=e.action,t!==null){var i={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};z.T!==null?l(!0):i.isTransition=!1,n(i),l=e.pending,l===null?(i.next=e.pending=i,vf(e,i)):(i.next=l.next,e.pending=l.next=i)}}function vf(t,e){var l=e.action,n=e.payload,a=t.state;if(e.isTransition){var i=z.T,o={};z.T=o;try{var h=l(a,n),m=z.S;m!==null&&m(o,h),Sf(t,e,h)}catch(A){ic(t,e,A)}finally{i!==null&&o.types!==null&&(i.types=o.types),z.T=i}}else try{i=l(a,n),Sf(t,e,i)}catch(A){ic(t,e,A)}}function Sf(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){bf(t,e,n)},function(n){return ic(t,e,n)}):bf(t,e,l)}function bf(t,e,l){e.status="fulfilled",e.value=l,Ef(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,vf(t,l)))}function ic(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,Ef(e),e=e.next;while(e!==n)}t.action=null}function Ef(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Tf(t,e){return e}function Af(t,e){if(lt){var l=vt.formState;if(l!==null){t:{var n=J;if(lt){if(At){e:{for(var a=At,i=Oe;a.nodeType!==8;){if(!i){a=null;break e}if(a=we(a.nextSibling),a===null){a=null;break e}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){At=we(a.nextSibling),n=a.data==="F!";break t}}Tl(n)}n=!1}n&&(e=l[0])}}return l=te(),l.memoizedState=l.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tf,lastRenderedState:e},l.queue=n,l=Gf.bind(null,J,n),n.dispatch=l,n=ac(!1),i=fc.bind(null,J,!1,n.queue),n=te(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=Ag.bind(null,J,a,i,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function _f(t){var e=Rt();return xf(e,mt,t)}function xf(t,e,l){if(e=lc(t,e,Tf)[0],t=Wi(il)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=Ua(e)}catch(o){throw o===Ln?qi:o}else n=e;e=Rt();var a=e.queue,i=a.dispatch;return l!==e.memoizedState&&(J.flags|=2048,Gn(9,{destroy:void 0},_g.bind(null,a,l),null)),[n,i,t]}function _g(t,e){t.action=e}function Mf(t){var e=Rt(),l=mt;if(l!==null)return xf(e,l,t);Rt(),e=e.memoizedState,l=Rt();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function Gn(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=J.updateQueue,e===null&&(e=Ji(),J.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(n=l.next,l.next=t,t.next=n,e.lastEffect=t),t}function Cf(){return Rt().memoizedState}function $i(t,e,l,n){var a=te();J.flags|=t,a.memoizedState=Gn(1|e,{destroy:void 0},l,n===void 0?null:n)}function Fi(t,e,l,n){var a=Rt();n=n===void 0?null:n;var i=a.memoizedState.inst;mt!==null&&n!==null&&$s(n,mt.memoizedState.deps)?a.memoizedState=Gn(e,i,l,n):(J.flags|=t,a.memoizedState=Gn(1|e,i,l,n))}function zf(t,e){$i(8390656,8,t,e)}function uc(t,e){Fi(2048,8,t,e)}function xg(t){J.flags|=4;var e=J.updateQueue;if(e===null)e=Ji(),J.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function Of(t){var e=Rt().memoizedState;return xg({ref:e,nextImpl:t}),function(){if((st&2)!==0)throw Error(c(440));return e.impl.apply(void 0,arguments)}}function Df(t,e){return Fi(4,2,t,e)}function wf(t,e){return Fi(4,4,t,e)}function Rf(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Uf(t,e,l){l=l!=null?l.concat([t]):null,Fi(4,4,Rf.bind(null,e,t),l)}function sc(){}function Nf(t,e){var l=Rt();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&$s(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function Hf(t,e){var l=Rt();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&$s(e,n[1]))return n[0];if(n=t(),on){pl(!0);try{t()}finally{pl(!1)}}return l.memoizedState=[n,e],n}function cc(t,e,l){return l===void 0||(al&1073741824)!==0&&(tt&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=Bh(),J.lanes|=t,wl|=t,l)}function Bf(t,e,l,n){return ge(l,e)?l:qn.current!==null?(t=cc(t,l,n),ge(t,e)||(Lt=!0),t):(al&42)===0||(al&1073741824)!==0&&(tt&261930)===0?(Lt=!0,t.memoizedState=l):(t=Bh(),J.lanes|=t,wl|=t,e)}function Lf(t,e,l,n,a){var i=U.p;U.p=i!==0&&8>i?i:8;var o=z.T,h={};z.T=h,fc(t,!1,e,l);try{var m=a(),A=z.S;if(A!==null&&A(h,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var M=bg(m,n);Na(t,e,M,Te(t))}else Na(t,e,n,Te(t))}catch(D){Na(t,e,{then:function(){},status:"rejected",reason:D},Te())}finally{U.p=i,o!==null&&h.types!==null&&(o.types=h.types),z.T=o}}function Mg(){}function rc(t,e,l,n){if(t.tag!==5)throw Error(c(476));var a=jf(t).queue;Lf(t,a,e,Q,l===null?Mg:function(){return qf(t),l(n)})}function jf(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:Q},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function qf(t){var e=jf(t);e.next===null&&(e=t.alternate.memoizedState),Na(t,e.next.queue,{},Te())}function oc(){return Jt(Fa)}function Yf(){return Rt().memoizedState}function Xf(){return Rt().memoizedState}function Cg(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=Te();t=xl(l);var n=Ml(e,t,l);n!==null&&(fe(n,e,l),Oa(n,e,l)),e={cache:qs()},t.payload=e;return}e=e.return}}function zg(t,e,l){var n=Te();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ii(t)?Qf(e,l):(l=zs(t,e,l,n),l!==null&&(fe(l,t,n),Kf(l,e,n)))}function Gf(t,e,l){var n=Te();Na(t,e,l,n)}function Na(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ii(t))Qf(e,a);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,h=i(o,l);if(a.hasEagerState=!0,a.eagerState=h,ge(h,o))return Ri(t,e,a,0),vt===null&&wi(),!1}catch{}finally{}if(l=zs(t,e,a,n),l!==null)return fe(l,t,n),Kf(l,e,n),!0}return!1}function fc(t,e,l,n){if(n={lane:2,revertLane:Qc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ii(t)){if(e)throw Error(c(479))}else e=zs(t,l,n,2),e!==null&&fe(e,t,2)}function Ii(t){var e=t.alternate;return t===J||e!==null&&e===J}function Qf(t,e){Yn=Vi=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Kf(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Jr(t,l)}}var Ha={readContext:Jt,use:ki,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};Ha.useEffectEvent=zt;var Vf={readContext:Jt,use:ki,useCallback:function(t,e){return te().memoizedState=[t,e===void 0?null:e],t},useContext:Jt,useEffect:zf,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,$i(4194308,4,Rf.bind(null,e,t),l)},useLayoutEffect:function(t,e){return $i(4194308,4,t,e)},useInsertionEffect:function(t,e){$i(4,2,t,e)},useMemo:function(t,e){var l=te();e=e===void 0?null:e;var n=t();if(on){pl(!0);try{t()}finally{pl(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=te();if(l!==void 0){var a=l(e);if(on){pl(!0);try{l(e)}finally{pl(!1)}}}else a=e;return n.memoizedState=n.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},n.queue=t,t=t.dispatch=zg.bind(null,J,t),[n.memoizedState,t]},useRef:function(t){var e=te();return t={current:t},e.memoizedState=t},useState:function(t){t=ac(t);var e=t.queue,l=Gf.bind(null,J,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:sc,useDeferredValue:function(t,e){var l=te();return cc(l,t,e)},useTransition:function(){var t=ac(!1);return t=Lf.bind(null,J,t.queue,!0,!1),te().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=J,a=te();if(lt){if(l===void 0)throw Error(c(407));l=l()}else{if(l=e(),vt===null)throw Error(c(349));(tt&127)!==0||hf(n,e,l)}a.memoizedState=l;var i={value:l,getSnapshot:e};return a.queue=i,zf(mf.bind(null,n,i,t),[t]),n.flags|=2048,Gn(9,{destroy:void 0},df.bind(null,n,i,l,e),null),l},useId:function(){var t=te(),e=vt.identifierPrefix;if(lt){var l=Ke,n=Qe;l=(n&~(1<<32-ye(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Zi++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=Eg++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:oc,useFormState:Af,useActionState:Af,useOptimistic:function(t){var e=te();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=fc.bind(null,J,!0,l),l.dispatch=e,[t,e]},useMemoCache:ec,useCacheRefresh:function(){return te().memoizedState=Cg.bind(null,J)},useEffectEvent:function(t){var e=te(),l={impl:t};return e.memoizedState=l,function(){if((st&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},hc={readContext:Jt,use:ki,useCallback:Nf,useContext:Jt,useEffect:uc,useImperativeHandle:Uf,useInsertionEffect:Df,useLayoutEffect:wf,useMemo:Hf,useReducer:Wi,useRef:Cf,useState:function(){return Wi(il)},useDebugValue:sc,useDeferredValue:function(t,e){var l=Rt();return Bf(l,mt.memoizedState,t,e)},useTransition:function(){var t=Wi(il)[0],e=Rt().memoizedState;return[typeof t=="boolean"?t:Ua(t),e]},useSyncExternalStore:ff,useId:Yf,useHostTransitionStatus:oc,useFormState:_f,useActionState:_f,useOptimistic:function(t,e){var l=Rt();return pf(l,mt,t,e)},useMemoCache:ec,useCacheRefresh:Xf};hc.useEffectEvent=Of;var Zf={readContext:Jt,use:ki,useCallback:Nf,useContext:Jt,useEffect:uc,useImperativeHandle:Uf,useInsertionEffect:Df,useLayoutEffect:wf,useMemo:Hf,useReducer:nc,useRef:Cf,useState:function(){return nc(il)},useDebugValue:sc,useDeferredValue:function(t,e){var l=Rt();return mt===null?cc(l,t,e):Bf(l,mt.memoizedState,t,e)},useTransition:function(){var t=nc(il)[0],e=Rt().memoizedState;return[typeof t=="boolean"?t:Ua(t),e]},useSyncExternalStore:ff,useId:Yf,useHostTransitionStatus:oc,useFormState:Mf,useActionState:Mf,useOptimistic:function(t,e){var l=Rt();return mt!==null?pf(l,mt,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:ec,useCacheRefresh:Xf};Zf.useEffectEvent=Of;function dc(t,e,l,n){e=t.memoizedState,l=l(n,e),l=l==null?e:R({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var mc={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=Te(),a=xl(n);a.payload=e,l!=null&&(a.callback=l),e=Ml(t,a,n),e!==null&&(fe(e,t,n),Oa(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=Te(),a=xl(n);a.tag=1,a.payload=e,l!=null&&(a.callback=l),e=Ml(t,a,n),e!==null&&(fe(e,t,n),Oa(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=Te(),n=xl(l);n.tag=2,e!=null&&(n.callback=e),e=Ml(t,n,l),e!==null&&(fe(e,t,l),Oa(e,t,l))}};function Jf(t,e,l,n,a,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,o):e.prototype&&e.prototype.isPureReactComponent?!Ea(l,n)||!Ea(a,i):!0}function kf(t,e,l,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,n),e.state!==t&&mc.enqueueReplaceState(e,e.state,null)}function fn(t,e){var l=e;if("ref"in e){l={};for(var n in e)n!=="ref"&&(l[n]=e[n])}if(t=t.defaultProps){l===e&&(l=R({},l));for(var a in t)l[a]===void 0&&(l[a]=t[a])}return l}function Wf(t){Di(t)}function $f(t){console.error(t)}function Ff(t){Di(t)}function Pi(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function If(t,e,l){try{var n=t.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function yc(t,e,l){return l=xl(l),l.tag=3,l.payload={element:null},l.callback=function(){Pi(t,e)},l}function Pf(t){return t=xl(t),t.tag=3,t}function th(t,e,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var i=n.value;t.payload=function(){return a(i)},t.callback=function(){If(e,l,n)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(t.callback=function(){If(e,l,n),typeof a!="function"&&(Rl===null?Rl=new Set([this]):Rl.add(this));var h=n.stack;this.componentDidCatch(n.value,{componentStack:h!==null?h:""})})}function Og(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&Nn(e,l,a,!0),l=ve.current,l!==null){switch(l.tag){case 31:case 13:return De===null?fu():l.alternate===null&&Ot===0&&(Ot=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===Yi?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),Yc(t,n,a)),!1;case 22:return l.flags|=65536,n===Yi?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([n]):l.add(n)),Yc(t,n,a)),!1}throw Error(c(435,l.tag))}return Yc(t,n,a),fu(),!1}if(lt)return e=ve.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==Ns&&(t=Error(c(422),{cause:n}),_a(Me(t,l)))):(n!==Ns&&(e=Error(c(423),{cause:n}),_a(Me(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=Me(n,l),a=yc(t.stateNode,n,a),Vs(t,a),Ot!==4&&(Ot=2)),!1;var i=Error(c(520),{cause:n});if(i=Me(i,l),Qa===null?Qa=[i]:Qa.push(i),Ot!==4&&(Ot=2),e===null)return!0;n=Me(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=yc(l.stateNode,n,t),Vs(l,t),!1;case 1:if(e=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Rl===null||!Rl.has(i))))return l.flags|=65536,a&=-a,l.lanes|=a,a=Pf(a),th(a,t,l,n),Vs(l,a),!1}l=l.return}while(l!==null);return!1}var gc=Error(c(461)),Lt=!1;function kt(t,e,l,n){e.child=t===null?nf(e,null,l,n):rn(e,t.child,l,n)}function eh(t,e,l,n,a){l=l.render;var i=e.ref;if("ref"in n){var o={};for(var h in n)h!=="ref"&&(o[h]=n[h])}else o=n;return an(e),n=Fs(t,e,l,o,i,a),h=Is(),t!==null&&!Lt?(Ps(t,e,a),ul(t,e,a)):(lt&&h&&Rs(e),e.flags|=1,kt(t,e,n,a),e.child)}function lh(t,e,l,n,a){if(t===null){var i=l.type;return typeof i=="function"&&!Os(i)&&i.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=i,nh(t,e,i,n,a)):(t=Ni(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!_c(t,a)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:Ea,l(o,n)&&t.ref===e.ref)return ul(t,e,a)}return e.flags|=1,t=tl(i,n),t.ref=e.ref,t.return=e,e.child=t}function nh(t,e,l,n,a){if(t!==null){var i=t.memoizedProps;if(Ea(i,n)&&t.ref===e.ref)if(Lt=!1,e.pendingProps=n=i,_c(t,a))(t.flags&131072)!==0&&(Lt=!0);else return e.lanes=t.lanes,ul(t,e,a)}return pc(t,e,l,n,a)}function ah(t,e,l,n){var a=n.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((e.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,t!==null){for(n=e.child=t.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~i}else n=0,e.child=null;return ih(t,e,i,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&ji(e,i!==null?i.cachePool:null),i!==null?sf(e,i):Js(),cf(e);else return n=e.lanes=536870912,ih(t,e,i!==null?i.baseLanes|l:l,l,n)}else i!==null?(ji(e,i.cachePool),sf(e,i),zl(),e.memoizedState=null):(t!==null&&ji(e,null),Js(),zl());return kt(t,e,a,l),e.child}function Ba(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function ih(t,e,l,n,a){var i=Xs();return i=i===null?null:{parent:Ht._currentValue,pool:i},e.memoizedState={baseLanes:l,cachePool:i},t!==null&&ji(e,null),Js(),cf(e),t!==null&&Nn(t,e,n,!0),e.childLanes=a,null}function tu(t,e){return e=lu({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function uh(t,e,l){return rn(e,t.child,null,l),t=tu(e,e.pendingProps),t.flags|=2,Se(e),e.memoizedState=null,t}function Dg(t,e,l){var n=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(lt){if(n.mode==="hidden")return t=tu(e,n),e.lanes=536870912,Ba(null,t);if(Ws(e),(t=At)?(t=vd(t,Oe),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:bl!==null?{id:Qe,overflow:Ke}:null,retryLane:536870912,hydrationErrors:null},l=Go(t),l.return=e,e.child=l,Zt=e,At=null)):t=null,t===null)throw Tl(e);return e.lanes=536870912,null}return tu(e,n)}var i=t.memoizedState;if(i!==null){var o=i.dehydrated;if(Ws(e),a)if(e.flags&256)e.flags&=-257,e=uh(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(c(558));else if(Lt||Nn(t,e,l,!1),a=(l&t.childLanes)!==0,Lt||a){if(n=vt,n!==null&&(o=kr(n,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,tn(t,o),fe(n,t,o),gc;fu(),e=uh(t,e,l)}else t=i.treeContext,At=we(o.nextSibling),Zt=e,lt=!0,El=null,Oe=!1,t!==null&&Vo(e,t),e=tu(e,n),e.flags|=4096;return e}return t=tl(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function eu(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function pc(t,e,l,n,a){return an(e),l=Fs(t,e,l,n,void 0,a),n=Is(),t!==null&&!Lt?(Ps(t,e,a),ul(t,e,a)):(lt&&n&&Rs(e),e.flags|=1,kt(t,e,l,a),e.child)}function sh(t,e,l,n,a,i){return an(e),e.updateQueue=null,l=of(e,n,l,a),rf(t),n=Is(),t!==null&&!Lt?(Ps(t,e,i),ul(t,e,i)):(lt&&n&&Rs(e),e.flags|=1,kt(t,e,l,i),e.child)}function ch(t,e,l,n,a){if(an(e),e.stateNode===null){var i=Dn,o=l.contextType;typeof o=="object"&&o!==null&&(i=Jt(o)),i=new l(n,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=mc,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=n,i.state=e.memoizedState,i.refs={},Qs(e),o=l.contextType,i.context=typeof o=="object"&&o!==null?Jt(o):Dn,i.state=e.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(dc(e,l,o,n),i.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&mc.enqueueReplaceState(i,i.state,null),wa(e,n,i,a),Da(),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){i=e.stateNode;var h=e.memoizedProps,m=fn(l,h);i.props=m;var A=i.context,M=l.contextType;o=Dn,typeof M=="object"&&M!==null&&(o=Jt(M));var D=l.getDerivedStateFromProps;M=typeof D=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=e.pendingProps!==h,M||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||A!==o)&&kf(e,i,n,o),_l=!1;var _=e.memoizedState;i.state=_,wa(e,n,i,a),Da(),A=e.memoizedState,h||_!==A||_l?(typeof D=="function"&&(dc(e,l,D,n),A=e.memoizedState),(m=_l||Jf(e,l,m,n,_,A,o))?(M||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=A),i.props=n,i.state=A,i.context=o,n=m):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{i=e.stateNode,Ks(t,e),o=e.memoizedProps,M=fn(l,o),i.props=M,D=e.pendingProps,_=i.context,A=l.contextType,m=Dn,typeof A=="object"&&A!==null&&(m=Jt(A)),h=l.getDerivedStateFromProps,(A=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==D||_!==m)&&kf(e,i,n,m),_l=!1,_=e.memoizedState,i.state=_,wa(e,n,i,a),Da();var x=e.memoizedState;o!==D||_!==x||_l||t!==null&&t.dependencies!==null&&Bi(t.dependencies)?(typeof h=="function"&&(dc(e,l,h,n),x=e.memoizedState),(M=_l||Jf(e,l,M,n,_,x,m)||t!==null&&t.dependencies!==null&&Bi(t.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,x,m),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,x,m)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=x),i.props=n,i.state=x,i.context=m,n=M):(typeof i.componentDidUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),n=!1)}return i=n,eu(t,e),n=(e.flags&128)!==0,i||n?(i=e.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:i.render(),e.flags|=1,t!==null&&n?(e.child=rn(e,t.child,null,a),e.child=rn(e,null,l,a)):kt(t,e,l,a),e.memoizedState=i.state,t=e.child):t=ul(t,e,a),t}function rh(t,e,l,n){return ln(),e.flags|=256,kt(t,e,l,n),e.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(t){return{baseLanes:t,cachePool:Fo()}}function bc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=Ee),t}function oh(t,e,l){var n=e.pendingProps,a=!1,i=(e.flags&128)!==0,o;if((o=i)||(o=t!==null&&t.memoizedState===null?!1:(wt.current&2)!==0),o&&(a=!0,e.flags&=-129),o=(e.flags&32)!==0,e.flags&=-33,t===null){if(lt){if(a?Cl(e):zl(),(t=At)?(t=vd(t,Oe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:bl!==null?{id:Qe,overflow:Ke}:null,retryLane:536870912,hydrationErrors:null},l=Go(t),l.return=e,e.child=l,Zt=e,At=null)):t=null,t===null)throw Tl(e);return lr(t)?e.lanes=32:e.lanes=536870912,null}var h=n.children;return n=n.fallback,a?(zl(),a=e.mode,h=lu({mode:"hidden",children:h},a),n=en(n,a,l,null),h.return=e,n.return=e,h.sibling=n,e.child=h,n=e.child,n.memoizedState=Sc(l),n.childLanes=bc(t,o,l),e.memoizedState=vc,Ba(null,n)):(Cl(e),Ec(e,h))}var m=t.memoizedState;if(m!==null&&(h=m.dehydrated,h!==null)){if(i)e.flags&256?(Cl(e),e.flags&=-257,e=Tc(t,e,l)):e.memoizedState!==null?(zl(),e.child=t.child,e.flags|=128,e=null):(zl(),h=n.fallback,a=e.mode,n=lu({mode:"visible",children:n.children},a),h=en(h,a,l,null),h.flags|=2,n.return=e,h.return=e,n.sibling=h,e.child=n,rn(e,t.child,null,l),n=e.child,n.memoizedState=Sc(l),n.childLanes=bc(t,o,l),e.memoizedState=vc,e=Ba(null,n));else if(Cl(e),lr(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var A=o.dgst;o=A,n=Error(c(419)),n.stack="",n.digest=o,_a({value:n,source:null,stack:null}),e=Tc(t,e,l)}else if(Lt||Nn(t,e,l,!1),o=(l&t.childLanes)!==0,Lt||o){if(o=vt,o!==null&&(n=kr(o,l),n!==0&&n!==m.retryLane))throw m.retryLane=n,tn(t,n),fe(o,t,n),gc;er(h)||fu(),e=Tc(t,e,l)}else er(h)?(e.flags|=192,e.child=t.child,e=null):(t=m.treeContext,At=we(h.nextSibling),Zt=e,lt=!0,El=null,Oe=!1,t!==null&&Vo(e,t),e=Ec(e,n.children),e.flags|=4096);return e}return a?(zl(),h=n.fallback,a=e.mode,m=t.child,A=m.sibling,n=tl(m,{mode:"hidden",children:n.children}),n.subtreeFlags=m.subtreeFlags&65011712,A!==null?h=tl(A,h):(h=en(h,a,l,null),h.flags|=2),h.return=e,n.return=e,n.sibling=h,e.child=n,Ba(null,n),n=e.child,h=t.child.memoizedState,h===null?h=Sc(l):(a=h.cachePool,a!==null?(m=Ht._currentValue,a=a.parent!==m?{parent:m,pool:m}:a):a=Fo(),h={baseLanes:h.baseLanes|l,cachePool:a}),n.memoizedState=h,n.childLanes=bc(t,o,l),e.memoizedState=vc,Ba(t.child,n)):(Cl(e),l=t.child,t=l.sibling,l=tl(l,{mode:"visible",children:n.children}),l.return=e,l.sibling=null,t!==null&&(o=e.deletions,o===null?(e.deletions=[t],e.flags|=16):o.push(t)),e.child=l,e.memoizedState=null,l)}function Ec(t,e){return e=lu({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function lu(t,e){return t=pe(22,t,null,e),t.lanes=0,t}function Tc(t,e,l){return rn(e,t.child,null,l),t=Ec(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function fh(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Ls(t.return,e,l)}function Ac(t,e,l,n,a,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=l,o.tailMode=a,o.treeForkCount=i)}function hh(t,e,l){var n=e.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var o=wt.current,h=(o&2)!==0;if(h?(o=o&1|2,e.flags|=128):o&=1,N(wt,o),kt(t,e,n,l),n=lt?Aa:0,!h&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&fh(t,l,e);else if(t.tag===19)fh(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(a){case"forwards":for(l=e.child,a=null;l!==null;)t=l.alternate,t!==null&&Ki(t)===null&&(a=l),l=l.sibling;l=a,l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),Ac(e,!1,a,l,i,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&Ki(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}Ac(e,!0,l,null,i,n);break;case"together":Ac(e,!1,null,null,void 0,n);break;default:e.memoizedState=null}return e.child}function ul(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),wl|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(Nn(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(c(153));if(e.child!==null){for(t=e.child,l=tl(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=tl(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function _c(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Bi(t)))}function wg(t,e,l){switch(e.tag){case 3:Pt(e,e.stateNode.containerInfo),Al(e,Ht,t.memoizedState.cache),ln();break;case 27:case 5:ca(e);break;case 4:Pt(e,e.stateNode.containerInfo);break;case 10:Al(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Ws(e),null;break;case 13:var n=e.memoizedState;if(n!==null)return n.dehydrated!==null?(Cl(e),e.flags|=128,null):(l&e.child.childLanes)!==0?oh(t,e,l):(Cl(e),t=ul(t,e,l),t!==null?t.sibling:null);Cl(e);break;case 19:var a=(t.flags&128)!==0;if(n=(l&e.childLanes)!==0,n||(Nn(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return hh(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),N(wt,wt.current),n)break;return null;case 22:return e.lanes=0,ah(t,e,l,e.pendingProps);case 24:Al(e,Ht,t.memoizedState.cache)}return ul(t,e,l)}function dh(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Lt=!0;else{if(!_c(t,l)&&(e.flags&128)===0)return Lt=!1,wg(t,e,l);Lt=(t.flags&131072)!==0}else Lt=!1,lt&&(e.flags&1048576)!==0&&Ko(e,Aa,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=sn(e.elementType),e.type=t,typeof t=="function")Os(t)?(n=fn(t,n),e.tag=1,e=ch(null,e,t,n,l)):(e.tag=0,e=pc(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===le){e.tag=11,e=eh(null,e,t,n,l);break t}else if(a===$){e.tag=14,e=lh(null,e,t,n,l);break t}}throw e=$e(t)||t,Error(c(306,e,""))}}return e;case 0:return pc(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=fn(n,e.pendingProps),ch(t,e,n,a,l);case 3:t:{if(Pt(e,e.stateNode.containerInfo),t===null)throw Error(c(387));n=e.pendingProps;var i=e.memoizedState;a=i.element,Ks(t,e),wa(e,n,null,l);var o=e.memoizedState;if(n=o.cache,Al(e,Ht,n),n!==i.cache&&js(e,[Ht],l,!0),Da(),n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=rh(t,e,n,l);break t}else if(n!==a){a=Me(Error(c(424)),e),_a(a),e=rh(t,e,n,l);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(At=we(t.firstChild),Zt=e,lt=!0,El=null,Oe=!0,l=nf(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ln(),n===a){e=ul(t,e,l);break t}kt(t,e,n,l)}e=e.child}return e;case 26:return eu(t,e),t===null?(l=_d(e.type,null,e.pendingProps,null))?e.memoizedState=l:lt||(l=e.type,t=e.pendingProps,n=vu(F.current).createElement(l),n[Vt]=e,n[ie]=t,Wt(n,l,t),Gt(n),e.stateNode=n):e.memoizedState=_d(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return ca(e),t===null&&lt&&(n=e.stateNode=Ed(e.type,e.pendingProps,F.current),Zt=e,Oe=!0,a=At,Bl(e.type)?(nr=a,At=we(n.firstChild)):At=a),kt(t,e,e.pendingProps.children,l),eu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&lt&&((a=n=At)&&(n=sp(n,e.type,e.pendingProps,Oe),n!==null?(e.stateNode=n,Zt=e,At=we(n.firstChild),Oe=!1,a=!0):a=!1),a||Tl(e)),ca(e),a=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,n=i.children,Ic(a,i)?n=null:o!==null&&Ic(a,o)&&(e.flags|=32),e.memoizedState!==null&&(a=Fs(t,e,Tg,null,null,l),Fa._currentValue=a),eu(t,e),kt(t,e,n,l),e.child;case 6:return t===null&&lt&&((t=l=At)&&(l=cp(l,e.pendingProps,Oe),l!==null?(e.stateNode=l,Zt=e,At=null,t=!0):t=!1),t||Tl(e)),null;case 13:return oh(t,e,l);case 4:return Pt(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=rn(e,null,n,l):kt(t,e,n,l),e.child;case 11:return eh(t,e,e.type,e.pendingProps,l);case 7:return kt(t,e,e.pendingProps,l),e.child;case 8:return kt(t,e,e.pendingProps.children,l),e.child;case 12:return kt(t,e,e.pendingProps.children,l),e.child;case 10:return n=e.pendingProps,Al(e,e.type,n.value),kt(t,e,n.children,l),e.child;case 9:return a=e.type._context,n=e.pendingProps.children,an(e),a=Jt(a),n=n(a),e.flags|=1,kt(t,e,n,l),e.child;case 14:return lh(t,e,e.type,e.pendingProps,l);case 15:return nh(t,e,e.type,e.pendingProps,l);case 19:return hh(t,e,l);case 31:return Dg(t,e,l);case 22:return ah(t,e,l,e.pendingProps);case 24:return an(e),n=Jt(Ht),t===null?(a=Xs(),a===null&&(a=vt,i=qs(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=l),a=i),e.memoizedState={parent:n,cache:a},Qs(e),Al(e,Ht,a)):((t.lanes&l)!==0&&(Ks(t,e),wa(e,null,null,l),Da()),a=t.memoizedState,i=e.memoizedState,a.parent!==n?(a={parent:n,cache:n},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),Al(e,Ht,n)):(n=i.cache,Al(e,Ht,n),n!==a.cache&&js(e,[Ht],l,!0))),kt(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(c(156,e.tag))}function sl(t){t.flags|=4}function xc(t,e,l,n,a){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(Yh())t.flags|=8192;else throw cn=Yi,Gs}else t.flags&=-16777217}function mh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Od(e))if(Yh())t.flags|=8192;else throw cn=Yi,Gs}function nu(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Vr():536870912,t.lanes|=e,Zn|=e)}function La(t,e){if(!lt)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function _t(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,n=0;if(e)for(var a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=n,t.childLanes=l,e}function Rg(t,e,l){var n=e.pendingProps;switch(Us(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(e),null;case 1:return _t(e),null;case 3:return l=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),nl(Ht),Dt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Un(e)?sl(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Hs())),_t(e),null;case 26:var a=e.type,i=e.memoizedState;return t===null?(sl(e),i!==null?(_t(e),mh(e,i)):(_t(e),xc(e,a,null,n,l))):i?i!==t.memoizedState?(sl(e),_t(e),mh(e,i)):(_t(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&sl(e),_t(e),xc(e,a,t,n,l)),null;case 27:if(mi(e),l=F.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&sl(e);else{if(!n){if(e.stateNode===null)throw Error(c(166));return _t(e),null}t=L.current,Un(e)?Zo(e):(t=Ed(a,n,l),e.stateNode=t,sl(e))}return _t(e),null;case 5:if(mi(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&sl(e);else{if(!n){if(e.stateNode===null)throw Error(c(166));return _t(e),null}if(i=L.current,Un(e))Zo(e);else{var o=vu(F.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?o.createElement(a,{is:n.is}):o.createElement(a)}}i[Vt]=e,i[ie]=n;t:for(o=e.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break t;for(;o.sibling===null;){if(o.return===null||o.return===e)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}e.stateNode=i;t:switch(Wt(i,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&sl(e)}}return _t(e),xc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&sl(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(c(166));if(t=F.current,Un(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,a=Zt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}t[Vt]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||od(t.nodeValue,l)),t||Tl(e,!0)}else t=vu(t).createTextNode(n),t[Vt]=e,e.stateNode=t}return _t(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=Un(e),l!==null){if(t===null){if(!n)throw Error(c(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(557));t[Vt]=e}else ln(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;_t(e),t=!1}else l=Hs(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(Se(e),e):(Se(e),null);if((e.flags&128)!==0)throw Error(c(558))}return _t(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=Un(e),n!==null&&n.dehydrated!==null){if(t===null){if(!a)throw Error(c(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[Vt]=e}else ln(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;_t(e),a=!1}else a=Hs(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(Se(e),e):(Se(e),null)}return Se(e),(e.flags&128)!==0?(e.lanes=l,e):(l=n!==null,t=t!==null&&t.memoizedState!==null,l&&(n=e.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==a&&(n.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),nu(e,e.updateQueue),_t(e),null);case 4:return Dt(),t===null&&Jc(e.stateNode.containerInfo),_t(e),null;case 10:return nl(e.type),_t(e),null;case 19:if(w(wt),n=e.memoizedState,n===null)return _t(e),null;if(a=(e.flags&128)!==0,i=n.rendering,i===null)if(a)La(n,!1);else{if(Ot!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=Ki(t),i!==null){for(e.flags|=128,La(n,!1),t=i.updateQueue,e.updateQueue=t,nu(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Xo(l,t),l=l.sibling;return N(wt,wt.current&1|2),lt&&el(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&de()>cu&&(e.flags|=128,a=!0,La(n,!1),e.lanes=4194304)}else{if(!a)if(t=Ki(i),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,nu(e,t),La(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!lt)return _t(e),null}else 2*de()-n.renderingStartTime>cu&&l!==536870912&&(e.flags|=128,a=!0,La(n,!1),e.lanes=4194304);n.isBackwards?(i.sibling=e.child,e.child=i):(t=n.last,t!==null?t.sibling=i:e.child=i,n.last=i)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=de(),t.sibling=null,l=wt.current,N(wt,a?l&1|2:l&1),lt&&el(e,n.treeForkCount),t):(_t(e),null);case 22:case 23:return Se(e),ks(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(l&536870912)!==0&&(e.flags&128)===0&&(_t(e),e.subtreeFlags&6&&(e.flags|=8192)):_t(e),l=e.updateQueue,l!==null&&nu(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==l&&(e.flags|=2048),t!==null&&w(un),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),nl(Ht),_t(e),null;case 25:return null;case 30:return null}throw Error(c(156,e.tag))}function Ug(t,e){switch(Us(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return nl(Ht),Dt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return mi(e),null;case 31:if(e.memoizedState!==null){if(Se(e),e.alternate===null)throw Error(c(340));ln()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Se(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));ln()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return w(wt),null;case 4:return Dt(),null;case 10:return nl(e.type),null;case 22:case 23:return Se(e),ks(),t!==null&&w(un),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return nl(Ht),null;case 25:return null;default:return null}}function yh(t,e){switch(Us(e),e.tag){case 3:nl(Ht),Dt();break;case 26:case 27:case 5:mi(e);break;case 4:Dt();break;case 31:e.memoizedState!==null&&Se(e);break;case 13:Se(e);break;case 19:w(wt);break;case 10:nl(e.type);break;case 22:case 23:Se(e),ks(),t!==null&&w(un);break;case 24:nl(Ht)}}function ja(t,e){try{var l=e.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&t)===t){n=void 0;var i=l.create,o=l.inst;n=i(),o.destroy=n}l=l.next}while(l!==a)}}catch(h){ft(e,e.return,h)}}function Ol(t,e,l){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&t)===t){var o=n.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,a=e;var m=l,A=h;try{A()}catch(M){ft(a,m,M)}}}n=n.next}while(n!==i)}}catch(M){ft(e,e.return,M)}}function gh(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{uf(e,l)}catch(n){ft(t,t.return,n)}}}function ph(t,e,l){l.props=fn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){ft(t,e,n)}}function qa(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(a){ft(t,e,a)}}function Ve(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){ft(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){ft(t,e,a)}else l.current=null}function vh(t){var e=t.type,l=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break t;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){ft(t,t.return,a)}}function Mc(t,e,l){try{var n=t.stateNode;ep(n,t.type,l,e),n[ie]=e}catch(a){ft(t,t.return,a)}}function Sh(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Bl(t.type)||t.tag===4}function Cc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Sh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Bl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function zc(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=Ie));else if(n!==4&&(n===27&&Bl(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(zc(t,e,l),t=t.sibling;t!==null;)zc(t,e,l),t=t.sibling}function au(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(n!==4&&(n===27&&Bl(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(au(t,e,l),t=t.sibling;t!==null;)au(t,e,l),t=t.sibling}function bh(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);Wt(e,n,l),e[Vt]=t,e[ie]=l}catch(i){ft(t,t.return,i)}}var cl=!1,jt=!1,Oc=!1,Eh=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function Ng(t,e){if(t=t.containerInfo,$c=xu,t=Ro(t),Ts(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break t}var o=0,h=-1,m=-1,A=0,M=0,D=t,_=null;e:for(;;){for(var x;D!==l||a!==0&&D.nodeType!==3||(h=o+a),D!==i||n!==0&&D.nodeType!==3||(m=o+n),D.nodeType===3&&(o+=D.nodeValue.length),(x=D.firstChild)!==null;)_=D,D=x;for(;;){if(D===t)break e;if(_===l&&++A===a&&(h=o),_===i&&++M===n&&(m=o),(x=D.nextSibling)!==null)break;D=_,_=D.parentNode}D=x}l=h===-1||m===-1?null:{start:h,end:m}}else l=null}l=l||{start:0,end:0}}else l=null;for(Fc={focusedElem:t,selectionRange:l},xu=!1,Qt=e;Qt!==null;)if(e=Qt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Qt=t;else for(;Qt!==null;){switch(e=Qt,i=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)a=t[l],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&i!==null){t=void 0,l=e,a=i.memoizedProps,i=i.memoizedState,n=l.stateNode;try{var B=fn(l.type,a);t=n.getSnapshotBeforeUpdate(B,i),n.__reactInternalSnapshotBeforeUpdate=t}catch(X){ft(l,l.return,X)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,l=t.nodeType,l===9)tr(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":tr(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(c(163))}if(t=e.sibling,t!==null){t.return=e.return,Qt=t;break}Qt=e.return}}function Th(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:ol(t,l),n&4&&ja(5,l);break;case 1:if(ol(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(o){ft(l,l.return,o)}else{var a=fn(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(o){ft(l,l.return,o)}}n&64&&gh(l),n&512&&qa(l,l.return);break;case 3:if(ol(t,l),n&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{uf(t,e)}catch(o){ft(l,l.return,o)}}break;case 27:e===null&&n&4&&bh(l);case 26:case 5:ol(t,l),e===null&&n&4&&vh(l),n&512&&qa(l,l.return);break;case 12:ol(t,l);break;case 31:ol(t,l),n&4&&xh(t,l);break;case 13:ol(t,l),n&4&&Mh(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Qg.bind(null,l),rp(t,l))));break;case 22:if(n=l.memoizedState!==null||cl,!n){e=e!==null&&e.memoizedState!==null||jt,a=cl;var i=jt;cl=n,(jt=e)&&!i?fl(t,l,(l.subtreeFlags&8772)!==0):ol(t,l),cl=a,jt=i}break;case 30:break;default:ol(t,l)}}function Ah(t){var e=t.alternate;e!==null&&(t.alternate=null,Ah(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&is(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var xt=null,se=!1;function rl(t,e,l){for(l=l.child;l!==null;)_h(t,e,l),l=l.sibling}function _h(t,e,l){if(me&&typeof me.onCommitFiberUnmount=="function")try{me.onCommitFiberUnmount(ra,l)}catch{}switch(l.tag){case 26:jt||Ve(l,e),rl(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:jt||Ve(l,e);var n=xt,a=se;Bl(l.type)&&(xt=l.stateNode,se=!1),rl(t,e,l),ka(l.stateNode),xt=n,se=a;break;case 5:jt||Ve(l,e);case 6:if(n=xt,a=se,xt=null,rl(t,e,l),xt=n,se=a,xt!==null)if(se)try{(xt.nodeType===9?xt.body:xt.nodeName==="HTML"?xt.ownerDocument.body:xt).removeChild(l.stateNode)}catch(i){ft(l,e,i)}else try{xt.removeChild(l.stateNode)}catch(i){ft(l,e,i)}break;case 18:xt!==null&&(se?(t=xt,gd(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),ta(t)):gd(xt,l.stateNode));break;case 4:n=xt,a=se,xt=l.stateNode.containerInfo,se=!0,rl(t,e,l),xt=n,se=a;break;case 0:case 11:case 14:case 15:Ol(2,l,e),jt||Ol(4,l,e),rl(t,e,l);break;case 1:jt||(Ve(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&ph(l,e,n)),rl(t,e,l);break;case 21:rl(t,e,l);break;case 22:jt=(n=jt)||l.memoizedState!==null,rl(t,e,l),jt=n;break;default:rl(t,e,l)}}function xh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ta(t)}catch(l){ft(e,e.return,l)}}}function Mh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ta(t)}catch(l){ft(e,e.return,l)}}function Hg(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Eh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Eh),e;default:throw Error(c(435,t.tag))}}function iu(t,e){var l=Hg(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=Kg.bind(null,t,n);n.then(a,a)}})}function ce(t,e){var l=e.deletions;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n],i=t,o=e,h=o;t:for(;h!==null;){switch(h.tag){case 27:if(Bl(h.type)){xt=h.stateNode,se=!1;break t}break;case 5:xt=h.stateNode,se=!1;break t;case 3:case 4:xt=h.stateNode.containerInfo,se=!0;break t}h=h.return}if(xt===null)throw Error(c(160));_h(i,o,a),xt=null,se=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Ch(e,t),e=e.sibling}var qe=null;function Ch(t,e){var l=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ce(e,t),re(t),n&4&&(Ol(3,t,t.return),ja(3,t),Ol(5,t,t.return));break;case 1:ce(e,t),re(t),n&512&&(jt||l===null||Ve(l,l.return)),n&64&&cl&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var a=qe;if(ce(e,t),re(t),n&512&&(jt||l===null||Ve(l,l.return)),n&4){var i=l!==null?l.memoizedState:null;if(n=t.memoizedState,l===null)if(n===null)if(t.stateNode===null){t:{n=t.type,l=t.memoizedProps,a=a.ownerDocument||a;e:switch(n){case"title":i=a.getElementsByTagName("title")[0],(!i||i[ha]||i[Vt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(n),a.head.insertBefore(i,a.querySelector("head > title"))),Wt(i,n,l),i[Vt]=t,Gt(i),n=i;break t;case"link":var o=Cd("link","href",a).get(n+(l.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){o.splice(h,1);break e}}i=a.createElement(n),Wt(i,n,l),a.head.appendChild(i);break;case"meta":if(o=Cd("meta","content",a).get(n+(l.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){o.splice(h,1);break e}}i=a.createElement(n),Wt(i,n,l),a.head.appendChild(i);break;default:throw Error(c(468,n))}i[Vt]=t,Gt(i),n=i}t.stateNode=n}else zd(a,t.type,t.stateNode);else t.stateNode=Md(a,n,t.memoizedProps);else i!==n?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,n===null?zd(a,t.type,t.stateNode):Md(a,n,t.memoizedProps)):n===null&&t.stateNode!==null&&Mc(t,t.memoizedProps,l.memoizedProps)}break;case 27:ce(e,t),re(t),n&512&&(jt||l===null||Ve(l,l.return)),l!==null&&n&4&&Mc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(ce(e,t),re(t),n&512&&(jt||l===null||Ve(l,l.return)),t.flags&32){a=t.stateNode;try{An(a,"")}catch(B){ft(t,t.return,B)}}n&4&&t.stateNode!=null&&(a=t.memoizedProps,Mc(t,a,l!==null?l.memoizedProps:a)),n&1024&&(Oc=!0);break;case 6:if(ce(e,t),re(t),n&4){if(t.stateNode===null)throw Error(c(162));n=t.memoizedProps,l=t.stateNode;try{l.nodeValue=n}catch(B){ft(t,t.return,B)}}break;case 3:if(Eu=null,a=qe,qe=Su(e.containerInfo),ce(e,t),qe=a,re(t),n&4&&l!==null&&l.memoizedState.isDehydrated)try{ta(e.containerInfo)}catch(B){ft(t,t.return,B)}Oc&&(Oc=!1,zh(t));break;case 4:n=qe,qe=Su(t.stateNode.containerInfo),ce(e,t),re(t),qe=n;break;case 12:ce(e,t),re(t);break;case 31:ce(e,t),re(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,iu(t,n)));break;case 13:ce(e,t),re(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(su=de()),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,iu(t,n)));break;case 22:a=t.memoizedState!==null;var m=l!==null&&l.memoizedState!==null,A=cl,M=jt;if(cl=A||a,jt=M||m,ce(e,t),jt=M,cl=A,re(t),n&8192)t:for(e=t.stateNode,e._visibility=a?e._visibility&-2:e._visibility|1,a&&(l===null||m||cl||jt||hn(t)),l=null,e=t;;){if(e.tag===5||e.tag===26){if(l===null){m=l=e;try{if(i=m.stateNode,a)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=m.stateNode;var D=m.memoizedProps.style,_=D!=null&&D.hasOwnProperty("display")?D.display:null;h.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(B){ft(m,m.return,B)}}}else if(e.tag===6){if(l===null){m=e;try{m.stateNode.nodeValue=a?"":m.memoizedProps}catch(B){ft(m,m.return,B)}}}else if(e.tag===18){if(l===null){m=e;try{var x=m.stateNode;a?pd(x,!0):pd(m.stateNode,!1)}catch(B){ft(m,m.return,B)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;l===e&&(l=null),e=e.return}l===e&&(l=null),e.sibling.return=e.return,e=e.sibling}n&4&&(n=t.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,iu(t,l))));break;case 19:ce(e,t),re(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,iu(t,n)));break;case 30:break;case 21:break;default:ce(e,t),re(t)}}function re(t){var e=t.flags;if(e&2){try{for(var l,n=t.return;n!==null;){if(Sh(n)){l=n;break}n=n.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var a=l.stateNode,i=Cc(t);au(t,i,a);break;case 5:var o=l.stateNode;l.flags&32&&(An(o,""),l.flags&=-33);var h=Cc(t);au(t,h,o);break;case 3:case 4:var m=l.stateNode.containerInfo,A=Cc(t);zc(t,A,m);break;default:throw Error(c(161))}}catch(M){ft(t,t.return,M)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function zh(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;zh(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function ol(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Th(t,e.alternate,e),e=e.sibling}function hn(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Ol(4,e,e.return),hn(e);break;case 1:Ve(e,e.return);var l=e.stateNode;typeof l.componentWillUnmount=="function"&&ph(e,e.return,l),hn(e);break;case 27:ka(e.stateNode);case 26:case 5:Ve(e,e.return),hn(e);break;case 22:e.memoizedState===null&&hn(e);break;case 30:hn(e);break;default:hn(e)}t=t.sibling}}function fl(t,e,l){for(l=l&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var n=e.alternate,a=t,i=e,o=i.flags;switch(i.tag){case 0:case 11:case 15:fl(a,i,l),ja(4,i);break;case 1:if(fl(a,i,l),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(A){ft(n,n.return,A)}if(n=i,a=n.updateQueue,a!==null){var h=n.stateNode;try{var m=a.shared.hiddenCallbacks;if(m!==null)for(a.shared.hiddenCallbacks=null,a=0;a<m.length;a++)af(m[a],h)}catch(A){ft(n,n.return,A)}}l&&o&64&&gh(i),qa(i,i.return);break;case 27:bh(i);case 26:case 5:fl(a,i,l),l&&n===null&&o&4&&vh(i),qa(i,i.return);break;case 12:fl(a,i,l);break;case 31:fl(a,i,l),l&&o&4&&xh(a,i);break;case 13:fl(a,i,l),l&&o&4&&Mh(a,i);break;case 22:i.memoizedState===null&&fl(a,i,l),qa(i,i.return);break;case 30:break;default:fl(a,i,l)}e=e.sibling}}function Dc(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&xa(l))}function wc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&xa(t))}function Ye(t,e,l,n){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Oh(t,e,l,n),e=e.sibling}function Oh(t,e,l,n){var a=e.flags;switch(e.tag){case 0:case 11:case 15:Ye(t,e,l,n),a&2048&&ja(9,e);break;case 1:Ye(t,e,l,n);break;case 3:Ye(t,e,l,n),a&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&xa(t)));break;case 12:if(a&2048){Ye(t,e,l,n),t=e.stateNode;try{var i=e.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(m){ft(e,e.return,m)}}else Ye(t,e,l,n);break;case 31:Ye(t,e,l,n);break;case 13:Ye(t,e,l,n);break;case 23:break;case 22:i=e.stateNode,o=e.alternate,e.memoizedState!==null?i._visibility&2?Ye(t,e,l,n):Ya(t,e):i._visibility&2?Ye(t,e,l,n):(i._visibility|=2,Qn(t,e,l,n,(e.subtreeFlags&10256)!==0||!1)),a&2048&&Dc(o,e);break;case 24:Ye(t,e,l,n),a&2048&&wc(e.alternate,e);break;default:Ye(t,e,l,n)}}function Qn(t,e,l,n,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var i=t,o=e,h=l,m=n,A=o.flags;switch(o.tag){case 0:case 11:case 15:Qn(i,o,h,m,a),ja(8,o);break;case 23:break;case 22:var M=o.stateNode;o.memoizedState!==null?M._visibility&2?Qn(i,o,h,m,a):Ya(i,o):(M._visibility|=2,Qn(i,o,h,m,a)),a&&A&2048&&Dc(o.alternate,o);break;case 24:Qn(i,o,h,m,a),a&&A&2048&&wc(o.alternate,o);break;default:Qn(i,o,h,m,a)}e=e.sibling}}function Ya(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,n=e,a=n.flags;switch(n.tag){case 22:Ya(l,n),a&2048&&Dc(n.alternate,n);break;case 24:Ya(l,n),a&2048&&wc(n.alternate,n);break;default:Ya(l,n)}e=e.sibling}}var Xa=8192;function Kn(t,e,l){if(t.subtreeFlags&Xa)for(t=t.child;t!==null;)Dh(t,e,l),t=t.sibling}function Dh(t,e,l){switch(t.tag){case 26:Kn(t,e,l),t.flags&Xa&&t.memoizedState!==null&&Ep(l,qe,t.memoizedState,t.memoizedProps);break;case 5:Kn(t,e,l);break;case 3:case 4:var n=qe;qe=Su(t.stateNode.containerInfo),Kn(t,e,l),qe=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=Xa,Xa=16777216,Kn(t,e,l),Xa=n):Kn(t,e,l));break;default:Kn(t,e,l)}}function wh(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Ga(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Qt=n,Uh(n,t)}wh(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rh(t),t=t.sibling}function Rh(t){switch(t.tag){case 0:case 11:case 15:Ga(t),t.flags&2048&&Ol(9,t,t.return);break;case 3:Ga(t);break;case 12:Ga(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,uu(t)):Ga(t);break;default:Ga(t)}}function uu(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Qt=n,Uh(n,t)}wh(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Ol(8,e,e.return),uu(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,uu(e));break;default:uu(e)}t=t.sibling}}function Uh(t,e){for(;Qt!==null;){var l=Qt;switch(l.tag){case 0:case 11:case 15:Ol(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:xa(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Qt=n;else t:for(l=t;Qt!==null;){n=Qt;var a=n.sibling,i=n.return;if(Ah(n),n===l){Qt=null;break t}if(a!==null){a.return=i,Qt=a;break t}Qt=i}}}var Bg={getCacheForType:function(t){var e=Jt(Ht),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return Jt(Ht).controller.signal}},Lg=typeof WeakMap=="function"?WeakMap:Map,st=0,vt=null,I=null,tt=0,ot=0,be=null,Dl=!1,Vn=!1,Rc=!1,hl=0,Ot=0,wl=0,dn=0,Uc=0,Ee=0,Zn=0,Qa=null,oe=null,Nc=!1,su=0,Nh=0,cu=1/0,ru=null,Rl=null,Yt=0,Ul=null,Jn=null,dl=0,Hc=0,Bc=null,Hh=null,Ka=0,Lc=null;function Te(){return(st&2)!==0&&tt!==0?tt&-tt:z.T!==null?Qc():Wr()}function Bh(){if(Ee===0)if((tt&536870912)===0||lt){var t=pi;pi<<=1,(pi&3932160)===0&&(pi=262144),Ee=t}else Ee=536870912;return t=ve.current,t!==null&&(t.flags|=32),Ee}function fe(t,e,l){(t===vt&&(ot===2||ot===9)||t.cancelPendingCommit!==null)&&(kn(t,0),Nl(t,tt,Ee,!1)),fa(t,l),((st&2)===0||t!==vt)&&(t===vt&&((st&2)===0&&(dn|=l),Ot===4&&Nl(t,tt,Ee,!1)),Ze(t))}function Lh(t,e,l){if((st&6)!==0)throw Error(c(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||oa(t,e),a=n?Yg(t,e):qc(t,e,!0),i=n;do{if(a===0){Vn&&!n&&Nl(t,e,0,!1);break}else{if(l=t.current.alternate,i&&!jg(l)){a=qc(t,e,!1),i=!1;continue}if(a===2){if(i=e,t.errorRecoveryDisabledLanes&i)var o=0;else o=t.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){e=o;t:{var h=t;a=Qa;var m=h.current.memoizedState.isDehydrated;if(m&&(kn(h,o).flags|=256),o=qc(h,o,!1),o!==2){if(Rc&&!m){h.errorRecoveryDisabledLanes|=i,dn|=i,a=4;break t}i=oe,oe=a,i!==null&&(oe===null?oe=i:oe.push.apply(oe,i))}a=o}if(i=!1,a!==2)continue}}if(a===1){kn(t,0),Nl(t,e,0,!0);break}t:{switch(n=t,i=a,i){case 0:case 1:throw Error(c(345));case 4:if((e&4194048)!==e)break;case 6:Nl(n,e,Ee,!Dl);break t;case 2:oe=null;break;case 3:case 5:break;default:throw Error(c(329))}if((e&62914560)===e&&(a=su+300-de(),10<a)){if(Nl(n,e,Ee,!Dl),Si(n,0,!0)!==0)break t;dl=e,n.timeoutHandle=md(jh.bind(null,n,l,oe,ru,Nc,e,Ee,dn,Zn,Dl,i,"Throttled",-0,0),a);break t}jh(n,l,oe,ru,Nc,e,Ee,dn,Zn,Dl,i,null,-0,0)}}break}while(!0);Ze(t)}function jh(t,e,l,n,a,i,o,h,m,A,M,D,_,x){if(t.timeoutHandle=-1,D=e.subtreeFlags,D&8192||(D&16785408)===16785408){D={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ie},Dh(e,i,D);var B=(i&62914560)===i?su-de():(i&4194048)===i?Nh-de():0;if(B=Tp(D,B),B!==null){dl=i,t.cancelPendingCommit=B(Zh.bind(null,t,e,i,l,n,a,o,h,m,M,D,null,_,x)),Nl(t,i,o,!A);return}}Zh(t,e,i,l,n,a,o,h,m)}function jg(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],i=a.getSnapshot;a=a.value;try{if(!ge(i(),a))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Nl(t,e,l,n){e&=~Uc,e&=~dn,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var a=e;0<a;){var i=31-ye(a),o=1<<i;n[i]=-1,a&=~o}l!==0&&Zr(t,l,e)}function ou(){return(st&6)===0?(Va(0),!1):!0}function jc(){if(I!==null){if(ot===0)var t=I.return;else t=I,ll=nn=null,tc(t),jn=null,Ca=0,t=I;for(;t!==null;)yh(t.alternate,t),t=t.return;I=null}}function kn(t,e){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,ap(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),dl=0,jc(),vt=t,I=l=tl(t.current,null),tt=e,ot=0,be=null,Dl=!1,Vn=oa(t,e),Rc=!1,Zn=Ee=Uc=dn=wl=Ot=0,oe=Qa=null,Nc=!1,(e&8)!==0&&(e|=e&32);var n=t.entangledLanes;if(n!==0)for(t=t.entanglements,n&=e;0<n;){var a=31-ye(n),i=1<<a;e|=t[a],n&=~i}return hl=e,wi(),l}function qh(t,e){J=null,z.H=Ha,e===Ln||e===qi?(e=tf(),ot=3):e===Gs?(e=tf(),ot=4):ot=e===gc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,be=e,I===null&&(Ot=1,Pi(t,Me(e,t.current)))}function Yh(){var t=ve.current;return t===null?!0:(tt&4194048)===tt?De===null:(tt&62914560)===tt||(tt&536870912)!==0?t===De:!1}function Xh(){var t=z.H;return z.H=Ha,t===null?Ha:t}function Gh(){var t=z.A;return z.A=Bg,t}function fu(){Ot=4,Dl||(tt&4194048)!==tt&&ve.current!==null||(Vn=!0),(wl&134217727)===0&&(dn&134217727)===0||vt===null||Nl(vt,tt,Ee,!1)}function qc(t,e,l){var n=st;st|=2;var a=Xh(),i=Gh();(vt!==t||tt!==e)&&(ru=null,kn(t,e)),e=!1;var o=Ot;t:do try{if(ot!==0&&I!==null){var h=I,m=be;switch(ot){case 8:jc(),o=6;break t;case 3:case 2:case 9:case 6:ve.current===null&&(e=!0);var A=ot;if(ot=0,be=null,Wn(t,h,m,A),l&&Vn){o=0;break t}break;default:A=ot,ot=0,be=null,Wn(t,h,m,A)}}qg(),o=Ot;break}catch(M){qh(t,M)}while(!0);return e&&t.shellSuspendCounter++,ll=nn=null,st=n,z.H=a,z.A=i,I===null&&(vt=null,tt=0,wi()),o}function qg(){for(;I!==null;)Qh(I)}function Yg(t,e){var l=st;st|=2;var n=Xh(),a=Gh();vt!==t||tt!==e?(ru=null,cu=de()+500,kn(t,e)):Vn=oa(t,e);t:do try{if(ot!==0&&I!==null){e=I;var i=be;e:switch(ot){case 1:ot=0,be=null,Wn(t,e,i,1);break;case 2:case 9:if(Io(i)){ot=0,be=null,Kh(e);break}e=function(){ot!==2&&ot!==9||vt!==t||(ot=7),Ze(t)},i.then(e,e);break t;case 3:ot=7;break t;case 4:ot=5;break t;case 7:Io(i)?(ot=0,be=null,Kh(e)):(ot=0,be=null,Wn(t,e,i,7));break;case 5:var o=null;switch(I.tag){case 26:o=I.memoizedState;case 5:case 27:var h=I;if(o?Od(o):h.stateNode.complete){ot=0,be=null;var m=h.sibling;if(m!==null)I=m;else{var A=h.return;A!==null?(I=A,hu(A)):I=null}break e}}ot=0,be=null,Wn(t,e,i,5);break;case 6:ot=0,be=null,Wn(t,e,i,6);break;case 8:jc(),Ot=6;break t;default:throw Error(c(462))}}Xg();break}catch(M){qh(t,M)}while(!0);return ll=nn=null,z.H=n,z.A=a,st=l,I!==null?0:(vt=null,tt=0,wi(),Ot)}function Xg(){for(;I!==null&&!oy();)Qh(I)}function Qh(t){var e=dh(t.alternate,t,hl);t.memoizedProps=t.pendingProps,e===null?hu(t):I=e}function Kh(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=sh(l,e,e.pendingProps,e.type,void 0,tt);break;case 11:e=sh(l,e,e.pendingProps,e.type.render,e.ref,tt);break;case 5:tc(e);default:yh(l,e),e=I=Xo(e,hl),e=dh(l,e,hl)}t.memoizedProps=t.pendingProps,e===null?hu(t):I=e}function Wn(t,e,l,n){ll=nn=null,tc(e),jn=null,Ca=0;var a=e.return;try{if(Og(t,a,e,l,tt)){Ot=1,Pi(t,Me(l,t.current)),I=null;return}}catch(i){if(a!==null)throw I=a,i;Ot=1,Pi(t,Me(l,t.current)),I=null;return}e.flags&32768?(lt||n===1?t=!0:Vn||(tt&536870912)!==0?t=!1:(Dl=t=!0,(n===2||n===9||n===3||n===6)&&(n=ve.current,n!==null&&n.tag===13&&(n.flags|=16384))),Vh(e,t)):hu(e)}function hu(t){var e=t;do{if((e.flags&32768)!==0){Vh(e,Dl);return}t=e.return;var l=Rg(e.alternate,e,hl);if(l!==null){I=l;return}if(e=e.sibling,e!==null){I=e;return}I=e=t}while(e!==null);Ot===0&&(Ot=5)}function Vh(t,e){do{var l=Ug(t.alternate,t);if(l!==null){l.flags&=32767,I=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){I=t;return}I=t=l}while(t!==null);Ot=6,I=null}function Zh(t,e,l,n,a,i,o,h,m){t.cancelPendingCommit=null;do du();while(Yt!==0);if((st&6)!==0)throw Error(c(327));if(e!==null){if(e===t.current)throw Error(c(177));if(i=e.lanes|e.childLanes,i|=Cs,by(t,l,i,o,h,m),t===vt&&(I=vt=null,tt=0),Jn=e,Ul=t,dl=l,Hc=i,Bc=a,Hh=n,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Vg(yi,function(){return Fh(),null})):(t.callbackNode=null,t.callbackPriority=0),n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=z.T,z.T=null,a=U.p,U.p=2,o=st,st|=4;try{Ng(t,e,l)}finally{st=o,U.p=a,z.T=n}}Yt=1,Jh(),kh(),Wh()}}function Jh(){if(Yt===1){Yt=0;var t=Ul,e=Jn,l=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var n=U.p;U.p=2;var a=st;st|=4;try{Ch(e,t);var i=Fc,o=Ro(t.containerInfo),h=i.focusedElem,m=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&wo(h.ownerDocument.documentElement,h)){if(m!==null&&Ts(h)){var A=m.start,M=m.end;if(M===void 0&&(M=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(M,h.value.length);else{var D=h.ownerDocument||document,_=D&&D.defaultView||window;if(_.getSelection){var x=_.getSelection(),B=h.textContent.length,X=Math.min(m.start,B),gt=m.end===void 0?X:Math.min(m.end,B);!x.extend&&X>gt&&(o=gt,gt=X,X=o);var S=Do(h,X),g=Do(h,gt);if(S&&g&&(x.rangeCount!==1||x.anchorNode!==S.node||x.anchorOffset!==S.offset||x.focusNode!==g.node||x.focusOffset!==g.offset)){var T=D.createRange();T.setStart(S.node,S.offset),x.removeAllRanges(),X>gt?(x.addRange(T),x.extend(g.node,g.offset)):(T.setEnd(g.node,g.offset),x.addRange(T))}}}}for(D=[],x=h;x=x.parentNode;)x.nodeType===1&&D.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<D.length;h++){var O=D[h];O.element.scrollLeft=O.left,O.element.scrollTop=O.top}}xu=!!$c,Fc=$c=null}finally{st=a,U.p=n,z.T=l}}t.current=e,Yt=2}}function kh(){if(Yt===2){Yt=0;var t=Ul,e=Jn,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var n=U.p;U.p=2;var a=st;st|=4;try{Th(t,e.alternate,e)}finally{st=a,U.p=n,z.T=l}}Yt=3}}function Wh(){if(Yt===4||Yt===3){Yt=0,fy();var t=Ul,e=Jn,l=dl,n=Hh;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Yt=5:(Yt=0,Jn=Ul=null,$h(t,t.pendingLanes));var a=t.pendingLanes;if(a===0&&(Rl=null),ns(l),e=e.stateNode,me&&typeof me.onCommitFiberRoot=="function")try{me.onCommitFiberRoot(ra,e,void 0,(e.current.flags&128)===128)}catch{}if(n!==null){e=z.T,a=U.p,U.p=2,z.T=null;try{for(var i=t.onRecoverableError,o=0;o<n.length;o++){var h=n[o];i(h.value,{componentStack:h.stack})}}finally{z.T=e,U.p=a}}(dl&3)!==0&&du(),Ze(t),a=t.pendingLanes,(l&261930)!==0&&(a&42)!==0?t===Lc?Ka++:(Ka=0,Lc=t):Ka=0,Va(0)}}function $h(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,xa(e)))}function du(){return Jh(),kh(),Wh(),Fh()}function Fh(){if(Yt!==5)return!1;var t=Ul,e=Hc;Hc=0;var l=ns(dl),n=z.T,a=U.p;try{U.p=32>l?32:l,z.T=null,l=Bc,Bc=null;var i=Ul,o=dl;if(Yt=0,Jn=Ul=null,dl=0,(st&6)!==0)throw Error(c(331));var h=st;if(st|=4,Rh(i.current),Oh(i,i.current,o,l),st=h,Va(0,!1),me&&typeof me.onPostCommitFiberRoot=="function")try{me.onPostCommitFiberRoot(ra,i)}catch{}return!0}finally{U.p=a,z.T=n,$h(t,e)}}function Ih(t,e,l){e=Me(l,e),e=yc(t.stateNode,e,2),t=Ml(t,e,2),t!==null&&(fa(t,2),Ze(t))}function ft(t,e,l){if(t.tag===3)Ih(t,t,l);else for(;e!==null;){if(e.tag===3){Ih(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Rl===null||!Rl.has(n))){t=Me(l,t),l=Pf(2),n=Ml(e,l,2),n!==null&&(th(l,n,e,t),fa(n,2),Ze(n));break}}e=e.return}}function Yc(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new Lg;var a=new Set;n.set(e,a)}else a=n.get(e),a===void 0&&(a=new Set,n.set(e,a));a.has(l)||(Rc=!0,a.add(l),t=Gg.bind(null,t,e,l),e.then(t,t))}function Gg(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,vt===t&&(tt&l)===l&&(Ot===4||Ot===3&&(tt&62914560)===tt&&300>de()-su?(st&2)===0&&kn(t,0):Uc|=l,Zn===tt&&(Zn=0)),Ze(t)}function Ph(t,e){e===0&&(e=Vr()),t=tn(t,e),t!==null&&(fa(t,e),Ze(t))}function Qg(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Ph(t,l)}function Kg(t,e){var l=0;switch(t.tag){case 31:case 13:var n=t.stateNode,a=t.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(e),Ph(t,l)}function Vg(t,e){return Pu(t,e)}var mu=null,$n=null,Xc=!1,yu=!1,Gc=!1,Hl=0;function Ze(t){t!==$n&&t.next===null&&($n===null?mu=$n=t:$n=$n.next=t),yu=!0,Xc||(Xc=!0,Jg())}function Va(t,e){if(!Gc&&yu){Gc=!0;do for(var l=!1,n=mu;n!==null;){if(t!==0){var a=n.pendingLanes;if(a===0)var i=0;else{var o=n.suspendedLanes,h=n.pingedLanes;i=(1<<31-ye(42|t)+1)-1,i&=a&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,nd(n,i))}else i=tt,i=Si(n,n===vt?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||oa(n,i)||(l=!0,nd(n,i));n=n.next}while(l);Gc=!1}}function Zg(){td()}function td(){yu=Xc=!1;var t=0;Hl!==0&&np()&&(t=Hl);for(var e=de(),l=null,n=mu;n!==null;){var a=n.next,i=ed(n,e);i===0?(n.next=null,l===null?mu=a:l.next=a,a===null&&($n=l)):(l=n,(t!==0||(i&3)!==0)&&(yu=!0)),n=a}Yt!==0&&Yt!==5||Va(t),Hl!==0&&(Hl=0)}function ed(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,a=t.expirationTimes,i=t.pendingLanes&-62914561;0<i;){var o=31-ye(i),h=1<<o,m=a[o];m===-1?((h&l)===0||(h&n)!==0)&&(a[o]=Sy(h,e)):m<=e&&(t.expiredLanes|=h),i&=~h}if(e=vt,l=tt,l=Si(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(ot===2||ot===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&ts(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||oa(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&ts(n),ns(l)){case 2:case 8:l=Qr;break;case 32:l=yi;break;case 268435456:l=Kr;break;default:l=yi}return n=ld.bind(null,t),l=Pu(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&ts(n),t.callbackPriority=2,t.callbackNode=null,2}function ld(t,e){if(Yt!==0&&Yt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(du()&&t.callbackNode!==l)return null;var n=tt;return n=Si(t,t===vt?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(Lh(t,n,e),ed(t,de()),t.callbackNode!=null&&t.callbackNode===l?ld.bind(null,t):null)}function nd(t,e){if(du())return null;Lh(t,e,!0)}function Jg(){ip(function(){(st&6)!==0?Pu(Gr,Zg):td()})}function Qc(){if(Hl===0){var t=Hn;t===0&&(t=gi,gi<<=1,(gi&261888)===0&&(gi=256)),Hl=t}return Hl}function ad(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ai(""+t)}function id(t,e){var l=e.ownerDocument.createElement("input");return l.name=e.name,l.value=e.value,t.id&&l.setAttribute("form",t.id),e.parentNode.insertBefore(l,e),t=new FormData(t),l.parentNode.removeChild(l),t}function kg(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var i=ad((a[ie]||null).action),o=n.submitter;o&&(e=(e=o[ie]||null)?ad(e.formAction):o.getAttribute("formAction"),e!==null&&(i=e,o=null));var h=new Ci("action","action",null,n,a);t.push({event:h,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Hl!==0){var m=o?id(a,o):new FormData(a);rc(l,{pending:!0,data:m,method:a.method,action:i},null,m)}}else typeof i=="function"&&(h.preventDefault(),m=o?id(a,o):new FormData(a),rc(l,{pending:!0,data:m,method:a.method,action:i},i,m))},currentTarget:a}]})}}for(var Kc=0;Kc<Ms.length;Kc++){var Vc=Ms[Kc],Wg=Vc.toLowerCase(),$g=Vc[0].toUpperCase()+Vc.slice(1);je(Wg,"on"+$g)}je(Ho,"onAnimationEnd"),je(Bo,"onAnimationIteration"),je(Lo,"onAnimationStart"),je("dblclick","onDoubleClick"),je("focusin","onFocus"),je("focusout","onBlur"),je(hg,"onTransitionRun"),je(dg,"onTransitionStart"),je(mg,"onTransitionCancel"),je(jo,"onTransitionEnd"),En("onMouseEnter",["mouseout","mouseover"]),En("onMouseLeave",["mouseout","mouseover"]),En("onPointerEnter",["pointerout","pointerover"]),En("onPointerLeave",["pointerout","pointerover"]),$l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$l("onBeforeInput",["compositionend","keypress","textInput","paste"]),$l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Za="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(" "),Fg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Za));function ud(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var n=t[l],a=n.event;n=n.listeners;t:{var i=void 0;if(e)for(var o=n.length-1;0<=o;o--){var h=n[o],m=h.instance,A=h.currentTarget;if(h=h.listener,m!==i&&a.isPropagationStopped())break t;i=h,a.currentTarget=A;try{i(a)}catch(M){Di(M)}a.currentTarget=null,i=m}else for(o=0;o<n.length;o++){if(h=n[o],m=h.instance,A=h.currentTarget,h=h.listener,m!==i&&a.isPropagationStopped())break t;i=h,a.currentTarget=A;try{i(a)}catch(M){Di(M)}a.currentTarget=null,i=m}}}}function P(t,e){var l=e[as];l===void 0&&(l=e[as]=new Set);var n=t+"__bubble";l.has(n)||(sd(e,t,2,!1),l.add(n))}function Zc(t,e,l){var n=0;e&&(n|=4),sd(l,t,n,e)}var gu="_reactListening"+Math.random().toString(36).slice(2);function Jc(t){if(!t[gu]){t[gu]=!0,Ir.forEach(function(l){l!=="selectionchange"&&(Fg.has(l)||Zc(l,!1,t),Zc(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[gu]||(e[gu]=!0,Zc("selectionchange",!1,e))}}function sd(t,e,l,n){switch(Bd(e)){case 2:var a=xp;break;case 8:a=Mp;break;default:a=cr}l=a.bind(null,e,l,t),a=void 0,!ds||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),n?a!==void 0?t.addEventListener(e,l,{capture:!0,passive:a}):t.addEventListener(e,l,!0):a!==void 0?t.addEventListener(e,l,{passive:a}):t.addEventListener(e,l,!1)}function kc(t,e,l,n,a){var i=n;if((e&1)===0&&(e&2)===0&&n!==null)t:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var h=n.stateNode.containerInfo;if(h===a)break;if(o===4)for(o=n.return;o!==null;){var m=o.tag;if((m===3||m===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;h!==null;){if(o=vn(h),o===null)return;if(m=o.tag,m===5||m===6||m===26||m===27){n=i=o;continue t}h=h.parentNode}}n=n.return}oo(function(){var A=i,M=fs(l),D=[];t:{var _=qo.get(t);if(_!==void 0){var x=Ci,B=t;switch(t){case"keypress":if(xi(l)===0)break t;case"keydown":case"keyup":x=Ky;break;case"focusin":B="focus",x=ps;break;case"focusout":B="blur",x=ps;break;case"beforeblur":case"afterblur":x=ps;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=mo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=Ry;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Jy;break;case Ho:case Bo:case Lo:x=Hy;break;case jo:x=Wy;break;case"scroll":case"scrollend":x=Dy;break;case"wheel":x=Fy;break;case"copy":case"cut":case"paste":x=Ly;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=go;break;case"toggle":case"beforetoggle":x=Py}var X=(e&4)!==0,gt=!X&&(t==="scroll"||t==="scrollend"),S=X?_!==null?_+"Capture":null:_;X=[];for(var g=A,T;g!==null;){var O=g;if(T=O.stateNode,O=O.tag,O!==5&&O!==26&&O!==27||T===null||S===null||(O=ma(g,S),O!=null&&X.push(Ja(g,O,T))),gt)break;g=g.return}0<X.length&&(_=new x(_,B,null,l,M),D.push({event:_,listeners:X}))}}if((e&7)===0){t:{if(_=t==="mouseover"||t==="pointerover",x=t==="mouseout"||t==="pointerout",_&&l!==os&&(B=l.relatedTarget||l.fromElement)&&(vn(B)||B[pn]))break t;if((x||_)&&(_=M.window===M?M:(_=M.ownerDocument)?_.defaultView||_.parentWindow:window,x?(B=l.relatedTarget||l.toElement,x=A,B=B?vn(B):null,B!==null&&(gt=d(B),X=B.tag,B!==gt||X!==5&&X!==27&&X!==6)&&(B=null)):(x=null,B=A),x!==B)){if(X=mo,O="onMouseLeave",S="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(X=go,O="onPointerLeave",S="onPointerEnter",g="pointer"),gt=x==null?_:da(x),T=B==null?_:da(B),_=new X(O,g+"leave",x,l,M),_.target=gt,_.relatedTarget=T,O=null,vn(M)===A&&(X=new X(S,g+"enter",B,l,M),X.target=T,X.relatedTarget=gt,O=X),gt=O,x&&B)e:{for(X=Ig,S=x,g=B,T=0,O=S;O;O=X(O))T++;O=0;for(var q=g;q;q=X(q))O++;for(;0<T-O;)S=X(S),T--;for(;0<O-T;)g=X(g),O--;for(;T--;){if(S===g||g!==null&&S===g.alternate){X=S;break e}S=X(S),g=X(g)}X=null}else X=null;x!==null&&cd(D,_,x,X,!1),B!==null&&gt!==null&&cd(D,gt,B,X,!0)}}t:{if(_=A?da(A):window,x=_.nodeName&&_.nodeName.toLowerCase(),x==="select"||x==="input"&&_.type==="file")var nt=_o;else if(To(_))if(xo)nt=rg;else{nt=sg;var j=ug}else x=_.nodeName,!x||x.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?A&&rs(A.elementType)&&(nt=_o):nt=cg;if(nt&&(nt=nt(t,A))){Ao(D,nt,l,M);break t}j&&j(t,_,A),t==="focusout"&&A&&_.type==="number"&&A.memoizedProps.value!=null&&cs(_,"number",_.value)}switch(j=A?da(A):window,t){case"focusin":(To(j)||j.contentEditable==="true")&&(Cn=j,As=A,Ta=null);break;case"focusout":Ta=As=Cn=null;break;case"mousedown":_s=!0;break;case"contextmenu":case"mouseup":case"dragend":_s=!1,Uo(D,l,M);break;case"selectionchange":if(fg)break;case"keydown":case"keyup":Uo(D,l,M)}var k;if(Ss)t:{switch(t){case"compositionstart":var et="onCompositionStart";break t;case"compositionend":et="onCompositionEnd";break t;case"compositionupdate":et="onCompositionUpdate";break t}et=void 0}else Mn?bo(t,l)&&(et="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(et="onCompositionStart");et&&(po&&l.locale!=="ko"&&(Mn||et!=="onCompositionStart"?et==="onCompositionEnd"&&Mn&&(k=fo()):(Sl=M,ms="value"in Sl?Sl.value:Sl.textContent,Mn=!0)),j=pu(A,et),0<j.length&&(et=new yo(et,t,null,l,M),D.push({event:et,listeners:j}),k?et.data=k:(k=Eo(l),k!==null&&(et.data=k)))),(k=eg?lg(t,l):ng(t,l))&&(et=pu(A,"onBeforeInput"),0<et.length&&(j=new yo("onBeforeInput","beforeinput",null,l,M),D.push({event:j,listeners:et}),j.data=k)),kg(D,t,A,l,M)}ud(D,e)})}function Ja(t,e,l){return{instance:t,listener:e,currentTarget:l}}function pu(t,e){for(var l=e+"Capture",n=[];t!==null;){var a=t,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=ma(t,l),a!=null&&n.unshift(Ja(t,a,i)),a=ma(t,e),a!=null&&n.push(Ja(t,a,i))),t.tag===3)return n;t=t.return}return[]}function Ig(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function cd(t,e,l,n,a){for(var i=e._reactName,o=[];l!==null&&l!==n;){var h=l,m=h.alternate,A=h.stateNode;if(h=h.tag,m!==null&&m===n)break;h!==5&&h!==26&&h!==27||A===null||(m=A,a?(A=ma(l,i),A!=null&&o.unshift(Ja(l,A,m))):a||(A=ma(l,i),A!=null&&o.push(Ja(l,A,m)))),l=l.return}o.length!==0&&t.push({event:e,listeners:o})}var Pg=/\r\n?/g,tp=/\u0000|\uFFFD/g;function rd(t){return(typeof t=="string"?t:""+t).replace(Pg,`
49
+ `).replace(tp,"")}function od(t,e){return e=rd(e),rd(t)===e}function yt(t,e,l,n,a,i){switch(l){case"children":typeof n=="string"?e==="body"||e==="textarea"&&n===""||An(t,n):(typeof n=="number"||typeof n=="bigint")&&e!=="body"&&An(t,""+n);break;case"className":Ei(t,"class",n);break;case"tabIndex":Ei(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ei(t,l,n);break;case"style":co(t,n,i);break;case"data":if(e!=="object"){Ei(t,"data",n);break}case"src":case"href":if(n===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Ai(""+n),t.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){t.setAttribute(l,"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 i=="function"&&(l==="formAction"?(e!=="input"&&yt(t,e,"name",a.name,a,null),yt(t,e,"formEncType",a.formEncType,a,null),yt(t,e,"formMethod",a.formMethod,a,null),yt(t,e,"formTarget",a.formTarget,a,null)):(yt(t,e,"encType",a.encType,a,null),yt(t,e,"method",a.method,a,null),yt(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Ai(""+n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=Ie);break;case"onScroll":n!=null&&P("scroll",t);break;case"onScrollEnd":n!=null&&P("scrollend",t);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(c(60));t.innerHTML=l}}break;case"multiple":t.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":t.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){t.removeAttribute("xlink:href");break}l=Ai(""+n),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""+n):t.removeAttribute(l);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":n&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":n===!0?t.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?t.setAttribute(l,n):t.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?t.removeAttribute(l):t.setAttribute(l,n);break;case"popover":P("beforetoggle",t),P("toggle",t),bi(t,"popover",n);break;case"xlinkActuate":Fe(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Fe(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Fe(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Fe(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Fe(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Fe(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":bi(t,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=zy.get(l)||l,bi(t,l,n))}}function Wc(t,e,l,n,a,i){switch(l){case"style":co(t,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(c(60));t.innerHTML=l}}break;case"children":typeof n=="string"?An(t,n):(typeof n=="number"||typeof n=="bigint")&&An(t,""+n);break;case"onScroll":n!=null&&P("scroll",t);break;case"onScrollEnd":n!=null&&P("scrollend",t);break;case"onClick":n!=null&&(t.onclick=Ie);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Pr.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),e=l.slice(2,a?l.length-7:void 0),i=t[ie]||null,i=i!=null?i[l]:null,typeof i=="function"&&t.removeEventListener(e,i,a),typeof n=="function")){typeof i!="function"&&i!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(e,n,a);break t}l in t?t[l]=n:n===!0?t.setAttribute(l,""):bi(t,l,n)}}}function Wt(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":P("error",t),P("load",t);var n=!1,a=!1,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,e));default:yt(t,e,i,o,l,null)}}a&&yt(t,e,"srcSet",l.srcSet,l,null),n&&yt(t,e,"src",l.src,l,null);return;case"input":P("invalid",t);var h=i=o=a=null,m=null,A=null;for(n in l)if(l.hasOwnProperty(n)){var M=l[n];if(M!=null)switch(n){case"name":a=M;break;case"type":o=M;break;case"checked":m=M;break;case"defaultChecked":A=M;break;case"value":i=M;break;case"defaultValue":h=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(c(137,e));break;default:yt(t,e,n,M,l,null)}}ao(t,i,h,m,A,o,a,!1);return;case"select":P("invalid",t),n=o=i=null;for(a in l)if(l.hasOwnProperty(a)&&(h=l[a],h!=null))switch(a){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":n=h;default:yt(t,e,a,h,l,null)}e=i,l=o,t.multiple=!!n,e!=null?Tn(t,!!n,e,!1):l!=null&&Tn(t,!!n,l,!0);return;case"textarea":P("invalid",t),i=a=n=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":n=h;break;case"defaultValue":a=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:yt(t,e,o,h,l,null)}uo(t,n,a,i);return;case"option":for(m in l)if(l.hasOwnProperty(m)&&(n=l[m],n!=null))switch(m){case"selected":t.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:yt(t,e,m,n,l,null)}return;case"dialog":P("beforetoggle",t),P("toggle",t),P("cancel",t),P("close",t);break;case"iframe":case"object":P("load",t);break;case"video":case"audio":for(n=0;n<Za.length;n++)P(Za[n],t);break;case"image":P("error",t),P("load",t);break;case"details":P("toggle",t);break;case"embed":case"source":case"link":P("error",t),P("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in l)if(l.hasOwnProperty(A)&&(n=l[A],n!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,e));default:yt(t,e,A,n,l,null)}return;default:if(rs(e)){for(M in l)l.hasOwnProperty(M)&&(n=l[M],n!==void 0&&Wc(t,e,M,n,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(n=l[h],n!=null&&yt(t,e,h,n,l,null))}function ep(t,e,l,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,o=null,h=null,m=null,A=null,M=null;for(x in l){var D=l[x];if(l.hasOwnProperty(x)&&D!=null)switch(x){case"checked":break;case"value":break;case"defaultValue":m=D;default:n.hasOwnProperty(x)||yt(t,e,x,null,n,D)}}for(var _ in n){var x=n[_];if(D=l[_],n.hasOwnProperty(_)&&(x!=null||D!=null))switch(_){case"type":i=x;break;case"name":a=x;break;case"checked":A=x;break;case"defaultChecked":M=x;break;case"value":o=x;break;case"defaultValue":h=x;break;case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(c(137,e));break;default:x!==D&&yt(t,e,_,x,n,D)}}ss(t,o,h,m,A,M,i,a);return;case"select":x=o=h=_=null;for(i in l)if(m=l[i],l.hasOwnProperty(i)&&m!=null)switch(i){case"value":break;case"multiple":x=m;default:n.hasOwnProperty(i)||yt(t,e,i,null,n,m)}for(a in n)if(i=n[a],m=l[a],n.hasOwnProperty(a)&&(i!=null||m!=null))switch(a){case"value":_=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==m&&yt(t,e,a,i,n,m)}e=h,l=o,n=x,_!=null?Tn(t,!!l,_,!1):!!n!=!!l&&(e!=null?Tn(t,!!l,e,!0):Tn(t,!!l,l?[]:"",!1));return;case"textarea":x=_=null;for(h in l)if(a=l[h],l.hasOwnProperty(h)&&a!=null&&!n.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:yt(t,e,h,null,n,a)}for(o in n)if(a=n[o],i=l[o],n.hasOwnProperty(o)&&(a!=null||i!=null))switch(o){case"value":_=a;break;case"defaultValue":x=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(c(91));break;default:a!==i&&yt(t,e,o,a,n,i)}io(t,_,x);return;case"option":for(var B in l)if(_=l[B],l.hasOwnProperty(B)&&_!=null&&!n.hasOwnProperty(B))switch(B){case"selected":t.selected=!1;break;default:yt(t,e,B,null,n,_)}for(m in n)if(_=n[m],x=l[m],n.hasOwnProperty(m)&&_!==x&&(_!=null||x!=null))switch(m){case"selected":t.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:yt(t,e,m,_,n,x)}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 X in l)_=l[X],l.hasOwnProperty(X)&&_!=null&&!n.hasOwnProperty(X)&&yt(t,e,X,null,n,_);for(A in n)if(_=n[A],x=l[A],n.hasOwnProperty(A)&&_!==x&&(_!=null||x!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,e));break;default:yt(t,e,A,_,n,x)}return;default:if(rs(e)){for(var gt in l)_=l[gt],l.hasOwnProperty(gt)&&_!==void 0&&!n.hasOwnProperty(gt)&&Wc(t,e,gt,void 0,n,_);for(M in n)_=n[M],x=l[M],!n.hasOwnProperty(M)||_===x||_===void 0&&x===void 0||Wc(t,e,M,_,n,x);return}}for(var S in l)_=l[S],l.hasOwnProperty(S)&&_!=null&&!n.hasOwnProperty(S)&&yt(t,e,S,null,n,_);for(D in n)_=n[D],x=l[D],!n.hasOwnProperty(D)||_===x||_==null&&x==null||yt(t,e,D,_,n,x)}function fd(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lp(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],i=a.transferSize,o=a.initiatorType,h=a.duration;if(i&&h&&fd(o)){for(o=0,h=a.responseEnd,n+=1;n<l.length;n++){var m=l[n],A=m.startTime;if(A>h)break;var M=m.transferSize,D=m.initiatorType;M&&fd(D)&&(m=m.responseEnd,o+=M*(m<h?1:(h-A)/(m-A)))}if(--n,e+=8*(i+o)/(a.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var $c=null,Fc=null;function vu(t){return t.nodeType===9?t:t.ownerDocument}function hd(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dd(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Ic(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Pc=null;function np(){var t=window.event;return t&&t.type==="popstate"?t===Pc?!1:(Pc=t,!0):(Pc=null,!1)}var md=typeof setTimeout=="function"?setTimeout:void 0,ap=typeof clearTimeout=="function"?clearTimeout:void 0,yd=typeof Promise=="function"?Promise:void 0,ip=typeof queueMicrotask=="function"?queueMicrotask:typeof yd<"u"?function(t){return yd.resolve(null).then(t).catch(up)}:md;function up(t){setTimeout(function(){throw t})}function Bl(t){return t==="head"}function gd(t,e){var l=e,n=0;do{var a=l.nextSibling;if(t.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){t.removeChild(a),ta(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")ka(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,ka(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[ha]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&ka(t.ownerDocument.body);l=a}while(l);ta(e)}function pd(t,e){var l=t;t=0;do{var n=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=n}while(l)}function tr(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":tr(l),is(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function sp(t,e,l,n){for(;t.nodeType===1;){var a=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(n){if(!t[ha])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=we(t.nextSibling),t===null)break}return null}function cp(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=we(t.nextSibling),t===null))return null;return t}function vd(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=we(t.nextSibling),t===null))return null;return t}function er(t){return t.data==="$?"||t.data==="$~"}function lr(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function rp(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var n=function(){e(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),t._reactRetry=n}}function we(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var nr=null;function Sd(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return we(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function bd(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function Ed(t,e,l){switch(e=vu(l),t){case"html":if(t=e.documentElement,!t)throw Error(c(452));return t;case"head":if(t=e.head,!t)throw Error(c(453));return t;case"body":if(t=e.body,!t)throw Error(c(454));return t;default:throw Error(c(451))}}function ka(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);is(t)}var Re=new Map,Td=new Set;function Su(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ml=U.d;U.d={f:op,r:fp,D:hp,C:dp,L:mp,m:yp,X:pp,S:gp,M:vp};function op(){var t=ml.f(),e=ou();return t||e}function fp(t){var e=Sn(t);e!==null&&e.tag===5&&e.type==="form"?qf(e):ml.r(t)}var Fn=typeof document>"u"?null:document;function Ad(t,e,l){var n=Fn;if(n&&typeof e=="string"&&e){var a=_e(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),Td.has(a)||(Td.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),Wt(e,"link",t),Gt(e),n.head.appendChild(e)))}}function hp(t){ml.D(t),Ad("dns-prefetch",t,null)}function dp(t,e){ml.C(t,e),Ad("preconnect",t,e)}function mp(t,e,l){ml.L(t,e,l);var n=Fn;if(n&&t&&e){var a='link[rel="preload"][as="'+_e(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+_e(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+_e(l.imageSizes)+'"]')):a+='[href="'+_e(t)+'"]';var i=a;switch(e){case"style":i=In(t);break;case"script":i=Pn(t)}Re.has(i)||(t=R({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Re.set(i,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(Wa(i))||e==="script"&&n.querySelector($a(i))||(e=n.createElement("link"),Wt(e,"link",t),Gt(e),n.head.appendChild(e)))}}function yp(t,e){ml.m(t,e);var l=Fn;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+_e(n)+'"][href="'+_e(t)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Pn(t)}if(!Re.has(i)&&(t=R({rel:"modulepreload",href:t},e),Re.set(i,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector($a(i)))return}n=l.createElement("link"),Wt(n,"link",t),Gt(n),l.head.appendChild(n)}}}function gp(t,e,l){ml.S(t,e,l);var n=Fn;if(n&&t){var a=bn(n).hoistableStyles,i=In(t);e=e||"default";var o=a.get(i);if(!o){var h={loading:0,preload:null};if(o=n.querySelector(Wa(i)))h.loading=5;else{t=R({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Re.get(i))&&ar(t,l);var m=o=n.createElement("link");Gt(m),Wt(m,"link",t),m._p=new Promise(function(A,M){m.onload=A,m.onerror=M}),m.addEventListener("load",function(){h.loading|=1}),m.addEventListener("error",function(){h.loading|=2}),h.loading|=4,bu(o,e,n)}o={type:"stylesheet",instance:o,count:1,state:h},a.set(i,o)}}}function pp(t,e){ml.X(t,e);var l=Fn;if(l&&t){var n=bn(l).hoistableScripts,a=Pn(t),i=n.get(a);i||(i=l.querySelector($a(a)),i||(t=R({src:t,async:!0},e),(e=Re.get(a))&&ir(t,e),i=l.createElement("script"),Gt(i),Wt(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function vp(t,e){ml.M(t,e);var l=Fn;if(l&&t){var n=bn(l).hoistableScripts,a=Pn(t),i=n.get(a);i||(i=l.querySelector($a(a)),i||(t=R({src:t,async:!0,type:"module"},e),(e=Re.get(a))&&ir(t,e),i=l.createElement("script"),Gt(i),Wt(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function _d(t,e,l,n){var a=(a=F.current)?Su(a):null;if(!a)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=In(l.href),l=bn(a).hoistableStyles,n=l.get(e),n||(n={type:"style",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=In(l.href);var i=bn(a).hoistableStyles,o=i.get(t);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,o),(i=a.querySelector(Wa(t)))&&!i._p&&(o.instance=i,o.state.loading=5),Re.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Re.set(t,l),i||Sp(a,t,l,o.state))),e&&n===null)throw Error(c(528,""));return o}if(e&&n!==null)throw Error(c(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Pn(l),l=bn(a).hoistableScripts,n=l.get(e),n||(n={type:"script",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function In(t){return'href="'+_e(t)+'"'}function Wa(t){return'link[rel="stylesheet"]['+t+"]"}function xd(t){return R({},t,{"data-precedence":t.precedence,precedence:null})}function Sp(t,e,l,n){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=t.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),Wt(e,"link",l),Gt(e),t.head.appendChild(e))}function Pn(t){return'[src="'+_e(t)+'"]'}function $a(t){return"script[async]"+t}function Md(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+_e(l.href)+'"]');if(n)return e.instance=n,Gt(n),n;var a=R({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),Gt(n),Wt(n,"style",a),bu(n,l.precedence,t),e.instance=n;case"stylesheet":a=In(l.href);var i=t.querySelector(Wa(a));if(i)return e.state.loading|=4,e.instance=i,Gt(i),i;n=xd(l),(a=Re.get(a))&&ar(n,a),i=(t.ownerDocument||t).createElement("link"),Gt(i);var o=i;return o._p=new Promise(function(h,m){o.onload=h,o.onerror=m}),Wt(i,"link",n),e.state.loading|=4,bu(i,l.precedence,t),e.instance=i;case"script":return i=Pn(l.src),(a=t.querySelector($a(i)))?(e.instance=a,Gt(a),a):(n=l,(a=Re.get(i))&&(n=R({},l),ir(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),Gt(a),Wt(a,"link",n),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,bu(n,l.precedence,t));return e.instance}function bu(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,o=0;o<n.length;o++){var h=n[o];if(h.dataset.precedence===e)i=h;else if(i!==a)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function ar(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function ir(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Eu=null;function Cd(t,e,l){if(Eu===null){var n=new Map,a=Eu=new Map;a.set(l,n)}else a=Eu,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(t))return n;for(n.set(t,null),l=l.getElementsByTagName(t),a=0;a<l.length;a++){var i=l[a];if(!(i[ha]||i[Vt]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(e)||"";o=t+o;var h=n.get(o);h?h.push(i):n.set(o,[i])}}return n}function zd(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function bp(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Od(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Ep(t,e,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=In(n.href),i=e.querySelector(Wa(a));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Tu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=i,Gt(i);return}i=e.ownerDocument||e,n=xd(n),(a=Re.get(a))&&ar(n,a),i=i.createElement("link"),Gt(i);var o=i;o._p=new Promise(function(h,m){o.onload=h,o.onerror=m}),Wt(i,"link",n),l.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Tu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var ur=0;function Tp(t,e){return t.stylesheets&&t.count===0&&_u(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&_u(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&ur===0&&(ur=62500*lp());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&_u(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>ur?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Tu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_u(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Au=null;function _u(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Au=new Map,e.forEach(Ap,t),Au=null,Tu.call(t))}function Ap(t,e){if(!(e.state.loading&4)){var l=Au.get(t);if(l)var n=l.get(null);else{l=new Map,Au.set(t,l);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var o=a[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),n=o)}n&&l.set(null,n)}a=e.instance,o=a.getAttribute("data-precedence"),i=l.get(o)||n,i===n&&l.set(null,a),l.set(o,a),this.count++,n=Tu.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var Fa={$$typeof:Nt,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function _p(t,e,l,n,a,i,o,h,m){this.tag=1,this.containerInfo=t,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=es(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=es(0),this.hiddenUpdates=es(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function Dd(t,e,l,n,a,i,o,h,m,A,M,D){return t=new _p(t,e,l,o,m,A,M,D,h),e=1,i===!0&&(e|=24),i=pe(3,null,null,e),t.current=i,i.stateNode=t,e=qs(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:n,isDehydrated:l,cache:e},Qs(i),t}function wd(t){return t?(t=Dn,t):Dn}function Rd(t,e,l,n,a,i){a=wd(a),n.context===null?n.context=a:n.pendingContext=a,n=xl(e),n.payload={element:l},i=i===void 0?null:i,i!==null&&(n.callback=i),l=Ml(t,n,e),l!==null&&(fe(l,t,e),Oa(l,t,e))}function Ud(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function sr(t,e){Ud(t,e),(t=t.alternate)&&Ud(t,e)}function Nd(t){if(t.tag===13||t.tag===31){var e=tn(t,67108864);e!==null&&fe(e,t,67108864),sr(t,67108864)}}function Hd(t){if(t.tag===13||t.tag===31){var e=Te();e=ls(e);var l=tn(t,e);l!==null&&fe(l,t,e),sr(t,e)}}var xu=!0;function xp(t,e,l,n){var a=z.T;z.T=null;var i=U.p;try{U.p=2,cr(t,e,l,n)}finally{U.p=i,z.T=a}}function Mp(t,e,l,n){var a=z.T;z.T=null;var i=U.p;try{U.p=8,cr(t,e,l,n)}finally{U.p=i,z.T=a}}function cr(t,e,l,n){if(xu){var a=rr(n);if(a===null)kc(t,e,n,Mu,l),Ld(t,n);else if(zp(a,t,e,l,n))n.stopPropagation();else if(Ld(t,n),e&4&&-1<Cp.indexOf(t)){for(;a!==null;){var i=Sn(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Wl(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var m=1<<31-ye(o);h.entanglements[1]|=m,o&=~m}Ze(i),(st&6)===0&&(cu=de()+500,Va(0))}}break;case 31:case 13:h=tn(i,2),h!==null&&fe(h,i,2),ou(),sr(i,2)}if(i=rr(n),i===null&&kc(t,e,n,Mu,l),i===a)break;a=i}a!==null&&n.stopPropagation()}else kc(t,e,n,null,l)}}function rr(t){return t=fs(t),or(t)}var Mu=null;function or(t){if(Mu=null,t=vn(t),t!==null){var e=d(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=y(e),t!==null)return t;t=null}else if(l===31){if(t=p(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Mu=t,null}function Bd(t){switch(t){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(hy()){case Gr:return 2;case Qr:return 8;case yi:case dy:return 32;case Kr:return 268435456;default:return 32}default:return 32}}var fr=!1,Ll=null,jl=null,ql=null,Ia=new Map,Pa=new Map,Yl=[],Cp="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 Ld(t,e){switch(t){case"focusin":case"focusout":Ll=null;break;case"dragenter":case"dragleave":jl=null;break;case"mouseover":case"mouseout":ql=null;break;case"pointerover":case"pointerout":Ia.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pa.delete(e.pointerId)}}function ti(t,e,l,n,a,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:l,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},e!==null&&(e=Sn(e),e!==null&&Nd(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function zp(t,e,l,n,a){switch(e){case"focusin":return Ll=ti(Ll,t,e,l,n,a),!0;case"dragenter":return jl=ti(jl,t,e,l,n,a),!0;case"mouseover":return ql=ti(ql,t,e,l,n,a),!0;case"pointerover":var i=a.pointerId;return Ia.set(i,ti(Ia.get(i)||null,t,e,l,n,a)),!0;case"gotpointercapture":return i=a.pointerId,Pa.set(i,ti(Pa.get(i)||null,t,e,l,n,a)),!0}return!1}function jd(t){var e=vn(t.target);if(e!==null){var l=d(e);if(l!==null){if(e=l.tag,e===13){if(e=y(l),e!==null){t.blockedOn=e,$r(t.priority,function(){Hd(l)});return}}else if(e===31){if(e=p(l),e!==null){t.blockedOn=e,$r(t.priority,function(){Hd(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Cu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=rr(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);os=n,l.target.dispatchEvent(n),os=null}else return e=Sn(l),e!==null&&Nd(e),t.blockedOn=l,!1;e.shift()}return!0}function qd(t,e,l){Cu(t)&&l.delete(e)}function Op(){fr=!1,Ll!==null&&Cu(Ll)&&(Ll=null),jl!==null&&Cu(jl)&&(jl=null),ql!==null&&Cu(ql)&&(ql=null),Ia.forEach(qd),Pa.forEach(qd)}function zu(t,e){t.blockedOn===e&&(t.blockedOn=null,fr||(fr=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Op)))}var Ou=null;function Yd(t){Ou!==t&&(Ou=t,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Ou===t&&(Ou=null);for(var e=0;e<t.length;e+=3){var l=t[e],n=t[e+1],a=t[e+2];if(typeof n!="function"){if(or(n||l)===null)continue;break}var i=Sn(l);i!==null&&(t.splice(e,3),e-=3,rc(i,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function ta(t){function e(m){return zu(m,t)}Ll!==null&&zu(Ll,t),jl!==null&&zu(jl,t),ql!==null&&zu(ql,t),Ia.forEach(e),Pa.forEach(e);for(var l=0;l<Yl.length;l++){var n=Yl[l];n.blockedOn===t&&(n.blockedOn=null)}for(;0<Yl.length&&(l=Yl[0],l.blockedOn===null);)jd(l),l.blockedOn===null&&Yl.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],i=l[n+1],o=a[ie]||null;if(typeof i=="function")o||Yd(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[ie]||null)h=o.formAction;else if(or(a)!==null)continue}else h=o.action;typeof h=="function"?l[n+1]=h:(l.splice(n,3),n-=3),Yd(l)}}}function Xd(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function hr(t){this._internalRoot=t}Du.prototype.render=hr.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(c(409));var l=e.current,n=Te();Rd(l,n,t,e,null,null)},Du.prototype.unmount=hr.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Rd(t.current,2,null,t,null,null),ou(),e[pn]=null}};function Du(t){this._internalRoot=t}Du.prototype.unstable_scheduleHydration=function(t){if(t){var e=Wr();t={blockedOn:null,target:t,priority:e};for(var l=0;l<Yl.length&&e!==0&&e<Yl[l].priority;l++);Yl.splice(l,0,t),l===0&&jd(t)}};var Gd=u.version;if(Gd!=="19.2.3")throw Error(c(527,Gd,"19.2.3"));U.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(c(188)):(t=Object.keys(t).join(","),Error(c(268,t)));return t=b(e),t=t!==null?H(t):null,t=t===null?null:t.stateNode,t};var Dp={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{ra=wu.inject(Dp),me=wu}catch{}}return ai.createRoot=function(t,e){if(!f(t))throw Error(c(299));var l=!1,n="",a=Wf,i=$f,o=Ff;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(o=e.onRecoverableError)),e=Dd(t,1,!1,null,null,l,n,null,a,i,o,Xd),t[pn]=e.current,Jc(t),new hr(e)},ai.hydrateRoot=function(t,e,l){if(!f(t))throw Error(c(299));var n=!1,a="",i=Wf,o=$f,h=Ff,m=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(m=l.formState)),e=Dd(t,1,!0,e,l??null,n,a,m,i,o,h,Xd),e.context=wd(null),l=e.current,n=Te(),n=ls(n),a=xl(n),a.callback=null,Ml(l,a,n),l=n,e.current.lanes=l,fa(e,l),Ze(e),t[pn]=e.current,Jc(t),new Du(e)},ai.version="19.2.3",ai}var em;function Vp(){if(em)return yr.exports;em=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),yr.exports=Kp(),yr.exports}var Zp=Vp();function lm(r){return r!==null&&typeof r=="object"&&[null,Object.prototype].includes(Object.getPrototypeOf(r))||Array.isArray(r)}function Ar(r,u,s=new WeakMap){if(Object.is(r,u))return!0;if(typeof r=="function"&&typeof u=="function")return typeof r==typeof u;if(!lm(r)||!lm(u))return!1;const c=s.get(r);if(c&&c===u)return!0;if(s.set(r,u),Array.isArray(r)||Array.isArray(u)){if(!Array.isArray(r)||!Array.isArray(u)||r.length!==u.length)return!1;for(let y=0;y<r.length;y++)if(!Ar(r[y],u[y],s))return!1;return!0}const f=Object.keys(r),d=Object.keys(u);if(f.length!==d.length)return!1;for(let y=0;y<f.length;y++){const p=f[y];if(!Object.prototype.hasOwnProperty.call(u,p))return!1;const E=r[p],b=u[p];if(!Ar(E,b,s))return!1}return!0}function Jp(r){const u=[],s=(d,y)=>y.reduce((p,E)=>p==null?p:p[E],d),c=(d,y)=>(...p)=>{const E=s(r.current,d),b=E==null?void 0:E[y];if(typeof b=="function")return b.apply(E,p)},f=d=>{if(typeof d=="function"){const y=u[u.length-1],p=u.slice(0,-1);return c(p,y)}if(Array.isArray(d)){const y=u.length,p=new Array(d.length);for(let E=0;E<d.length;E++)u[y]=E,p[E]=f(d[E]);return u.length=y,p}if(d&&typeof d=="object"){const y=u.length,p={};for(const E of Object.keys(d))u[y]=E,p[E]=f(d[E]);return u.length=y,p}return d};return f(r.current)}function kp(r){const u=Wd.useRef(r);u.current=r;const s=Wd.useRef(null);return(!s.current||!Ar(s.current.snapshot,r))&&(s.current={snapshot:r,shaped:Jp(u)}),s.current.shaped}const Wp=Object.freeze(["focusComposer","setThreadId","focusMessage","sendUserMessage","setComposerValue","setRuntimeCapabilities","fetchUpdates","sendCustomAction"]);function $p(r){const u=bt.useRef(null),s=kp(r),c=bt.useMemo(()=>Wp.reduce((y,p)=>(y[p]=(...E)=>{if(!u.current){console.warn("ChatKit element is not mounted");return}return u.current[p](...E)},y),{}),[]),f=bt.useCallback(y=>{u.current=y},[]),d=bt.useMemo(()=>{const y={},p={};for(const[E,b]of Object.entries(s))/^on[A-Z]/.test(E)&&E!=="onClientTool"?p[E]=b:y[E]=b;return{setInstance:f,options:y,handlers:p}},[s,f]);return bt.useMemo(()=>({...c,control:d,ref:u}),[c,d])}class Fp{constructor(){St(this,"callbacks",new Map)}on(u,s){this.callbacks.has(u)||this.callbacks.set(u,new Set),this.callbacks.get(u).add(s)}emit(u,...s){var f;const c=s[0];(f=this.callbacks.get(u))==null||f.forEach(d=>d(c))}off(u,s){var c;s?(c=this.callbacks.get(u))==null||c.delete(s):this.callbacks.delete(u)}allOff(){this.callbacks.clear()}}async function Ip(r,u){const s=r.getReader();let c;for(;!(c=await s.read()).done;)u(c.value)}function Pp(r){let u,s,c,f=!1;return function(y){u===void 0?(u=y,s=0,c=-1):u=e0(u,y);const p=u.length;let E=0;for(;s<p;){f&&(u[s]===10&&(E=++s),f=!1);let b=-1;for(;s<p&&b===-1;++s)switch(u[s]){case 58:c===-1&&(c=s-E);break;case 13:f=!0;case 10:b=s;break}if(b===-1)break;r(u.subarray(E,b),c),E=s,c=-1}E===p?u=void 0:E!==0&&(u=u.subarray(E),s-=E)}}function t0(r,u,s){let c=nm();const f=new TextDecoder;return function(y,p){if(y.length===0)s==null||s(c),c=nm();else if(p>0){const E=f.decode(y.subarray(0,p)),b=p+(y[p+1]===32?2:1),H=f.decode(y.subarray(b));switch(E){case"data":c.data=c.data?c.data+`
50
+ `+H:H;break;case"event":c.event=H;break;case"id":r(c.id=H);break;case"retry":const R=parseInt(H,10);isNaN(R)||u(c.retry=R);break}}}}function e0(r,u){const s=new Uint8Array(r.length+u.length);return s.set(r),s.set(u,r.length),s}function nm(){return{data:"",event:"",id:"",retry:void 0}}var l0=function(r,u){var s={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&u.indexOf(c)<0&&(s[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,c=Object.getOwnPropertySymbols(r);f<c.length;f++)u.indexOf(c[f])<0&&Object.prototype.propertyIsEnumerable.call(r,c[f])&&(s[c[f]]=r[c[f]]);return s};const _r="text/event-stream",n0=1e3,am="last-event-id";function a0(r,u){var{signal:s,headers:c,onopen:f,onmessage:d,onclose:y,onerror:p,openWhenHidden:E,fetch:b}=u,H=l0(u,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((R,W)=>{const ct=Object.assign({},c);ct.accept||(ct.accept=_r);let Et;function ut(){Et.abort(),document.hidden||ne()}E||document.addEventListener("visibilitychange",ut);let Mt=n0,Tt=0;function Ut(){document.removeEventListener("visibilitychange",ut),window.clearTimeout(Tt),Et.abort()}s==null||s.addEventListener("abort",()=>{Ut(),R()});const Nt=b??window.fetch,le=f??i0;async function ne(){var Xt;Et=new AbortController;try{const $=await Nt(r,Object.assign(Object.assign({},H),{headers:ct,signal:Et.signal}));await le($),await Ip($.body,Pp(t0(Ct=>{Ct?ct[am]=Ct:delete ct[am]},Ct=>{Mt=Ct},d))),y==null||y(),Ut(),R()}catch($){if(!Et.signal.aborted)try{const Ct=(Xt=p==null?void 0:p($))!==null&&Xt!==void 0?Xt:Mt;window.clearTimeout(Tt),Tt=window.setTimeout(ne,Ct)}catch(Ct){Ut(),W(Ct)}}}ne()})}function i0(r){const u=r.headers.get("content-type");if(!(u!=null&&u.startsWith(_r)))throw new Error(`Expected content-type to be ${_r}, Actual: ${u}`)}const ia="__chatkit_error__";class Gu extends Error{constructor(s,c,f){super(s);St(this,"status");St(this,"statusText");St(this,"metadata");this.name="HttpError",this.statusText=c.statusText,this.status=c.status,this.metadata=f}static fromPossibleFrameSafeError(s){if(s instanceof Gu)return s;if(s&&typeof s=="object"&&ia in s&&s[ia]==="HttpError"){const c=s,f=new Gu(c.message,{status:c.status,statusText:c.statusText},c.metadata);return f.stack=c.stack,f}return null}}var Am;Am=ia;const qr=class qr{constructor(u,s,c){St(this,Am,"HttpError");St(this,"message");St(this,"stack");St(this,"status");St(this,"statusText");St(this,"metadata");this.message=u,this.stack=new Error(u).stack,this.status=s.status,this.statusText=s.statusText,this.metadata=c}static fromHttpError(u){return new qr(u.message,{status:u.status,statusText:u.statusText},u.metadata)}};let Qu=qr;const u0=1e3,s0=1e4,c0=5,r0=(r,u=s0,s=u0)=>{const c=Math.min(u,s*2**r);return Math.floor(c*(.5+Math.random()*.5))};class im extends Error{constructor(u){super(),this.cause=u}}const o0=async(r,u)=>{let s=0;const{onopen:c,...f}=u;await a0(r,{...f,onopen:async d=>{var p;if(c==null||c(d),d.ok&&((p=d.headers.get("content-type"))!=null&&p.startsWith("text/event-stream"))){s=0;return}const y=new Qu(`Streaming failed: ${d.statusText}`,d);throw d.status>=400&&d.status<500?y:new im(y)},onerror:d=>{if(d instanceof im){if(s>=c0)throw d.cause;return s+=1,r0(s)}throw d}})};function xm(){const r=globalThis.crypto;if(typeof(r==null?void 0:r.randomUUID)=="function")return r.randomUUID();if(typeof(r==null?void 0:r.getRandomValues)=="function"){const u=new Uint8Array(16);return r.getRandomValues(u),u[6]=u[6]&15|64,u[8]=u[8]&63|128,[...u].map(s=>s.toString(16).padStart(2,"0")).join("").replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/,"$1-$2-$3-$4-$5")}return null}function Sr(){return xm()??`ck_${Date.now()}_${Math.random().toString(16).slice(2)}`}function f0(r,{channelId:u,expectedOrigin:s,expectedSource:c}){const f=r.data;if(!f||typeof f!="object"||!("__xpaiChatKit"in f)||f.__xpaiChatKit!==!0||s!=="*"&&r.origin!==s)return!1;if(r.source===c)return!0;const d=u==null?void 0:u.trim();return d?"channelId"in f&&f.channelId===d:!1}let h0=class Mm extends Error{constructor(s){super(s);St(this,"_name");this.name="IntegrationError",this._name=this.name}static fromPossibleFrameSafeError(s){if(s&&typeof s=="object"&&ia in s&&s[ia]==="IntegrationError"){const c=s,f=new Mm(c.message);return f.stack=c.stack,f}return null}};var _m;_m=ia;class d0{constructor(u){St(this,_m,"IntegrationError");St(this,"message");St(this,"stack");this.message=u,this.stack=new Error(u).stack}}class m0{constructor({handlers:u,target:s,targetOrigin:c,channelId:f,fetch:d=window.fetch}){St(this,"targetOrigin");St(this,"target");St(this,"channelId");St(this,"commandHandlers");St(this,"_fetch");St(this,"emitter",new Fp);St(this,"handlers",new Map);St(this,"fetchEventSourceHandlers",new Map);St(this,"abortControllers",new Map);St(this,"commands",new Proxy({},{get:(u,s)=>(c,f)=>new Promise((d,y)=>{const p=Sr();this.handlers.set(p,{resolve:d,reject:y,stack:new Error().stack||""}),this.sendMessage({type:"command",nonce:p,command:`on${s.charAt(0).toUpperCase()}${s.slice(1)}`,data:c},f)})}));St(this,"handleMessage",async u=>{var c,f,d,y;if(!f0(u,{channelId:this.channelId,expectedOrigin:this.targetOrigin,expectedSource:this.target()}))return;const s=u.data;switch(s.type){case"event":{this.emitter.emit(s.event,s.data);break}case"fetch":{try{if(s.formData){const H=new FormData;for(const[R,W]of Object.entries(s.formData))H.append(R,W);s.params.body=H}const p=new AbortController;this.abortControllers.set(s.nonce,p),s.params.signal=p.signal;const E=await this._fetch(s.url,s.params);if(!E.ok){const H=await E.json().then(R=>R.message||E.statusText).catch(()=>E.statusText);throw new Qu(H,E)}const b=await E.json().catch(()=>({}));this.sendMessage({type:"response",response:b,nonce:s.nonce})}catch(p){this.sendMessage({type:"response",error:p,nonce:s.nonce})}break}case"fetchEventSource":{try{const p=new AbortController;this.abortControllers.set(s.nonce,p),await o0(s.url,{...s.params,signal:p.signal,fetch:this._fetch,onmessage:E=>{this.sendMessage({type:"fetchEventSourceMessage",message:E,nonce:s.nonce})}}),this.sendMessage({type:"response",response:void 0,nonce:s.nonce})}catch(p){this.sendMessage({type:"response",error:p,nonce:s.nonce})}break}case"command":{if(!this.canReceiveCommand(s.command)){this.sendMessage({type:"response",error:new d0(`Command ${s.command} not supported`),nonce:s.nonce});return}try{const p=await((f=(c=this.commandHandlers)[s.command])==null?void 0:f.call(c,s.data));this.sendMessage({type:"response",response:p,nonce:s.nonce})}catch(p){this.sendMessage({type:"response",error:p,nonce:s.nonce})}break}case"response":{const p=this.handlers.get(s.nonce);if(!p){console.error("No handler found for nonce",s.nonce);return}if(s.error){const E=h0.fromPossibleFrameSafeError(s.error),b=Gu.fromPossibleFrameSafeError(s.error);E?(E.stack=p.stack,p.reject(E)):b?p.reject(b):p.reject(s.error)}else p.resolve(s.response);this.handlers.delete(s.nonce);break}case"fetchEventSourceMessage":{if(!this.fetchEventSourceHandlers.get(s.nonce)){console.error("No handler found for nonce",s.nonce);return}(y=(d=this.fetchEventSourceHandlers.get(s.nonce))==null?void 0:d.onmessage)==null||y.call(d,s.message);break}case"abortSignal":{const p=this.abortControllers.get(s.nonce);p&&(p.abort(s.reason),this.abortControllers.delete(s.nonce));break}}});this.commandHandlers=u,this.target=s,this.targetOrigin=c,this.channelId=(f==null?void 0:f.trim())||void 0,this._fetch=((...y)=>d(...y))}setTargetOrigin(u){this.targetOrigin=u}sendMessage(u,s){var f;const c={__xpaiChatKit:!0,...this.channelId?{channelId:this.channelId}:{},...u};(f=this.target())==null||f.postMessage(c,this.targetOrigin,s)}connect(){window.addEventListener("message",this.handleMessage)}disconnect(){window.removeEventListener("message",this.handleMessage)}fetch(u,s){return new Promise((c,f)=>{const d=Sr();this.handlers.set(d,{resolve:c,reject:f,stack:new Error().stack||""});let y;if(s.body instanceof FormData){y={};for(const[p,E]of s.body.entries())y[p]=E;s.body=void 0}s.signal&&(s.signal.addEventListener("abort",()=>{var p;this.sendMessage({type:"abortSignal",nonce:d,reason:(p=s.signal)==null?void 0:p.reason})}),s.signal=void 0),this.sendMessage({type:"fetch",nonce:d,params:s,formData:y,url:u})})}fetchEventSource(u,s){return new Promise((c,f)=>{const{onmessage:d,signal:y,...p}=s,E=Sr();this.handlers.set(E,{resolve:c,reject:f,stack:new Error().stack||""}),this.fetchEventSourceHandlers.set(E,{onmessage:d}),y&&y.addEventListener("abort",()=>{this.sendMessage({type:"abortSignal",nonce:E,reason:y.reason})}),this.sendMessage({type:"fetchEventSource",nonce:E,params:p,url:u})})}emit(...[u,s,c]){this.sendMessage({type:"event",event:u,data:s},c)}on(...[u,s]){this.emitter.on(u,s)}destroy(){window.removeEventListener("message",this.handleMessage),this.emitter.allOff(),this.handlers.clear()}}const y0=r=>btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),g0=r=>{if(r===void 0)throw new TypeError("encodeBase64: `undefined` cannot be encoded to valid JSON. Pass null instead.");const u=JSON.stringify(r),s=new TextEncoder().encode(u);let c="";for(const f of s)c+=String.fromCharCode(f);return y0(c)};class It extends Error{}function p0(r){return r.message}const v0=["command.setOptions","command.sendUserMessage","command.setComposerValue","command.setRuntimeCapabilities","command.setThreadId","command.focusComposer","command.focusMessage","command.fetchUpdates","command.sendCustomAction","command.showHistory","command.hideHistory","event.ready","event.error","event.log","event.response.start","event.response.end","event.response.stop","event.thread.change","event.project.change","event.connectors.change","event.tool.change","event.thread.load.start","event.thread.load.end","event.deeplink","event.effect","error.StreamError","error.StreamEventParsingError","error.WidgetItemError","error.InitialThreadLoadError","error.FileAttachmentError","error.HistoryViewError","error.FatalAppError","error.IntegrationError","error.EntitySearchError","error.DomainVerificationRequestError","backend.threads.get_by_id","backend.threads.list","backend.threads.update","backend.threads.delete","backend.threads.create","backend.threads.add_user_message","backend.threads.add_client_tool_output","backend.threads.retry_after_item","backend.threads.custom_action","backend.attachments.create","backend.attachments.get_preview","backend.attachments.delete","backend.items.list","backend.items.feedback","thread.item.generated_image","thread.item.user_message","thread.item.assistant_message","thread.item.client_tool_call","thread.item.widget","thread.item.task","thread.item.workflow","thread.item.end_of_turn","thread.item.image_generation","widget.Basic","widget.Card","widget.ListView","widget.ListViewItem","widget.Badge","widget.Box","widget.Row","widget.Col","widget.Button","widget.Caption","widget.Chart","widget.Checkbox","widget.DatePicker","widget.Divider","widget.Form","widget.Icon","widget.Image","widget.Input","widget.Label","widget.Markdown","widget.RadioGroup","widget.Select","widget.Spacer","widget.Text","widget.Textarea","widget.Title","widget.Transition"],S0=["command.shareThread","command.setTrainingOptOut","event.thread.restore","event.message.share","event.image.download","event.history.open","event.history.close","event.log.chatgpt","error.HttpError","error.NetworkError","error.UnhandledError","error.UnhandledPromiseRejectionError","error.StreamEventHandlingError","error.StreamStopError","error.ThreadRenderingError","error.IntlError","error.AppError","backend.threads.stop","backend.threads.share","backend.threads.create_from_shared","backend.threads.init","backend.attachments.process","widget.CardCarousel","widget.Favicon","widget.CardLinkItem","widget.Map"],b0={chatkit:{allow:[...v0,"thread.item.image_generation"],deny:S0}},um=r=>{const u=b0[r],s=new Set(u.allow);for(const b of u.deny??[])s.delete(b);const c=new Set,f=new Set,d=new Set,y=new Set,p=new Set,E=new Set;for(const b of s){if(b.startsWith("command.")){c.add(b.slice(8));continue}if(b.startsWith("event.")){f.add(b.slice(6));continue}if(b.startsWith("backend.")){d.add(b.slice(8));continue}if(b.startsWith("thread.item.")&&y.add(b.slice(12)),b.startsWith("error.")){p.add(b.slice(6));continue}if(b.startsWith("widget.")){E.add(b.slice(7));continue}}return{commands:c,events:f,backend:d,threadItems:y,errors:p,widgets:E}};function E0(r){if(!r||typeof r!="object"||!("width"in r)||typeof r.width!="number"||!Number.isFinite(r.width)||r.width<=0||!("height"in r)||typeof r.height!="number"||!Number.isFinite(r.height)||r.height<=0||!("regions"in r)||!Array.isArray(r.regions)||r.regions.length>128)return null;const u=[];for(const s of r.regions){if(!s||typeof s!="object"||typeof s.x!="number"||!Number.isFinite(s.x)||s.x<0||typeof s.y!="number"||!Number.isFinite(s.y)||s.y<0||typeof s.width!="number"||!Number.isFinite(s.width)||s.width<=0||typeof s.height!="number"||!Number.isFinite(s.height)||s.height<=0||s.x+s.width>r.width+1||s.y+s.height>Math.min(r.height,96)+1)return null;u.push({x:s.x,y:s.y,width:s.width,height:s.height})}return{width:r.width,height:r.height,regions:u}}class T0{constructor(u,s){this.wrapper=u,this.enabled=s,this.size={width:0,height:0},this.layer=document.createElement("div"),this.layer.setAttribute("aria-hidden","true"),this.layer.dataset.slot="chatkit-window-drag",this.layer.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden;",u.append(this.layer),this.observer=new ResizeObserver(()=>{(this.wrapper.clientWidth!==this.size.width||this.wrapper.clientHeight!==this.size.height)&&this.clear()}),this.observer.observe(u)}update(u){if(this.clear(),!this.enabled())return;const s=E0(u);if(!(!s||Math.abs(s.width-this.wrapper.clientWidth)>1||Math.abs(s.height-this.wrapper.clientHeight)>1)){this.size={width:s.width,height:s.height};for(const c of s.regions){const f=document.createElement("div");f.style.cssText=`position:absolute;left:${c.x}px;top:${c.y}px;width:${c.width}px;height:${c.height}px;pointer-events:auto;user-select:none;-webkit-app-region:drag;`,this.layer.append(f)}}}clear(){this.layer.replaceChildren()}destroy(){this.observer.disconnect(),this.layer.remove()}}class A0 extends m0{canReceiveCommand(u){return!0}}const _0=["idle","running-right","running-left","waving","jumping","failed","waiting","running","review"],ii={columns:8,rows:9,cellWidth:192,cellHeight:208,animations:{idle:{row:0,frames:6,frameDurations:[280,110,110,140,140,320]},"running-right":{row:1,frames:8,frameDurations:[120,120,120,120,120,120,120,220]},"running-left":{row:2,frames:8,frameDurations:[120,120,120,120,120,120,120,220]},waving:{row:3,frames:4,frameDurations:[140,140,140,280]},jumping:{row:4,frames:5,frameDurations:[140,140,140,140,280]},failed:{row:5,frames:8,frameDurations:[140,140,140,140,140,140,140,240]},waiting:{row:6,frames:6,frameDurations:[150,150,150,150,150,260]},running:{row:7,frames:6,frameDurations:[120,120,120,120,120,220]},review:{row:8,frames:6,frameDurations:[150,150,150,150,150,280]}}},Nu={top:0,right:0,bottom:0,left:0},sm="chatkit:pet:position:v1",x0="/pets/boba/spritesheet.webp",xr={type:"sprite-atlas",src:x0},cm={pin:"bottom-right",draggable:!0,scale:.25,persist:!0,zIndex:40};function M0(r,u){return{row:(u==null?void 0:u.row)??r.row,frames:(u==null?void 0:u.frames)??r.frames,frameDurations:u!=null&&u.frameDurations&&u.frameDurations.length>0?u.frameDurations:r.frameDurations}}function C0(r,u=1){var c;const s={};for(const f of _0)s[f]=M0(ii.animations[f],(c=r==null?void 0:r.animations)==null?void 0:c[f]);return{columns:(r==null?void 0:r.columns)??ii.columns,rows:(r==null?void 0:r.rows)??(u===2?11:ii.rows),cellWidth:(r==null?void 0:r.cellWidth)??ii.cellWidth,cellHeight:(r==null?void 0:r.cellHeight)??ii.cellHeight,animations:s}}function z0(r){return r&&r.src?r:xr}function hi(r){return r?r===!0?{character:xr,position:cm,behavior:"auto",ariaLabel:"Animated pet",imageRendering:"auto"}:r.enabled===!1?null:{character:z0(r.character),position:{...cm,...r.position},behavior:r.behavior??"auto",ariaLabel:r.ariaLabel??"Animated pet",imageRendering:r.imageRendering??"auto"}:null}function O0(r){return r.src?{kind:"atlas",src:r.src,atlas:C0(r.atlas,r.spriteVersionNumber)}:null}function br(r){return typeof r=="number"?{top:r,right:r,bottom:r,left:r}:{top:(r==null?void 0:r.top)??Nu.top,right:(r==null?void 0:r.right)??Nu.right,bottom:(r==null?void 0:r.bottom)??Nu.bottom,left:(r==null?void 0:r.left)??Nu.left}}function Ne(r,u,s,c){const f=c.left,d=c.top,y=Math.max(f,s.width-u.width-c.right),p=Math.max(d,s.height-u.height-c.bottom);return{x:Math.min(y,Math.max(f,r.x)),y:Math.min(p,Math.max(d,r.y))}}function D0(r,u,s,c){const f=(s.width-u.width)/2,d=(s.height-u.height)/2,y=s.width-u.width-c.right,p=s.height-u.height-c.bottom;switch(r){case"top-left":return Ne({x:c.left,y:c.top},u,s,c);case"top":return Ne({x:f,y:c.top},u,s,c);case"top-right":return Ne({x:y,y:c.top},u,s,c);case"left":return Ne({x:c.left,y:d},u,s,c);case"center":return Ne({x:f,y:d},u,s,c);case"right":return Ne({x:y,y:d},u,s,c);case"bottom-left":return Ne({x:c.left,y:p},u,s,c);case"bottom":return Ne({x:f,y:p},u,s,c);case"bottom-right":default:return Ne({x:y,y:p},u,s,c)}}const Mr=(r,u=new WeakSet)=>{if(typeof r=="function")return"[ChatKitMethod]";if(typeof r!="object"||r===null||u.has(r))return r;if(u.add(r),Array.isArray(r))return r.map(c=>Mr(c,u));const s={};for(const[c,f]of Object.entries(r))typeof f!="function"?s[c]=Mr(f,u):s[c]="[ChatKitMethod]";return s},Hu=2,w0=.5,R0=1.5,U0=3,N0=2e3,rm=12,H0=320,Je=12,la=8,B0='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',om={"en-US":{closePetMenuItem:"Close pet",hideMessage:"Hide message",expandMessage:"Expand message",collapseMessage:"Collapse message",restoreMessage:"Show message",replyButton:"Reply",replyPlaceholder:"Reply...",sendButton:"Send",sendingButton:"Sending...",sendFailed:"Failed to send"},"zh-CN":{closePetMenuItem:"关闭宠物",hideMessage:"隐藏消息",expandMessage:"展开消息",collapseMessage:"收起消息",restoreMessage:"显示消息",replyButton:"回复",replyPlaceholder:"输入回复...",sendButton:"发送",sendingButton:"发送中...",sendFailed:"发送失败"}};function Bu(r){r.stopPropagation()}function na(){const r=window.visualViewport;return{width:(r==null?void 0:r.width)||window.innerWidth||320,height:(r==null?void 0:r.height)||window.innerHeight||480}}function L0(r,u){if(!u)return null;try{const s=window.localStorage.getItem(r);if(!s)return null;const c=JSON.parse(s);return!c||typeof c!="object"||typeof c.x!="number"||typeof c.y!="number"?null:{x:c.x,y:c.y}}catch{return null}}function j0(r,u,s){if(u)try{window.localStorage.setItem(r,JSON.stringify(s))}catch{}}function q0(r){return r.replace(/["\\]/g,"\\$&")}function fm(r){return Math.max(.1,r)*w0}function Ql(r,u,s){return Math.min(s,Math.max(u,r))}function Y0(){if(typeof window<"u")try{const r=window.localStorage.getItem("chatkit:locale");if(r)return r}catch{}return typeof navigator<"u"?navigator.language:null}function hm(r){const u=(r??Y0()??"").trim().toLowerCase();return u==="zh-cn"||u==="zh-hans"||u.startsWith("zh")?"zh-CN":"en-US"}function X0(r){switch(r){case"compact":return{padding:"8px 10px",gap:6,marginTop:3,toggleSize:30,actionSize:22};case"spacious":return{padding:"14px 16px",gap:10,marginTop:6,toggleSize:38,actionSize:28};case"normal":default:return{padding:"12px 14px",gap:8,marginTop:4,toggleSize:34,actionSize:26}}}function G0(r){switch(r){case"pill":return 24;case"round":return 16;case"sharp":return 0;case"soft":default:return 12}}function ui(r){var p,E;const u=typeof r=="string"?null:r,s=((p=u==null?void 0:u.typography)==null?void 0:p.baseSize)??16,c=(u==null?void 0:u.density)??"normal",f=c==="compact"?-1:c==="spacious"?1:0,d=Ql(s-2+f,11,17);return{...X0(c),bodySize:d,titleSize:d+1,iconSize:Ql(d+2,13,19),radius:G0(u==null?void 0:u.radius),fontFamily:((E=u==null?void 0:u.typography)==null?void 0:E.fontFamily)??B0}}function Q0(r){return r==="idle"||r==="running-right"||r==="running-left"||r==="waving"||r==="jumping"||r==="failed"||r==="waiting"||r==="running"||r==="review"}function K0(r){if(!r||typeof r!="object"||Array.isArray(r))return null;const u=r;return Q0(u.state)?{state:u.state}:null}function V0(r){if(!r||typeof r!="object"||Array.isArray(r))return null;const u=r;return u.pet===null||typeof u.pet=="boolean"?{pet:u.pet}:u.pet&&typeof u.pet=="object"&&!Array.isArray(u.pet)?{pet:u.pet}:null}function Z0(r){return r==="running"||r==="completed"||r==="failed"}function dm(r){return r?[r.threadId,r.messageId||r.updatedAt||r.message].join(":"):null}function mm(r){return r?[r.threadId,r.messageId??""].join(":"):null}function J0(r){if(r===null)return{summary:null};if(!r||typeof r!="object"||Array.isArray(r))return null;const u=r;return typeof u.threadId!="string"||!u.threadId.trim()||typeof u.title!="string"||!u.title.trim()||typeof u.message!="string"||!u.message.trim()||!Z0(u.status)?null:{summary:{threadId:u.threadId,title:u.title,message:u.message,status:u.status,...typeof u.messageId=="string"&&u.messageId.trim()?{messageId:u.messageId}:{},...typeof u.updatedAt=="string"&&u.updatedAt.trim()?{updatedAt:u.updatedAt}:{}}}}function k0(r){if(!r||typeof r!="object"||Array.isArray(r))return null;const u=r;return u.name!=="thread.summary"?null:J0(u.data??null)}class W0{constructor(u,s){this.overlayElement=null,this.petElement=null,this.contextMenuElement=null,this.summaryElement=null,this.summaryToggleElement=null,this.mediaElement=null,this.options=null,this.theme=null,this.resolved=null,this.summary=null,this.summaryRenderKey=null,this.dismissedSummaryKey=null,this.isSummaryCollapsed=!1,this.isSummaryExpanded=!1,this.isSummaryHovering=!1,this.isReplyOpen=!1,this.isReplySubmitting=!1,this.replyError=null,this.replyDraft="",this.replyInputElement=null,this.copyLocale=hm(),this.copy=om[this.copyLocale],this.currentState="waiting",this.lastAutoState="waiting",this.transient=null,this.position=null,this.dragPosition=null,this.dragOffset={x:0,y:0},this.lastDragPosition=null,this.lastDragClientX=null,this.dragAnimation=null,this.activePointerId=null,this.isDragging=!1,this.isHovering=!1,this.movedDuringDrag=!1,this.prefersReducedMotion=!1,this.frame=0,this.completed=!1,this.activeAnimationName=null,this.activeAnimationMode=null,this.frameTimer=null,this.restingDelayTimer=null,this.mediaQuery=null,this.connected=!1,this.handleViewportChange=()=>{this.closeContextMenu(),this.render()},this.handleReducedMotionChange=()=>{var c;this.prefersReducedMotion=!!((c=this.mediaQuery)!=null&&c.matches),this.prefersReducedMotion&&(this.transient=null),this.render()},this.handlePointerEnter=()=>{this.clearRestingDelayTimer(),this.isHovering=!0,this.rescheduleAnimation()},this.handlePointerLeave=()=>{this.isDragging||this.enterRestingAfterDelay()},this.handleContextMenu=c=>{c.preventDefault(),c.stopPropagation(),this.openContextMenu({x:c.clientX,y:c.clientY})},this.handleContextMenuEvent=c=>{c.preventDefault(),c.stopPropagation()},this.handleContextMenuOutsidePointerDown=c=>{const f=this.contextMenuElement;f&&c.composedPath().includes(f)||this.closeContextMenu()},this.handleContextMenuKeyDown=c=>{c.key==="Escape"&&(c.preventDefault(),this.closeContextMenu())},this.handleClosePetMenuItemClick=c=>{var f;c.preventDefault(),c.stopPropagation(),this.closeContextMenu(),(f=this.onClose)==null||f.call(this)},this.handleSummaryPointerEnter=()=>{this.isSummaryHovering=!0,this.render()},this.handleSummaryPointerLeave=()=>{this.isSummaryHovering=!1,this.isReplyOpen||this.render()},this.handleSummaryClick=()=>{var f,d;const c=(f=this.summary)==null?void 0:f.threadId.trim();c&&((d=this.onThreadSummaryActivate)==null||d.call(this,c))},this.handleSummaryDelete=()=>{const c=dm(this.summary);c&&(this.dismissedSummaryKey=c),this.isSummaryCollapsed=!1,this.isReplyOpen=!1,this.replyDraft="",this.replyError=null,this.removeSummaryElements()},this.handleSummaryCollapseToggle=()=>{this.isSummaryCollapsed=!this.isSummaryCollapsed,this.isSummaryExpanded=!1,this.isReplyOpen=!1,this.replyError=null,this.render()},this.handleSummaryExpandToggle=()=>{this.isSummaryExpanded=!this.isSummaryExpanded,this.render()},this.handleReplyOpen=()=>{this.isReplyOpen=!0,this.replyError=null,this.render()},this.handleReplyInput=c=>{const f=c.currentTarget;f instanceof HTMLInputElement&&(this.replyDraft=f.value,this.replyError=null)},this.handleReplySubmit=c=>{c.preventDefault(),this.submitReply()},this.handleReplyKeyDown=c=>{c.key==="Escape"&&(c.preventDefault(),this.isReplyOpen=!1,this.replyError=null,this.render())},this.handlePointerDown=c=>{var y,p;if(c.button!==0||c.ctrlKey||this.isDragging||(this.closeContextMenu(),!((y=this.options)!=null&&y.position.draggable)))return;c.preventDefault();const f=(p=this.petElement)==null?void 0:p.getBoundingClientRect();if(!f)return;const d={x:f.left,y:f.top};this.dragOffset={x:c.clientX-f.left,y:c.clientY-f.top},this.lastDragPosition=d,this.lastDragClientX=c.clientX,this.dragAnimation=null,this.movedDuringDrag=!1,this.dragPosition=d,this.isDragging=!0,this.activePointerId=c.pointerId,this.clearRestingDelayTimer(),this.isHovering=!0,this.captureActivePointer(),this.installDragListeners(),this.rescheduleAnimation()},this.handlePointerMove=c=>{if(!this.isActiveDragPointer(c))return;const f=this.getNextDragPosition(c),d=this.lastDragPosition;if(d&&(Math.abs(d.x-f.x)>Hu||Math.abs(d.y-f.y)>Hu)&&(this.movedDuringDrag=!0),this.lastDragClientX!==null){const y=c.clientX-this.lastDragClientX;y>Hu?this.dragAnimation="running-right":y<-Hu&&(this.dragAnimation="running-left")}this.lastDragClientX=c.clientX,this.lastDragPosition=f,this.dragPosition=f,this.render()},this.handlePointerUp=c=>{if(!this.isActiveDragPointer(c))return;const f=this.lastDragPosition??this.getNextDragPosition(c);this.finishDrag(f,c)},this.handleLostPointerCapture=c=>{if(!this.isActiveDragPointer(c))return;const f=this.lastDragPosition??this.getNextDragPosition(c);this.finishDrag(f,c)},this.handleClick=()=>{var c;this.movedDuringDrag||((c=this.onActivate)==null||c.call(this),!this.prefersReducedMotion&&(this.transient={name:"waving"},this.render()))},this.root=u,this.onActivate=s==null?void 0:s.onActivate,this.onClose=s==null?void 0:s.onClose,this.onReply=s==null?void 0:s.onReply,this.onThreadSummaryActivate=s==null?void 0:s.onThreadSummaryActivate,this.connect()}connect(){this.connected||(this.connected=!0,this.installViewportListeners(),this.installReducedMotionListener(),this.render())}setOptions(u,s){this.closeContextMenu();const c=hi(u);if(this.options=c,this.theme=s??null,!c){this.isDragging=!1,this.isHovering=!1,this.position=null,this.dragPosition=null,this.dragAnimation=null,this.lastDragPosition=null,this.lastDragClientX=null,this.transient=null,this.resolved=null,this.clearRestingDelayTimer(),this.removeDragListeners(),this.removeOverlay();return}this.position=L0(sm,c.position.persist),c.behavior==="auto"&&!this.prefersReducedMotion&&(this.transient={name:"waving"}),this.resolveCharacter(),this.render()}setState(u){var c;const s=this.lastAutoState;this.lastAutoState=u,this.currentState=u,((c=this.options)==null?void 0:c.behavior)==="auto"&&!this.prefersReducedMotion&&u==="idle"&&(s==="running"||s==="review")&&!this.transient?this.transient={name:"jumping"}:u!=="idle"&&(this.transient=null),this.render()}setLocale(u){const s=hm(u);s!==this.copyLocale&&(this.copyLocale=s,this.copy=om[s],this.summaryRenderKey=null,this.closeContextMenu(),this.render())}setThreadSummary(u){const s=mm(this.summary),c=mm(u);if(this.summary=u,!u){this.isSummaryCollapsed=!1,this.isSummaryExpanded=!1,this.isSummaryHovering=!1,this.isReplyOpen=!1,this.isReplySubmitting=!1,this.replyError=null,this.replyDraft="",this.summaryRenderKey=null,this.removeSummaryElements();return}s!==c&&(this.isSummaryCollapsed=!1,this.isSummaryExpanded=!1,this.isSummaryHovering=!1,this.isReplyOpen=!1,this.isReplySubmitting=!1,this.replyError=null,this.replyDraft=""),this.render()}setThreadSummaryStatus(u){!this.summary||this.summary.status===u||(this.summary={...this.summary,status:u},this.render())}destroy(){var u,s,c,f;this.connected&&(this.connected=!1,this.clearRestingDelayTimer(),this.clearTimers(),this.removeDragListeners(),this.removeOverlay(),window.removeEventListener("resize",this.handleViewportChange),(u=window.visualViewport)==null||u.removeEventListener("resize",this.handleViewportChange),(s=window.visualViewport)==null||s.removeEventListener("scroll",this.handleViewportChange),(f=(c=this.mediaQuery)==null?void 0:c.removeEventListener)==null||f.call(c,"change",this.handleReducedMotionChange),this.mediaQuery=null)}installViewportListeners(){var u,s;window.addEventListener("resize",this.handleViewportChange),(u=window.visualViewport)==null||u.addEventListener("resize",this.handleViewportChange),(s=window.visualViewport)==null||s.addEventListener("scroll",this.handleViewportChange)}installReducedMotionListener(){var u,s;window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-reduced-motion: reduce)"),this.prefersReducedMotion=this.mediaQuery.matches,(s=(u=this.mediaQuery).addEventListener)==null||s.call(u,"change",this.handleReducedMotionChange))}resolveCharacter(){if(!this.options){this.resolved=null;return}const u=this.options.character;this.resolved=O0(u)}ensureOverlay(){if(this.overlayElement&&this.petElement)return;const u=document.createElement("div");u.setAttribute("data-chatkit-host-pet-layer",""),u.style.position="fixed",u.style.inset="0",u.style.pointerEvents="none",u.style.overflow="visible";const s=document.createElement("style");s.textContent=`
51
51
  @keyframes chatkit-pet-summary-spin {
52
52
  to { transform: rotate(360deg); }
53
53
  }
54
- `;const c=document.createElement("div");c.setAttribute("data-chatkit-host-pet",""),c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.pointerEvents="auto",c.style.touchAction="none",c.style.userSelect="none",c.style.willChange="transform",c.addEventListener("pointerenter",this.handlePointerEnter),c.addEventListener("pointerleave",this.handlePointerLeave),c.addEventListener("pointerdown",this.handlePointerDown),c.addEventListener("lostpointercapture",this.handleLostPointerCapture),c.addEventListener("contextmenu",this.handleContextMenu),c.addEventListener("click",this.handleClick),u.append(s,c),this.root.append(u),this.overlayElement=u,this.petElement=c}removeOverlay(){var u;this.cancelActiveDrag(),this.clearRestingDelayTimer(),this.clearTimers(),this.closeContextMenu(),this.petElement&&(this.petElement.removeEventListener("pointerenter",this.handlePointerEnter),this.petElement.removeEventListener("pointerleave",this.handlePointerLeave),this.petElement.removeEventListener("pointerdown",this.handlePointerDown),this.petElement.removeEventListener("lostpointercapture",this.handleLostPointerCapture),this.petElement.removeEventListener("contextmenu",this.handleContextMenu),this.petElement.removeEventListener("click",this.handleClick)),this.isHovering=!1,this.removeSummaryElements(),(u=this.overlayElement)==null||u.remove(),this.overlayElement=null,this.petElement=null,this.mediaElement=null}removeSummaryElements(){var u,s;(u=this.summaryElement)==null||u.remove(),(s=this.summaryToggleElement)==null||s.remove(),this.summaryElement=null,this.summaryToggleElement=null,this.replyInputElement=null,this.summaryRenderKey=null}getSize(){if(!this.options||!this.resolved)return{width:0,height:0};const u=fm(this.options.position.scale),s={width:this.resolved.atlas.cellWidth,height:this.resolved.atlas.cellHeight};return{width:s.width*u,height:s.height*u}}getCurrentPosition(u){const s=this.options;if(!s)return{x:0,y:0};const c=na(),f=br(s.position.boundsPadding),d=s.position.pin===void 0?"bottom-right":s.position.pin,y=d?O0(d,u,c,f):null;return Ue(this.dragPosition??this.position??y??{x:f.left,y:f.top},u,c,f)}persistPosition(u){if(!this.options)return;const s=this.getSize(),c=Ue(u,s,na(),br(this.options.position.boundsPadding));this.position=c,L0(sm,this.options.position.persist,c)}getActiveAnimationName(){return this.options?this.isDragging?this.dragAnimation??"running":this.transient?this.transient.name:this.options.behavior==="manual"?"idle":this.currentState:"idle"}getActiveAnimationMode(){return this.isDragging?"loop":this.transient?"once":"loop"}resetAnimationIfNeeded(u,s){this.activeAnimationName===u&&this.activeAnimationMode===s||(this.clearTimers(),this.activeAnimationName=u,this.activeAnimationMode=s,this.frame=0,this.completed=!1)}render(){if(!this.options||!this.resolved){this.clearTimers(),this.petElement&&this.petElement.replaceChildren(),this.removeSummaryElements(),this.mediaElement=null,this.activeAnimationName=null,this.activeAnimationMode=null,this.frame=0,this.completed=!1;return}this.ensureOverlay();const u=this.overlayElement,s=this.petElement;if(!u||!s)return;const c=this.getSize(),f=this.getCurrentPosition(c),d=this.getActiveAnimationName(),y=this.getActiveAnimationMode();this.resetAnimationIfNeeded(d,y),u.style.zIndex=String(this.options.position.zIndex),s.style.width=`${c.width}px`,s.style.height=`${c.height}px`,s.style.transform=`translate3d(${f.x}px, ${f.y}px, 0)`,s.style.cursor=this.options.position.draggable?this.isDragging?"grabbing":"grab":"default",s.dataset.petAnimation=d,s.setAttribute("aria-label",this.options.ariaLabel),s.setAttribute("role","img"),this.renderAtlas(d,y),this.renderThreadSummary(f,c),this.scheduleNextFrame(d,y)}renderThreadSummary(u,s){var y,g,E;const c=this.summary,f=dm(c);if(!c||!f||this.dismissedSummaryKey===f){this.removeSummaryElements();return}if(this.isSummaryCollapsed){this.renderCollapsedSummary(u,s);return}const d=[this.copyLocale,this.isSummaryExpanded?"expanded":"compact",this.isSummaryHovering?"hover":"rest",this.isReplyOpen?"reply":"closed",this.isReplySubmitting?"submitting":"ready",this.replyError??""].join("|");(!this.summaryElement||this.summaryRenderKey!==d)&&((y=this.summaryElement)==null||y.remove(),(g=this.summaryToggleElement)==null||g.remove(),this.summaryElement=this.createSummaryBubble(c),this.summaryToggleElement=this.createSummaryToggleButton("v"),(E=this.overlayElement)==null||E.append(this.summaryElement,this.summaryToggleElement),this.summaryRenderKey=d,this.isReplyOpen&&!this.isReplySubmitting&&window.setTimeout(()=>{var b;return(b=this.replyInputElement)==null?void 0:b.focus()},0)),this.updateSummaryBubbleContent(c),this.positionSummaryBubble(u,s)}renderCollapsedSummary(u,s){var c,f;(c=this.summaryElement)==null||c.remove(),this.summaryElement=null,this.summaryRenderKey=null,this.summaryToggleElement||(this.summaryToggleElement=this.createSummaryToggleButton("1"),(f=this.overlayElement)==null||f.append(this.summaryToggleElement)),this.summaryToggleElement.textContent="1",this.positionSummaryToggleBadge(u,s)}positionSummaryToggleBadge(u,s){const c=this.summaryToggleElement;if(!c)return;const f=na(),d=ui(this.theme).toggleSize,y=Ql(u.x+s.width-d*.35,Je,f.width-d-Je),g=Ql(u.y-d*.35,Je,f.height-d-Je);c.style.width=`${d}px`,c.style.height=`${d}px`,c.style.transform=`translate3d(${y}px, ${g}px, 0)`,c.style.borderRadius="999px"}positionSummaryBubble(u,s){const c=this.summaryElement,f=this.summaryToggleElement;if(!c||!f)return;const d=na(),y=Math.min(N0,d.width-Je*2);c.style.width=`${y}px`;const g=c.offsetHeight||96,E=u.y-g-rm,H=E>=Je?E:Ql(u.y+s.height+rm,Je,d.height-g-Je),R=Ql(u.x+s.width/2-y/2,Je,d.width-y-Je);c.style.transform=`translate3d(${R}px, ${H}px, 0)`,this.positionSummaryToggleBadge(u,s)}createSummaryBubble(u){const s=this.isSummaryHovering&&!this.isReplyOpen,c=ui(this.theme),f=document.createElement("div");f.setAttribute("data-chatkit-pet-summary",""),f.addEventListener("pointerenter",this.handleSummaryPointerEnter),f.addEventListener("pointerleave",this.handleSummaryPointerLeave),f.addEventListener("click",this.handleSummaryClick),f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.boxSizing="border-box",f.style.pointerEvents="auto",f.style.padding=c.padding,f.style.border="1px solid rgba(148, 163, 184, 0.22)",f.style.borderRadius=`${c.radius}px`,f.style.background="rgba(255, 255, 255, 0.94)",f.style.color="#1f2937",f.style.boxShadow="0 8px 24px rgba(15, 23, 42, 0.1)",f.style.font=`500 ${c.bodySize}px/1.35 ${c.fontFamily}`,f.style.backdropFilter="blur(10px)";const d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.gap=`${c.gap}px`,(this.isSummaryHovering||this.isReplyOpen)&&d.append(this.createSummaryActionButton("x",this.copy.hideMessage,this.handleSummaryDelete));const y=document.createElement("div");y.textContent=u.title,y.style.minWidth="0",y.style.flex="1",y.style.overflow="hidden",y.style.textOverflow="ellipsis",y.style.whiteSpace="nowrap",y.style.fontWeight="700",y.style.fontSize=`${c.titleSize}px`,y.dataset.chatkitPetSummaryTitle="",d.append(y),this.isSummaryHovering||this.isReplyOpen?d.append(this.createSummaryActionButton(this.isSummaryExpanded?"-":">",this.isSummaryExpanded?this.copy.collapseMessage:this.copy.expandMessage,this.handleSummaryExpandToggle)):d.append(this.createStatusIcon(u.status));const g=document.createElement("div");if(g.textContent=u.message,g.style.marginTop=`${c.marginTop}px`,g.style.fontWeight="400",g.style.color="#374151",g.style.overflow="hidden",this.isSummaryExpanded?(g.style.maxHeight="7em",g.style.overflowY="auto"):(g.style.display="-webkit-box",g.style.setProperty("-webkit-line-clamp","2"),g.style.setProperty("-webkit-box-orient","vertical")),g.dataset.chatkitPetSummaryMessage="",f.append(d,g),s){const E=this.createTextButton(this.copy.replyButton,this.handleReplyOpen);E.style.position="absolute",E.style.right="14px",E.style.bottom="10px",f.append(E)}return this.isReplyOpen&&f.append(this.createReplyForm()),f}updateSummaryBubbleContent(u){var d,y,g;const s=(d=this.summaryElement)==null?void 0:d.querySelector("[data-chatkit-pet-summary-title]");s&&s.textContent!==u.title&&(s.textContent=u.title);const c=(y=this.summaryElement)==null?void 0:y.querySelector("[data-chatkit-pet-summary-message]");c&&c.textContent!==u.message&&(c.textContent=u.message);const f=(g=this.summaryElement)==null?void 0:g.querySelector("[data-chatkit-pet-summary-status]");if(f&&f.dataset.chatkitPetSummaryStatus!==u.status){const E=this.createStatusIcon(u.status);f.replaceWith(E)}}createSummaryToggleButton(u){const s=ui(this.theme),c=document.createElement("button");return c.type="button",c.textContent=u,c.title=u==="1"?this.copy.restoreMessage:this.copy.collapseMessage,c.addEventListener("click",Bu),c.addEventListener("click",this.handleSummaryCollapseToggle),c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.pointerEvents="auto",c.style.border="1px solid rgba(148, 163, 184, 0.28)",c.style.background="rgba(248, 250, 252, 0.94)",c.style.color="#475569",c.style.boxShadow="0 6px 18px rgba(15, 23, 42, 0.1)",c.style.cursor="pointer",c.style.font=`600 ${s.titleSize}px/1 ${s.fontFamily}`,c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center",c}createStatusIcon(u){const c=ui(this.theme).iconSize,f=document.createElement("span");if(f.setAttribute("aria-hidden","true"),f.dataset.chatkitPetSummaryStatus=u,f.style.display="inline-flex",f.style.width=`${c}px`,f.style.height=`${c}px`,f.style.alignItems="center",f.style.justifyContent="center",f.style.flex="0 0 auto",u==="running")return f.style.border="2px solid rgba(71, 85, 105, 0.32)",f.style.borderTopColor="#64748b",f.style.borderRadius="999px",f.style.animation="chatkit-pet-summary-spin 900ms linear infinite",f;if(f.style.borderRadius="999px",f.style.fontSize=`${Math.max(10,c-4)}px`,f.style.fontWeight="700",u==="failed")return f.textContent="!",f.style.background="#fee2e2",f.style.color="#b91c1c",f;f.textContent="",f.style.border="2px solid #22c55e",f.style.position="relative";const d=document.createElement("span");return d.style.width=`${Math.round(c*.44)}px`,d.style.height=`${Math.round(c*.25)}px`,d.style.borderLeft="2px solid #22c55e",d.style.borderBottom="2px solid #22c55e",d.style.transform="rotate(-45deg) translate(1px, -1px)",f.append(d),f}createSummaryActionButton(u,s,c){const f=ui(this.theme),d=document.createElement("button");return d.type="button",d.textContent=u,d.title=s,d.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),c()}),d.style.width=`${f.actionSize}px`,d.style.height=`${f.actionSize}px`,d.style.border="0",d.style.borderRadius="999px",d.style.background="rgba(241, 245, 249, 0.96)",d.style.color="#475569",d.style.cursor="pointer",d.style.font=`600 ${f.titleSize}px/1 ${f.fontFamily}`,d}createTextButton(u,s){const c=document.createElement("button");return c.type="button",c.textContent=u,c.addEventListener("click",f=>{f.preventDefault(),f.stopPropagation(),s()}),c.style.border="1px solid rgba(148, 163, 184, 0.28)",c.style.borderRadius="999px",c.style.background="rgba(248, 250, 252, 0.95)",c.style.color="#334155",c.style.cursor="pointer",c.style.padding="3px 10px",c.style.font='600 12px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',c}createReplyForm(){const u=document.createElement("form");u.addEventListener("click",Bu),u.addEventListener("submit",this.handleReplySubmit),u.addEventListener("keydown",this.handleReplyKeyDown),u.style.display="flex",u.style.gap="6px",u.style.alignItems="center",u.style.marginTop="8px";const s=document.createElement("input");s.type="text",s.value=this.replyDraft,s.disabled=this.isReplySubmitting,s.placeholder=this.copy.replyPlaceholder,s.addEventListener("input",this.handleReplyInput),s.style.minWidth="0",s.style.flex="1",s.style.border="1px solid rgba(148, 163, 184, 0.35)",s.style.borderRadius="999px",s.style.padding="6px 10px",s.style.font='400 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',this.replyInputElement=s;const c=document.createElement("button");if(c.type="submit",c.textContent=this.isReplySubmitting?this.copy.sendingButton:this.copy.sendButton,c.disabled=this.isReplySubmitting,c.style.border="0",c.style.borderRadius="999px",c.style.background="#22c55e",c.style.color="#052e16",c.style.cursor=this.isReplySubmitting?"default":"pointer",c.style.padding="6px 10px",c.style.font='700 12px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',u.append(s,c),this.replyError){const f=document.createElement("div");f.textContent=this.copy.sendFailed,f.style.flexBasis="100%",f.style.color="#b91c1c",f.style.fontSize="12px",u.style.flexWrap="wrap",u.append(f)}return u}createContextMenu(){const u=document.createElement("div");u.setAttribute("data-chatkit-pet-context-menu",""),u.setAttribute("role","menu"),u.addEventListener("contextmenu",this.handleContextMenuEvent),u.addEventListener("pointerdown",Bu),u.addEventListener("click",Bu),u.style.position="absolute",u.style.top="0",u.style.left="0",u.style.boxSizing="border-box",u.style.minWidth="132px",u.style.padding="4px",u.style.pointerEvents="auto",u.style.border="1px solid rgba(148, 163, 184, 0.28)",u.style.borderRadius="10px",u.style.background="rgba(255, 255, 255, 0.96)",u.style.color="#1f2937",u.style.boxShadow="0 12px 28px rgba(15, 23, 42, 0.16)",u.style.font='500 13px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',u.style.backdropFilter="blur(10px)";const s=document.createElement("button");return s.type="button",s.textContent=this.copy.closePetMenuItem,s.setAttribute("role","menuitem"),s.addEventListener("click",this.handleClosePetMenuItemClick),s.style.display="block",s.style.width="100%",s.style.border="0",s.style.borderRadius="7px",s.style.background="transparent",s.style.color="inherit",s.style.cursor="pointer",s.style.padding="7px 10px",s.style.textAlign="left",s.style.font="inherit",u.append(s),u}openContextMenu(u){var f;const s=this.overlayElement;if(!s)return;this.closeContextMenu();const c=this.createContextMenu();s.append(c),this.contextMenuElement=c,this.positionContextMenu(u),(f=c.querySelector("button"))==null||f.focus({preventScroll:!0}),window.addEventListener("pointerdown",this.handleContextMenuOutsidePointerDown,!0),window.addEventListener("keydown",this.handleContextMenuKeyDown)}closeContextMenu(){var u;(u=this.contextMenuElement)==null||u.remove(),this.contextMenuElement=null,window.removeEventListener("pointerdown",this.handleContextMenuOutsidePointerDown,!0),window.removeEventListener("keydown",this.handleContextMenuKeyDown)}positionContextMenu(u){const s=this.contextMenuElement;if(!s)return;const c=na(),f=s.offsetWidth||132,d=s.offsetHeight||40,y=Math.max(la,c.width-f-la),g=Math.max(la,c.height-d-la),E=Ql(u.x,la,y),b=Ql(u.y,la,g);s.style.transform=`translate3d(${E}px, ${b}px, 0)`}renderAtlas(u,s){var W;if(!this.petElement||((W=this.resolved)==null?void 0:W.kind)!=="atlas"||!this.options)return;if(!(this.mediaElement instanceof HTMLDivElement)){const ct=document.createElement("div");ct.setAttribute("aria-hidden","true"),this.petElement.replaceChildren(ct),this.mediaElement=ct}const c=this.mediaElement,f=this.resolved.atlas,d=f.animations[u]??f.animations.idle,y=s==="once"&&this.completed?Math.max(0,d.frames-1):Math.min(this.frame,Math.max(0,d.frames-1)),g=fm(this.options.position.scale),E=f.cellWidth,b=f.cellHeight,H=f.columns*E,R=f.rows*b;c.style.width=`${E}px`,c.style.height=`${b}px`,c.style.overflow="hidden",c.style.transform=`scale(${g})`,c.style.transformOrigin="top left",c.style.pointerEvents="none",c.style.backgroundImage=`url("${j0(this.resolved.src)}")`,c.style.backgroundRepeat="no-repeat",c.style.backgroundSize=`${H}px ${R}px`,c.style.backgroundPosition=`${-y*E}px ${-d.row*b}px`,c.style.imageRendering=this.options.imageRendering,c.dataset.petFrame=String(y)}scheduleNextFrame(u,s){if(this.prefersReducedMotion||this.completed||!this.resolved){this.clearTimers();return}if(this.frameTimer!==null)return;const c=this.resolved.atlas,f=c.animations[u]??c.animations.idle,y=(f.frameDurations[this.frame]??f.frameDurations[f.frameDurations.length-1]??150)*w0,g=this.isHovering||this.isDragging?y:y*R0;this.frameTimer=window.setTimeout(()=>{this.frameTimer=null;const E=this.frame+1;if(E>=f.frames){if(s==="once"){this.completed=!0,this.frame=Math.max(0,f.frames-1),this.finishTransient();return}this.frame=0,this.render();return}this.frame=E,this.render()},g)}clearTimers(){this.frameTimer!==null&&(window.clearTimeout(this.frameTimer),this.frameTimer=null)}clearRestingDelayTimer(){this.restingDelayTimer!==null&&(window.clearTimeout(this.restingDelayTimer),this.restingDelayTimer=null)}finishTransient(){this.transient=null,this.activeAnimationName=null,this.activeAnimationMode=null,this.render()}rescheduleAnimation(){this.clearTimers(),this.render()}enterRestingAfterDelay(){this.clearRestingDelayTimer(),this.isHovering=!0,this.restingDelayTimer=window.setTimeout(()=>{this.restingDelayTimer=null,!this.isDragging&&(this.isHovering=!1,this.rescheduleAnimation())},U0)}isPointOverPet(u,s){var f;const c=(f=this.petElement)==null?void 0:f.getBoundingClientRect();return c?u>=c.left&&u<=c.right&&s>=c.top&&s<=c.bottom:!1}isPointerOverPet(u){return this.isPointOverPet(u.clientX,u.clientY)}async submitReply(){var s;const u=this.replyDraft.trim();if(!(!u||this.isReplySubmitting)){this.isReplySubmitting=!0,this.replyError=null,this.render();try{await((s=this.onReply)==null?void 0:s.call(this,u)),this.replyDraft="",this.isReplyOpen=!1,this.isSummaryHovering=!1}catch{this.replyError="Failed to send"}finally{this.isReplySubmitting=!1,this.render()}}}captureActivePointer(){const u=this.activePointerId,s=this.petElement;if(!(u===null||typeof(s==null?void 0:s.setPointerCapture)!="function"))try{s.setPointerCapture(u)}catch{}}releaseActivePointer(){const u=this.activePointerId,s=this.petElement;if(this.activePointerId=null,!(u===null||typeof(s==null?void 0:s.hasPointerCapture)!="function"||typeof s.releasePointerCapture!="function"))try{s.hasPointerCapture(u)&&s.releasePointerCapture(u)}catch{}}isActiveDragPointer(u){return this.isDragging&&u.pointerId===this.activePointerId}getNextDragPosition(u){return this.options?Ue({x:u.clientX-this.dragOffset.x,y:u.clientY-this.dragOffset.y},this.getSize(),na(),br(this.options.position.boundsPadding)):{x:0,y:0}}finishDrag(u,s){this.isDragging=!1,this.dragPosition=null,this.dragAnimation=null,this.lastDragClientX=null,this.removeDragListeners(),this.releaseActivePointer(),this.persistPosition(u),s.pointerType==="mouse"&&this.isPointerOverPet(s)?(this.isHovering=!0,this.rescheduleAnimation()):(this.enterRestingAfterDelay(),this.rescheduleAnimation())}cancelActiveDrag(){this.isDragging=!1,this.dragPosition=null,this.dragAnimation=null,this.lastDragPosition=null,this.lastDragClientX=null,this.removeDragListeners(),this.releaseActivePointer()}installDragListeners(){window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp),window.addEventListener("pointercancel",this.handlePointerUp)}removeDragListeners(){window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}}var W0=Object.create,Cm=Object.defineProperty,$0=Object.getOwnPropertyDescriptor,zm=(r,u)=>(u=Symbol[r])?u:Symbol.for("Symbol."+r),Vu=r=>{throw TypeError(r)},F0=(r,u,s)=>u in r?Cm(r,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[u]=s,I0=r=>[,,,W0((r==null?void 0:r[zm("metadata")])??null)],Om=["class","method","getter","setter","accessor","field","value","get","set"],Dm=r=>r!==void 0&&typeof r!="function"?Vu("Function expected"):r,P0=(r,u,s,c,f)=>({kind:Om[r],name:u,metadata:c,addInitializer:d=>s._?Vu("Already initialized"):f.push(Dm(d||null))}),tv=(r,u)=>F0(u,zm("metadata"),r[3]),ev=(r,u,s,c)=>{for(var f=0,d=r[u>>1],y=d&&d.length;f<y;f++)d[f].call(s);return c},Ye=(r,u,s,c,f,d)=>{for(var y,g,E,b,H=u&7,R=!1,W=!1,ct=2,Et=Om[H+5],ut=r[ct]||(r[ct]=[]),Mt=(f=f.prototype,$0(f,s)),Tt=c.length-1;Tt>=0;Tt--)E=P0(H,s,g={},r[3],ut),E.static=R,E.private=W,b=E.access={has:Ut=>s in Ut},b.get=Ut=>Ut[s],y=(0,c[Tt])(Mt[Et],E),g._=1,Dm(y)&&(Mt[Et]=y);return Mt&&Cm(f,s,Mt),f},Ur=(r,u,s)=>u.has(r)||Vu("Cannot "+s),C=(r,u,s)=>(Ur(r,u,"read from private field"),s?s.call(r):u.get(r)),qt=(r,u,s)=>u.has(r)?Vu("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(r):u.set(r,s),$t=(r,u,s,c)=>(Ur(r,u,"write to private field"),u.set(r,s),s),G=(r,u,s)=>(Ur(r,u,"access private method"),s),wm,Rm,Um,Nm,Hm,Bm,Lm,jm,qm,Ym,Xm,Cr,it,Vl,yl,pl,mn,ju,Nr,Zu,ua,yn,ke,Ne,qu,Wt,ci,vt,Y,Gl,Hr,We,Ju,Gm,ku,Qm,Km,Br,Zl,di,zr,Vm,Zm,Jm,km,Yu,Wm,$m,Fm,Xu,sa,Or,fe;function Im(r){return Mr(r)}function qe(r,u){const s=String(u.name);return function(...c){if(!this.capabilities.commands.has(s))throw new It(`ChatKit command "${String(s)}" is not available for the "${this.profile}" profile.`);return r.apply(this,c)}}class Te extends(Cr=HTMLElement,Xm=[qe],Ym=[qe],qm=[qe],jm=[qe],Lm=[qe],Bm=[qe],Hm=[qe],Nm=[qe],Um=[qe],Rm=[qe],wm=[qe],Cr){constructor({profile:u}){super(),ev(fe,5,this),qt(this,Y),this.profile=void 0,this.capabilities=void 0,qt(this,it),qt(this,Vl),qt(this,yl),qt(this,pl),qt(this,mn),qt(this,ju),qt(this,Nr,!1),qt(this,Zu,!1),qt(this,ua),qt(this,yn,!1),qt(this,ke,this.attachShadow({mode:"open"})),qt(this,Ne,new k0(C(this,ke),{onActivate:()=>G(this,Y,Vm).call(this),onClose:()=>G(this,Y,Zm).call(this),onReply:s=>G(this,Y,Jm).call(this,s),onThreadSummaryActivate:s=>void G(this,Y,km).call(this,s)})),qt(this,qu),qt(this,Wt,new Promise(s=>{$t(this,qu,s)})),qt(this,ci,xm()),qt(this,vt,new T0({channelId:C(this,ci)??void 0,fetch:((...s)=>{var f;const c=((f=C(this,it))==null?void 0:f.api)&&"fetch"in C(this,it).api&&C(this,it).api.fetch;return c?c(...s):fetch(...s)}),target:()=>{var s;return((s=C(this,yl))==null?void 0:s.contentWindow)??null},targetOrigin:window.location.origin,handlers:{onRealtimeVoiceCommand:s=>{var f;const c=(f=C(this,it))==null?void 0:f.realtimeVoice;if(!c||s.type==="start"&&!c.enabled)throw new It("Realtime voice is unavailable.");return c.onCommand(s)},onFileInputClick:({inputAttributes:s})=>new Promise(c=>{const f=document.createElement("input");for(const[y,g]of Object.entries(s))f.setAttribute(y,String(g));const d=()=>{c(Array.from(f.files||[])),C(this,ke).contains(f)&&C(this,ke).removeChild(f)};f.addEventListener("cancel",d),f.addEventListener("change",d),C(this,ke).appendChild(f),f.click()}),onApprovalDecision:async s=>{var f,d;const c=(d=(f=C(this,it))==null?void 0:f.approvals)==null?void 0:d.onDecision;if(!c)throw new It("Add approvals.onDecision to handle host approvals.");return c(s)},onApprovalAction:async s=>{var f,d;const c=(d=(f=C(this,it))==null?void 0:f.approvals)==null?void 0:d.onAction;if(!c)throw new It("Add approvals.onAction to handle approval actions.");return c(s)},onClientToolCall:async({name:s,params:c,id:f,tool_call_id:d})=>{var g;const y=(g=C(this,it))==null?void 0:g.onClientTool;return y||G(this,Y,Gl).call(this,new It("No handler for client tool calls. You'll need to add onClientTool to your ChatKit options.")),y({name:s,params:c,id:f,tool_call_id:d})},onToolOutputAttachmentPreview:async s=>{var f,d;const c=(d=(f=C(this,it))==null?void 0:f.toolOutputAttachments)==null?void 0:d.onRequestPreview;return c||G(this,Y,Gl).call(this,new It("No handler for tool-output attachment previews. Add toolOutputAttachments.onRequestPreview to your ChatKit options.")),c(s)},onConnectWorkspaceConnector:async s=>{var f,d,y;const c=(y=(d=(f=C(this,it))==null?void 0:f.composer)==null?void 0:d.resources)==null?void 0:y.onConnect;return c||G(this,Y,Gl).call(this,new It("Add composer.resources.onConnect to handle workspace Connector connections.")),c(s)},onWorkbenchClientCommand:async({commandKey:s,payload:c,hostType:f,hostId:d,viewKey:y})=>{var E,b;const g=(b=(E=C(this,it))==null?void 0:E.workbench)==null?void 0:b.onClientCommand;return g?g({commandKey:s,payload:c,hostType:f,hostId:d,viewKey:y}):{success:!1,code:"unsupported",commandKey:s}},onWidgetAction:async({action:s,widgetItem:c})=>{var d,y;const f=(y=(d=C(this,it))==null?void 0:d.widgets)==null?void 0:y.onAction;return f||G(this,Y,Gl).call(this,new It("No handler for widget actions. You'll need to add widgets.onAction to your ChatKit options.")),f(s,c)},onEntitySearch:async({query:s})=>{var c,f,d;return((d=(f=(c=C(this,it))==null?void 0:c.entities)==null?void 0:f.onTagSearch)==null?void 0:d.call(f,s))??[]},onEntityClick:async({entity:s})=>{var c,f,d;return(d=(f=(c=C(this,it))==null?void 0:c.entities)==null?void 0:f.onClick)==null?void 0:d.call(f,s)},onEntityPreview:async({entity:s})=>{var c,f,d;return((d=(f=(c=C(this,it))==null?void 0:c.entities)==null?void 0:f.onRequestPreview)==null?void 0:d.call(f,s))??{preview:null}},onGetClientSecret:async s=>((!C(this,it)||!("getClientSecret"in C(this,it).api)||!C(this,it).api.getClientSecret)&&G(this,Y,Gl).call(this,new It("Could not refresh the session because ChatKitOptions.api.getClientSecret is not configured.")),C(this,it).api.getClientSecret(s??null)),onAddMetadataToRequest:({op:s,params:c})=>{throw new It("ChatKit: onAddMetadataToRequest is unimplemented.")}}})),qt(this,Yu,()=>{G(this,Y,Zl).call(this,!1)}),qt(this,Xu,()=>{var s;this.dataset.loaded="true",this.dispatchEvent(new CustomEvent("chatkit.ready",{bubbles:!0,composed:!0})),(s=C(this,qu))==null||s.call(this)}),qt(this,sa,!1),this.profile=u,this.capabilities=um(u)}setProfile(u){this.profile=u,this.capabilities=um(u)}connectedCallback(){C(this,Ne).connect();const u=document.createElement("style");u.textContent=`
54
+ `;const c=document.createElement("div");c.setAttribute("data-chatkit-host-pet",""),c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.pointerEvents="auto",c.style.touchAction="none",c.style.userSelect="none",c.style.willChange="transform",c.addEventListener("pointerenter",this.handlePointerEnter),c.addEventListener("pointerleave",this.handlePointerLeave),c.addEventListener("pointerdown",this.handlePointerDown),c.addEventListener("lostpointercapture",this.handleLostPointerCapture),c.addEventListener("contextmenu",this.handleContextMenu),c.addEventListener("click",this.handleClick),u.append(s,c),this.root.append(u),this.overlayElement=u,this.petElement=c}removeOverlay(){var u;this.cancelActiveDrag(),this.clearRestingDelayTimer(),this.clearTimers(),this.closeContextMenu(),this.petElement&&(this.petElement.removeEventListener("pointerenter",this.handlePointerEnter),this.petElement.removeEventListener("pointerleave",this.handlePointerLeave),this.petElement.removeEventListener("pointerdown",this.handlePointerDown),this.petElement.removeEventListener("lostpointercapture",this.handleLostPointerCapture),this.petElement.removeEventListener("contextmenu",this.handleContextMenu),this.petElement.removeEventListener("click",this.handleClick)),this.isHovering=!1,this.removeSummaryElements(),(u=this.overlayElement)==null||u.remove(),this.overlayElement=null,this.petElement=null,this.mediaElement=null}removeSummaryElements(){var u,s;(u=this.summaryElement)==null||u.remove(),(s=this.summaryToggleElement)==null||s.remove(),this.summaryElement=null,this.summaryToggleElement=null,this.replyInputElement=null,this.summaryRenderKey=null}getSize(){if(!this.options||!this.resolved)return{width:0,height:0};const u=fm(this.options.position.scale),s={width:this.resolved.atlas.cellWidth,height:this.resolved.atlas.cellHeight};return{width:s.width*u,height:s.height*u}}getCurrentPosition(u){const s=this.options;if(!s)return{x:0,y:0};const c=na(),f=br(s.position.boundsPadding),d=s.position.pin===void 0?"bottom-right":s.position.pin,y=d?D0(d,u,c,f):null;return Ne(this.dragPosition??this.position??y??{x:f.left,y:f.top},u,c,f)}persistPosition(u){if(!this.options)return;const s=this.getSize(),c=Ne(u,s,na(),br(this.options.position.boundsPadding));this.position=c,j0(sm,this.options.position.persist,c)}getActiveAnimationName(){return this.options?this.isDragging?this.dragAnimation??"running":this.transient?this.transient.name:this.options.behavior==="manual"?"idle":this.currentState:"idle"}getActiveAnimationMode(){return this.isDragging?"loop":this.transient?"once":"loop"}resetAnimationIfNeeded(u,s){this.activeAnimationName===u&&this.activeAnimationMode===s||(this.clearTimers(),this.activeAnimationName=u,this.activeAnimationMode=s,this.frame=0,this.completed=!1)}render(){if(!this.options||!this.resolved){this.clearTimers(),this.petElement&&this.petElement.replaceChildren(),this.removeSummaryElements(),this.mediaElement=null,this.activeAnimationName=null,this.activeAnimationMode=null,this.frame=0,this.completed=!1;return}this.ensureOverlay();const u=this.overlayElement,s=this.petElement;if(!u||!s)return;const c=this.getSize(),f=this.getCurrentPosition(c),d=this.getActiveAnimationName(),y=this.getActiveAnimationMode();this.resetAnimationIfNeeded(d,y),u.style.zIndex=String(this.options.position.zIndex),s.style.width=`${c.width}px`,s.style.height=`${c.height}px`,s.style.transform=`translate3d(${f.x}px, ${f.y}px, 0)`,s.style.cursor=this.options.position.draggable?this.isDragging?"grabbing":"grab":"default",s.dataset.petAnimation=d,s.setAttribute("aria-label",this.options.ariaLabel),s.setAttribute("role","img"),this.renderAtlas(d,y),this.renderThreadSummary(f,c),this.scheduleNextFrame(d,y)}renderThreadSummary(u,s){var y,p,E;const c=this.summary,f=dm(c);if(!c||!f||this.dismissedSummaryKey===f){this.removeSummaryElements();return}if(this.isSummaryCollapsed){this.renderCollapsedSummary(u,s);return}const d=[this.copyLocale,this.isSummaryExpanded?"expanded":"compact",this.isSummaryHovering?"hover":"rest",this.isReplyOpen?"reply":"closed",this.isReplySubmitting?"submitting":"ready",this.replyError??""].join("|");(!this.summaryElement||this.summaryRenderKey!==d)&&((y=this.summaryElement)==null||y.remove(),(p=this.summaryToggleElement)==null||p.remove(),this.summaryElement=this.createSummaryBubble(c),this.summaryToggleElement=this.createSummaryToggleButton("v"),(E=this.overlayElement)==null||E.append(this.summaryElement,this.summaryToggleElement),this.summaryRenderKey=d,this.isReplyOpen&&!this.isReplySubmitting&&window.setTimeout(()=>{var b;return(b=this.replyInputElement)==null?void 0:b.focus()},0)),this.updateSummaryBubbleContent(c),this.positionSummaryBubble(u,s)}renderCollapsedSummary(u,s){var c,f;(c=this.summaryElement)==null||c.remove(),this.summaryElement=null,this.summaryRenderKey=null,this.summaryToggleElement||(this.summaryToggleElement=this.createSummaryToggleButton("1"),(f=this.overlayElement)==null||f.append(this.summaryToggleElement)),this.summaryToggleElement.textContent="1",this.positionSummaryToggleBadge(u,s)}positionSummaryToggleBadge(u,s){const c=this.summaryToggleElement;if(!c)return;const f=na(),d=ui(this.theme).toggleSize,y=Ql(u.x+s.width-d*.35,Je,f.width-d-Je),p=Ql(u.y-d*.35,Je,f.height-d-Je);c.style.width=`${d}px`,c.style.height=`${d}px`,c.style.transform=`translate3d(${y}px, ${p}px, 0)`,c.style.borderRadius="999px"}positionSummaryBubble(u,s){const c=this.summaryElement,f=this.summaryToggleElement;if(!c||!f)return;const d=na(),y=Math.min(H0,d.width-Je*2);c.style.width=`${y}px`;const p=c.offsetHeight||96,E=u.y-p-rm,H=E>=Je?E:Ql(u.y+s.height+rm,Je,d.height-p-Je),R=Ql(u.x+s.width/2-y/2,Je,d.width-y-Je);c.style.transform=`translate3d(${R}px, ${H}px, 0)`,this.positionSummaryToggleBadge(u,s)}createSummaryBubble(u){const s=this.isSummaryHovering&&!this.isReplyOpen,c=ui(this.theme),f=document.createElement("div");f.setAttribute("data-chatkit-pet-summary",""),f.addEventListener("pointerenter",this.handleSummaryPointerEnter),f.addEventListener("pointerleave",this.handleSummaryPointerLeave),f.addEventListener("click",this.handleSummaryClick),f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.boxSizing="border-box",f.style.pointerEvents="auto",f.style.padding=c.padding,f.style.border="1px solid rgba(148, 163, 184, 0.22)",f.style.borderRadius=`${c.radius}px`,f.style.background="rgba(255, 255, 255, 0.94)",f.style.color="#1f2937",f.style.boxShadow="0 8px 24px rgba(15, 23, 42, 0.1)",f.style.font=`500 ${c.bodySize}px/1.35 ${c.fontFamily}`,f.style.backdropFilter="blur(10px)";const d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.gap=`${c.gap}px`,(this.isSummaryHovering||this.isReplyOpen)&&d.append(this.createSummaryActionButton("x",this.copy.hideMessage,this.handleSummaryDelete));const y=document.createElement("div");y.textContent=u.title,y.style.minWidth="0",y.style.flex="1",y.style.overflow="hidden",y.style.textOverflow="ellipsis",y.style.whiteSpace="nowrap",y.style.fontWeight="700",y.style.fontSize=`${c.titleSize}px`,y.dataset.chatkitPetSummaryTitle="",d.append(y),this.isSummaryHovering||this.isReplyOpen?d.append(this.createSummaryActionButton(this.isSummaryExpanded?"-":">",this.isSummaryExpanded?this.copy.collapseMessage:this.copy.expandMessage,this.handleSummaryExpandToggle)):d.append(this.createStatusIcon(u.status));const p=document.createElement("div");if(p.textContent=u.message,p.style.marginTop=`${c.marginTop}px`,p.style.fontWeight="400",p.style.color="#374151",p.style.overflow="hidden",this.isSummaryExpanded?(p.style.maxHeight="7em",p.style.overflowY="auto"):(p.style.display="-webkit-box",p.style.setProperty("-webkit-line-clamp","2"),p.style.setProperty("-webkit-box-orient","vertical")),p.dataset.chatkitPetSummaryMessage="",f.append(d,p),s){const E=this.createTextButton(this.copy.replyButton,this.handleReplyOpen);E.style.position="absolute",E.style.right="14px",E.style.bottom="10px",f.append(E)}return this.isReplyOpen&&f.append(this.createReplyForm()),f}updateSummaryBubbleContent(u){var d,y,p;const s=(d=this.summaryElement)==null?void 0:d.querySelector("[data-chatkit-pet-summary-title]");s&&s.textContent!==u.title&&(s.textContent=u.title);const c=(y=this.summaryElement)==null?void 0:y.querySelector("[data-chatkit-pet-summary-message]");c&&c.textContent!==u.message&&(c.textContent=u.message);const f=(p=this.summaryElement)==null?void 0:p.querySelector("[data-chatkit-pet-summary-status]");if(f&&f.dataset.chatkitPetSummaryStatus!==u.status){const E=this.createStatusIcon(u.status);f.replaceWith(E)}}createSummaryToggleButton(u){const s=ui(this.theme),c=document.createElement("button");return c.type="button",c.textContent=u,c.title=u==="1"?this.copy.restoreMessage:this.copy.collapseMessage,c.addEventListener("click",Bu),c.addEventListener("click",this.handleSummaryCollapseToggle),c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.pointerEvents="auto",c.style.border="1px solid rgba(148, 163, 184, 0.28)",c.style.background="rgba(248, 250, 252, 0.94)",c.style.color="#475569",c.style.boxShadow="0 6px 18px rgba(15, 23, 42, 0.1)",c.style.cursor="pointer",c.style.font=`600 ${s.titleSize}px/1 ${s.fontFamily}`,c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center",c}createStatusIcon(u){const c=ui(this.theme).iconSize,f=document.createElement("span");if(f.setAttribute("aria-hidden","true"),f.dataset.chatkitPetSummaryStatus=u,f.style.display="inline-flex",f.style.width=`${c}px`,f.style.height=`${c}px`,f.style.alignItems="center",f.style.justifyContent="center",f.style.flex="0 0 auto",u==="running")return f.style.border="2px solid rgba(71, 85, 105, 0.32)",f.style.borderTopColor="#64748b",f.style.borderRadius="999px",f.style.animation="chatkit-pet-summary-spin 900ms linear infinite",f;if(f.style.borderRadius="999px",f.style.fontSize=`${Math.max(10,c-4)}px`,f.style.fontWeight="700",u==="failed")return f.textContent="!",f.style.background="#fee2e2",f.style.color="#b91c1c",f;f.textContent="",f.style.border="2px solid #22c55e",f.style.position="relative";const d=document.createElement("span");return d.style.width=`${Math.round(c*.44)}px`,d.style.height=`${Math.round(c*.25)}px`,d.style.borderLeft="2px solid #22c55e",d.style.borderBottom="2px solid #22c55e",d.style.transform="rotate(-45deg) translate(1px, -1px)",f.append(d),f}createSummaryActionButton(u,s,c){const f=ui(this.theme),d=document.createElement("button");return d.type="button",d.textContent=u,d.title=s,d.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),c()}),d.style.width=`${f.actionSize}px`,d.style.height=`${f.actionSize}px`,d.style.border="0",d.style.borderRadius="999px",d.style.background="rgba(241, 245, 249, 0.96)",d.style.color="#475569",d.style.cursor="pointer",d.style.font=`600 ${f.titleSize}px/1 ${f.fontFamily}`,d}createTextButton(u,s){const c=document.createElement("button");return c.type="button",c.textContent=u,c.addEventListener("click",f=>{f.preventDefault(),f.stopPropagation(),s()}),c.style.border="1px solid rgba(148, 163, 184, 0.28)",c.style.borderRadius="999px",c.style.background="rgba(248, 250, 252, 0.95)",c.style.color="#334155",c.style.cursor="pointer",c.style.padding="3px 10px",c.style.font='600 12px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',c}createReplyForm(){const u=document.createElement("form");u.addEventListener("click",Bu),u.addEventListener("submit",this.handleReplySubmit),u.addEventListener("keydown",this.handleReplyKeyDown),u.style.display="flex",u.style.gap="6px",u.style.alignItems="center",u.style.marginTop="8px";const s=document.createElement("input");s.type="text",s.value=this.replyDraft,s.disabled=this.isReplySubmitting,s.placeholder=this.copy.replyPlaceholder,s.addEventListener("input",this.handleReplyInput),s.style.minWidth="0",s.style.flex="1",s.style.border="1px solid rgba(148, 163, 184, 0.35)",s.style.borderRadius="999px",s.style.padding="6px 10px",s.style.font='400 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',this.replyInputElement=s;const c=document.createElement("button");if(c.type="submit",c.textContent=this.isReplySubmitting?this.copy.sendingButton:this.copy.sendButton,c.disabled=this.isReplySubmitting,c.style.border="0",c.style.borderRadius="999px",c.style.background="#22c55e",c.style.color="#052e16",c.style.cursor=this.isReplySubmitting?"default":"pointer",c.style.padding="6px 10px",c.style.font='700 12px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',u.append(s,c),this.replyError){const f=document.createElement("div");f.textContent=this.copy.sendFailed,f.style.flexBasis="100%",f.style.color="#b91c1c",f.style.fontSize="12px",u.style.flexWrap="wrap",u.append(f)}return u}createContextMenu(){const u=document.createElement("div");u.setAttribute("data-chatkit-pet-context-menu",""),u.setAttribute("role","menu"),u.addEventListener("contextmenu",this.handleContextMenuEvent),u.addEventListener("pointerdown",Bu),u.addEventListener("click",Bu),u.style.position="absolute",u.style.top="0",u.style.left="0",u.style.boxSizing="border-box",u.style.minWidth="132px",u.style.padding="4px",u.style.pointerEvents="auto",u.style.border="1px solid rgba(148, 163, 184, 0.28)",u.style.borderRadius="10px",u.style.background="rgba(255, 255, 255, 0.96)",u.style.color="#1f2937",u.style.boxShadow="0 12px 28px rgba(15, 23, 42, 0.16)",u.style.font='500 13px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',u.style.backdropFilter="blur(10px)";const s=document.createElement("button");return s.type="button",s.textContent=this.copy.closePetMenuItem,s.setAttribute("role","menuitem"),s.addEventListener("click",this.handleClosePetMenuItemClick),s.style.display="block",s.style.width="100%",s.style.border="0",s.style.borderRadius="7px",s.style.background="transparent",s.style.color="inherit",s.style.cursor="pointer",s.style.padding="7px 10px",s.style.textAlign="left",s.style.font="inherit",u.append(s),u}openContextMenu(u){var f;const s=this.overlayElement;if(!s)return;this.closeContextMenu();const c=this.createContextMenu();s.append(c),this.contextMenuElement=c,this.positionContextMenu(u),(f=c.querySelector("button"))==null||f.focus({preventScroll:!0}),window.addEventListener("pointerdown",this.handleContextMenuOutsidePointerDown,!0),window.addEventListener("keydown",this.handleContextMenuKeyDown)}closeContextMenu(){var u;(u=this.contextMenuElement)==null||u.remove(),this.contextMenuElement=null,window.removeEventListener("pointerdown",this.handleContextMenuOutsidePointerDown,!0),window.removeEventListener("keydown",this.handleContextMenuKeyDown)}positionContextMenu(u){const s=this.contextMenuElement;if(!s)return;const c=na(),f=s.offsetWidth||132,d=s.offsetHeight||40,y=Math.max(la,c.width-f-la),p=Math.max(la,c.height-d-la),E=Ql(u.x,la,y),b=Ql(u.y,la,p);s.style.transform=`translate3d(${E}px, ${b}px, 0)`}renderAtlas(u,s){var W;if(!this.petElement||((W=this.resolved)==null?void 0:W.kind)!=="atlas"||!this.options)return;if(!(this.mediaElement instanceof HTMLDivElement)){const ct=document.createElement("div");ct.setAttribute("aria-hidden","true"),this.petElement.replaceChildren(ct),this.mediaElement=ct}const c=this.mediaElement,f=this.resolved.atlas,d=f.animations[u]??f.animations.idle,y=s==="once"&&this.completed?Math.max(0,d.frames-1):Math.min(this.frame,Math.max(0,d.frames-1)),p=fm(this.options.position.scale),E=f.cellWidth,b=f.cellHeight,H=f.columns*E,R=f.rows*b;c.style.width=`${E}px`,c.style.height=`${b}px`,c.style.overflow="hidden",c.style.transform=`scale(${p})`,c.style.transformOrigin="top left",c.style.pointerEvents="none",c.style.backgroundImage=`url("${q0(this.resolved.src)}")`,c.style.backgroundRepeat="no-repeat",c.style.backgroundSize=`${H}px ${R}px`,c.style.backgroundPosition=`${-y*E}px ${-d.row*b}px`,c.style.imageRendering=this.options.imageRendering,c.dataset.petFrame=String(y)}scheduleNextFrame(u,s){if(this.prefersReducedMotion||this.completed||!this.resolved){this.clearTimers();return}if(this.frameTimer!==null)return;const c=this.resolved.atlas,f=c.animations[u]??c.animations.idle,y=(f.frameDurations[this.frame]??f.frameDurations[f.frameDurations.length-1]??150)*R0,p=this.isHovering||this.isDragging?y:y*U0;this.frameTimer=window.setTimeout(()=>{this.frameTimer=null;const E=this.frame+1;if(E>=f.frames){if(s==="once"){this.completed=!0,this.frame=Math.max(0,f.frames-1),this.finishTransient();return}this.frame=0,this.render();return}this.frame=E,this.render()},p)}clearTimers(){this.frameTimer!==null&&(window.clearTimeout(this.frameTimer),this.frameTimer=null)}clearRestingDelayTimer(){this.restingDelayTimer!==null&&(window.clearTimeout(this.restingDelayTimer),this.restingDelayTimer=null)}finishTransient(){this.transient=null,this.activeAnimationName=null,this.activeAnimationMode=null,this.render()}rescheduleAnimation(){this.clearTimers(),this.render()}enterRestingAfterDelay(){this.clearRestingDelayTimer(),this.isHovering=!0,this.restingDelayTimer=window.setTimeout(()=>{this.restingDelayTimer=null,!this.isDragging&&(this.isHovering=!1,this.rescheduleAnimation())},N0)}isPointOverPet(u,s){var f;const c=(f=this.petElement)==null?void 0:f.getBoundingClientRect();return c?u>=c.left&&u<=c.right&&s>=c.top&&s<=c.bottom:!1}isPointerOverPet(u){return this.isPointOverPet(u.clientX,u.clientY)}async submitReply(){var s;const u=this.replyDraft.trim();if(!(!u||this.isReplySubmitting)){this.isReplySubmitting=!0,this.replyError=null,this.render();try{await((s=this.onReply)==null?void 0:s.call(this,u)),this.replyDraft="",this.isReplyOpen=!1,this.isSummaryHovering=!1}catch{this.replyError="Failed to send"}finally{this.isReplySubmitting=!1,this.render()}}}captureActivePointer(){const u=this.activePointerId,s=this.petElement;if(!(u===null||typeof(s==null?void 0:s.setPointerCapture)!="function"))try{s.setPointerCapture(u)}catch{}}releaseActivePointer(){const u=this.activePointerId,s=this.petElement;if(this.activePointerId=null,!(u===null||typeof(s==null?void 0:s.hasPointerCapture)!="function"||typeof s.releasePointerCapture!="function"))try{s.hasPointerCapture(u)&&s.releasePointerCapture(u)}catch{}}isActiveDragPointer(u){return this.isDragging&&u.pointerId===this.activePointerId}getNextDragPosition(u){return this.options?Ne({x:u.clientX-this.dragOffset.x,y:u.clientY-this.dragOffset.y},this.getSize(),na(),br(this.options.position.boundsPadding)):{x:0,y:0}}finishDrag(u,s){this.isDragging=!1,this.dragPosition=null,this.dragAnimation=null,this.lastDragClientX=null,this.removeDragListeners(),this.releaseActivePointer(),this.persistPosition(u),s.pointerType==="mouse"&&this.isPointerOverPet(s)?(this.isHovering=!0,this.rescheduleAnimation()):(this.enterRestingAfterDelay(),this.rescheduleAnimation())}cancelActiveDrag(){this.isDragging=!1,this.dragPosition=null,this.dragAnimation=null,this.lastDragPosition=null,this.lastDragClientX=null,this.removeDragListeners(),this.releaseActivePointer()}installDragListeners(){window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp),window.addEventListener("pointercancel",this.handlePointerUp)}removeDragListeners(){window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}}var $0=Object.create,Cm=Object.defineProperty,F0=Object.getOwnPropertyDescriptor,zm=(r,u)=>(u=Symbol[r])?u:Symbol.for("Symbol."+r),Vu=r=>{throw TypeError(r)},I0=(r,u,s)=>u in r?Cm(r,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[u]=s,P0=r=>[,,,$0((r==null?void 0:r[zm("metadata")])??null)],Om=["class","method","getter","setter","accessor","field","value","get","set"],Dm=r=>r!==void 0&&typeof r!="function"?Vu("Function expected"):r,tv=(r,u,s,c,f)=>({kind:Om[r],name:u,metadata:c,addInitializer:d=>s._?Vu("Already initialized"):f.push(Dm(d||null))}),ev=(r,u)=>I0(u,zm("metadata"),r[3]),lv=(r,u,s,c)=>{for(var f=0,d=r[u>>1],y=d&&d.length;f<y;f++)d[f].call(s);return c},Be=(r,u,s,c,f,d)=>{for(var y,p,E,b,H=u&7,R=!1,W=!1,ct=2,Et=Om[H+5],ut=r[ct]||(r[ct]=[]),Mt=(f=f.prototype,F0(f,s)),Tt=c.length-1;Tt>=0;Tt--)E=tv(H,s,p={},r[3],ut),E.static=R,E.private=W,b=E.access={has:Ut=>s in Ut},b.get=Ut=>Ut[s],y=(0,c[Tt])(Mt[Et],E),p._=1,Dm(y)&&(Mt[Et]=y);return Mt&&Cm(f,s,Mt),f},Ur=(r,u,s)=>u.has(r)||Vu("Cannot "+s),C=(r,u,s)=>(Ur(r,u,"read from private field"),s?s.call(r):u.get(r)),qt=(r,u,s)=>u.has(r)?Vu("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(r):u.set(r,s),$t=(r,u,s,c)=>(Ur(r,u,"write to private field"),u.set(r,s),s),G=(r,u,s)=>(Ur(r,u,"access private method"),s),wm,Rm,Um,Nm,Hm,Bm,Lm,jm,qm,Ym,Xm,Gm,Cr,it,Vl,yl,gl,mn,ju,Nr,Zu,ua,yn,ke,He,qu,Kt,ci,ht,Y,Gl,Hr,We,Ju,Qm,ku,Km,Vm,Br,Zl,di,zr,Zm,Jm,km,Wm,Yu,$m,Fm,Im,Xu,sa,Or,ee;function Pm(r){return Mr(r)}function Ue(r,u){const s=String(u.name);return function(...c){if(!this.capabilities.commands.has(s))throw new It(`ChatKit command "${String(s)}" is not available for the "${this.profile}" profile.`);return r.apply(this,c)}}class he extends(Cr=HTMLElement,Gm=[Ue],Xm=[Ue],Ym=[Ue],qm=[Ue],jm=[Ue],Lm=[Ue],Bm=[Ue],Hm=[Ue],Nm=[Ue],Um=[Ue],Rm=[Ue],wm=[Ue],Cr){constructor({profile:u}){super(),lv(ee,5,this),qt(this,Y),this.profile=void 0,this.capabilities=void 0,qt(this,it),qt(this,Vl),qt(this,yl),qt(this,gl),qt(this,mn),qt(this,ju),qt(this,Nr,!1),qt(this,Zu,!1),qt(this,ua),qt(this,yn,!1),qt(this,ke,this.attachShadow({mode:"open"})),qt(this,He,new W0(C(this,ke),{onActivate:()=>G(this,Y,Zm).call(this),onClose:()=>G(this,Y,Jm).call(this),onReply:s=>G(this,Y,km).call(this,s),onThreadSummaryActivate:s=>void G(this,Y,Wm).call(this,s)})),qt(this,qu),qt(this,Kt,new Promise(s=>{$t(this,qu,s)})),qt(this,ci,xm()),qt(this,ht,new A0({channelId:C(this,ci)??void 0,fetch:((...s)=>{var f;const c=((f=C(this,it))==null?void 0:f.api)&&"fetch"in C(this,it).api&&C(this,it).api.fetch;return c?c(...s):fetch(...s)}),target:()=>{var s;return((s=C(this,yl))==null?void 0:s.contentWindow)??null},targetOrigin:window.location.origin,handlers:{onRealtimeVoiceCommand:s=>{var f;const c=(f=C(this,it))==null?void 0:f.realtimeVoice;if(!c||s.type==="start"&&!c.enabled)throw new It("Realtime voice is unavailable.");return c.onCommand(s)},onFileInputClick:({inputAttributes:s})=>new Promise(c=>{const f=document.createElement("input");for(const[y,p]of Object.entries(s))f.setAttribute(y,String(p));const d=()=>{c(Array.from(f.files||[])),C(this,ke).contains(f)&&C(this,ke).removeChild(f)};f.addEventListener("cancel",d),f.addEventListener("change",d),C(this,ke).appendChild(f),f.click()}),onApprovalDecision:async s=>{var f,d;const c=(d=(f=C(this,it))==null?void 0:f.approvals)==null?void 0:d.onDecision;if(!c)throw new It("Add approvals.onDecision to handle host approvals.");return c(s)},onApprovalAction:async s=>{var f,d;const c=(d=(f=C(this,it))==null?void 0:f.approvals)==null?void 0:d.onAction;if(!c)throw new It("Add approvals.onAction to handle approval actions.");return c(s)},onClientToolCall:async({name:s,params:c,id:f,tool_call_id:d})=>{var p;const y=(p=C(this,it))==null?void 0:p.onClientTool;return y||G(this,Y,Gl).call(this,new It("No handler for client tool calls. You'll need to add onClientTool to your ChatKit options.")),y({name:s,params:c,id:f,tool_call_id:d})},onToolOutputAttachmentPreview:async s=>{var f,d;const c=(d=(f=C(this,it))==null?void 0:f.toolOutputAttachments)==null?void 0:d.onRequestPreview;return c||G(this,Y,Gl).call(this,new It("No handler for tool-output attachment previews. Add toolOutputAttachments.onRequestPreview to your ChatKit options.")),c(s)},onConnectWorkspaceConnector:async s=>{var f,d,y;const c=(y=(d=(f=C(this,it))==null?void 0:f.composer)==null?void 0:d.resources)==null?void 0:y.onConnect;return c||G(this,Y,Gl).call(this,new It("Add composer.resources.onConnect to handle workspace Connector connections.")),c(s)},onWorkbenchClientCommand:async({commandKey:s,payload:c,hostType:f,hostId:d,viewKey:y})=>{var E,b;const p=(b=(E=C(this,it))==null?void 0:E.workbench)==null?void 0:b.onClientCommand;return p?p({commandKey:s,payload:c,hostType:f,hostId:d,viewKey:y}):{success:!1,code:"unsupported",commandKey:s}},onWidgetAction:async({action:s,widgetItem:c})=>{var d,y;const f=(y=(d=C(this,it))==null?void 0:d.widgets)==null?void 0:y.onAction;return f||G(this,Y,Gl).call(this,new It("No handler for widget actions. You'll need to add widgets.onAction to your ChatKit options.")),f(s,c)},onEntitySearch:async({query:s})=>{var c,f,d;return((d=(f=(c=C(this,it))==null?void 0:c.entities)==null?void 0:f.onTagSearch)==null?void 0:d.call(f,s))??[]},onEntityClick:async({entity:s})=>{var c,f,d;return(d=(f=(c=C(this,it))==null?void 0:c.entities)==null?void 0:f.onClick)==null?void 0:d.call(f,s)},onEntityPreview:async({entity:s})=>{var c,f,d;return((d=(f=(c=C(this,it))==null?void 0:c.entities)==null?void 0:f.onRequestPreview)==null?void 0:d.call(f,s))??{preview:null}},onGetClientSecret:async s=>((!C(this,it)||!("getClientSecret"in C(this,it).api)||!C(this,it).api.getClientSecret)&&G(this,Y,Gl).call(this,new It("Could not refresh the session because ChatKitOptions.api.getClientSecret is not configured.")),C(this,it).api.getClientSecret(s??null)),onAddMetadataToRequest:({op:s,params:c})=>{throw new It("ChatKit: onAddMetadataToRequest is unimplemented.")}}})),qt(this,Yu,()=>{G(this,Y,Zl).call(this,!1)}),qt(this,Xu,()=>{var s;this.dataset.loaded="true",this.dispatchEvent(new CustomEvent("chatkit.ready",{bubbles:!0,composed:!0})),(s=C(this,qu))==null||s.call(this)}),qt(this,sa,!1),this.profile=u,this.capabilities=um(u)}setProfile(u){this.profile=u,this.capabilities=um(u)}connectedCallback(){C(this,He).connect();const u=document.createElement("style");u.textContent=`
55
55
  :host {
56
56
  display: block;
57
57
  position: relative;
@@ -196,4 +196,4 @@ Error generating stack: `+n.message+`
196
196
  right: 8px;
197
197
  }
198
198
  }
199
- `;const s=document.createElement("iframe");s.className="ck-iframe",s.name="chatkit",s.role="presentation",s.tabIndex=0,s.setAttribute("allowtransparency","true"),s.setAttribute("frameborder","0"),s.setAttribute("scrolling","no"),s.setAttribute("allow","clipboard-read; clipboard-write"),$t(this,yl,s);const c=document.createElement("div");c.className="ck-wrapper",c.appendChild(s),$t(this,pl,c);const f=document.createElement("button");f.className="ck-launcher-close",f.type="button",f.setAttribute("aria-label","Close chat"),f.addEventListener("click",C(this,Yu)),c.appendChild(f),$t(this,ju,f),$t(this,mn,new E0(c,()=>{var d,y;return((y=(d=C(this,it))==null?void 0:d.header)==null?void 0:y.windowDrag)===!0})),C(this,vt).on("window_drag_regions",d=>{var y;return(y=C(this,mn))==null?void 0:y.update(d)}),C(this,ke).append(u),C(this,vt).on("left_header_icon_click",()=>{var d,y,g;(g=(y=(d=C(this,it))==null?void 0:d.header)==null?void 0:y.leftAction)==null||g.onClick()}),C(this,vt).on("right_header_icon_click",()=>{var d,y,g;(g=(y=(d=C(this,it))==null?void 0:d.header)==null?void 0:y.rightAction)==null||g.onClick()}),C(this,vt).on("public_event",([d,y])=>{if(d==="log"){const g=J0(y);g&&C(this,Ne).setThreadSummary(g.summary)}else d==="response.start"?C(this,Ne).setThreadSummaryStatus("running"):d==="response.end"?C(this,Ne).setThreadSummaryStatus("completed"):d==="response.stop"&&C(this,Ne).setThreadSummaryStatus("completed");if(this.capabilities.events.has(d)){if(d==="error"&&"error"in y){const g=p0(y.error);if(this.dispatchEvent(new CustomEvent("chatkit.error",{detail:{error:g}})),g instanceof It)throw g;return}this.dispatchEvent(new CustomEvent(`chatkit.${d}`,{detail:y}))}}),C(this,vt).on("pet_state_change",d=>{const y=Q0(d);y&&C(this,Ne).setState(y.state)}),C(this,vt).on("pet_options_change",d=>{const y=K0(d);y&&((!C(this,yn)||y.pet===null)&&$t(this,yn,!1),$t(this,ua,y.pet),G(this,Y,zr).call(this))}),C(this,vt).on("chat_minimize_change",d=>{const y=typeof d=="object"&&d!==null&&"minimized"in d&&d.minimized===!0;y&&!G(this,Y,ku).call(this)||(G(this,Y,di).call(this,y),y&&G(this,Y,Zl).call(this,!1))}),C(this,vt).on("unmount",()=>{var d;(d=C(this,mn))==null||d.destroy(),C(this,pl)&&C(this,ke).contains(C(this,pl))&&(C(this,ke).removeChild(C(this,pl)),$t(this,pl,void 0),$t(this,yl,void 0))}),C(this,vt).on("capabilities_profile_change",({profile:d})=>{this.setProfile(d)}),s.addEventListener("load",C(this,Xu),{once:!0});try{G(this,Y,Or).call(this)}catch(d){console.error(d),G(this,Y,Gl).call(this,d instanceof Error?d:new It("Failed to initialize ChatKit"))}}disconnectedCallback(){var u,s,c;(u=C(this,mn))==null||u.destroy(),(s=C(this,yl))==null||s.removeEventListener("load",C(this,Xu)),(c=C(this,ju))==null||c.removeEventListener("click",C(this,Yu)),C(this,vt).disconnect(),C(this,Ne).destroy()}applySanitizedOptions(u){var s,c;$t(this,it,u),(s=u.header)!=null&&s.windowDrag||(c=C(this,mn))==null||c.clear(),$t(this,yn,!1),C(this,Ne).setLocale(u.locale),G(this,Y,zr).call(this),C(this,sa)?(G(this,Y,Hr).call(this,C(this,it)),C(this,Wt).then(()=>{C(this,vt).commands.setOptions(Im(G(this,Y,Br).call(this,u)))})):G(this,Y,Or).call(this)}setOptions(u){try{const s=this.sanitizeOptions(u);G(this,Y,Fm).call(this,s),this.applySanitizedOptions(s)}catch(s){G(this,Y,Gl).call(this,s instanceof Error?s:new It("Failed to parse options"))}}async focusComposer(){var u,s;await C(this,Wt),(u=C(this,yl))==null||u.focus(),await((s=C(this,vt))==null?void 0:s.commands.focusComposer())}async fetchUpdates(){var u;await C(this,Wt),await((u=C(this,vt))==null?void 0:u.commands.fetchUpdates())}async sendUserMessage(u){var s;await C(this,Wt),await((s=C(this,vt))==null?void 0:s.commands.sendUserMessage(u))}async setComposerValue(u){var s;await C(this,Wt),await((s=C(this,vt))==null?void 0:s.commands.setComposerValue(u))}async setRuntimeCapabilities(u){var s;await C(this,Wt),await((s=C(this,vt))==null?void 0:s.commands.setRuntimeCapabilities(u))}async setThreadId(u){var s;await C(this,Wt),await((s=C(this,vt))==null?void 0:s.commands.setThreadId({threadId:u}))}async shareThread(){var u;return await C(this,Wt),(u=C(this,vt))==null?void 0:u.commands.shareThread()}async sendCustomAction(u,s){var c;return await C(this,Wt),(c=C(this,vt))==null?void 0:c.commands.sendCustomAction({action:u,itemId:s})}async showHistory(){var u;return await C(this,Wt),(u=C(this,vt))==null?void 0:u.commands.showHistory()}async hideHistory(){var u;return await C(this,Wt),(u=C(this,vt))==null?void 0:u.commands.hideHistory()}async setTrainingOptOut(u){var s;return await C(this,Wt),(s=C(this,vt))==null?void 0:s.commands.setTrainingOptOut({value:u})}}fe=I0(Cr);it=new WeakMap;Vl=new WeakMap;yl=new WeakMap;pl=new WeakMap;mn=new WeakMap;ju=new WeakMap;Nr=new WeakMap;Zu=new WeakMap;ua=new WeakMap;yn=new WeakMap;ke=new WeakMap;Ne=new WeakMap;qu=new WeakMap;Wt=new WeakMap;ci=new WeakMap;vt=new WeakMap;Y=new WeakSet;Gl=function(r){throw this.dispatchEvent(new CustomEvent("chatkit.error",{detail:{error:r}})),r};Hr=function(r){var u;this.dataset.colorScheme=typeof r.theme=="string"?r.theme:((u=r.theme)==null?void 0:u.colorScheme)??"light",this.dataset.displayMode=G(this,Y,We).call(this,r),G(this,Y,We).call(this,r)!=="pet"&&G(this,Y,Zl).call(this,!1)};We=function(r=C(this,it)){return(r==null?void 0:r.displayMode)==="pet"?"pet":"chat"};Ju=function(r=C(this,it)){return r?G(this,Y,We).call(this,r)==="pet"&&!hi(r.pet??null)?!0:r.pet??null:null};Gm=function(r){if(!r)return r;const u=hi(G(this,Y,Ju).call(this)??null);return u?r===!0?{position:u.position}:r.position?{...r,position:{...u.position,...r.position,boundsPadding:r.position.boundsPadding??u.position.boundsPadding,pin:"pin"in r.position?r.position.pin:u.position.pin}}:{...r,position:u.position}:r};ku=function(){var u;if(C(this,yn)||((u=C(this,it))==null?void 0:u.pet)===!1&&G(this,Y,We).call(this)!=="pet")return null;let r;return C(this,ua)!==void 0?r=G(this,Y,Gm).call(this,C(this,ua)):r=G(this,Y,Ju).call(this),G(this,Y,We).call(this)==="pet"&&!hi(r??null)&&(r=!0),G(this,Y,Km).call(this,r)};Qm=function(r){try{const u=new URL(C(this,Vl)??window.location.href,window.location.origin);return new URL(r,u).toString()}catch{return r}};Km=function(r){const u=hi(r??null);return u?{character:{...u.character,src:G(this,Y,Qm).call(this,u.character.src)},position:u.position,behavior:u.behavior,ariaLabel:u.ariaLabel,imageRendering:u.imageRendering}:null};Br=function(r){const u=G(this,Y,Ju).call(this,r);if(u===(r.pet??null))return r;const s={...r};return u===null?delete s.pet:s.pet=u,s};Zl=function(r){$t(this,Nr,r),r?this.dataset.chatOpen="true":delete this.dataset.chatOpen};di=function(r){const u=r&&!!G(this,Y,ku).call(this);$t(this,Zu,u),u?this.dataset.chatMinimizedToPet="true":delete this.dataset.chatMinimizedToPet};zr=function(){var u;const r=G(this,Y,ku).call(this);C(this,Ne).setOptions(r,(u=C(this,it))==null?void 0:u.theme),r||G(this,Y,di).call(this,!1)};Vm=function(){if(C(this,Zu)){G(this,Y,di).call(this,!1),G(this,Y,We).call(this)==="pet"&&G(this,Y,Zl).call(this,!0),C(this,Wt).then(()=>this.focusComposer()).catch(()=>{});return}G(this,Y,We).call(this)==="pet"&&(G(this,Y,Zl).call(this,!0),C(this,Wt).then(()=>this.focusComposer()).catch(()=>{}))};Zm=function(){$t(this,yn,!0),$t(this,ua,null),G(this,Y,di).call(this,!1),G(this,Y,Zl).call(this,!1),C(this,Ne).setOptions(null),G(this,Y,We).call(this)!=="pet"&&C(this,Wt).then(()=>C(this,vt).commands.setPetEnabled({enabled:!1})).catch(()=>{})};Jm=async function(r){await this.sendUserMessage({text:r})};km=async function(r){G(this,Y,We).call(this)==="pet"&&G(this,Y,Zl).call(this,!0),await this.setThreadId(r),await this.focusComposer()};Yu=new WeakMap;Wm=function(){if(!C(this,Vl))throw new It("ChatKit frameUrl is not configured. Provide it via setOptions({ frameUrl }) before mounting.");return C(this,Vl)};$m=function(r){if(C(this,sa)&&C(this,Vl)&&C(this,Vl)!==r)throw new It("ChatKit frameUrl cannot be changed after initialization. Create a new element to use a different URL.");$t(this,Vl,r)};Fm=function(r){if(!("frameUrl"in r))return;const u=r.frameUrl;if(delete r.frameUrl,u!=null){if(typeof u!="string"||u.trim()==="")throw new It("ChatKit frameUrl must be a non-empty string.");G(this,Y,$m).call(this,u)}};Xu=new WeakMap;sa=new WeakMap;Or=function(){if(C(this,sa)||!C(this,yl)||!C(this,it))return;$t(this,sa,!0),G(this,Y,Hr).call(this,C(this,it));const r=new URL(G(this,Y,Wm).call(this),window.location.origin);C(this,vt).setTargetOrigin(r.origin),r.hash=y0({options:Im(G(this,Y,Br).call(this,C(this,it))),referrer:window.location.origin,profile:this.profile,...C(this,ci)?{channelId:C(this,ci)}:{}}),C(this,vt).connect(),C(this,yl).src=r.toString(),C(this,pl)&&C(this,ke).append(C(this,pl))};Ye(fe,1,"focusComposer",Xm,Te);Ye(fe,1,"fetchUpdates",Ym,Te);Ye(fe,1,"sendUserMessage",qm,Te);Ye(fe,1,"setComposerValue",jm,Te);Ye(fe,1,"setRuntimeCapabilities",Lm,Te);Ye(fe,1,"setThreadId",Bm,Te);Ye(fe,1,"shareThread",Hm,Te);Ye(fe,1,"sendCustomAction",Nm,Te);Ye(fe,1,"showHistory",Um,Te);Ye(fe,1,"hideHistory",Rm,Te);Ye(fe,1,"setTrainingOptOut",wm,Te);tv(fe,Te);class lv extends Te{constructor(){super({profile:"chatkit"})}sanitizeOptions(u){var s;return(s=u.threadItemActions)==null||delete s.share,u}}function nv(r="xpertai-chatkit"){"customElements"in globalThis&&(customElements.get(r)||customElements.define(r,lv))}nv();const Pm={"chatkit.error":"onError","chatkit.response.end":"onResponseEnd","chatkit.response.start":"onResponseStart","chatkit.log":"onLog","chatkit.thread.change":"onThreadChange","chatkit.project.change":"onProjectChange","chatkit.connectors.change":"onConnectorsChange","chatkit.thread.load.start":"onThreadLoadStart","chatkit.thread.load.end":"onThreadLoadEnd","chatkit.ready":"onReady","chatkit.effect":"onEffect"},av=Object.keys(Pm),iv=bt.forwardRef(function({control:u,...s},c){const f=bt.useRef(null);return bt.useLayoutEffect(()=>{const d=f.current;if(!d)return;if(customElements.get("xpertai-chatkit")){d.setOptions(u.options);return}let y=!0;return customElements.whenDefined("xpertai-chatkit").then(()=>{y&&d.setOptions(u.options)}),()=>{y=!1}},[u.options]),bt.useEffect(()=>{const d=f.current;if(!d)return;const y=new AbortController;for(const g of av)d.addEventListener(g,E=>{const b=Pm[g],H=u.handlers[b];typeof H=="function"&&H(E.detail)},{signal:y.signal});return()=>{y.abort()}},[u.handlers]),K.jsx("xpertai-chatkit",{ref:d=>{f.current=d,u.setInstance(d),typeof c=="function"?c(d):c&&(c.current=d),f.current},...s})}),uv=["office_word_snapshot","office_word_insert_text","office_word_replace_selection","office_word_insert_heading","office_word_insert_table","office_word_search_text"],sv=new Set(uv);function cv(r){return sv.has(r)}const rv=5e3,ov=20;function ty(r){return typeof r=="string"&&r.trim()?r.trim():void 0}function Lu(r,u){const s=ty(r);if(!s)throw new Error(`${u} must be a non-empty string.`);return s}function ym(r){return typeof r=="boolean"?r:void 0}function ri(r){if(!(typeof r!="number"||!Number.isInteger(r)||r<=0))return r}function Dr(r,u){const s=ri(r);if(s===void 0)throw new Error(`${u} must be a positive integer.`);return s}function Er(r,u="End"){var c;const s=(c=ty(r))==null?void 0:c.toLowerCase();if(!s)return u;if(s==="start")return"Start";if(s==="end")return"End";throw new Error("location must be Start or End.")}function fv(r){if(r===void 0)return 1;const u=Dr(r,"level");if(u>9)throw new Error("level must be between 1 and 9.");return u}function hv(r){if(r==null)return"";if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return String(r);throw new Error("table values must contain only strings, numbers, booleans, or nulls.")}function dv(r){if(r!==void 0){if(!Array.isArray(r))throw new Error("values must be a two-dimensional array.");return r.map(u=>{if(!Array.isArray(u))throw new Error("values must be a two-dimensional array.");return u.map(hv)})}}function mv(r){const u=dv(r.values),s=ri(r.rowCount),c=ri(r.columnCount);if(!u)return{rowCount:Dr(r.rowCount,"rowCount"),columnCount:Dr(r.columnCount,"columnCount")};const f=u.length,d=u.reduce((E,b)=>Math.max(E,b.length),0),y=s??f,g=c??d;if(y<=0||g<=0)throw new Error("values must include at least one row and one column.");return{rowCount:y,columnCount:g,values:Array.from({length:y},(E,b)=>Array.from({length:g},(H,R)=>{var W;return((W=u[b])==null?void 0:W[R])??""}))}}function wr(r){var u;return((u=r.Content)==null?void 0:u.Text)??""}function ey(r,u){var y;const s=r.Content;if(!s)throw new Error("The active WPS document does not expose a content range.");const c=s.Start??0,f=s.End??wr(r).length,d=u==="Start"?c:f;return((y=r.Range)==null?void 0:y.call(r,d,d))??s}function pm(r,u,s){const c=ey(r,s);return s==="Start"&&c.InsertBefore?(c.InsertBefore(u),c):s==="End"&&c.InsertAfter?(c.InsertAfter(u),c):(c.Text=u,c)}function yv(r){return-(r+1)}function pv(r,u){r!=null&&r.Cell&&u.forEach((s,c)=>{s.forEach((f,d)=>{var g;const y=(g=r.Cell)==null?void 0:g.call(r,c+1,d+1);y!=null&&y.Range&&(y.Range.Text=f)})})}function gv(r){return{name:r.Name??"WPS Writer",build:r.Build,version:r.Version}}function gm(r){return/^[\p{L}\p{N}_]$/u.test(r)}function vv(r,u,s){const c=u>0?r[u-1]:"",f=u+s<r.length?r[u+s]:"";return!gm(c)&&!gm(f)}function Sv(r,u,s){const c=s.matchCase?r:r.toLocaleLowerCase(),f=s.matchCase?u:u.toLocaleLowerCase(),d=[];let y=0;for(;y<=c.length;){const g=c.indexOf(f,y);if(g===-1)break;y=g+Math.max(f.length,1),!(s.matchWholeWord&&!vv(r,g,u.length))&&d.push({index:g+1,text:r.slice(g,g+u.length)})}return d}var oi,fi;class bv{constructor(u={}){Ru(this,oi);Ru(this,fi);this.host="WPS Writer",Uu(this,oi,u.maxSnapshotCharacters??rv),Uu(this,fi,u.maxSearchResults??ov)}supports(u){return cv(u)}async execute(u,s){switch(u){case"office_word_snapshot":return this.snapshot(s);case"office_word_insert_text":return this.insertText(s);case"office_word_replace_selection":return this.replaceSelection(s);case"office_word_insert_heading":return this.insertHeading(s);case"office_word_insert_table":return this.insertTable(s);case"office_word_search_text":return this.searchText(s)}}snapshot(u){var y;const s=ri(u.maxCharacters)??ei(this,oi),c=ea(),f=li(c),d=wr(f);return{host:gv(c),requirements:{wpsJsApi:!0},documentName:f.Name,bodyTextLength:d.length,bodyTextPreview:d.slice(0,s),bodyTextTruncated:d.length>s,selectionText:((y=c.Selection)==null?void 0:y.Text)??""}}insertText(u){const s=Lu(u.text,"text"),c=Er(u.location),f=li(ea());return pm(f,s,c),{inserted:!0,location:c,textLength:s.length}}replaceSelection(u){const s=Lu(u.text,"text"),c=Ug(ea());return c.TypeText?c.TypeText(s):c.Text=s,{replaced:!0,textLength:s.length}}insertHeading(u){const s=Lu(u.text,"text"),c=fv(u.level),f=Er(u.location),d=li(ea()),y=pm(d,`${s}\r`,f);return y.Style=yv(c),{inserted:!0,level:c,location:f,textLength:s.length}}insertTable(u){var g,E,b;const s=Er(u.location),c=mv(u),f=li(ea()),d=ey(f,s),y=(E=(g=f.Tables)==null?void 0:g.Add)==null?void 0:E.call(g,d,c.rowCount,c.columnCount);if(!((b=f.Tables)!=null&&b.Add))throw new Error("The active WPS document does not expose table insertion.");return c.values&&pv(y,c.values),{inserted:!0,location:s,rowCount:c.rowCount,columnCount:c.columnCount}}searchText(u){const s=Lu(u.query,"query"),c=ri(u.maxResults)??ei(this,fi),f=ym(u.matchCase),d=ym(u.matchWholeWord),y=li(ea()),g=Sv(wr(y),s,{matchCase:f,matchWholeWord:d}),E=g.slice(0,c).map((b,H)=>({index:H+1,start:b.index,text:b.text}));return{query:s,count:g.length,results:E,truncated:g.length>E.length}}}oi=new WeakMap,fi=new WeakMap;function ly(r={}){return new bv(r)}var aa;class Ev{constructor(u){Ru(this,aa);Uu(this,aa,u)}supports(u){return ei(this,aa).some(s=>s.supports(u))}async execute(u,s){const c=ei(this,aa).find(f=>f.supports(u));if(!c)throw new Error(`Unknown Office tool: ${u}`);return c.execute(u,s)}}aa=new WeakMap;function Tv(r){return new Ev(r)}function Av(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)?r:{}}function Tr(r,u,s){return{tool_call_id:r.tool_call_id??r.id,name:r.name,status:u,content:JSON.stringify(s)}}function _v(r){return r instanceof Error?r.message:String(r)}function xv(r={}){const u=r.registry??Tv([r.adapter??ly()]);return async s=>{if(!u.supports(s.name))return Tr(s,"error",{ok:!1,error:`Unknown Office tool: ${s.name}`});try{const c=await u.execute(s.name,Av(s.params));return Tr(s,"success",{ok:!0,result:c})}catch(c){return Tr(s,"error",{ok:!1,error:_v(c)})}}}const Lr="xpertai.chatkit.wps.config.v1",ny=600,Mv="https://api.xpertai.cn/api/ai",Cv="https://app.xpertai.cn/chatkit/index.html",zv="/api/create-session";function Ov(r){return r.replace(/\/+$/,"")}function jr(r){if(typeof r!="string"&&typeof r!="number")return;const u=Number(r);return Number.isInteger(u)&&u>0?u:void 0}function Kl(r){return typeof r=="string"&&r.trim()?r.trim():void 0}function ay(){return typeof window>"u"?{}:window.XPERTAI_WPS_CONFIG??{}}function Dv(){if(typeof window>"u")return{};try{const r=window.localStorage.getItem(Lr);if(!r)return{};const u=JSON.parse(r);return u&&typeof u=="object"&&!Array.isArray(u)?u:{}}catch{return{}}}function wv(...r){const u={};for(const s of r){const c=Kl(s.apiUrl),f=Kl(s.apiKey),d=Kl(s.xpertId),y=Kl(s.frameUrl),g=jr(s.expiresAfter);c&&(u.apiUrl=c),f&&(u.apiKey=f),d&&(u.xpertId=d),y&&(u.frameUrl=y),g&&(u.expiresAfter=g)}return u}function Rv(){const r=ay().sessionMode;return r==="proxy"||r==="user-api-key"?r:"user-api-key"}function iy(){return wv({apiUrl:Mv,frameUrl:Cv,xpertId:void 0,apiKey:void 0,expiresAfter:jr(void 0)},Dv(),ay())}function uy(r){const u=Kl(r.apiUrl),s=Kl(r.apiKey),c=Kl(r.xpertId),f=Kl(r.frameUrl);if(!u)throw new Error("XPERTAI_API_URL is required.");if(!s)throw new Error("XPERTAI_API_KEY is required.");if(!c)throw new Error("XPERTAI_XPERT_ID is required.");if(!f)throw new Error("XPERTAI_CHATKIT_FRAME_URL is required.");return{apiUrl:Ov(u),apiKey:s,xpertId:c,frameUrl:f,expiresAfter:jr(r.expiresAfter)??ny}}function vm(){try{return uy(iy())}catch{return null}}function Uv(r){window.localStorage.setItem(Lr,JSON.stringify(r))}function Nv(){window.localStorage.removeItem(Lr)}async function Sm(r){const u=await fetch(zv,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(r?{currentClientSecret:r}:{})}),s=await u.json().catch(()=>({}));if(!u.ok)throw new Error(s.error||`HTTP ${u.status}`);if(!s.client_secret||!s.apiUrl||!s.frameUrl||!s.xpertId)throw new Error("ChatKit session response is missing required fields.");return s}async function bm(r){const u=`${r.apiUrl}/v1/chatkit/sessions`;let s;try{s=await fetch(u,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r.apiKey},body:JSON.stringify({expires_after:r.expiresAfter??ny})})}catch(f){const d=typeof window>"u"?"unknown":window.location.origin;throw new Error(`Failed to fetch ${u}. Check network access and CORS. The API must allow origin ${d} and the x-api-key header. ${f instanceof Error?f.message:String(f)}`)}const c=await s.json().catch(()=>({}));if(!s.ok)throw new Error(c.error||s.statusText||`HTTP ${s.status}`);if(!c.client_secret)throw new Error("Missing client_secret in Xpert ChatKit session response.");return{client_secret:c.client_secret,expires_at:c.expires_at,expires_after:c.expires_after??r.expiresAfter,apiUrl:r.apiUrl,frameUrl:r.frameUrl,xpertId:r.xpertId,organizationId:null}}async function Hv(){const r=Ng();return r?{host:r.Name,build:r.Build,version:r.Version,isWpsHost:!0}:{isWpsHost:!1}}function Ku(r){return r instanceof Error?r.message:String(r)}function Bv(){return navigator.language.toLowerCase().startsWith("zh")?"zh-Hans":"en"}function Lv({createSession:r,initialSession:u,onConfigure:s}){const[c,f]=bt.useState(u),[d,y]=bt.useState(null),g=bt.useMemo(()=>xv({adapter:ly()}),[]),E=bt.useMemo(()=>({frameUrl:c.frameUrl,locale:Bv(),api:{apiUrl:c.apiUrl,xpertId:c.xpertId,getClientSecret:async H=>{const R=H?await r(H):c;return f(R),R.organizationId?{secret:R.client_secret,organizationId:R.organizationId}:R.client_secret}},theme:{colorScheme:"light",radius:"round",density:"compact",typography:{baseSize:14,fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},color:{accent:{primary:"#0f766e",level:1}}},composer:{placeholder:"Ask XpertAI to edit this WPS document...",attachments:{enabled:!0}},startScreen:{greeting:"WPS Copilot is ready.",prompts:[{icon:"sparkle",label:"Draft an outline",prompt:"Create a structured outline for this document."},{icon:"square-text",label:"Improve selection",prompt:"Rewrite the selected paragraph to be clearer and more concise."}]},header:{enabled:!0,title:{enabled:!0,text:"XpertAI WPS Copilot"}},onClientTool:async H=>{y(null);const R=await g(H);return R.status==="error"&&y(typeof R.content=="string"?R.content:"Office tool failed."),R},onError:H=>{y(Ku(H))}}),[r,g,c]),b=Wg(E);return K.jsxs("main",{className:"taskpane",children:[d?K.jsxs("div",{className:"status-banner error",children:[K.jsx("span",{children:d}),s?K.jsx("button",{className:"link-button",type:"button",onClick:s,children:"Settings"}):null]}):null,K.jsx(iv,{control:b.control,className:"chatkit-shell"})]})}function si(r,u){const s=r.get(u);return typeof s=="string"?s:void 0}function jv({error:r,initialConfig:u,isConnecting:s,onSave:c}){const[f,d]=bt.useState(null);function y(E){E.preventDefault();const b=new FormData(E.currentTarget);try{d(null),c(uy({apiUrl:si(b,"apiUrl"),apiKey:si(b,"apiKey"),xpertId:si(b,"xpertId"),frameUrl:si(b,"frameUrl"),expiresAfter:Number(si(b,"expiresAfter"))}))}catch(H){d(Ku(H))}}function g(){Nv(),window.location.reload()}return K.jsx("main",{className:"taskpane settings",children:K.jsxs("form",{className:"settings-panel",onSubmit:y,children:[K.jsxs("div",{className:"settings-header",children:[K.jsx("h1",{children:"XpertAI WPS Copilot"}),K.jsx("p",{children:"Use your own XpertAI API key on this device."})]}),r||f?K.jsx("div",{className:"settings-error",children:f??r}):null,K.jsxs("label",{children:[K.jsx("span",{children:"API URL"}),K.jsx("input",{name:"apiUrl",required:!0,defaultValue:u.apiUrl??"",autoComplete:"url"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"API Key"}),K.jsx("input",{name:"apiKey",required:!0,type:"password",defaultValue:u.apiKey??"",autoComplete:"off"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"Xpert ID"}),K.jsx("input",{name:"xpertId",required:!0,defaultValue:u.xpertId??"",autoComplete:"off"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"ChatKit Frame URL"}),K.jsx("input",{name:"frameUrl",required:!0,defaultValue:u.frameUrl??"",autoComplete:"url"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"Secret TTL Seconds"}),K.jsx("input",{name:"expiresAfter",inputMode:"numeric",defaultValue:u.expiresAfter??600})]}),K.jsxs("div",{className:"settings-actions",children:[K.jsx("button",{disabled:s,type:"submit",children:s?"Connecting...":"Save and Connect"}),K.jsx("button",{disabled:s,type:"button",onClick:g,children:"Clear"})]})]})})}function Em(){return K.jsx("main",{className:"taskpane centered",children:K.jsxs("div",{className:"status-card",children:[K.jsx("h1",{children:"XpertAI WPS Copilot"}),K.jsx("p",{children:"Connecting..."})]})})}function Tm({message:r}){return K.jsx("main",{className:"taskpane centered",children:K.jsxs("div",{className:"status-card",children:[K.jsx("h1",{children:"XpertAI WPS Copilot"}),K.jsx("p",{children:r})]})})}function qv(){const[r]=bt.useState(()=>Rv()),[u,s]=bt.useState(null),[c,f]=bt.useState(null),[d,y]=bt.useState(()=>vm()),[g,E]=bt.useState(!1),[b,H]=bt.useState(!0),[R,W]=bt.useState(null),ct=bt.useCallback(async ut=>{H(!0),W(null);try{const Mt=await bm(ut);Uv(ut),y(ut),f(Mt),E(!1)}catch(Mt){f(null),E(!0),W(Ku(Mt))}finally{H(!1)}},[]);bt.useEffect(()=>{let ut=!1;async function Mt(){try{const Tt=await Hv();if(ut)return;if(s(Tt),r==="proxy"){const Nt=await Sm();ut||(f(Nt),H(!1));return}const Ut=vm();if(y(Ut),!Ut){E(!0),H(!1);return}await ct(Ut)}catch(Tt){ut||(W(Ku(Tt)),E(r==="user-api-key"),H(!1))}}return Mt(),()=>{ut=!0}},[ct,r]);const Et=bt.useCallback(ut=>r==="proxy"?Sm(ut):d?bm(d):Promise.reject(new Error("XPERTAI_API_KEY is not configured.")),[r,d]);return!u&&!g?R?K.jsx(Tm,{message:R}):K.jsx(Em,{}):r==="user-api-key"&&(g||!c)?K.jsx(jv,{error:R,initialConfig:iy(),isConnecting:b,onSave:ct}):R&&!c?K.jsx(Tm,{message:R}):c?K.jsx(Lv,{createSession:Et,initialSession:c,onConfigure:r==="user-api-key"?()=>E(!0):void 0}):K.jsx(Em,{})}const sy=document.getElementById("root");if(!sy)throw new Error("Missing #root element.");function Yv(){return new Promise(r=>{const u=document.createElement("script");u.src=new URL("config.js",window.location.href).toString(),u.onload=()=>r(),u.onerror=()=>r(),document.head.appendChild(u)})}Yv().then(()=>{Vg.createRoot(sy).render(K.jsx(bt.StrictMode,{children:K.jsx(qv,{})}))});
199
+ `;const s=document.createElement("iframe");s.className="ck-iframe",s.name="chatkit",s.role="presentation",s.tabIndex=0,s.setAttribute("allowtransparency","true"),s.setAttribute("frameborder","0"),s.setAttribute("scrolling","no"),s.setAttribute("allow","clipboard-read; clipboard-write"),$t(this,yl,s);const c=document.createElement("div");c.className="ck-wrapper",c.appendChild(s),$t(this,gl,c);const f=document.createElement("button");f.className="ck-launcher-close",f.type="button",f.setAttribute("aria-label","Close chat"),f.addEventListener("click",C(this,Yu)),c.appendChild(f),$t(this,ju,f),$t(this,mn,new T0(c,()=>{var d,y;return((y=(d=C(this,it))==null?void 0:d.header)==null?void 0:y.windowDrag)===!0})),C(this,ht).on("window_drag_regions",d=>{var y;return(y=C(this,mn))==null?void 0:y.update(d)}),C(this,ke).append(u),C(this,ht).on("left_header_icon_click",()=>{var d,y,p;(p=(y=(d=C(this,it))==null?void 0:d.header)==null?void 0:y.leftAction)==null||p.onClick()}),C(this,ht).on("right_header_icon_click",()=>{var d,y,p;(p=(y=(d=C(this,it))==null?void 0:d.header)==null?void 0:y.rightAction)==null||p.onClick()}),C(this,ht).on("public_event",([d,y])=>{if(d==="log"){const p=k0(y);p&&C(this,He).setThreadSummary(p.summary)}else d==="response.start"?C(this,He).setThreadSummaryStatus("running"):d==="response.end"?C(this,He).setThreadSummaryStatus("completed"):d==="response.stop"&&C(this,He).setThreadSummaryStatus("completed");if(this.capabilities.events.has(d)){if(d==="error"&&"error"in y){const p=p0(y.error);if(this.dispatchEvent(new CustomEvent("chatkit.error",{detail:{error:p}})),p instanceof It)throw p;return}this.dispatchEvent(new CustomEvent(`chatkit.${d}`,{detail:y}))}}),C(this,ht).on("pet_state_change",d=>{const y=K0(d);y&&C(this,He).setState(y.state)}),C(this,ht).on("pet_options_change",d=>{const y=V0(d);y&&((!C(this,yn)||y.pet===null)&&$t(this,yn,!1),$t(this,ua,y.pet),G(this,Y,zr).call(this))}),C(this,ht).on("chat_minimize_change",d=>{const y=typeof d=="object"&&d!==null&&"minimized"in d&&d.minimized===!0;y&&!G(this,Y,ku).call(this)||(G(this,Y,di).call(this,y),y&&G(this,Y,Zl).call(this,!1))}),C(this,ht).on("unmount",()=>{var d;(d=C(this,mn))==null||d.destroy(),C(this,gl)&&C(this,ke).contains(C(this,gl))&&(C(this,ke).removeChild(C(this,gl)),$t(this,gl,void 0),$t(this,yl,void 0))}),C(this,ht).on("capabilities_profile_change",({profile:d})=>{this.setProfile(d)}),s.addEventListener("load",C(this,Xu),{once:!0});try{G(this,Y,Or).call(this)}catch(d){console.error(d),G(this,Y,Gl).call(this,d instanceof Error?d:new It("Failed to initialize ChatKit"))}}disconnectedCallback(){var u,s,c;(u=C(this,mn))==null||u.destroy(),(s=C(this,yl))==null||s.removeEventListener("load",C(this,Xu)),(c=C(this,ju))==null||c.removeEventListener("click",C(this,Yu)),C(this,ht).disconnect(),C(this,He).destroy()}applySanitizedOptions(u){var s,c;$t(this,it,u),(s=u.header)!=null&&s.windowDrag||(c=C(this,mn))==null||c.clear(),$t(this,yn,!1),C(this,He).setLocale(u.locale),G(this,Y,zr).call(this),C(this,sa)?(G(this,Y,Hr).call(this,C(this,it)),C(this,Kt).then(()=>{C(this,ht).commands.setOptions(Pm(G(this,Y,Br).call(this,u)))})):G(this,Y,Or).call(this)}setOptions(u){try{const s=this.sanitizeOptions(u);G(this,Y,Im).call(this,s),this.applySanitizedOptions(s)}catch(s){G(this,Y,Gl).call(this,s instanceof Error?s:new It("Failed to parse options"))}}async focusComposer(){var u,s;await C(this,Kt),(u=C(this,yl))==null||u.focus(),await((s=C(this,ht))==null?void 0:s.commands.focusComposer())}async fetchUpdates(){var u;await C(this,Kt),await((u=C(this,ht))==null?void 0:u.commands.fetchUpdates())}async sendUserMessage(u){var s;await C(this,Kt),await((s=C(this,ht))==null?void 0:s.commands.sendUserMessage(u))}async setComposerValue(u){var s;await C(this,Kt),await((s=C(this,ht))==null?void 0:s.commands.setComposerValue(u))}async setRuntimeCapabilities(u){var s;await C(this,Kt),await((s=C(this,ht))==null?void 0:s.commands.setRuntimeCapabilities(u))}async setThreadId(u){var s;await C(this,Kt),await((s=C(this,ht))==null?void 0:s.commands.setThreadId({threadId:u}))}async focusMessage(u){return await C(this,Kt),C(this,ht)?C(this,ht).commands.focusMessage(u):{success:!1,code:"not_ready"}}async shareThread(){var u;return await C(this,Kt),(u=C(this,ht))==null?void 0:u.commands.shareThread()}async sendCustomAction(u,s){var c;return await C(this,Kt),(c=C(this,ht))==null?void 0:c.commands.sendCustomAction({action:u,itemId:s})}async showHistory(){var u;return await C(this,Kt),(u=C(this,ht))==null?void 0:u.commands.showHistory()}async hideHistory(){var u;return await C(this,Kt),(u=C(this,ht))==null?void 0:u.commands.hideHistory()}async setTrainingOptOut(u){var s;return await C(this,Kt),(s=C(this,ht))==null?void 0:s.commands.setTrainingOptOut({value:u})}}ee=P0(Cr);it=new WeakMap;Vl=new WeakMap;yl=new WeakMap;gl=new WeakMap;mn=new WeakMap;ju=new WeakMap;Nr=new WeakMap;Zu=new WeakMap;ua=new WeakMap;yn=new WeakMap;ke=new WeakMap;He=new WeakMap;qu=new WeakMap;Kt=new WeakMap;ci=new WeakMap;ht=new WeakMap;Y=new WeakSet;Gl=function(r){throw this.dispatchEvent(new CustomEvent("chatkit.error",{detail:{error:r}})),r};Hr=function(r){var u;this.dataset.colorScheme=typeof r.theme=="string"?r.theme:((u=r.theme)==null?void 0:u.colorScheme)??"light",this.dataset.displayMode=G(this,Y,We).call(this,r),G(this,Y,We).call(this,r)!=="pet"&&G(this,Y,Zl).call(this,!1)};We=function(r=C(this,it)){return(r==null?void 0:r.displayMode)==="pet"?"pet":"chat"};Ju=function(r=C(this,it)){return r?G(this,Y,We).call(this,r)==="pet"&&!hi(r.pet??null)?!0:r.pet??null:null};Qm=function(r){if(!r)return r;const u=hi(G(this,Y,Ju).call(this)??null);return u?r===!0?{position:u.position}:r.position?{...r,position:{...u.position,...r.position,boundsPadding:r.position.boundsPadding??u.position.boundsPadding,pin:"pin"in r.position?r.position.pin:u.position.pin}}:{...r,position:u.position}:r};ku=function(){var u;if(C(this,yn)||((u=C(this,it))==null?void 0:u.pet)===!1&&G(this,Y,We).call(this)!=="pet")return null;let r;return C(this,ua)!==void 0?r=G(this,Y,Qm).call(this,C(this,ua)):r=G(this,Y,Ju).call(this),G(this,Y,We).call(this)==="pet"&&!hi(r??null)&&(r=!0),G(this,Y,Vm).call(this,r)};Km=function(r){try{const u=new URL(C(this,Vl)??window.location.href,window.location.origin);return new URL(r,u).toString()}catch{return r}};Vm=function(r){const u=hi(r??null);return u?{character:{...u.character,src:G(this,Y,Km).call(this,u.character.src)},position:u.position,behavior:u.behavior,ariaLabel:u.ariaLabel,imageRendering:u.imageRendering}:null};Br=function(r){const u=G(this,Y,Ju).call(this,r);if(u===(r.pet??null))return r;const s={...r};return u===null?delete s.pet:s.pet=u,s};Zl=function(r){$t(this,Nr,r),r?this.dataset.chatOpen="true":delete this.dataset.chatOpen};di=function(r){const u=r&&!!G(this,Y,ku).call(this);$t(this,Zu,u),u?this.dataset.chatMinimizedToPet="true":delete this.dataset.chatMinimizedToPet};zr=function(){var u;const r=G(this,Y,ku).call(this);C(this,He).setOptions(r,(u=C(this,it))==null?void 0:u.theme),r||G(this,Y,di).call(this,!1)};Zm=function(){if(C(this,Zu)){G(this,Y,di).call(this,!1),G(this,Y,We).call(this)==="pet"&&G(this,Y,Zl).call(this,!0),C(this,Kt).then(()=>this.focusComposer()).catch(()=>{});return}G(this,Y,We).call(this)==="pet"&&(G(this,Y,Zl).call(this,!0),C(this,Kt).then(()=>this.focusComposer()).catch(()=>{}))};Jm=function(){$t(this,yn,!0),$t(this,ua,null),G(this,Y,di).call(this,!1),G(this,Y,Zl).call(this,!1),C(this,He).setOptions(null),G(this,Y,We).call(this)!=="pet"&&C(this,Kt).then(()=>C(this,ht).commands.setPetEnabled({enabled:!1})).catch(()=>{})};km=async function(r){await this.sendUserMessage({text:r})};Wm=async function(r){G(this,Y,We).call(this)==="pet"&&G(this,Y,Zl).call(this,!0),await this.setThreadId(r),await this.focusComposer()};Yu=new WeakMap;$m=function(){if(!C(this,Vl))throw new It("ChatKit frameUrl is not configured. Provide it via setOptions({ frameUrl }) before mounting.");return C(this,Vl)};Fm=function(r){if(C(this,sa)&&C(this,Vl)&&C(this,Vl)!==r)throw new It("ChatKit frameUrl cannot be changed after initialization. Create a new element to use a different URL.");$t(this,Vl,r)};Im=function(r){if(!("frameUrl"in r))return;const u=r.frameUrl;if(delete r.frameUrl,u!=null){if(typeof u!="string"||u.trim()==="")throw new It("ChatKit frameUrl must be a non-empty string.");G(this,Y,Fm).call(this,u)}};Xu=new WeakMap;sa=new WeakMap;Or=function(){if(C(this,sa)||!C(this,yl)||!C(this,it))return;$t(this,sa,!0),G(this,Y,Hr).call(this,C(this,it));const r=new URL(G(this,Y,$m).call(this),window.location.origin);C(this,ht).setTargetOrigin(r.origin),r.hash=g0({options:Pm(G(this,Y,Br).call(this,C(this,it))),referrer:window.location.origin,profile:this.profile,...C(this,ci)?{channelId:C(this,ci)}:{}}),C(this,ht).connect(),C(this,yl).src=r.toString(),C(this,gl)&&C(this,ke).append(C(this,gl))};Be(ee,1,"focusComposer",Gm,he);Be(ee,1,"fetchUpdates",Xm,he);Be(ee,1,"sendUserMessage",Ym,he);Be(ee,1,"setComposerValue",qm,he);Be(ee,1,"setRuntimeCapabilities",jm,he);Be(ee,1,"setThreadId",Lm,he);Be(ee,1,"focusMessage",Bm,he);Be(ee,1,"shareThread",Hm,he);Be(ee,1,"sendCustomAction",Nm,he);Be(ee,1,"showHistory",Um,he);Be(ee,1,"hideHistory",Rm,he);Be(ee,1,"setTrainingOptOut",wm,he);ev(ee,he);class nv extends he{constructor(){super({profile:"chatkit"})}sanitizeOptions(u){var s;return(s=u.threadItemActions)==null||delete s.share,u}}function av(r="xpertai-chatkit"){"customElements"in globalThis&&(customElements.get(r)||customElements.define(r,nv))}av();const ty={"chatkit.error":"onError","chatkit.response.end":"onResponseEnd","chatkit.response.start":"onResponseStart","chatkit.log":"onLog","chatkit.thread.change":"onThreadChange","chatkit.project.change":"onProjectChange","chatkit.connectors.change":"onConnectorsChange","chatkit.thread.load.start":"onThreadLoadStart","chatkit.thread.load.end":"onThreadLoadEnd","chatkit.ready":"onReady","chatkit.effect":"onEffect"},iv=Object.keys(ty),uv=bt.forwardRef(function({control:u,...s},c){const f=bt.useRef(null);return bt.useLayoutEffect(()=>{const d=f.current;if(!d)return;if(customElements.get("xpertai-chatkit")){d.setOptions(u.options);return}let y=!0;return customElements.whenDefined("xpertai-chatkit").then(()=>{y&&d.setOptions(u.options)}),()=>{y=!1}},[u.options]),bt.useEffect(()=>{const d=f.current;if(!d)return;const y=new AbortController;for(const p of iv)d.addEventListener(p,E=>{const b=ty[p],H=u.handlers[b];typeof H=="function"&&H(E.detail)},{signal:y.signal});return()=>{y.abort()}},[u.handlers]),K.jsx("xpertai-chatkit",{ref:d=>{f.current=d,u.setInstance(d),typeof c=="function"?c(d):c&&(c.current=d),f.current},...s})}),sv=["office_word_snapshot","office_word_insert_text","office_word_replace_selection","office_word_insert_heading","office_word_insert_table","office_word_search_text"],cv=new Set(sv);function rv(r){return cv.has(r)}const ov=5e3,fv=20;function ey(r){return typeof r=="string"&&r.trim()?r.trim():void 0}function Lu(r,u){const s=ey(r);if(!s)throw new Error(`${u} must be a non-empty string.`);return s}function ym(r){return typeof r=="boolean"?r:void 0}function ri(r){if(!(typeof r!="number"||!Number.isInteger(r)||r<=0))return r}function Dr(r,u){const s=ri(r);if(s===void 0)throw new Error(`${u} must be a positive integer.`);return s}function Er(r,u="End"){var c;const s=(c=ey(r))==null?void 0:c.toLowerCase();if(!s)return u;if(s==="start")return"Start";if(s==="end")return"End";throw new Error("location must be Start or End.")}function hv(r){if(r===void 0)return 1;const u=Dr(r,"level");if(u>9)throw new Error("level must be between 1 and 9.");return u}function dv(r){if(r==null)return"";if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return String(r);throw new Error("table values must contain only strings, numbers, booleans, or nulls.")}function mv(r){if(r!==void 0){if(!Array.isArray(r))throw new Error("values must be a two-dimensional array.");return r.map(u=>{if(!Array.isArray(u))throw new Error("values must be a two-dimensional array.");return u.map(dv)})}}function yv(r){const u=mv(r.values),s=ri(r.rowCount),c=ri(r.columnCount);if(!u)return{rowCount:Dr(r.rowCount,"rowCount"),columnCount:Dr(r.columnCount,"columnCount")};const f=u.length,d=u.reduce((E,b)=>Math.max(E,b.length),0),y=s??f,p=c??d;if(y<=0||p<=0)throw new Error("values must include at least one row and one column.");return{rowCount:y,columnCount:p,values:Array.from({length:y},(E,b)=>Array.from({length:p},(H,R)=>{var W;return((W=u[b])==null?void 0:W[R])??""}))}}function wr(r){var u;return((u=r.Content)==null?void 0:u.Text)??""}function ly(r,u){var y;const s=r.Content;if(!s)throw new Error("The active WPS document does not expose a content range.");const c=s.Start??0,f=s.End??wr(r).length,d=u==="Start"?c:f;return((y=r.Range)==null?void 0:y.call(r,d,d))??s}function gm(r,u,s){const c=ly(r,s);return s==="Start"&&c.InsertBefore?(c.InsertBefore(u),c):s==="End"&&c.InsertAfter?(c.InsertAfter(u),c):(c.Text=u,c)}function gv(r){return-(r+1)}function pv(r,u){r!=null&&r.Cell&&u.forEach((s,c)=>{s.forEach((f,d)=>{var p;const y=(p=r.Cell)==null?void 0:p.call(r,c+1,d+1);y!=null&&y.Range&&(y.Range.Text=f)})})}function vv(r){return{name:r.Name??"WPS Writer",build:r.Build,version:r.Version}}function pm(r){return/^[\p{L}\p{N}_]$/u.test(r)}function Sv(r,u,s){const c=u>0?r[u-1]:"",f=u+s<r.length?r[u+s]:"";return!pm(c)&&!pm(f)}function bv(r,u,s){const c=s.matchCase?r:r.toLocaleLowerCase(),f=s.matchCase?u:u.toLocaleLowerCase(),d=[];let y=0;for(;y<=c.length;){const p=c.indexOf(f,y);if(p===-1)break;y=p+Math.max(f.length,1),!(s.matchWholeWord&&!Sv(r,p,u.length))&&d.push({index:p+1,text:r.slice(p,p+u.length)})}return d}var oi,fi;class Ev{constructor(u={}){Ru(this,oi);Ru(this,fi);this.host="WPS Writer",Uu(this,oi,u.maxSnapshotCharacters??ov),Uu(this,fi,u.maxSearchResults??fv)}supports(u){return rv(u)}async execute(u,s){switch(u){case"office_word_snapshot":return this.snapshot(s);case"office_word_insert_text":return this.insertText(s);case"office_word_replace_selection":return this.replaceSelection(s);case"office_word_insert_heading":return this.insertHeading(s);case"office_word_insert_table":return this.insertTable(s);case"office_word_search_text":return this.searchText(s)}}snapshot(u){var y;const s=ri(u.maxCharacters)??ei(this,oi),c=ea(),f=li(c),d=wr(f);return{host:vv(c),requirements:{wpsJsApi:!0},documentName:f.Name,bodyTextLength:d.length,bodyTextPreview:d.slice(0,s),bodyTextTruncated:d.length>s,selectionText:((y=c.Selection)==null?void 0:y.Text)??""}}insertText(u){const s=Lu(u.text,"text"),c=Er(u.location),f=li(ea());return gm(f,s,c),{inserted:!0,location:c,textLength:s.length}}replaceSelection(u){const s=Lu(u.text,"text"),c=Np(ea());return c.TypeText?c.TypeText(s):c.Text=s,{replaced:!0,textLength:s.length}}insertHeading(u){const s=Lu(u.text,"text"),c=hv(u.level),f=Er(u.location),d=li(ea()),y=gm(d,`${s}\r`,f);return y.Style=gv(c),{inserted:!0,level:c,location:f,textLength:s.length}}insertTable(u){var p,E,b;const s=Er(u.location),c=yv(u),f=li(ea()),d=ly(f,s),y=(E=(p=f.Tables)==null?void 0:p.Add)==null?void 0:E.call(p,d,c.rowCount,c.columnCount);if(!((b=f.Tables)!=null&&b.Add))throw new Error("The active WPS document does not expose table insertion.");return c.values&&pv(y,c.values),{inserted:!0,location:s,rowCount:c.rowCount,columnCount:c.columnCount}}searchText(u){const s=Lu(u.query,"query"),c=ri(u.maxResults)??ei(this,fi),f=ym(u.matchCase),d=ym(u.matchWholeWord),y=li(ea()),p=bv(wr(y),s,{matchCase:f,matchWholeWord:d}),E=p.slice(0,c).map((b,H)=>({index:H+1,start:b.index,text:b.text}));return{query:s,count:p.length,results:E,truncated:p.length>E.length}}}oi=new WeakMap,fi=new WeakMap;function ny(r={}){return new Ev(r)}var aa;class Tv{constructor(u){Ru(this,aa);Uu(this,aa,u)}supports(u){return ei(this,aa).some(s=>s.supports(u))}async execute(u,s){const c=ei(this,aa).find(f=>f.supports(u));if(!c)throw new Error(`Unknown Office tool: ${u}`);return c.execute(u,s)}}aa=new WeakMap;function Av(r){return new Tv(r)}function _v(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)?r:{}}function Tr(r,u,s){return{tool_call_id:r.tool_call_id??r.id,name:r.name,status:u,content:JSON.stringify(s)}}function xv(r){return r instanceof Error?r.message:String(r)}function Mv(r={}){const u=r.registry??Av([r.adapter??ny()]);return async s=>{if(!u.supports(s.name))return Tr(s,"error",{ok:!1,error:`Unknown Office tool: ${s.name}`});try{const c=await u.execute(s.name,_v(s.params));return Tr(s,"success",{ok:!0,result:c})}catch(c){return Tr(s,"error",{ok:!1,error:xv(c)})}}}const Lr="xpertai.chatkit.wps.config.v1",ay=600,Cv="https://api.xpertai.cn/api/ai",zv="https://app.xpertai.cn/chatkit/index.html",Ov="/api/create-session";function Dv(r){return r.replace(/\/+$/,"")}function jr(r){if(typeof r!="string"&&typeof r!="number")return;const u=Number(r);return Number.isInteger(u)&&u>0?u:void 0}function Kl(r){return typeof r=="string"&&r.trim()?r.trim():void 0}function iy(){return typeof window>"u"?{}:window.XPERTAI_WPS_CONFIG??{}}function wv(){if(typeof window>"u")return{};try{const r=window.localStorage.getItem(Lr);if(!r)return{};const u=JSON.parse(r);return u&&typeof u=="object"&&!Array.isArray(u)?u:{}}catch{return{}}}function Rv(...r){const u={};for(const s of r){const c=Kl(s.apiUrl),f=Kl(s.apiKey),d=Kl(s.xpertId),y=Kl(s.frameUrl),p=jr(s.expiresAfter);c&&(u.apiUrl=c),f&&(u.apiKey=f),d&&(u.xpertId=d),y&&(u.frameUrl=y),p&&(u.expiresAfter=p)}return u}function Uv(){const r=iy().sessionMode;return r==="proxy"||r==="user-api-key"?r:"user-api-key"}function uy(){return Rv({apiUrl:Cv,frameUrl:zv,xpertId:void 0,apiKey:void 0,expiresAfter:jr(void 0)},wv(),iy())}function sy(r){const u=Kl(r.apiUrl),s=Kl(r.apiKey),c=Kl(r.xpertId),f=Kl(r.frameUrl);if(!u)throw new Error("XPERTAI_API_URL is required.");if(!s)throw new Error("XPERTAI_API_KEY is required.");if(!c)throw new Error("XPERTAI_XPERT_ID is required.");if(!f)throw new Error("XPERTAI_CHATKIT_FRAME_URL is required.");return{apiUrl:Dv(u),apiKey:s,xpertId:c,frameUrl:f,expiresAfter:jr(r.expiresAfter)??ay}}function vm(){try{return sy(uy())}catch{return null}}function Nv(r){window.localStorage.setItem(Lr,JSON.stringify(r))}function Hv(){window.localStorage.removeItem(Lr)}async function Sm(r){const u=await fetch(Ov,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(r?{currentClientSecret:r}:{})}),s=await u.json().catch(()=>({}));if(!u.ok)throw new Error(s.error||`HTTP ${u.status}`);if(!s.client_secret||!s.apiUrl||!s.frameUrl||!s.xpertId)throw new Error("ChatKit session response is missing required fields.");return s}async function bm(r){const u=`${r.apiUrl}/v1/chatkit/sessions`;let s;try{s=await fetch(u,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r.apiKey},body:JSON.stringify({expires_after:r.expiresAfter??ay})})}catch(f){const d=typeof window>"u"?"unknown":window.location.origin;throw new Error(`Failed to fetch ${u}. Check network access and CORS. The API must allow origin ${d} and the x-api-key header. ${f instanceof Error?f.message:String(f)}`)}const c=await s.json().catch(()=>({}));if(!s.ok)throw new Error(c.error||s.statusText||`HTTP ${s.status}`);if(!c.client_secret)throw new Error("Missing client_secret in Xpert ChatKit session response.");return{client_secret:c.client_secret,expires_at:c.expires_at,expires_after:c.expires_after??r.expiresAfter,apiUrl:r.apiUrl,frameUrl:r.frameUrl,xpertId:r.xpertId,organizationId:null}}async function Bv(){const r=Hp();return r?{host:r.Name,build:r.Build,version:r.Version,isWpsHost:!0}:{isWpsHost:!1}}function Ku(r){return r instanceof Error?r.message:String(r)}function Lv(){return navigator.language.toLowerCase().startsWith("zh")?"zh-Hans":"en"}function jv({createSession:r,initialSession:u,onConfigure:s}){const[c,f]=bt.useState(u),[d,y]=bt.useState(null),p=bt.useMemo(()=>Mv({adapter:ny()}),[]),E=bt.useMemo(()=>({frameUrl:c.frameUrl,locale:Lv(),api:{apiUrl:c.apiUrl,xpertId:c.xpertId,getClientSecret:async H=>{const R=H?await r(H):c;return f(R),R.organizationId?{secret:R.client_secret,organizationId:R.organizationId}:R.client_secret}},theme:{colorScheme:"light",radius:"round",density:"compact",typography:{baseSize:14,fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},color:{accent:{primary:"#0f766e",level:1}}},composer:{placeholder:"Ask XpertAI to edit this WPS document...",attachments:{enabled:!0}},startScreen:{greeting:"WPS Copilot is ready.",prompts:[{icon:"sparkle",label:"Draft an outline",prompt:"Create a structured outline for this document."},{icon:"square-text",label:"Improve selection",prompt:"Rewrite the selected paragraph to be clearer and more concise."}]},header:{enabled:!0,title:{enabled:!0,text:"XpertAI WPS Copilot"}},onClientTool:async H=>{y(null);const R=await p(H);return R.status==="error"&&y(typeof R.content=="string"?R.content:"Office tool failed."),R},onError:H=>{y(Ku(H))}}),[r,p,c]),b=$p(E);return K.jsxs("main",{className:"taskpane",children:[d?K.jsxs("div",{className:"status-banner error",children:[K.jsx("span",{children:d}),s?K.jsx("button",{className:"link-button",type:"button",onClick:s,children:"Settings"}):null]}):null,K.jsx(uv,{control:b.control,className:"chatkit-shell"})]})}function si(r,u){const s=r.get(u);return typeof s=="string"?s:void 0}function qv({error:r,initialConfig:u,isConnecting:s,onSave:c}){const[f,d]=bt.useState(null);function y(E){E.preventDefault();const b=new FormData(E.currentTarget);try{d(null),c(sy({apiUrl:si(b,"apiUrl"),apiKey:si(b,"apiKey"),xpertId:si(b,"xpertId"),frameUrl:si(b,"frameUrl"),expiresAfter:Number(si(b,"expiresAfter"))}))}catch(H){d(Ku(H))}}function p(){Hv(),window.location.reload()}return K.jsx("main",{className:"taskpane settings",children:K.jsxs("form",{className:"settings-panel",onSubmit:y,children:[K.jsxs("div",{className:"settings-header",children:[K.jsx("h1",{children:"XpertAI WPS Copilot"}),K.jsx("p",{children:"Use your own XpertAI API key on this device."})]}),r||f?K.jsx("div",{className:"settings-error",children:f??r}):null,K.jsxs("label",{children:[K.jsx("span",{children:"API URL"}),K.jsx("input",{name:"apiUrl",required:!0,defaultValue:u.apiUrl??"",autoComplete:"url"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"API Key"}),K.jsx("input",{name:"apiKey",required:!0,type:"password",defaultValue:u.apiKey??"",autoComplete:"off"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"Xpert ID"}),K.jsx("input",{name:"xpertId",required:!0,defaultValue:u.xpertId??"",autoComplete:"off"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"ChatKit Frame URL"}),K.jsx("input",{name:"frameUrl",required:!0,defaultValue:u.frameUrl??"",autoComplete:"url"})]}),K.jsxs("label",{children:[K.jsx("span",{children:"Secret TTL Seconds"}),K.jsx("input",{name:"expiresAfter",inputMode:"numeric",defaultValue:u.expiresAfter??600})]}),K.jsxs("div",{className:"settings-actions",children:[K.jsx("button",{disabled:s,type:"submit",children:s?"Connecting...":"Save and Connect"}),K.jsx("button",{disabled:s,type:"button",onClick:p,children:"Clear"})]})]})})}function Em(){return K.jsx("main",{className:"taskpane centered",children:K.jsxs("div",{className:"status-card",children:[K.jsx("h1",{children:"XpertAI WPS Copilot"}),K.jsx("p",{children:"Connecting..."})]})})}function Tm({message:r}){return K.jsx("main",{className:"taskpane centered",children:K.jsxs("div",{className:"status-card",children:[K.jsx("h1",{children:"XpertAI WPS Copilot"}),K.jsx("p",{children:r})]})})}function Yv(){const[r]=bt.useState(()=>Uv()),[u,s]=bt.useState(null),[c,f]=bt.useState(null),[d,y]=bt.useState(()=>vm()),[p,E]=bt.useState(!1),[b,H]=bt.useState(!0),[R,W]=bt.useState(null),ct=bt.useCallback(async ut=>{H(!0),W(null);try{const Mt=await bm(ut);Nv(ut),y(ut),f(Mt),E(!1)}catch(Mt){f(null),E(!0),W(Ku(Mt))}finally{H(!1)}},[]);bt.useEffect(()=>{let ut=!1;async function Mt(){try{const Tt=await Bv();if(ut)return;if(s(Tt),r==="proxy"){const Nt=await Sm();ut||(f(Nt),H(!1));return}const Ut=vm();if(y(Ut),!Ut){E(!0),H(!1);return}await ct(Ut)}catch(Tt){ut||(W(Ku(Tt)),E(r==="user-api-key"),H(!1))}}return Mt(),()=>{ut=!0}},[ct,r]);const Et=bt.useCallback(ut=>r==="proxy"?Sm(ut):d?bm(d):Promise.reject(new Error("XPERTAI_API_KEY is not configured.")),[r,d]);return!u&&!p?R?K.jsx(Tm,{message:R}):K.jsx(Em,{}):r==="user-api-key"&&(p||!c)?K.jsx(qv,{error:R,initialConfig:uy(),isConnecting:b,onSave:ct}):R&&!c?K.jsx(Tm,{message:R}):c?K.jsx(jv,{createSession:Et,initialSession:c,onConfigure:r==="user-api-key"?()=>E(!0):void 0}):K.jsx(Em,{})}const cy=document.getElementById("root");if(!cy)throw new Error("Missing #root element.");function Xv(){return new Promise(r=>{const u=document.createElement("script");u.src=new URL("config.js",window.location.href).toString(),u.onload=()=>r(),u.onerror=()=>r(),document.head.appendChild(u)})}Xv().then(()=>{Zp.createRoot(cy).render(K.jsx(bt.StrictMode,{children:K.jsx(Yv,{})}))});