pico-engine 1.4.0 → 1.6.0

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.
Files changed (82) hide show
  1. package/README.md +188 -0
  2. package/dist/RulesetRegistryLoaderFs.js +2 -0
  3. package/dist/auth/AuthService.js +601 -0
  4. package/dist/auth/index.js +8 -0
  5. package/dist/auth/webauthn.js +97 -0
  6. package/dist/bundledKrl.js +42 -0
  7. package/dist/cli.js +11 -0
  8. package/dist/identity/IdentityService.js +340 -0
  9. package/dist/identity/crossPico.js +238 -0
  10. package/dist/identity/dbHelpers.js +67 -0
  11. package/dist/identity/didcommIngressRoutes.js +44 -0
  12. package/dist/identity/didoModule.js +252 -0
  13. package/dist/identity/errors.js +11 -0
  14. package/dist/identity/establishSubscription.js +97 -0
  15. package/dist/identity/index.js +15 -0
  16. package/dist/identity/peerDid.js +9 -0
  17. package/dist/identity/skyIntro.js +194 -0
  18. package/dist/identity/skyProtocol.js +105 -0
  19. package/dist/identity/store.js +233 -0
  20. package/dist/identity/types.js +13 -0
  21. package/dist/identity/veramoDidComm.js +260 -0
  22. package/dist/identity/webvh.js +266 -0
  23. package/dist/identity/webvhCrypto.js +128 -0
  24. package/dist/identity/webvhRoutes.js +61 -0
  25. package/dist/index.js +100 -44
  26. package/dist/oauth/OAuthService.js +388 -0
  27. package/dist/oauth/acg.js +495 -0
  28. package/dist/oauth/channelEligibility.js +26 -0
  29. package/dist/oauth/errors.js +12 -0
  30. package/dist/oauth/index.js +21 -0
  31. package/dist/oauth/krlModule.js +27 -0
  32. package/dist/oauth/meshOAuth.js +43 -0
  33. package/dist/provisionRoot.js +118 -0
  34. package/dist/server.js +609 -15
  35. package/dist/uiChannelPolicies.js +48 -0
  36. package/krl/io.picolabs.did-o.krl +5 -1
  37. package/krl/io.picolabs.oauth.krl +48 -0
  38. package/krl/io.picolabs.pico-engine-ui.krl +106 -18
  39. package/krl/io.picolabs.subscription.krl +242 -23
  40. package/krl/io.picolabs.wrangler.krl +225 -16
  41. package/package.json +38 -9
  42. package/public/docs/krl/_sidebar.md +1 -0
  43. package/public/docs/krl/discovery.md +144 -0
  44. package/public/docs/krl/modules/ctx.md +8 -0
  45. package/public/docs/krl/modules/event.md +41 -0
  46. package/public/pico-engine-ui.css +1 -1
  47. package/public/pico-engine-ui.js +24 -20
  48. package/public/pico-labs-logo.png +0 -0
  49. package/src/RulesetRegistryLoaderFs.ts +2 -0
  50. package/src/auth/AuthService.ts +850 -0
  51. package/src/auth/index.ts +17 -0
  52. package/src/auth/webauthn.ts +182 -0
  53. package/src/bundledKrl.ts +42 -0
  54. package/src/cli.ts +11 -0
  55. package/src/identity/IdentityService.ts +571 -0
  56. package/src/identity/crossPico.ts +371 -0
  57. package/src/identity/dbHelpers.ts +51 -0
  58. package/src/identity/didcommIngressRoutes.ts +54 -0
  59. package/src/identity/didoModule.ts +388 -0
  60. package/src/identity/errors.ts +8 -0
  61. package/src/identity/establishSubscription.ts +160 -0
  62. package/src/identity/index.ts +24 -0
  63. package/src/identity/peerDid.ts +22 -0
  64. package/src/identity/skyIntro.ts +321 -0
  65. package/src/identity/skyProtocol.ts +192 -0
  66. package/src/identity/store.ts +343 -0
  67. package/src/identity/types.ts +63 -0
  68. package/src/identity/veramoDidComm.ts +363 -0
  69. package/src/identity/webvh.ts +325 -0
  70. package/src/identity/webvhCrypto.ts +200 -0
  71. package/src/identity/webvhRoutes.ts +64 -0
  72. package/src/index.ts +145 -53
  73. package/src/oauth/OAuthService.ts +510 -0
  74. package/src/oauth/acg.ts +666 -0
  75. package/src/oauth/channelEligibility.ts +26 -0
  76. package/src/oauth/errors.ts +10 -0
  77. package/src/oauth/index.ts +14 -0
  78. package/src/oauth/krlModule.ts +31 -0
  79. package/src/oauth/meshOAuth.ts +50 -0
  80. package/src/provisionRoot.ts +151 -0
  81. package/src/server.ts +700 -24
  82. package/src/uiChannelPolicies.ts +49 -0
@@ -1,4 +1,4 @@
1
- function hf(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(r,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function mf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ds={exports:{}},_l={},Fs={exports:{}},O={};/**
1
+ function gf(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(r,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function vf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ku={exports:{}},Kl={},ju={exports:{}},D={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ function hf(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
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 vr=Symbol.for("react.element"),vf=Symbol.for("react.portal"),gf=Symbol.for("react.fragment"),yf=Symbol.for("react.strict_mode"),xf=Symbol.for("react.profiler"),wf=Symbol.for("react.provider"),Sf=Symbol.for("react.context"),kf=Symbol.for("react.forward_ref"),Ef=Symbol.for("react.suspense"),Cf=Symbol.for("react.memo"),Nf=Symbol.for("react.lazy"),gu=Symbol.iterator;function jf(e){return e===null||typeof e!="object"?null:(e=gu&&e[gu]||e["@@iterator"],typeof e=="function"?e:null)}var Us={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$s=Object.assign,Bs={};function En(e,t,n){this.props=e,this.context=t,this.refs=Bs,this.updater=n||Us}En.prototype.isReactComponent={};En.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};En.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function As(){}As.prototype=En.prototype;function ko(e,t,n){this.props=e,this.context=t,this.refs=Bs,this.updater=n||Us}var Eo=ko.prototype=new As;Eo.constructor=ko;$s(Eo,En.prototype);Eo.isPureReactComponent=!0;var yu=Array.isArray,Vs=Object.prototype.hasOwnProperty,Co={current:null},Ws={key:!0,ref:!0,__self:!0,__source:!0};function Hs(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Vs.call(t,r)&&!Ws.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];l.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)l[r]===void 0&&(l[r]=u[r]);return{$$typeof:vr,type:e,key:i,ref:o,props:l,_owner:Co.current}}function Pf(e,t){return{$$typeof:vr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function No(e){return typeof e=="object"&&e!==null&&e.$$typeof===vr}function _f(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var xu=/\/+/g;function Gl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_f(""+e.key):t.toString(36)}function Wr(e,t,n,r,l){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case vr:case vf:o=!0}}if(o)return o=e,l=l(o),e=r===""?"."+Gl(o,0):r,yu(l)?(n="",e!=null&&(n=e.replace(xu,"$&/")+"/"),Wr(l,t,n,"",function(c){return c})):l!=null&&(No(l)&&(l=Pf(l,n+(!l.key||o&&o.key===l.key?"":(""+l.key).replace(xu,"$&/")+"/")+e)),t.push(l)),1;if(o=0,r=r===""?".":r+":",yu(e))for(var u=0;u<e.length;u++){i=e[u];var s=r+Gl(i,u);o+=Wr(i,t,n,s,l)}else if(s=jf(e),typeof s=="function")for(e=s.call(e),u=0;!(i=e.next()).done;)i=i.value,s=r+Gl(i,u++),o+=Wr(i,t,n,s,l);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Nr(e,t,n){if(e==null)return e;var r=[],l=0;return Wr(e,r,"","",function(i){return t.call(n,i,l++)}),r}function Lf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var de={current:null},Hr={transition:null},Rf={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:Hr,ReactCurrentOwner:Co};function Qs(){throw Error("act(...) is not supported in production builds of React.")}O.Children={map:Nr,forEach:function(e,t,n){Nr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Nr(e,function(){t++}),t},toArray:function(e){return Nr(e,function(t){return t})||[]},only:function(e){if(!No(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};O.Component=En;O.Fragment=gf;O.Profiler=xf;O.PureComponent=ko;O.StrictMode=yf;O.Suspense=Ef;O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Rf;O.act=Qs;O.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=$s({},e.props),l=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Co.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(s in t)Vs.call(t,s)&&!Ws.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&u!==void 0?u[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){u=Array(s);for(var c=0;c<s;c++)u[c]=arguments[c+2];r.children=u}return{$$typeof:vr,type:e.type,key:l,ref:i,props:r,_owner:o}};O.createContext=function(e){return e={$$typeof:Sf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:wf,_context:e},e.Consumer=e};O.createElement=Hs;O.createFactory=function(e){var t=Hs.bind(null,e);return t.type=e,t};O.createRef=function(){return{current:null}};O.forwardRef=function(e){return{$$typeof:kf,render:e}};O.isValidElement=No;O.lazy=function(e){return{$$typeof:Nf,_payload:{_status:-1,_result:e},_init:Lf}};O.memo=function(e,t){return{$$typeof:Cf,type:e,compare:t===void 0?null:t}};O.startTransition=function(e){var t=Hr.transition;Hr.transition={};try{e()}finally{Hr.transition=t}};O.unstable_act=Qs;O.useCallback=function(e,t){return de.current.useCallback(e,t)};O.useContext=function(e){return de.current.useContext(e)};O.useDebugValue=function(){};O.useDeferredValue=function(e){return de.current.useDeferredValue(e)};O.useEffect=function(e,t){return de.current.useEffect(e,t)};O.useId=function(){return de.current.useId()};O.useImperativeHandle=function(e,t,n){return de.current.useImperativeHandle(e,t,n)};O.useInsertionEffect=function(e,t){return de.current.useInsertionEffect(e,t)};O.useLayoutEffect=function(e,t){return de.current.useLayoutEffect(e,t)};O.useMemo=function(e,t){return de.current.useMemo(e,t)};O.useReducer=function(e,t,n){return de.current.useReducer(e,t,n)};O.useRef=function(e){return de.current.useRef(e)};O.useState=function(e){return de.current.useState(e)};O.useSyncExternalStore=function(e,t,n){return de.current.useSyncExternalStore(e,t,n)};O.useTransition=function(){return de.current.useTransition()};O.version="18.3.1";Fs.exports=O;var x=Fs.exports;const Tf=mf(x),zf=hf({__proto__:null,default:Tf},[x]);/**
9
+ */var br=Symbol.for("react.element"),yf=Symbol.for("react.portal"),xf=Symbol.for("react.fragment"),wf=Symbol.for("react.strict_mode"),Sf=Symbol.for("react.profiler"),Nf=Symbol.for("react.provider"),kf=Symbol.for("react.context"),jf=Symbol.for("react.forward_ref"),Ef=Symbol.for("react.suspense"),Cf=Symbol.for("react.memo"),_f=Symbol.for("react.lazy"),qs=Symbol.iterator;function Pf(e){return e===null||typeof e!="object"?null:(e=qs&&e[qs]||e["@@iterator"],typeof e=="function"?e:null)}var Eu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Cu=Object.assign,_u={};function $n(e,t,n){this.props=e,this.context=t,this.refs=_u,this.updater=n||Eu}$n.prototype.isReactComponent={};$n.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$n.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pu(){}Pu.prototype=$n.prototype;function qo(e,t,n){this.props=e,this.context=t,this.refs=_u,this.updater=n||Eu}var Zo=qo.prototype=new Pu;Zo.constructor=qo;Cu(Zo,$n.prototype);Zo.isPureReactComponent=!0;var Zs=Array.isArray,Ru=Object.prototype.hasOwnProperty,es={current:null},Tu={key:!0,ref:!0,__self:!0,__source:!0};function Lu(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Ru.call(t,r)&&!Tu.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1<u){for(var a=Array(u),c=0;c<u;c++)a[c]=arguments[c+2];l.children=a}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)l[r]===void 0&&(l[r]=u[r]);return{$$typeof:br,type:e,key:i,ref:o,props:l,_owner:es.current}}function Rf(e,t){return{$$typeof:br,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ts(e){return typeof e=="object"&&e!==null&&e.$$typeof===br}function Tf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ea=/\/+/g;function hi(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Tf(""+e.key):t.toString(36)}function ol(e,t,n,r,l){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case br:case yf:o=!0}}if(o)return o=e,l=l(o),e=r===""?"."+hi(o,0):r,Zs(l)?(n="",e!=null&&(n=e.replace(ea,"$&/")+"/"),ol(l,t,n,"",function(c){return c})):l!=null&&(ts(l)&&(l=Rf(l,n+(!l.key||o&&o.key===l.key?"":(""+l.key).replace(ea,"$&/")+"/")+e)),t.push(l)),1;if(o=0,r=r===""?".":r+":",Zs(e))for(var u=0;u<e.length;u++){i=e[u];var a=r+hi(i,u);o+=ol(i,t,n,a,l)}else if(a=Pf(e),typeof a=="function")for(e=a.call(e),u=0;!(i=e.next()).done;)i=i.value,a=r+hi(i,u++),o+=ol(i,t,n,a,l);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Br(e,t,n){if(e==null)return e;var r=[],l=0;return ol(e,r,"","",function(i){return t.call(n,i,l++)}),r}function Lf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ke={current:null},sl={transition:null},Of={ReactCurrentDispatcher:ke,ReactCurrentBatchConfig:sl,ReactCurrentOwner:es};function Ou(){throw Error("act(...) is not supported in production builds of React.")}D.Children={map:Br,forEach:function(e,t,n){Br(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Br(e,function(){t++}),t},toArray:function(e){return Br(e,function(t){return t})||[]},only:function(e){if(!ts(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};D.Component=$n;D.Fragment=xf;D.Profiler=Sf;D.PureComponent=qo;D.StrictMode=wf;D.Suspense=Ef;D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Of;D.act=Ou;D.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Cu({},e.props),l=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=es.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(a in t)Ru.call(t,a)&&!Tu.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&u!==void 0?u[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){u=Array(a);for(var c=0;c<a;c++)u[c]=arguments[c+2];r.children=u}return{$$typeof:br,type:e.type,key:l,ref:i,props:r,_owner:o}};D.createContext=function(e){return e={$$typeof:kf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Nf,_context:e},e.Consumer=e};D.createElement=Lu;D.createFactory=function(e){var t=Lu.bind(null,e);return t.type=e,t};D.createRef=function(){return{current:null}};D.forwardRef=function(e){return{$$typeof:jf,render:e}};D.isValidElement=ts;D.lazy=function(e){return{$$typeof:_f,_payload:{_status:-1,_result:e},_init:Lf}};D.memo=function(e,t){return{$$typeof:Cf,type:e,compare:t===void 0?null:t}};D.startTransition=function(e){var t=sl.transition;sl.transition={};try{e()}finally{sl.transition=t}};D.unstable_act=Ou;D.useCallback=function(e,t){return ke.current.useCallback(e,t)};D.useContext=function(e){return ke.current.useContext(e)};D.useDebugValue=function(){};D.useDeferredValue=function(e){return ke.current.useDeferredValue(e)};D.useEffect=function(e,t){return ke.current.useEffect(e,t)};D.useId=function(){return ke.current.useId()};D.useImperativeHandle=function(e,t,n){return ke.current.useImperativeHandle(e,t,n)};D.useInsertionEffect=function(e,t){return ke.current.useInsertionEffect(e,t)};D.useLayoutEffect=function(e,t){return ke.current.useLayoutEffect(e,t)};D.useMemo=function(e,t){return ke.current.useMemo(e,t)};D.useReducer=function(e,t,n){return ke.current.useReducer(e,t,n)};D.useRef=function(e){return ke.current.useRef(e)};D.useState=function(e){return ke.current.useState(e)};D.useSyncExternalStore=function(e,t,n){return ke.current.useSyncExternalStore(e,t,n)};D.useTransition=function(){return ke.current.useTransition()};D.version="18.3.1";ju.exports=D;var v=ju.exports;const bf=vf(v),If=gf({__proto__:null,default:bf},[v]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ function hf(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
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 Of=x,If=Symbol.for("react.element"),Mf=Symbol.for("react.fragment"),Df=Object.prototype.hasOwnProperty,Ff=Of.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Uf={key:!0,ref:!0,__self:!0,__source:!0};function Ks(e,t,n){var r,l={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Df.call(t,r)&&!Uf.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:If,type:e,key:i,ref:o,props:l,_owner:Ff.current}}_l.Fragment=Mf;_l.jsx=Ks;_l.jsxs=Ks;Ds.exports=_l;var a=Ds.exports,Ys={exports:{}},Ne={},Xs={exports:{}},Gs={};/**
17
+ */var Af=v,Df=Symbol.for("react.element"),Mf=Symbol.for("react.fragment"),zf=Object.prototype.hasOwnProperty,$f=Af.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Uf={key:!0,ref:!0,__self:!0,__source:!0};function bu(e,t,n){var r,l={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)zf.call(t,r)&&!Uf.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Df,type:e,key:i,ref:o,props:l,_owner:$f.current}}Kl.Fragment=Mf;Kl.jsx=bu;Kl.jsxs=bu;ku.exports=Kl;var s=ku.exports,Iu={exports:{}},Ae={},Au={exports:{}},Du={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@ function hf(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
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
- */(function(e){function t(R,T){var z=R.length;R.push(T);e:for(;0<z;){var X=z-1>>>1,b=R[X];if(0<l(b,T))R[X]=T,R[z]=b,z=X;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var T=R[0],z=R.pop();if(z!==T){R[0]=z;e:for(var X=0,b=R.length,Er=b>>>1;X<Er;){var Lt=2*(X+1)-1,Xl=R[Lt],Rt=Lt+1,Cr=R[Rt];if(0>l(Xl,z))Rt<b&&0>l(Cr,Xl)?(R[X]=Cr,R[Rt]=z,X=Rt):(R[X]=Xl,R[Lt]=z,X=Lt);else if(Rt<b&&0>l(Cr,z))R[X]=Cr,R[Rt]=z,X=Rt;else break e}}return T}function l(R,T){var z=R.sortIndex-T.sortIndex;return z!==0?z:R.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var s=[],c=[],m=1,d=null,h=3,y=!1,w=!1,S=!1,N=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(R){for(var T=n(c);T!==null;){if(T.callback===null)r(c);else if(T.startTime<=R)r(c),T.sortIndex=T.expirationTime,t(s,T);else break;T=n(c)}}function g(R){if(S=!1,v(R),!w)if(n(s)!==null)w=!0,_t(k);else{var T=n(c);T!==null&&Pn(g,T.startTime-R)}}function k(R,T){w=!1,S&&(S=!1,p(_),_=-1),y=!0;var z=h;try{for(v(T),d=n(s);d!==null&&(!(d.expirationTime>T)||R&&!F());){var X=d.callback;if(typeof X=="function"){d.callback=null,h=d.priorityLevel;var b=X(d.expirationTime<=T);T=e.unstable_now(),typeof b=="function"?d.callback=b:d===n(s)&&r(s),v(T)}else r(s);d=n(s)}if(d!==null)var Er=!0;else{var Lt=n(c);Lt!==null&&Pn(g,Lt.startTime-T),Er=!1}return Er}finally{d=null,h=z,y=!1}}var j=!1,P=null,_=-1,D=5,C=-1;function F(){return!(e.unstable_now()-C<D)}function ne(){if(P!==null){var R=e.unstable_now();C=R;var T=!0;try{T=P(!0,R)}finally{T?Y():(j=!1,P=null)}}else j=!1}var Y;if(typeof f=="function")Y=function(){f(ne)};else if(typeof MessageChannel<"u"){var Yt=new MessageChannel,jn=Yt.port2;Yt.port1.onmessage=ne,Y=function(){jn.postMessage(null)}}else Y=function(){N(ne,0)};function _t(R){P=R,j||(j=!0,Y())}function Pn(R,T){_=N(function(){R(e.unstable_now())},T)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,_t(k))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(R){switch(h){case 1:case 2:case 3:var T=3;break;default:T=h}var z=h;h=T;try{return R()}finally{h=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,T){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var z=h;h=R;try{return T()}finally{h=z}},e.unstable_scheduleCallback=function(R,T,z){var X=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?X+z:X):z=X,R){case 1:var b=-1;break;case 2:b=250;break;case 5:b=1073741823;break;case 4:b=1e4;break;default:b=5e3}return b=z+b,R={id:m++,callback:T,priorityLevel:R,startTime:z,expirationTime:b,sortIndex:-1},z>X?(R.sortIndex=z,t(c,R),n(s)===null&&R===n(c)&&(S?(p(_),_=-1):S=!0,Pn(g,z-X))):(R.sortIndex=b,t(s,R),w||y||(w=!0,_t(k))),R},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(R){var T=h;return function(){var z=h;h=T;try{return R.apply(this,arguments)}finally{h=z}}}})(Gs);Xs.exports=Gs;var $f=Xs.exports;/**
25
+ */(function(e){function t(P,O){var A=P.length;P.push(O);e:for(;0<A;){var U=A-1>>>1,W=P[U];if(0<l(W,O))P[U]=O,P[A]=W,A=U;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var O=P[0],A=P.pop();if(A!==O){P[0]=A;e:for(var U=0,W=P.length,qe=W>>>1;U<qe;){var xe=2*(U+1)-1,Ze=P[xe],Ee=xe+1,Nt=P[Ee];if(0>l(Ze,A))Ee<W&&0>l(Nt,Ze)?(P[U]=Nt,P[Ee]=A,U=Ee):(P[U]=Ze,P[xe]=A,U=xe);else if(Ee<W&&0>l(Nt,A))P[U]=Nt,P[Ee]=A,U=Ee;else break e}}return O}function l(P,O){var A=P.sortIndex-O.sortIndex;return A!==0?A:P.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var a=[],c=[],h=1,f=null,p=3,S=!1,w=!1,x=!1,E=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(P){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=P)r(c),O.sortIndex=O.expirationTime,t(a,O);else break;O=n(c)}}function y(P){if(x=!1,m(P),!w)if(n(a)!==null)w=!0,Me(j);else{var O=n(c);O!==null&&St(y,O.startTime-P)}}function j(P,O){w=!1,x&&(x=!1,g(C),C=-1),S=!0;var A=p;try{for(m(O),f=n(a);f!==null&&(!(f.expirationTime>O)||P&&!b());){var U=f.callback;if(typeof U=="function"){f.callback=null,p=f.priorityLevel;var W=U(f.expirationTime<=O);O=e.unstable_now(),typeof W=="function"?f.callback=W:f===n(a)&&r(a),m(O)}else r(a);f=n(a)}if(f!==null)var qe=!0;else{var xe=n(c);xe!==null&&St(y,xe.startTime-O),qe=!1}return qe}finally{f=null,p=A,S=!1}}var k=!1,N=null,C=-1,I=5,L=-1;function b(){return!(e.unstable_now()-L<I)}function ee(){if(N!==null){var P=e.unstable_now();L=P;var O=!0;try{O=N(!0,P)}finally{O?ie():(k=!1,N=null)}}else k=!1}var ie;if(typeof d=="function")ie=function(){d(ee)};else if(typeof MessageChannel<"u"){var xt=new MessageChannel,wt=xt.port2;xt.port1.onmessage=ee,ie=function(){wt.postMessage(null)}}else ie=function(){E(ee,0)};function Me(P){N=P,k||(k=!0,ie())}function St(P,O){C=E(function(){P(e.unstable_now())},O)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){w||S||(w=!0,Me(j))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(P){switch(p){case 1:case 2:case 3:var O=3;break;default:O=p}var A=p;p=O;try{return P()}finally{p=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,O){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var A=p;p=P;try{return O()}finally{p=A}},e.unstable_scheduleCallback=function(P,O,A){var U=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?U+A:U):A=U,P){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=A+W,P={id:h++,callback:O,priorityLevel:P,startTime:A,expirationTime:W,sortIndex:-1},A>U?(P.sortIndex=A,t(c,P),n(a)===null&&P===n(c)&&(x?(g(C),C=-1):x=!0,St(y,A-U))):(P.sortIndex=W,t(a,P),w||S||(w=!0,Me(j))),P},e.unstable_shouldYield=b,e.unstable_wrapCallback=function(P){var O=p;return function(){var A=p;p=O;try{return P.apply(this,arguments)}finally{p=A}}}})(Du);Au.exports=Du;var Ff=Au.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,15 +30,15 @@ function hf(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
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 Bf=x,Ce=$f;function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Js=new Set,Gn={};function Ht(e,t){mn(e,t),mn(e+"Capture",t)}function mn(e,t){for(Gn[e]=t,e=0;e<t.length;e++)Js.add(t[e])}var qe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ei=Object.prototype.hasOwnProperty,Af=/^[: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]*$/,wu={},Su={};function Vf(e){return Ei.call(Su,e)?!0:Ei.call(wu,e)?!1:Af.test(e)?Su[e]=!0:(wu[e]=!0,!1)}function Wf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Hf(e,t,n,r){if(t===null||typeof t>"u"||Wf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function pe(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ie[e]=new pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ie[t]=new pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ie[e]=new pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ie[e]=new pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ie[e]=new pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ie[e]=new pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ie[e]=new pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ie[e]=new pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ie[e]=new pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var jo=/[\-:]([a-z])/g;function Po(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(jo,Po);ie[t]=new pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(jo,Po);ie[t]=new pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(jo,Po);ie[t]=new pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ie[e]=new pe(e,1,!1,e.toLowerCase(),null,!1,!1)});ie.xlinkHref=new pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ie[e]=new pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function _o(e,t,n,r){var l=ie.hasOwnProperty(t)?ie[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Hf(t,n,l,r)&&(n=null),r||l===null?Vf(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var nt=Bf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,jr=Symbol.for("react.element"),Jt=Symbol.for("react.portal"),Zt=Symbol.for("react.fragment"),Lo=Symbol.for("react.strict_mode"),Ci=Symbol.for("react.profiler"),Zs=Symbol.for("react.provider"),qs=Symbol.for("react.context"),Ro=Symbol.for("react.forward_ref"),Ni=Symbol.for("react.suspense"),ji=Symbol.for("react.suspense_list"),To=Symbol.for("react.memo"),lt=Symbol.for("react.lazy"),bs=Symbol.for("react.offscreen"),ku=Symbol.iterator;function _n(e){return e===null||typeof e!="object"?null:(e=ku&&e[ku]||e["@@iterator"],typeof e=="function"?e:null)}var H=Object.assign,Jl;function Dn(e){if(Jl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jl=t&&t[1]||""}return`
34
- `+Jl+e}var Zl=!1;function ql(e,t){if(!e||Zl)return"";Zl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
33
+ */var Bf=v,Ie=Ff;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Mu=new Set,pr={};function sn(e,t){Tn(e,t),Tn(e+"Capture",t)}function Tn(e,t){for(pr[e]=t,e=0;e<t.length;e++)Mu.add(t[e])}var ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qi=Object.prototype.hasOwnProperty,Vf=/^[: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]*$/,ta={},na={};function Wf(e){return Qi.call(na,e)?!0:Qi.call(ta,e)?!1:Vf.test(e)?na[e]=!0:(ta[e]=!0,!1)}function Hf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Kf(e,t,n,r){if(t===null||typeof t>"u"||Hf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function je(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var he={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){he[e]=new je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];he[t]=new je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){he[e]=new je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){he[e]=new je(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){he[e]=new je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){he[e]=new je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){he[e]=new je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){he[e]=new je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){he[e]=new je(e,5,!1,e.toLowerCase(),null,!1,!1)});var ns=/[\-:]([a-z])/g;function rs(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ns,rs);he[t]=new je(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ns,rs);he[t]=new je(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ns,rs);he[t]=new je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){he[e]=new je(e,1,!1,e.toLowerCase(),null,!1,!1)});he.xlinkHref=new je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){he[e]=new je(e,1,!1,e.toLowerCase(),null,!0,!0)});function ls(e,t,n,r){var l=he.hasOwnProperty(t)?he[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Kf(t,n,l,r)&&(n=null),r||l===null?Wf(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var yt=Bf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vr=Symbol.for("react.element"),fn=Symbol.for("react.portal"),pn=Symbol.for("react.fragment"),is=Symbol.for("react.strict_mode"),Yi=Symbol.for("react.profiler"),zu=Symbol.for("react.provider"),$u=Symbol.for("react.context"),os=Symbol.for("react.forward_ref"),Gi=Symbol.for("react.suspense"),Ji=Symbol.for("react.suspense_list"),ss=Symbol.for("react.memo"),jt=Symbol.for("react.lazy"),Uu=Symbol.for("react.offscreen"),ra=Symbol.iterator;function Hn(e){return e===null||typeof e!="object"?null:(e=ra&&e[ra]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,mi;function Zn(e){if(mi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);mi=t&&t[1]||""}return`
34
+ `+mi+e}var gi=!1;function vi(e,t){if(!e||gi)return"";gi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
35
35
  `),i=r.stack.split(`
36
- `),o=l.length-1,u=i.length-1;1<=o&&0<=u&&l[o]!==i[u];)u--;for(;1<=o&&0<=u;o--,u--)if(l[o]!==i[u]){if(o!==1||u!==1)do if(o--,u--,0>u||l[o]!==i[u]){var s=`
37
- `+l[o].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{Zl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Dn(e):""}function Qf(e){switch(e.tag){case 5:return Dn(e.type);case 16:return Dn("Lazy");case 13:return Dn("Suspense");case 19:return Dn("SuspenseList");case 0:case 2:case 15:return e=ql(e.type,!1),e;case 11:return e=ql(e.type.render,!1),e;case 1:return e=ql(e.type,!0),e;default:return""}}function Pi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Zt:return"Fragment";case Jt:return"Portal";case Ci:return"Profiler";case Lo:return"StrictMode";case Ni:return"Suspense";case ji:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qs:return(e.displayName||"Context")+".Consumer";case Zs:return(e._context.displayName||"Context")+".Provider";case Ro:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case To:return t=e.displayName||null,t!==null?t:Pi(e.type)||"Memo";case lt:t=e._payload,e=e._init;try{return Pi(e(t))}catch{}}return null}function Kf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pi(t);case 8:return t===Lo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function St(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ea(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yf(e){var t=ea(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pr(e){e._valueTracker||(e._valueTracker=Yf(e))}function ta(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ea(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function nl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _i(e,t){var n=t.checked;return H({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Eu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=St(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function na(e,t){t=t.checked,t!=null&&_o(e,"checked",t,!1)}function Li(e,t){na(e,t);var n=St(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ri(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ri(e,t.type,St(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Cu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ri(e,t,n){(t!=="number"||nl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fn=Array.isArray;function an(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+St(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Ti(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(E(91));return H({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Nu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(E(92));if(Fn(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:St(n)}}function ra(e,t){var n=St(t.value),r=St(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ju(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function la(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function zi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?la(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var _r,ia=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(_r=_r||document.createElement("div"),_r.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=_r.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xf=["Webkit","ms","Moz","O"];Object.keys(Bn).forEach(function(e){Xf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bn[t]=Bn[e]})});function oa(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bn.hasOwnProperty(e)&&Bn[e]?(""+t).trim():t+"px"}function ua(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=oa(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Gf=H({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oi(e,t){if(t){if(Gf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Ii(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mi=null;function zo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Di=null,cn=null,fn=null;function Pu(e){if(e=xr(e)){if(typeof Di!="function")throw Error(E(280));var t=e.stateNode;t&&(t=Ol(t),Di(e.stateNode,e.type,t))}}function sa(e){cn?fn?fn.push(e):fn=[e]:cn=e}function aa(){if(cn){var e=cn,t=fn;if(fn=cn=null,Pu(e),t)for(e=0;e<t.length;e++)Pu(t[e])}}function ca(e,t){return e(t)}function fa(){}var bl=!1;function da(e,t,n){if(bl)return e(t,n);bl=!0;try{return ca(e,t,n)}finally{bl=!1,(cn!==null||fn!==null)&&(fa(),aa())}}function Zn(e,t){var n=e.stateNode;if(n===null)return null;var r=Ol(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var Fi=!1;if(qe)try{var Ln={};Object.defineProperty(Ln,"passive",{get:function(){Fi=!0}}),window.addEventListener("test",Ln,Ln),window.removeEventListener("test",Ln,Ln)}catch{Fi=!1}function Jf(e,t,n,r,l,i,o,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(m){this.onError(m)}}var An=!1,rl=null,ll=!1,Ui=null,Zf={onError:function(e){An=!0,rl=e}};function qf(e,t,n,r,l,i,o,u,s){An=!1,rl=null,Jf.apply(Zf,arguments)}function bf(e,t,n,r,l,i,o,u,s){if(qf.apply(this,arguments),An){if(An){var c=rl;An=!1,rl=null}else throw Error(E(198));ll||(ll=!0,Ui=c)}}function Qt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pa(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function _u(e){if(Qt(e)!==e)throw Error(E(188))}function ed(e){var t=e.alternate;if(!t){if(t=Qt(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return _u(l),e;if(i===r)return _u(l),t;i=i.sibling}throw Error(E(188))}if(n.return!==r.return)n=l,r=i;else{for(var o=!1,u=l.child;u;){if(u===n){o=!0,n=l,r=i;break}if(u===r){o=!0,r=l,n=i;break}u=u.sibling}if(!o){for(u=i.child;u;){if(u===n){o=!0,n=i,r=l;break}if(u===r){o=!0,r=i,n=l;break}u=u.sibling}if(!o)throw Error(E(189))}}if(n.alternate!==r)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function ha(e){return e=ed(e),e!==null?ma(e):null}function ma(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ma(e);if(t!==null)return t;e=e.sibling}return null}var va=Ce.unstable_scheduleCallback,Lu=Ce.unstable_cancelCallback,td=Ce.unstable_shouldYield,nd=Ce.unstable_requestPaint,G=Ce.unstable_now,rd=Ce.unstable_getCurrentPriorityLevel,Oo=Ce.unstable_ImmediatePriority,ga=Ce.unstable_UserBlockingPriority,il=Ce.unstable_NormalPriority,ld=Ce.unstable_LowPriority,ya=Ce.unstable_IdlePriority,Ll=null,Qe=null;function id(e){if(Qe&&typeof Qe.onCommitFiberRoot=="function")try{Qe.onCommitFiberRoot(Ll,e,void 0,(e.current.flags&128)===128)}catch{}}var Ue=Math.clz32?Math.clz32:sd,od=Math.log,ud=Math.LN2;function sd(e){return e>>>=0,e===0?32:31-(od(e)/ud|0)|0}var Lr=64,Rr=4194304;function Un(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ol(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~l;u!==0?r=Un(u):(i&=o,i!==0&&(r=Un(i)))}else o=n&~l,o!==0?r=Un(o):i!==0&&(r=Un(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ue(t),l=1<<n,r|=e[n],t&=~l;return r}function ad(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Ue(i),u=1<<o,s=l[o];s===-1?(!(u&n)||u&r)&&(l[o]=ad(u,t)):s<=t&&(e.expiredLanes|=u),i&=~u}}function $i(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xa(){var e=Lr;return Lr<<=1,!(Lr&4194240)&&(Lr=64),e}function ei(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ue(t),e[t]=n}function fd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Ue(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function Io(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ue(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var M=0;function wa(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Sa,Mo,ka,Ea,Ca,Bi=!1,Tr=[],ft=null,dt=null,pt=null,qn=new Map,bn=new Map,ot=[],dd="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 submit".split(" ");function Ru(e,t){switch(e){case"focusin":case"focusout":ft=null;break;case"dragenter":case"dragleave":dt=null;break;case"mouseover":case"mouseout":pt=null;break;case"pointerover":case"pointerout":qn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bn.delete(t.pointerId)}}function Rn(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=xr(t),t!==null&&Mo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function pd(e,t,n,r,l){switch(t){case"focusin":return ft=Rn(ft,e,t,n,r,l),!0;case"dragenter":return dt=Rn(dt,e,t,n,r,l),!0;case"mouseover":return pt=Rn(pt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return qn.set(i,Rn(qn.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,bn.set(i,Rn(bn.get(i)||null,e,t,n,r,l)),!0}return!1}function Na(e){var t=It(e.target);if(t!==null){var n=Qt(t);if(n!==null){if(t=n.tag,t===13){if(t=pa(n),t!==null){e.blockedOn=t,Ca(e.priority,function(){ka(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ai(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Mi=r,n.target.dispatchEvent(r),Mi=null}else return t=xr(n),t!==null&&Mo(t),e.blockedOn=n,!1;t.shift()}return!0}function Tu(e,t,n){Qr(e)&&n.delete(t)}function hd(){Bi=!1,ft!==null&&Qr(ft)&&(ft=null),dt!==null&&Qr(dt)&&(dt=null),pt!==null&&Qr(pt)&&(pt=null),qn.forEach(Tu),bn.forEach(Tu)}function Tn(e,t){e.blockedOn===t&&(e.blockedOn=null,Bi||(Bi=!0,Ce.unstable_scheduleCallback(Ce.unstable_NormalPriority,hd)))}function er(e){function t(l){return Tn(l,e)}if(0<Tr.length){Tn(Tr[0],e);for(var n=1;n<Tr.length;n++){var r=Tr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ft!==null&&Tn(ft,e),dt!==null&&Tn(dt,e),pt!==null&&Tn(pt,e),qn.forEach(t),bn.forEach(t),n=0;n<ot.length;n++)r=ot[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ot.length&&(n=ot[0],n.blockedOn===null);)Na(n),n.blockedOn===null&&ot.shift()}var dn=nt.ReactCurrentBatchConfig,ul=!0;function md(e,t,n,r){var l=M,i=dn.transition;dn.transition=null;try{M=1,Do(e,t,n,r)}finally{M=l,dn.transition=i}}function vd(e,t,n,r){var l=M,i=dn.transition;dn.transition=null;try{M=4,Do(e,t,n,r)}finally{M=l,dn.transition=i}}function Do(e,t,n,r){if(ul){var l=Ai(e,t,n,r);if(l===null)ci(e,t,r,sl,n),Ru(e,r);else if(pd(l,e,t,n,r))r.stopPropagation();else if(Ru(e,r),t&4&&-1<dd.indexOf(e)){for(;l!==null;){var i=xr(l);if(i!==null&&Sa(i),i=Ai(e,t,n,r),i===null&&ci(e,t,r,sl,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else ci(e,t,r,null,n)}}var sl=null;function Ai(e,t,n,r){if(sl=null,e=zo(r),e=It(e),e!==null)if(t=Qt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pa(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return sl=e,null}function ja(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(rd()){case Oo:return 1;case ga:return 4;case il:case ld:return 16;case ya:return 536870912;default:return 16}default:return 16}}var st=null,Fo=null,Kr=null;function Pa(){if(Kr)return Kr;var e,t=Fo,n=t.length,r,l="value"in st?st.value:st.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===l[i-r];r++);return Kr=l.slice(e,1<r?1-r:void 0)}function Yr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zr(){return!0}function zu(){return!1}function je(e){function t(n,r,l,i,o){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(i):i[u]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?zr:zu,this.isPropagationStopped=zu,this}return H(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=zr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=zr)},persist:function(){},isPersistent:zr}),t}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uo=je(Cn),yr=H({},Cn,{view:0,detail:0}),gd=je(yr),ti,ni,zn,Rl=H({},yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$o,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==zn&&(zn&&e.type==="mousemove"?(ti=e.screenX-zn.screenX,ni=e.screenY-zn.screenY):ni=ti=0,zn=e),ti)},movementY:function(e){return"movementY"in e?e.movementY:ni}}),Ou=je(Rl),yd=H({},Rl,{dataTransfer:0}),xd=je(yd),wd=H({},yr,{relatedTarget:0}),ri=je(wd),Sd=H({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0}),kd=je(Sd),Ed=H({},Cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cd=je(Ed),Nd=H({},Cn,{data:0}),Iu=je(Nd),jd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pd={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"},_d={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ld(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_d[e])?!!t[e]:!1}function $o(){return Ld}var Rd=H({},yr,{key:function(e){if(e.key){var t=jd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$o,charCode:function(e){return e.type==="keypress"?Yr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Td=je(Rd),zd=H({},Rl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mu=je(zd),Od=H({},yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$o}),Id=je(Od),Md=H({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dd=je(Md),Fd=H({},Rl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ud=je(Fd),$d=[9,13,27,32],Bo=qe&&"CompositionEvent"in window,Vn=null;qe&&"documentMode"in document&&(Vn=document.documentMode);var Bd=qe&&"TextEvent"in window&&!Vn,_a=qe&&(!Bo||Vn&&8<Vn&&11>=Vn),Du=" ",Fu=!1;function La(e,t){switch(e){case"keyup":return $d.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ra(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qt=!1;function Ad(e,t){switch(e){case"compositionend":return Ra(t);case"keypress":return t.which!==32?null:(Fu=!0,Du);case"textInput":return e=t.data,e===Du&&Fu?null:e;default:return null}}function Vd(e,t){if(qt)return e==="compositionend"||!Bo&&La(e,t)?(e=Pa(),Kr=Fo=st=null,qt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return _a&&t.locale!=="ko"?null:t.data;default:return null}}var Wd={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 Uu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Wd[e.type]:t==="textarea"}function Ta(e,t,n,r){sa(r),t=al(t,"onChange"),0<t.length&&(n=new Uo("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,tr=null;function Hd(e){Va(e,0)}function Tl(e){var t=tn(e);if(ta(t))return e}function Qd(e,t){if(e==="change")return t}var za=!1;if(qe){var li;if(qe){var ii="oninput"in document;if(!ii){var $u=document.createElement("div");$u.setAttribute("oninput","return;"),ii=typeof $u.oninput=="function"}li=ii}else li=!1;za=li&&(!document.documentMode||9<document.documentMode)}function Bu(){Wn&&(Wn.detachEvent("onpropertychange",Oa),tr=Wn=null)}function Oa(e){if(e.propertyName==="value"&&Tl(tr)){var t=[];Ta(t,tr,e,zo(e)),da(Hd,t)}}function Kd(e,t,n){e==="focusin"?(Bu(),Wn=t,tr=n,Wn.attachEvent("onpropertychange",Oa)):e==="focusout"&&Bu()}function Yd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Tl(tr)}function Xd(e,t){if(e==="click")return Tl(t)}function Gd(e,t){if(e==="input"||e==="change")return Tl(t)}function Jd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Be=typeof Object.is=="function"?Object.is:Jd;function nr(e,t){if(Be(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!Ei.call(t,l)||!Be(e[l],t[l]))return!1}return!0}function Au(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vu(e,t){var n=Au(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Au(n)}}function Ia(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ia(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ma(){for(var e=window,t=nl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=nl(e.document)}return t}function Ao(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Zd(e){var t=Ma(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ia(n.ownerDocument.documentElement,n)){if(r!==null&&Ao(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Vu(n,i);var o=Vu(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var qd=qe&&"documentMode"in document&&11>=document.documentMode,bt=null,Vi=null,Hn=null,Wi=!1;function Wu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wi||bt==null||bt!==nl(r)||(r=bt,"selectionStart"in r&&Ao(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hn&&nr(Hn,r)||(Hn=r,r=al(Vi,"onSelect"),0<r.length&&(t=new Uo("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=bt)))}function Or(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var en={animationend:Or("Animation","AnimationEnd"),animationiteration:Or("Animation","AnimationIteration"),animationstart:Or("Animation","AnimationStart"),transitionend:Or("Transition","TransitionEnd")},oi={},Da={};qe&&(Da=document.createElement("div").style,"AnimationEvent"in window||(delete en.animationend.animation,delete en.animationiteration.animation,delete en.animationstart.animation),"TransitionEvent"in window||delete en.transitionend.transition);function zl(e){if(oi[e])return oi[e];if(!en[e])return e;var t=en[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Da)return oi[e]=t[n];return e}var Fa=zl("animationend"),Ua=zl("animationiteration"),$a=zl("animationstart"),Ba=zl("transitionend"),Aa=new Map,Hu="abort auxClick 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(" ");function Et(e,t){Aa.set(e,t),Ht(t,[e])}for(var ui=0;ui<Hu.length;ui++){var si=Hu[ui],bd=si.toLowerCase(),ep=si[0].toUpperCase()+si.slice(1);Et(bd,"on"+ep)}Et(Fa,"onAnimationEnd");Et(Ua,"onAnimationIteration");Et($a,"onAnimationStart");Et("dblclick","onDoubleClick");Et("focusin","onFocus");Et("focusout","onBlur");Et(Ba,"onTransitionEnd");mn("onMouseEnter",["mouseout","mouseover"]);mn("onMouseLeave",["mouseout","mouseover"]);mn("onPointerEnter",["pointerout","pointerover"]);mn("onPointerLeave",["pointerout","pointerover"]);Ht("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ht("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ht("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ht("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ht("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ht("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $n="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(" "),tp=new Set("cancel close invalid load scroll toggle".split(" ").concat($n));function Qu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,bf(r,t,void 0,e),e.currentTarget=null}function Va(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],s=u.instance,c=u.currentTarget;if(u=u.listener,s!==i&&l.isPropagationStopped())break e;Qu(l,u,c),i=s}else for(o=0;o<r.length;o++){if(u=r[o],s=u.instance,c=u.currentTarget,u=u.listener,s!==i&&l.isPropagationStopped())break e;Qu(l,u,c),i=s}}}if(ll)throw e=Ui,ll=!1,Ui=null,e}function $(e,t){var n=t[Xi];n===void 0&&(n=t[Xi]=new Set);var r=e+"__bubble";n.has(r)||(Wa(t,e,2,!1),n.add(r))}function ai(e,t,n){var r=0;t&&(r|=4),Wa(n,e,r,t)}var Ir="_reactListening"+Math.random().toString(36).slice(2);function rr(e){if(!e[Ir]){e[Ir]=!0,Js.forEach(function(n){n!=="selectionchange"&&(tp.has(n)||ai(n,!1,e),ai(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ir]||(t[Ir]=!0,ai("selectionchange",!1,t))}}function Wa(e,t,n,r){switch(ja(t)){case 1:var l=md;break;case 4:l=vd;break;default:l=Do}n=l.bind(null,t,n,e),l=void 0,!Fi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function ci(e,t,n,r,l){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var u=r.stateNode.containerInfo;if(u===l||u.nodeType===8&&u.parentNode===l)break;if(o===4)for(o=r.return;o!==null;){var s=o.tag;if((s===3||s===4)&&(s=o.stateNode.containerInfo,s===l||s.nodeType===8&&s.parentNode===l))return;o=o.return}for(;u!==null;){if(o=It(u),o===null)return;if(s=o.tag,s===5||s===6){r=i=o;continue e}u=u.parentNode}}r=r.return}da(function(){var c=i,m=zo(n),d=[];e:{var h=Aa.get(e);if(h!==void 0){var y=Uo,w=e;switch(e){case"keypress":if(Yr(n)===0)break e;case"keydown":case"keyup":y=Td;break;case"focusin":w="focus",y=ri;break;case"focusout":w="blur",y=ri;break;case"beforeblur":case"afterblur":y=ri;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Ou;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=xd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Id;break;case Fa:case Ua:case $a:y=kd;break;case Ba:y=Dd;break;case"scroll":y=gd;break;case"wheel":y=Ud;break;case"copy":case"cut":case"paste":y=Cd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Mu}var S=(t&4)!==0,N=!S&&e==="scroll",p=S?h!==null?h+"Capture":null:h;S=[];for(var f=c,v;f!==null;){v=f;var g=v.stateNode;if(v.tag===5&&g!==null&&(v=g,p!==null&&(g=Zn(f,p),g!=null&&S.push(lr(f,g,v)))),N)break;f=f.return}0<S.length&&(h=new y(h,w,null,n,m),d.push({event:h,listeners:S}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",h&&n!==Mi&&(w=n.relatedTarget||n.fromElement)&&(It(w)||w[be]))break e;if((y||h)&&(h=m.window===m?m:(h=m.ownerDocument)?h.defaultView||h.parentWindow:window,y?(w=n.relatedTarget||n.toElement,y=c,w=w?It(w):null,w!==null&&(N=Qt(w),w!==N||w.tag!==5&&w.tag!==6)&&(w=null)):(y=null,w=c),y!==w)){if(S=Ou,g="onMouseLeave",p="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(S=Mu,g="onPointerLeave",p="onPointerEnter",f="pointer"),N=y==null?h:tn(y),v=w==null?h:tn(w),h=new S(g,f+"leave",y,n,m),h.target=N,h.relatedTarget=v,g=null,It(m)===c&&(S=new S(p,f+"enter",w,n,m),S.target=v,S.relatedTarget=N,g=S),N=g,y&&w)t:{for(S=y,p=w,f=0,v=S;v;v=Xt(v))f++;for(v=0,g=p;g;g=Xt(g))v++;for(;0<f-v;)S=Xt(S),f--;for(;0<v-f;)p=Xt(p),v--;for(;f--;){if(S===p||p!==null&&S===p.alternate)break t;S=Xt(S),p=Xt(p)}S=null}else S=null;y!==null&&Ku(d,h,y,S,!1),w!==null&&N!==null&&Ku(d,N,w,S,!0)}}e:{if(h=c?tn(c):window,y=h.nodeName&&h.nodeName.toLowerCase(),y==="select"||y==="input"&&h.type==="file")var k=Qd;else if(Uu(h))if(za)k=Gd;else{k=Yd;var j=Kd}else(y=h.nodeName)&&y.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=Xd);if(k&&(k=k(e,c))){Ta(d,k,n,m);break e}j&&j(e,h,c),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&Ri(h,"number",h.value)}switch(j=c?tn(c):window,e){case"focusin":(Uu(j)||j.contentEditable==="true")&&(bt=j,Vi=c,Hn=null);break;case"focusout":Hn=Vi=bt=null;break;case"mousedown":Wi=!0;break;case"contextmenu":case"mouseup":case"dragend":Wi=!1,Wu(d,n,m);break;case"selectionchange":if(qd)break;case"keydown":case"keyup":Wu(d,n,m)}var P;if(Bo)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else qt?La(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(_a&&n.locale!=="ko"&&(qt||_!=="onCompositionStart"?_==="onCompositionEnd"&&qt&&(P=Pa()):(st=m,Fo="value"in st?st.value:st.textContent,qt=!0)),j=al(c,_),0<j.length&&(_=new Iu(_,e,null,n,m),d.push({event:_,listeners:j}),P?_.data=P:(P=Ra(n),P!==null&&(_.data=P)))),(P=Bd?Ad(e,n):Vd(e,n))&&(c=al(c,"onBeforeInput"),0<c.length&&(m=new Iu("onBeforeInput","beforeinput",null,n,m),d.push({event:m,listeners:c}),m.data=P))}Va(d,t)})}function lr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function al(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=Zn(e,n),i!=null&&r.unshift(lr(e,i,l)),i=Zn(e,t),i!=null&&r.push(lr(e,i,l))),e=e.return}return r}function Xt(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ku(e,t,n,r,l){for(var i=t._reactName,o=[];n!==null&&n!==r;){var u=n,s=u.alternate,c=u.stateNode;if(s!==null&&s===r)break;u.tag===5&&c!==null&&(u=c,l?(s=Zn(n,i),s!=null&&o.unshift(lr(n,s,u))):l||(s=Zn(n,i),s!=null&&o.push(lr(n,s,u)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var np=/\r\n?/g,rp=/\u0000|\uFFFD/g;function Yu(e){return(typeof e=="string"?e:""+e).replace(np,`
38
- `).replace(rp,"")}function Mr(e,t,n){if(t=Yu(t),Yu(e)!==t&&n)throw Error(E(425))}function cl(){}var Hi=null,Qi=null;function Ki(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yi=typeof setTimeout=="function"?setTimeout:void 0,lp=typeof clearTimeout=="function"?clearTimeout:void 0,Xu=typeof Promise=="function"?Promise:void 0,ip=typeof queueMicrotask=="function"?queueMicrotask:typeof Xu<"u"?function(e){return Xu.resolve(null).then(e).catch(op)}:Yi;function op(e){setTimeout(function(){throw e})}function fi(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),er(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);er(t)}function ht(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Gu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Nn=Math.random().toString(36).slice(2),We="__reactFiber$"+Nn,ir="__reactProps$"+Nn,be="__reactContainer$"+Nn,Xi="__reactEvents$"+Nn,up="__reactListeners$"+Nn,sp="__reactHandles$"+Nn;function It(e){var t=e[We];if(t)return t;for(var n=e.parentNode;n;){if(t=n[be]||n[We]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Gu(e);e!==null;){if(n=e[We])return n;e=Gu(e)}return t}e=n,n=e.parentNode}return null}function xr(e){return e=e[We]||e[be],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function tn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function Ol(e){return e[ir]||null}var Gi=[],nn=-1;function Ct(e){return{current:e}}function B(e){0>nn||(e.current=Gi[nn],Gi[nn]=null,nn--)}function U(e,t){nn++,Gi[nn]=e.current,e.current=t}var kt={},ae=Ct(kt),ye=Ct(!1),$t=kt;function vn(e,t){var n=e.type.contextTypes;if(!n)return kt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function xe(e){return e=e.childContextTypes,e!=null}function fl(){B(ye),B(ae)}function Ju(e,t,n){if(ae.current!==kt)throw Error(E(168));U(ae,t),U(ye,n)}function Ha(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(E(108,Kf(e)||"Unknown",l));return H({},n,r)}function dl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kt,$t=ae.current,U(ae,e),U(ye,ye.current),!0}function Zu(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=Ha(e,t,$t),r.__reactInternalMemoizedMergedChildContext=e,B(ye),B(ae),U(ae,e)):B(ye),U(ye,n)}var Xe=null,Il=!1,di=!1;function Qa(e){Xe===null?Xe=[e]:Xe.push(e)}function ap(e){Il=!0,Qa(e)}function Nt(){if(!di&&Xe!==null){di=!0;var e=0,t=M;try{var n=Xe;for(M=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Xe=null,Il=!1}catch(l){throw Xe!==null&&(Xe=Xe.slice(e+1)),va(Oo,Nt),l}finally{M=t,di=!1}}return null}var rn=[],ln=0,pl=null,hl=0,Pe=[],_e=0,Bt=null,Ge=1,Je="";function zt(e,t){rn[ln++]=hl,rn[ln++]=pl,pl=e,hl=t}function Ka(e,t,n){Pe[_e++]=Ge,Pe[_e++]=Je,Pe[_e++]=Bt,Bt=e;var r=Ge;e=Je;var l=32-Ue(r)-1;r&=~(1<<l),n+=1;var i=32-Ue(t)+l;if(30<i){var o=l-l%5;i=(r&(1<<o)-1).toString(32),r>>=o,l-=o,Ge=1<<32-Ue(t)+l|n<<l|r,Je=i+e}else Ge=1<<i|n<<l|r,Je=e}function Vo(e){e.return!==null&&(zt(e,1),Ka(e,1,0))}function Wo(e){for(;e===pl;)pl=rn[--ln],rn[ln]=null,hl=rn[--ln],rn[ln]=null;for(;e===Bt;)Bt=Pe[--_e],Pe[_e]=null,Je=Pe[--_e],Pe[_e]=null,Ge=Pe[--_e],Pe[_e]=null}var Ee=null,ke=null,A=!1,De=null;function Ya(e,t){var n=Le(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function qu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ee=e,ke=ht(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ee=e,ke=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Bt!==null?{id:Ge,overflow:Je}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Le(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ee=e,ke=null,!0):!1;default:return!1}}function Ji(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Zi(e){if(A){var t=ke;if(t){var n=t;if(!qu(e,t)){if(Ji(e))throw Error(E(418));t=ht(n.nextSibling);var r=Ee;t&&qu(e,t)?Ya(r,n):(e.flags=e.flags&-4097|2,A=!1,Ee=e)}}else{if(Ji(e))throw Error(E(418));e.flags=e.flags&-4097|2,A=!1,Ee=e}}}function bu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ee=e}function Dr(e){if(e!==Ee)return!1;if(!A)return bu(e),A=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ki(e.type,e.memoizedProps)),t&&(t=ke)){if(Ji(e))throw Xa(),Error(E(418));for(;t;)Ya(e,t),t=ht(t.nextSibling)}if(bu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ke=ht(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ke=null}}else ke=Ee?ht(e.stateNode.nextSibling):null;return!0}function Xa(){for(var e=ke;e;)e=ht(e.nextSibling)}function gn(){ke=Ee=null,A=!1}function Ho(e){De===null?De=[e]:De.push(e)}var cp=nt.ReactCurrentBatchConfig;function On(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(E(309));var r=n.stateNode}if(!r)throw Error(E(147,e));var l=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var u=l.refs;o===null?delete u[i]:u[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function Fr(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function es(e){var t=e._init;return t(e._payload)}function Ga(e){function t(p,f){if(e){var v=p.deletions;v===null?(p.deletions=[f],p.flags|=16):v.push(f)}}function n(p,f){if(!e)return null;for(;f!==null;)t(p,f),f=f.sibling;return null}function r(p,f){for(p=new Map;f!==null;)f.key!==null?p.set(f.key,f):p.set(f.index,f),f=f.sibling;return p}function l(p,f){return p=yt(p,f),p.index=0,p.sibling=null,p}function i(p,f,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<f?(p.flags|=2,f):v):(p.flags|=2,f)):(p.flags|=1048576,f)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function u(p,f,v,g){return f===null||f.tag!==6?(f=xi(v,p.mode,g),f.return=p,f):(f=l(f,v),f.return=p,f)}function s(p,f,v,g){var k=v.type;return k===Zt?m(p,f,v.props.children,g,v.key):f!==null&&(f.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===lt&&es(k)===f.type)?(g=l(f,v.props),g.ref=On(p,f,v),g.return=p,g):(g=el(v.type,v.key,v.props,null,p.mode,g),g.ref=On(p,f,v),g.return=p,g)}function c(p,f,v,g){return f===null||f.tag!==4||f.stateNode.containerInfo!==v.containerInfo||f.stateNode.implementation!==v.implementation?(f=wi(v,p.mode,g),f.return=p,f):(f=l(f,v.children||[]),f.return=p,f)}function m(p,f,v,g,k){return f===null||f.tag!==7?(f=Ut(v,p.mode,g,k),f.return=p,f):(f=l(f,v),f.return=p,f)}function d(p,f,v){if(typeof f=="string"&&f!==""||typeof f=="number")return f=xi(""+f,p.mode,v),f.return=p,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case jr:return v=el(f.type,f.key,f.props,null,p.mode,v),v.ref=On(p,null,f),v.return=p,v;case Jt:return f=wi(f,p.mode,v),f.return=p,f;case lt:var g=f._init;return d(p,g(f._payload),v)}if(Fn(f)||_n(f))return f=Ut(f,p.mode,v,null),f.return=p,f;Fr(p,f)}return null}function h(p,f,v,g){var k=f!==null?f.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:u(p,f,""+v,g);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case jr:return v.key===k?s(p,f,v,g):null;case Jt:return v.key===k?c(p,f,v,g):null;case lt:return k=v._init,h(p,f,k(v._payload),g)}if(Fn(v)||_n(v))return k!==null?null:m(p,f,v,g,null);Fr(p,v)}return null}function y(p,f,v,g,k){if(typeof g=="string"&&g!==""||typeof g=="number")return p=p.get(v)||null,u(f,p,""+g,k);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case jr:return p=p.get(g.key===null?v:g.key)||null,s(f,p,g,k);case Jt:return p=p.get(g.key===null?v:g.key)||null,c(f,p,g,k);case lt:var j=g._init;return y(p,f,v,j(g._payload),k)}if(Fn(g)||_n(g))return p=p.get(v)||null,m(f,p,g,k,null);Fr(f,g)}return null}function w(p,f,v,g){for(var k=null,j=null,P=f,_=f=0,D=null;P!==null&&_<v.length;_++){P.index>_?(D=P,P=null):D=P.sibling;var C=h(p,P,v[_],g);if(C===null){P===null&&(P=D);break}e&&P&&C.alternate===null&&t(p,P),f=i(C,f,_),j===null?k=C:j.sibling=C,j=C,P=D}if(_===v.length)return n(p,P),A&&zt(p,_),k;if(P===null){for(;_<v.length;_++)P=d(p,v[_],g),P!==null&&(f=i(P,f,_),j===null?k=P:j.sibling=P,j=P);return A&&zt(p,_),k}for(P=r(p,P);_<v.length;_++)D=y(P,p,_,v[_],g),D!==null&&(e&&D.alternate!==null&&P.delete(D.key===null?_:D.key),f=i(D,f,_),j===null?k=D:j.sibling=D,j=D);return e&&P.forEach(function(F){return t(p,F)}),A&&zt(p,_),k}function S(p,f,v,g){var k=_n(v);if(typeof k!="function")throw Error(E(150));if(v=k.call(v),v==null)throw Error(E(151));for(var j=k=null,P=f,_=f=0,D=null,C=v.next();P!==null&&!C.done;_++,C=v.next()){P.index>_?(D=P,P=null):D=P.sibling;var F=h(p,P,C.value,g);if(F===null){P===null&&(P=D);break}e&&P&&F.alternate===null&&t(p,P),f=i(F,f,_),j===null?k=F:j.sibling=F,j=F,P=D}if(C.done)return n(p,P),A&&zt(p,_),k;if(P===null){for(;!C.done;_++,C=v.next())C=d(p,C.value,g),C!==null&&(f=i(C,f,_),j===null?k=C:j.sibling=C,j=C);return A&&zt(p,_),k}for(P=r(p,P);!C.done;_++,C=v.next())C=y(P,p,_,C.value,g),C!==null&&(e&&C.alternate!==null&&P.delete(C.key===null?_:C.key),f=i(C,f,_),j===null?k=C:j.sibling=C,j=C);return e&&P.forEach(function(ne){return t(p,ne)}),A&&zt(p,_),k}function N(p,f,v,g){if(typeof v=="object"&&v!==null&&v.type===Zt&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case jr:e:{for(var k=v.key,j=f;j!==null;){if(j.key===k){if(k=v.type,k===Zt){if(j.tag===7){n(p,j.sibling),f=l(j,v.props.children),f.return=p,p=f;break e}}else if(j.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===lt&&es(k)===j.type){n(p,j.sibling),f=l(j,v.props),f.ref=On(p,j,v),f.return=p,p=f;break e}n(p,j);break}else t(p,j);j=j.sibling}v.type===Zt?(f=Ut(v.props.children,p.mode,g,v.key),f.return=p,p=f):(g=el(v.type,v.key,v.props,null,p.mode,g),g.ref=On(p,f,v),g.return=p,p=g)}return o(p);case Jt:e:{for(j=v.key;f!==null;){if(f.key===j)if(f.tag===4&&f.stateNode.containerInfo===v.containerInfo&&f.stateNode.implementation===v.implementation){n(p,f.sibling),f=l(f,v.children||[]),f.return=p,p=f;break e}else{n(p,f);break}else t(p,f);f=f.sibling}f=wi(v,p.mode,g),f.return=p,p=f}return o(p);case lt:return j=v._init,N(p,f,j(v._payload),g)}if(Fn(v))return w(p,f,v,g);if(_n(v))return S(p,f,v,g);Fr(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,f!==null&&f.tag===6?(n(p,f.sibling),f=l(f,v),f.return=p,p=f):(n(p,f),f=xi(v,p.mode,g),f.return=p,p=f),o(p)):n(p,f)}return N}var yn=Ga(!0),Ja=Ga(!1),ml=Ct(null),vl=null,on=null,Qo=null;function Ko(){Qo=on=vl=null}function Yo(e){var t=ml.current;B(ml),e._currentValue=t}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function pn(e,t){vl=e,Qo=on=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(me=!0),e.firstContext=null)}function Te(e){var t=e._currentValue;if(Qo!==e)if(e={context:e,memoizedValue:t,next:null},on===null){if(vl===null)throw Error(E(308));on=e,vl.dependencies={lanes:0,firstContext:e}}else on=on.next=e;return t}var Mt=null;function Xo(e){Mt===null?Mt=[e]:Mt.push(e)}function Za(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Xo(t)):(n.next=l.next,l.next=n),t.interleaved=n,et(e,r)}function et(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var it=!1;function Go(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ze(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,I&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,et(e,n)}return l=r.interleaved,l===null?(t.next=t,Xo(r)):(t.next=l.next,l.next=t),r.interleaved=t,et(e,n)}function Xr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Io(e,n)}}function ts(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function gl(e,t,n,r){var l=e.updateQueue;it=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,c=s.next;s.next=null,o===null?i=c:o.next=c,o=s;var m=e.alternate;m!==null&&(m=m.updateQueue,u=m.lastBaseUpdate,u!==o&&(u===null?m.firstBaseUpdate=c:u.next=c,m.lastBaseUpdate=s))}if(i!==null){var d=l.baseState;o=0,m=c=s=null,u=i;do{var h=u.lane,y=u.eventTime;if((r&h)===h){m!==null&&(m=m.next={eventTime:y,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var w=e,S=u;switch(h=t,y=n,S.tag){case 1:if(w=S.payload,typeof w=="function"){d=w.call(y,d,h);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,h=typeof w=="function"?w.call(y,d,h):w,h==null)break e;d=H({},d,h);break e;case 2:it=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=l.effects,h===null?l.effects=[u]:h.push(u))}else y={eventTime:y,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},m===null?(c=m=y,s=d):m=m.next=y,o|=h;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;h=u,u=h.next,h.next=null,l.lastBaseUpdate=h,l.shared.pending=null}}while(!0);if(m===null&&(s=d),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=m,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);Vt|=o,e.lanes=o,e.memoizedState=d}}function ns(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(E(191,l));l.call(r)}}}var wr={},Ke=Ct(wr),or=Ct(wr),ur=Ct(wr);function Dt(e){if(e===wr)throw Error(E(174));return e}function Jo(e,t){switch(U(ur,t),U(or,e),U(Ke,wr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zi(t,e)}B(Ke),U(Ke,t)}function xn(){B(Ke),B(or),B(ur)}function ba(e){Dt(ur.current);var t=Dt(Ke.current),n=zi(t,e.type);t!==n&&(U(or,e),U(Ke,n))}function Zo(e){or.current===e&&(B(Ke),B(or))}var V=Ct(0);function yl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pi=[];function qo(){for(var e=0;e<pi.length;e++)pi[e]._workInProgressVersionPrimary=null;pi.length=0}var Gr=nt.ReactCurrentDispatcher,hi=nt.ReactCurrentBatchConfig,At=0,W=null,Z=null,ee=null,xl=!1,Qn=!1,sr=0,fp=0;function oe(){throw Error(E(321))}function bo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Be(e[n],t[n]))return!1;return!0}function eu(e,t,n,r,l,i){if(At=i,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gr.current=e===null||e.memoizedState===null?mp:vp,e=n(r,l),Qn){i=0;do{if(Qn=!1,sr=0,25<=i)throw Error(E(301));i+=1,ee=Z=null,t.updateQueue=null,Gr.current=gp,e=n(r,l)}while(Qn)}if(Gr.current=wl,t=Z!==null&&Z.next!==null,At=0,ee=Z=W=null,xl=!1,t)throw Error(E(300));return e}function tu(){var e=sr!==0;return sr=0,e}function Ve(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ee===null?W.memoizedState=ee=e:ee=ee.next=e,ee}function ze(){if(Z===null){var e=W.alternate;e=e!==null?e.memoizedState:null}else e=Z.next;var t=ee===null?W.memoizedState:ee.next;if(t!==null)ee=t,Z=e;else{if(e===null)throw Error(E(310));Z=e,e={memoizedState:Z.memoizedState,baseState:Z.baseState,baseQueue:Z.baseQueue,queue:Z.queue,next:null},ee===null?W.memoizedState=ee=e:ee=ee.next=e}return ee}function ar(e,t){return typeof t=="function"?t(e):t}function mi(e){var t=ze(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=Z,l=r.baseQueue,i=n.pending;if(i!==null){if(l!==null){var o=l.next;l.next=i.next,i.next=o}r.baseQueue=l=i,n.pending=null}if(l!==null){i=l.next,r=r.baseState;var u=o=null,s=null,c=i;do{var m=c.lane;if((At&m)===m)s!==null&&(s=s.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:m,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};s===null?(u=s=d,o=r):s=s.next=d,W.lanes|=m,Vt|=m}c=c.next}while(c!==null&&c!==i);s===null?o=r:s.next=u,Be(r,t.memoizedState)||(me=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do i=l.lane,W.lanes|=i,Vt|=i,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function vi(e){var t=ze(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var o=l=l.next;do i=e(i,o.action),o=o.next;while(o!==l);Be(i,t.memoizedState)||(me=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ec(){}function tc(e,t){var n=W,r=ze(),l=t(),i=!Be(r.memoizedState,l);if(i&&(r.memoizedState=l,me=!0),r=r.queue,nu(lc.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||ee!==null&&ee.memoizedState.tag&1){if(n.flags|=2048,cr(9,rc.bind(null,n,r,l,t),void 0,null),te===null)throw Error(E(349));At&30||nc(n,t,l)}return l}function nc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t={lastEffect:null,stores:null},W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rc(e,t,n,r){t.value=n,t.getSnapshot=r,ic(t)&&oc(e)}function lc(e,t,n){return n(function(){ic(t)&&oc(e)})}function ic(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Be(e,n)}catch{return!0}}function oc(e){var t=et(e,1);t!==null&&$e(t,e,1,-1)}function rs(e){var t=Ve();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ar,lastRenderedState:e},t.queue=e,e=e.dispatch=hp.bind(null,W,e),[t.memoizedState,e]}function cr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=W.updateQueue,t===null?(t={lastEffect:null,stores:null},W.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function uc(){return ze().memoizedState}function Jr(e,t,n,r){var l=Ve();W.flags|=e,l.memoizedState=cr(1|t,n,void 0,r===void 0?null:r)}function Ml(e,t,n,r){var l=ze();r=r===void 0?null:r;var i=void 0;if(Z!==null){var o=Z.memoizedState;if(i=o.destroy,r!==null&&bo(r,o.deps)){l.memoizedState=cr(t,n,i,r);return}}W.flags|=e,l.memoizedState=cr(1|t,n,i,r)}function ls(e,t){return Jr(8390656,8,e,t)}function nu(e,t){return Ml(2048,8,e,t)}function sc(e,t){return Ml(4,2,e,t)}function ac(e,t){return Ml(4,4,e,t)}function cc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fc(e,t,n){return n=n!=null?n.concat([e]):null,Ml(4,4,cc.bind(null,t,e),n)}function ru(){}function dc(e,t){var n=ze();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&bo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pc(e,t){var n=ze();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&bo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function hc(e,t,n){return At&21?(Be(n,t)||(n=xa(),W.lanes|=n,Vt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,me=!0),e.memoizedState=n)}function dp(e,t){var n=M;M=n!==0&&4>n?n:4,e(!0);var r=hi.transition;hi.transition={};try{e(!1),t()}finally{M=n,hi.transition=r}}function mc(){return ze().memoizedState}function pp(e,t,n){var r=gt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vc(e))gc(t,n);else if(n=Za(e,t,n,r),n!==null){var l=fe();$e(n,e,r,l),yc(n,t,r)}}function hp(e,t,n){var r=gt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vc(e))gc(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,u=i(o,n);if(l.hasEagerState=!0,l.eagerState=u,Be(u,o)){var s=t.interleaved;s===null?(l.next=l,Xo(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=Za(e,t,l,r),n!==null&&(l=fe(),$e(n,e,r,l),yc(n,t,r))}}function vc(e){var t=e.alternate;return e===W||t!==null&&t===W}function gc(e,t){Qn=xl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Io(e,n)}}var wl={readContext:Te,useCallback:oe,useContext:oe,useEffect:oe,useImperativeHandle:oe,useInsertionEffect:oe,useLayoutEffect:oe,useMemo:oe,useReducer:oe,useRef:oe,useState:oe,useDebugValue:oe,useDeferredValue:oe,useTransition:oe,useMutableSource:oe,useSyncExternalStore:oe,useId:oe,unstable_isNewReconciler:!1},mp={readContext:Te,useCallback:function(e,t){return Ve().memoizedState=[e,t===void 0?null:t],e},useContext:Te,useEffect:ls,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Jr(4194308,4,cc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Jr(4,2,e,t)},useMemo:function(e,t){var n=Ve();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ve();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=pp.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Ve();return e={current:e},t.memoizedState=e},useState:rs,useDebugValue:ru,useDeferredValue:function(e){return Ve().memoizedState=e},useTransition:function(){var e=rs(!1),t=e[0];return e=dp.bind(null,e[1]),Ve().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=W,l=Ve();if(A){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),te===null)throw Error(E(349));At&30||nc(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,ls(lc.bind(null,r,i,e),[e]),r.flags|=2048,cr(9,rc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ve(),t=te.identifierPrefix;if(A){var n=Je,r=Ge;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=sr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=fp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vp={readContext:Te,useCallback:dc,useContext:Te,useEffect:nu,useImperativeHandle:fc,useInsertionEffect:sc,useLayoutEffect:ac,useMemo:pc,useReducer:mi,useRef:uc,useState:function(){return mi(ar)},useDebugValue:ru,useDeferredValue:function(e){var t=ze();return hc(t,Z.memoizedState,e)},useTransition:function(){var e=mi(ar)[0],t=ze().memoizedState;return[e,t]},useMutableSource:ec,useSyncExternalStore:tc,useId:mc,unstable_isNewReconciler:!1},gp={readContext:Te,useCallback:dc,useContext:Te,useEffect:nu,useImperativeHandle:fc,useInsertionEffect:sc,useLayoutEffect:ac,useMemo:pc,useReducer:vi,useRef:uc,useState:function(){return vi(ar)},useDebugValue:ru,useDeferredValue:function(e){var t=ze();return Z===null?t.memoizedState=e:hc(t,Z.memoizedState,e)},useTransition:function(){var e=vi(ar)[0],t=ze().memoizedState;return[e,t]},useMutableSource:ec,useSyncExternalStore:tc,useId:mc,unstable_isNewReconciler:!1};function Ie(e,t){if(e&&e.defaultProps){t=H({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function bi(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:H({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Dl={isMounted:function(e){return(e=e._reactInternals)?Qt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fe(),l=gt(e),i=Ze(r,l);i.payload=t,n!=null&&(i.callback=n),t=mt(e,i,l),t!==null&&($e(t,e,l,r),Xr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fe(),l=gt(e),i=Ze(r,l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=mt(e,i,l),t!==null&&($e(t,e,l,r),Xr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fe(),r=gt(e),l=Ze(n,r);l.tag=2,t!=null&&(l.callback=t),t=mt(e,l,r),t!==null&&($e(t,e,r,n),Xr(t,e,r))}};function is(e,t,n,r,l,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!nr(n,r)||!nr(l,i):!0}function xc(e,t,n){var r=!1,l=kt,i=t.contextType;return typeof i=="object"&&i!==null?i=Te(i):(l=xe(t)?$t:ae.current,r=t.contextTypes,i=(r=r!=null)?vn(e,l):kt),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Dl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function os(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Dl.enqueueReplaceState(t,t.state,null)}function eo(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Go(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=Te(i):(i=xe(t)?$t:ae.current,l.context=vn(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(bi(e,t,i,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Dl.enqueueReplaceState(l,l.state,null),gl(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function wn(e,t){try{var n="",r=t;do n+=Qf(r),r=r.return;while(r);var l=n}catch(i){l=`
36
+ `),o=l.length-1,u=i.length-1;1<=o&&0<=u&&l[o]!==i[u];)u--;for(;1<=o&&0<=u;o--,u--)if(l[o]!==i[u]){if(o!==1||u!==1)do if(o--,u--,0>u||l[o]!==i[u]){var a=`
37
+ `+l[o].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=o&&0<=u);break}}}finally{gi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zn(e):""}function Qf(e){switch(e.tag){case 5:return Zn(e.type);case 16:return Zn("Lazy");case 13:return Zn("Suspense");case 19:return Zn("SuspenseList");case 0:case 2:case 15:return e=vi(e.type,!1),e;case 11:return e=vi(e.type.render,!1),e;case 1:return e=vi(e.type,!0),e;default:return""}}function Xi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pn:return"Fragment";case fn:return"Portal";case Yi:return"Profiler";case is:return"StrictMode";case Gi:return"Suspense";case Ji:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $u:return(e.displayName||"Context")+".Consumer";case zu:return(e._context.displayName||"Context")+".Provider";case os:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ss:return t=e.displayName||null,t!==null?t:Xi(e.type)||"Memo";case jt:t=e._payload,e=e._init;try{return Xi(e(t))}catch{}}return null}function Yf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Xi(t);case 8:return t===is?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ut(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gf(e){var t=Fu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wr(e){e._valueTracker||(e._valueTracker=Gf(e))}function Bu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Fu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function xl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function qi(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function la(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ut(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Vu(e,t){t=t.checked,t!=null&&ls(e,"checked",t,!1)}function Zi(e,t){Vu(e,t);var n=Ut(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?eo(e,t.type,n):t.hasOwnProperty("defaultValue")&&eo(e,t.type,Ut(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ia(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function eo(e,t,n){(t!=="number"||xl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var er=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ut(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function to(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oa(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(er(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ut(n)}}function Wu(e,t){var n=Ut(t.value),r=Ut(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function sa(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Hu(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function no(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Hu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Hr,Ku=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Hr=Hr||document.createElement("div"),Hr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Hr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function hr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jf=["Webkit","ms","Moz","O"];Object.keys(rr).forEach(function(e){Jf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rr[t]=rr[e]})});function Qu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rr.hasOwnProperty(e)&&rr[e]?(""+t).trim():t+"px"}function Yu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Qu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Xf=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ro(e,t){if(t){if(Xf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function lo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var io=null;function as(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oo=null,En=null,Cn=null;function aa(e){if(e=Dr(e)){if(typeof oo!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Xl(t),oo(e.stateNode,e.type,t))}}function Gu(e){En?Cn?Cn.push(e):Cn=[e]:En=e}function Ju(){if(En){var e=En,t=Cn;if(Cn=En=null,aa(e),t)for(e=0;e<t.length;e++)aa(t[e])}}function Xu(e,t){return e(t)}function qu(){}var yi=!1;function Zu(e,t,n){if(yi)return e(t,n);yi=!0;try{return Xu(e,t,n)}finally{yi=!1,(En!==null||Cn!==null)&&(qu(),Ju())}}function mr(e,t){var n=e.stateNode;if(n===null)return null;var r=Xl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var so=!1;if(ht)try{var Kn={};Object.defineProperty(Kn,"passive",{get:function(){so=!0}}),window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{so=!1}function qf(e,t,n,r,l,i,o,u,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(h){this.onError(h)}}var lr=!1,wl=null,Sl=!1,ao=null,Zf={onError:function(e){lr=!0,wl=e}};function ep(e,t,n,r,l,i,o,u,a){lr=!1,wl=null,qf.apply(Zf,arguments)}function tp(e,t,n,r,l,i,o,u,a){if(ep.apply(this,arguments),lr){if(lr){var c=wl;lr=!1,wl=null}else throw Error(_(198));Sl||(Sl=!0,ao=c)}}function an(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ec(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ua(e){if(an(e)!==e)throw Error(_(188))}function np(e){var t=e.alternate;if(!t){if(t=an(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return ua(l),e;if(i===r)return ua(l),t;i=i.sibling}throw Error(_(188))}if(n.return!==r.return)n=l,r=i;else{for(var o=!1,u=l.child;u;){if(u===n){o=!0,n=l,r=i;break}if(u===r){o=!0,r=l,n=i;break}u=u.sibling}if(!o){for(u=i.child;u;){if(u===n){o=!0,n=i,r=l;break}if(u===r){o=!0,r=i,n=l;break}u=u.sibling}if(!o)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function tc(e){return e=np(e),e!==null?nc(e):null}function nc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=nc(e);if(t!==null)return t;e=e.sibling}return null}var rc=Ie.unstable_scheduleCallback,ca=Ie.unstable_cancelCallback,rp=Ie.unstable_shouldYield,lp=Ie.unstable_requestPaint,q=Ie.unstable_now,ip=Ie.unstable_getCurrentPriorityLevel,us=Ie.unstable_ImmediatePriority,lc=Ie.unstable_UserBlockingPriority,Nl=Ie.unstable_NormalPriority,op=Ie.unstable_LowPriority,ic=Ie.unstable_IdlePriority,Ql=null,it=null;function sp(e){if(it&&typeof it.onCommitFiberRoot=="function")try{it.onCommitFiberRoot(Ql,e,void 0,(e.current.flags&128)===128)}catch{}}var Ge=Math.clz32?Math.clz32:cp,ap=Math.log,up=Math.LN2;function cp(e){return e>>>=0,e===0?32:31-(ap(e)/up|0)|0}var Kr=64,Qr=4194304;function tr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function kl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~l;u!==0?r=tr(u):(i&=o,i!==0&&(r=tr(i)))}else o=n&~l,o!==0?r=tr(o):i!==0&&(r=tr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ge(t),l=1<<n,r|=e[n],t&=~l;return r}function dp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fp(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Ge(i),u=1<<o,a=l[o];a===-1?(!(u&n)||u&r)&&(l[o]=dp(u,t)):a<=t&&(e.expiredLanes|=u),i&=~u}}function uo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function oc(){var e=Kr;return Kr<<=1,!(Kr&4194240)&&(Kr=64),e}function xi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ir(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ge(t),e[t]=n}function pp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Ge(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function cs(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var $=0;function sc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ac,ds,uc,cc,dc,co=!1,Yr=[],Lt=null,Ot=null,bt=null,gr=new Map,vr=new Map,Ct=[],hp="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 submit".split(" ");function da(e,t){switch(e){case"focusin":case"focusout":Lt=null;break;case"dragenter":case"dragleave":Ot=null;break;case"mouseover":case"mouseout":bt=null;break;case"pointerover":case"pointerout":gr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vr.delete(t.pointerId)}}function Qn(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=Dr(t),t!==null&&ds(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function mp(e,t,n,r,l){switch(t){case"focusin":return Lt=Qn(Lt,e,t,n,r,l),!0;case"dragenter":return Ot=Qn(Ot,e,t,n,r,l),!0;case"mouseover":return bt=Qn(bt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return gr.set(i,Qn(gr.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,vr.set(i,Qn(vr.get(i)||null,e,t,n,r,l)),!0}return!1}function fc(e){var t=Jt(e.target);if(t!==null){var n=an(t);if(n!==null){if(t=n.tag,t===13){if(t=ec(n),t!==null){e.blockedOn=t,dc(e.priority,function(){uc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function al(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);io=r,n.target.dispatchEvent(r),io=null}else return t=Dr(n),t!==null&&ds(t),e.blockedOn=n,!1;t.shift()}return!0}function fa(e,t,n){al(e)&&n.delete(t)}function gp(){co=!1,Lt!==null&&al(Lt)&&(Lt=null),Ot!==null&&al(Ot)&&(Ot=null),bt!==null&&al(bt)&&(bt=null),gr.forEach(fa),vr.forEach(fa)}function Yn(e,t){e.blockedOn===t&&(e.blockedOn=null,co||(co=!0,Ie.unstable_scheduleCallback(Ie.unstable_NormalPriority,gp)))}function yr(e){function t(l){return Yn(l,e)}if(0<Yr.length){Yn(Yr[0],e);for(var n=1;n<Yr.length;n++){var r=Yr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Lt!==null&&Yn(Lt,e),Ot!==null&&Yn(Ot,e),bt!==null&&Yn(bt,e),gr.forEach(t),vr.forEach(t),n=0;n<Ct.length;n++)r=Ct[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ct.length&&(n=Ct[0],n.blockedOn===null);)fc(n),n.blockedOn===null&&Ct.shift()}var _n=yt.ReactCurrentBatchConfig,jl=!0;function vp(e,t,n,r){var l=$,i=_n.transition;_n.transition=null;try{$=1,fs(e,t,n,r)}finally{$=l,_n.transition=i}}function yp(e,t,n,r){var l=$,i=_n.transition;_n.transition=null;try{$=4,fs(e,t,n,r)}finally{$=l,_n.transition=i}}function fs(e,t,n,r){if(jl){var l=fo(e,t,n,r);if(l===null)Ri(e,t,r,El,n),da(e,r);else if(mp(l,e,t,n,r))r.stopPropagation();else if(da(e,r),t&4&&-1<hp.indexOf(e)){for(;l!==null;){var i=Dr(l);if(i!==null&&ac(i),i=fo(e,t,n,r),i===null&&Ri(e,t,r,El,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else Ri(e,t,r,null,n)}}var El=null;function fo(e,t,n,r){if(El=null,e=as(r),e=Jt(e),e!==null)if(t=an(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ec(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return El=e,null}function pc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ip()){case us:return 1;case lc:return 4;case Nl:case op:return 16;case ic:return 536870912;default:return 16}default:return 16}}var Pt=null,ps=null,ul=null;function hc(){if(ul)return ul;var e,t=ps,n=t.length,r,l="value"in Pt?Pt.value:Pt.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===l[i-r];r++);return ul=l.slice(e,1<r?1-r:void 0)}function cl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Gr(){return!0}function pa(){return!1}function De(e){function t(n,r,l,i,o){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(i):i[u]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Gr:pa,this.isPropagationStopped=pa,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Gr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gr)},persist:function(){},isPersistent:Gr}),t}var Un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hs=De(Un),Ar=G({},Un,{view:0,detail:0}),xp=De(Ar),wi,Si,Gn,Yl=G({},Ar,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ms,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Gn&&(Gn&&e.type==="mousemove"?(wi=e.screenX-Gn.screenX,Si=e.screenY-Gn.screenY):Si=wi=0,Gn=e),wi)},movementY:function(e){return"movementY"in e?e.movementY:Si}}),ha=De(Yl),wp=G({},Yl,{dataTransfer:0}),Sp=De(wp),Np=G({},Ar,{relatedTarget:0}),Ni=De(Np),kp=G({},Un,{animationName:0,elapsedTime:0,pseudoElement:0}),jp=De(kp),Ep=G({},Un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cp=De(Ep),_p=G({},Un,{data:0}),ma=De(_p),Pp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rp={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"},Tp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Tp[e])?!!t[e]:!1}function ms(){return Lp}var Op=G({},Ar,{key:function(e){if(e.key){var t=Pp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Rp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ms,charCode:function(e){return e.type==="keypress"?cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bp=De(Op),Ip=G({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ga=De(Ip),Ap=G({},Ar,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ms}),Dp=De(Ap),Mp=G({},Un,{propertyName:0,elapsedTime:0,pseudoElement:0}),zp=De(Mp),$p=G({},Yl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Up=De($p),Fp=[9,13,27,32],gs=ht&&"CompositionEvent"in window,ir=null;ht&&"documentMode"in document&&(ir=document.documentMode);var Bp=ht&&"TextEvent"in window&&!ir,mc=ht&&(!gs||ir&&8<ir&&11>=ir),va=" ",ya=!1;function gc(e,t){switch(e){case"keyup":return Fp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hn=!1;function Vp(e,t){switch(e){case"compositionend":return vc(t);case"keypress":return t.which!==32?null:(ya=!0,va);case"textInput":return e=t.data,e===va&&ya?null:e;default:return null}}function Wp(e,t){if(hn)return e==="compositionend"||!gs&&gc(e,t)?(e=hc(),ul=ps=Pt=null,hn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return mc&&t.locale!=="ko"?null:t.data;default:return null}}var Hp={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 xa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hp[e.type]:t==="textarea"}function yc(e,t,n,r){Gu(r),t=Cl(t,"onChange"),0<t.length&&(n=new hs("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var or=null,xr=null;function Kp(e){Rc(e,0)}function Gl(e){var t=vn(e);if(Bu(t))return e}function Qp(e,t){if(e==="change")return t}var xc=!1;if(ht){var ki;if(ht){var ji="oninput"in document;if(!ji){var wa=document.createElement("div");wa.setAttribute("oninput","return;"),ji=typeof wa.oninput=="function"}ki=ji}else ki=!1;xc=ki&&(!document.documentMode||9<document.documentMode)}function Sa(){or&&(or.detachEvent("onpropertychange",wc),xr=or=null)}function wc(e){if(e.propertyName==="value"&&Gl(xr)){var t=[];yc(t,xr,e,as(e)),Zu(Kp,t)}}function Yp(e,t,n){e==="focusin"?(Sa(),or=t,xr=n,or.attachEvent("onpropertychange",wc)):e==="focusout"&&Sa()}function Gp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gl(xr)}function Jp(e,t){if(e==="click")return Gl(t)}function Xp(e,t){if(e==="input"||e==="change")return Gl(t)}function qp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xe=typeof Object.is=="function"?Object.is:qp;function wr(e,t){if(Xe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!Qi.call(t,l)||!Xe(e[l],t[l]))return!1}return!0}function Na(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ka(e,t){var n=Na(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Na(n)}}function Sc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nc(){for(var e=window,t=xl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xl(e.document)}return t}function vs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Zp(e){var t=Nc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Sc(n.ownerDocument.documentElement,n)){if(r!==null&&vs(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=ka(n,i);var o=ka(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var eh=ht&&"documentMode"in document&&11>=document.documentMode,mn=null,po=null,sr=null,ho=!1;function ja(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ho||mn==null||mn!==xl(r)||(r=mn,"selectionStart"in r&&vs(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),sr&&wr(sr,r)||(sr=r,r=Cl(po,"onSelect"),0<r.length&&(t=new hs("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mn)))}function Jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var gn={animationend:Jr("Animation","AnimationEnd"),animationiteration:Jr("Animation","AnimationIteration"),animationstart:Jr("Animation","AnimationStart"),transitionend:Jr("Transition","TransitionEnd")},Ei={},kc={};ht&&(kc=document.createElement("div").style,"AnimationEvent"in window||(delete gn.animationend.animation,delete gn.animationiteration.animation,delete gn.animationstart.animation),"TransitionEvent"in window||delete gn.transitionend.transition);function Jl(e){if(Ei[e])return Ei[e];if(!gn[e])return e;var t=gn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in kc)return Ei[e]=t[n];return e}var jc=Jl("animationend"),Ec=Jl("animationiteration"),Cc=Jl("animationstart"),_c=Jl("transitionend"),Pc=new Map,Ea="abort auxClick 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(" ");function Bt(e,t){Pc.set(e,t),sn(t,[e])}for(var Ci=0;Ci<Ea.length;Ci++){var _i=Ea[Ci],th=_i.toLowerCase(),nh=_i[0].toUpperCase()+_i.slice(1);Bt(th,"on"+nh)}Bt(jc,"onAnimationEnd");Bt(Ec,"onAnimationIteration");Bt(Cc,"onAnimationStart");Bt("dblclick","onDoubleClick");Bt("focusin","onFocus");Bt("focusout","onBlur");Bt(_c,"onTransitionEnd");Tn("onMouseEnter",["mouseout","mouseover"]);Tn("onMouseLeave",["mouseout","mouseover"]);Tn("onPointerEnter",["pointerout","pointerover"]);Tn("onPointerLeave",["pointerout","pointerover"]);sn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));sn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));sn("onBeforeInput",["compositionend","keypress","textInput","paste"]);sn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));sn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));sn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nr="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(" "),rh=new Set("cancel close invalid load scroll toggle".split(" ").concat(nr));function Ca(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,tp(r,t,void 0,e),e.currentTarget=null}function Rc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],a=u.instance,c=u.currentTarget;if(u=u.listener,a!==i&&l.isPropagationStopped())break e;Ca(l,u,c),i=a}else for(o=0;o<r.length;o++){if(u=r[o],a=u.instance,c=u.currentTarget,u=u.listener,a!==i&&l.isPropagationStopped())break e;Ca(l,u,c),i=a}}}if(Sl)throw e=ao,Sl=!1,ao=null,e}function B(e,t){var n=t[xo];n===void 0&&(n=t[xo]=new Set);var r=e+"__bubble";n.has(r)||(Tc(t,e,2,!1),n.add(r))}function Pi(e,t,n){var r=0;t&&(r|=4),Tc(n,e,r,t)}var Xr="_reactListening"+Math.random().toString(36).slice(2);function Sr(e){if(!e[Xr]){e[Xr]=!0,Mu.forEach(function(n){n!=="selectionchange"&&(rh.has(n)||Pi(n,!1,e),Pi(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xr]||(t[Xr]=!0,Pi("selectionchange",!1,t))}}function Tc(e,t,n,r){switch(pc(t)){case 1:var l=vp;break;case 4:l=yp;break;default:l=fs}n=l.bind(null,t,n,e),l=void 0,!so||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Ri(e,t,n,r,l){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var u=r.stateNode.containerInfo;if(u===l||u.nodeType===8&&u.parentNode===l)break;if(o===4)for(o=r.return;o!==null;){var a=o.tag;if((a===3||a===4)&&(a=o.stateNode.containerInfo,a===l||a.nodeType===8&&a.parentNode===l))return;o=o.return}for(;u!==null;){if(o=Jt(u),o===null)return;if(a=o.tag,a===5||a===6){r=i=o;continue e}u=u.parentNode}}r=r.return}Zu(function(){var c=i,h=as(n),f=[];e:{var p=Pc.get(e);if(p!==void 0){var S=hs,w=e;switch(e){case"keypress":if(cl(n)===0)break e;case"keydown":case"keyup":S=bp;break;case"focusin":w="focus",S=Ni;break;case"focusout":w="blur",S=Ni;break;case"beforeblur":case"afterblur":S=Ni;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=ha;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=Sp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=Dp;break;case jc:case Ec:case Cc:S=jp;break;case _c:S=zp;break;case"scroll":S=xp;break;case"wheel":S=Up;break;case"copy":case"cut":case"paste":S=Cp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=ga}var x=(t&4)!==0,E=!x&&e==="scroll",g=x?p!==null?p+"Capture":null:p;x=[];for(var d=c,m;d!==null;){m=d;var y=m.stateNode;if(m.tag===5&&y!==null&&(m=y,g!==null&&(y=mr(d,g),y!=null&&x.push(Nr(d,y,m)))),E)break;d=d.return}0<x.length&&(p=new S(p,w,null,n,h),f.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",p&&n!==io&&(w=n.relatedTarget||n.fromElement)&&(Jt(w)||w[mt]))break e;if((S||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,S?(w=n.relatedTarget||n.toElement,S=c,w=w?Jt(w):null,w!==null&&(E=an(w),w!==E||w.tag!==5&&w.tag!==6)&&(w=null)):(S=null,w=c),S!==w)){if(x=ha,y="onMouseLeave",g="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(x=ga,y="onPointerLeave",g="onPointerEnter",d="pointer"),E=S==null?p:vn(S),m=w==null?p:vn(w),p=new x(y,d+"leave",S,n,h),p.target=E,p.relatedTarget=m,y=null,Jt(h)===c&&(x=new x(g,d+"enter",w,n,h),x.target=m,x.relatedTarget=E,y=x),E=y,S&&w)t:{for(x=S,g=w,d=0,m=x;m;m=cn(m))d++;for(m=0,y=g;y;y=cn(y))m++;for(;0<d-m;)x=cn(x),d--;for(;0<m-d;)g=cn(g),m--;for(;d--;){if(x===g||g!==null&&x===g.alternate)break t;x=cn(x),g=cn(g)}x=null}else x=null;S!==null&&_a(f,p,S,x,!1),w!==null&&E!==null&&_a(f,E,w,x,!0)}}e:{if(p=c?vn(c):window,S=p.nodeName&&p.nodeName.toLowerCase(),S==="select"||S==="input"&&p.type==="file")var j=Qp;else if(xa(p))if(xc)j=Xp;else{j=Gp;var k=Yp}else(S=p.nodeName)&&S.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(j=Jp);if(j&&(j=j(e,c))){yc(f,j,n,h);break e}k&&k(e,p,c),e==="focusout"&&(k=p._wrapperState)&&k.controlled&&p.type==="number"&&eo(p,"number",p.value)}switch(k=c?vn(c):window,e){case"focusin":(xa(k)||k.contentEditable==="true")&&(mn=k,po=c,sr=null);break;case"focusout":sr=po=mn=null;break;case"mousedown":ho=!0;break;case"contextmenu":case"mouseup":case"dragend":ho=!1,ja(f,n,h);break;case"selectionchange":if(eh)break;case"keydown":case"keyup":ja(f,n,h)}var N;if(gs)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else hn?gc(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(mc&&n.locale!=="ko"&&(hn||C!=="onCompositionStart"?C==="onCompositionEnd"&&hn&&(N=hc()):(Pt=h,ps="value"in Pt?Pt.value:Pt.textContent,hn=!0)),k=Cl(c,C),0<k.length&&(C=new ma(C,e,null,n,h),f.push({event:C,listeners:k}),N?C.data=N:(N=vc(n),N!==null&&(C.data=N)))),(N=Bp?Vp(e,n):Wp(e,n))&&(c=Cl(c,"onBeforeInput"),0<c.length&&(h=new ma("onBeforeInput","beforeinput",null,n,h),f.push({event:h,listeners:c}),h.data=N))}Rc(f,t)})}function Nr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Cl(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=mr(e,n),i!=null&&r.unshift(Nr(e,i,l)),i=mr(e,t),i!=null&&r.push(Nr(e,i,l))),e=e.return}return r}function cn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function _a(e,t,n,r,l){for(var i=t._reactName,o=[];n!==null&&n!==r;){var u=n,a=u.alternate,c=u.stateNode;if(a!==null&&a===r)break;u.tag===5&&c!==null&&(u=c,l?(a=mr(n,i),a!=null&&o.unshift(Nr(n,a,u))):l||(a=mr(n,i),a!=null&&o.push(Nr(n,a,u)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var lh=/\r\n?/g,ih=/\u0000|\uFFFD/g;function Pa(e){return(typeof e=="string"?e:""+e).replace(lh,`
38
+ `).replace(ih,"")}function qr(e,t,n){if(t=Pa(t),Pa(e)!==t&&n)throw Error(_(425))}function _l(){}var mo=null,go=null;function vo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var yo=typeof setTimeout=="function"?setTimeout:void 0,oh=typeof clearTimeout=="function"?clearTimeout:void 0,Ra=typeof Promise=="function"?Promise:void 0,sh=typeof queueMicrotask=="function"?queueMicrotask:typeof Ra<"u"?function(e){return Ra.resolve(null).then(e).catch(ah)}:yo;function ah(e){setTimeout(function(){throw e})}function Ti(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),yr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);yr(t)}function It(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ta(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Fn=Math.random().toString(36).slice(2),rt="__reactFiber$"+Fn,kr="__reactProps$"+Fn,mt="__reactContainer$"+Fn,xo="__reactEvents$"+Fn,uh="__reactListeners$"+Fn,ch="__reactHandles$"+Fn;function Jt(e){var t=e[rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mt]||n[rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ta(e);e!==null;){if(n=e[rt])return n;e=Ta(e)}return t}e=n,n=e.parentNode}return null}function Dr(e){return e=e[rt]||e[mt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function vn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function Xl(e){return e[kr]||null}var wo=[],yn=-1;function Vt(e){return{current:e}}function V(e){0>yn||(e.current=wo[yn],wo[yn]=null,yn--)}function F(e,t){yn++,wo[yn]=e.current,e.current=t}var Ft={},ye=Vt(Ft),Pe=Vt(!1),tn=Ft;function Ln(e,t){var n=e.type.contextTypes;if(!n)return Ft;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Re(e){return e=e.childContextTypes,e!=null}function Pl(){V(Pe),V(ye)}function La(e,t,n){if(ye.current!==Ft)throw Error(_(168));F(ye,t),F(Pe,n)}function Lc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(_(108,Yf(e)||"Unknown",l));return G({},n,r)}function Rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ft,tn=ye.current,F(ye,e),F(Pe,Pe.current),!0}function Oa(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Lc(e,t,tn),r.__reactInternalMemoizedMergedChildContext=e,V(Pe),V(ye),F(ye,e)):V(Pe),F(Pe,n)}var ut=null,ql=!1,Li=!1;function Oc(e){ut===null?ut=[e]:ut.push(e)}function dh(e){ql=!0,Oc(e)}function Wt(){if(!Li&&ut!==null){Li=!0;var e=0,t=$;try{var n=ut;for($=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ut=null,ql=!1}catch(l){throw ut!==null&&(ut=ut.slice(e+1)),rc(us,Wt),l}finally{$=t,Li=!1}}return null}var xn=[],wn=0,Tl=null,Ll=0,ze=[],$e=0,nn=null,ct=1,dt="";function Yt(e,t){xn[wn++]=Ll,xn[wn++]=Tl,Tl=e,Ll=t}function bc(e,t,n){ze[$e++]=ct,ze[$e++]=dt,ze[$e++]=nn,nn=e;var r=ct;e=dt;var l=32-Ge(r)-1;r&=~(1<<l),n+=1;var i=32-Ge(t)+l;if(30<i){var o=l-l%5;i=(r&(1<<o)-1).toString(32),r>>=o,l-=o,ct=1<<32-Ge(t)+l|n<<l|r,dt=i+e}else ct=1<<i|n<<l|r,dt=e}function ys(e){e.return!==null&&(Yt(e,1),bc(e,1,0))}function xs(e){for(;e===Tl;)Tl=xn[--wn],xn[wn]=null,Ll=xn[--wn],xn[wn]=null;for(;e===nn;)nn=ze[--$e],ze[$e]=null,dt=ze[--$e],ze[$e]=null,ct=ze[--$e],ze[$e]=null}var be=null,Oe=null,K=!1,Ye=null;function Ic(e,t){var n=Ue(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ba(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,be=e,Oe=It(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,be=e,Oe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=nn!==null?{id:ct,overflow:dt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ue(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,be=e,Oe=null,!0):!1;default:return!1}}function So(e){return(e.mode&1)!==0&&(e.flags&128)===0}function No(e){if(K){var t=Oe;if(t){var n=t;if(!ba(e,t)){if(So(e))throw Error(_(418));t=It(n.nextSibling);var r=be;t&&ba(e,t)?Ic(r,n):(e.flags=e.flags&-4097|2,K=!1,be=e)}}else{if(So(e))throw Error(_(418));e.flags=e.flags&-4097|2,K=!1,be=e}}}function Ia(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;be=e}function Zr(e){if(e!==be)return!1;if(!K)return Ia(e),K=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vo(e.type,e.memoizedProps)),t&&(t=Oe)){if(So(e))throw Ac(),Error(_(418));for(;t;)Ic(e,t),t=It(t.nextSibling)}if(Ia(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Oe=It(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Oe=null}}else Oe=be?It(e.stateNode.nextSibling):null;return!0}function Ac(){for(var e=Oe;e;)e=It(e.nextSibling)}function On(){Oe=be=null,K=!1}function ws(e){Ye===null?Ye=[e]:Ye.push(e)}var fh=yt.ReactCurrentBatchConfig;function Jn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var l=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var u=l.refs;o===null?delete u[i]:u[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function el(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Aa(e){var t=e._init;return t(e._payload)}function Dc(e){function t(g,d){if(e){var m=g.deletions;m===null?(g.deletions=[d],g.flags|=16):m.push(d)}}function n(g,d){if(!e)return null;for(;d!==null;)t(g,d),d=d.sibling;return null}function r(g,d){for(g=new Map;d!==null;)d.key!==null?g.set(d.key,d):g.set(d.index,d),d=d.sibling;return g}function l(g,d){return g=zt(g,d),g.index=0,g.sibling=null,g}function i(g,d,m){return g.index=m,e?(m=g.alternate,m!==null?(m=m.index,m<d?(g.flags|=2,d):m):(g.flags|=2,d)):(g.flags|=1048576,d)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function u(g,d,m,y){return d===null||d.tag!==6?(d=zi(m,g.mode,y),d.return=g,d):(d=l(d,m),d.return=g,d)}function a(g,d,m,y){var j=m.type;return j===pn?h(g,d,m.props.children,y,m.key):d!==null&&(d.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===jt&&Aa(j)===d.type)?(y=l(d,m.props),y.ref=Jn(g,d,m),y.return=g,y):(y=vl(m.type,m.key,m.props,null,g.mode,y),y.ref=Jn(g,d,m),y.return=g,y)}function c(g,d,m,y){return d===null||d.tag!==4||d.stateNode.containerInfo!==m.containerInfo||d.stateNode.implementation!==m.implementation?(d=$i(m,g.mode,y),d.return=g,d):(d=l(d,m.children||[]),d.return=g,d)}function h(g,d,m,y,j){return d===null||d.tag!==7?(d=en(m,g.mode,y,j),d.return=g,d):(d=l(d,m),d.return=g,d)}function f(g,d,m){if(typeof d=="string"&&d!==""||typeof d=="number")return d=zi(""+d,g.mode,m),d.return=g,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case Vr:return m=vl(d.type,d.key,d.props,null,g.mode,m),m.ref=Jn(g,null,d),m.return=g,m;case fn:return d=$i(d,g.mode,m),d.return=g,d;case jt:var y=d._init;return f(g,y(d._payload),m)}if(er(d)||Hn(d))return d=en(d,g.mode,m,null),d.return=g,d;el(g,d)}return null}function p(g,d,m,y){var j=d!==null?d.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return j!==null?null:u(g,d,""+m,y);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Vr:return m.key===j?a(g,d,m,y):null;case fn:return m.key===j?c(g,d,m,y):null;case jt:return j=m._init,p(g,d,j(m._payload),y)}if(er(m)||Hn(m))return j!==null?null:h(g,d,m,y,null);el(g,m)}return null}function S(g,d,m,y,j){if(typeof y=="string"&&y!==""||typeof y=="number")return g=g.get(m)||null,u(d,g,""+y,j);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Vr:return g=g.get(y.key===null?m:y.key)||null,a(d,g,y,j);case fn:return g=g.get(y.key===null?m:y.key)||null,c(d,g,y,j);case jt:var k=y._init;return S(g,d,m,k(y._payload),j)}if(er(y)||Hn(y))return g=g.get(m)||null,h(d,g,y,j,null);el(d,y)}return null}function w(g,d,m,y){for(var j=null,k=null,N=d,C=d=0,I=null;N!==null&&C<m.length;C++){N.index>C?(I=N,N=null):I=N.sibling;var L=p(g,N,m[C],y);if(L===null){N===null&&(N=I);break}e&&N&&L.alternate===null&&t(g,N),d=i(L,d,C),k===null?j=L:k.sibling=L,k=L,N=I}if(C===m.length)return n(g,N),K&&Yt(g,C),j;if(N===null){for(;C<m.length;C++)N=f(g,m[C],y),N!==null&&(d=i(N,d,C),k===null?j=N:k.sibling=N,k=N);return K&&Yt(g,C),j}for(N=r(g,N);C<m.length;C++)I=S(N,g,C,m[C],y),I!==null&&(e&&I.alternate!==null&&N.delete(I.key===null?C:I.key),d=i(I,d,C),k===null?j=I:k.sibling=I,k=I);return e&&N.forEach(function(b){return t(g,b)}),K&&Yt(g,C),j}function x(g,d,m,y){var j=Hn(m);if(typeof j!="function")throw Error(_(150));if(m=j.call(m),m==null)throw Error(_(151));for(var k=j=null,N=d,C=d=0,I=null,L=m.next();N!==null&&!L.done;C++,L=m.next()){N.index>C?(I=N,N=null):I=N.sibling;var b=p(g,N,L.value,y);if(b===null){N===null&&(N=I);break}e&&N&&b.alternate===null&&t(g,N),d=i(b,d,C),k===null?j=b:k.sibling=b,k=b,N=I}if(L.done)return n(g,N),K&&Yt(g,C),j;if(N===null){for(;!L.done;C++,L=m.next())L=f(g,L.value,y),L!==null&&(d=i(L,d,C),k===null?j=L:k.sibling=L,k=L);return K&&Yt(g,C),j}for(N=r(g,N);!L.done;C++,L=m.next())L=S(N,g,C,L.value,y),L!==null&&(e&&L.alternate!==null&&N.delete(L.key===null?C:L.key),d=i(L,d,C),k===null?j=L:k.sibling=L,k=L);return e&&N.forEach(function(ee){return t(g,ee)}),K&&Yt(g,C),j}function E(g,d,m,y){if(typeof m=="object"&&m!==null&&m.type===pn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Vr:e:{for(var j=m.key,k=d;k!==null;){if(k.key===j){if(j=m.type,j===pn){if(k.tag===7){n(g,k.sibling),d=l(k,m.props.children),d.return=g,g=d;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===jt&&Aa(j)===k.type){n(g,k.sibling),d=l(k,m.props),d.ref=Jn(g,k,m),d.return=g,g=d;break e}n(g,k);break}else t(g,k);k=k.sibling}m.type===pn?(d=en(m.props.children,g.mode,y,m.key),d.return=g,g=d):(y=vl(m.type,m.key,m.props,null,g.mode,y),y.ref=Jn(g,d,m),y.return=g,g=y)}return o(g);case fn:e:{for(k=m.key;d!==null;){if(d.key===k)if(d.tag===4&&d.stateNode.containerInfo===m.containerInfo&&d.stateNode.implementation===m.implementation){n(g,d.sibling),d=l(d,m.children||[]),d.return=g,g=d;break e}else{n(g,d);break}else t(g,d);d=d.sibling}d=$i(m,g.mode,y),d.return=g,g=d}return o(g);case jt:return k=m._init,E(g,d,k(m._payload),y)}if(er(m))return w(g,d,m,y);if(Hn(m))return x(g,d,m,y);el(g,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,d!==null&&d.tag===6?(n(g,d.sibling),d=l(d,m),d.return=g,g=d):(n(g,d),d=zi(m,g.mode,y),d.return=g,g=d),o(g)):n(g,d)}return E}var bn=Dc(!0),Mc=Dc(!1),Ol=Vt(null),bl=null,Sn=null,Ss=null;function Ns(){Ss=Sn=bl=null}function ks(e){var t=Ol.current;V(Ol),e._currentValue=t}function ko(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Pn(e,t){bl=e,Ss=Sn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_e=!0),e.firstContext=null)}function Ve(e){var t=e._currentValue;if(Ss!==e)if(e={context:e,memoizedValue:t,next:null},Sn===null){if(bl===null)throw Error(_(308));Sn=e,bl.dependencies={lanes:0,firstContext:e}}else Sn=Sn.next=e;return t}var Xt=null;function js(e){Xt===null?Xt=[e]:Xt.push(e)}function zc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,js(t)):(n.next=l.next,l.next=n),t.interleaved=n,gt(e,r)}function gt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Et=!1;function Es(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $c(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function At(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,gt(e,n)}return l=r.interleaved,l===null?(t.next=t,js(r)):(t.next=l.next,l.next=t),r.interleaved=t,gt(e,n)}function dl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cs(e,n)}}function Da(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Il(e,t,n,r){var l=e.updateQueue;Et=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var a=u,c=a.next;a.next=null,o===null?i=c:o.next=c,o=a;var h=e.alternate;h!==null&&(h=h.updateQueue,u=h.lastBaseUpdate,u!==o&&(u===null?h.firstBaseUpdate=c:u.next=c,h.lastBaseUpdate=a))}if(i!==null){var f=l.baseState;o=0,h=c=a=null,u=i;do{var p=u.lane,S=u.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:S,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var w=e,x=u;switch(p=t,S=n,x.tag){case 1:if(w=x.payload,typeof w=="function"){f=w.call(S,f,p);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=x.payload,p=typeof w=="function"?w.call(S,f,p):w,p==null)break e;f=G({},f,p);break e;case 2:Et=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[u]:p.push(u))}else S={eventTime:S,lane:p,tag:u.tag,payload:u.payload,callback:u.callback,next:null},h===null?(c=h=S,a=f):h=h.next=S,o|=p;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;p=u,u=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(h===null&&(a=f),l.baseState=a,l.firstBaseUpdate=c,l.lastBaseUpdate=h,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);ln|=o,e.lanes=o,e.memoizedState=f}}function Ma(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(_(191,l));l.call(r)}}}var Mr={},ot=Vt(Mr),jr=Vt(Mr),Er=Vt(Mr);function qt(e){if(e===Mr)throw Error(_(174));return e}function Cs(e,t){switch(F(Er,t),F(jr,e),F(ot,Mr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:no(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=no(t,e)}V(ot),F(ot,t)}function In(){V(ot),V(jr),V(Er)}function Uc(e){qt(Er.current);var t=qt(ot.current),n=no(t,e.type);t!==n&&(F(jr,e),F(ot,n))}function _s(e){jr.current===e&&(V(ot),V(jr))}var Q=Vt(0);function Al(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Oi=[];function Ps(){for(var e=0;e<Oi.length;e++)Oi[e]._workInProgressVersionPrimary=null;Oi.length=0}var fl=yt.ReactCurrentDispatcher,bi=yt.ReactCurrentBatchConfig,rn=0,Y=null,ne=null,oe=null,Dl=!1,ar=!1,Cr=0,ph=0;function me(){throw Error(_(321))}function Rs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xe(e[n],t[n]))return!1;return!0}function Ts(e,t,n,r,l,i){if(rn=i,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fl.current=e===null||e.memoizedState===null?vh:yh,e=n(r,l),ar){i=0;do{if(ar=!1,Cr=0,25<=i)throw Error(_(301));i+=1,oe=ne=null,t.updateQueue=null,fl.current=xh,e=n(r,l)}while(ar)}if(fl.current=Ml,t=ne!==null&&ne.next!==null,rn=0,oe=ne=Y=null,Dl=!1,t)throw Error(_(300));return e}function Ls(){var e=Cr!==0;return Cr=0,e}function tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oe===null?Y.memoizedState=oe=e:oe=oe.next=e,oe}function We(){if(ne===null){var e=Y.alternate;e=e!==null?e.memoizedState:null}else e=ne.next;var t=oe===null?Y.memoizedState:oe.next;if(t!==null)oe=t,ne=e;else{if(e===null)throw Error(_(310));ne=e,e={memoizedState:ne.memoizedState,baseState:ne.baseState,baseQueue:ne.baseQueue,queue:ne.queue,next:null},oe===null?Y.memoizedState=oe=e:oe=oe.next=e}return oe}function _r(e,t){return typeof t=="function"?t(e):t}function Ii(e){var t=We(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=ne,l=r.baseQueue,i=n.pending;if(i!==null){if(l!==null){var o=l.next;l.next=i.next,i.next=o}r.baseQueue=l=i,n.pending=null}if(l!==null){i=l.next,r=r.baseState;var u=o=null,a=null,c=i;do{var h=c.lane;if((rn&h)===h)a!==null&&(a=a.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(u=a=f,o=r):a=a.next=f,Y.lanes|=h,ln|=h}c=c.next}while(c!==null&&c!==i);a===null?o=r:a.next=u,Xe(r,t.memoizedState)||(_e=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do i=l.lane,Y.lanes|=i,ln|=i,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ai(e){var t=We(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var o=l=l.next;do i=e(i,o.action),o=o.next;while(o!==l);Xe(i,t.memoizedState)||(_e=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Fc(){}function Bc(e,t){var n=Y,r=We(),l=t(),i=!Xe(r.memoizedState,l);if(i&&(r.memoizedState=l,_e=!0),r=r.queue,Os(Hc.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||oe!==null&&oe.memoizedState.tag&1){if(n.flags|=2048,Pr(9,Wc.bind(null,n,r,l,t),void 0,null),ae===null)throw Error(_(349));rn&30||Vc(n,t,l)}return l}function Vc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Y.updateQueue,t===null?(t={lastEffect:null,stores:null},Y.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wc(e,t,n,r){t.value=n,t.getSnapshot=r,Kc(t)&&Qc(e)}function Hc(e,t,n){return n(function(){Kc(t)&&Qc(e)})}function Kc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xe(e,n)}catch{return!0}}function Qc(e){var t=gt(e,1);t!==null&&Je(t,e,1,-1)}function za(e){var t=tt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:e},t.queue=e,e=e.dispatch=gh.bind(null,Y,e),[t.memoizedState,e]}function Pr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Y.updateQueue,t===null?(t={lastEffect:null,stores:null},Y.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Yc(){return We().memoizedState}function pl(e,t,n,r){var l=tt();Y.flags|=e,l.memoizedState=Pr(1|t,n,void 0,r===void 0?null:r)}function Zl(e,t,n,r){var l=We();r=r===void 0?null:r;var i=void 0;if(ne!==null){var o=ne.memoizedState;if(i=o.destroy,r!==null&&Rs(r,o.deps)){l.memoizedState=Pr(t,n,i,r);return}}Y.flags|=e,l.memoizedState=Pr(1|t,n,i,r)}function $a(e,t){return pl(8390656,8,e,t)}function Os(e,t){return Zl(2048,8,e,t)}function Gc(e,t){return Zl(4,2,e,t)}function Jc(e,t){return Zl(4,4,e,t)}function Xc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function qc(e,t,n){return n=n!=null?n.concat([e]):null,Zl(4,4,Xc.bind(null,t,e),n)}function bs(){}function Zc(e,t){var n=We();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ed(e,t){var n=We();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function td(e,t,n){return rn&21?(Xe(n,t)||(n=oc(),Y.lanes|=n,ln|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,_e=!0),e.memoizedState=n)}function hh(e,t){var n=$;$=n!==0&&4>n?n:4,e(!0);var r=bi.transition;bi.transition={};try{e(!1),t()}finally{$=n,bi.transition=r}}function nd(){return We().memoizedState}function mh(e,t,n){var r=Mt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rd(e))ld(t,n);else if(n=zc(e,t,n,r),n!==null){var l=Ne();Je(n,e,r,l),id(n,t,r)}}function gh(e,t,n){var r=Mt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rd(e))ld(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,u=i(o,n);if(l.hasEagerState=!0,l.eagerState=u,Xe(u,o)){var a=t.interleaved;a===null?(l.next=l,js(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=zc(e,t,l,r),n!==null&&(l=Ne(),Je(n,e,r,l),id(n,t,r))}}function rd(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function ld(e,t){ar=Dl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function id(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cs(e,n)}}var Ml={readContext:Ve,useCallback:me,useContext:me,useEffect:me,useImperativeHandle:me,useInsertionEffect:me,useLayoutEffect:me,useMemo:me,useReducer:me,useRef:me,useState:me,useDebugValue:me,useDeferredValue:me,useTransition:me,useMutableSource:me,useSyncExternalStore:me,useId:me,unstable_isNewReconciler:!1},vh={readContext:Ve,useCallback:function(e,t){return tt().memoizedState=[e,t===void 0?null:t],e},useContext:Ve,useEffect:$a,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,pl(4194308,4,Xc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return pl(4194308,4,e,t)},useInsertionEffect:function(e,t){return pl(4,2,e,t)},useMemo:function(e,t){var n=tt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=tt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mh.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=tt();return e={current:e},t.memoizedState=e},useState:za,useDebugValue:bs,useDeferredValue:function(e){return tt().memoizedState=e},useTransition:function(){var e=za(!1),t=e[0];return e=hh.bind(null,e[1]),tt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,l=tt();if(K){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),ae===null)throw Error(_(349));rn&30||Vc(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,$a(Hc.bind(null,r,i,e),[e]),r.flags|=2048,Pr(9,Wc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=tt(),t=ae.identifierPrefix;if(K){var n=dt,r=ct;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Cr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=ph++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},yh={readContext:Ve,useCallback:Zc,useContext:Ve,useEffect:Os,useImperativeHandle:qc,useInsertionEffect:Gc,useLayoutEffect:Jc,useMemo:ed,useReducer:Ii,useRef:Yc,useState:function(){return Ii(_r)},useDebugValue:bs,useDeferredValue:function(e){var t=We();return td(t,ne.memoizedState,e)},useTransition:function(){var e=Ii(_r)[0],t=We().memoizedState;return[e,t]},useMutableSource:Fc,useSyncExternalStore:Bc,useId:nd,unstable_isNewReconciler:!1},xh={readContext:Ve,useCallback:Zc,useContext:Ve,useEffect:Os,useImperativeHandle:qc,useInsertionEffect:Gc,useLayoutEffect:Jc,useMemo:ed,useReducer:Ai,useRef:Yc,useState:function(){return Ai(_r)},useDebugValue:bs,useDeferredValue:function(e){var t=We();return ne===null?t.memoizedState=e:td(t,ne.memoizedState,e)},useTransition:function(){var e=Ai(_r)[0],t=We().memoizedState;return[e,t]},useMutableSource:Fc,useSyncExternalStore:Bc,useId:nd,unstable_isNewReconciler:!1};function Ke(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function jo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ei={isMounted:function(e){return(e=e._reactInternals)?an(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ne(),l=Mt(e),i=ft(r,l);i.payload=t,n!=null&&(i.callback=n),t=At(e,i,l),t!==null&&(Je(t,e,l,r),dl(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ne(),l=Mt(e),i=ft(r,l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=At(e,i,l),t!==null&&(Je(t,e,l,r),dl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ne(),r=Mt(e),l=ft(n,r);l.tag=2,t!=null&&(l.callback=t),t=At(e,l,r),t!==null&&(Je(t,e,r,n),dl(t,e,r))}};function Ua(e,t,n,r,l,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!wr(n,r)||!wr(l,i):!0}function od(e,t,n){var r=!1,l=Ft,i=t.contextType;return typeof i=="object"&&i!==null?i=Ve(i):(l=Re(t)?tn:ye.current,r=t.contextTypes,i=(r=r!=null)?Ln(e,l):Ft),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ei,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function Fa(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ei.enqueueReplaceState(t,t.state,null)}function Eo(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Es(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=Ve(i):(i=Re(t)?tn:ye.current,l.context=Ln(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(jo(e,t,i,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&ei.enqueueReplaceState(l,l.state,null),Il(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function An(e,t){try{var n="",r=t;do n+=Qf(r),r=r.return;while(r);var l=n}catch(i){l=`
39
39
  Error generating stack: `+i.message+`
40
- `+i.stack}return{value:e,source:t,stack:l,digest:null}}function gi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function to(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var yp=typeof WeakMap=="function"?WeakMap:Map;function wc(e,t,n){n=Ze(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){kl||(kl=!0,fo=r),to(e,t)},n}function Sc(e,t,n){n=Ze(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){to(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){to(e,t),typeof r!="function"&&(vt===null?vt=new Set([this]):vt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function us(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new yp;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=zp.bind(null,e,t,n),t.then(e,e))}function ss(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function as(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ze(-1,1),t.tag=2,mt(n,t,1))),n.lanes|=1),e)}var xp=nt.ReactCurrentOwner,me=!1;function ce(e,t,n,r){t.child=e===null?Ja(t,null,n,r):yn(t,e.child,n,r)}function cs(e,t,n,r,l){n=n.render;var i=t.ref;return pn(t,l),r=eu(e,t,n,r,i,l),n=tu(),e!==null&&!me?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,tt(e,t,l)):(A&&n&&Vo(t),t.flags|=1,ce(e,t,r,l),t.child)}function fs(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!fu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,kc(e,t,i,r,l)):(e=el(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:nr,n(o,r)&&e.ref===t.ref)return tt(e,t,l)}return t.flags|=1,e=yt(i,r),e.ref=t.ref,e.return=t,t.child=e}function kc(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(nr(i,r)&&e.ref===t.ref)if(me=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(me=!0);else return t.lanes=e.lanes,tt(e,t,l)}return no(e,t,n,r,l)}function Ec(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},U(sn,Se),Se|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,U(sn,Se),Se|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,U(sn,Se),Se|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,U(sn,Se),Se|=r;return ce(e,t,l,n),t.child}function Cc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function no(e,t,n,r,l){var i=xe(n)?$t:ae.current;return i=vn(t,i),pn(t,l),n=eu(e,t,n,r,i,l),r=tu(),e!==null&&!me?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,tt(e,t,l)):(A&&r&&Vo(t),t.flags|=1,ce(e,t,n,l),t.child)}function ds(e,t,n,r,l){if(xe(n)){var i=!0;dl(t)}else i=!1;if(pn(t,l),t.stateNode===null)Zr(e,t),xc(t,n,r),eo(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Te(c):(c=xe(n)?$t:ae.current,c=vn(t,c));var m=n.getDerivedStateFromProps,d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||s!==c)&&os(t,o,r,c),it=!1;var h=t.memoizedState;o.state=h,gl(t,r,o,l),s=t.memoizedState,u!==r||h!==s||ye.current||it?(typeof m=="function"&&(bi(t,n,m,r),s=t.memoizedState),(u=it||is(t,n,u,r,h,s,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=c,r=u):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,qa(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:Ie(t.type,u),o.props=c,d=t.pendingProps,h=o.context,s=n.contextType,typeof s=="object"&&s!==null?s=Te(s):(s=xe(n)?$t:ae.current,s=vn(t,s));var y=n.getDerivedStateFromProps;(m=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==d||h!==s)&&os(t,o,r,s),it=!1,h=t.memoizedState,o.state=h,gl(t,r,o,l);var w=t.memoizedState;u!==d||h!==w||ye.current||it?(typeof y=="function"&&(bi(t,n,y,r),w=t.memoizedState),(c=it||is(t,n,c,r,h,w,s)||!1)?(m||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,s),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,s)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=s,r=c):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return ro(e,t,n,r,i,l)}function ro(e,t,n,r,l,i){Cc(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return l&&Zu(t,n,!1),tt(e,t,i);r=t.stateNode,xp.current=t;var u=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=yn(t,e.child,null,i),t.child=yn(t,null,u,i)):ce(e,t,u,i),t.memoizedState=r.state,l&&Zu(t,n,!0),t.child}function Nc(e){var t=e.stateNode;t.pendingContext?Ju(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ju(e,t.context,!1),Jo(e,t.containerInfo)}function ps(e,t,n,r,l){return gn(),Ho(l),t.flags|=256,ce(e,t,n,r),t.child}var lo={dehydrated:null,treeContext:null,retryLane:0};function io(e){return{baseLanes:e,cachePool:null,transitions:null}}function jc(e,t,n){var r=t.pendingProps,l=V.current,i=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),U(V,l&1),e===null)return Zi(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=$l(o,r,0,null),e=Ut(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=io(n),t.memoizedState=lo,e):lu(t,o));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return wp(e,t,o,r,u,l,n);if(i){i=r.fallback,o=t.mode,l=e.child,u=l.sibling;var s={mode:"hidden",children:r.children};return!(o&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=yt(l,s),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?i=yt(u,i):(i=Ut(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?io(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=lo,r}return i=e.child,e=i.sibling,r=yt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function lu(e,t){return t=$l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ur(e,t,n,r){return r!==null&&Ho(r),yn(t,e.child,null,n),e=lu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wp(e,t,n,r,l,i,o){if(n)return t.flags&256?(t.flags&=-257,r=gi(Error(E(422))),Ur(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=$l({mode:"visible",children:r.children},l,0,null),i=Ut(i,l,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&yn(t,e.child,null,o),t.child.memoizedState=io(o),t.memoizedState=lo,i);if(!(t.mode&1))return Ur(e,t,o,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,i=Error(E(419)),r=gi(i,r,void 0),Ur(e,t,o,r)}if(u=(o&e.childLanes)!==0,me||u){if(r=te,r!==null){switch(o&-o){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|o)?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,et(e,l),$e(r,e,l,-1))}return cu(),r=gi(Error(E(421))),Ur(e,t,o,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Op.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,ke=ht(l.nextSibling),Ee=t,A=!0,De=null,e!==null&&(Pe[_e++]=Ge,Pe[_e++]=Je,Pe[_e++]=Bt,Ge=e.id,Je=e.overflow,Bt=t),t=lu(t,r.children),t.flags|=4096,t)}function hs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function yi(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function Pc(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(ce(e,t,r.children,n),r=V.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hs(e,n,t);else if(e.tag===19)hs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(U(V,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&yl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),yi(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&yl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}yi(t,!0,n,null,i);break;case"together":yi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Zr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Vt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=yt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=yt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sp(e,t,n){switch(t.tag){case 3:Nc(t),gn();break;case 5:ba(t);break;case 1:xe(t.type)&&dl(t);break;case 4:Jo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;U(ml,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(U(V,V.current&1),t.flags|=128,null):n&t.child.childLanes?jc(e,t,n):(U(V,V.current&1),e=tt(e,t,n),e!==null?e.sibling:null);U(V,V.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Pc(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),U(V,V.current),r)break;return null;case 22:case 23:return t.lanes=0,Ec(e,t,n)}return tt(e,t,n)}var _c,oo,Lc,Rc;_c=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};oo=function(){};Lc=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Dt(Ke.current);var i=null;switch(n){case"input":l=_i(e,l),r=_i(e,r),i=[];break;case"select":l=H({},l,{value:void 0}),r=H({},r,{value:void 0}),i=[];break;case"textarea":l=Ti(e,l),r=Ti(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=cl)}Oi(n,r);var o;n=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var u=l[c];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Gn.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var s=r[c];if(u=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&s!==u&&(s!=null||u!=null))if(c==="style")if(u){for(o in u)!u.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in s)s.hasOwnProperty(o)&&u[o]!==s[o]&&(n||(n={}),n[o]=s[o])}else n||(i||(i=[]),i.push(c,n)),n=s;else c==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(i=i||[]).push(c,s)):c==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(c,""+s):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Gn.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&$("scroll",e),i||u===s||(i=[])):(i=i||[]).push(c,s))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Rc=function(e,t,n,r){n!==r&&(t.flags|=4)};function In(e,t){if(!A)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function kp(e,t,n){var r=t.pendingProps;switch(Wo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ue(t),null;case 1:return xe(t.type)&&fl(),ue(t),null;case 3:return r=t.stateNode,xn(),B(ye),B(ae),qo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Dr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,De!==null&&(mo(De),De=null))),oo(e,t),ue(t),null;case 5:Zo(t);var l=Dt(ur.current);if(n=t.type,e!==null&&t.stateNode!=null)Lc(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return ue(t),null}if(e=Dt(Ke.current),Dr(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[We]=t,r[ir]=i,e=(t.mode&1)!==0,n){case"dialog":$("cancel",r),$("close",r);break;case"iframe":case"object":case"embed":$("load",r);break;case"video":case"audio":for(l=0;l<$n.length;l++)$($n[l],r);break;case"source":$("error",r);break;case"img":case"image":case"link":$("error",r),$("load",r);break;case"details":$("toggle",r);break;case"input":Eu(r,i),$("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},$("invalid",r);break;case"textarea":Nu(r,i),$("invalid",r)}Oi(n,i),l=null;for(var o in i)if(i.hasOwnProperty(o)){var u=i[o];o==="children"?typeof u=="string"?r.textContent!==u&&(i.suppressHydrationWarning!==!0&&Mr(r.textContent,u,e),l=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&Mr(r.textContent,u,e),l=["children",""+u]):Gn.hasOwnProperty(o)&&u!=null&&o==="onScroll"&&$("scroll",r)}switch(n){case"input":Pr(r),Cu(r,i,!0);break;case"textarea":Pr(r),ju(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=cl)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=la(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[We]=t,e[ir]=r,_c(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ii(n,r),n){case"dialog":$("cancel",e),$("close",e),l=r;break;case"iframe":case"object":case"embed":$("load",e),l=r;break;case"video":case"audio":for(l=0;l<$n.length;l++)$($n[l],e);l=r;break;case"source":$("error",e),l=r;break;case"img":case"image":case"link":$("error",e),$("load",e),l=r;break;case"details":$("toggle",e),l=r;break;case"input":Eu(e,r),l=_i(e,r),$("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=H({},r,{value:void 0}),$("invalid",e);break;case"textarea":Nu(e,r),l=Ti(e,r),$("invalid",e);break;default:l=r}Oi(n,l),u=l;for(i in u)if(u.hasOwnProperty(i)){var s=u[i];i==="style"?ua(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&ia(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&Jn(e,s):typeof s=="number"&&Jn(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Gn.hasOwnProperty(i)?s!=null&&i==="onScroll"&&$("scroll",e):s!=null&&_o(e,i,s,o))}switch(n){case"input":Pr(e),Cu(e,r,!1);break;case"textarea":Pr(e),ju(e);break;case"option":r.value!=null&&e.setAttribute("value",""+St(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?an(e,!!r.multiple,i,!1):r.defaultValue!=null&&an(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=cl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ue(t),null;case 6:if(e&&t.stateNode!=null)Rc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(E(166));if(n=Dt(ur.current),Dt(Ke.current),Dr(t)){if(r=t.stateNode,n=t.memoizedProps,r[We]=t,(i=r.nodeValue!==n)&&(e=Ee,e!==null))switch(e.tag){case 3:Mr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mr(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[We]=t,t.stateNode=r}return ue(t),null;case 13:if(B(V),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(A&&ke!==null&&t.mode&1&&!(t.flags&128))Xa(),gn(),t.flags|=98560,i=!1;else if(i=Dr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(E(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(E(317));i[We]=t}else gn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ue(t),i=!1}else De!==null&&(mo(De),De=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||V.current&1?q===0&&(q=3):cu())),t.updateQueue!==null&&(t.flags|=4),ue(t),null);case 4:return xn(),oo(e,t),e===null&&rr(t.stateNode.containerInfo),ue(t),null;case 10:return Yo(t.type._context),ue(t),null;case 17:return xe(t.type)&&fl(),ue(t),null;case 19:if(B(V),i=t.memoizedState,i===null)return ue(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)In(i,!1);else{if(q!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=yl(e),o!==null){for(t.flags|=128,In(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return U(V,V.current&1|2),t.child}e=e.sibling}i.tail!==null&&G()>Sn&&(t.flags|=128,r=!0,In(i,!1),t.lanes=4194304)}else{if(!r)if(e=yl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),In(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!A)return ue(t),null}else 2*G()-i.renderingStartTime>Sn&&n!==1073741824&&(t.flags|=128,r=!0,In(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=G(),t.sibling=null,n=V.current,U(V,r?n&1|2:n&1),t):(ue(t),null);case 22:case 23:return au(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Se&1073741824&&(ue(t),t.subtreeFlags&6&&(t.flags|=8192)):ue(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Ep(e,t){switch(Wo(t),t.tag){case 1:return xe(t.type)&&fl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xn(),B(ye),B(ae),qo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Zo(t),null;case 13:if(B(V),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));gn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(V),null;case 4:return xn(),null;case 10:return Yo(t.type._context),null;case 22:case 23:return au(),null;case 24:return null;default:return null}}var $r=!1,se=!1,Cp=typeof WeakSet=="function"?WeakSet:Set,L=null;function un(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Q(e,t,r)}else n.current=null}function uo(e,t,n){try{n()}catch(r){Q(e,t,r)}}var ms=!1;function Np(e,t){if(Hi=ul,e=Ma(),Ao(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,u=-1,s=-1,c=0,m=0,d=e,h=null;t:for(;;){for(var y;d!==n||l!==0&&d.nodeType!==3||(u=o+l),d!==i||r!==0&&d.nodeType!==3||(s=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(y=d.firstChild)!==null;)h=d,d=y;for(;;){if(d===e)break t;if(h===n&&++c===l&&(u=o),h===i&&++m===r&&(s=o),(y=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=y}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qi={focusedElem:e,selectionRange:n},ul=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,N=w.memoizedState,p=t.stateNode,f=p.getSnapshotBeforeUpdate(t.elementType===t.type?S:Ie(t.type,S),N);p.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(g){Q(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return w=ms,ms=!1,w}function Kn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&uo(t,n,i)}l=l.next}while(l!==r)}}function Fl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function so(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Tc(e){var t=e.alternate;t!==null&&(e.alternate=null,Tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[We],delete t[ir],delete t[Xi],delete t[up],delete t[sp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function zc(e){return e.tag===5||e.tag===3||e.tag===4}function vs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ao(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cl));else if(r!==4&&(e=e.child,e!==null))for(ao(e,t,n),e=e.sibling;e!==null;)ao(e,t,n),e=e.sibling}function co(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(co(e,t,n),e=e.sibling;e!==null;)co(e,t,n),e=e.sibling}var re=null,Me=!1;function rt(e,t,n){for(n=n.child;n!==null;)Oc(e,t,n),n=n.sibling}function Oc(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount=="function")try{Qe.onCommitFiberUnmount(Ll,n)}catch{}switch(n.tag){case 5:se||un(n,t);case 6:var r=re,l=Me;re=null,rt(e,t,n),re=r,Me=l,re!==null&&(Me?(e=re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):re.removeChild(n.stateNode));break;case 18:re!==null&&(Me?(e=re,n=n.stateNode,e.nodeType===8?fi(e.parentNode,n):e.nodeType===1&&fi(e,n),er(e)):fi(re,n.stateNode));break;case 4:r=re,l=Me,re=n.stateNode.containerInfo,Me=!0,rt(e,t,n),re=r,Me=l;break;case 0:case 11:case 14:case 15:if(!se&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&uo(n,t,o),l=l.next}while(l!==r)}rt(e,t,n);break;case 1:if(!se&&(un(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Q(n,t,u)}rt(e,t,n);break;case 21:rt(e,t,n);break;case 22:n.mode&1?(se=(r=se)||n.memoizedState!==null,rt(e,t,n),se=r):rt(e,t,n);break;default:rt(e,t,n)}}function gs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Cp),t.forEach(function(r){var l=Ip.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Oe(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,o=t,u=o;e:for(;u!==null;){switch(u.tag){case 5:re=u.stateNode,Me=!1;break e;case 3:re=u.stateNode.containerInfo,Me=!0;break e;case 4:re=u.stateNode.containerInfo,Me=!0;break e}u=u.return}if(re===null)throw Error(E(160));Oc(i,o,l),re=null,Me=!1;var s=l.alternate;s!==null&&(s.return=null),l.return=null}catch(c){Q(l,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ic(t,e),t=t.sibling}function Ic(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Oe(t,e),Ae(e),r&4){try{Kn(3,e,e.return),Fl(3,e)}catch(S){Q(e,e.return,S)}try{Kn(5,e,e.return)}catch(S){Q(e,e.return,S)}}break;case 1:Oe(t,e),Ae(e),r&512&&n!==null&&un(n,n.return);break;case 5:if(Oe(t,e),Ae(e),r&512&&n!==null&&un(n,n.return),e.flags&32){var l=e.stateNode;try{Jn(l,"")}catch(S){Q(e,e.return,S)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,u=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{u==="input"&&i.type==="radio"&&i.name!=null&&na(l,i),Ii(u,o);var c=Ii(u,i);for(o=0;o<s.length;o+=2){var m=s[o],d=s[o+1];m==="style"?ua(l,d):m==="dangerouslySetInnerHTML"?ia(l,d):m==="children"?Jn(l,d):_o(l,m,d,c)}switch(u){case"input":Li(l,i);break;case"textarea":ra(l,i);break;case"select":var h=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?an(l,!!i.multiple,y,!1):h!==!!i.multiple&&(i.defaultValue!=null?an(l,!!i.multiple,i.defaultValue,!0):an(l,!!i.multiple,i.multiple?[]:"",!1))}l[ir]=i}catch(S){Q(e,e.return,S)}}break;case 6:if(Oe(t,e),Ae(e),r&4){if(e.stateNode===null)throw Error(E(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(S){Q(e,e.return,S)}}break;case 3:if(Oe(t,e),Ae(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{er(t.containerInfo)}catch(S){Q(e,e.return,S)}break;case 4:Oe(t,e),Ae(e);break;case 13:Oe(t,e),Ae(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(uu=G())),r&4&&gs(e);break;case 22:if(m=n!==null&&n.memoizedState!==null,e.mode&1?(se=(c=se)||m,Oe(t,e),se=c):Oe(t,e),Ae(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!m&&e.mode&1)for(L=e,m=e.child;m!==null;){for(d=L=m;L!==null;){switch(h=L,y=h.child,h.tag){case 0:case 11:case 14:case 15:Kn(4,h,h.return);break;case 1:un(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(S){Q(r,n,S)}}break;case 5:un(h,h.return);break;case 22:if(h.memoizedState!==null){xs(d);continue}}y!==null?(y.return=h,L=y):xs(d)}m=m.sibling}e:for(m=null,d=e;;){if(d.tag===5){if(m===null){m=d;try{l=d.stateNode,c?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=d.stateNode,s=d.memoizedProps.style,o=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=oa("display",o))}catch(S){Q(e,e.return,S)}}}else if(d.tag===6){if(m===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(S){Q(e,e.return,S)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;m===d&&(m=null),d=d.return}m===d&&(m=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Oe(t,e),Ae(e),r&4&&gs(e);break;case 21:break;default:Oe(t,e),Ae(e)}}function Ae(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(zc(n)){var r=n;break e}n=n.return}throw Error(E(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(Jn(l,""),r.flags&=-33);var i=vs(e);co(e,i,l);break;case 3:case 4:var o=r.stateNode.containerInfo,u=vs(e);ao(e,u,o);break;default:throw Error(E(161))}}catch(s){Q(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jp(e,t,n){L=e,Mc(e)}function Mc(e,t,n){for(var r=(e.mode&1)!==0;L!==null;){var l=L,i=l.child;if(l.tag===22&&r){var o=l.memoizedState!==null||$r;if(!o){var u=l.alternate,s=u!==null&&u.memoizedState!==null||se;u=$r;var c=se;if($r=o,(se=s)&&!c)for(L=l;L!==null;)o=L,s=o.child,o.tag===22&&o.memoizedState!==null?ws(l):s!==null?(s.return=o,L=s):ws(l);for(;i!==null;)L=i,Mc(i),i=i.sibling;L=l,$r=u,se=c}ys(e)}else l.subtreeFlags&8772&&i!==null?(i.return=l,L=i):ys(e)}}function ys(e){for(;L!==null;){var t=L;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:se||Fl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!se)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Ie(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&ns(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ns(t,o,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var m=c.memoizedState;if(m!==null){var d=m.dehydrated;d!==null&&er(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}se||t.flags&512&&so(t)}catch(h){Q(t,t.return,h)}}if(t===e){L=null;break}if(n=t.sibling,n!==null){n.return=t.return,L=n;break}L=t.return}}function xs(e){for(;L!==null;){var t=L;if(t===e){L=null;break}var n=t.sibling;if(n!==null){n.return=t.return,L=n;break}L=t.return}}function ws(e){for(;L!==null;){var t=L;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Fl(4,t)}catch(s){Q(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(s){Q(t,l,s)}}var i=t.return;try{so(t)}catch(s){Q(t,i,s)}break;case 5:var o=t.return;try{so(t)}catch(s){Q(t,o,s)}}}catch(s){Q(t,t.return,s)}if(t===e){L=null;break}var u=t.sibling;if(u!==null){u.return=t.return,L=u;break}L=t.return}}var Pp=Math.ceil,Sl=nt.ReactCurrentDispatcher,iu=nt.ReactCurrentOwner,Re=nt.ReactCurrentBatchConfig,I=0,te=null,J=null,le=0,Se=0,sn=Ct(0),q=0,fr=null,Vt=0,Ul=0,ou=0,Yn=null,he=null,uu=0,Sn=1/0,Ye=null,kl=!1,fo=null,vt=null,Br=!1,at=null,El=0,Xn=0,po=null,qr=-1,br=0;function fe(){return I&6?G():qr!==-1?qr:qr=G()}function gt(e){return e.mode&1?I&2&&le!==0?le&-le:cp.transition!==null?(br===0&&(br=xa()),br):(e=M,e!==0||(e=window.event,e=e===void 0?16:ja(e.type)),e):1}function $e(e,t,n,r){if(50<Xn)throw Xn=0,po=null,Error(E(185));gr(e,n,r),(!(I&2)||e!==te)&&(e===te&&(!(I&2)&&(Ul|=n),q===4&&ut(e,le)),we(e,r),n===1&&I===0&&!(t.mode&1)&&(Sn=G()+500,Il&&Nt()))}function we(e,t){var n=e.callbackNode;cd(e,t);var r=ol(e,e===te?le:0);if(r===0)n!==null&&Lu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Lu(n),t===1)e.tag===0?ap(Ss.bind(null,e)):Qa(Ss.bind(null,e)),ip(function(){!(I&6)&&Nt()}),n=null;else{switch(wa(r)){case 1:n=Oo;break;case 4:n=ga;break;case 16:n=il;break;case 536870912:n=ya;break;default:n=il}n=Wc(n,Dc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Dc(e,t){if(qr=-1,br=0,I&6)throw Error(E(327));var n=e.callbackNode;if(hn()&&e.callbackNode!==n)return null;var r=ol(e,e===te?le:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Cl(e,r);else{t=r;var l=I;I|=2;var i=Uc();(te!==e||le!==t)&&(Ye=null,Sn=G()+500,Ft(e,t));do try{Rp();break}catch(u){Fc(e,u)}while(!0);Ko(),Sl.current=i,I=l,J!==null?t=0:(te=null,le=0,t=q)}if(t!==0){if(t===2&&(l=$i(e),l!==0&&(r=l,t=ho(e,l))),t===1)throw n=fr,Ft(e,0),ut(e,r),we(e,G()),n;if(t===6)ut(e,r);else{if(l=e.current.alternate,!(r&30)&&!_p(l)&&(t=Cl(e,r),t===2&&(i=$i(e),i!==0&&(r=i,t=ho(e,i))),t===1))throw n=fr,Ft(e,0),ut(e,r),we(e,G()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(E(345));case 2:Ot(e,he,Ye);break;case 3:if(ut(e,r),(r&130023424)===r&&(t=uu+500-G(),10<t)){if(ol(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){fe(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Yi(Ot.bind(null,e,he,Ye),t);break}Ot(e,he,Ye);break;case 4:if(ut(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var o=31-Ue(r);i=1<<o,o=t[o],o>l&&(l=o),r&=~i}if(r=l,r=G()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Pp(r/1960))-r,10<r){e.timeoutHandle=Yi(Ot.bind(null,e,he,Ye),r);break}Ot(e,he,Ye);break;case 5:Ot(e,he,Ye);break;default:throw Error(E(329))}}}return we(e,G()),e.callbackNode===n?Dc.bind(null,e):null}function ho(e,t){var n=Yn;return e.current.memoizedState.isDehydrated&&(Ft(e,t).flags|=256),e=Cl(e,t),e!==2&&(t=he,he=n,t!==null&&mo(t)),e}function mo(e){he===null?he=e:he.push.apply(he,e)}function _p(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],i=l.getSnapshot;l=l.value;try{if(!Be(i(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ut(e,t){for(t&=~ou,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ue(t),r=1<<n;e[n]=-1,t&=~r}}function Ss(e){if(I&6)throw Error(E(327));hn();var t=ol(e,0);if(!(t&1))return we(e,G()),null;var n=Cl(e,t);if(e.tag!==0&&n===2){var r=$i(e);r!==0&&(t=r,n=ho(e,r))}if(n===1)throw n=fr,Ft(e,0),ut(e,t),we(e,G()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ot(e,he,Ye),we(e,G()),null}function su(e,t){var n=I;I|=1;try{return e(t)}finally{I=n,I===0&&(Sn=G()+500,Il&&Nt())}}function Wt(e){at!==null&&at.tag===0&&!(I&6)&&hn();var t=I;I|=1;var n=Re.transition,r=M;try{if(Re.transition=null,M=1,e)return e()}finally{M=r,Re.transition=n,I=t,!(I&6)&&Nt()}}function au(){Se=sn.current,B(sn)}function Ft(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,lp(n)),J!==null)for(n=J.return;n!==null;){var r=n;switch(Wo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&fl();break;case 3:xn(),B(ye),B(ae),qo();break;case 5:Zo(r);break;case 4:xn();break;case 13:B(V);break;case 19:B(V);break;case 10:Yo(r.type._context);break;case 22:case 23:au()}n=n.return}if(te=e,J=e=yt(e.current,null),le=Se=t,q=0,fr=null,ou=Ul=Vt=0,he=Yn=null,Mt!==null){for(t=0;t<Mt.length;t++)if(n=Mt[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=l,r.next=o}n.pending=r}Mt=null}return e}function Fc(e,t){do{var n=J;try{if(Ko(),Gr.current=wl,xl){for(var r=W.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}xl=!1}if(At=0,ee=Z=W=null,Qn=!1,sr=0,iu.current=null,n===null||n.return===null){q=1,fr=t,J=null;break}e:{var i=e,o=n.return,u=n,s=t;if(t=le,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=s,m=u,d=m.tag;if(!(m.mode&1)&&(d===0||d===11||d===15)){var h=m.alternate;h?(m.updateQueue=h.updateQueue,m.memoizedState=h.memoizedState,m.lanes=h.lanes):(m.updateQueue=null,m.memoizedState=null)}var y=ss(o);if(y!==null){y.flags&=-257,as(y,o,u,i,t),y.mode&1&&us(i,c,t),t=y,s=c;var w=t.updateQueue;if(w===null){var S=new Set;S.add(s),t.updateQueue=S}else w.add(s);break e}else{if(!(t&1)){us(i,c,t),cu();break e}s=Error(E(426))}}else if(A&&u.mode&1){var N=ss(o);if(N!==null){!(N.flags&65536)&&(N.flags|=256),as(N,o,u,i,t),Ho(wn(s,u));break e}}i=s=wn(s,u),q!==4&&(q=2),Yn===null?Yn=[i]:Yn.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=wc(i,s,t);ts(i,p);break e;case 1:u=s;var f=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof f.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(vt===null||!vt.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var g=Sc(i,u,t);ts(i,g);break e}}i=i.return}while(i!==null)}Bc(n)}catch(k){t=k,J===n&&n!==null&&(J=n=n.return);continue}break}while(!0)}function Uc(){var e=Sl.current;return Sl.current=wl,e===null?wl:e}function cu(){(q===0||q===3||q===2)&&(q=4),te===null||!(Vt&268435455)&&!(Ul&268435455)||ut(te,le)}function Cl(e,t){var n=I;I|=2;var r=Uc();(te!==e||le!==t)&&(Ye=null,Ft(e,t));do try{Lp();break}catch(l){Fc(e,l)}while(!0);if(Ko(),I=n,Sl.current=r,J!==null)throw Error(E(261));return te=null,le=0,q}function Lp(){for(;J!==null;)$c(J)}function Rp(){for(;J!==null&&!td();)$c(J)}function $c(e){var t=Vc(e.alternate,e,Se);e.memoizedProps=e.pendingProps,t===null?Bc(e):J=t,iu.current=null}function Bc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ep(n,t),n!==null){n.flags&=32767,J=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{q=6,J=null;return}}else if(n=kp(n,t,Se),n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);q===0&&(q=5)}function Ot(e,t,n){var r=M,l=Re.transition;try{Re.transition=null,M=1,Tp(e,t,n,r)}finally{Re.transition=l,M=r}return null}function Tp(e,t,n,r){do hn();while(at!==null);if(I&6)throw Error(E(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(E(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(fd(e,i),e===te&&(J=te=null,le=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Br||(Br=!0,Wc(il,function(){return hn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Re.transition,Re.transition=null;var o=M;M=1;var u=I;I|=4,iu.current=null,Np(e,n),Ic(n,e),Zd(Qi),ul=!!Hi,Qi=Hi=null,e.current=n,jp(n),nd(),I=u,M=o,Re.transition=i}else e.current=n;if(Br&&(Br=!1,at=e,El=l),i=e.pendingLanes,i===0&&(vt=null),id(n.stateNode),we(e,G()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(kl)throw kl=!1,e=fo,fo=null,e;return El&1&&e.tag!==0&&hn(),i=e.pendingLanes,i&1?e===po?Xn++:(Xn=0,po=e):Xn=0,Nt(),null}function hn(){if(at!==null){var e=wa(El),t=Re.transition,n=M;try{if(Re.transition=null,M=16>e?16:e,at===null)var r=!1;else{if(e=at,at=null,El=0,I&6)throw Error(E(331));var l=I;for(I|=4,L=e.current;L!==null;){var i=L,o=i.child;if(L.flags&16){var u=i.deletions;if(u!==null){for(var s=0;s<u.length;s++){var c=u[s];for(L=c;L!==null;){var m=L;switch(m.tag){case 0:case 11:case 15:Kn(8,m,i)}var d=m.child;if(d!==null)d.return=m,L=d;else for(;L!==null;){m=L;var h=m.sibling,y=m.return;if(Tc(m),m===c){L=null;break}if(h!==null){h.return=y,L=h;break}L=y}}}var w=i.alternate;if(w!==null){var S=w.child;if(S!==null){w.child=null;do{var N=S.sibling;S.sibling=null,S=N}while(S!==null)}}L=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,L=o;else e:for(;L!==null;){if(i=L,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Kn(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,L=p;break e}L=i.return}}var f=e.current;for(L=f;L!==null;){o=L;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,L=v;else e:for(o=f;L!==null;){if(u=L,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Fl(9,u)}}catch(k){Q(u,u.return,k)}if(u===o){L=null;break e}var g=u.sibling;if(g!==null){g.return=u.return,L=g;break e}L=u.return}}if(I=l,Nt(),Qe&&typeof Qe.onPostCommitFiberRoot=="function")try{Qe.onPostCommitFiberRoot(Ll,e)}catch{}r=!0}return r}finally{M=n,Re.transition=t}}return!1}function ks(e,t,n){t=wn(n,t),t=wc(e,t,1),e=mt(e,t,1),t=fe(),e!==null&&(gr(e,1,t),we(e,t))}function Q(e,t,n){if(e.tag===3)ks(e,e,n);else for(;t!==null;){if(t.tag===3){ks(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(vt===null||!vt.has(r))){e=wn(n,e),e=Sc(t,e,1),t=mt(t,e,1),e=fe(),t!==null&&(gr(t,1,e),we(t,e));break}}t=t.return}}function zp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fe(),e.pingedLanes|=e.suspendedLanes&n,te===e&&(le&n)===n&&(q===4||q===3&&(le&130023424)===le&&500>G()-uu?Ft(e,0):ou|=n),we(e,t)}function Ac(e,t){t===0&&(e.mode&1?(t=Rr,Rr<<=1,!(Rr&130023424)&&(Rr=4194304)):t=1);var n=fe();e=et(e,t),e!==null&&(gr(e,t,n),we(e,n))}function Op(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ac(e,n)}function Ip(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),Ac(e,n)}var Vc;Vc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ye.current)me=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return me=!1,Sp(e,t,n);me=!!(e.flags&131072)}else me=!1,A&&t.flags&1048576&&Ka(t,hl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Zr(e,t),e=t.pendingProps;var l=vn(t,ae.current);pn(t,n),l=eu(null,t,r,e,l,n);var i=tu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xe(r)?(i=!0,dl(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Go(t),l.updater=Dl,t.stateNode=l,l._reactInternals=t,eo(t,r,e,n),t=ro(null,t,r,!0,i,n)):(t.tag=0,A&&i&&Vo(t),ce(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Zr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Dp(r),e=Ie(r,e),l){case 0:t=no(null,t,r,e,n);break e;case 1:t=ds(null,t,r,e,n);break e;case 11:t=cs(null,t,r,e,n);break e;case 14:t=fs(null,t,r,Ie(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),no(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),ds(e,t,r,l,n);case 3:e:{if(Nc(t),e===null)throw Error(E(387));r=t.pendingProps,i=t.memoizedState,l=i.element,qa(e,t),gl(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=wn(Error(E(423)),t),t=ps(e,t,r,n,l);break e}else if(r!==l){l=wn(Error(E(424)),t),t=ps(e,t,r,n,l);break e}else for(ke=ht(t.stateNode.containerInfo.firstChild),Ee=t,A=!0,De=null,n=Ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gn(),r===l){t=tt(e,t,n);break e}ce(e,t,r,n)}t=t.child}return t;case 5:return ba(t),e===null&&Zi(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,Ki(r,l)?o=null:i!==null&&Ki(r,i)&&(t.flags|=32),Cc(e,t),ce(e,t,o,n),t.child;case 6:return e===null&&Zi(t),null;case 13:return jc(e,t,n);case 4:return Jo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yn(t,null,r,n):ce(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),cs(e,t,r,l,n);case 7:return ce(e,t,t.pendingProps,n),t.child;case 8:return ce(e,t,t.pendingProps.children,n),t.child;case 12:return ce(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,U(ml,r._currentValue),r._currentValue=o,i!==null)if(Be(i.value,o)){if(i.children===l.children&&!ye.current){t=tt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){o=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Ze(-1,n&-n),s.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?s.next=s:(s.next=m.next,m.next=s),c.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),qi(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(E(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),qi(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ce(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,pn(t,n),l=Te(l),r=r(l),t.flags|=1,ce(e,t,r,n),t.child;case 14:return r=t.type,l=Ie(r,t.pendingProps),l=Ie(r.type,l),fs(e,t,r,l,n);case 15:return kc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ie(r,l),Zr(e,t),t.tag=1,xe(r)?(e=!0,dl(t)):e=!1,pn(t,n),xc(t,r,l),eo(t,r,l,n),ro(null,t,r,!0,e,n);case 19:return Pc(e,t,n);case 22:return Ec(e,t,n)}throw Error(E(156,t.tag))};function Wc(e,t){return va(e,t)}function Mp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Le(e,t,n,r){return new Mp(e,t,n,r)}function fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dp(e){if(typeof e=="function")return fu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ro)return 11;if(e===To)return 14}return 2}function yt(e,t){var n=e.alternate;return n===null?(n=Le(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function el(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")fu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Zt:return Ut(n.children,l,i,t);case Lo:o=8,l|=8;break;case Ci:return e=Le(12,n,t,l|2),e.elementType=Ci,e.lanes=i,e;case Ni:return e=Le(13,n,t,l),e.elementType=Ni,e.lanes=i,e;case ji:return e=Le(19,n,t,l),e.elementType=ji,e.lanes=i,e;case bs:return $l(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zs:o=10;break e;case qs:o=9;break e;case Ro:o=11;break e;case To:o=14;break e;case lt:o=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Le(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Ut(e,t,n,r){return e=Le(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=Le(22,e,r,t),e.elementType=bs,e.lanes=n,e.stateNode={isHidden:!1},e}function xi(e,t,n){return e=Le(6,e,null,t),e.lanes=n,e}function wi(e,t,n){return t=Le(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ei(0),this.expirationTimes=ei(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ei(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function du(e,t,n,r,l,i,o,u,s){return e=new Fp(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Le(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Go(i),e}function Up(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Jt,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Hc(e){if(!e)return kt;e=e._reactInternals;e:{if(Qt(e)!==e||e.tag!==1)throw Error(E(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(E(171))}if(e.tag===1){var n=e.type;if(xe(n))return Ha(e,n,t)}return t}function Qc(e,t,n,r,l,i,o,u,s){return e=du(n,r,!0,e,l,i,o,u,s),e.context=Hc(null),n=e.current,r=fe(),l=gt(n),i=Ze(r,l),i.callback=t??null,mt(n,i,l),e.current.lanes=l,gr(e,l,r),we(e,r),e}function Bl(e,t,n,r){var l=t.current,i=fe(),o=gt(l);return n=Hc(n),t.context===null?t.context=n:t.pendingContext=n,t=Ze(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=mt(l,t,o),e!==null&&($e(e,l,o,i),Xr(e,l,o)),o}function Nl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Es(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pu(e,t){Es(e,t),(e=e.alternate)&&Es(e,t)}function $p(){return null}var Kc=typeof reportError=="function"?reportError:function(e){console.error(e)};function hu(e){this._internalRoot=e}Al.prototype.render=hu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));Bl(e,t,null,null)};Al.prototype.unmount=hu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wt(function(){Bl(null,e,null,null)}),t[be]=null}};function Al(e){this._internalRoot=e}Al.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ea();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ot.length&&t!==0&&t<ot[n].priority;n++);ot.splice(n,0,e),n===0&&Na(e)}};function mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Cs(){}function Bp(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var c=Nl(o);i.call(c)}}var o=Qc(t,r,e,0,null,!1,!1,"",Cs);return e._reactRootContainer=o,e[be]=o.current,rr(e.nodeType===8?e.parentNode:e),Wt(),o}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var u=r;r=function(){var c=Nl(s);u.call(c)}}var s=du(e,0,!1,null,null,!1,!1,"",Cs);return e._reactRootContainer=s,e[be]=s.current,rr(e.nodeType===8?e.parentNode:e),Wt(function(){Bl(t,s,n,r)}),s}function Wl(e,t,n,r,l){var i=n._reactRootContainer;if(i){var o=i;if(typeof l=="function"){var u=l;l=function(){var s=Nl(o);u.call(s)}}Bl(t,o,e,l)}else o=Bp(n,t,e,l,r);return Nl(o)}Sa=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Un(t.pendingLanes);n!==0&&(Io(t,n|1),we(t,G()),!(I&6)&&(Sn=G()+500,Nt()))}break;case 13:Wt(function(){var r=et(e,1);if(r!==null){var l=fe();$e(r,e,1,l)}}),pu(e,1)}};Mo=function(e){if(e.tag===13){var t=et(e,134217728);if(t!==null){var n=fe();$e(t,e,134217728,n)}pu(e,134217728)}};ka=function(e){if(e.tag===13){var t=gt(e),n=et(e,t);if(n!==null){var r=fe();$e(n,e,t,r)}pu(e,t)}};Ea=function(){return M};Ca=function(e,t){var n=M;try{return M=e,t()}finally{M=n}};Di=function(e,t,n){switch(t){case"input":if(Li(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Ol(r);if(!l)throw Error(E(90));ta(r),Li(r,l)}}}break;case"textarea":ra(e,n);break;case"select":t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}};ca=su;fa=Wt;var Ap={usingClientEntryPoint:!1,Events:[xr,tn,Ol,sa,aa,su]},Mn={findFiberByHostInstance:It,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Vp={bundleType:Mn.bundleType,version:Mn.version,rendererPackageName:Mn.rendererPackageName,rendererConfig:Mn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ha(e),e===null?null:e.stateNode},findFiberByHostInstance:Mn.findFiberByHostInstance||$p,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ar=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ar.isDisabled&&Ar.supportsFiber)try{Ll=Ar.inject(Vp),Qe=Ar}catch{}}Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ap;Ne.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mu(t))throw Error(E(200));return Up(e,t,null,n)};Ne.createRoot=function(e,t){if(!mu(e))throw Error(E(299));var n=!1,r="",l=Kc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=du(e,1,!1,null,null,n,!1,r,l),e[be]=t.current,rr(e.nodeType===8?e.parentNode:e),new hu(t)};Ne.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=ha(t),e=e===null?null:e.stateNode,e};Ne.flushSync=function(e){return Wt(e)};Ne.hydrate=function(e,t,n){if(!Vl(t))throw Error(E(200));return Wl(null,e,t,!0,n)};Ne.hydrateRoot=function(e,t,n){if(!mu(e))throw Error(E(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",o=Kc;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Qc(t,null,e,1,n??null,l,!1,i,o),e[be]=t.current,rr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Al(t)};Ne.render=function(e,t,n){if(!Vl(t))throw Error(E(200));return Wl(null,e,t,!1,n)};Ne.unmountComponentAtNode=function(e){if(!Vl(e))throw Error(E(40));return e._reactRootContainer?(Wt(function(){Wl(null,null,e,!1,function(){e._reactRootContainer=null,e[be]=null})}),!0):!1};Ne.unstable_batchedUpdates=su;Ne.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vl(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return Wl(e,t,n,!1,r)};Ne.version="18.3.1-next-f1338f8080-20240426";function Yc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yc)}catch(e){console.error(e)}}Yc(),Ys.exports=Ne;var Wp=Ys.exports,Xc,Ns=Wp;Xc=Ns.createRoot,Ns.hydrateRoot;/**
41
- * @remix-run/router v1.23.2
40
+ `+i.stack}return{value:e,source:t,stack:l,digest:null}}function Di(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Co(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wh=typeof WeakMap=="function"?WeakMap:Map;function sd(e,t,n){n=ft(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$l||($l=!0,Do=r),Co(e,t)},n}function ad(e,t,n){n=ft(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Co(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Co(e,t),typeof r!="function"&&(Dt===null?Dt=new Set([this]):Dt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Ba(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wh;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Ih.bind(null,e,t,n),t.then(e,e))}function Va(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Wa(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ft(-1,1),t.tag=2,At(n,t,1))),n.lanes|=1),e)}var Sh=yt.ReactCurrentOwner,_e=!1;function Se(e,t,n,r){t.child=e===null?Mc(t,null,n,r):bn(t,e.child,n,r)}function Ha(e,t,n,r,l){n=n.render;var i=t.ref;return Pn(t,l),r=Ts(e,t,n,r,i,l),n=Ls(),e!==null&&!_e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,vt(e,t,l)):(K&&n&&ys(t),t.flags|=1,Se(e,t,r,l),t.child)}function Ka(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Fs(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ud(e,t,i,r,l)):(e=vl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:wr,n(o,r)&&e.ref===t.ref)return vt(e,t,l)}return t.flags|=1,e=zt(i,r),e.ref=t.ref,e.return=t,t.child=e}function ud(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(wr(i,r)&&e.ref===t.ref)if(_e=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(_e=!0);else return t.lanes=e.lanes,vt(e,t,l)}return _o(e,t,n,r,l)}function cd(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},F(kn,Le),Le|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,F(kn,Le),Le|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,F(kn,Le),Le|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,F(kn,Le),Le|=r;return Se(e,t,l,n),t.child}function dd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _o(e,t,n,r,l){var i=Re(n)?tn:ye.current;return i=Ln(t,i),Pn(t,l),n=Ts(e,t,n,r,i,l),r=Ls(),e!==null&&!_e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,vt(e,t,l)):(K&&r&&ys(t),t.flags|=1,Se(e,t,n,l),t.child)}function Qa(e,t,n,r,l){if(Re(n)){var i=!0;Rl(t)}else i=!1;if(Pn(t,l),t.stateNode===null)hl(e,t),od(t,n,r),Eo(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var a=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ve(c):(c=Re(n)?tn:ye.current,c=Ln(t,c));var h=n.getDerivedStateFromProps,f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||a!==c)&&Fa(t,o,r,c),Et=!1;var p=t.memoizedState;o.state=p,Il(t,r,o,l),a=t.memoizedState,u!==r||p!==a||Pe.current||Et?(typeof h=="function"&&(jo(t,n,h,r),a=t.memoizedState),(u=Et||Ua(t,n,u,r,p,a,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),o.props=r,o.state=a,o.context=c,r=u):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,$c(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:Ke(t.type,u),o.props=c,f=t.pendingProps,p=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=Ve(a):(a=Re(n)?tn:ye.current,a=Ln(t,a));var S=n.getDerivedStateFromProps;(h=typeof S=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==f||p!==a)&&Fa(t,o,r,a),Et=!1,p=t.memoizedState,o.state=p,Il(t,r,o,l);var w=t.memoizedState;u!==f||p!==w||Pe.current||Et?(typeof S=="function"&&(jo(t,n,S,r),w=t.memoizedState),(c=Et||Ua(t,n,c,r,p,w,a)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=a,r=c):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Po(e,t,n,r,i,l)}function Po(e,t,n,r,l,i){dd(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return l&&Oa(t,n,!1),vt(e,t,i);r=t.stateNode,Sh.current=t;var u=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=bn(t,e.child,null,i),t.child=bn(t,null,u,i)):Se(e,t,u,i),t.memoizedState=r.state,l&&Oa(t,n,!0),t.child}function fd(e){var t=e.stateNode;t.pendingContext?La(e,t.pendingContext,t.pendingContext!==t.context):t.context&&La(e,t.context,!1),Cs(e,t.containerInfo)}function Ya(e,t,n,r,l){return On(),ws(l),t.flags|=256,Se(e,t,n,r),t.child}var Ro={dehydrated:null,treeContext:null,retryLane:0};function To(e){return{baseLanes:e,cachePool:null,transitions:null}}function pd(e,t,n){var r=t.pendingProps,l=Q.current,i=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),F(Q,l&1),e===null)return No(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ri(o,r,0,null),e=en(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=To(n),t.memoizedState=Ro,e):Is(t,o));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return Nh(e,t,o,r,u,l,n);if(i){i=r.fallback,o=t.mode,l=e.child,u=l.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=zt(l,a),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?i=zt(u,i):(i=en(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?To(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Ro,r}return i=e.child,e=i.sibling,r=zt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Is(e,t){return t=ri({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function tl(e,t,n,r){return r!==null&&ws(r),bn(t,e.child,null,n),e=Is(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Nh(e,t,n,r,l,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Di(Error(_(422))),tl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=ri({mode:"visible",children:r.children},l,0,null),i=en(i,l,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&bn(t,e.child,null,o),t.child.memoizedState=To(o),t.memoizedState=Ro,i);if(!(t.mode&1))return tl(e,t,o,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,i=Error(_(419)),r=Di(i,r,void 0),tl(e,t,o,r)}if(u=(o&e.childLanes)!==0,_e||u){if(r=ae,r!==null){switch(o&-o){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|o)?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,gt(e,l),Je(r,e,l,-1))}return Us(),r=Di(Error(_(421))),tl(e,t,o,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Ah.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,Oe=It(l.nextSibling),be=t,K=!0,Ye=null,e!==null&&(ze[$e++]=ct,ze[$e++]=dt,ze[$e++]=nn,ct=e.id,dt=e.overflow,nn=t),t=Is(t,r.children),t.flags|=4096,t)}function Ga(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ko(e.return,t,n)}function Mi(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function hd(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(Se(e,t,r.children,n),r=Q.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ga(e,n,t);else if(e.tag===19)Ga(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(F(Q,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Al(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Mi(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Al(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Mi(t,!0,n,null,i);break;case"together":Mi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ln|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=zt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kh(e,t,n){switch(t.tag){case 3:fd(t),On();break;case 5:Uc(t);break;case 1:Re(t.type)&&Rl(t);break;case 4:Cs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;F(Ol,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(F(Q,Q.current&1),t.flags|=128,null):n&t.child.childLanes?pd(e,t,n):(F(Q,Q.current&1),e=vt(e,t,n),e!==null?e.sibling:null);F(Q,Q.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return hd(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),F(Q,Q.current),r)break;return null;case 22:case 23:return t.lanes=0,cd(e,t,n)}return vt(e,t,n)}var md,Lo,gd,vd;md=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Lo=function(){};gd=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,qt(ot.current);var i=null;switch(n){case"input":l=qi(e,l),r=qi(e,r),i=[];break;case"select":l=G({},l,{value:void 0}),r=G({},r,{value:void 0}),i=[];break;case"textarea":l=to(e,l),r=to(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=_l)}ro(n,r);var o;n=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var u=l[c];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(pr.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var a=r[c];if(u=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&a!==u&&(a!=null||u!=null))if(c==="style")if(u){for(o in u)!u.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&u[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(i||(i=[]),i.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,u=u?u.__html:void 0,a!=null&&u!==a&&(i=i||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(pr.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&B("scroll",e),i||u===a||(i=[])):(i=i||[]).push(c,a))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};vd=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xn(e,t){if(!K)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function jh(e,t,n){var r=t.pendingProps;switch(xs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ge(t),null;case 1:return Re(t.type)&&Pl(),ge(t),null;case 3:return r=t.stateNode,In(),V(Pe),V(ye),Ps(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Zr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ye!==null&&($o(Ye),Ye=null))),Lo(e,t),ge(t),null;case 5:_s(t);var l=qt(Er.current);if(n=t.type,e!==null&&t.stateNode!=null)gd(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return ge(t),null}if(e=qt(ot.current),Zr(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[rt]=t,r[kr]=i,e=(t.mode&1)!==0,n){case"dialog":B("cancel",r),B("close",r);break;case"iframe":case"object":case"embed":B("load",r);break;case"video":case"audio":for(l=0;l<nr.length;l++)B(nr[l],r);break;case"source":B("error",r);break;case"img":case"image":case"link":B("error",r),B("load",r);break;case"details":B("toggle",r);break;case"input":la(r,i),B("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},B("invalid",r);break;case"textarea":oa(r,i),B("invalid",r)}ro(n,i),l=null;for(var o in i)if(i.hasOwnProperty(o)){var u=i[o];o==="children"?typeof u=="string"?r.textContent!==u&&(i.suppressHydrationWarning!==!0&&qr(r.textContent,u,e),l=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&qr(r.textContent,u,e),l=["children",""+u]):pr.hasOwnProperty(o)&&u!=null&&o==="onScroll"&&B("scroll",r)}switch(n){case"input":Wr(r),ia(r,i,!0);break;case"textarea":Wr(r),sa(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=_l)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Hu(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[rt]=t,e[kr]=r,md(e,t,!1,!1),t.stateNode=e;e:{switch(o=lo(n,r),n){case"dialog":B("cancel",e),B("close",e),l=r;break;case"iframe":case"object":case"embed":B("load",e),l=r;break;case"video":case"audio":for(l=0;l<nr.length;l++)B(nr[l],e);l=r;break;case"source":B("error",e),l=r;break;case"img":case"image":case"link":B("error",e),B("load",e),l=r;break;case"details":B("toggle",e),l=r;break;case"input":la(e,r),l=qi(e,r),B("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=G({},r,{value:void 0}),B("invalid",e);break;case"textarea":oa(e,r),l=to(e,r),B("invalid",e);break;default:l=r}ro(n,l),u=l;for(i in u)if(u.hasOwnProperty(i)){var a=u[i];i==="style"?Yu(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Ku(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&hr(e,a):typeof a=="number"&&hr(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(pr.hasOwnProperty(i)?a!=null&&i==="onScroll"&&B("scroll",e):a!=null&&ls(e,i,a,o))}switch(n){case"input":Wr(e),ia(e,r,!1);break;case"textarea":Wr(e),sa(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ut(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?jn(e,!!r.multiple,i,!1):r.defaultValue!=null&&jn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=_l)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ge(t),null;case 6:if(e&&t.stateNode!=null)vd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=qt(Er.current),qt(ot.current),Zr(t)){if(r=t.stateNode,n=t.memoizedProps,r[rt]=t,(i=r.nodeValue!==n)&&(e=be,e!==null))switch(e.tag){case 3:qr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qr(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[rt]=t,t.stateNode=r}return ge(t),null;case 13:if(V(Q),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(K&&Oe!==null&&t.mode&1&&!(t.flags&128))Ac(),On(),t.flags|=98560,i=!1;else if(i=Zr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(_(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(_(317));i[rt]=t}else On(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ge(t),i=!1}else Ye!==null&&($o(Ye),Ye=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Q.current&1?le===0&&(le=3):Us())),t.updateQueue!==null&&(t.flags|=4),ge(t),null);case 4:return In(),Lo(e,t),e===null&&Sr(t.stateNode.containerInfo),ge(t),null;case 10:return ks(t.type._context),ge(t),null;case 17:return Re(t.type)&&Pl(),ge(t),null;case 19:if(V(Q),i=t.memoizedState,i===null)return ge(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Xn(i,!1);else{if(le!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Al(e),o!==null){for(t.flags|=128,Xn(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return F(Q,Q.current&1|2),t.child}e=e.sibling}i.tail!==null&&q()>Dn&&(t.flags|=128,r=!0,Xn(i,!1),t.lanes=4194304)}else{if(!r)if(e=Al(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!K)return ge(t),null}else 2*q()-i.renderingStartTime>Dn&&n!==1073741824&&(t.flags|=128,r=!0,Xn(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=q(),t.sibling=null,n=Q.current,F(Q,r?n&1|2:n&1),t):(ge(t),null);case 22:case 23:return $s(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Le&1073741824&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function Eh(e,t){switch(xs(t),t.tag){case 1:return Re(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return In(),V(Pe),V(ye),Ps(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _s(t),null;case 13:if(V(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));On()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Q),null;case 4:return In(),null;case 10:return ks(t.type._context),null;case 22:case 23:return $s(),null;case 24:return null;default:return null}}var nl=!1,ve=!1,Ch=typeof WeakSet=="function"?WeakSet:Set,R=null;function Nn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){J(e,t,r)}else n.current=null}function Oo(e,t,n){try{n()}catch(r){J(e,t,r)}}var Ja=!1;function _h(e,t){if(mo=jl,e=Nc(),vs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,u=-1,a=-1,c=0,h=0,f=e,p=null;t:for(;;){for(var S;f!==n||l!==0&&f.nodeType!==3||(u=o+l),f!==i||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(S=f.firstChild)!==null;)p=f,f=S;for(;;){if(f===e)break t;if(p===n&&++c===l&&(u=o),p===i&&++h===r&&(a=o),(S=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=S}n=u===-1||a===-1?null:{start:u,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(go={focusedElem:e,selectionRange:n},jl=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var x=w.memoizedProps,E=w.memoizedState,g=t.stateNode,d=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:Ke(t.type,x),E);g.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(y){J(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return w=Ja,Ja=!1,w}function ur(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&Oo(t,n,i)}l=l.next}while(l!==r)}}function ti(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function bo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function yd(e){var t=e.alternate;t!==null&&(e.alternate=null,yd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rt],delete t[kr],delete t[xo],delete t[uh],delete t[ch])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function xd(e){return e.tag===5||e.tag===3||e.tag===4}function Xa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Io(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_l));else if(r!==4&&(e=e.child,e!==null))for(Io(e,t,n),e=e.sibling;e!==null;)Io(e,t,n),e=e.sibling}function Ao(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ao(e,t,n),e=e.sibling;e!==null;)Ao(e,t,n),e=e.sibling}var ce=null,Qe=!1;function kt(e,t,n){for(n=n.child;n!==null;)wd(e,t,n),n=n.sibling}function wd(e,t,n){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount(Ql,n)}catch{}switch(n.tag){case 5:ve||Nn(n,t);case 6:var r=ce,l=Qe;ce=null,kt(e,t,n),ce=r,Qe=l,ce!==null&&(Qe?(e=ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(Qe?(e=ce,n=n.stateNode,e.nodeType===8?Ti(e.parentNode,n):e.nodeType===1&&Ti(e,n),yr(e)):Ti(ce,n.stateNode));break;case 4:r=ce,l=Qe,ce=n.stateNode.containerInfo,Qe=!0,kt(e,t,n),ce=r,Qe=l;break;case 0:case 11:case 14:case 15:if(!ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Oo(n,t,o),l=l.next}while(l!==r)}kt(e,t,n);break;case 1:if(!ve&&(Nn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){J(n,t,u)}kt(e,t,n);break;case 21:kt(e,t,n);break;case 22:n.mode&1?(ve=(r=ve)||n.memoizedState!==null,kt(e,t,n),ve=r):kt(e,t,n);break;default:kt(e,t,n)}}function qa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ch),t.forEach(function(r){var l=Dh.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function He(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,o=t,u=o;e:for(;u!==null;){switch(u.tag){case 5:ce=u.stateNode,Qe=!1;break e;case 3:ce=u.stateNode.containerInfo,Qe=!0;break e;case 4:ce=u.stateNode.containerInfo,Qe=!0;break e}u=u.return}if(ce===null)throw Error(_(160));wd(i,o,l),ce=null,Qe=!1;var a=l.alternate;a!==null&&(a.return=null),l.return=null}catch(c){J(l,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Sd(t,e),t=t.sibling}function Sd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(He(t,e),et(e),r&4){try{ur(3,e,e.return),ti(3,e)}catch(x){J(e,e.return,x)}try{ur(5,e,e.return)}catch(x){J(e,e.return,x)}}break;case 1:He(t,e),et(e),r&512&&n!==null&&Nn(n,n.return);break;case 5:if(He(t,e),et(e),r&512&&n!==null&&Nn(n,n.return),e.flags&32){var l=e.stateNode;try{hr(l,"")}catch(x){J(e,e.return,x)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,u=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{u==="input"&&i.type==="radio"&&i.name!=null&&Vu(l,i),lo(u,o);var c=lo(u,i);for(o=0;o<a.length;o+=2){var h=a[o],f=a[o+1];h==="style"?Yu(l,f):h==="dangerouslySetInnerHTML"?Ku(l,f):h==="children"?hr(l,f):ls(l,h,f,c)}switch(u){case"input":Zi(l,i);break;case"textarea":Wu(l,i);break;case"select":var p=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var S=i.value;S!=null?jn(l,!!i.multiple,S,!1):p!==!!i.multiple&&(i.defaultValue!=null?jn(l,!!i.multiple,i.defaultValue,!0):jn(l,!!i.multiple,i.multiple?[]:"",!1))}l[kr]=i}catch(x){J(e,e.return,x)}}break;case 6:if(He(t,e),et(e),r&4){if(e.stateNode===null)throw Error(_(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(x){J(e,e.return,x)}}break;case 3:if(He(t,e),et(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{yr(t.containerInfo)}catch(x){J(e,e.return,x)}break;case 4:He(t,e),et(e);break;case 13:He(t,e),et(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(Ms=q())),r&4&&qa(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(ve=(c=ve)||h,He(t,e),ve=c):He(t,e),et(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(R=e,h=e.child;h!==null;){for(f=R=h;R!==null;){switch(p=R,S=p.child,p.tag){case 0:case 11:case 14:case 15:ur(4,p,p.return);break;case 1:Nn(p,p.return);var w=p.stateNode;if(typeof w.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(x){J(r,n,x)}}break;case 5:Nn(p,p.return);break;case 22:if(p.memoizedState!==null){eu(f);continue}}S!==null?(S.return=p,R=S):eu(f)}h=h.sibling}e:for(h=null,f=e;;){if(f.tag===5){if(h===null){h=f;try{l=f.stateNode,c?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=f.stateNode,a=f.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,u.style.display=Qu("display",o))}catch(x){J(e,e.return,x)}}}else if(f.tag===6){if(h===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(x){J(e,e.return,x)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:He(t,e),et(e),r&4&&qa(e);break;case 21:break;default:He(t,e),et(e)}}function et(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(xd(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(hr(l,""),r.flags&=-33);var i=Xa(e);Ao(e,i,l);break;case 3:case 4:var o=r.stateNode.containerInfo,u=Xa(e);Io(e,u,o);break;default:throw Error(_(161))}}catch(a){J(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ph(e,t,n){R=e,Nd(e)}function Nd(e,t,n){for(var r=(e.mode&1)!==0;R!==null;){var l=R,i=l.child;if(l.tag===22&&r){var o=l.memoizedState!==null||nl;if(!o){var u=l.alternate,a=u!==null&&u.memoizedState!==null||ve;u=nl;var c=ve;if(nl=o,(ve=a)&&!c)for(R=l;R!==null;)o=R,a=o.child,o.tag===22&&o.memoizedState!==null?tu(l):a!==null?(a.return=o,R=a):tu(l);for(;i!==null;)R=i,Nd(i),i=i.sibling;R=l,nl=u,ve=c}Za(e)}else l.subtreeFlags&8772&&i!==null?(i.return=l,R=i):Za(e)}}function Za(e){for(;R!==null;){var t=R;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ve||ti(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ve)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Ke(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Ma(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Ma(t,o,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var f=h.dehydrated;f!==null&&yr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}ve||t.flags&512&&bo(t)}catch(p){J(t,t.return,p)}}if(t===e){R=null;break}if(n=t.sibling,n!==null){n.return=t.return,R=n;break}R=t.return}}function eu(e){for(;R!==null;){var t=R;if(t===e){R=null;break}var n=t.sibling;if(n!==null){n.return=t.return,R=n;break}R=t.return}}function tu(e){for(;R!==null;){var t=R;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ti(4,t)}catch(a){J(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(a){J(t,l,a)}}var i=t.return;try{bo(t)}catch(a){J(t,i,a)}break;case 5:var o=t.return;try{bo(t)}catch(a){J(t,o,a)}}}catch(a){J(t,t.return,a)}if(t===e){R=null;break}var u=t.sibling;if(u!==null){u.return=t.return,R=u;break}R=t.return}}var Rh=Math.ceil,zl=yt.ReactCurrentDispatcher,As=yt.ReactCurrentOwner,Be=yt.ReactCurrentBatchConfig,M=0,ae=null,Z=null,pe=0,Le=0,kn=Vt(0),le=0,Rr=null,ln=0,ni=0,Ds=0,cr=null,Ce=null,Ms=0,Dn=1/0,st=null,$l=!1,Do=null,Dt=null,rl=!1,Rt=null,Ul=0,dr=0,Mo=null,ml=-1,gl=0;function Ne(){return M&6?q():ml!==-1?ml:ml=q()}function Mt(e){return e.mode&1?M&2&&pe!==0?pe&-pe:fh.transition!==null?(gl===0&&(gl=oc()),gl):(e=$,e!==0||(e=window.event,e=e===void 0?16:pc(e.type)),e):1}function Je(e,t,n,r){if(50<dr)throw dr=0,Mo=null,Error(_(185));Ir(e,n,r),(!(M&2)||e!==ae)&&(e===ae&&(!(M&2)&&(ni|=n),le===4&&_t(e,pe)),Te(e,r),n===1&&M===0&&!(t.mode&1)&&(Dn=q()+500,ql&&Wt()))}function Te(e,t){var n=e.callbackNode;fp(e,t);var r=kl(e,e===ae?pe:0);if(r===0)n!==null&&ca(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ca(n),t===1)e.tag===0?dh(nu.bind(null,e)):Oc(nu.bind(null,e)),sh(function(){!(M&6)&&Wt()}),n=null;else{switch(sc(r)){case 1:n=us;break;case 4:n=lc;break;case 16:n=Nl;break;case 536870912:n=ic;break;default:n=Nl}n=Td(n,kd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function kd(e,t){if(ml=-1,gl=0,M&6)throw Error(_(327));var n=e.callbackNode;if(Rn()&&e.callbackNode!==n)return null;var r=kl(e,e===ae?pe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Fl(e,r);else{t=r;var l=M;M|=2;var i=Ed();(ae!==e||pe!==t)&&(st=null,Dn=q()+500,Zt(e,t));do try{Oh();break}catch(u){jd(e,u)}while(!0);Ns(),zl.current=i,M=l,Z!==null?t=0:(ae=null,pe=0,t=le)}if(t!==0){if(t===2&&(l=uo(e),l!==0&&(r=l,t=zo(e,l))),t===1)throw n=Rr,Zt(e,0),_t(e,r),Te(e,q()),n;if(t===6)_t(e,r);else{if(l=e.current.alternate,!(r&30)&&!Th(l)&&(t=Fl(e,r),t===2&&(i=uo(e),i!==0&&(r=i,t=zo(e,i))),t===1))throw n=Rr,Zt(e,0),_t(e,r),Te(e,q()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:Gt(e,Ce,st);break;case 3:if(_t(e,r),(r&130023424)===r&&(t=Ms+500-q(),10<t)){if(kl(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){Ne(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=yo(Gt.bind(null,e,Ce,st),t);break}Gt(e,Ce,st);break;case 4:if(_t(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var o=31-Ge(r);i=1<<o,o=t[o],o>l&&(l=o),r&=~i}if(r=l,r=q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Rh(r/1960))-r,10<r){e.timeoutHandle=yo(Gt.bind(null,e,Ce,st),r);break}Gt(e,Ce,st);break;case 5:Gt(e,Ce,st);break;default:throw Error(_(329))}}}return Te(e,q()),e.callbackNode===n?kd.bind(null,e):null}function zo(e,t){var n=cr;return e.current.memoizedState.isDehydrated&&(Zt(e,t).flags|=256),e=Fl(e,t),e!==2&&(t=Ce,Ce=n,t!==null&&$o(t)),e}function $o(e){Ce===null?Ce=e:Ce.push.apply(Ce,e)}function Th(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],i=l.getSnapshot;l=l.value;try{if(!Xe(i(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _t(e,t){for(t&=~Ds,t&=~ni,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ge(t),r=1<<n;e[n]=-1,t&=~r}}function nu(e){if(M&6)throw Error(_(327));Rn();var t=kl(e,0);if(!(t&1))return Te(e,q()),null;var n=Fl(e,t);if(e.tag!==0&&n===2){var r=uo(e);r!==0&&(t=r,n=zo(e,r))}if(n===1)throw n=Rr,Zt(e,0),_t(e,t),Te(e,q()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gt(e,Ce,st),Te(e,q()),null}function zs(e,t){var n=M;M|=1;try{return e(t)}finally{M=n,M===0&&(Dn=q()+500,ql&&Wt())}}function on(e){Rt!==null&&Rt.tag===0&&!(M&6)&&Rn();var t=M;M|=1;var n=Be.transition,r=$;try{if(Be.transition=null,$=1,e)return e()}finally{$=r,Be.transition=n,M=t,!(M&6)&&Wt()}}function $s(){Le=kn.current,V(kn)}function Zt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,oh(n)),Z!==null)for(n=Z.return;n!==null;){var r=n;switch(xs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pl();break;case 3:In(),V(Pe),V(ye),Ps();break;case 5:_s(r);break;case 4:In();break;case 13:V(Q);break;case 19:V(Q);break;case 10:ks(r.type._context);break;case 22:case 23:$s()}n=n.return}if(ae=e,Z=e=zt(e.current,null),pe=Le=t,le=0,Rr=null,Ds=ni=ln=0,Ce=cr=null,Xt!==null){for(t=0;t<Xt.length;t++)if(n=Xt[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=l,r.next=o}n.pending=r}Xt=null}return e}function jd(e,t){do{var n=Z;try{if(Ns(),fl.current=Ml,Dl){for(var r=Y.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Dl=!1}if(rn=0,oe=ne=Y=null,ar=!1,Cr=0,As.current=null,n===null||n.return===null){le=1,Rr=t,Z=null;break}e:{var i=e,o=n.return,u=n,a=t;if(t=pe,u.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,h=u,f=h.tag;if(!(h.mode&1)&&(f===0||f===11||f===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var S=Va(o);if(S!==null){S.flags&=-257,Wa(S,o,u,i,t),S.mode&1&&Ba(i,c,t),t=S,a=c;var w=t.updateQueue;if(w===null){var x=new Set;x.add(a),t.updateQueue=x}else w.add(a);break e}else{if(!(t&1)){Ba(i,c,t),Us();break e}a=Error(_(426))}}else if(K&&u.mode&1){var E=Va(o);if(E!==null){!(E.flags&65536)&&(E.flags|=256),Wa(E,o,u,i,t),ws(An(a,u));break e}}i=a=An(a,u),le!==4&&(le=2),cr===null?cr=[i]:cr.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=sd(i,a,t);Da(i,g);break e;case 1:u=a;var d=i.type,m=i.stateNode;if(!(i.flags&128)&&(typeof d.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Dt===null||!Dt.has(m)))){i.flags|=65536,t&=-t,i.lanes|=t;var y=ad(i,u,t);Da(i,y);break e}}i=i.return}while(i!==null)}_d(n)}catch(j){t=j,Z===n&&n!==null&&(Z=n=n.return);continue}break}while(!0)}function Ed(){var e=zl.current;return zl.current=Ml,e===null?Ml:e}function Us(){(le===0||le===3||le===2)&&(le=4),ae===null||!(ln&268435455)&&!(ni&268435455)||_t(ae,pe)}function Fl(e,t){var n=M;M|=2;var r=Ed();(ae!==e||pe!==t)&&(st=null,Zt(e,t));do try{Lh();break}catch(l){jd(e,l)}while(!0);if(Ns(),M=n,zl.current=r,Z!==null)throw Error(_(261));return ae=null,pe=0,le}function Lh(){for(;Z!==null;)Cd(Z)}function Oh(){for(;Z!==null&&!rp();)Cd(Z)}function Cd(e){var t=Rd(e.alternate,e,Le);e.memoizedProps=e.pendingProps,t===null?_d(e):Z=t,As.current=null}function _d(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Eh(n,t),n!==null){n.flags&=32767,Z=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{le=6,Z=null;return}}else if(n=jh(n,t,Le),n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);le===0&&(le=5)}function Gt(e,t,n){var r=$,l=Be.transition;try{Be.transition=null,$=1,bh(e,t,n,r)}finally{Be.transition=l,$=r}return null}function bh(e,t,n,r){do Rn();while(Rt!==null);if(M&6)throw Error(_(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(pp(e,i),e===ae&&(Z=ae=null,pe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||rl||(rl=!0,Td(Nl,function(){return Rn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Be.transition,Be.transition=null;var o=$;$=1;var u=M;M|=4,As.current=null,_h(e,n),Sd(n,e),Zp(go),jl=!!mo,go=mo=null,e.current=n,Ph(n),lp(),M=u,$=o,Be.transition=i}else e.current=n;if(rl&&(rl=!1,Rt=e,Ul=l),i=e.pendingLanes,i===0&&(Dt=null),sp(n.stateNode),Te(e,q()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if($l)throw $l=!1,e=Do,Do=null,e;return Ul&1&&e.tag!==0&&Rn(),i=e.pendingLanes,i&1?e===Mo?dr++:(dr=0,Mo=e):dr=0,Wt(),null}function Rn(){if(Rt!==null){var e=sc(Ul),t=Be.transition,n=$;try{if(Be.transition=null,$=16>e?16:e,Rt===null)var r=!1;else{if(e=Rt,Rt=null,Ul=0,M&6)throw Error(_(331));var l=M;for(M|=4,R=e.current;R!==null;){var i=R,o=i.child;if(R.flags&16){var u=i.deletions;if(u!==null){for(var a=0;a<u.length;a++){var c=u[a];for(R=c;R!==null;){var h=R;switch(h.tag){case 0:case 11:case 15:ur(8,h,i)}var f=h.child;if(f!==null)f.return=h,R=f;else for(;R!==null;){h=R;var p=h.sibling,S=h.return;if(yd(h),h===c){R=null;break}if(p!==null){p.return=S,R=p;break}R=S}}}var w=i.alternate;if(w!==null){var x=w.child;if(x!==null){w.child=null;do{var E=x.sibling;x.sibling=null,x=E}while(x!==null)}}R=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,R=o;else e:for(;R!==null;){if(i=R,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ur(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,R=g;break e}R=i.return}}var d=e.current;for(R=d;R!==null;){o=R;var m=o.child;if(o.subtreeFlags&2064&&m!==null)m.return=o,R=m;else e:for(o=d;R!==null;){if(u=R,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:ti(9,u)}}catch(j){J(u,u.return,j)}if(u===o){R=null;break e}var y=u.sibling;if(y!==null){y.return=u.return,R=y;break e}R=u.return}}if(M=l,Wt(),it&&typeof it.onPostCommitFiberRoot=="function")try{it.onPostCommitFiberRoot(Ql,e)}catch{}r=!0}return r}finally{$=n,Be.transition=t}}return!1}function ru(e,t,n){t=An(n,t),t=sd(e,t,1),e=At(e,t,1),t=Ne(),e!==null&&(Ir(e,1,t),Te(e,t))}function J(e,t,n){if(e.tag===3)ru(e,e,n);else for(;t!==null;){if(t.tag===3){ru(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Dt===null||!Dt.has(r))){e=An(n,e),e=ad(t,e,1),t=At(t,e,1),e=Ne(),t!==null&&(Ir(t,1,e),Te(t,e));break}}t=t.return}}function Ih(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ne(),e.pingedLanes|=e.suspendedLanes&n,ae===e&&(pe&n)===n&&(le===4||le===3&&(pe&130023424)===pe&&500>q()-Ms?Zt(e,0):Ds|=n),Te(e,t)}function Pd(e,t){t===0&&(e.mode&1?(t=Qr,Qr<<=1,!(Qr&130023424)&&(Qr=4194304)):t=1);var n=Ne();e=gt(e,t),e!==null&&(Ir(e,t,n),Te(e,n))}function Ah(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Pd(e,n)}function Dh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Pd(e,n)}var Rd;Rd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)_e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _e=!1,kh(e,t,n);_e=!!(e.flags&131072)}else _e=!1,K&&t.flags&1048576&&bc(t,Ll,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hl(e,t),e=t.pendingProps;var l=Ln(t,ye.current);Pn(t,n),l=Ts(null,t,r,e,l,n);var i=Ls();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Re(r)?(i=!0,Rl(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Es(t),l.updater=ei,t.stateNode=l,l._reactInternals=t,Eo(t,r,e,n),t=Po(null,t,r,!0,i,n)):(t.tag=0,K&&i&&ys(t),Se(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=zh(r),e=Ke(r,e),l){case 0:t=_o(null,t,r,e,n);break e;case 1:t=Qa(null,t,r,e,n);break e;case 11:t=Ha(null,t,r,e,n);break e;case 14:t=Ka(null,t,r,Ke(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ke(r,l),_o(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ke(r,l),Qa(e,t,r,l,n);case 3:e:{if(fd(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,l=i.element,$c(e,t),Il(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=An(Error(_(423)),t),t=Ya(e,t,r,n,l);break e}else if(r!==l){l=An(Error(_(424)),t),t=Ya(e,t,r,n,l);break e}else for(Oe=It(t.stateNode.containerInfo.firstChild),be=t,K=!0,Ye=null,n=Mc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(On(),r===l){t=vt(e,t,n);break e}Se(e,t,r,n)}t=t.child}return t;case 5:return Uc(t),e===null&&No(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,vo(r,l)?o=null:i!==null&&vo(r,i)&&(t.flags|=32),dd(e,t),Se(e,t,o,n),t.child;case 6:return e===null&&No(t),null;case 13:return pd(e,t,n);case 4:return Cs(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bn(t,null,r,n):Se(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ke(r,l),Ha(e,t,r,l,n);case 7:return Se(e,t,t.pendingProps,n),t.child;case 8:return Se(e,t,t.pendingProps.children,n),t.child;case 12:return Se(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,F(Ol,r._currentValue),r._currentValue=o,i!==null)if(Xe(i.value,o)){if(i.children===l.children&&!Pe.current){t=vt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){o=i.child;for(var a=u.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=ft(-1,n&-n),a.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?a.next=a:(a.next=h.next,h.next=a),c.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),ko(i.return,n,t),u.lanes|=n;break}a=a.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(_(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),ko(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Se(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Pn(t,n),l=Ve(l),r=r(l),t.flags|=1,Se(e,t,r,n),t.child;case 14:return r=t.type,l=Ke(r,t.pendingProps),l=Ke(r.type,l),Ka(e,t,r,l,n);case 15:return ud(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ke(r,l),hl(e,t),t.tag=1,Re(r)?(e=!0,Rl(t)):e=!1,Pn(t,n),od(t,r,l),Eo(t,r,l,n),Po(null,t,r,!0,e,n);case 19:return hd(e,t,n);case 22:return cd(e,t,n)}throw Error(_(156,t.tag))};function Td(e,t){return rc(e,t)}function Mh(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ue(e,t,n,r){return new Mh(e,t,n,r)}function Fs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zh(e){if(typeof e=="function")return Fs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===os)return 11;if(e===ss)return 14}return 2}function zt(e,t){var n=e.alternate;return n===null?(n=Ue(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vl(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")Fs(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case pn:return en(n.children,l,i,t);case is:o=8,l|=8;break;case Yi:return e=Ue(12,n,t,l|2),e.elementType=Yi,e.lanes=i,e;case Gi:return e=Ue(13,n,t,l),e.elementType=Gi,e.lanes=i,e;case Ji:return e=Ue(19,n,t,l),e.elementType=Ji,e.lanes=i,e;case Uu:return ri(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zu:o=10;break e;case $u:o=9;break e;case os:o=11;break e;case ss:o=14;break e;case jt:o=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Ue(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function en(e,t,n,r){return e=Ue(7,e,r,t),e.lanes=n,e}function ri(e,t,n,r){return e=Ue(22,e,r,t),e.elementType=Uu,e.lanes=n,e.stateNode={isHidden:!1},e}function zi(e,t,n){return e=Ue(6,e,null,t),e.lanes=n,e}function $i(e,t,n){return t=Ue(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $h(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xi(0),this.expirationTimes=xi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xi(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Bs(e,t,n,r,l,i,o,u,a){return e=new $h(e,t,n,u,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ue(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Es(i),e}function Uh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ld(e){if(!e)return Ft;e=e._reactInternals;e:{if(an(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Re(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(Re(n))return Lc(e,n,t)}return t}function Od(e,t,n,r,l,i,o,u,a){return e=Bs(n,r,!0,e,l,i,o,u,a),e.context=Ld(null),n=e.current,r=Ne(),l=Mt(n),i=ft(r,l),i.callback=t??null,At(n,i,l),e.current.lanes=l,Ir(e,l,r),Te(e,r),e}function li(e,t,n,r){var l=t.current,i=Ne(),o=Mt(l);return n=Ld(n),t.context===null?t.context=n:t.pendingContext=n,t=ft(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=At(l,t,o),e!==null&&(Je(e,l,o,i),dl(e,l,o)),o}function Bl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function lu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Vs(e,t){lu(e,t),(e=e.alternate)&&lu(e,t)}function Fh(){return null}var bd=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ws(e){this._internalRoot=e}ii.prototype.render=Ws.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));li(e,t,null,null)};ii.prototype.unmount=Ws.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;on(function(){li(null,e,null,null)}),t[mt]=null}};function ii(e){this._internalRoot=e}ii.prototype.unstable_scheduleHydration=function(e){if(e){var t=cc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ct.length&&t!==0&&t<Ct[n].priority;n++);Ct.splice(n,0,e),n===0&&fc(e)}};function Hs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function oi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function iu(){}function Bh(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var c=Bl(o);i.call(c)}}var o=Od(t,r,e,0,null,!1,!1,"",iu);return e._reactRootContainer=o,e[mt]=o.current,Sr(e.nodeType===8?e.parentNode:e),on(),o}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var u=r;r=function(){var c=Bl(a);u.call(c)}}var a=Bs(e,0,!1,null,null,!1,!1,"",iu);return e._reactRootContainer=a,e[mt]=a.current,Sr(e.nodeType===8?e.parentNode:e),on(function(){li(t,a,n,r)}),a}function si(e,t,n,r,l){var i=n._reactRootContainer;if(i){var o=i;if(typeof l=="function"){var u=l;l=function(){var a=Bl(o);u.call(a)}}li(t,o,e,l)}else o=Bh(n,t,e,l,r);return Bl(o)}ac=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=tr(t.pendingLanes);n!==0&&(cs(t,n|1),Te(t,q()),!(M&6)&&(Dn=q()+500,Wt()))}break;case 13:on(function(){var r=gt(e,1);if(r!==null){var l=Ne();Je(r,e,1,l)}}),Vs(e,1)}};ds=function(e){if(e.tag===13){var t=gt(e,134217728);if(t!==null){var n=Ne();Je(t,e,134217728,n)}Vs(e,134217728)}};uc=function(e){if(e.tag===13){var t=Mt(e),n=gt(e,t);if(n!==null){var r=Ne();Je(n,e,t,r)}Vs(e,t)}};cc=function(){return $};dc=function(e,t){var n=$;try{return $=e,t()}finally{$=n}};oo=function(e,t,n){switch(t){case"input":if(Zi(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Xl(r);if(!l)throw Error(_(90));Bu(r),Zi(r,l)}}}break;case"textarea":Wu(e,n);break;case"select":t=n.value,t!=null&&jn(e,!!n.multiple,t,!1)}};Xu=zs;qu=on;var Vh={usingClientEntryPoint:!1,Events:[Dr,vn,Xl,Gu,Ju,zs]},qn={findFiberByHostInstance:Jt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Wh={bundleType:qn.bundleType,version:qn.version,rendererPackageName:qn.rendererPackageName,rendererConfig:qn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:yt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=tc(e),e===null?null:e.stateNode},findFiberByHostInstance:qn.findFiberByHostInstance||Fh,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ll.isDisabled&&ll.supportsFiber)try{Ql=ll.inject(Wh),it=ll}catch{}}Ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vh;Ae.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hs(t))throw Error(_(200));return Uh(e,t,null,n)};Ae.createRoot=function(e,t){if(!Hs(e))throw Error(_(299));var n=!1,r="",l=bd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Bs(e,1,!1,null,null,n,!1,r,l),e[mt]=t.current,Sr(e.nodeType===8?e.parentNode:e),new Ws(t)};Ae.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=tc(t),e=e===null?null:e.stateNode,e};Ae.flushSync=function(e){return on(e)};Ae.hydrate=function(e,t,n){if(!oi(t))throw Error(_(200));return si(null,e,t,!0,n)};Ae.hydrateRoot=function(e,t,n){if(!Hs(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",o=bd;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Od(t,null,e,1,n??null,l,!1,i,o),e[mt]=t.current,Sr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new ii(t)};Ae.render=function(e,t,n){if(!oi(t))throw Error(_(200));return si(null,e,t,!1,n)};Ae.unmountComponentAtNode=function(e){if(!oi(e))throw Error(_(40));return e._reactRootContainer?(on(function(){si(null,null,e,!1,function(){e._reactRootContainer=null,e[mt]=null})}),!0):!1};Ae.unstable_batchedUpdates=zs;Ae.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!oi(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return si(e,t,n,!1,r)};Ae.version="18.3.1-next-f1338f8080-20240426";function Id(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Id)}catch(e){console.error(e)}}Id(),Iu.exports=Ae;var Hh=Iu.exports,Ad,ou=Hh;Ad=ou.createRoot,ou.hydrateRoot;/**
41
+ * @remix-run/router v1.23.3
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
44
44
  *
@@ -46,8 +46,8 @@ Error generating stack: `+i.message+`
46
46
  * LICENSE.md file in the root directory of this source tree.
47
47
  *
48
48
  * @license MIT
49
- */function dr(){return dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dr.apply(this,arguments)}var ct;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ct||(ct={}));const js="popstate";function Hp(e){e===void 0&&(e={});function t(l,i){let{pathname:o="/",search:u="",hash:s=""}=Kt(l.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),vo("",{pathname:o,search:u,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(l,i){let o=l.document.querySelector("base"),u="";if(o&&o.getAttribute("href")){let s=l.location.href,c=s.indexOf("#");u=c===-1?s:s.slice(0,c)}return u+"#"+(typeof i=="string"?i:jl(i))}function r(l,i){Hl(l.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(i)+")")}return Kp(t,n,r,e)}function K(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Hl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Qp(){return Math.random().toString(36).substr(2,8)}function Ps(e,t){return{usr:e.state,key:e.key,idx:t}}function vo(e,t,n,r){return n===void 0&&(n=null),dr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Kt(t):t,{state:n,key:t&&t.key||r||Qp()})}function jl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Kt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Kp(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,o=l.history,u=ct.Pop,s=null,c=m();c==null&&(c=0,o.replaceState(dr({},o.state,{idx:c}),""));function m(){return(o.state||{idx:null}).idx}function d(){u=ct.Pop;let N=m(),p=N==null?null:N-c;c=N,s&&s({action:u,location:S.location,delta:p})}function h(N,p){u=ct.Push;let f=vo(S.location,N,p);n&&n(f,N),c=m()+1;let v=Ps(f,c),g=S.createHref(f);try{o.pushState(v,"",g)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;l.location.assign(g)}i&&s&&s({action:u,location:S.location,delta:1})}function y(N,p){u=ct.Replace;let f=vo(S.location,N,p);n&&n(f,N),c=m();let v=Ps(f,c),g=S.createHref(f);o.replaceState(v,"",g),i&&s&&s({action:u,location:S.location,delta:0})}function w(N){let p=l.location.origin!=="null"?l.location.origin:l.location.href,f=typeof N=="string"?N:jl(N);return f=f.replace(/ $/,"%20"),K(p,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,p)}let S={get action(){return u},get location(){return e(l,o)},listen(N){if(s)throw new Error("A history only accepts one active listener");return l.addEventListener(js,d),s=N,()=>{l.removeEventListener(js,d),s=null}},createHref(N){return t(l,N)},createURL:w,encodeLocation(N){let p=w(N);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:h,replace:y,go(N){return o.go(N)}};return S}var _s;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(_s||(_s={}));function Yp(e,t,n){return n===void 0&&(n="/"),Xp(e,t,n)}function Xp(e,t,n,r){let l=typeof t=="string"?Kt(t):t,i=kn(l.pathname||"/",n);if(i==null)return null;let o=Gc(e);Gp(o);let u=null;for(let s=0;u==null&&s<o.length;++s){let c=oh(i);u=lh(o[s],c)}return u}function Gc(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let l=(i,o,u)=>{let s={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};s.relativePath.startsWith("/")&&(K(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let c=xt([r,s.relativePath]),m=n.concat(s);i.children&&i.children.length>0&&(K(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Gc(i.children,t,m,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:nh(c,i.index),routesMeta:m})};return e.forEach((i,o)=>{var u;if(i.path===""||!((u=i.path)!=null&&u.includes("?")))l(i,o);else for(let s of Jc(i.path))l(i,o,s)}),t}function Jc(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return l?[i,""]:[i];let o=Jc(r.join("/")),u=[];return u.push(...o.map(s=>s===""?i:[i,s].join("/"))),l&&u.push(...o),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function Gp(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:rh(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Jp=/^:[\w-]+$/,Zp=3,qp=2,bp=1,eh=10,th=-2,Ls=e=>e==="*";function nh(e,t){let n=e.split("/"),r=n.length;return n.some(Ls)&&(r+=th),t&&(r+=qp),n.filter(l=>!Ls(l)).reduce((l,i)=>l+(Jp.test(i)?Zp:i===""?bp:eh),r)}function rh(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function lh(e,t,n){let{routesMeta:r}=e,l={},i="/",o=[];for(let u=0;u<r.length;++u){let s=r[u],c=u===r.length-1,m=i==="/"?t:t.slice(i.length)||"/",d=go({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},m),h=s.route;if(!d)return null;Object.assign(l,d.params),o.push({params:l,pathname:xt([i,d.pathname]),pathnameBase:fh(xt([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=xt([i,d.pathnameBase]))}return o}function go(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ih(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let i=l[0],o=i.replace(/(.)\/+$/,"$1"),u=l.slice(1);return{params:r.reduce((c,m,d)=>{let{paramName:h,isOptional:y}=m;if(h==="*"){let S=u[d]||"";o=i.slice(0,i.length-S.length).replace(/(.)\/+$/,"$1")}const w=u[d];return y&&!w?c[h]=void 0:c[h]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function ih(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Hl(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,u,s)=>(r.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function oh(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Hl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function kn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const uh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sh=e=>uh.test(e);function ah(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Kt(e):e,i;if(n)if(sh(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),Hl(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Rs(n.substring(1),"/"):i=Rs(n,t)}else i=t;return{pathname:i,search:dh(r),hash:ph(l)}}function Rs(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Si(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ch(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Zc(e,t){let n=ch(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function qc(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Kt(e):(l=dr({},e),K(!l.pathname||!l.pathname.includes("?"),Si("?","pathname","search",l)),K(!l.pathname||!l.pathname.includes("#"),Si("#","pathname","hash",l)),K(!l.search||!l.search.includes("#"),Si("#","search","hash",l)));let i=e===""||l.pathname==="",o=i?"/":l.pathname,u;if(o==null)u=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;l.pathname=h.join("/")}u=d>=0?t[d]:"/"}let s=ah(l,u),c=o&&o!=="/"&&o.endsWith("/"),m=(i||o===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(c||m)&&(s.pathname+="/"),s}const xt=e=>e.join("/").replace(/\/\/+/g,"/"),fh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),dh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ph=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function hh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const bc=["post","put","patch","delete"];new Set(bc);const mh=["get",...bc];new Set(mh);/**
50
- * React Router v6.30.3
49
+ */function Tr(){return Tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tr.apply(null,arguments)}var Tt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Tt||(Tt={}));const su="popstate";function Kh(e){e===void 0&&(e={});function t(l,i){let{pathname:o="/",search:u="",hash:a=""}=un(l.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),Uo("",{pathname:o,search:u,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(l,i){let o=l.document.querySelector("base"),u="";if(o&&o.getAttribute("href")){let a=l.location.href,c=a.indexOf("#");u=c===-1?a:a.slice(0,c)}return u+"#"+(typeof i=="string"?i:Vl(i))}function r(l,i){ai(l.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(i)+")")}return Yh(t,n,r,e)}function X(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ai(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Qh(){return Math.random().toString(36).substr(2,8)}function au(e,t){return{usr:e.state,key:e.key,idx:t}}function Uo(e,t,n,r){return n===void 0&&(n=null),Tr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?un(t):t,{state:n,key:t&&t.key||r||Qh()})}function Vl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function un(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Yh(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,o=l.history,u=Tt.Pop,a=null,c=h();c==null&&(c=0,o.replaceState(Tr({},o.state,{idx:c}),""));function h(){return(o.state||{idx:null}).idx}function f(){u=Tt.Pop;let E=h(),g=E==null?null:E-c;c=E,a&&a({action:u,location:x.location,delta:g})}function p(E,g){u=Tt.Push;let d=Uo(x.location,E,g);n&&n(d,E),c=h()+1;let m=au(d,c),y=x.createHref(d);try{o.pushState(m,"",y)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;l.location.assign(y)}i&&a&&a({action:u,location:x.location,delta:1})}function S(E,g){u=Tt.Replace;let d=Uo(x.location,E,g);n&&n(d,E),c=h();let m=au(d,c),y=x.createHref(d);o.replaceState(m,"",y),i&&a&&a({action:u,location:x.location,delta:0})}function w(E){let g=l.location.origin!=="null"?l.location.origin:l.location.href,d=typeof E=="string"?E:Vl(E);return d=d.replace(/ $/,"%20"),X(g,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,g)}let x={get action(){return u},get location(){return e(l,o)},listen(E){if(a)throw new Error("A history only accepts one active listener");return l.addEventListener(su,f),a=E,()=>{l.removeEventListener(su,f),a=null}},createHref(E){return t(l,E)},createURL:w,encodeLocation(E){let g=w(E);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:S,go(E){return o.go(E)}};return x}var uu;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(uu||(uu={}));function Gh(e,t,n){return n===void 0&&(n="/"),Jh(e,t,n)}function Jh(e,t,n,r){let l=typeof t=="string"?un(t):t,i=Mn(l.pathname||"/",n);if(i==null)return null;let o=Dd(e);Xh(o);let u=null,a=am(i);for(let c=0;u==null&&c<o.length;++c)u=om(o[c],a);return u}function Dd(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let l=(i,o,u)=>{let a={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};a.relativePath.startsWith("/")&&(X(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let c=$t([r,a.relativePath]),h=n.concat(a);i.children&&i.children.length>0&&(X(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Dd(i.children,t,h,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:lm(c,i.index),routesMeta:h})};return e.forEach((i,o)=>{var u;if(i.path===""||!((u=i.path)!=null&&u.includes("?")))l(i,o);else for(let a of Md(i.path))l(i,o,a)}),t}function Md(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return l?[i,""]:[i];let o=Md(r.join("/")),u=[];return u.push(...o.map(a=>a===""?i:[i,a].join("/"))),l&&u.push(...o),u.map(a=>e.startsWith("/")&&a===""?"/":a)}function Xh(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:im(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const qh=/^:[\w-]+$/,Zh=3,em=2,tm=1,nm=10,rm=-2,cu=e=>e==="*";function lm(e,t){let n=e.split("/"),r=n.length;return n.some(cu)&&(r+=rm),t&&(r+=em),n.filter(l=>!cu(l)).reduce((l,i)=>l+(qh.test(i)?Zh:i===""?tm:nm),r)}function im(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function om(e,t,n){let{routesMeta:r}=e,l={},i="/",o=[];for(let u=0;u<r.length;++u){let a=r[u],c=u===r.length-1,h=i==="/"?t:t.slice(i.length)||"/",f=Fo({path:a.relativePath,caseSensitive:a.caseSensitive,end:c},h),p=a.route;if(!f)return null;Object.assign(l,f.params),o.push({params:l,pathname:$t([i,f.pathname]),pathnameBase:pm($t([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=$t([i,f.pathnameBase]))}return o}function Fo(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=sm(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let i=l[0],o=i.replace(/(.)\/+$/,"$1"),u=l.slice(1);return{params:r.reduce((c,h,f)=>{let{paramName:p,isOptional:S}=h;if(p==="*"){let x=u[f]||"";o=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const w=u[f];return S&&!w?c[p]=void 0:c[p]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function sm(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ai(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,u,a)=>(r.push({paramName:u,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function am(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ai(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const um=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cm=e=>um.test(e);function dm(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?un(e):e,i;if(n)if(cm(n))i=n;else{if(n.includes("//")){let o=n;n=Ud(n),ai(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=du(n.substring(1),"/"):i=du(n,t)}else i=t;return{pathname:i,search:hm(r),hash:mm(l)}}function du(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Ui(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function fm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function zd(e,t){let n=fm(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function $d(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=un(e):(l=Tr({},e),X(!l.pathname||!l.pathname.includes("?"),Ui("?","pathname","search",l)),X(!l.pathname||!l.pathname.includes("#"),Ui("#","pathname","hash",l)),X(!l.search||!l.search.includes("#"),Ui("#","search","hash",l)));let i=e===""||l.pathname==="",o=i?"/":l.pathname,u;if(o==null)u=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;l.pathname=p.join("/")}u=f>=0?t[f]:"/"}let a=dm(l,u),c=o&&o!=="/"&&o.endsWith("/"),h=(i||o===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(c||h)&&(a.pathname+="/"),a}const Ud=e=>e.replace(/\/\/+/g,"/"),$t=e=>Ud(e.join("/")),pm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hm=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mm=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function gm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Fd=["post","put","patch","delete"];new Set(Fd);const vm=["get",...Fd];new Set(vm);/**
50
+ * React Router v6.30.4
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
53
53
  *
@@ -55,8 +55,8 @@ Error generating stack: `+i.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pr.apply(this,arguments)}const Ql=x.createContext(null),ef=x.createContext(null),jt=x.createContext(null),Kl=x.createContext(null),Pt=x.createContext({outlet:null,matches:[],isDataRoute:!1}),tf=x.createContext(null);function vh(e,t){let{relative:n}=t===void 0?{}:t;Sr()||K(!1);let{basename:r,navigator:l}=x.useContext(jt),{hash:i,pathname:o,search:u}=Yl(e,{relative:n}),s=o;return r!=="/"&&(s=o==="/"?r:xt([r,o])),l.createHref({pathname:s,search:u,hash:i})}function Sr(){return x.useContext(Kl)!=null}function kr(){return Sr()||K(!1),x.useContext(Kl).location}function nf(e){x.useContext(jt).static||x.useLayoutEffect(e)}function gh(){let{isDataRoute:e}=x.useContext(Pt);return e?Th():yh()}function yh(){Sr()||K(!1);let e=x.useContext(Ql),{basename:t,future:n,navigator:r}=x.useContext(jt),{matches:l}=x.useContext(Pt),{pathname:i}=kr(),o=JSON.stringify(Zc(l,n.v7_relativeSplatPath)),u=x.useRef(!1);return nf(()=>{u.current=!0}),x.useCallback(function(c,m){if(m===void 0&&(m={}),!u.current)return;if(typeof c=="number"){r.go(c);return}let d=qc(c,JSON.parse(o),i,m.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:xt([t,d.pathname])),(m.replace?r.replace:r.push)(d,m.state,m)},[t,r,o,i,e])}function xh(){let{matches:e}=x.useContext(Pt),t=e[e.length-1];return t?t.params:{}}function Yl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(jt),{matches:l}=x.useContext(Pt),{pathname:i}=kr(),o=JSON.stringify(Zc(l,r.v7_relativeSplatPath));return x.useMemo(()=>qc(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function wh(e,t){return Sh(e,t)}function Sh(e,t,n,r){Sr()||K(!1);let{navigator:l}=x.useContext(jt),{matches:i}=x.useContext(Pt),o=i[i.length-1],u=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let c=kr(),m;if(t){var d;let N=typeof t=="string"?Kt(t):t;s==="/"||(d=N.pathname)!=null&&d.startsWith(s)||K(!1),m=N}else m=c;let h=m.pathname||"/",y=h;if(s!=="/"){let N=s.replace(/^\//,"").split("/");y="/"+h.replace(/^\//,"").split("/").slice(N.length).join("/")}let w=Yp(e,{pathname:y}),S=jh(w&&w.map(N=>Object.assign({},N,{params:Object.assign({},u,N.params),pathname:xt([s,l.encodeLocation?l.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?s:xt([s,l.encodeLocation?l.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),i,n,r);return t&&S?x.createElement(Kl.Provider,{value:{location:pr({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:ct.Pop}},S):S}function kh(){let e=Rh(),t=hh(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:l},n):null,null)}const Eh=x.createElement(kh,null);class Ch extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(Pt.Provider,{value:this.props.routeContext},x.createElement(tf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Nh(e){let{routeContext:t,match:n,children:r}=e,l=x.useContext(Ql);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Pt.Provider,{value:t},r)}function jh(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,u=(l=n)==null?void 0:l.errors;if(u!=null){let m=o.findIndex(d=>d.route.id&&(u==null?void 0:u[d.route.id])!==void 0);m>=0||K(!1),o=o.slice(0,Math.min(o.length,m+1))}let s=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let m=0;m<o.length;m++){let d=o[m];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=m),d.route.id){let{loaderData:h,errors:y}=n,w=d.route.loader&&h[d.route.id]===void 0&&(!y||y[d.route.id]===void 0);if(d.route.lazy||w){s=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((m,d,h)=>{let y,w=!1,S=null,N=null;n&&(y=u&&d.route.id?u[d.route.id]:void 0,S=d.route.errorElement||Eh,s&&(c<0&&h===0?(zh("route-fallback"),w=!0,N=null):c===h&&(w=!0,N=d.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,h+1)),f=()=>{let v;return y?v=S:w?v=N:d.route.Component?v=x.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=m,x.createElement(Nh,{match:d,routeContext:{outlet:m,matches:p,isDataRoute:n!=null},children:v})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?x.createElement(Ch,{location:n.location,revalidation:n.revalidation,component:S,error:y,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):f()},null)}var rf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(rf||{}),lf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(lf||{});function Ph(e){let t=x.useContext(Ql);return t||K(!1),t}function _h(e){let t=x.useContext(ef);return t||K(!1),t}function Lh(e){let t=x.useContext(Pt);return t||K(!1),t}function of(e){let t=Lh(),n=t.matches[t.matches.length-1];return n.route.id||K(!1),n.route.id}function Rh(){var e;let t=x.useContext(tf),n=_h(),r=of();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Th(){let{router:e}=Ph(rf.UseNavigateStable),t=of(lf.UseNavigateStable),n=x.useRef(!1);return nf(()=>{n.current=!0}),x.useCallback(function(l,i){i===void 0&&(i={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,pr({fromRouteId:t},i)))},[e,t])}const Ts={};function zh(e,t,n){Ts[e]||(Ts[e]=!0)}function Oh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function tl(e){K(!1)}function Ih(e){let{basename:t="/",children:n=null,location:r,navigationType:l=ct.Pop,navigator:i,static:o=!1,future:u}=e;Sr()&&K(!1);let s=t.replace(/^\/*/,"/"),c=x.useMemo(()=>({basename:s,navigator:i,static:o,future:pr({v7_relativeSplatPath:!1},u)}),[s,u,i,o]);typeof r=="string"&&(r=Kt(r));let{pathname:m="/",search:d="",hash:h="",state:y=null,key:w="default"}=r,S=x.useMemo(()=>{let N=kn(m,s);return N==null?null:{location:{pathname:N,search:d,hash:h,state:y,key:w},navigationType:l}},[s,m,d,h,y,w,l]);return S==null?null:x.createElement(jt.Provider,{value:c},x.createElement(Kl.Provider,{children:n,value:S}))}function Mh(e){let{children:t,location:n}=e;return wh(yo(t),n)}new Promise(()=>{});function yo(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,l)=>{if(!x.isValidElement(r))return;let i=[...t,l];if(r.type===x.Fragment){n.push.apply(n,yo(r.props.children,i));return}r.type!==tl&&K(!1),!r.props.index||!r.props.children||K(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=yo(r.props.children,i)),n.push(o)}),n}/**
59
- * React Router DOM v6.30.3
58
+ */function Lr(){return Lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lr.apply(null,arguments)}const ui=v.createContext(null),Bd=v.createContext(null),Ht=v.createContext(null),ci=v.createContext(null),Kt=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Vd=v.createContext(null);function ym(e,t){let{relative:n}=t===void 0?{}:t;zr()||X(!1);let{basename:r,navigator:l}=v.useContext(Ht),{hash:i,pathname:o,search:u}=di(e,{relative:n}),a=o;return r!=="/"&&(a=o==="/"?r:$t([r,o])),l.createHref({pathname:a,search:u,hash:i})}function zr(){return v.useContext(ci)!=null}function Bn(){return zr()||X(!1),v.useContext(ci).location}function Wd(e){v.useContext(Ht).static||v.useLayoutEffect(e)}function Hd(){let{isDataRoute:e}=v.useContext(Kt);return e?Om():xm()}function xm(){zr()||X(!1);let e=v.useContext(ui),{basename:t,future:n,navigator:r}=v.useContext(Ht),{matches:l}=v.useContext(Kt),{pathname:i}=Bn(),o=JSON.stringify(zd(l,n.v7_relativeSplatPath)),u=v.useRef(!1);return Wd(()=>{u.current=!0}),v.useCallback(function(c,h){if(h===void 0&&(h={}),!u.current)return;if(typeof c=="number"){r.go(c);return}let f=$d(c,JSON.parse(o),i,h.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:$t([t,f.pathname])),(h.replace?r.replace:r.push)(f,h.state,h)},[t,r,o,i,e])}function wm(){let{matches:e}=v.useContext(Kt),t=e[e.length-1];return t?t.params:{}}function di(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(Ht),{matches:l}=v.useContext(Kt),{pathname:i}=Bn(),o=JSON.stringify(zd(l,r.v7_relativeSplatPath));return v.useMemo(()=>$d(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Sm(e,t){return Nm(e,t)}function Nm(e,t,n,r){zr()||X(!1);let{navigator:l}=v.useContext(Ht),{matches:i}=v.useContext(Kt),o=i[i.length-1],u=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let c=Bn(),h;if(t){var f;let E=typeof t=="string"?un(t):t;a==="/"||(f=E.pathname)!=null&&f.startsWith(a)||X(!1),h=E}else h=c;let p=h.pathname||"/",S=p;if(a!=="/"){let E=a.replace(/^\//,"").split("/");S="/"+p.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=Gh(e,{pathname:S}),x=_m(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:$t([a,l.encodeLocation?l.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?a:$t([a,l.encodeLocation?l.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),i,n,r);return t&&x?v.createElement(ci.Provider,{value:{location:Lr({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Tt.Pop}},x):x}function km(){let e=Lm(),t=gm(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:l},n):null,null)}const jm=v.createElement(km,null);class Em extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(Kt.Provider,{value:this.props.routeContext},v.createElement(Vd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Cm(e){let{routeContext:t,match:n,children:r}=e,l=v.useContext(ui);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Kt.Provider,{value:t},r)}function _m(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,u=(l=n)==null?void 0:l.errors;if(u!=null){let h=o.findIndex(f=>f.route.id&&(u==null?void 0:u[f.route.id])!==void 0);h>=0||X(!1),o=o.slice(0,Math.min(o.length,h+1))}let a=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<o.length;h++){let f=o[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=h),f.route.id){let{loaderData:p,errors:S}=n,w=f.route.loader&&p[f.route.id]===void 0&&(!S||S[f.route.id]===void 0);if(f.route.lazy||w){a=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((h,f,p)=>{let S,w=!1,x=null,E=null;n&&(S=u&&f.route.id?u[f.route.id]:void 0,x=f.route.errorElement||jm,a&&(c<0&&p===0?(bm("route-fallback"),w=!0,E=null):c===p&&(w=!0,E=f.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,p+1)),d=()=>{let m;return S?m=x:w?m=E:f.route.Component?m=v.createElement(f.route.Component,null):f.route.element?m=f.route.element:m=h,v.createElement(Cm,{match:f,routeContext:{outlet:h,matches:g,isDataRoute:n!=null},children:m})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?v.createElement(Em,{location:n.location,revalidation:n.revalidation,component:x,error:S,children:d(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):d()},null)}var Kd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Kd||{}),Qd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Qd||{});function Pm(e){let t=v.useContext(ui);return t||X(!1),t}function Rm(e){let t=v.useContext(Bd);return t||X(!1),t}function Tm(e){let t=v.useContext(Kt);return t||X(!1),t}function Yd(e){let t=Tm(),n=t.matches[t.matches.length-1];return n.route.id||X(!1),n.route.id}function Lm(){var e;let t=v.useContext(Vd),n=Rm(),r=Yd();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Om(){let{router:e}=Pm(Kd.UseNavigateStable),t=Yd(Qd.UseNavigateStable),n=v.useRef(!1);return Wd(()=>{n.current=!0}),v.useCallback(function(l,i){i===void 0&&(i={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Lr({fromRouteId:t},i)))},[e,t])}const fu={};function bm(e,t,n){fu[e]||(fu[e]=!0)}function Im(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function yl(e){X(!1)}function Am(e){let{basename:t="/",children:n=null,location:r,navigationType:l=Tt.Pop,navigator:i,static:o=!1,future:u}=e;zr()&&X(!1);let a=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:a,navigator:i,static:o,future:Lr({v7_relativeSplatPath:!1},u)}),[a,u,i,o]);typeof r=="string"&&(r=un(r));let{pathname:h="/",search:f="",hash:p="",state:S=null,key:w="default"}=r,x=v.useMemo(()=>{let E=Mn(h,a);return E==null?null:{location:{pathname:E,search:f,hash:p,state:S,key:w},navigationType:l}},[a,h,f,p,S,w,l]);return x==null?null:v.createElement(Ht.Provider,{value:c},v.createElement(ci.Provider,{children:n,value:x}))}function Dm(e){let{children:t,location:n}=e;return Sm(Bo(t),n)}new Promise(()=>{});function Bo(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,l)=>{if(!v.isValidElement(r))return;let i=[...t,l];if(r.type===v.Fragment){n.push.apply(n,Bo(r.props.children,i));return}r.type!==yl&&X(!1),!r.props.index||!r.props.children||X(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Bo(r.props.children,i)),n.push(o)}),n}/**
59
+ * React Router DOM v6.30.4
60
60
  *
61
61
  * Copyright (c) Remix Software Inc.
62
62
  *
@@ -64,8 +64,12 @@ Error generating stack: `+i.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function Pl(){return Pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pl.apply(this,arguments)}function uf(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i<r.length;i++)l=r[i],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function Dh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Fh(e,t){return e.button===0&&(!t||t==="_self")&&!Dh(e)}const Uh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],$h=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Bh="6";try{window.__reactRouterVersion=Bh}catch{}const Ah=x.createContext({isTransitioning:!1}),Vh="startTransition",zs=zf[Vh];function Wh(e){let{basename:t,children:n,future:r,window:l}=e,i=x.useRef();i.current==null&&(i.current=Hp({window:l,v5Compat:!0}));let o=i.current,[u,s]=x.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},m=x.useCallback(d=>{c&&zs?zs(()=>s(d)):s(d)},[s,c]);return x.useLayoutEffect(()=>o.listen(m),[o,m]),x.useEffect(()=>Oh(r),[r]),x.createElement(Ih,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o,future:r})}const Hh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Qh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hr=x.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:o,state:u,target:s,to:c,preventScrollReset:m,viewTransition:d}=t,h=uf(t,Uh),{basename:y}=x.useContext(jt),w,S=!1;if(typeof c=="string"&&Qh.test(c)&&(w=c,Hh))try{let v=new URL(window.location.href),g=c.startsWith("//")?new URL(v.protocol+c):new URL(c),k=kn(g.pathname,y);g.origin===v.origin&&k!=null?c=k+g.search+g.hash:S=!0}catch{}let N=vh(c,{relative:l}),p=Xh(c,{replace:o,state:u,target:s,preventScrollReset:m,relative:l,viewTransition:d});function f(v){r&&r(v),v.defaultPrevented||p(v)}return x.createElement("a",Pl({},h,{href:w||N,onClick:S||i?r:f,ref:n,target:s}))}),Kh=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:o=!1,style:u,to:s,viewTransition:c,children:m}=t,d=uf(t,$h),h=Yl(s,{relative:d.relative}),y=kr(),w=x.useContext(ef),{navigator:S,basename:N}=x.useContext(jt),p=w!=null&&Gh(h)&&c===!0,f=S.encodeLocation?S.encodeLocation(h).pathname:h.pathname,v=y.pathname,g=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;l||(v=v.toLowerCase(),g=g?g.toLowerCase():null,f=f.toLowerCase()),g&&N&&(g=kn(g,N)||g);const k=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let j=v===f||!o&&v.startsWith(f)&&v.charAt(k)==="/",P=g!=null&&(g===f||!o&&g.startsWith(f)&&g.charAt(f.length)==="/"),_={isActive:j,isPending:P,isTransitioning:p},D=j?r:void 0,C;typeof i=="function"?C=i(_):C=[i,j?"active":null,P?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let F=typeof u=="function"?u(_):u;return x.createElement(hr,Pl({},d,{"aria-current":D,className:C,ref:n,style:F,to:s,viewTransition:c}),typeof m=="function"?m(_):m)});var xo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xo||(xo={}));var Os;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Os||(Os={}));function Yh(e){let t=x.useContext(Ql);return t||K(!1),t}function Xh(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:o,viewTransition:u}=t===void 0?{}:t,s=gh(),c=kr(),m=Yl(e,{relative:o});return x.useCallback(d=>{if(Fh(d,n)){d.preventDefault();let h=r!==void 0?r:jl(c)===jl(m);s(e,{replace:h,state:l,preventScrollReset:i,relative:o,viewTransition:u})}},[c,s,m,r,l,n,e,i,o,u])}function Gh(e,t){t===void 0&&(t={});let n=x.useContext(Ah);n==null&&K(!1);let{basename:r}=Yh(xo.useViewTransitionState),l=Yl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=kn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=kn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return go(l.pathname,o)!=null||go(l.pathname,i)!=null}function sf(e,t=!0){return e.then(async n=>{const r=await n.text();if(r==="")return null;const l=JSON.parse(r);return l===void 0?null:l}).then(n=>t&&(n!=null&&n.error)?Promise.reject(n.error):n)}function ve(e){return sf(fetch(e))}function ge(e,t,n=!0){return sf(fetch(e,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)}),n)}function af(e,t){return ge(`/c/${e}/event/engine_ui/box/query/io.picolabs.pico-engine-ui/box`,t)}async function vu(e){let t=[];const n=await ve(`/c/${e}/query/io.picolabs.pico-engine-ui/box`);t.push(n);for(const r of n.children)t=t.concat(await vu(r));return t}const Jh=async e=>{let t=[],n=[];for(let l=0;l<e.length;l++)try{for(t=t.concat(await ve(`/c/${e[l].eci}/query/io.picolabs.subscription/established`));n.length<t.length;)n.push(l)}catch{}let r={};for(let l=0;l<t.length;l++)r[t[l].Id]?r[t[l].Id]=[...r[t[l].Id],e[n[l]].eci]:r[t[l].Id]=[e[n[l]].eci];return r},Zh=(e,t)=>{let n=[];return Object.keys(e).map(r=>{e[r].length>1?n.push({to:{x:t[e[r][0]].x+t[e[r][0]].width/2,y:t[e[r][0]].y+t[e[r][0]].height/2},from:{x:t[e[r][1]].x+t[e[r][1]].width/2,y:t[e[r][1]].y+t[e[r][1]].height/2}}):n.push({to:{x:t[e[r][0]].x+t[e[r][0]].width/2,y:t[e[r][0]].y+t[e[r][0]].height/2},from:{x:1e3,y:0}})}),n},Fe=function(){let t={loading:!1,error:null,uiContext:null,picoMoving:null,picoBoxes:{},subLines:[],channelLines:[],subs:{}},n=[],r=0;function l(){r++,n.forEach(d=>d(r))}function i(){const[,d]=x.useState(r);return x.useEffect(()=>(n.includes(d)||n.push(d),()=>{n=n.filter(h=>h!==d)}),[]),t}async function o(){t.loading=!0,t.error=null,l();try{const d=await ve("/api/ui-context"),h=await vu(d.eci);t.uiContext=d,t.picoBoxes={};for(const y of h)t.picoBoxes[y.eci]=y;s(),t.subs={...await Jh(h)},u()}catch(d){t.error=d+""}finally{t.loading=!1}l()}function u(){t.subLines=Zh(t.subs,t.picoBoxes)}function s(){const d=Object.values(t.picoBoxes),h={};for(const y of d)h[y.eci]={x:y.x+y.width/2,y:y.y+y.height/2};t.channelLines=[];for(const y of d){const w=h[y.eci];for(const S of y.children){const N=h[S];w&&N&&t.channelLines.push({from:w,to:N})}}}function c(d,h){t.picoBoxes.hasOwnProperty(d)&&(t.picoBoxes[d]={...t.picoBoxes[d],...h},s(),u(),l())}function m(d){t.picoMoving=d,l()}return{use:i,fetchAll:o,updateBox:c,setPicoMoving:m}}(),qh=e=>{try{if(typeof e!="string")return 0;let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e.trim());if(!t)return 0;let n=[parseInt(t[1]||"0",16),parseInt(t[2]||"0",16),parseInt(t[3]||"0",16)];return Math.round((n[0]*299+n[1]*587+n[2]*114)/1e3)}catch{return 0}},Is=e=>qh(e)>135?"#000000":"#ffffff";function wt(e){const[t,n]=x.useState({waiting:!1,error:null});return{...t,act:r};async function r(l){n({waiting:!0,error:null});try{await e(l),n({waiting:!1,error:null})}catch(i){n({waiting:!1,error:i+""})}}}function Vr(e){return e.current&&e.current.value}const bh=({pico:e})=>{const t=x.useRef(null),n=x.useRef(null),r=x.useRef(null),l=x.useRef(null);var[i,o]=x.useState(new Map);x.useEffect(()=>{let m=[...e.children];e.parent&&m.push(e.parent),m.map(d=>{vu(d).then(y=>{o(new Map(i.set(d,y[0].name)))})})},[e.children]);const u=wt(({eci:m,name:d,backgroundColor:h})=>af(m,{name:d,backgroundColor:h}).then(y=>{Fe.fetchAll()})),s=wt(({eci:m,name:d,backgroundColor:h})=>ge(`/c/${m}/event/engine_ui/new/query/io.picolabs.pico-engine-ui/box`,{name:d,backgroundColor:h}).then(y=>{Fe.fetchAll()})),c=wt(m=>ve(`/c/${e.eci}/event-wait/engine_ui/del?eci=${m}`).then(d=>(Fe.fetchAll(),null)));return a.jsxs("div",{children:[a.jsx("h3",{children:"Pico"}),e.parent?a.jsxs("div",{children:[a.jsx("b",{className:"text-muted",children:"Parent:"})," ",a.jsx(hr,{to:"/pico/"+e.parent,className:"text-mono mr-2",children:e.parent}),i.get(e.parent)]}):"",a.jsxs("div",{children:[a.jsx("b",{className:"text-muted",title:"This is the channel used by the UI",children:"UI ECI:"})," ",a.jsx("span",{className:"text-mono",children:e.eci})]}),a.jsxs("form",{className:"form-inline",onSubmit:m=>{m.preventDefault();const d=Vr(t)||"",h=Vr(n)||"";u.act({eci:e.eci,name:d,backgroundColor:h})},children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{className:"sr-only",children:"Name"}),a.jsx("input",{type:"text",className:"form-control",defaultValue:e.name,ref:t})]}),a.jsxs("div",{className:"form-group ml-1 mr-1",children:[a.jsx("label",{className:"sr-only",children:"Color"}),a.jsx("input",{type:"color",className:"form-control p-0",style:{width:38},defaultValue:e.backgroundColor,ref:n})]}),a.jsx("button",{type:"submit",className:"btn btn-outline-primary",children:"Save"})]}),a.jsx("h3",{className:"mt-3",children:"Children"}),e.children.length===0?a.jsx("span",{className:"text-muted",children:"- no children -"}):a.jsx("ul",{children:e.children.map(m=>a.jsxs("li",{children:[a.jsx(hr,{to:"/pico/"+m,className:"text-mono mr-2",children:m}),i.get(m)," ","|",a.jsx("button",{className:"btn btn-link btn-sm",type:"button",onClick:d=>{d.preventDefault(),c.act(m)},children:"delete"})]},m))}),a.jsxs("form",{className:"form-inline mt-2",onSubmit:m=>{m.preventDefault();const d=Vr(r)||"",h=Vr(l)||"";s.act({eci:e.eci,name:d,backgroundColor:h})},children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{className:"sr-only",children:"Name"}),a.jsx("input",{type:"text",className:"form-control",ref:r})]}),a.jsxs("div",{className:"form-group ml-1 mr-1",children:[a.jsx("label",{className:"sr-only",children:"Color"}),a.jsx("input",{type:"color",className:"form-control p-0",style:{width:38},defaultValue:e.backgroundColor,ref:l})]}),a.jsx("button",{type:"submit",className:"btn btn-outline-primary",children:"Add"})]})]})};function mr(e,t){const[n,r]=x.useState({waiting:!1,error:null,data:e});return{...n,load:l,hardReload:i,setData:o};async function l(){r({waiting:!0,error:null,data:n.data});try{const u=await t();r({waiting:!1,error:null,data:u})}catch(u){r({waiting:!1,error:u+"",data:n.data})}}async function i(){r({waiting:!0,error:null,data:e});try{const u=await t();r({waiting:!1,error:null,data:u})}catch(u){r({waiting:!1,error:u+"",data:e})}}function o(u){r({...n,data:u})}}function cf(e){if(e=e.replace(/\s+/g," ").trim(),e.length===0)return null;const t=/^(allow|deny) (.*)$/i.exec(e);if(!t)throw new Error("Each line must start with `allow` or `deny`.");const n=t[2].split(":");if(n.length!==2)throw new Error("Expected `domain:name`");const r=n[0].trim(),l=n[1].trim();if(r.length===0)throw new Error("Missing event `domain`.");if(l.length===0)throw new Error("Missing event `name`.");const i={domain:r,name:l},o=t[1].toLocaleLowerCase();switch(o){case"allow":case"deny":return{kind:o,rule:i};default:throw new Error('Expected "allow" or "deny"')}}function ff(e){if(e=e.replace(/\s+/g," ").trim(),e.length===0)return null;const t=/^(allow|deny) (.*)$/i.exec(e);if(!t)throw new Error("Each line must start with `allow` or `deny`.");const n=t[2].split("/");if(n.length!==2)throw new Error("Expected `rid/name`");const r=n[0].trim(),l=n[1].trim();if(r.length===0)throw new Error("Missing event `rid`.");if(l.length===0)throw new Error("Missing event `name`.");const i={rid:r,name:l},o=t[1].toLocaleLowerCase();switch(o){case"allow":case"deny":return{kind:o,rule:i};default:throw new Error('Expected "allow" or "deny"')}}function em(e){const t={allow:[],deny:[]};for(const n of e.split(`
68
- `)){const r=cf(n);r&&t[r.kind].push(r.rule)}return t}function tm(e){const t={allow:[],deny:[]};for(const n of e.split(`
69
- `)){const r=ff(n);r&&t[r.kind].push(r.rule)}return t}const df=({error:e,line:t})=>{const n=(e+"").replace(/^\w*Error:/i,"").trim();return a.jsxs("div",{children:[a.jsx("span",{className:"text-danger",children:n}),a.jsx("span",{className:"text-muted ml-1 mr-1",children:"Line:"}),a.jsx("span",{className:"text-mono",children:t})]})},nm=({src:e})=>a.jsx("div",{children:e.split(`
70
- `).map((t,n)=>{try{const r=cf(t);if(r)return a.jsx(wo,{rule:r.rule,isAllow:r.kind==="allow"},n)}catch(r){return a.jsx(df,{error:r,line:t},n)}})}),rm=({src:e})=>a.jsx("div",{children:e.split(`
71
- `).map((t,n)=>{try{const r=ff(t);if(r)return a.jsx(So,{rule:r.rule,isAllow:r.kind==="allow"},n)}catch(r){return a.jsx(df,{error:r,line:t},n)}})}),lm=({policy:e})=>a.jsxs("div",{children:[e.allow.map((t,n)=>a.jsx(wo,{rule:t,isAllow:!0},n)),e.deny.map((t,n)=>a.jsx(wo,{rule:t},n))]}),im=({policy:e})=>a.jsxs("div",{children:[e.allow.map((t,n)=>a.jsx(So,{rule:t,isAllow:!0},n)),e.deny.map((t,n)=>a.jsx(So,{rule:t},n))]}),wo=({isAllow:e,rule:t})=>a.jsxs("div",{className:"text-mono",children:[e?a.jsx("span",{className:"badge badge-success mr-2",children:"allow"}):a.jsx("span",{className:"badge badge-danger mr-2",children:"deny"}),t.domain,a.jsx("b",{children:" : "}),t.name]}),So=({isAllow:e,rule:t})=>a.jsxs("div",{className:"text-mono",children:[e?a.jsx("span",{className:"badge badge-success mr-2",children:"allow"}):a.jsx("span",{className:"badge badge-danger mr-2",children:"deny"}),t.rid,a.jsx("b",{children:" / "}),t.name]}),He=e=>e.error?a.jsx("span",{className:"text-danger",children:e.error}):a.jsx("span",{}),om=({pico:e})=>{const[t,n]=x.useState({}),[r,l]=x.useState(""),[i,o]=x.useState("allow *:*"),[u,s]=x.useState("allow */*");function c(){return{tags:r.split(","),eventPolicy:em(i),queryPolicy:tm(u)}}function m(){try{c()}catch{return!1}return!0}const d=mr(null,()=>ve(`/c/${e.eci}/query/io.picolabs.pico-engine-ui/pico`)),h=wt(({eci:p,data:f})=>ge(`/c/${p}/event/engine_ui/new_channel/query/io.picolabs.pico-engine-ui/pico`,f).then(v=>d.setData(v))),y=wt(p=>ge(`/c/${e.eci}/event/engine_ui/del_channel/query/io.picolabs.pico-engine-ui/pico`,{eci:p}).then(f=>d.setData(f)));x.useEffect(()=>{d.load()},[e.eci]);const w=d.waiting||y.waiting||h.waiting,S=d.data&&d.data.channels||[],N=p=>{p.preventDefault();const f=document.createRange();f.selectNodeContents(p.target);const v=window.getSelection();v&&(v.removeAllRanges(),v.addRange(f))};return a.jsxs("div",{children:[a.jsx("h3",{children:"Channels"}),a.jsx(He,{error:d.error}),a.jsx(He,{error:y.error}),S.length===0?a.jsx("div",{className:"text-muted",children:"- no channels -"}):S.map(p=>{const f=!!t[p.id],v=!p.familyChannelPicoID&&!p.tags.includes("system");return a.jsxs("div",{children:[a.jsx("div",{children:a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:`chann-${p.id}`,onChange:g=>{const k=p.id,j=Object.assign({},t);g.target.checked?j[k]=!0:delete j[k],n(j)},checked:f}),a.jsx("label",{className:"form-check-label",htmlFor:`chann-${p.id}`,children:a.jsx("span",{className:"text-mono",onDoubleClick:g=>N(g),onClick:g=>{g.preventDefault()},children:p.id})}),p.tags.map((g,k)=>a.jsx("span",{className:"badge badge-secondary ml-1",children:g},k)),v&&a.jsx("button",{className:"btn btn-link btn-sm",type:"button",onClick:g=>{g.preventDefault(),y.act(p.id)},disabled:w,children:"delete"})]})}),f?a.jsx("div",{className:"ml-3",children:p.familyChannelPicoID?a.jsx("div",{className:"text-muted",children:"This is a family channel."}):a.jsxs("div",{className:"row",children:[a.jsxs("div",{className:"col",children:["Event Policy",a.jsx(lm,{policy:p.eventPolicy})]}),a.jsxs("div",{className:"col",children:["Query Policy",a.jsx(im,{policy:p.queryPolicy})]})]})}):""]},p.id)}),a.jsx("hr",{}),a.jsx("h4",{children:"New Channel"}),a.jsxs("form",{onSubmit:p=>{if(p.preventDefault(),!m())return;const f=c();h.act({eci:e.eci,data:f})},children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"new-chann-tags",children:"Tags"}),a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col",children:a.jsx("input",{id:"new-chann-tags",type:"text",className:"form-control",value:r,onChange:p=>l(p.target.value)})}),a.jsx("div",{className:"col",children:r.split(",").map((p,f)=>a.jsx("span",{className:"badge badge-secondary ml-1",children:p.trim()},f))})]})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"new-chann-event-policy",children:"Event Policy"}),a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col",children:a.jsx("textarea",{id:"new-chann-event-policy",rows:3,className:"form-control",value:i,onChange:p=>o(p.target.value)})}),a.jsx("div",{className:"col",children:a.jsx(nm,{src:i})})]})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"new-chann-query-policy",children:"Query Policy"}),a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col",children:a.jsx("textarea",{id:"new-chann-query-policy",rows:3,className:"form-control",value:u,onChange:p=>s(p.target.value)})}),a.jsx("div",{className:"col",children:a.jsx(rm,{src:u})})]})]}),a.jsx("button",{type:"submit",className:"btn btn-outline-primary",disabled:w||!m(),children:"Add"}),a.jsx(He,{error:h.error})]})]})};async function um(e){return await ve(`/c/${e}/query/io.picolabs.pico-engine-ui/logs`)}const sm=({group:e})=>{const[t,n]=x.useState(!1),r=`log-check-${e.txnId}`;return a.jsxs("div",{children:[a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:r,onChange:l=>n(l.target.checked),checked:t}),a.jsx("label",{className:"form-check-label",htmlFor:r,children:a.jsxs("span",{className:"text-mono",children:[e.time," - ",e.header]})})]}),t&&a.jsx("div",{style:{marginLeft:"2em"},children:e.entries.map((l,i)=>a.jsx("pre",{children:l},i))})]})};function am({pico:e}){const t=mr([],()=>um(e.eci));return x.useEffect(()=>{t.load()},[e.eci]),a.jsxs("div",{className:"pico-logging-tab",children:[a.jsx("h3",{children:"Logging"}),a.jsx(He,{error:t.error}),t.waiting&&"Loading...",t.data.map(n=>a.jsx(sm,{group:n},n.txnId))]})}const cm=({pico:e})=>{const[t,n]=x.useState(""),[r,l]=x.useState("{}"),[i,o]=x.useState({});function u(){if(t.trim().length===0)return!1;try{JSON.parse(r)}catch{return!1}return!0}const s=mr(null,()=>ve(`/c/${e.eci}/query/io.picolabs.pico-engine-ui/pico`)),c=wt(h=>ge(`/c/${h.eci}/event/engine_ui/install/query/io.picolabs.pico-engine-ui/pico`,{url:h.url,config:h.config}).then(y=>{s.setData(y),n(""),l("{}")})),m=wt(({eci:h,rid:y})=>ge(`/c/${h}/event/engine_ui/uninstall/query/io.picolabs.pico-engine-ui/pico`,{rid:y}).then(w=>{s.setData(w)})),d=wt(({eci:h,url:y})=>ge(`/c/${h}/event/engine_ui/flush/query/io.picolabs.pico-engine-ui/pico`,{url:y}).then(w=>{s.setData(w)}));return x.useEffect(()=>{s.load()},[e.eci]),a.jsxs("div",{children:[a.jsx("h3",{children:"Installed Rulesets"}),a.jsx(He,{error:s.error}),s.data&&s.data.rulesets.length>0?s.data.rulesets.map(h=>{var N,p,f,v;const y=h.rid,w=`id-rid-${y}`,S=!!i[y];return a.jsxs("div",{children:[a.jsx("div",{children:a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:w,onChange:g=>{const k=Object.assign({},i);g.target.checked?k[y]=!0:delete k[y],o(k)},checked:S}),a.jsx("label",{className:"form-check-label",htmlFor:w,children:a.jsxs("span",{className:"text-mono",children:[h.rid,(p=(N=h==null?void 0:h.meta)==null?void 0:N.krlMeta)!=null&&p.version?"@"+((v=(f=h==null?void 0:h.meta)==null?void 0:f.krlMeta)==null?void 0:v.version):""]})})]})}),S?a.jsxs("div",{className:"ml-3",children:[a.jsxs("div",{children:[a.jsx("button",{className:"btn btn-outline-primary btn-sm",type:"button",onClick:g=>{g.preventDefault(),d.act({eci:e.eci,url:h.url})},disabled:s.waiting||d.waiting,children:"flush"})," ",a.jsx("button",{className:"btn btn-outline-danger btn-sm",type:"button",onClick:g=>{g.preventDefault(),m.act({eci:e.eci,rid:h.rid})},disabled:s.waiting||m.waiting,children:"uninstall"}),a.jsx(He,{error:d.error}),a.jsx(He,{error:m.error})]}),a.jsx("div",{children:a.jsx("a",{href:h.url,target:"_blank",children:h.url})}),a.jsxs("div",{children:[a.jsx("b",{className:"text-muted",children:"Config:"})," ",JSON.stringify(h.config)]}),h.meta&&a.jsxs("div",{children:[a.jsxs("div",{children:[a.jsx("b",{className:"text-muted",children:"Last flushed:"})," ",h.meta.flushed+""]}),a.jsxs("div",{children:[a.jsx("b",{className:"text-muted",children:"Hash:"})," ",h.meta.hash]}),a.jsxs("div",{children:[a.jsx("b",{className:"text-muted",children:"Compiler version:"})," ",h.meta.compiler.version]}),a.jsxs("div",{children:[a.jsx("b",{className:"text-muted",children:"Compiler warnings:"})," ",Array.isArray(h.meta.compiler.warnings)?a.jsx("ul",{children:h.meta.compiler.warnings.map(g=>{var j;let k="";return g&&typeof g.message=="string"?k=`${(j=g.loc)!=null&&j.start?`${g.loc.start.line}:${g.loc.start.column}: `:""}${g.message}`:k=JSON.stringify(g),a.jsx("li",{children:k})})}):a.jsx("span",{})]})]})]}):""]},y)}):a.jsx("span",{className:"text-muted",children:"- no rulesets -"}),a.jsx("hr",{}),a.jsx("h4",{children:"Install Ruleset"}),a.jsxs("form",{onSubmit:h=>{h.preventDefault(),u()&&t&&c.act({eci:e.eci,url:t,config:JSON.parse(r)})},children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"new-rs-url",children:"URL"}),a.jsx("input",{id:"new-rs-url",className:"form-control",value:t,onChange:h=>n(h.target.value),disabled:s.waiting||c.waiting})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"new-rs-config",children:"Config"}),a.jsx("textarea",{id:"new-rs-config",rows:3,className:"form-control",value:r,onChange:h=>l(h.target.value),disabled:s.waiting||c.waiting})]}),a.jsx("button",{type:"submit",className:"btn btn-outline-primary",disabled:s.waiting||c.waiting||!u(),children:"Install"}),a.jsx(He,{error:c.error})]})]})};function Tt(e){return e.current&&e.current.value}const fm=({pico:e})=>{const[t,n]=x.useState([]),[r,l]=x.useState([]),[i,o]=x.useState([]),[u,s]=x.useState(""),[c,m]=x.useState({}),d=x.useRef(null),h=x.useRef(null),y=x.useRef(null),w=x.useRef(null),S=x.useRef(null),N=x.useRef(null),p=x.useRef(null),f=()=>{ve(`/c/${e.eci}/query/io.picolabs.subscription/wellKnown_Rx`).then(C=>{s(C.id)})},v=()=>{ve(`/c/${e.eci}/query/io.picolabs.subscription/established`).then(C=>{n(C),m({})})},g=()=>{ve(`/c/${e.eci}/query/io.picolabs.subscription/inbound`).then(C=>{o(C),m({})})},k=()=>{ve(`/c/${e.eci}/query/io.picolabs.subscription/outbound`).then(C=>{l(C),m({})})},j=C=>{ge(`/c/${e.eci}/event/wrangler/outbound_cancellation`,{Id:C}).then(k)},P=C=>{ge(`/c/${e.eci}/event/wrangler/pending_subscription_approval`,{Id:C}).then(()=>{g(),v()})},_=C=>{ge(`/c/${e.eci}/event/wrangler/subscription_cancellation`,{Id:C}).then(v)},D=(C,F,ne,Y,Yt,jn,_t)=>{ge(`/c/${e.eci}/event/wrangler/subscription`,{wellKnown_Tx:C,Rx_role:F,Tx_role:ne,name:Y,channel_type:Yt,Tx_host:jn,password:_t}).then(k)};return x.useEffect(()=>{f(),v(),g(),k()},[]),a.jsxs("div",{children:[a.jsxs("h4",{children:["Subscriptions - ",u]}),t.length>0&&a.jsx("h5",{children:"Established"}),t.map(C=>{const F=!!c[C.Id];return a.jsxs("div",{children:[a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:`sub-${C.Id}`,onChange:ne=>{const Y=Object.assign({},c);ne.target.checked?Y[C.Id]=!0:delete Y[C.Id],m(Y)},checked:F}),a.jsx("label",{className:"form-check-label",htmlFor:`sub-${C.Id}`,children:a.jsx("span",{className:"text-mono",children:C.Id})})]}),F&&a.jsxs("div",{className:"ml-3",children:[a.jsx("pre",{children:JSON.stringify(C,null,2)}),a.jsx("button",{className:"btn btn-outline-primary",onClick:()=>{_(C.Id)},children:"Delete"})]})]},C.Id)}),i.length>0&&a.jsx("h5",{children:"Inbound"}),i.map(C=>{const F=!!c[C.Id];return a.jsxs("div",{children:[a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:`sub-${C.Id}`,onChange:ne=>{const Y=Object.assign({},c);ne.target.checked?Y[C.Id]=!0:delete Y[C.Id],m(Y)},checked:F}),a.jsx("label",{className:"form-check-label",htmlFor:`sub-${C.Id}`,children:a.jsx("span",{className:"text-mono",children:C.Id})})]}),F&&a.jsxs("div",{className:"ml-3",children:[a.jsx("pre",{children:JSON.stringify(C,null,2)}),a.jsx("button",{className:"btn btn-outline-primary",onClick:()=>{const ne=Object.assign({},c);m(ne),P(C.Id)},children:"Accept"})]})]},C.Id)}),r.length>0&&a.jsx("h5",{children:"Outbound"}),r.map(C=>{const F=!!c[C.Id];return a.jsxs("div",{children:[a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:`sub-${C.Id}`,onChange:ne=>{const Y=Object.assign({},c);ne.target.checked?Y[C.Id]=!0:delete Y[C.Id],m(Y)},checked:F}),a.jsx("label",{className:"form-check-label",htmlFor:`sub-${C.Id}`,children:a.jsx("span",{className:"text-mono",children:C.Id})})]}),F&&a.jsxs("div",{className:"ml-3",children:[a.jsx("pre",{children:JSON.stringify(C,null,2)}),a.jsx("button",{className:"btn btn-outline-primary",onClick:()=>{j(C.Id)},children:"Delete"})]})]},C.Id)}),a.jsx("div",{style:{marginTop:30},children:"New Subscription:"}),a.jsxs("form",{className:"form-inline mt-2",onSubmit:C=>{C.preventDefault();const F=Tt(d)||"",ne=Tt(h)||null,Y=Tt(y)||null,Yt=Tt(w)||null,jn=Tt(S)||null,_t=Tt(N)||null,Pn=Tt(p)||null;D(F,ne,Y,Yt,jn,_t,Pn)},children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{className:"sr-only",children:"wellKnown_Tx"}),a.jsx("input",{type:"text",className:"form-control",ref:d,placeholder:"wellKnown_Tx"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{className:"sr-only",children:"Rx_role"}),a.jsx("input",{type:"text",className:"form-control",ref:h,placeholder:"Rx_role"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{className:"sr-only",children:"Tx_role"}),a.jsx("input",{type:"text",className:"form-control",ref:y,placeholder:"Tx_role"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{className:"sr-only",children:"name"}),a.jsx("input",{type:"text",className:"form-control",ref:w,placeholder:"name"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{className:"sr-only",children:"channel_type"}),a.jsx("input",{type:"text",className:"form-control",ref:S,placeholder:"channel_type"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{className:"sr-only",children:"Tx_host"}),a.jsx("input",{type:"text",className:"form-control",ref:N,placeholder:"Tx_host"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{className:"sr-only",children:"password"}),a.jsx("input",{type:"text",className:"form-control",ref:p,placeholder:"password"})]}),a.jsx("button",{type:"submit",className:"btn btn-outline-primary",children:"Add"})]})]})};function Ms(e){const t=e.currentTarget,n={};for(let r=0;r<t.elements.length;r++){const l=t.elements[r];if(l&&l.name){let i=l.value;try{i=JSON.parse(i)}catch{}n[l.name]=i}}return n}const dm=({pico:e})=>{const t=mr(null,()=>ve(`/c/${e.eci}/query/io.picolabs.pico-engine-ui/pico`)),n=mr(null,()=>ve(`/c/${e.eci}/query/io.picolabs.pico-engine-ui/testingECI`)),[r,l]=x.useState(e.eci),[i,o]=x.useState(null),[u,s]=x.useState(!1),[c,m]=x.useState(null),[d,h]=x.useState({}),[y,w]=x.useState({});x.useEffect(()=>{t.load(),n.load(),h({})},[e.eci]),x.useEffect(()=>{n.data&&l(n.data)},[n.data]);async function S(g){h({...d,[g]:{waiting:!0,error:null}});try{const k=await ve(`/c/${e.eci}/query/${g}/__testing`);h({...d,[g]:{schema:k}})}catch(k){h({...d,[g]:{error:k+""}})}}function N(g,k){return async j=>{j.preventDefault();const P=Ms(j);s(!0),o(null),m(null);try{const _=await ge(`/c/${r}/query/${g}/${k}`,P,!1);m(JSON.stringify(_,void 0,2))}catch(_){o(_+"")}finally{s(!1)}}}function p(g,k){return async j=>{j.preventDefault();const P=Ms(j);s(!0),o(null),m(null);try{const _=await ge(`/c/${r}/event-wait/${g}/${k}`,P,!1);m(JSON.stringify(_,void 0,2))}catch(_){o(_+"")}finally{s(!1)}}}const f=t.data?t.data.rulesets:[],v=t.data&&t.data.channels.filter(g=>g.familyChannelPicoID===null)||[];return a.jsx("div",{children:a.jsxs("div",{className:"row",children:[a.jsxs("div",{className:"col",children:[a.jsx("h3",{children:"Testing"}),a.jsx("div",{className:"mt-3 mb-3",children:a.jsxs("form",{className:"form-inline",children:[a.jsx("label",{children:"ECI:"}),a.jsx("select",{className:"form-control form-control-sm ml-2 text-mono",value:r,onChange:g=>{l(g.target.value),ge(`/c/${e.eci}/event/engine_ui/testing_eci`,{eci:g.target.value}).catch(console.error)},children:v.map(g=>{const k=g.id+" "+g.tags.map(j=>`#${j}`).join(" ");return a.jsx("option",{value:g.id,children:k},g.id)})})]})}),f.map(g=>{const k=!!y[g.rid],j=d[g.rid]||null;return a.jsxs("div",{children:[a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:`rid-${g.rid}`,onChange:P=>{const _=Object.assign({},y);P.target.checked?(_[g.rid]=!0,S(g.rid)):delete _[g.rid],w(_)},checked:k}),a.jsx("label",{className:"form-check-label",htmlFor:`rid-${g.rid}`,children:g.rid})]}),k&&j?a.jsxs("div",{children:[a.jsx(He,{error:j.error}),j.schema?a.jsxs("div",{className:"pl-4",children:[(j.schema.queries||[]).map(P=>a.jsxs("form",{onSubmit:N(g.rid,P.name),className:"border border-primary p-2",children:[a.jsx("div",{children:(P.args||[]).map(_=>a.jsx("input",{name:_,placeholder:_},_))}),a.jsx("button",{type:"submit",className:"btn btn-sm btn-primary",children:P.name})]},P.name)),(j.schema.events||[]).map((P,_)=>{const D=`${P.domain}:${P.name}`;return a.jsxs("form",{onSubmit:p(P.domain,P.name),className:"border border-warning p-2",children:[a.jsx("div",{children:(P.attrs||[]).map(C=>a.jsx("input",{name:C,placeholder:C},C))}),a.jsx("button",{type:"submit",className:"btn btn-sm btn-warning",children:D})]},D+_)})]}):"",j.waiting?"Loading...":""]}):""]},g.rid)})]}),a.jsxs("div",{className:"col",children:[a.jsxs("div",{className:"float-right",children:[a.jsx("span",{className:"text-muted",children:"Legend:"}),a.jsx("span",{className:"badge badge-primary ml-1",children:"query"}),a.jsx("span",{className:"badge badge-warning ml-1",children:"event"})]}),a.jsx("h3",{children:"Results"}),a.jsx(He,{error:i}),u?"Testing...":c?a.jsx("pre",{children:c}):""]})]})})};function Gt(e,t,n){let r=`/pico/${e.eci}`;return n&&(r+="/"+n),a.jsx("li",{className:"nav-item",children:a.jsx(Kh,{className:"nav-link",to:r,end:!0,children:t})})}function pm(e,t){switch(typeof t=="string"?t.toLowerCase().trim():""){case"rulesets":return a.jsx(cm,{pico:e});case"channels":return a.jsx(om,{pico:e});case"logging":return a.jsx(am,{pico:e});case"testing":return a.jsx(dm,{pico:e});case"subscriptions":return a.jsx(fm,{pico:e})}return a.jsx(bh,{pico:e})}const hm=e=>{const{pico:t,openEci:n,openTab:r}=e,l=t.eci===n,i=Fe.use(),o=i.picoMoving&&i.picoMoving.eci===t.eci,u=x.useRef(null);function s(m){const d=u.current;Fe.setPicoMoving({eci:t.eci,action:"moving",relX:d?m.clientX-d.offsetLeft:0,relY:d?m.clientY-d.offsetTop:0})}function c(m){m.stopPropagation();const d=u.current;Fe.setPicoMoving({eci:t.eci,action:"resizing",relX:d?m.clientX-d.offsetLeft:0,relY:d?m.clientY-d.offsetTop:0})}return a.jsx("div",{ref:u,className:"card pico"+(l?" open":"")+(o?"":" pico-not-moving-or-resizing"),style:{left:t.x,top:t.y,maxWidth:t.width,maxHeight:t.height,backgroundColor:t.backgroundColor},onMouseDown:l?void 0:s,children:l?a.jsxs(x.Fragment,{children:[a.jsx(hr,{to:"/",className:"btn btn-light position-absolute",style:{right:5,top:5},children:"Close"}),a.jsxs("div",{className:"card-header",children:[a.jsx("div",{className:"card-header-pico-name",style:{color:Is(t.backgroundColor)},children:t.name}),a.jsxs("ul",{className:"nav nav-tabs card-header-tabs",children:[Gt(t,"About"),Gt(t,"Rulesets","rulesets"),Gt(t,"Channels","channels"),Gt(t,"Logging","logging"),Gt(t,"Testing","testing"),Gt(t,"Subscriptions","subscriptions")]})]}),a.jsx("div",{className:"card-body bg-white overflow-auto",children:pm(t,r)})]}):a.jsxs(x.Fragment,{children:[a.jsx("div",{className:"card-body",children:a.jsx(hr,{to:"/pico/"+t.eci,className:"pico-name-open-btn",onMouseDown:m=>m.stopPropagation(),style:{color:Is(t.backgroundColor)},children:t.name})}),a.jsx("div",{className:"pico-resize-handle",onMouseDown:c})]})})},ki=()=>{let e=xh();const t=e.eci,n=e.tab,r=Fe.use();x.useEffect(()=>{Fe.fetchAll()},[]);function l(o){if(r.picoMoving)switch(r.picoMoving.action){case"moving":{Fe.updateBox(r.picoMoving.eci,{x:o.clientX-(r.picoMoving.relX||0),y:o.clientY-(r.picoMoving.relY||0)});break}case"resizing":{const u=r.picoBoxes[r.picoMoving.eci];u&&Fe.updateBox(r.picoMoving.eci,{width:Math.max(0,o.clientX-u.x),height:Math.max(0,o.clientY-u.y)});break}}}function i(o){if(!r.picoMoving)return;const u=r.picoBoxes[r.picoMoving.eci];u&&af(u.eci,{x:u.x,y:u.y,width:u.width,height:u.height}),Fe.setPicoMoving(null)}return a.jsxs("div",{id:"picos-page",onMouseMove:l,onMouseUp:i,children:[a.jsxs("footer",{className:"fixed-bottom-right p-5",children:[a.jsxs("div",{children:["Powered by"," ",a.jsx("a",{href:"https://github.com/Picolab/pico-engine",children:"pico-engine"})]}),a.jsx("div",{children:r.uiContext?`version: ${r.uiContext.version}`:""}),!1]}),a.jsxs("div",{className:"container-fluid",children:[r.loading?"Loading...":"",r.error?a.jsx("div",{className:"alert alert-danger",children:r.error}):""]}),Object.values(r.picoBoxes).map(o=>a.jsx(hm,{pico:o,openEci:t,openTab:n},o.eci+o.x+o.y+o.width+o.height)),a.jsx("svg",{id:"picos-svg",children:r.channelLines.map((o,u)=>a.jsx("line",{x1:o.from.x,y1:o.from.y,x2:o.to.x,y2:o.to.y},u))}),a.jsx("svg",{id:"subs-svg",children:r.subLines.map((o,u)=>a.jsx("line",{strokeDasharray:"4",x1:o.from.x,y1:o.from.y,x2:o.to.x,y2:o.to.y},u))})]})},pf=document.createElement("DIV");document.body.append(pf);const mm=Xc(pf);mm.render(a.jsx(Wh,{children:a.jsxs(Mh,{children:[a.jsx(tl,{path:"/pico/:eci/:tab",element:a.jsx(ki,{})}),a.jsx(tl,{path:"/pico/:eci",element:a.jsx(ki,{})}),a.jsx(tl,{path:"*",element:a.jsx(ki,{})})]})}));
67
+ */function Wl(){return Wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wl.apply(null,arguments)}function Gd(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Mm(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zm(e,t){return e.button===0&&(!t||t==="_self")&&!Mm(e)}function Vo(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function $m(e,t){let n=Vo(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(i=>{n.append(l,i)})}),n}const Um=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Fm=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Bm="6";try{window.__reactRouterVersion=Bm}catch{}const Vm=v.createContext({isTransitioning:!1}),Wm="startTransition",pu=If[Wm];function Hm(e){let{basename:t,children:n,future:r,window:l}=e,i=v.useRef();i.current==null&&(i.current=Kh({window:l,v5Compat:!0}));let o=i.current,[u,a]=v.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},h=v.useCallback(f=>{c&&pu?pu(()=>a(f)):a(f)},[a,c]);return v.useLayoutEffect(()=>o.listen(h),[o,h]),v.useEffect(()=>Im(r),[r]),v.createElement(Am,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o,future:r})}const Km=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Qm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Or=v.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:o,state:u,target:a,to:c,preventScrollReset:h,viewTransition:f}=t,p=Gd(t,Um),{basename:S}=v.useContext(Ht),w,x=!1;if(typeof c=="string"&&Qm.test(c)&&(w=c,Km))try{let m=new URL(window.location.href),y=c.startsWith("//")?new URL(m.protocol+c):new URL(c),j=Mn(y.pathname,S);y.origin===m.origin&&j!=null?c=j+y.search+y.hash:x=!0}catch{}let E=ym(c,{relative:l}),g=Jm(c,{replace:o,state:u,target:a,preventScrollReset:h,relative:l,viewTransition:f});function d(m){r&&r(m),m.defaultPrevented||g(m)}return v.createElement("a",Wl({},p,{href:w||E,onClick:x||i?r:d,ref:n,target:a}))}),Ym=v.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:o=!1,style:u,to:a,viewTransition:c,children:h}=t,f=Gd(t,Fm),p=di(a,{relative:f.relative}),S=Bn(),w=v.useContext(Bd),{navigator:x,basename:E}=v.useContext(Ht),g=w!=null&&qm(p)&&c===!0,d=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,m=S.pathname,y=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;l||(m=m.toLowerCase(),y=y?y.toLowerCase():null,d=d.toLowerCase()),y&&E&&(y=Mn(y,E)||y);const j=d!=="/"&&d.endsWith("/")?d.length-1:d.length;let k=m===d||!o&&m.startsWith(d)&&m.charAt(j)==="/",N=y!=null&&(y===d||!o&&y.startsWith(d)&&y.charAt(d.length)==="/"),C={isActive:k,isPending:N,isTransitioning:g},I=k?r:void 0,L;typeof i=="function"?L=i(C):L=[i,k?"active":null,N?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let b=typeof u=="function"?u(C):u;return v.createElement(Or,Wl({},f,{"aria-current":I,className:L,ref:n,style:b,to:a,viewTransition:c}),typeof h=="function"?h(C):h)});var Wo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Wo||(Wo={}));var hu;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(hu||(hu={}));function Gm(e){let t=v.useContext(ui);return t||X(!1),t}function Jm(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:o,viewTransition:u}=t===void 0?{}:t,a=Hd(),c=Bn(),h=di(e,{relative:o});return v.useCallback(f=>{if(zm(f,n)){f.preventDefault();let p=r!==void 0?r:Vl(c)===Vl(h);a(e,{replace:p,state:l,preventScrollReset:i,relative:o,viewTransition:u})}},[c,a,h,r,l,n,e,i,o,u])}function Xm(e){let t=v.useRef(Vo(e)),n=v.useRef(!1),r=Bn(),l=v.useMemo(()=>$m(r.search,n.current?null:t.current),[r.search]),i=Hd(),o=v.useCallback((u,a)=>{const c=Vo(typeof u=="function"?u(l):u);n.current=!0,i("?"+c,a)},[i,l]);return[l,o]}function qm(e,t){t===void 0&&(t={});let n=v.useContext(Vm);n==null&&X(!1);let{basename:r}=Gm(Wo.useViewTransitionState),l=di(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Mn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Mn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Fo(l.pathname,o)!=null||Fo(l.pathname,i)!=null}async function $r(e){const t=await e.text();return t===""?null:JSON.parse(t)}async function Zm(){const e=await fetch("/api/ui-context",{credentials:"include"});return $r(e)}async function nt(e,t={}){const n=await fetch(e,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)}),r=await $r(n);if(!n.ok)throw new Error(r&&r.error||n.statusText);if(r!=null&&r.error)throw new Error(r.error);return r}async function eg(){const e=await fetch("/auth/session",{credentials:"include"}),t=await $r(e);if(!e.ok)throw new Error(t&&t.error||e.statusText);return t}async function tg(e){const t=await fetch(e,{method:"DELETE",credentials:"include"}),n=await $r(t);if(!t.ok)throw new Error(n&&n.error||t.statusText);if(n!=null&&n.error)throw new Error(n.error);return n}async function Jd(){return nt("/auth/logout",{})}async function Xd(e){const t=await fetch(`/auth/invites/${encodeURIComponent(e)}`,{credentials:"include"}),n=await $r(t);if(!t.ok)throw new Error(n&&n.error||t.statusText);return n}async function ng(e,t){return nt("/auth/invites",{label:e||void 0,bootstrapUrl:(t==null?void 0:t.trim())||void 0})}const mu=["invite","oauth_return"];function qd(e){try{const t=new URL(window.location.href),n=t.searchParams.get(e);if(n&&n.trim())return n.trim();const r=t.hash,l=r.indexOf("?");if(l<0)return null;const i=new URLSearchParams(r.slice(l+1)).get(e);return i&&i.trim()?i.trim():null}catch{return null}}function Zd(){return qd("invite")}function rg(){return qd("oauth_return")}function fr(){try{const e=new URL(window.location.href);let t=!1;for(const i of mu)e.searchParams.has(i)&&(e.searchParams.delete(i),t=!0);const n=e.hash,r=n.indexOf("?");if(r>=0){const i=n.slice(0,r),o=new URLSearchParams(n.slice(r+1));for(const a of mu)o.has(a)&&(o.delete(a),t=!0);const u=o.toString();e.hash=u?`${i}?${u}`:i}if(!t)return!1;const l=e.searchParams.toString();return window.history.replaceState({},"",e.pathname+(l?`?${l}`:"")+e.hash),!0}catch{return!1}}function lg(e){const t=new URL(window.location.href);return t.search="",t.hash="",t.searchParams.set("invite",e),t.toString()}function lt(e){const t=new Uint8Array(e);let n="";for(const l of t)n+=String.fromCharCode(l);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Hl(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,"="),l=atob(r),i=new ArrayBuffer(l.length),o=new Uint8Array(i);for(let u=0;u<l.length;u++)o[u]=l.charCodeAt(u);return i}function Ks(){return ig.stubThis((globalThis==null?void 0:globalThis.PublicKeyCredential)!==void 0&&typeof globalThis.PublicKeyCredential=="function")}const ig={stubThis:e=>e};function ef(e){const{id:t}=e;return{...e,id:Hl(t),transports:e.transports}}function tf(e){return e==="localhost"||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}class de extends Error{constructor({message:t,code:n,cause:r,name:l}){super(t,{cause:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=l??r.name,this.code=n}}function og({error:e,options:t}){var r,l,i;const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new de({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=n.authenticatorSelection)==null?void 0:r.requireResidentKey)===!0)return new de({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((l=n.authenticatorSelection)==null?void 0:l.userVerification)==="required")return new de({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=n.authenticatorSelection)==null?void 0:i.userVerification)==="required")return new de({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new de({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new de({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return n.pubKeyCredParams.filter(u=>u.type==="public-key").length===0?new de({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new de({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=globalThis.location.hostname;if(tf(o)){if(n.rp.id!==o)return new de({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new de({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new de({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new de({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}class sg{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const nf=new sg,ag=["cross-platform","platform"];function rf(e){if(e&&!(ag.indexOf(e)<0))return e}async function Ho(e){var w;!e.optionsJSON&&e.challenge&&(console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useAutoRegister:n=!1}=e;if(!Ks())throw new Error("WebAuthn is not supported in this browser");const r={...t,challenge:Hl(t.challenge),user:{...t.user,id:Hl(t.user.id)},excludeCredentials:(w=t.excludeCredentials)==null?void 0:w.map(ef)},l={};n&&(l.mediation="conditional"),l.publicKey=r,l.signal=nf.createNewAbortSignal();let i;try{i=await navigator.credentials.create(l)}catch(x){throw og({error:x,options:l})}if(!i)throw new Error("Registration was not completed");const{id:o,rawId:u,response:a,type:c}=i;let h;typeof a.getTransports=="function"&&(h=a.getTransports());let f;if(typeof a.getPublicKeyAlgorithm=="function")try{f=a.getPublicKeyAlgorithm()}catch(x){Fi("getPublicKeyAlgorithm()",x)}let p;if(typeof a.getPublicKey=="function")try{const x=a.getPublicKey();x!==null&&(p=lt(x))}catch(x){Fi("getPublicKey()",x)}let S;if(typeof a.getAuthenticatorData=="function")try{S=lt(a.getAuthenticatorData())}catch(x){Fi("getAuthenticatorData()",x)}return{id:o,rawId:lt(u),response:{attestationObject:lt(a.attestationObject),clientDataJSON:lt(a.clientDataJSON),transports:h,publicKeyAlgorithm:f,publicKey:p,authenticatorData:S},type:c,clientExtensionResults:i.getClientExtensionResults(),authenticatorAttachment:rf(i.authenticatorAttachment)}}function Fi(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
68
+ `,t)}function ug(){if(!Ks())return Bi.stubThis(new Promise(t=>t(!1)));const e=globalThis.PublicKeyCredential;return(e==null?void 0:e.isConditionalMediationAvailable)===void 0?Bi.stubThis(new Promise(t=>t(!1))):Bi.stubThis(e.isConditionalMediationAvailable())}const Bi={stubThis:e=>e};function cg({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new de({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new de({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=globalThis.location.hostname;if(tf(r)){if(n.rpId!==r)return new de({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new de({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new de({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}async function dg(e){var S,w;!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!Ks())throw new Error("WebAuthn is not supported in this browser");let l;((S=t.allowCredentials)==null?void 0:S.length)!==0&&(l=(w=t.allowCredentials)==null?void 0:w.map(ef));const i={...t,challenge:Hl(t.challenge),allowCredentials:l},o={};if(n){if(!await ug())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation="conditional",i.allowCredentials=[]}o.publicKey=i,o.signal=nf.createNewAbortSignal();let u;try{u=await navigator.credentials.get(o)}catch(x){throw cg({error:x,options:o})}if(!u)throw new Error("Authentication was not completed");const{id:a,rawId:c,response:h,type:f}=u;let p;return h.userHandle&&(p=lt(h.userHandle)),{id:a,rawId:lt(c),response:{authenticatorData:lt(h.authenticatorData),clientDataJSON:lt(h.clientDataJSON),signature:lt(h.signature),userHandle:p},type:f,clientExtensionResults:u.getClientExtensionResults(),authenticatorAttachment:rf(u.authenticatorAttachment)}}const fg=({context:e,onAuthenticated:t})=>{const[n,r]=v.useState(""),[l,i]=v.useState(!1),[o,u]=v.useState(null),a=Zd(),[c,h]=v.useState(null),[f,p]=v.useState(!!a),S=!!a&&(c==null?void 0:c.valid)===!0,[w,x]=v.useState(a||!e.hasRoots?"register":"login");v.useEffect(()=>{if(!a){p(!1);return}let k=!1;return p(!0),Xd(a).then(N=>{k||(h(N),N.valid&&e.hasRoots&&!e.needsAuthMigration&&x("register"))}).catch(N=>{k||(h({valid:!1}),u(N+""))}).finally(()=>{k||p(!1)}),()=>{k=!0}},[a,e.hasRoots,e.needsAuthMigration]),v.useEffect(()=>{!(c!=null&&c.valid)||!c.label||r(k=>k.trim()||c.label)},[c==null?void 0:c.valid,c==null?void 0:c.label]);const E=e.needsAuthMigration===!0,g=!e.hasRoots,d=S&&!E&&w==="register";async function m(k){k.preventDefault(),i(!0),u(null);try{const N=await nt("/auth/register/options",{displayName:n.trim()||void 0,invite:a||void 0}),C=await Ho({optionsJSON:N});await nt("/auth/register/verify",C),fr(),t()}catch(N){u(N+"")}finally{i(!1)}}async function y(k){k.preventDefault(),i(!0),u(null);try{const N=await nt("/auth/claim/options",{displayName:n.trim()||void 0}),C=await Ho({optionsJSON:N});await nt("/auth/claim/verify",C),fr(),t()}catch(N){u(N+"")}finally{i(!1)}}async function j(){i(!0),u(null);try{const k=await nt("/auth/login/options",{}),N=await dg({optionsJSON:k});await nt("/auth/login/verify",N),fr(),t()}catch(k){u(k+"")}finally{i(!1)}}return s.jsxs("div",{className:"auth-gate container py-5",style:{maxWidth:"420px"},children:[s.jsx("div",{className:"text-center mb-4",children:s.jsx("img",{src:"/pico-labs-logo.png",alt:"Pico Labs",className:"auth-gate-logo"})}),f?s.jsx("p",{className:"text-muted",children:"Checking invite…"}):a&&c&&!c.valid?s.jsx("div",{className:"alert alert-warning",children:"This invite link is invalid or has expired."}):"",E?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-muted",children:"This engine already has a pico mesh. Link your passkey to claim it and sign in."}),s.jsxs("form",{onSubmit:y,children:[s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:"displayName",children:"Mesh name"}),s.jsx("input",{id:"displayName",className:"form-control",value:n,onChange:k=>r(k.target.value),placeholder:(c==null?void 0:c.label)||"My mesh",autoComplete:"nickname"})]}),s.jsx("button",{type:"submit",className:"btn btn-primary btn-block mt-3",disabled:l,children:l?"Waiting for passkey…":"Claim with passkey"})]})]}):g||d?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-muted",children:d?c!=null&&c.label?`You've been invited to join (${c.label}). Create your account with a passkey.`:"You've been invited to join. Create your account with a passkey.":"Create your account with a passkey. This will create your root pico."}),d&&(c!=null&&c.bootstrapRid)?s.jsxs("p",{className:"text-muted small",children:["This invite will install ",s.jsx("code",{children:c.bootstrapRid})," on your new root pico."]}):"",s.jsxs("form",{onSubmit:m,children:[s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:"displayName",children:"Mesh name"}),s.jsx("input",{id:"displayName",className:"form-control",value:n,onChange:k=>r(k.target.value),placeholder:(c==null?void 0:c.label)||"My mesh",autoComplete:"nickname"})]}),s.jsx("button",{type:"submit",className:"btn btn-primary btn-block mt-3",disabled:l||f,children:l?"Waiting for passkey…":"Register with passkey"})]})]}):w==="login"?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-muted",children:"Sign in with your passkey."}),s.jsx("button",{type:"button",className:"btn btn-primary btn-block",disabled:l,onClick:j,children:l?"Waiting for passkey…":"Sign in with passkey"}),e.allowSelfSignup?s.jsx("button",{type:"button",className:"btn btn-link btn-block mt-2",disabled:l,onClick:()=>{u(null),x("register")},children:"Create another account"}):""]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-muted",children:"Register a new account and root pico."}),s.jsxs("form",{onSubmit:m,children:[s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:"displayName",children:"Mesh name"}),s.jsx("input",{id:"displayName",className:"form-control",value:n,onChange:k=>r(k.target.value),placeholder:(c==null?void 0:c.label)||"My mesh",autoComplete:"nickname"})]}),s.jsx("button",{type:"submit",className:"btn btn-primary btn-block mt-3",disabled:l,children:l?"Waiting for passkey…":"Register with passkey"})]}),s.jsx("button",{type:"button",className:"btn btn-link btn-block mt-2",disabled:l,onClick:()=>{u(null),x("login")},children:"Back to sign in"})]}),o?s.jsx("div",{className:"alert alert-danger mt-3",children:o}):"",s.jsxs("p",{className:"text-muted small mt-4",children:["version ",e.version]})]})};function lf(e,t=!0){return e.then(async n=>{const r=await n.text();if(r==="")return null;const l=JSON.parse(r);return l===void 0?null:l}).then(n=>t&&(n!=null&&n.error)?Promise.reject(n.error):n)}function fe(e){return lf(fetch(e,{credentials:"include"}))}function re(e,t,n=!0){return lf(fetch(e,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(t)}),n)}function of(e,t){return re(`/c/${e}/event/engine_ui/box/query/io.picolabs.pico-engine-ui/box`,t)}async function Qs(e){let t=[];const n=await fe(`/c/${e}/query/io.picolabs.pico-engine-ui/box`);t.push(n);for(const r of n.children)t=t.concat(await Qs(r));return t}const sf="pico-engine-ui:off-engine-pos:";function pg(e){try{const t=localStorage.getItem(sf+e);if(!t)return null;const n=JSON.parse(t);if(typeof(n==null?void 0:n.x)=="number"&&typeof(n==null?void 0:n.y)=="number"&&Number.isFinite(n.x)&&Number.isFinite(n.y))return n}catch{}return null}function hg(e,t){try{localStorage.setItem(sf+e,JSON.stringify(t))}catch{}}const gu=async e=>{let t=[],n=[];for(let l=0;l<e.length;l++)try{for(t=t.concat(await fe(`/c/${e[l].eci}/query/io.picolabs.subscription/established`));n.length<t.length;)n.push(l)}catch{}const r={};for(let l=0;l<t.length;l++){const i=t[l],o=e[n[l]].eci;r[i.Id]?r[i.Id].ecis.push(o):r[i.Id]={ecis:[o],sub:i}}return r},Vi=128,Wi=44,mg=(e,t,n)=>{const r=[],l=[],i=new Set;if(Object.keys(e).forEach(f=>{const{ecis:p}=e[f];if(p.length>1){const x=t[p[0]],E=t[p[1]];x&&E&&r.push({to:{x:x.x+x.width/2,y:x.y+x.height/2},from:{x:E.x+E.width/2,y:E.y+E.height/2}});return}const S=t[p[0]];if(!S)return;const w=e[f].sub||{};typeof w.Tx_host=="string"&&w.Tx_host.length>0&&i.add(w.Tx_host),l.push({box:S,center:{x:S.x+S.width/2,y:S.y+S.height/2}})}),l.length===0)return{lines:r,offEngineNode:null,defaultOffEnginePosition:null};const o=Math.max(...l.map(({box:f})=>f.x+f.width)),u=l.reduce((f,{center:p})=>f+p.y,0)/l.length,a={x:o+160-Vi/2,y:u-Wi/2},c=n||a,h={x:c.x+Vi/2,y:c.y+Wi/2};for(const{center:f}of l)r.push({from:h,to:f});return{lines:r,offEngineNode:{id:"off-engine",x:c.x,y:c.y,width:Vi,height:Wi,label:"Off Engine",hosts:Array.from(i)},defaultOffEnginePosition:a}},se=function(){let t={loading:!1,error:null,uiContext:null,picoMoving:null,picoBoxes:{},subLines:[],offEngineNode:null,channelLines:[],subs:{}},n=null,r=null,l=[],i=0;function o(){i++,l.forEach(d=>d(i))}function u(){const[,d]=v.useState(i);return v.useEffect(()=>(l.includes(d)||l.push(d),()=>{l=l.filter(m=>m!==d)}),[]),t}async function a(d={}){var y;const m=d.retryLateChildren===!0;m||(t.loading=!0,t.error=null,o());try{const j=await fe("/api/ui-context"),k=j.eci||((y=j.session)==null?void 0:y.uiECI);if(!k)throw new Error("Not signed in");r!==k&&(r=k,n=pg(k));const N=await Qs(k);t.uiContext=j,t.picoBoxes={};for(const C of N)t.picoBoxes[C.eci]=C;p(),t.subs={...await gu(N)},h()}catch(j){m||(t.error=j+"")}finally{m||(t.loading=!1)}o()}function c(){a();for(const d of[500,1500,3e3])window.setTimeout(()=>{a({retryLateChildren:!0})},d)}function h(){const d=mg(t.subs,t.picoBoxes,n);t.subLines=d.lines,t.offEngineNode=d.offEngineNode,!n&&d.defaultOffEnginePosition&&(n=d.defaultOffEnginePosition)}async function f(){const d=Object.values(t.picoBoxes);d.length!==0&&(t.subs={...await gu(d)},h(),o())}function p(){const d=Object.values(t.picoBoxes),m={};for(const y of d)m[y.eci]={x:y.x+y.width/2,y:y.y+y.height/2};t.channelLines=[];for(const y of d){const j=m[y.eci];for(const k of y.children){const N=m[k];j&&N&&t.channelLines.push({from:j,to:N})}}}function S(d,m){t.picoBoxes.hasOwnProperty(d)&&(t.picoBoxes[d]={...t.picoBoxes[d],...m},p(),h(),o())}function w(d,m){n={x:d,y:m},h(),o()}function x(){r&&n&&hg(r,n)}function E(d){t.picoMoving=d,o()}async function g(){await Jd(),window.location.reload()}return{use:u,fetchAll:a,fetchAllWithBootstrapRetry:c,refreshSubscriptions:f,updateBox:S,updateOffEnginePosition:w,persistOffEnginePosition:x,setPicoMoving:E,logout:g}}(),gg=({node:e})=>{var o;const t=se.use(),n=v.useRef(null),r=((o=t.picoMoving)==null?void 0:o.offEngine)===!0&&t.picoMoving.action==="moving";function l(u){const a=n.current;se.setPicoMoving({offEngine:!0,action:"moving",relX:a?u.clientX-a.offsetLeft:0,relY:a?u.clientY-a.offsetTop:0})}const i=e.hosts&&e.hosts.length>0?e.hosts.join(`
69
+ `):"Subscription on another engine";return s.jsxs("div",{ref:n,className:"off-engine-node"+(r?" off-engine-node-moving":""),style:{left:e.x,top:e.y,width:e.width,height:e.height},title:i,onMouseDown:l,children:[s.jsx("div",{className:"off-engine-node-label",children:e.label}),e.hosts&&e.hosts.length>0?s.jsx("div",{className:"off-engine-node-host",children:e.hosts.length===1?e.hosts[0]:`${e.hosts.length} remote engines`}):null]})},vg=e=>{try{if(typeof e!="string")return 0;let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e.trim());if(!t)return 0;let n=[parseInt(t[1]||"0",16),parseInt(t[2]||"0",16),parseInt(t[3]||"0",16)];return Math.round((n[0]*299+n[1]*587+n[2]*114)/1e3)}catch{return 0}},vu=e=>vg(e)>135?"#000000":"#ffffff";function pt(e){const[t,n]=v.useState({waiting:!1,error:null});return{...t,act:r};async function r(l){n({waiting:!0,error:null});try{await e(l),n({waiting:!1,error:null})}catch(i){n({waiting:!1,error:i+""})}}}function il(e){return e.current&&e.current.value}const yg=({pico:e})=>{const t=v.useRef(null),n=v.useRef(null),r=v.useRef(null),l=v.useRef(null);var[i,o]=v.useState(new Map);v.useEffect(()=>{let h=[...e.children];e.parent&&h.push(e.parent),h.map(f=>{Qs(f).then(S=>{o(new Map(i.set(f,S[0].name)))})})},[e.children]);const u=pt(({eci:h,name:f,backgroundColor:p})=>of(h,{name:f,backgroundColor:p}).then(S=>{se.fetchAll()})),a=pt(({eci:h,name:f,backgroundColor:p})=>re(`/c/${h}/event/engine_ui/new/query/io.picolabs.pico-engine-ui/box`,{name:f,backgroundColor:p}).then(S=>{se.fetchAll()})),c=pt(h=>fe(`/c/${e.eci}/event-wait/engine_ui/del?eci=${h}`).then(f=>(se.fetchAll(),null)));return s.jsxs("div",{children:[s.jsx("h3",{children:"Pico"}),e.parent?s.jsxs("div",{children:[s.jsx("b",{className:"text-muted",children:"Parent:"})," ",s.jsx(Or,{to:"/pico/"+e.parent,className:"text-mono mr-2",children:e.parent}),i.get(e.parent)]}):"",s.jsxs("div",{children:[s.jsx("b",{className:"text-muted",title:"This is the channel used by the UI",children:"UI ECI:"})," ",s.jsx("span",{className:"text-mono",children:e.eci})]}),s.jsxs("form",{className:"form-inline",onSubmit:h=>{h.preventDefault();const f=il(t)||"",p=il(n)||"";u.act({eci:e.eci,name:f,backgroundColor:p})},children:[s.jsxs("div",{className:"form-group",children:[s.jsx("label",{className:"sr-only",children:"Name"}),s.jsx("input",{type:"text",className:"form-control",defaultValue:e.name,ref:t})]}),s.jsxs("div",{className:"form-group ml-1 mr-1",children:[s.jsx("label",{className:"sr-only",children:"Color"}),s.jsx("input",{type:"color",className:"form-control p-0",style:{width:38},defaultValue:e.backgroundColor,ref:n})]}),s.jsx("button",{type:"submit",className:"btn btn-outline-primary",children:"Save"})]}),s.jsx("h3",{className:"mt-3",children:"Children"}),e.children.length===0?s.jsx("span",{className:"text-muted",children:"- no children -"}):s.jsx("ul",{children:e.children.map(h=>s.jsxs("li",{children:[s.jsx(Or,{to:"/pico/"+h,className:"text-mono mr-2",children:h}),i.get(h)," ","|",s.jsx("button",{className:"btn btn-link btn-sm",type:"button",onClick:f=>{f.preventDefault(),c.act(h)},children:"delete"})]},h))}),s.jsxs("form",{className:"form-inline mt-2",onSubmit:h=>{h.preventDefault();const f=il(r)||"",p=il(l)||"";a.act({eci:e.eci,name:f,backgroundColor:p})},children:[s.jsxs("div",{className:"form-group",children:[s.jsx("label",{className:"sr-only",children:"Name"}),s.jsx("input",{type:"text",className:"form-control",ref:r})]}),s.jsxs("div",{className:"form-group ml-1 mr-1",children:[s.jsx("label",{className:"sr-only",children:"Color"}),s.jsx("input",{type:"color",className:"form-control p-0",style:{width:38},defaultValue:e.backgroundColor,ref:l})]}),s.jsx("button",{type:"submit",className:"btn btn-outline-primary",children:"Add"})]})]})};function zn(e,t){const[n,r]=v.useState({waiting:!1,error:null,data:e});return{...n,load:l,hardReload:i,setData:o};async function l(){r({waiting:!0,error:null,data:n.data});try{const u=await t();r({waiting:!1,error:null,data:u})}catch(u){r({waiting:!1,error:u+"",data:n.data})}}async function i(){r({waiting:!0,error:null,data:e});try{const u=await t();r({waiting:!1,error:null,data:u})}catch(u){r({waiting:!1,error:u+"",data:e})}}function o(u){r({...n,data:u})}}function af(e){if(e=e.replace(/\s+/g," ").trim(),e.length===0)return null;const t=/^(allow|deny) (.*)$/i.exec(e);if(!t)throw new Error("Each line must start with `allow` or `deny`.");const n=t[2].split(":");if(n.length!==2)throw new Error("Expected `domain:name`");const r=n[0].trim(),l=n[1].trim();if(r.length===0)throw new Error("Missing event `domain`.");if(l.length===0)throw new Error("Missing event `name`.");const i={domain:r,name:l},o=t[1].toLocaleLowerCase();switch(o){case"allow":case"deny":return{kind:o,rule:i};default:throw new Error('Expected "allow" or "deny"')}}function uf(e){if(e=e.replace(/\s+/g," ").trim(),e.length===0)return null;const t=/^(allow|deny) (.*)$/i.exec(e);if(!t)throw new Error("Each line must start with `allow` or `deny`.");const n=t[2].split("/");if(n.length!==2)throw new Error("Expected `rid/name`");const r=n[0].trim(),l=n[1].trim();if(r.length===0)throw new Error("Missing event `rid`.");if(l.length===0)throw new Error("Missing event `name`.");const i={rid:r,name:l},o=t[1].toLocaleLowerCase();switch(o){case"allow":case"deny":return{kind:o,rule:i};default:throw new Error('Expected "allow" or "deny"')}}function Ys(e){const t={allow:[],deny:[]};for(const n of e.split(`
70
+ `)){const r=af(n);r&&t[r.kind].push(r.rule)}return t}function Gs(e){const t={allow:[],deny:[]};for(const n of e.split(`
71
+ `)){const r=uf(n);r&&t[r.kind].push(r.rule)}return t}function Ko(e){return[...e.allow.map(n=>`allow ${n.domain}:${n.name}`),...e.deny.map(n=>`deny ${n.domain}:${n.name}`)].join(`
72
+ `)}function Qo(e){return[...e.allow.map(n=>`allow ${n.rid}/${n.name}`),...e.deny.map(n=>`deny ${n.rid}/${n.name}`)].join(`
73
+ `)}function yu(e){return e.join(", ")}const cf=({error:e,line:t})=>{const n=(e+"").replace(/^\w*Error:/i,"").trim();return s.jsxs("div",{children:[s.jsx("span",{className:"text-danger",children:n}),s.jsx("span",{className:"text-muted ml-1 mr-1",children:"Line:"}),s.jsx("span",{className:"text-mono",children:t})]})},Js=({src:e})=>s.jsx("div",{children:e.split(`
74
+ `).map((t,n)=>{try{const r=af(t);if(r)return s.jsx(Yo,{rule:r.rule,isAllow:r.kind==="allow"},n)}catch(r){return s.jsx(cf,{error:r,line:t},n)}})}),Xs=({src:e})=>s.jsx("div",{children:e.split(`
75
+ `).map((t,n)=>{try{const r=uf(t);if(r)return s.jsx(Go,{rule:r.rule,isAllow:r.kind==="allow"},n)}catch(r){return s.jsx(cf,{error:r,line:t},n)}})}),df=({policy:e})=>s.jsxs("div",{children:[e.allow.map((t,n)=>s.jsx(Yo,{rule:t,isAllow:!0},n)),e.deny.map((t,n)=>s.jsx(Yo,{rule:t},n))]}),ff=({policy:e})=>s.jsxs("div",{children:[e.allow.map((t,n)=>s.jsx(Go,{rule:t,isAllow:!0},n)),e.deny.map((t,n)=>s.jsx(Go,{rule:t},n))]}),Yo=({isAllow:e,rule:t})=>s.jsxs("div",{className:"text-mono",children:[e?s.jsx("span",{className:"badge badge-success mr-2",children:"allow"}):s.jsx("span",{className:"badge badge-danger mr-2",children:"deny"}),t.domain,s.jsx("b",{children:" : "}),t.name]}),Go=({isAllow:e,rule:t})=>s.jsxs("div",{className:"text-mono",children:[e?s.jsx("span",{className:"badge badge-success mr-2",children:"allow"}):s.jsx("span",{className:"badge badge-danger mr-2",children:"deny"}),t.rid,s.jsx("b",{children:" / "}),t.name]}),Fe=e=>e.error?s.jsx("span",{className:"text-danger",children:e.error}):s.jsx("span",{}),Jo=12,xg=/^[a-zA-Z0-9_-]+$/;function xu(){return crypto.randomUUID().replace(/-/g,"")}function wu(e){const t=e.trim();return t.length===0?"Channel id cannot be empty.":t.length<Jo?`Channel id must be at least ${Jo} characters.`:xg.test(t)?null:"Channel id may only contain letters, digits, hyphen, and underscore."}async function Qt(e){const t=await e.text();return t===""?null:JSON.parse(t)}async function wg(e){const t=await fetch(`/oauth/channels/${encodeURIComponent(e)}/status`,{credentials:"include"}),n=await Qt(t);if(!t.ok)throw new Error(n&&n.error||t.statusText);return n}async function Sg(e){const t=await fetch(`/oauth/channels/${encodeURIComponent(e)}/credentials`,{method:"POST",credentials:"include"}),n=await Qt(t);if(!t.ok)throw new Error(n&&(n.error_description||n.error)||t.statusText);return n}async function Ng(e){const t=await fetch(`/oauth/channels/${encodeURIComponent(e)}/credentials`,{method:"DELETE",credentials:"include"}),n=await Qt(t);if(!t.ok)throw new Error(n&&(n.error_description||n.error)||t.statusText)}async function kg(e){const t=await fetch(`/oauth/channels/${encodeURIComponent(e)}/tokens`,{method:"DELETE",credentials:"include"}),n=await Qt(t);if(!t.ok)throw new Error(n&&(n.error_description||n.error)||t.statusText)}async function jg(e,t,n){const r={grant_type:"client_credentials",client_id:e,client_secret:t};n!==void 0&&(r.expires_in=n);const l=await fetch("/oauth/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),i=await Qt(l);if(!l.ok)throw new Error(i&&(i.error_description||i.error)||l.statusText);return i}async function Eg(){const e=await fetch("/oauth/apps",{credentials:"include"}),t=await Qt(e);if(!e.ok)throw new Error(t&&(t.error_description||t.error)||e.statusText);return t&&t.apps||[]}async function Cg(e){const t=await fetch("/oauth/apps",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await Qt(t);if(!t.ok)throw new Error(n&&(n.error_description||n.error)||t.statusText);return n}async function _g(e){const t=await fetch(`/oauth/apps/${encodeURIComponent(e)}`,{method:"DELETE",credentials:"include"}),n=await Qt(t);if(!t.ok)throw new Error(n&&(n.error_description||n.error)||t.statusText)}const Pg=[{label:"5 minutes",seconds:5*60},{label:"1 hour",seconds:60*60},{label:"6 hours",seconds:6*60*60},{label:"24 hours",seconds:24*60*60},{label:"7 days",seconds:7*24*60*60},{label:"30 days",seconds:30*24*60*60},{label:"90 days",seconds:90*24*60*60},{label:"Never",seconds:0}],Rg=24*60*60,pf=43,Tg=pf+5,Lg=4+pf,Og=Lg+3;function bg(e){return e===void 0?"never":e<60*60?`${Math.round(e/60)}m`:e<24*60*60?`${Math.round(e/(60*60))}h`:`${Math.round(e/(24*60*60))}d`}function Ig({channelId:e}){const[t,n]=v.useState(null),[r,l]=v.useState(!0),[i,o]=v.useState(!1),[u,a]=v.useState(null),[c,h]=v.useState(null),[f,p]=v.useState(""),[S,w]=v.useState(Rg),[x,E]=v.useState(null),[g,d]=v.useState(!1),[m,y]=v.useState(null),j=v.useCallback(async()=>{l(!0),a(null);try{n(await wg(e))}catch(b){a(b+"")}finally{l(!1)}},[e]);v.useEffect(()=>{j()},[j]),v.useEffect(()=>{c!=null&&c.client_secret&&(p(c.client_secret),E(null))},[c]);async function k(){o(!0),a(null);try{const b=await Sg(e);h(b),await j()}catch(b){a(b+"")}finally{o(!1)}}async function N(){if(window.confirm("Revoke webhook credentials for this channel?")){o(!0),a(null);try{await Ng(e),h(null),p(""),E(null),await j()}catch(b){a(b+"")}finally{o(!1)}}}async function C(b){b.preventDefault();const ee=f.trim();if(ee){d(!0),y(null);try{E(await jg((t==null?void 0:t.clientId)||e,ee,S))}catch(ie){E(null),y(ie+"")}finally{d(!1)}}}async function I(){if(x!=null&&x.access_token)try{await navigator.clipboard.writeText(x.access_token)}catch{}}async function L(){o(!0),a(null);try{await kg(e),E(null),await j()}catch(b){a(b+"")}finally{o(!1)}}return r?s.jsx("div",{className:"text-muted small mt-2",children:"Loading webhook auth…"}):t!=null&&t.eligible?s.jsxs("div",{className:"border rounded p-2 mt-2 mb-2",children:[s.jsx("div",{className:"font-weight-bold small",children:"Webhook OAuth"}),s.jsxs("p",{className:"text-muted small mb-2",children:["This channel requires a bearer token on every request. Create credentials, then mint an access token below (or call ",s.jsx("code",{children:"POST /oauth/token"}),")."]}),t.hasSecret?"":s.jsx("div",{className:"alert alert-warning py-2 small mb-2",children:"No credentials yet — external access is blocked until you create them."}),s.jsxs("div",{className:"small text-mono mb-1",children:["client_id: ",t.clientId||e]}),t.hasSecret?s.jsxs("div",{className:"text-muted small mb-2",children:["Credentials active",t.createdAt?` (since ${new Date(t.createdAt).toLocaleString()})`:""]}):s.jsx("div",{className:"text-muted small mb-2",children:"No credentials yet."}),c?s.jsxs("div",{className:"alert alert-warning py-2 small",children:[s.jsxs("div",{children:[s.jsx("strong",{children:"client_secret"})," (copy now — shown once):"]}),s.jsx("div",{className:"text-mono",children:c.client_secret})]}):"",s.jsxs("div",{className:"btn-group btn-group-sm",children:[s.jsx("button",{type:"button",className:"btn btn-outline-primary",disabled:i,onClick:k,children:t.hasSecret?"Rotate credentials":"Create credentials"}),t.hasSecret?s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",className:"btn btn-outline-secondary",disabled:i,onClick:L,children:"Revoke tokens"}),s.jsx("button",{type:"button",className:"btn btn-outline-danger",disabled:i,onClick:N,children:"Revoke credentials"})]}):""]}),t.hasSecret?s.jsxs("form",{className:"mt-3",onSubmit:C,children:[s.jsx("div",{className:"font-weight-bold small mb-1",children:"Get access token"}),s.jsx("div",{className:"form-group mb-2",children:s.jsxs("div",{className:"d-flex align-items-end flex-wrap",children:[s.jsxs("div",{className:"mr-3",children:[s.jsx("label",{htmlFor:`oauth-secret-${e}`,className:"small mb-1",children:"client_secret"}),s.jsx("input",{id:`oauth-secret-${e}`,type:"password",className:"form-control form-control-sm text-mono",style:{width:`${Tg}ch`,maxWidth:"100%"},value:f,onChange:b=>{p(b.target.value),E(null)},placeholder:"Paste your client secret",disabled:g||i,autoComplete:"off"})]}),s.jsxs("div",{className:"flex-shrink-0",children:[s.jsx("label",{htmlFor:`oauth-expiry-${e}`,className:"small mb-1 text-nowrap",children:"Token lifetime"}),s.jsx("select",{id:`oauth-expiry-${e}`,className:"form-control form-control-sm w-auto",value:S,onChange:b=>{w(Number(b.target.value)),E(null)},disabled:g||i,children:Pg.map(b=>s.jsx("option",{value:b.seconds,children:b.label},b.seconds))})]})]})}),s.jsx("button",{type:"submit",className:"btn btn-sm btn-outline-primary",disabled:g||i||!f.trim(),children:g?"Minting…":"Get token"}),x?s.jsxs("div",{className:"mt-2",children:[s.jsxs("label",{htmlFor:`oauth-token-${e}`,className:"small mb-1",children:["access_token (",x.token_type,x.expires_in===void 0?", never expires":`, expires in ${bg(x.expires_in)}`,")"]}),s.jsxs("div",{className:"input-group input-group-sm",style:{width:"fit-content",maxWidth:"100%"},children:[s.jsx("input",{id:`oauth-token-${e}`,className:"form-control text-mono",style:{width:`${Og}ch`,flex:"0 0 auto"},value:x.access_token,readOnly:!0}),s.jsx("div",{className:"input-group-append",children:s.jsx("button",{type:"button",className:"btn btn-outline-secondary",onClick:I,children:"Copy"})})]})]}):"",m?s.jsx("div",{className:"text-danger small mt-2",children:m}):""]}):"",u?s.jsx("div",{className:"text-danger small mt-2",children:u}):""]}):t!=null&&t.reason?s.jsx("div",{className:"text-muted small mt-2",children:t.reason}):null}function Ag({channel:e,disabled:t,onSave:n}){const[r,l]=v.useState(()=>yu(e.tags)),[i,o]=v.useState(()=>Ko(e.eventPolicy)),[u,a]=v.useState(()=>Qo(e.queryPolicy));v.useEffect(()=>{l(yu(e.tags)),o(Ko(e.eventPolicy)),a(Qo(e.queryPolicy))},[e]);function c(w){const x=r.split(",").map(E=>E.trim()).filter(Boolean);x.some(E=>E.toLowerCase()===w.toLowerCase())||l(x.length===0?w:`${x.join(", ")}, ${w}`)}function h(){return{eci:e.id,tags:r.split(",").map(w=>w.trim()).filter(Boolean),eventPolicy:Ys(i),queryPolicy:Gs(u)}}function f(){try{return h(),!0}catch{return!1}}const p=r.split(",").map(w=>w.trim()).filter(Boolean),S=e.tags.includes("oauth-webhook")||p.some(w=>w.toLowerCase()==="oauth-webhook");return s.jsxs("div",{className:"mb-3",children:[s.jsx("h5",{className:"h6",children:"Edit channel"}),s.jsxs("form",{onSubmit:w=>{w.preventDefault(),f()&&n(h())},children:[s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:`edit-chann-tags-${e.id}`,children:"Tags"}),s.jsxs("div",{className:"text-muted small mb-1",children:["Add"," ",s.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0 align-baseline text-mono",onClick:()=>c("oauth-webhook"),disabled:t,children:"oauth-webhook"})," ","for webhook Client Credentials."]}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col",children:s.jsx("input",{id:`edit-chann-tags-${e.id}`,type:"text",className:"form-control form-control-sm",value:r,onChange:w=>l(w.target.value),disabled:t})}),s.jsx("div",{className:"col",children:p.map((w,x)=>s.jsx("span",{className:"badge badge-secondary ml-1",children:w},x))})]})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:`edit-chann-event-${e.id}`,children:"Event Policy"}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col",children:s.jsx("textarea",{id:`edit-chann-event-${e.id}`,rows:3,className:"form-control form-control-sm",value:i,onChange:w=>o(w.target.value),disabled:t})}),s.jsx("div",{className:"col",children:s.jsx(Js,{src:i})})]})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:`edit-chann-query-${e.id}`,children:"Query Policy"}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col",children:s.jsx("textarea",{id:`edit-chann-query-${e.id}`,rows:3,className:"form-control form-control-sm",value:u,onChange:w=>a(w.target.value),disabled:t})}),s.jsx("div",{className:"col",children:s.jsx(Xs,{src:u})})]})]}),s.jsx("button",{type:"submit",className:"btn btn-sm btn-outline-primary",disabled:t||!f(),children:"Save changes"})]}),S?s.jsx("div",{className:"mt-3",children:s.jsx(Ig,{channelId:e.id})}):""]})}const Dg=({pico:e})=>{const[t]=Xm(),n=t.get("focus")||"",[r,l]=v.useState({}),[i,o]=v.useState(""),[u,a]=v.useState(()=>xu()),[c,h]=v.useState("allow *:*"),[f,p]=v.useState("allow */*");function S(){const N=wu(u);if(N)throw new Error(N);return{id:u.trim(),tags:i.split(","),eventPolicy:Ys(c),queryPolicy:Gs(f)}}function w(){try{S()}catch{return!1}return!0}const x=zn(null,()=>fe(`/c/${e.eci}/query/io.picolabs.pico-engine-ui/pico`)),E=pt(({eci:N,data:C})=>re(`/c/${N}/event/engine_ui/new_channel/query/io.picolabs.pico-engine-ui/pico`,C).then(I=>{x.setData(I),a(xu())})),g=pt(N=>re(`/c/${e.eci}/event/engine_ui/del_channel/query/io.picolabs.pico-engine-ui/pico`,{eci:N}).then(C=>x.setData(C))),d=pt(N=>re(`/c/${e.eci}/event/engine_ui/update_channel/query/io.picolabs.pico-engine-ui/pico`,N).then(C=>x.setData(C)));v.useEffect(()=>{x.load()},[e.eci]),v.useEffect(()=>{n&&l({[n]:!0})},[n,e.eci]);const m=x.waiting||g.waiting||E.waiting||d.waiting,y=x.data&&x.data.channels||[],j=N=>{N.preventDefault();const C=document.createRange();C.selectNodeContents(N.target);const I=window.getSelection();I&&(I.removeAllRanges(),I.addRange(C))};function k(N){const C=i.split(",").map(I=>I.trim()).filter(Boolean);C.some(I=>I.toLowerCase()===N.toLowerCase())||o(C.length===0?N:`${C.join(", ")}, ${N}`)}return s.jsxs("div",{children:[s.jsx("h3",{children:"Channels"}),s.jsx(Fe,{error:x.error}),s.jsx(Fe,{error:g.error}),s.jsx(Fe,{error:d.error}),y.length===0?s.jsx("div",{className:"text-muted",children:"- no channels -"}):y.map(N=>{const C=!!r[N.id],I=!N.familyChannelPicoID&&!N.tags.includes("system"),L=I;return s.jsxs("div",{children:[s.jsx("div",{children:s.jsxs("div",{className:"form-check",children:[s.jsx("input",{className:"form-check-input",type:"checkbox",id:`chann-${N.id}`,onChange:b=>{const ee=N.id,ie=Object.assign({},r);b.target.checked?ie[ee]=!0:delete ie[ee],l(ie)},checked:C}),s.jsx("label",{className:"form-check-label",htmlFor:`chann-${N.id}`,children:s.jsx("span",{className:"text-mono",onDoubleClick:b=>j(b),onClick:b=>{b.preventDefault()},children:N.id})}),N.tags.map((b,ee)=>s.jsx("span",{className:"badge badge-secondary ml-1",children:b},ee)),I&&s.jsx("button",{className:"btn btn-link btn-sm",type:"button",onClick:b=>{b.preventDefault(),g.act(N.id)},disabled:m,children:"delete"})]})}),C?s.jsx("div",{className:"ml-3 mb-3",children:N.familyChannelPicoID?s.jsx("div",{className:"text-muted",children:"This is a family channel."}):L?s.jsx(Ag,{channel:N,disabled:m,onSave:b=>d.act(b)}):s.jsxs("div",{className:"row",children:[s.jsxs("div",{className:"col",children:["Event Policy",s.jsx(df,{policy:N.eventPolicy})]}),s.jsxs("div",{className:"col",children:["Query Policy",s.jsx(ff,{policy:N.queryPolicy})]})]})}):""]},N.id)}),s.jsx("hr",{}),s.jsx("h4",{children:"New Channel"}),s.jsxs("form",{onSubmit:N=>{if(N.preventDefault(),!w())return;const C=S();E.act({eci:e.eci,data:C})},children:[s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:"new-chann-id",children:"Channel id (ECI)"}),s.jsxs("div",{className:"text-muted small mb-1",children:["Choose once at creation; cannot be changed later. At least"," ",Jo," characters; letters, digits, hyphen, and underscore only. Must be unique across this engine."]}),s.jsx("input",{id:"new-chann-id",type:"text",className:"form-control text-mono",value:u,onChange:N=>a(N.target.value),autoComplete:"off",spellCheck:!1}),(()=>{const N=wu(u);return N?s.jsx("div",{className:"text-danger small mt-1",children:N}):null})()]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:"new-chann-tags",children:"Tags"}),s.jsxs("div",{className:"text-muted small mb-1",children:["Add"," ",s.jsx("button",{type:"button",className:"btn btn-link btn-sm p-0 align-baseline text-mono",onClick:()=>k("oauth-webhook"),children:"oauth-webhook"})," ","for webhook Client Credentials."]}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col",children:s.jsx("input",{id:"new-chann-tags",type:"text",className:"form-control",value:i,onChange:N=>o(N.target.value)})}),s.jsx("div",{className:"col",children:i.split(",").map((N,C)=>s.jsx("span",{className:"badge badge-secondary ml-1",children:N.trim()},C))})]})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:"new-chann-event-policy",children:"Event Policy"}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col",children:s.jsx("textarea",{id:"new-chann-event-policy",rows:3,className:"form-control",value:c,onChange:N=>h(N.target.value)})}),s.jsx("div",{className:"col",children:s.jsx(Js,{src:c})})]})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:"new-chann-query-policy",children:"Query Policy"}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col",children:s.jsx("textarea",{id:"new-chann-query-policy",rows:3,className:"form-control",value:f,onChange:N=>p(N.target.value)})}),s.jsx("div",{className:"col",children:s.jsx(Xs,{src:f})})]})]}),s.jsx("button",{type:"submit",className:"btn btn-outline-primary",disabled:m||!w(),children:"Add"}),s.jsx(Fe,{error:E.error})]})]})};async function Mg(e){return await fe(`/c/${e}/query/io.picolabs.pico-engine-ui/logs`)}const zg=({group:e})=>{const[t,n]=v.useState(!1),r=`log-check-${e.txnId}`;return s.jsxs("div",{children:[s.jsxs("div",{className:"form-check",children:[s.jsx("input",{className:"form-check-input",type:"checkbox",id:r,onChange:l=>n(l.target.checked),checked:t}),s.jsx("label",{className:"form-check-label",htmlFor:r,children:s.jsxs("span",{className:"text-mono",children:[e.time," - ",e.header]})})]}),t&&s.jsx("div",{style:{marginLeft:"2em"},children:e.entries.map((l,i)=>s.jsx("pre",{children:l},i))})]})};function $g({pico:e}){const t=zn([],()=>Mg(e.eci));return v.useEffect(()=>{t.load()},[e.eci]),s.jsxs("div",{className:"pico-logging-tab",children:[s.jsx("h3",{children:"Logging"}),s.jsx(Fe,{error:t.error}),t.waiting&&"Loading...",t.data.map(n=>s.jsx(zg,{group:n},n.txnId))]})}const Ug=({pico:e})=>{const[t,n]=v.useState(""),[r,l]=v.useState("{}"),[i,o]=v.useState({});function u(){if(t.trim().length===0)return!1;try{JSON.parse(r)}catch{return!1}return!0}const a=zn(null,()=>fe(`/c/${e.eci}/query/io.picolabs.pico-engine-ui/pico`)),c=pt(p=>re(`/c/${p.eci}/event/engine_ui/install/query/io.picolabs.pico-engine-ui/pico`,{url:p.url,config:p.config}).then(S=>{a.setData(S),n(""),l("{}")})),h=pt(({eci:p,rid:S})=>re(`/c/${p}/event/engine_ui/uninstall/query/io.picolabs.pico-engine-ui/pico`,{rid:S}).then(w=>{a.setData(w)})),f=pt(({eci:p,url:S})=>re(`/c/${p}/event/engine_ui/flush/query/io.picolabs.pico-engine-ui/pico`,{url:S}).then(w=>{a.setData(w)}));return v.useEffect(()=>{a.load()},[e.eci]),s.jsxs("div",{children:[s.jsx("h3",{children:"Installed Rulesets"}),s.jsx(Fe,{error:a.error}),a.data&&a.data.rulesets.length>0?a.data.rulesets.map(p=>{var E,g,d,m;const S=p.rid,w=`id-rid-${S}`,x=!!i[S];return s.jsxs("div",{children:[s.jsx("div",{children:s.jsxs("div",{className:"form-check",children:[s.jsx("input",{className:"form-check-input",type:"checkbox",id:w,onChange:y=>{const j=Object.assign({},i);y.target.checked?j[S]=!0:delete j[S],o(j)},checked:x}),s.jsx("label",{className:"form-check-label",htmlFor:w,children:s.jsxs("span",{className:"text-mono",children:[p.rid,(g=(E=p==null?void 0:p.meta)==null?void 0:E.krlMeta)!=null&&g.version?"@"+((m=(d=p==null?void 0:p.meta)==null?void 0:d.krlMeta)==null?void 0:m.version):""]})})]})}),x?s.jsxs("div",{className:"ml-3",children:[s.jsxs("div",{children:[s.jsx("button",{className:"btn btn-outline-primary btn-sm",type:"button",onClick:y=>{y.preventDefault(),f.act({eci:e.eci,url:p.url})},disabled:a.waiting||f.waiting,children:"flush"})," ",s.jsx("button",{className:"btn btn-outline-danger btn-sm",type:"button",onClick:y=>{y.preventDefault(),h.act({eci:e.eci,rid:p.rid})},disabled:a.waiting||h.waiting,children:"uninstall"}),s.jsx(Fe,{error:f.error}),s.jsx(Fe,{error:h.error})]}),s.jsx("div",{children:s.jsx("a",{href:p.url,target:"_blank",children:p.url})}),s.jsxs("div",{children:[s.jsx("b",{className:"text-muted",children:"Config:"})," ",JSON.stringify(p.config)]}),p.meta&&s.jsxs("div",{children:[s.jsxs("div",{children:[s.jsx("b",{className:"text-muted",children:"Last flushed:"})," ",p.meta.flushed+""]}),s.jsxs("div",{children:[s.jsx("b",{className:"text-muted",children:"Hash:"})," ",p.meta.hash]}),s.jsxs("div",{children:[s.jsx("b",{className:"text-muted",children:"Compiler version:"})," ",p.meta.compiler.version]}),s.jsxs("div",{children:[s.jsx("b",{className:"text-muted",children:"Compiler warnings:"})," ",Array.isArray(p.meta.compiler.warnings)?s.jsx("ul",{children:p.meta.compiler.warnings.map(y=>{var k;let j="";return y&&typeof y.message=="string"?j=`${(k=y.loc)!=null&&k.start?`${y.loc.start.line}:${y.loc.start.column}: `:""}${y.message}`:j=JSON.stringify(y),s.jsx("li",{children:j})})}):s.jsx("span",{})]})]})]}):""]},S)}):s.jsx("span",{className:"text-muted",children:"- no rulesets -"}),s.jsx("hr",{}),s.jsx("h4",{children:"Install Ruleset"}),s.jsxs("form",{onSubmit:p=>{p.preventDefault(),u()&&t&&c.act({eci:e.eci,url:t,config:JSON.parse(r)})},children:[s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:"new-rs-url",children:"URL"}),s.jsx("input",{id:"new-rs-url",className:"form-control",value:t,onChange:p=>n(p.target.value),disabled:a.waiting||c.waiting})]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{htmlFor:"new-rs-config",children:"Config"}),s.jsx("textarea",{id:"new-rs-config",rows:3,className:"form-control",value:r,onChange:p=>l(p.target.value),disabled:a.waiting||c.waiting})]}),s.jsx("button",{type:"submit",className:"btn btn-outline-primary",disabled:a.waiting||c.waiting||!u(),children:"Install"}),s.jsx(Fe,{error:c.error})]})]})};function we(e){return e.current&&e.current.value}function hf(e){return e.layer2===!0}function Xo(e){const t=e.name||e.channel_name;if(typeof t!="string")return;const n=t.trim();return n.length>0?n:void 0}function at({label:e,value:t,copyable:n}){const[r,l]=v.useState(!1);if(!t)return null;async function i(){if(t)try{await navigator.clipboard.writeText(t),l(!0),window.setTimeout(()=>l(!1),2e3)}catch{}}return s.jsxs("div",{className:"mb-1 d-flex align-items-start",children:[s.jsxs("div",{className:"flex-grow-1",children:[s.jsxs("b",{className:"text-muted",children:[e,":"]})," ",s.jsx("span",{className:"text-mono small",children:t})]}),n?s.jsx("button",{type:"button",className:"btn btn-sm btn-link p-0 ml-2 off-engine-copy-btn",title:r?"Copied":"Copy to clipboard","aria-label":r?"Copied":"Copy to clipboard",onClick:()=>{i()},children:r?s.jsx("span",{className:"text-success small",children:"Copied"}):s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[s.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),s.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}):null]})}function Fg({pico:e,rxEci:t,channel:n,onChannelUpdated:r}){const[l,i]=v.useState(!1),[o,u]=v.useState(""),[a,c]=v.useState(""),[h,f]=v.useState(!1),[p,S]=v.useState(null);v.useEffect(()=>{n&&(u(Ko(n.eventPolicy)),c(Qo(n.queryPolicy)))},[n]);async function w(x){if(x.preventDefault(),!!n){f(!0),S(null);try{await re(`/c/${e.eci}/event/engine_ui/update_channel/query/io.picolabs.pico-engine-ui/pico`,{eci:n.id,tags:n.tags,eventPolicy:Ys(o),queryPolicy:Gs(a)}),r(),i(!1)}catch(E){S(String(E))}finally{f(!1)}}}return s.jsxs("div",{className:"mt-2 p-2 border rounded bg-light",children:[s.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-2",children:[s.jsx("b",{className:"small",children:"Subscription Rx channel policy"}),n&&!l?s.jsx("button",{type:"button",className:"btn btn-sm btn-outline-secondary",onClick:()=>i(!0),children:"Edit policies"}):null,l?s.jsx("button",{type:"button",className:"btn btn-sm btn-link p-0",onClick:()=>{i(!1),S(null)},children:"Cancel"}):null]}),s.jsxs("div",{className:"small text-muted text-mono mb-1",children:["Rx ECI: ",t]}),n&&l?s.jsxs("form",{onSubmit:w,children:[s.jsxs("div",{className:"form-group mb-2",children:[s.jsx("label",{className:"small font-weight-bold",children:"Event policy"}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col",children:s.jsx("textarea",{rows:3,className:"form-control form-control-sm",value:o,onChange:x=>u(x.target.value),disabled:h})}),s.jsx("div",{className:"col",children:s.jsx(Js,{src:o})})]})]}),s.jsxs("div",{className:"form-group mb-2",children:[s.jsx("label",{className:"small font-weight-bold",children:"Query policy"}),s.jsxs("div",{className:"row",children:[s.jsx("div",{className:"col",children:s.jsx("textarea",{rows:3,className:"form-control form-control-sm",value:a,onChange:x=>c(x.target.value),disabled:h})}),s.jsx("div",{className:"col",children:s.jsx(Xs,{src:a})})]})]}),s.jsx("button",{type:"submit",className:"btn btn-sm btn-outline-primary",disabled:h,children:"Save policies"})]}):n?s.jsxs("div",{className:"row",children:[s.jsxs("div",{className:"col",children:[s.jsx("div",{className:"small font-weight-bold",children:"Events"}),s.jsx(df,{policy:n.eventPolicy})]}),s.jsxs("div",{className:"col",children:[s.jsx("div",{className:"small font-weight-bold",children:"Queries"}),s.jsx(ff,{policy:n.queryPolicy})]})]}):s.jsx("div",{className:"text-muted small",children:"Channel details not loaded — reload the tab or expand this subscription again."}),p?s.jsx("div",{className:"text-danger small mt-1",children:p}):null]})}function Bg({pico:e,sub:t,rxChannel:n,onDelete:r,onRefresh:l,onChannelUpdated:i,showSend:o,deleteLabel:u="Cancel subscription"}){const a=hf(t),c=v.useRef(null),h=v.useRef(null),[f,p]=v.useState(null),[S,w]=v.useState(!1);async function x(E){E.preventDefault(),p(null),w(!1);const g=we(c)||"wrangler",d=we(h)||"ping";try{await re(`/c/${e.eci}/event/wrangler/send_event_on_subs`,{subID:t.Id,domain:g,type:d,attrs:{uiTest:!0}}),w(!0)}catch(m){p(String(m))}}return s.jsxs("div",{className:"ml-3 mb-3",children:[a?s.jsx("span",{className:"badge badge-primary mb-2",children:"layer2"}):s.jsx("span",{className:"badge badge-secondary mb-2",children:"legacy ECI"}),s.jsx(at,{label:"Remote Tx DID",value:t.Tx_did}),s.jsx(at,{label:"Local Rx DID",value:t.Rx_did}),!a&&t.Tx?s.jsx(at,{label:"Remote Tx ECI",value:t.Tx}):null,t.Tx_host?s.jsx(at,{label:"Tx host",value:t.Tx_host}):null,t.Tx_role?s.jsx(at,{label:"Tx role",value:t.Tx_role}):null,t.Rx_role?s.jsx(at,{label:"Rx role",value:t.Rx_role}):null,Xo(t)?s.jsx(at,{label:"Name",value:Xo(t)}):null,t.Rx?s.jsx(Fg,{pico:e,rxEci:t.Rx,channel:n,onChannelUpdated:i}):null,o&&a?s.jsxs("form",{className:"form-inline mt-2",onSubmit:x,children:[s.jsx("input",{type:"text",className:"form-control form-control-sm mr-1",ref:c,placeholder:"domain",defaultValue:"wrangler"}),s.jsx("input",{type:"text",className:"form-control form-control-sm mr-1",ref:h,placeholder:"type",defaultValue:"ping"}),s.jsx("button",{type:"submit",className:"btn btn-sm btn-outline-primary",children:"Send test event"})]}):null,S?s.jsx("div",{className:"text-success small mt-1",children:"Event sent."}):null,f?s.jsx("div",{className:"text-danger small mt-1",children:f}):null,s.jsxs("details",{className:"mt-2",children:[s.jsx("summary",{className:"small text-muted",children:"Raw bus record"}),s.jsx("pre",{className:"small mb-0",children:JSON.stringify(t,null,2)})]}),r?s.jsx("button",{className:"btn btn-outline-danger btn-sm mt-2",type:"button",onClick:r,children:u}):null]})}function Vg({pico:e,myDid:t,publicIntro:n,wellKnownRx:r,onPublicIntroChange:l}){const[i,o]=v.useState(!1),[u,a]=v.useState(null);async function c(h){o(!0),a(null);try{await re(`/c/${e.eci}/event/wrangler/set_public_intro`,{enabled:h}),l(h)}catch(f){a(String(f))}finally{o(!1)}}return s.jsxs("div",{className:"mb-4 p-3 border rounded",children:[s.jsx("h5",{className:"h6 mb-3",children:"Identity"}),s.jsx(at,{label:"did:webvh (myDid)",value:t||void 0,copyable:!0}),r?s.jsx(at,{label:"Legacy wellKnown_Rx ECI",value:r}):null,s.jsxs("div",{className:"form-check mt-2",children:[s.jsx("input",{className:"form-check-input",type:"checkbox",id:`public-intro-${e.eci}`,checked:n===!0,disabled:i||n===null,onChange:h=>c(h.target.checked)}),s.jsx("label",{className:"form-check-label",htmlFor:`public-intro-${e.eci}`,children:"Public intro (accept unsolicited SKY intro on did:webvh)"})]}),u?s.jsx("div",{className:"text-danger small mt-1",children:u}):null]})}const Wg=({pico:e})=>{const[t,n]=v.useState([]),[r,l]=v.useState([]),[i,o]=v.useState([]),[u,a]=v.useState(""),[c,h]=v.useState(null),[f,p]=v.useState(null),[S,w]=v.useState({}),[x,E]=v.useState("layer2"),[g,d]=v.useState(null),m=v.useRef(null),y=v.useRef(null),j=v.useRef(null),k=v.useRef(null),N=v.useRef(null),C=v.useRef(null),I=v.useRef(null),L=v.useRef(null),b=v.useRef(null),ee=v.useRef(null),ie=v.useRef(null),xt=v.useRef(null),wt=v.useRef(null),Me=zn(null,()=>fe(`/c/${e.eci}/query/io.picolabs.pico-engine-ui/pico`)),St=Me.data&&Me.data.channels||[];function P(z){if(z)return St.find(te=>te.id===z)}function O(){A(),U(),W(),qe(),xe(),Me.load(),se.refreshSubscriptions()}const A=()=>{fe(`/c/${e.eci}/query/io.picolabs.subscription/wellKnown_Rx`).then(z=>{a((z==null?void 0:z.id)||"")}).catch(()=>a(""))},U=()=>{fe(`/c/${e.eci}/query/io.picolabs.wrangler/myDid`).then(z=>h(z?String(z):null)).catch(()=>h(null)),fe(`/c/${e.eci}/query/io.picolabs.wrangler/publicIntro`).then(z=>p(!!z)).catch(()=>p(null))},W=()=>{fe(`/c/${e.eci}/query/io.picolabs.subscription/established`).then(z=>{n(z||[])})},qe=()=>{fe(`/c/${e.eci}/query/io.picolabs.subscription/inbound`).then(z=>{o(z||[])})},xe=()=>{fe(`/c/${e.eci}/query/io.picolabs.subscription/outbound`).then(z=>{l(z||[])})};v.useEffect(()=>{O()},[e.eci]);const Ze=async z=>{await re(`/c/${e.eci}/event/wrangler/pending_subscription_approval`,{Id:z}),O()},Ee=async z=>{await re(`/c/${e.eci}/event/wrangler/outbound_cancellation`,{Id:z}),O()},Nt=async z=>{await re(`/c/${e.eci}/event/wrangler/subscription_cancellation`,{Id:z}),O()};async function fi(z){z.preventDefault(),d(null);const te=(we(m)||"").trim();if(!te.startsWith("did:")){d("target_did must start with did:");return}try{await re(`/c/${e.eci}/event/wrangler/subscription`,{layer2:!0,target_did:te,name:we(y)||null,Rx_role:we(j)||null,Tx_role:we(k)||null,channel_type:we(N)||"Tx_Rx",password:we(C)||null}),xe(),se.refreshSubscriptions()}catch(H){d(String(H))}}async function pi(z){z.preventDefault(),d(null);try{await re(`/c/${e.eci}/event/wrangler/subscription`,{wellKnown_Tx:we(I)||"",Rx_role:we(L)||null,Tx_role:we(b)||null,name:we(ee)||null,channel_type:we(ie)||null,Tx_host:we(xt)||null,password:we(wt)||null}),xe()}catch(te){d(String(te))}}function Vn(z,te){return z.map(H=>{const Ur=!!S[H.Id],Fr=Xo(H);return s.jsxs("div",{children:[s.jsxs("div",{className:"form-check",children:[s.jsx("input",{className:"form-check-input",type:"checkbox",id:`${te.keyPrefix}-sub-${H.Id}`,checked:Ur,onChange:T=>{const ue={...S};T.target.checked?ue[H.Id]=!0:delete ue[H.Id],w(ue)}}),s.jsxs("label",{className:"form-check-label",htmlFor:`${te.keyPrefix}-sub-${H.Id}`,children:[Fr?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"font-weight-bold",children:Fr}),s.jsx("span",{className:"text-muted small ml-2 text-mono",children:H.Id})]}):s.jsx("span",{className:"text-mono",children:H.Id}),hf(H)?s.jsx("span",{className:"badge badge-primary ml-1",children:"layer2"}):null]})]}),Ur?s.jsxs(s.Fragment,{children:[s.jsx(Bg,{pico:e,sub:H,rxChannel:P(H.Rx),showSend:te.showSend,onRefresh:O,onChannelUpdated:()=>{Me.load()},deleteLabel:te.deleteLabel,onDelete:te.onDelete&&!te.onAccept?()=>{te.onDelete(H.Id)}:void 0}),te.onAccept?s.jsx("div",{className:"ml-3 mb-3",children:s.jsx("button",{className:"btn btn-outline-primary btn-sm",type:"button",onClick:()=>{te.onAccept(H.Id)},children:"Accept"})}):null]}):null]},`${te.keyPrefix}-${H.Id}`)})}return s.jsxs("div",{children:[s.jsx("h3",{children:"Subscriptions"}),s.jsx(Fe,{error:Me.error}),s.jsx(Vg,{pico:e,myDid:c,publicIntro:f,wellKnownRx:u,onPublicIntroChange:p}),t.length>0?s.jsx("h5",{children:"Established"}):null,Vn(t,{keyPrefix:"est",onDelete:Nt,deleteLabel:"Delete subscription",showSend:!0}),i.length>0?s.jsx("h5",{className:"mt-3",children:"Inbound pending"}):null,Vn(i,{keyPrefix:"in",onAccept:Ze}),r.length>0?s.jsx("h5",{className:"mt-3",children:"Outbound pending"}):null,Vn(r,{keyPrefix:"out",onDelete:Ee,deleteLabel:"Cancel outbound"}),s.jsxs("div",{className:"mt-4",children:[s.jsx("h5",{children:"New subscription"}),s.jsxs("ul",{className:"nav nav-pills mb-2",children:[s.jsx("li",{className:"nav-item",children:s.jsx("button",{type:"button",className:"nav-link"+(x==="layer2"?" active":""),onClick:()=>E("layer2"),children:"Layer 2 (DID)"})}),s.jsx("li",{className:"nav-item",children:s.jsx("button",{type:"button",className:"nav-link"+(x==="legacy"?" active":""),onClick:()=>E("legacy"),children:"Legacy (ECI)"})})]}),x==="layer2"?s.jsxs("form",{onSubmit:fi,children:[s.jsxs("p",{className:"text-muted small",children:["Introduce via SKY to a peer's ",s.jsx("code",{children:"did:webvh"})," or"," ",s.jsx("code",{children:"did:peer"}),". Use your ",s.jsx("b",{children:"myDid"})," above as the target on the remote pico."]}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"target_did"}),s.jsx("input",{type:"text",className:"form-control",ref:m,placeholder:"did:webvh:… or did:peer:2…",required:!0})]}),s.jsxs("div",{className:"form-row",children:[s.jsxs("div",{className:"form-group col-md-4",children:[s.jsx("label",{children:"name"}),s.jsx("input",{type:"text",className:"form-control",ref:y})]}),s.jsxs("div",{className:"form-group col-md-4",children:[s.jsx("label",{children:"Rx_role"}),s.jsx("input",{type:"text",className:"form-control",ref:j})]}),s.jsxs("div",{className:"form-group col-md-4",children:[s.jsx("label",{children:"Tx_role"}),s.jsx("input",{type:"text",className:"form-control",ref:k})]})]}),s.jsxs("div",{className:"form-row",children:[s.jsxs("div",{className:"form-group col-md-6",children:[s.jsx("label",{children:"channel_type"}),s.jsx("input",{type:"text",className:"form-control",ref:N,defaultValue:"Tx_Rx"})]}),s.jsxs("div",{className:"form-group col-md-6",children:[s.jsx("label",{children:"password (optional)"}),s.jsx("input",{type:"text",className:"form-control",ref:C})]})]}),s.jsx("button",{type:"submit",className:"btn btn-outline-primary",children:"Request layer2 subscription"})]}):s.jsxs("form",{onSubmit:pi,children:[s.jsx("p",{className:"text-muted small",children:"Legacy introduction via wellKnown_Rx ECI (pre-1.6)."}),s.jsxs("div",{className:"form-group",children:[s.jsx("label",{children:"wellKnown_Tx"}),s.jsx("input",{type:"text",className:"form-control",ref:I,placeholder:"Remote wellKnown_Rx ECI"})]}),s.jsxs("div",{className:"form-row",children:[s.jsxs("div",{className:"form-group col-md-4",children:[s.jsx("label",{children:"Rx_role"}),s.jsx("input",{type:"text",className:"form-control",ref:L})]}),s.jsxs("div",{className:"form-group col-md-4",children:[s.jsx("label",{children:"Tx_role"}),s.jsx("input",{type:"text",className:"form-control",ref:b})]}),s.jsxs("div",{className:"form-group col-md-4",children:[s.jsx("label",{children:"name"}),s.jsx("input",{type:"text",className:"form-control",ref:ee})]})]}),s.jsxs("div",{className:"form-row",children:[s.jsxs("div",{className:"form-group col-md-4",children:[s.jsx("label",{children:"channel_type"}),s.jsx("input",{type:"text",className:"form-control",ref:ie})]}),s.jsxs("div",{className:"form-group col-md-4",children:[s.jsx("label",{children:"Tx_host"}),s.jsx("input",{type:"text",className:"form-control",ref:xt})]}),s.jsxs("div",{className:"form-group col-md-4",children:[s.jsx("label",{children:"password"}),s.jsx("input",{type:"text",className:"form-control",ref:wt})]})]}),s.jsx("button",{type:"submit",className:"btn btn-outline-secondary",children:"Request legacy subscription"})]}),g?s.jsx("div",{className:"text-danger small mt-2",children:g}):null]})]})};function Su(e){const t=e.currentTarget,n={};for(let r=0;r<t.elements.length;r++){const l=t.elements[r];if(l&&l.name){let i=l.value;try{i=JSON.parse(i)}catch{}n[l.name]=i}}return n}const Hg=({pico:e})=>{const t=zn(null,()=>fe(`/c/${e.eci}/query/io.picolabs.pico-engine-ui/pico`)),n=zn(null,()=>fe(`/c/${e.eci}/query/io.picolabs.pico-engine-ui/testingECI`)),[r,l]=v.useState(e.eci),[i,o]=v.useState(null),[u,a]=v.useState(!1),[c,h]=v.useState(null),[f,p]=v.useState({}),[S,w]=v.useState({});v.useEffect(()=>{t.load(),n.load(),p({})},[e.eci]),v.useEffect(()=>{n.data&&l(n.data)},[n.data]);async function x(y){p({...f,[y]:{waiting:!0,error:null}});try{const j=await fe(`/c/${e.eci}/query/${y}/__testing`);p({...f,[y]:{schema:j}})}catch(j){p({...f,[y]:{error:j+""}})}}function E(y,j){return async k=>{k.preventDefault();const N=Su(k);a(!0),o(null),h(null);try{const C=await re(`/c/${r}/query/${y}/${j}`,N,!1);h(JSON.stringify(C,void 0,2))}catch(C){o(C+"")}finally{a(!1)}}}function g(y,j){return async k=>{k.preventDefault();const N=Su(k);a(!0),o(null),h(null);try{const C=await re(`/c/${r}/event-wait/${y}/${j}`,N,!1);h(JSON.stringify(C,void 0,2))}catch(C){o(C+"")}finally{a(!1)}}}const d=t.data?t.data.rulesets:[],m=t.data&&t.data.channels.filter(y=>y.familyChannelPicoID===null)||[];return s.jsx("div",{children:s.jsxs("div",{className:"row",children:[s.jsxs("div",{className:"col",children:[s.jsx("h3",{children:"Testing"}),s.jsx("div",{className:"mt-3 mb-3",children:s.jsxs("form",{className:"form-inline",children:[s.jsx("label",{children:"ECI:"}),s.jsx("select",{className:"form-control form-control-sm ml-2 text-mono",value:r,onChange:y=>{l(y.target.value),re(`/c/${e.eci}/event/engine_ui/testing_eci`,{eci:y.target.value}).catch(console.error)},children:m.map(y=>{const j=y.id+" "+y.tags.map(k=>`#${k}`).join(" ");return s.jsx("option",{value:y.id,children:j},y.id)})})]})}),d.map(y=>{const j=!!S[y.rid],k=f[y.rid]||null;return s.jsxs("div",{children:[s.jsxs("div",{className:"form-check",children:[s.jsx("input",{className:"form-check-input",type:"checkbox",id:`rid-${y.rid}`,onChange:N=>{const C=Object.assign({},S);N.target.checked?(C[y.rid]=!0,x(y.rid)):delete C[y.rid],w(C)},checked:j}),s.jsx("label",{className:"form-check-label",htmlFor:`rid-${y.rid}`,children:y.rid})]}),j&&k?s.jsxs("div",{children:[s.jsx(Fe,{error:k.error}),k.schema?s.jsxs("div",{className:"pl-4",children:[(k.schema.queries||[]).map(N=>s.jsxs("form",{onSubmit:E(y.rid,N.name),className:"border border-primary p-2",children:[s.jsx("div",{children:(N.args||[]).map(C=>s.jsx("input",{name:C,placeholder:C},C))}),s.jsx("button",{type:"submit",className:"btn btn-sm btn-primary",children:N.name})]},N.name)),(k.schema.events||[]).map((N,C)=>{const I=`${N.domain}:${N.name}`;return s.jsxs("form",{onSubmit:g(N.domain,N.name),className:"border border-warning p-2",children:[s.jsx("div",{children:(N.attrs||[]).map(L=>s.jsx("input",{name:L,placeholder:L},L))}),s.jsx("button",{type:"submit",className:"btn btn-sm btn-warning",children:I})]},I+C)})]}):"",k.waiting?"Loading...":""]}):""]},y.rid)})]}),s.jsxs("div",{className:"col",children:[s.jsxs("div",{className:"float-right",children:[s.jsx("span",{className:"text-muted",children:"Legend:"}),s.jsx("span",{className:"badge badge-primary ml-1",children:"query"}),s.jsx("span",{className:"badge badge-warning ml-1",children:"event"})]}),s.jsx("h3",{children:"Results"}),s.jsx(Fe,{error:i}),u?"Testing...":c?s.jsx("pre",{children:c}):""]})]})})};function dn(e,t,n){let r=`/pico/${e.eci}`;return n&&(r+="/"+n),s.jsx("li",{className:"nav-item",children:s.jsx(Ym,{className:"nav-link",to:r,end:!0,children:t})})}function Kg(e,t){switch(typeof t=="string"?t.toLowerCase().trim():""){case"rulesets":return s.jsx(Ug,{pico:e});case"channels":return s.jsx(Dg,{pico:e});case"logging":return s.jsx($g,{pico:e});case"testing":return s.jsx(Hg,{pico:e});case"subscriptions":return s.jsx(Wg,{pico:e})}return s.jsx(yg,{pico:e})}const Qg=e=>{const{pico:t,openEci:n,openTab:r}=e,l=t.eci===n,i=se.use(),o=i.picoMoving&&i.picoMoving.eci===t.eci,u=v.useRef(null);function a(h){const f=u.current;se.setPicoMoving({eci:t.eci,action:"moving",relX:f?h.clientX-f.offsetLeft:0,relY:f?h.clientY-f.offsetTop:0})}function c(h){h.stopPropagation();const f=u.current;se.setPicoMoving({eci:t.eci,action:"resizing",relX:f?h.clientX-f.offsetLeft:0,relY:f?h.clientY-f.offsetTop:0})}return s.jsx("div",{ref:u,className:"card pico"+(l?" open":"")+(o?"":" pico-not-moving-or-resizing"),style:{left:t.x,top:t.y,maxWidth:t.width,maxHeight:t.height,backgroundColor:t.backgroundColor},onMouseDown:l?void 0:a,children:l?s.jsxs(v.Fragment,{children:[s.jsx(Or,{to:"/",className:"btn btn-light position-absolute",style:{right:5,top:5},children:"Close"}),s.jsxs("div",{className:"card-header",children:[s.jsx("div",{className:"card-header-pico-name",style:{color:vu(t.backgroundColor)},children:t.name}),s.jsxs("ul",{className:"nav nav-tabs card-header-tabs",children:[dn(t,"About"),dn(t,"Rulesets","rulesets"),dn(t,"Channels","channels"),dn(t,"Logging","logging"),dn(t,"Testing","testing"),dn(t,"Subscriptions","subscriptions")]})]}),s.jsx("div",{className:"card-body bg-white overflow-auto",children:Kg(t,r)})]}):s.jsxs(v.Fragment,{children:[s.jsx("div",{className:"card-body",children:s.jsx(Or,{to:"/pico/"+t.eci,className:"pico-name-open-btn",onMouseDown:h=>h.stopPropagation(),style:{color:vu(t.backgroundColor)},children:t.name})}),s.jsx("div",{className:"pico-resize-handle",onMouseDown:c})]})})};function Yg(e){try{return new Date(e).toLocaleString()}catch{return e}}function Nu(e){return e.length<=16?e:e.slice(0,8)+"…"+e.slice(-6)}function Hi({id:e,title:t,summary:n,open:r,onToggle:l,children:i}){return s.jsxs("div",{className:"settings-section border rounded mb-3",children:[s.jsxs("button",{type:"button",id:`${e}-toggle`,className:"settings-section-toggle btn btn-link btn-block text-left d-flex align-items-center justify-content-between","aria-expanded":r,"aria-controls":`${e}-panel`,onClick:l,children:[s.jsx("span",{className:"h6 mb-0 text-dark",children:t}),s.jsx("span",{className:"settings-section-chevron text-muted","aria-hidden":"true",children:r?"▾":"▸"})]}),!r&&n?s.jsx("div",{className:"settings-section-summary px-3 pb-2 text-muted small",children:n}):"",r?s.jsx("div",{id:`${e}-panel`,className:"settings-section-body px-3 pb-3",children:i}):""]})}const Gg=({open:e,onClose:t,onLogout:n,allowSelfSignup:r=!1})=>{const[l,i]=v.useState(null),[o,u]=v.useState(!1),[a,c]=v.useState(!1),[h,f]=v.useState(null),[p,S]=v.useState(""),[w,x]=v.useState(""),[E,g]=v.useState(""),[d,m]=v.useState(null),[y,j]=v.useState(!1),[k,N]=v.useState(null),[C,I]=v.useState(!1),[L,b]=v.useState(null),[ee,ie]=v.useState(""),[xt,wt]=v.useState(""),[Me,St]=v.useState(!0),[P,O]=v.useState(!1),[A,U]=v.useState(null),[W,qe]=v.useState({passkeys:!0,invite:!1,oauth:!1});function xe(T){qe(ue=>({...ue,[T]:!ue[T]}))}const Ze=v.useCallback(async()=>{I(!0),b(null);try{N(await Eg())}catch(T){N(null),b(T+"")}finally{I(!1)}},[]),Ee=v.useCallback(async()=>{u(!0),f(null);try{const T=await eg();if(!T.authenticated)throw new Error("Not signed in");i(T)}catch(T){f(T+"")}finally{u(!1)}},[]);v.useEffect(()=>{e&&(S(""),x(""),m(null),ie(""),wt(""),St(!0),U(null),qe({passkeys:!0,invite:!1,oauth:!1}),Ee(),Ze())},[e,Ee,Ze]),v.useEffect(()=>{if(!e)return;function T(ue){ue.key==="Escape"&&t()}return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[e,t]);async function Nt(){j(!0),f(null);try{const T=await ng(w.trim()||void 0,E.trim()||void 0);m(lg(T.token)),x(""),g("")}catch(T){f(T+"")}finally{j(!1)}}async function fi(){if(d)try{await navigator.clipboard.writeText(d)}catch(T){f(T+"")}}async function pi(){O(!0),f(null),U(null);try{const T=xt.split(/\r?\n/).map(Wn=>Wn.trim()).filter(Boolean),ue=await Cg({name:ee.trim(),redirect_uris:T,public_client:Me});U(ue),ie(""),wt(""),qe(Wn=>({...Wn,oauth:!0})),await Ze()}catch(T){f(T+"")}finally{O(!1)}}async function Vn(T){if(window.confirm(`Remove OAuth app “${T.name}”?`)){O(!0),f(null);try{await _g(T.client_id),await Ze()}catch(ue){f(ue+"")}finally{O(!1)}}}async function z(){c(!0),f(null);try{const T=await nt("/auth/credentials/options",{}),ue=await Ho({optionsJSON:T});await nt("/auth/credentials/verify",{...ue,label:p.trim()||"passkey"}),S(""),await Ee()}catch(T){f(T+"")}finally{c(!1)}}async function te(T){if(((l==null?void 0:l.credentials)||[]).length<=1){f("You must keep at least one passkey on your account.");return}if(window.confirm(`Remove passkey “${T.label||Nu(T.credentialID)}”?`)){c(!0),f(null);try{await tg(`/auth/credentials/${encodeURIComponent(T.credentialID)}`),await Ee()}catch(Wn){f(Wn+"")}finally{c(!1)}}}if(!e)return null;const H=(l==null?void 0:l.credentials)||[],Ur=H.length===0?"No passkeys":H.length===1?"1 passkey":`${H.length} passkeys`,Fr=C?"Loading…":L?"Unavailable":k&&k.length>0?k.length===1?"1 app":`${k.length} apps`:"No apps registered";return s.jsx("div",{className:"settings-modal-backdrop",onClick:t,children:s.jsxs("div",{className:"settings-modal card shadow",role:"dialog","aria-modal":"true","aria-labelledby":"settings-modal-title",onClick:T=>T.stopPropagation(),children:[s.jsxs("div",{className:"card-header d-flex align-items-center justify-content-between",children:[s.jsx("h2",{id:"settings-modal-title",className:"h5 mb-0",children:"Settings"}),s.jsx("button",{type:"button",className:"close","aria-label":"Close",onClick:t,children:s.jsx("span",{"aria-hidden":"true",children:"×"})})]}),s.jsxs("div",{className:"card-body",children:[o?s.jsx("p",{className:"text-muted mb-0",children:"Loading…"}):"",!o&&l?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"text-muted small",children:"Signed into"}),s.jsx("div",{className:"font-weight-bold",children:l.displayName||"Account"})]}),s.jsxs(Hi,{id:"settings-passkeys",title:"Passkeys",summary:Ur,open:W.passkeys,onToggle:()=>xe("passkeys"),children:[H.length===0?s.jsx("p",{className:"text-muted small mb-3",children:"No passkeys found."}):s.jsx("ul",{className:"list-group mb-3",children:H.map(T=>s.jsxs("li",{className:"list-group-item d-flex align-items-start justify-content-between",children:[s.jsxs("div",{className:"mr-3",children:[s.jsx("div",{className:"font-weight-bold",children:T.label||"passkey"}),s.jsx("div",{className:"text-muted small text-mono",children:Nu(T.credentialID)}),s.jsxs("div",{className:"text-muted small",children:["Added ",Yg(T.createdAt)]})]}),s.jsx("button",{type:"button",className:"btn btn-sm btn-outline-danger",disabled:a||H.length<=1,title:H.length<=1?"Cannot remove your only passkey":"Remove passkey",onClick:()=>te(T),children:"Remove"})]},T.credentialID))}),s.jsx("h4",{className:"h6",children:"Add passkey"}),s.jsxs("div",{className:"form-group mb-2",children:[s.jsx("label",{htmlFor:"passkeyLabel",className:"small mb-1",children:"Label (optional)"}),s.jsx("input",{id:"passkeyLabel",className:"form-control form-control-sm",value:p,onChange:T=>S(T.target.value),placeholder:"e.g. MacBook, YubiKey",disabled:a})]}),s.jsx("button",{type:"button",className:"btn btn-sm btn-primary",disabled:a,onClick:z,children:a?"Waiting for passkey…":"Add passkey"})]}),r?"":s.jsxs(Hi,{id:"settings-invite",title:"Invite someone",summary:"Create a single-use registration link",open:W.invite,onToggle:()=>xe("invite"),children:[s.jsx("p",{className:"text-muted small mb-2",children:"Create a single-use link so someone can register when self-signup is disabled."}),s.jsxs("div",{className:"form-group mb-2",children:[s.jsx("label",{htmlFor:"inviteLabel",className:"small mb-1",children:"Label (optional)"}),s.jsx("input",{id:"inviteLabel",className:"form-control form-control-sm",value:w,onChange:T=>x(T.target.value),placeholder:"e.g. Alex",disabled:y||a})]}),s.jsxs("div",{className:"form-group mb-2",children:[s.jsx("label",{htmlFor:"inviteBootstrapUrl",className:"small mb-1",children:"Bootstrap ruleset URL (optional)"}),s.jsx("input",{id:"inviteBootstrapUrl",className:"form-control form-control-sm text-mono",value:E,onChange:T=>g(T.target.value),placeholder:"file://… or https://…/bootstrap.krl",disabled:y||a}),s.jsx("small",{className:"form-text text-muted",children:"Installed on the new root when the invite is accepted. Validated when you create the invite."})]}),s.jsx("button",{type:"button",className:"btn btn-sm btn-outline-primary",disabled:y||a,onClick:Nt,children:y?"Creating…":"Create invite link"}),d?s.jsxs("div",{className:"mt-3",children:[s.jsx("label",{htmlFor:"inviteLink",className:"small mb-1",children:"Invite link"}),s.jsxs("div",{className:"input-group input-group-sm",children:[s.jsx("input",{id:"inviteLink",className:"form-control text-mono",value:d,readOnly:!0}),s.jsx("div",{className:"input-group-append",children:s.jsx("button",{type:"button",className:"btn btn-outline-secondary",onClick:fi,children:"Copy"})})]})]}):""]}),s.jsxs(Hi,{id:"settings-oauth",title:"OAuth apps",summary:Fr,open:W.oauth,onToggle:()=>xe("oauth"),children:[s.jsxs("p",{className:"text-muted small mb-2",children:["Register apps like Home Assistant for authorization-code access across this mesh. Install ",s.jsx("code",{children:"io.picolabs.oauth"})," on the root pico first."]}),C?s.jsx("p",{className:"text-muted small mb-0",children:"Loading apps…"}):L?s.jsx("p",{className:"text-muted small mb-0",children:L}):k&&k.length>0?s.jsx("ul",{className:"list-group mb-3",children:k.map(T=>s.jsxs("li",{className:"list-group-item d-flex align-items-start justify-content-between",children:[s.jsxs("div",{className:"mr-3 flex-grow-1",children:[s.jsx("div",{className:"font-weight-bold",children:T.name}),s.jsx("label",{className:"small mb-0 text-muted",children:"Client ID"}),s.jsx("input",{className:"form-control form-control-sm text-mono mb-1",value:T.client_id,readOnly:!0,onFocus:ue=>ue.target.select()}),s.jsx("div",{className:"text-muted small",children:T.public_client?"Public (PKCE)":"Confidential"}),s.jsx("div",{className:"text-muted small",children:T.redirect_uris.join(", ")})]}),s.jsx("button",{type:"button",className:"btn btn-sm btn-outline-danger",disabled:P||a,onClick:()=>Vn(T),children:"Remove"})]},T.client_id))}):k?s.jsx("p",{className:"text-muted small",children:"No OAuth apps registered."}):"",s.jsxs("div",{className:"form-group mb-2",children:[s.jsx("label",{htmlFor:"oauthAppName",className:"small mb-1",children:"App name"}),s.jsx("input",{id:"oauthAppName",className:"form-control form-control-sm",value:ee,onChange:T=>ie(T.target.value),placeholder:"Home Assistant",disabled:P||a})]}),s.jsxs("div",{className:"form-group mb-2",children:[s.jsx("label",{htmlFor:"oauthRedirectUris",className:"small mb-1",children:"Redirect URIs (one per line)"}),s.jsx("textarea",{id:"oauthRedirectUris",className:"form-control form-control-sm text-mono",rows:3,value:xt,onChange:T=>wt(T.target.value),placeholder:"https://homeassistant.local:8123/auth/external/callback",disabled:P||a})]}),s.jsxs("div",{className:"form-check mb-2",children:[s.jsx("input",{id:"oauthPublicClient",className:"form-check-input",type:"checkbox",checked:Me,onChange:T=>St(T.target.checked),disabled:P||a}),s.jsx("label",{className:"form-check-label small",htmlFor:"oauthPublicClient",children:"Public client (PKCE; typical for Home Assistant)"})]}),s.jsx("button",{type:"button",className:"btn btn-sm btn-primary",disabled:P||a,onClick:pi,children:P?"Registering…":"Register app"}),A?s.jsxs("div",{className:"mt-3",children:[s.jsxs("div",{className:"alert alert-success py-2 small mb-2",children:["App registered. Copy the client ID",A.client_secret?" and client secret (shown once)":""," ","into your integrator."]}),s.jsx("label",{className:"small mb-1",children:"Client ID"}),s.jsx("input",{className:"form-control form-control-sm text-mono mb-2",value:A.client_id,readOnly:!0,onFocus:T=>T.target.select()}),A.client_secret?s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"small mb-1",children:"Client secret"}),s.jsx("input",{className:"form-control form-control-sm text-mono",value:A.client_secret,readOnly:!0})]}):""]}):""]})]}):"",h?s.jsx("div",{className:"alert alert-danger py-2",children:h}):""]}),s.jsxs("div",{className:"card-footer d-flex justify-content-between",children:[s.jsx("button",{type:"button",className:"btn btn-outline-secondary",onClick:t,disabled:a,children:"Close"}),s.jsx("button",{type:"button",className:"btn btn-outline-danger",disabled:a,onClick:n,children:"Log out"})]})]})})},Ki=()=>{var a,c,h;let e=wm();const t=e.eci,n=e.tab,r=se.use(),[l,i]=v.useState(!1);v.useEffect(()=>{se.fetchAllWithBootstrapRetry()},[]);function o(f){if(r.picoMoving)switch(r.picoMoving.action){case"moving":{r.picoMoving.offEngine?se.updateOffEnginePosition(f.clientX-(r.picoMoving.relX||0),f.clientY-(r.picoMoving.relY||0)):r.picoMoving.eci&&se.updateBox(r.picoMoving.eci,{x:f.clientX-(r.picoMoving.relX||0),y:f.clientY-(r.picoMoving.relY||0)});break}case"resizing":{const p=r.picoMoving.eci;if(!p)break;const S=r.picoBoxes[p];S&&se.updateBox(p,{width:Math.max(0,f.clientX-S.x),height:Math.max(0,f.clientY-S.y)});break}}}function u(f){if(r.picoMoving){if(r.picoMoving.offEngine)se.persistOffEnginePosition();else if(r.picoMoving.eci){const p=r.picoBoxes[r.picoMoving.eci];p&&of(p.eci,{x:p.x,y:p.y,width:p.width,height:p.height})}se.setPicoMoving(null)}}return s.jsxs("div",{id:"picos-page",onMouseMove:o,onMouseUp:u,children:[s.jsxs("footer",{className:"fixed-bottom-right p-5",children:[s.jsxs("div",{children:["Powered by"," ",s.jsx("a",{href:"https://github.com/Picolab/pico-engine",children:"pico-engine"})]}),s.jsx("div",{children:r.uiContext?`version: ${r.uiContext.version}`:""}),(c=(a=r.uiContext)==null?void 0:a.session)!=null&&c.displayName?s.jsxs("div",{children:["Signed into ",r.uiContext.session.displayName]}):"",s.jsx("div",{className:"mt-2",children:s.jsx("button",{type:"button",className:"btn btn-sm btn-outline-secondary",onClick:()=>i(!0),children:"Settings"})}),!1]}),s.jsx(Gg,{open:l,onClose:()=>i(!1),onLogout:()=>se.logout(),allowSelfSignup:((h=r.uiContext)==null?void 0:h.allowSelfSignup)===!0}),s.jsxs("div",{className:"container-fluid",children:[r.loading?"Loading...":"",r.error?s.jsx("div",{className:"alert alert-danger",children:r.error}):""]}),Object.values(r.picoBoxes).map(f=>s.jsx(Qg,{pico:f,openEci:t,openTab:n},f.eci+f.x+f.y+f.width+f.height)),r.offEngineNode?s.jsx(gg,{node:r.offEngineNode}):null,s.jsx("svg",{id:"picos-svg",children:r.channelLines.map((f,p)=>s.jsx("line",{x1:f.from.x,y1:f.from.y,x2:f.to.x,y2:f.to.y},p))}),s.jsx("svg",{id:"subs-svg",children:r.subLines.map((f,p)=>s.jsx("line",{strokeDasharray:"4",x1:f.from.x,y1:f.from.y,x2:f.to.x,y2:f.to.y},p))})]})},Jg=()=>{var E,g;const[e,t]=v.useState(null),[n,r]=v.useState(!0),[l,i]=v.useState(null),[o,u]=v.useState(0),a=v.useMemo(()=>Zd(),[o]),[c,h]=v.useState(!1),f=v.useCallback(()=>{u(d=>d+1)},[]),p=v.useCallback(async()=>{r(!0),i(null);try{t(await Zm())}catch(d){i(d+"")}finally{r(!1)}},[]),S=v.useCallback(async()=>{const d=rg();fr(),f(),await p(),d&&window.location.assign(d)},[p,f]);return v.useEffect(()=>{p()},[p]),v.useEffect(()=>{var m;if(!a||!((m=e==null?void 0:e.session)!=null&&m.authenticated)){h(!1);return}let d=!1;return h(!0),Xd(a).then(y=>{if(!d){if(!y.valid){fr(),f(),h(!1);return}return Jd().then(()=>p())}}).finally(()=>{d||h(!1)}),()=>{d=!0}},[a,(E=e==null?void 0:e.session)==null?void 0:E.authenticated,p,f]),n||c?s.jsx("div",{className:"container py-5",children:"Loading…"}):l?s.jsx("div",{className:"container py-5 alert alert-danger",children:l}):e?((g=e.session)==null?void 0:g.authenticated)===!0?s.jsx(Hm,{children:s.jsxs(Dm,{children:[s.jsx(yl,{path:"/pico/:eci/:tab",element:s.jsx(Ki,{})}),s.jsx(yl,{path:"/pico/:eci",element:s.jsx(Ki,{})}),s.jsx(yl,{path:"*",element:s.jsx(Ki,{})})]})}):s.jsx(fg,{context:e,onAuthenticated:S}):s.jsx("div",{className:"container py-5",children:"Unable to load engine context."})},mf=document.createElement("DIV");document.body.append(mf);const Xg=Ad(mf);Xg.render(s.jsx(Jg,{}));