File size: 301,269 Bytes
e11c62f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bc759c8
e11c62f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
"use strict";(()=>{var U0=Object.create;var gs=Object.defineProperty;var q0=Object.getOwnPropertyDescriptor;var B0=Object.getOwnPropertyNames;var k0=Object.getPrototypeOf,Y0=Object.prototype.hasOwnProperty;var Qe=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(l){throw e=0,l}};var L0=(t,e,l,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of B0(e))!Y0.call(t,a)&&a!==l&&gs(t,a,{get:()=>e[a],enumerable:!(n=q0(e,a))||n.enumerable});return t};var Ei=(t,e,l)=>(l=t!=null?U0(k0(t)):{},L0(e||!t||!t.__esModule?gs(l,"default",{value:t,enumerable:!0}):l,t));var Ms=Qe(X=>{"use strict";var zo=Symbol.for("react.transitional.element"),X0=Symbol.for("react.portal"),Q0=Symbol.for("react.fragment"),V0=Symbol.for("react.strict_mode"),Z0=Symbol.for("react.profiler"),K0=Symbol.for("react.consumer"),$0=Symbol.for("react.context"),J0=Symbol.for("react.forward_ref"),W0=Symbol.for("react.suspense"),F0=Symbol.for("react.memo"),As=Symbol.for("react.lazy"),P0=Symbol.for("react.activity"),vs=Symbol.iterator;function I0(t){return t===null||typeof t!="object"?null:(t=vs&&t[vs]||t["@@iterator"],typeof t=="function"?t:null)}var xs={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ds=Object.assign,Es={};function En(t,e,l){this.props=t,this.context=e,this.refs=Es,this.updater=l||xs}En.prototype.isReactComponent={};En.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};En.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Os(){}Os.prototype=En.prototype;function Ao(t,e,l){this.props=t,this.context=e,this.refs=Es,this.updater=l||xs}var xo=Ao.prototype=new Os;xo.constructor=Ao;Ds(xo,En.prototype);xo.isPureReactComponent=!0;var Ss=Array.isArray;function To(){}var ft={H:null,A:null,T:null,S:null},Cs=Object.prototype.hasOwnProperty;function Do(t,e,l){var n=l.ref;return{$$typeof:zo,type:t,key:e,ref:n!==void 0?n:null,props:l}}function ty(t,e){return Do(t.type,e,t.props)}function Eo(t){return typeof t=="object"&&t!==null&&t.$$typeof===zo}function ey(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(l){return e[l]})}var Ts=/\/+/g;function So(t,e){return typeof t=="object"&&t!==null&&t.key!=null?ey(""+t.key):e.toString(36)}function ly(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(To,To):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function Dn(t,e,l,n,a){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var u=!1;if(t===null)u=!0;else switch(i){case"bigint":case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case zo:case X0:u=!0;break;case As:return u=t._init,Dn(u(t._payload),e,l,n,a)}}if(u)return a=a(t),u=n===""?"."+So(t,0):n,Ss(a)?(l="",u!=null&&(l=u.replace(Ts,"$&/")+"/"),Dn(a,e,l,"",function(r){return r})):a!=null&&(Eo(a)&&(a=ty(a,l+(a.key==null||t&&t.key===a.key?"":(""+a.key).replace(Ts,"$&/")+"/")+u)),e.push(a)),1;u=0;var o=n===""?".":n+":";if(Ss(t))for(var c=0;c<t.length;c++)n=t[c],i=o+So(n,c),u+=Dn(n,e,l,i,a);else if(c=I0(t),typeof c=="function")for(t=c.call(t),c=0;!(n=t.next()).done;)n=n.value,i=o+So(n,c++),u+=Dn(n,e,l,i,a);else if(i==="object"){if(typeof t.then=="function")return Dn(ly(t),e,l,n,a);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return u}function Oi(t,e,l){if(t==null)return t;var n=[],a=0;return Dn(t,n,"","",function(i){return e.call(l,i,a++)}),n}function ny(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(l){(t._status===0||t._status===-1)&&(t._status=1,t._result=l)},function(l){(t._status===0||t._status===-1)&&(t._status=2,t._result=l)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var zs=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},ay={map:Oi,forEach:function(t,e,l){Oi(t,function(){e.apply(this,arguments)},l)},count:function(t){var e=0;return Oi(t,function(){e++}),e},toArray:function(t){return Oi(t,function(e){return e})||[]},only:function(t){if(!Eo(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};X.Activity=P0;X.Children=ay;X.Component=En;X.Fragment=Q0;X.Profiler=Z0;X.PureComponent=Ao;X.StrictMode=V0;X.Suspense=W0;X.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ft;X.__COMPILER_RUNTIME={__proto__:null,c:function(t){return ft.H.useMemoCache(t)}};X.cache=function(t){return function(){return t.apply(null,arguments)}};X.cacheSignal=function(){return null};X.cloneElement=function(t,e,l){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var n=Ds({},t.props),a=t.key;if(e!=null)for(i in e.key!==void 0&&(a=""+e.key),e)!Cs.call(e,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&e.ref===void 0||(n[i]=e[i]);var i=arguments.length-2;if(i===1)n.children=l;else if(1<i){for(var u=Array(i),o=0;o<i;o++)u[o]=arguments[o+2];n.children=u}return Do(t.type,a,n)};X.createContext=function(t){return t={$$typeof:$0,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:K0,_context:t},t};X.createElement=function(t,e,l){var n,a={},i=null;if(e!=null)for(n in e.key!==void 0&&(i=""+e.key),e)Cs.call(e,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(a[n]=e[n]);var u=arguments.length-2;if(u===1)a.children=l;else if(1<u){for(var o=Array(u),c=0;c<u;c++)o[c]=arguments[c+2];a.children=o}if(t&&t.defaultProps)for(n in u=t.defaultProps,u)a[n]===void 0&&(a[n]=u[n]);return Do(t,i,a)};X.createRef=function(){return{current:null}};X.forwardRef=function(t){return{$$typeof:J0,render:t}};X.isValidElement=Eo;X.lazy=function(t){return{$$typeof:As,_payload:{_status:-1,_result:t},_init:ny}};X.memo=function(t,e){return{$$typeof:F0,type:t,compare:e===void 0?null:e}};X.startTransition=function(t){var e=ft.T,l={};ft.T=l;try{var n=t(),a=ft.S;a!==null&&a(l,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(To,zs)}catch(i){zs(i)}finally{e!==null&&l.types!==null&&(e.types=l.types),ft.T=e}};X.unstable_useCacheRefresh=function(){return ft.H.useCacheRefresh()};X.use=function(t){return ft.H.use(t)};X.useActionState=function(t,e,l){return ft.H.useActionState(t,e,l)};X.useCallback=function(t,e){return ft.H.useCallback(t,e)};X.useContext=function(t){return ft.H.useContext(t)};X.useDebugValue=function(){};X.useDeferredValue=function(t,e){return ft.H.useDeferredValue(t,e)};X.useEffect=function(t,e){return ft.H.useEffect(t,e)};X.useEffectEvent=function(t){return ft.H.useEffectEvent(t)};X.useId=function(){return ft.H.useId()};X.useImperativeHandle=function(t,e,l){return ft.H.useImperativeHandle(t,e,l)};X.useInsertionEffect=function(t,e){return ft.H.useInsertionEffect(t,e)};X.useLayoutEffect=function(t,e){return ft.H.useLayoutEffect(t,e)};X.useMemo=function(t,e){return ft.H.useMemo(t,e)};X.useOptimistic=function(t,e){return ft.H.useOptimistic(t,e)};X.useReducer=function(t,e,l){return ft.H.useReducer(t,e,l)};X.useRef=function(t){return ft.H.useRef(t)};X.useState=function(t){return ft.H.useState(t)};X.useSyncExternalStore=function(t,e,l){return ft.H.useSyncExternalStore(t,e,l)};X.useTransition=function(){return ft.H.useTransition()};X.version="19.2.3"});var Ci=Qe((_1,Ns)=>{"use strict";Ns.exports=Ms()});var ks=Qe(bt=>{"use strict";function No(t,e){var l=t.length;t.push(e);t:for(;0<l;){var n=l-1>>>1,a=t[n];if(0<Mi(a,e))t[n]=e,t[l]=a,l=n;else break t}}function Ve(t){return t.length===0?null:t[0]}function Ri(t){if(t.length===0)return null;var e=t[0],l=t.pop();if(l!==e){t[0]=l;t:for(var n=0,a=t.length,i=a>>>1;n<i;){var u=2*(n+1)-1,o=t[u],c=u+1,r=t[c];if(0>Mi(o,l))c<a&&0>Mi(r,o)?(t[n]=r,t[c]=l,n=c):(t[n]=o,t[u]=l,n=u);else if(c<a&&0>Mi(r,l))t[n]=r,t[c]=l,n=c;else break t}}return e}function Mi(t,e){var l=t.sortIndex-e.sortIndex;return l!==0?l:t.id-e.id}bt.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Rs=performance,bt.unstable_now=function(){return Rs.now()}):(Oo=Date,js=Oo.now(),bt.unstable_now=function(){return Oo.now()-js});var Rs,Oo,js,Ie=[],Al=[],iy=1,De=null,$t=3,Ro=!1,Sa=!1,Ta=!1,jo=!1,_s=typeof setTimeout=="function"?setTimeout:null,Hs=typeof clearTimeout=="function"?clearTimeout:null,ws=typeof setImmediate<"u"?setImmediate:null;function Ni(t){for(var e=Ve(Al);e!==null;){if(e.callback===null)Ri(Al);else if(e.startTime<=t)Ri(Al),e.sortIndex=e.expirationTime,No(Ie,e);else break;e=Ve(Al)}}function wo(t){if(Ta=!1,Ni(t),!Sa)if(Ve(Ie)!==null)Sa=!0,Cn||(Cn=!0,On());else{var e=Ve(Al);e!==null&&Go(wo,e.startTime-t)}}var Cn=!1,za=-1,Us=5,qs=-1;function Bs(){return jo?!0:!(bt.unstable_now()-qs<Us)}function Co(){if(jo=!1,Cn){var t=bt.unstable_now();qs=t;var e=!0;try{t:{Sa=!1,Ta&&(Ta=!1,Hs(za),za=-1),Ro=!0;var l=$t;try{e:{for(Ni(t),De=Ve(Ie);De!==null&&!(De.expirationTime>t&&Bs());){var n=De.callback;if(typeof n=="function"){De.callback=null,$t=De.priorityLevel;var a=n(De.expirationTime<=t);if(t=bt.unstable_now(),typeof a=="function"){De.callback=a,Ni(t),e=!0;break e}De===Ve(Ie)&&Ri(Ie),Ni(t)}else Ri(Ie);De=Ve(Ie)}if(De!==null)e=!0;else{var i=Ve(Al);i!==null&&Go(wo,i.startTime-t),e=!1}}break t}finally{De=null,$t=l,Ro=!1}e=void 0}}finally{e?On():Cn=!1}}}var On;typeof ws=="function"?On=function(){ws(Co)}:typeof MessageChannel<"u"?(Mo=new MessageChannel,Gs=Mo.port2,Mo.port1.onmessage=Co,On=function(){Gs.postMessage(null)}):On=function(){_s(Co,0)};var Mo,Gs;function Go(t,e){za=_s(function(){t(bt.unstable_now())},e)}bt.unstable_IdlePriority=5;bt.unstable_ImmediatePriority=1;bt.unstable_LowPriority=4;bt.unstable_NormalPriority=3;bt.unstable_Profiling=null;bt.unstable_UserBlockingPriority=2;bt.unstable_cancelCallback=function(t){t.callback=null};bt.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Us=0<t?Math.floor(1e3/t):5};bt.unstable_getCurrentPriorityLevel=function(){return $t};bt.unstable_next=function(t){switch($t){case 1:case 2:case 3:var e=3;break;default:e=$t}var l=$t;$t=e;try{return t()}finally{$t=l}};bt.unstable_requestPaint=function(){jo=!0};bt.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var l=$t;$t=t;try{return e()}finally{$t=l}};bt.unstable_scheduleCallback=function(t,e,l){var n=bt.unstable_now();switch(typeof l=="object"&&l!==null?(l=l.delay,l=typeof l=="number"&&0<l?n+l:n):l=n,t){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=l+a,t={id:iy++,callback:e,priorityLevel:t,startTime:l,expirationTime:a,sortIndex:-1},l>n?(t.sortIndex=l,No(Al,t),Ve(Ie)===null&&t===Ve(Al)&&(Ta?(Hs(za),za=-1):Ta=!0,Go(wo,l-n))):(t.sortIndex=a,No(Ie,t),Sa||Ro||(Sa=!0,Cn||(Cn=!0,On()))),t};bt.unstable_shouldYield=Bs;bt.unstable_wrapCallback=function(t){var e=$t;return function(){var l=$t;$t=e;try{return t.apply(this,arguments)}finally{$t=l}}}});var Ls=Qe((U1,Ys)=>{"use strict";Ys.exports=ks()});var Qs=Qe(ee=>{"use strict";var uy=Ci();function Xs(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function xl(){}var te={d:{f:xl,r:function(){throw Error(Xs(522))},D:xl,C:xl,L:xl,m:xl,X:xl,S:xl,M:xl},p:0,findDOMNode:null},oy=Symbol.for("react.portal");function cy(t,e,l){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:oy,key:n==null?null:""+n,children:t,containerInfo:e,implementation:l}}var Aa=uy.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ji(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}ee.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=te;ee.createPortal=function(t,e){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(Xs(299));return cy(t,e,null,l)};ee.flushSync=function(t){var e=Aa.T,l=te.p;try{if(Aa.T=null,te.p=2,t)return t()}finally{Aa.T=e,te.p=l,te.d.f()}};ee.preconnect=function(t,e){typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,te.d.C(t,e))};ee.prefetchDNS=function(t){typeof t=="string"&&te.d.D(t)};ee.preinit=function(t,e){if(typeof t=="string"&&e&&typeof e.as=="string"){var l=e.as,n=ji(l,e.crossOrigin),a=typeof e.integrity=="string"?e.integrity:void 0,i=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;l==="style"?te.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:n,integrity:a,fetchPriority:i}):l==="script"&&te.d.X(t,{crossOrigin:n,integrity:a,fetchPriority:i,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};ee.preinitModule=function(t,e){if(typeof t=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var l=ji(e.as,e.crossOrigin);te.d.M(t,{crossOrigin:l,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&te.d.M(t)};ee.preload=function(t,e){if(typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var l=e.as,n=ji(l,e.crossOrigin);te.d.L(t,l,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};ee.preloadModule=function(t,e){if(typeof t=="string")if(e){var l=ji(e.as,e.crossOrigin);te.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:l,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else te.d.m(t)};ee.requestFormReset=function(t){te.d.r(t)};ee.unstable_batchedUpdates=function(t,e){return t(e)};ee.useFormState=function(t,e,l){return Aa.H.useFormState(t,e,l)};ee.useFormStatus=function(){return Aa.H.useHostTransitionStatus()};ee.version="19.2.3"});var Ks=Qe((B1,Zs)=>{"use strict";function Vs(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vs)}catch(t){console.error(t)}}Vs(),Zs.exports=Qs()});var uh=Qe(no=>{"use strict";var wt=Ls(),Sm=Ci(),ry=Ks();function A(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Tm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ri(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function zm(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Am(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function $s(t){if(ri(t)!==t)throw Error(A(188))}function sy(t){var e=t.alternate;if(!e){if(e=ri(t),e===null)throw Error(A(188));return e!==t?null:t}for(var l=t,n=e;;){var a=l.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===l)return $s(a),t;if(i===n)return $s(a),e;i=i.sibling}throw Error(A(188))}if(l.return!==n.return)l=a,n=i;else{for(var u=!1,o=a.child;o;){if(o===l){u=!0,l=a,n=i;break}if(o===n){u=!0,n=a,l=i;break}o=o.sibling}if(!u){for(o=i.child;o;){if(o===l){u=!0,l=i,n=a;break}if(o===n){u=!0,n=i,l=a;break}o=o.sibling}if(!u)throw Error(A(189))}}if(l.alternate!==n)throw Error(A(190))}if(l.tag!==3)throw Error(A(188));return l.stateNode.current===l?t:e}function xm(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=xm(t),e!==null)return e;t=t.sibling}return null}var pt=Object.assign,fy=Symbol.for("react.element"),wi=Symbol.for("react.transitional.element"),Ra=Symbol.for("react.portal"),Gn=Symbol.for("react.fragment"),Dm=Symbol.for("react.strict_mode"),pc=Symbol.for("react.profiler"),Em=Symbol.for("react.consumer"),ol=Symbol.for("react.context"),rr=Symbol.for("react.forward_ref"),hc=Symbol.for("react.suspense"),yc=Symbol.for("react.suspense_list"),sr=Symbol.for("react.memo"),Dl=Symbol.for("react.lazy"),bc=Symbol.for("react.activity"),my=Symbol.for("react.memo_cache_sentinel"),Js=Symbol.iterator;function xa(t){return t===null||typeof t!="object"?null:(t=Js&&t[Js]||t["@@iterator"],typeof t=="function"?t:null)}var dy=Symbol.for("react.client.reference");function gc(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===dy?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Gn:return"Fragment";case pc:return"Profiler";case Dm:return"StrictMode";case hc:return"Suspense";case yc:return"SuspenseList";case bc:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case Ra:return"Portal";case ol:return t.displayName||"Context";case Em:return(t._context.displayName||"Context")+".Consumer";case rr:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case sr:return e=t.displayName||null,e!==null?e:gc(t.type)||"Memo";case Dl:e=t._payload,t=t._init;try{return gc(t(e))}catch{}}return null}var ja=Array.isArray,L=Sm.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,tt=ry.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,an={pending:!1,data:null,method:null,action:null},vc=[],_n=-1;function We(t){return{current:t}}function qt(t){0>_n||(t.current=vc[_n],vc[_n]=null,_n--)}function rt(t,e){_n++,vc[_n]=t.current,t.current=e}var Je=We(null),Ja=We(null),Hl=We(null),mu=We(null);function du(t,e){switch(rt(Hl,e),rt(Ja,t),rt(Je,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?nm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=nm(e),t=Zp(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}qt(Je),rt(Je,t)}function In(){qt(Je),qt(Ja),qt(Hl)}function Sc(t){t.memoizedState!==null&&rt(mu,t);var e=Je.current,l=Zp(e,t.type);e!==l&&(rt(Ja,t),rt(Je,l))}function pu(t){Ja.current===t&&(qt(Je),qt(Ja)),mu.current===t&&(qt(mu),ui._currentValue=an)}var _o,Ws;function tn(t){if(_o===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);_o=e&&e[1]||"",Ws=-1<l.stack.indexOf(`
    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+_o+t+Ws}var Ho=!1;function Uo(t,e){if(!t||Ho)return"";Ho=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(e){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(d){var f=d}Reflect.construct(t,[],m)}else{try{m.call()}catch(d){f=d}t.call(m.prototype)}}else{try{throw Error()}catch(d){f=d}(m=t())&&typeof m.catch=="function"&&m.catch(function(){})}}catch(d){if(d&&f&&typeof d.stack=="string")return[d.stack,f.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),u=i[0],o=i[1];if(u&&o){var c=u.split(`
`),r=o.split(`
`);for(a=n=0;n<c.length&&!c[n].includes("DetermineComponentFrameRoot");)n++;for(;a<r.length&&!r[a].includes("DetermineComponentFrameRoot");)a++;if(n===c.length||a===r.length)for(n=c.length-1,a=r.length-1;1<=n&&0<=a&&c[n]!==r[a];)a--;for(;1<=n&&0<=a;n--,a--)if(c[n]!==r[a]){if(n!==1||a!==1)do if(n--,a--,0>a||c[n]!==r[a]){var s=`
`+c[n].replace(" at new "," at ");return t.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",t.displayName)),s}while(1<=n&&0<=a);break}}}finally{Ho=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?tn(l):""}function py(t,e){switch(t.tag){case 26:case 27:case 5:return tn(t.type);case 16:return tn("Lazy");case 13:return t.child!==e&&e!==null?tn("Suspense Fallback"):tn("Suspense");case 19:return tn("SuspenseList");case 0:case 15:return Uo(t.type,!1);case 11:return Uo(t.type.render,!1);case 1:return Uo(t.type,!0);case 31:return tn("Activity");default:return""}}function Fs(t){try{var e="",l=null;do e+=py(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}var Tc=Object.prototype.hasOwnProperty,fr=wt.unstable_scheduleCallback,qo=wt.unstable_cancelCallback,hy=wt.unstable_shouldYield,yy=wt.unstable_requestPaint,ye=wt.unstable_now,by=wt.unstable_getCurrentPriorityLevel,Om=wt.unstable_ImmediatePriority,Cm=wt.unstable_UserBlockingPriority,hu=wt.unstable_NormalPriority,gy=wt.unstable_LowPriority,Mm=wt.unstable_IdlePriority,vy=wt.log,Sy=wt.unstable_setDisableYieldValue,si=null,be=null;function Rl(t){if(typeof vy=="function"&&Sy(t),be&&typeof be.setStrictMode=="function")try{be.setStrictMode(si,t)}catch{}}var ge=Math.clz32?Math.clz32:Ay,Ty=Math.log,zy=Math.LN2;function Ay(t){return t>>>=0,t===0?32:31-(Ty(t)/zy|0)|0}var Gi=256,_i=262144,Hi=4194304;function en(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Yu(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var a=0,i=t.suspendedLanes,u=t.pingedLanes;t=t.warmLanes;var o=n&134217727;return o!==0?(n=o&~i,n!==0?a=en(n):(u&=o,u!==0?a=en(u):l||(l=o&~t,l!==0&&(a=en(l))))):(o=n&~i,o!==0?a=en(o):u!==0?a=en(u):l||(l=n&~t,l!==0&&(a=en(l)))),a===0?0:e!==0&&e!==a&&(e&i)===0&&(i=a&-a,l=e&-e,i>=l||i===32&&(l&4194048)!==0)?e:a}function fi(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function xy(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nm(){var t=Hi;return Hi<<=1,(Hi&62914560)===0&&(Hi=4194304),t}function Bo(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function mi(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Dy(t,e,l,n,a,i){var u=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var o=t.entanglements,c=t.expirationTimes,r=t.hiddenUpdates;for(l=u&~l;0<l;){var s=31-ge(l),m=1<<s;o[s]=0,c[s]=-1;var f=r[s];if(f!==null)for(r[s]=null,s=0;s<f.length;s++){var d=f[s];d!==null&&(d.lane&=-536870913)}l&=~m}n!==0&&Rm(t,n,0),i!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=i&~(u&~e))}function Rm(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-ge(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|l&261930}function jm(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var n=31-ge(l),a=1<<n;a&e|t[n]&e&&(t[n]|=e),l&=~a}}function wm(t,e){var l=e&-e;return l=(l&42)!==0?1:mr(l),(l&(t.suspendedLanes|e))!==0?0:l}function mr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function dr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Gm(){var t=tt.p;return t!==0?t:(t=window.event,t===void 0?32:nh(t.type))}function Ps(t,e){var l=tt.p;try{return tt.p=t,e()}finally{tt.p=l}}var Jl=Math.random().toString(36).slice(2),kt="__reactFiber$"+Jl,se="__reactProps$"+Jl,sa="__reactContainer$"+Jl,zc="__reactEvents$"+Jl,Ey="__reactListeners$"+Jl,Oy="__reactHandles$"+Jl,Is="__reactResources$"+Jl,di="__reactMarker$"+Jl;function pr(t){delete t[kt],delete t[se],delete t[zc],delete t[Ey],delete t[Oy]}function Hn(t){var e=t[kt];if(e)return e;for(var l=t.parentNode;l;){if(e=l[sa]||l[kt]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=cm(t);t!==null;){if(l=t[kt])return l;t=cm(t)}return e}t=l,l=t.parentNode}return null}function fa(t){if(t=t[kt]||t[sa]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function wa(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(A(33))}function Zn(t){var e=t[Is];return e||(e=t[Is]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Ut(t){t[di]=!0}var _m=new Set,Hm={};function hn(t,e){ta(t,e),ta(t+"Capture",e)}function ta(t,e){for(Hm[t]=e,t=0;t<e.length;t++)_m.add(e[t])}var Cy=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),tf={},ef={};function My(t){return Tc.call(ef,t)?!0:Tc.call(tf,t)?!1:Cy.test(t)?ef[t]=!0:(tf[t]=!0,!1)}function Fi(t,e,l){if(My(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var n=e.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function Ui(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function tl(t,e,l,n){if(n===null)t.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+n)}}function Oe(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Um(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ny(t,e,l){var n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(u){l=""+u,i.call(this,u)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ac(t){if(!t._valueTracker){var e=Um(t)?"checked":"value";t._valueTracker=Ny(t,e,""+t[e])}}function qm(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=Um(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}function yu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ry=/[\n"\\]/g;function Ne(t){return t.replace(Ry,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function xc(t,e,l,n,a,i,u,o){t.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?t.type=u:t.removeAttribute("type"),e!=null?u==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Oe(e)):t.value!==""+Oe(e)&&(t.value=""+Oe(e)):u!=="submit"&&u!=="reset"||t.removeAttribute("value"),e!=null?Dc(t,u,Oe(e)):l!=null?Dc(t,u,Oe(l)):n!=null&&t.removeAttribute("value"),a==null&&i!=null&&(t.defaultChecked=!!i),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.name=""+Oe(o):t.removeAttribute("name")}function Bm(t,e,l,n,a,i,u,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){Ac(t);return}l=l!=null?""+Oe(l):"",e=e!=null?""+Oe(e):l,o||e===t.value||(t.value=e),t.defaultValue=e}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=o?t.checked:!!n,t.defaultChecked=!!n,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.name=u),Ac(t)}function Dc(t,e,l){e==="number"&&yu(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Kn(t,e,l,n){if(t=t.options,e){e={};for(var a=0;a<l.length;a++)e["$"+l[a]]=!0;for(l=0;l<t.length;l++)a=e.hasOwnProperty("$"+t[l].value),t[l].selected!==a&&(t[l].selected=a),a&&n&&(t[l].defaultSelected=!0)}else{for(l=""+Oe(l),e=null,a=0;a<t.length;a++){if(t[a].value===l){t[a].selected=!0,n&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function km(t,e,l){if(e!=null&&(e=""+Oe(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+Oe(l):""}function Ym(t,e,l,n){if(e==null){if(n!=null){if(l!=null)throw Error(A(92));if(ja(n)){if(1<n.length)throw Error(A(93));n=n[0]}l=n}l==null&&(l=""),e=l}l=Oe(e),t.defaultValue=l,n=t.textContent,n===l&&n!==""&&n!==null&&(t.value=n),Ac(t)}function ea(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var jy=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function lf(t,e,l){var n=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":n?t.setProperty(e,l):typeof l!="number"||l===0||jy.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function Lm(t,e,l){if(e!=null&&typeof e!="object")throw Error(A(62));if(t=t.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||e!=null&&e.hasOwnProperty(n)||(n.indexOf("--")===0?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="");for(var a in e)n=e[a],e.hasOwnProperty(a)&&l[a]!==n&&lf(t,a,n)}else for(var i in e)e.hasOwnProperty(i)&&lf(t,i,e[i])}function hr(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Gy=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Pi(t){return Gy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function cl(){}var Ec=null;function yr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Un=null,$n=null;function nf(t){var e=fa(t);if(e&&(t=e.stateNode)){var l=t[se]||null;t:switch(t=e.stateNode,e.type){case"input":if(xc(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ne(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var n=l[e];if(n!==t&&n.form===t.form){var a=n[se]||null;if(!a)throw Error(A(90));xc(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<l.length;e++)n=l[e],n.form===t.form&&qm(n)}break t;case"textarea":km(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&Kn(t,!!l.multiple,e,!1)}}}var ko=!1;function Xm(t,e,l){if(ko)return t(e,l);ko=!0;try{var n=t(e);return n}finally{if(ko=!1,(Un!==null||$n!==null)&&(Iu(),Un&&(e=Un,t=$n,$n=Un=null,nf(e),t)))for(e=0;e<t.length;e++)nf(t[e])}}function Wa(t,e){var l=t.stateNode;if(l===null)return null;var n=l[se]||null;if(n===null)return null;l=n[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(A(231,e,typeof l));return l}var dl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oc=!1;if(dl)try{Mn={},Object.defineProperty(Mn,"passive",{get:function(){Oc=!0}}),window.addEventListener("test",Mn,Mn),window.removeEventListener("test",Mn,Mn)}catch{Oc=!1}var Mn,jl=null,br=null,Ii=null;function Qm(){if(Ii)return Ii;var t,e=br,l=e.length,n,a="value"in jl?jl.value:jl.textContent,i=a.length;for(t=0;t<l&&e[t]===a[t];t++);var u=l-t;for(n=1;n<=u&&e[l-n]===a[i-n];n++);return Ii=a.slice(t,1<n?1-n:void 0)}function tu(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function qi(){return!0}function af(){return!1}function fe(t){function e(l,n,a,i,u){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(l=t[o],this[o]=l?l(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?qi:af,this.isPropagationStopped=af,this}return pt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=qi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=qi)},persist:function(){},isPersistent:qi}),e}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lu=fe(yn),pi=pt({},yn,{view:0,detail:0}),_y=fe(pi),Yo,Lo,Da,Xu=pt({},pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Da&&(Da&&t.type==="mousemove"?(Yo=t.screenX-Da.screenX,Lo=t.screenY-Da.screenY):Lo=Yo=0,Da=t),Yo)},movementY:function(t){return"movementY"in t?t.movementY:Lo}}),uf=fe(Xu),Hy=pt({},Xu,{dataTransfer:0}),Uy=fe(Hy),qy=pt({},pi,{relatedTarget:0}),Xo=fe(qy),By=pt({},yn,{animationName:0,elapsedTime:0,pseudoElement:0}),ky=fe(By),Yy=pt({},yn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ly=fe(Yy),Xy=pt({},yn,{data:0}),of=fe(Xy),Qy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vy={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"},Zy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ky(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Zy[t])?!!e[t]:!1}function gr(){return Ky}var $y=pt({},pi,{key:function(t){if(t.key){var e=Qy[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=tu(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Vy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gr,charCode:function(t){return t.type==="keypress"?tu(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?tu(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Jy=fe($y),Wy=pt({},Xu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cf=fe(Wy),Fy=pt({},pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gr}),Py=fe(Fy),Iy=pt({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0}),tb=fe(Iy),eb=pt({},Xu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),lb=fe(eb),nb=pt({},yn,{newState:0,oldState:0}),ab=fe(nb),ib=[9,13,27,32],vr=dl&&"CompositionEvent"in window,Ha=null;dl&&"documentMode"in document&&(Ha=document.documentMode);var ub=dl&&"TextEvent"in window&&!Ha,Vm=dl&&(!vr||Ha&&8<Ha&&11>=Ha),rf=" ",sf=!1;function Zm(t,e){switch(t){case"keyup":return ib.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Km(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var qn=!1;function ob(t,e){switch(t){case"compositionend":return Km(e);case"keypress":return e.which!==32?null:(sf=!0,rf);case"textInput":return t=e.data,t===rf&&sf?null:t;default:return null}}function cb(t,e){if(qn)return t==="compositionend"||!vr&&Zm(t,e)?(t=Qm(),Ii=br=jl=null,qn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Vm&&e.locale!=="ko"?null:e.data;default:return null}}var rb={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 ff(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!rb[t.type]:e==="textarea"}function $m(t,e,l,n){Un?$n?$n.push(n):$n=[n]:Un=n,e=Gu(e,"onChange"),0<e.length&&(l=new Lu("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var Ua=null,Fa=null;function sb(t){Xp(t,0)}function Qu(t){var e=wa(t);if(qm(e))return t}function mf(t,e){if(t==="change")return e}var Jm=!1;dl&&(dl?(ki="oninput"in document,ki||(Qo=document.createElement("div"),Qo.setAttribute("oninput","return;"),ki=typeof Qo.oninput=="function"),Bi=ki):Bi=!1,Jm=Bi&&(!document.documentMode||9<document.documentMode));var Bi,ki,Qo;function df(){Ua&&(Ua.detachEvent("onpropertychange",Wm),Fa=Ua=null)}function Wm(t){if(t.propertyName==="value"&&Qu(Fa)){var e=[];$m(e,Fa,t,yr(t)),Xm(sb,e)}}function fb(t,e,l){t==="focusin"?(df(),Ua=e,Fa=l,Ua.attachEvent("onpropertychange",Wm)):t==="focusout"&&df()}function mb(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Qu(Fa)}function db(t,e){if(t==="click")return Qu(e)}function pb(t,e){if(t==="input"||t==="change")return Qu(e)}function hb(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Se=typeof Object.is=="function"?Object.is:hb;function Pa(t,e){if(Se(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),n=Object.keys(e);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!Tc.call(e,a)||!Se(t[a],e[a]))return!1}return!0}function pf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function hf(t,e){var l=pf(t);t=0;for(var n;l;){if(l.nodeType===3){if(n=t+l.textContent.length,t<=e&&n>=e)return{node:l,offset:e-t};t=n}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=pf(l)}}function Fm(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Fm(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Pm(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=yu(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=yu(t.document)}return e}function Sr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var yb=dl&&"documentMode"in document&&11>=document.documentMode,Bn=null,Cc=null,qa=null,Mc=!1;function yf(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Mc||Bn==null||Bn!==yu(n)||(n=Bn,"selectionStart"in n&&Sr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),qa&&Pa(qa,n)||(qa=n,n=Gu(Cc,"onSelect"),0<n.length&&(e=new Lu("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=Bn)))}function Il(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var kn={animationend:Il("Animation","AnimationEnd"),animationiteration:Il("Animation","AnimationIteration"),animationstart:Il("Animation","AnimationStart"),transitionrun:Il("Transition","TransitionRun"),transitionstart:Il("Transition","TransitionStart"),transitioncancel:Il("Transition","TransitionCancel"),transitionend:Il("Transition","TransitionEnd")},Vo={},Im={};dl&&(Im=document.createElement("div").style,"AnimationEvent"in window||(delete kn.animationend.animation,delete kn.animationiteration.animation,delete kn.animationstart.animation),"TransitionEvent"in window||delete kn.transitionend.transition);function bn(t){if(Vo[t])return Vo[t];if(!kn[t])return t;var e=kn[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in Im)return Vo[t]=e[l];return t}var td=bn("animationend"),ed=bn("animationiteration"),ld=bn("animationstart"),bb=bn("transitionrun"),gb=bn("transitionstart"),vb=bn("transitioncancel"),nd=bn("transitionend"),ad=new Map,Nc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Nc.push("scrollEnd");function Be(t,e){ad.set(t,e),hn(e,[t])}var bu=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ee=[],Yn=0,Tr=0;function Vu(){for(var t=Yn,e=Tr=Yn=0;e<t;){var l=Ee[e];Ee[e++]=null;var n=Ee[e];Ee[e++]=null;var a=Ee[e];Ee[e++]=null;var i=Ee[e];if(Ee[e++]=null,n!==null&&a!==null){var u=n.pending;u===null?a.next=a:(a.next=u.next,u.next=a),n.pending=a}i!==0&&id(l,a,i)}}function Zu(t,e,l,n){Ee[Yn++]=t,Ee[Yn++]=e,Ee[Yn++]=l,Ee[Yn++]=n,Tr|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function zr(t,e,l,n){return Zu(t,e,l,n),gu(t)}function gn(t,e){return Zu(t,null,null,e),gu(t)}function id(t,e,l){t.lanes|=l;var n=t.alternate;n!==null&&(n.lanes|=l);for(var a=!1,i=t.return;i!==null;)i.childLanes|=l,n=i.alternate,n!==null&&(n.childLanes|=l),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(a=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,a&&e!==null&&(a=31-ge(l),t=i.hiddenUpdates,n=t[a],n===null?t[a]=[e]:n.push(e),e.lane=l|536870912),i):null}function gu(t){if(50<Ka)throw Ka=0,Fc=null,Error(A(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Ln={};function Sb(t,e,l,n){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pe(t,e,l,n){return new Sb(t,e,l,n)}function Ar(t){return t=t.prototype,!(!t||!t.isReactComponent)}function sl(t,e){var l=t.alternate;return l===null?(l=pe(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function ud(t,e){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function eu(t,e,l,n,a,i){var u=0;if(n=t,typeof t=="function")Ar(t)&&(u=1);else if(typeof t=="string")u=Ag(t,l,Je.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case bc:return t=pe(31,l,e,a),t.elementType=bc,t.lanes=i,t;case Gn:return un(l.children,a,i,e);case Dm:u=8,a|=24;break;case pc:return t=pe(12,l,e,a|2),t.elementType=pc,t.lanes=i,t;case hc:return t=pe(13,l,e,a),t.elementType=hc,t.lanes=i,t;case yc:return t=pe(19,l,e,a),t.elementType=yc,t.lanes=i,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ol:u=10;break t;case Em:u=9;break t;case rr:u=11;break t;case sr:u=14;break t;case Dl:u=16,n=null;break t}u=29,l=Error(A(130,t===null?"null":typeof t,"")),n=null}return e=pe(u,l,e,a),e.elementType=t,e.type=n,e.lanes=i,e}function un(t,e,l,n){return t=pe(7,t,n,e),t.lanes=l,t}function Zo(t,e,l){return t=pe(6,t,null,e),t.lanes=l,t}function od(t){var e=pe(18,null,null,0);return e.stateNode=t,e}function Ko(t,e,l){return e=pe(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var bf=new WeakMap;function Re(t,e){if(typeof t=="object"&&t!==null){var l=bf.get(t);return l!==void 0?l:(e={value:t,source:e,stack:Fs(e)},bf.set(t,e),e)}return{value:t,source:e,stack:Fs(e)}}var Xn=[],Qn=0,vu=null,Ia=0,Ce=[],Me=0,Vl=null,Ze=1,Ke="";function il(t,e){Xn[Qn++]=Ia,Xn[Qn++]=vu,vu=t,Ia=e}function cd(t,e,l){Ce[Me++]=Ze,Ce[Me++]=Ke,Ce[Me++]=Vl,Vl=t;var n=Ze;t=Ke;var a=32-ge(n)-1;n&=~(1<<a),l+=1;var i=32-ge(e)+a;if(30<i){var u=a-a%5;i=(n&(1<<u)-1).toString(32),n>>=u,a-=u,Ze=1<<32-ge(e)+a|l<<a|n,Ke=i+t}else Ze=1<<i|l<<a|n,Ke=t}function xr(t){t.return!==null&&(il(t,1),cd(t,1,0))}function Dr(t){for(;t===vu;)vu=Xn[--Qn],Xn[Qn]=null,Ia=Xn[--Qn],Xn[Qn]=null;for(;t===Vl;)Vl=Ce[--Me],Ce[Me]=null,Ke=Ce[--Me],Ce[Me]=null,Ze=Ce[--Me],Ce[Me]=null}function rd(t,e){Ce[Me++]=Ze,Ce[Me++]=Ke,Ce[Me++]=Vl,Ze=e.id,Ke=e.overflow,Vl=t}var Yt=null,dt=null,W=!1,Ul=null,je=!1,Rc=Error(A(519));function Zl(t){var e=Error(A(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ti(Re(e,t)),Rc}function gf(t){var e=t.stateNode,l=t.type,n=t.memoizedProps;switch(e[kt]=t,e[se]=n,l){case"dialog":V("cancel",e),V("close",e);break;case"iframe":case"object":case"embed":V("load",e);break;case"video":case"audio":for(l=0;l<ai.length;l++)V(ai[l],e);break;case"source":V("error",e);break;case"img":case"image":case"link":V("error",e),V("load",e);break;case"details":V("toggle",e);break;case"input":V("invalid",e),Bm(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":V("invalid",e);break;case"textarea":V("invalid",e),Ym(e,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||n.suppressHydrationWarning===!0||Vp(e.textContent,l)?(n.popover!=null&&(V("beforetoggle",e),V("toggle",e)),n.onScroll!=null&&V("scroll",e),n.onScrollEnd!=null&&V("scrollend",e),n.onClick!=null&&(e.onclick=cl),e=!0):e=!1,e||Zl(t,!0)}function vf(t){for(Yt=t.return;Yt;)switch(Yt.tag){case 5:case 31:case 13:je=!1;return;case 27:case 3:je=!0;return;default:Yt=Yt.return}}function Nn(t){if(t!==Yt)return!1;if(!W)return vf(t),W=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||lr(t.type,t.memoizedProps)),l=!l),l&&dt&&Zl(t),vf(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(A(317));dt=om(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(A(317));dt=om(t)}else e===27?(e=dt,Wl(t.type)?(t=ur,ur=null,dt=t):dt=e):dt=Yt?Ge(t.stateNode.nextSibling):null;return!0}function sn(){dt=Yt=null,W=!1}function $o(){var t=Ul;return t!==null&&(ce===null?ce=t:ce.push.apply(ce,t),Ul=null),t}function ti(t){Ul===null?Ul=[t]:Ul.push(t)}var jc=We(null),vn=null,rl=null;function Ol(t,e,l){rt(jc,e._currentValue),e._currentValue=l}function fl(t){t._currentValue=jc.current,qt(jc)}function wc(t,e,l){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===l)break;t=t.return}}function Gc(t,e,l,n){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var i=a.dependencies;if(i!==null){var u=a.child;i=i.firstContext;t:for(;i!==null;){var o=i;i=a;for(var c=0;c<e.length;c++)if(o.context===e[c]){i.lanes|=l,o=i.alternate,o!==null&&(o.lanes|=l),wc(i.return,l,t),n||(u=null);break t}i=o.next}}else if(a.tag===18){if(u=a.return,u===null)throw Error(A(341));u.lanes|=l,i=u.alternate,i!==null&&(i.lanes|=l),wc(u,l,t),u=null}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}}function ma(t,e,l,n){t=null;for(var a=e,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var u=a.alternate;if(u===null)throw Error(A(387));if(u=u.memoizedProps,u!==null){var o=a.type;Se(a.pendingProps.value,u.value)||(t!==null?t.push(o):t=[o])}}else if(a===mu.current){if(u=a.alternate,u===null)throw Error(A(387));u.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(ui):t=[ui])}a=a.return}t!==null&&Gc(e,t,l,n),e.flags|=262144}function Su(t){for(t=t.firstContext;t!==null;){if(!Se(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function fn(t){vn=t,rl=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Lt(t){return sd(vn,t)}function Yi(t,e){return vn===null&&fn(t),sd(t,e)}function sd(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},rl===null){if(t===null)throw Error(A(308));rl=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else rl=rl.next=e;return l}var Tb=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},zb=wt.unstable_scheduleCallback,Ab=wt.unstable_NormalPriority,Ct={$$typeof:ol,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Er(){return{controller:new Tb,data:new Map,refCount:0}}function hi(t){t.refCount--,t.refCount===0&&zb(Ab,function(){t.controller.abort()})}var Ba=null,_c=0,la=0,Jn=null;function xb(t,e){if(Ba===null){var l=Ba=[];_c=0,la=Fr(),Jn={status:"pending",value:void 0,then:function(n){l.push(n)}}}return _c++,e.then(Sf,Sf),e}function Sf(){if(--_c===0&&Ba!==null){Jn!==null&&(Jn.status="fulfilled");var t=Ba;Ba=null,la=0,Jn=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Db(t,e){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return t.then(function(){n.status="fulfilled",n.value=e;for(var a=0;a<l.length;a++)(0,l[a])(e)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var Tf=L.S;L.S=function(t,e){xp=ye(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&xb(t,e),Tf!==null&&Tf(t,e)};var on=We(null);function Or(){var t=on.current;return t!==null?t:ot.pooledCache}function lu(t,e){e===null?rt(on,on.current):rt(on,e.pool)}function fd(){var t=Or();return t===null?null:{parent:Ct._currentValue,pool:t}}var da=Error(A(460)),Cr=Error(A(474)),Ku=Error(A(542)),Tu={then:function(){}};function zf(t){return t=t.status,t==="fulfilled"||t==="rejected"}function md(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(cl,cl),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,xf(t),t;default:if(typeof e.status=="string")e.then(cl,cl);else{if(t=ot,t!==null&&100<t.shellSuspendCounter)throw Error(A(482));t=e,t.status="pending",t.then(function(n){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=n}},function(n){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=n}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,xf(t),t}throw cn=e,da}}function ln(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(cn=l,da):l}}var cn=null;function Af(){if(cn===null)throw Error(A(459));var t=cn;return cn=null,t}function xf(t){if(t===da||t===Ku)throw Error(A(483))}var Wn=null,ei=0;function Li(t){var e=ei;return ei+=1,Wn===null&&(Wn=[]),md(Wn,t,e)}function Ea(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Xi(t,e){throw e.$$typeof===fy?Error(A(525)):(t=Object.prototype.toString.call(e),Error(A(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function dd(t){function e(y,p){if(t){var b=y.deletions;b===null?(y.deletions=[p],y.flags|=16):b.push(p)}}function l(y,p){if(!t)return null;for(;p!==null;)e(y,p),p=p.sibling;return null}function n(y){for(var p=new Map;y!==null;)y.key!==null?p.set(y.key,y):p.set(y.index,y),y=y.sibling;return p}function a(y,p){return y=sl(y,p),y.index=0,y.sibling=null,y}function i(y,p,b){return y.index=b,t?(b=y.alternate,b!==null?(b=b.index,b<p?(y.flags|=67108866,p):b):(y.flags|=67108866,p)):(y.flags|=1048576,p)}function u(y){return t&&y.alternate===null&&(y.flags|=67108866),y}function o(y,p,b,S){return p===null||p.tag!==6?(p=Zo(b,y.mode,S),p.return=y,p):(p=a(p,b),p.return=y,p)}function c(y,p,b,S){var D=b.type;return D===Gn?s(y,p,b.props.children,S,b.key):p!==null&&(p.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Dl&&ln(D)===p.type)?(p=a(p,b.props),Ea(p,b),p.return=y,p):(p=eu(b.type,b.key,b.props,null,y.mode,S),Ea(p,b),p.return=y,p)}function r(y,p,b,S){return p===null||p.tag!==4||p.stateNode.containerInfo!==b.containerInfo||p.stateNode.implementation!==b.implementation?(p=Ko(b,y.mode,S),p.return=y,p):(p=a(p,b.children||[]),p.return=y,p)}function s(y,p,b,S,D){return p===null||p.tag!==7?(p=un(b,y.mode,S,D),p.return=y,p):(p=a(p,b),p.return=y,p)}function m(y,p,b){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=Zo(""+p,y.mode,b),p.return=y,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case wi:return b=eu(p.type,p.key,p.props,null,y.mode,b),Ea(b,p),b.return=y,b;case Ra:return p=Ko(p,y.mode,b),p.return=y,p;case Dl:return p=ln(p),m(y,p,b)}if(ja(p)||xa(p))return p=un(p,y.mode,b,null),p.return=y,p;if(typeof p.then=="function")return m(y,Li(p),b);if(p.$$typeof===ol)return m(y,Yi(y,p),b);Xi(y,p)}return null}function f(y,p,b,S){var D=p!==null?p.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return D!==null?null:o(y,p,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case wi:return b.key===D?c(y,p,b,S):null;case Ra:return b.key===D?r(y,p,b,S):null;case Dl:return b=ln(b),f(y,p,b,S)}if(ja(b)||xa(b))return D!==null?null:s(y,p,b,S,null);if(typeof b.then=="function")return f(y,p,Li(b),S);if(b.$$typeof===ol)return f(y,p,Yi(y,b),S);Xi(y,b)}return null}function d(y,p,b,S,D){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return y=y.get(b)||null,o(p,y,""+S,D);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case wi:return y=y.get(S.key===null?b:S.key)||null,c(p,y,S,D);case Ra:return y=y.get(S.key===null?b:S.key)||null,r(p,y,S,D);case Dl:return S=ln(S),d(y,p,b,S,D)}if(ja(S)||xa(S))return y=y.get(b)||null,s(p,y,S,D,null);if(typeof S.then=="function")return d(y,p,b,Li(S),D);if(S.$$typeof===ol)return d(y,p,b,Yi(p,S),D);Xi(p,S)}return null}function h(y,p,b,S){for(var D=null,w=null,x=p,N=p=0,C=null;x!==null&&N<b.length;N++){x.index>N?(C=x,x=null):C=x.sibling;var j=f(y,x,b[N],S);if(j===null){x===null&&(x=C);break}t&&x&&j.alternate===null&&e(y,x),p=i(j,p,N),w===null?D=j:w.sibling=j,w=j,x=C}if(N===b.length)return l(y,x),W&&il(y,N),D;if(x===null){for(;N<b.length;N++)x=m(y,b[N],S),x!==null&&(p=i(x,p,N),w===null?D=x:w.sibling=x,w=x);return W&&il(y,N),D}for(x=n(x);N<b.length;N++)C=d(x,y,N,b[N],S),C!==null&&(t&&C.alternate!==null&&x.delete(C.key===null?N:C.key),p=i(C,p,N),w===null?D=C:w.sibling=C,w=C);return t&&x.forEach(function(ct){return e(y,ct)}),W&&il(y,N),D}function v(y,p,b,S){if(b==null)throw Error(A(151));for(var D=null,w=null,x=p,N=p=0,C=null,j=b.next();x!==null&&!j.done;N++,j=b.next()){x.index>N?(C=x,x=null):C=x.sibling;var ct=f(y,x,j.value,S);if(ct===null){x===null&&(x=C);break}t&&x&&ct.alternate===null&&e(y,x),p=i(ct,p,N),w===null?D=ct:w.sibling=ct,w=ct,x=C}if(j.done)return l(y,x),W&&il(y,N),D;if(x===null){for(;!j.done;N++,j=b.next())j=m(y,j.value,S),j!==null&&(p=i(j,p,N),w===null?D=j:w.sibling=j,w=j);return W&&il(y,N),D}for(x=n(x);!j.done;N++,j=b.next())j=d(x,y,N,j.value,S),j!==null&&(t&&j.alternate!==null&&x.delete(j.key===null?N:j.key),p=i(j,p,N),w===null?D=j:w.sibling=j,w=j);return t&&x.forEach(function(xe){return e(y,xe)}),W&&il(y,N),D}function T(y,p,b,S){if(typeof b=="object"&&b!==null&&b.type===Gn&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case wi:t:{for(var D=b.key;p!==null;){if(p.key===D){if(D=b.type,D===Gn){if(p.tag===7){l(y,p.sibling),S=a(p,b.props.children),S.return=y,y=S;break t}}else if(p.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Dl&&ln(D)===p.type){l(y,p.sibling),S=a(p,b.props),Ea(S,b),S.return=y,y=S;break t}l(y,p);break}else e(y,p);p=p.sibling}b.type===Gn?(S=un(b.props.children,y.mode,S,b.key),S.return=y,y=S):(S=eu(b.type,b.key,b.props,null,y.mode,S),Ea(S,b),S.return=y,y=S)}return u(y);case Ra:t:{for(D=b.key;p!==null;){if(p.key===D)if(p.tag===4&&p.stateNode.containerInfo===b.containerInfo&&p.stateNode.implementation===b.implementation){l(y,p.sibling),S=a(p,b.children||[]),S.return=y,y=S;break t}else{l(y,p);break}else e(y,p);p=p.sibling}S=Ko(b,y.mode,S),S.return=y,y=S}return u(y);case Dl:return b=ln(b),T(y,p,b,S)}if(ja(b))return h(y,p,b,S);if(xa(b)){if(D=xa(b),typeof D!="function")throw Error(A(150));return b=D.call(b),v(y,p,b,S)}if(typeof b.then=="function")return T(y,p,Li(b),S);if(b.$$typeof===ol)return T(y,p,Yi(y,b),S);Xi(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,p!==null&&p.tag===6?(l(y,p.sibling),S=a(p,b),S.return=y,y=S):(l(y,p),S=Zo(b,y.mode,S),S.return=y,y=S),u(y)):l(y,p)}return function(y,p,b,S){try{ei=0;var D=T(y,p,b,S);return Wn=null,D}catch(x){if(x===da||x===Ku)throw x;var w=pe(29,x,null,y.mode);return w.lanes=S,w.return=y,w}}}var mn=dd(!0),pd=dd(!1),El=!1;function Mr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ql(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Bl(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(I&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=gu(t),id(t,null,l),e}return Zu(t,n,e,l),gu(t)}function ka(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,jm(t,l)}}function Jo(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?a=i=u:i=i.next=u,l=l.next}while(l!==null);i===null?a=i=e:i=i.next=e}else a=i=e;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var Uc=!1;function Ya(){if(Uc){var t=Jn;if(t!==null)throw t}}function La(t,e,l,n){Uc=!1;var a=t.updateQueue;El=!1;var i=a.firstBaseUpdate,u=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,r=c.next;c.next=null,u===null?i=r:u.next=r,u=c;var s=t.alternate;s!==null&&(s=s.updateQueue,o=s.lastBaseUpdate,o!==u&&(o===null?s.firstBaseUpdate=r:o.next=r,s.lastBaseUpdate=c))}if(i!==null){var m=a.baseState;u=0,s=r=c=null,o=i;do{var f=o.lane&-536870913,d=f!==o.lane;if(d?(J&f)===f:(n&f)===f){f!==0&&f===la&&(Uc=!0),s!==null&&(s=s.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});t:{var h=t,v=o;f=e;var T=l;switch(v.tag){case 1:if(h=v.payload,typeof h=="function"){m=h.call(T,m,f);break t}m=h;break t;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,f=typeof h=="function"?h.call(T,m,f):h,f==null)break t;m=pt({},m,f);break t;case 2:El=!0}}f=o.callback,f!==null&&(t.flags|=64,d&&(t.flags|=8192),d=a.callbacks,d===null?a.callbacks=[f]:d.push(f))}else d={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},s===null?(r=s=d,c=m):s=s.next=d,u|=f;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;d=o,o=d.next,d.next=null,a.lastBaseUpdate=d,a.shared.pending=null}}while(!0);s===null&&(c=m),a.baseState=c,a.firstBaseUpdate=r,a.lastBaseUpdate=s,i===null&&(a.shared.lanes=0),$l|=u,t.lanes=u,t.memoizedState=m}}function hd(t,e){if(typeof t!="function")throw Error(A(191,t));t.call(e)}function yd(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)hd(l[t],e)}var na=We(null),zu=We(0);function Df(t,e){t=bl,rt(zu,t),rt(na,e),bl=t|e.baseLanes}function qc(){rt(zu,bl),rt(na,na.current)}function Nr(){bl=zu.current,qt(na),qt(zu)}var Te=We(null),we=null;function Cl(t){var e=t.alternate;rt(xt,xt.current&1),rt(Te,t),we===null&&(e===null||na.current!==null||e.memoizedState!==null)&&(we=t)}function Bc(t){rt(xt,xt.current),rt(Te,t),we===null&&(we=t)}function bd(t){t.tag===22?(rt(xt,xt.current),rt(Te,t),we===null&&(we=t)):Ml(t)}function Ml(){rt(xt,xt.current),rt(Te,Te.current)}function de(t){qt(Te),we===t&&(we=null),qt(xt)}var xt=We(0);function Au(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ar(l)||ir(l)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var pl=0,Q=null,ut=null,Et=null,xu=!1,Fn=!1,dn=!1,Du=0,li=0,Pn=null,Eb=0;function Tt(){throw Error(A(321))}function Rr(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!Se(t[l],e[l]))return!1;return!0}function jr(t,e,l,n,a,i){return pl=i,Q=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,L.H=t===null||t.memoizedState===null?$d:Xr,dn=!1,i=l(n,a),dn=!1,Fn&&(i=vd(e,l,n,a)),gd(t),i}function gd(t){L.H=ni;var e=ut!==null&&ut.next!==null;if(pl=0,Et=ut=Q=null,xu=!1,li=0,Pn=null,e)throw Error(A(300));t===null||Mt||(t=t.dependencies,t!==null&&Su(t)&&(Mt=!0))}function vd(t,e,l,n){Q=t;var a=0;do{if(Fn&&(Pn=null),li=0,Fn=!1,25<=a)throw Error(A(301));if(a+=1,Et=ut=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}L.H=Jd,i=e(l,n)}while(Fn);return i}function Ob(){var t=L.H,e=t.useState()[0];return e=typeof e.then=="function"?yi(e):e,t=t.useState()[0],(ut!==null?ut.memoizedState:null)!==t&&(Q.flags|=1024),e}function wr(){var t=Du!==0;return Du=0,t}function Gr(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function _r(t){if(xu){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}xu=!1}pl=0,Et=ut=Q=null,Fn=!1,li=Du=0,Pn=null}function le(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Et===null?Q.memoizedState=Et=t:Et=Et.next=t,Et}function Dt(){if(ut===null){var t=Q.alternate;t=t!==null?t.memoizedState:null}else t=ut.next;var e=Et===null?Q.memoizedState:Et.next;if(e!==null)Et=e,ut=t;else{if(t===null)throw Q.alternate===null?Error(A(467)):Error(A(310));ut=t,t={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},Et===null?Q.memoizedState=Et=t:Et=Et.next=t}return Et}function $u(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yi(t){var e=li;return li+=1,Pn===null&&(Pn=[]),t=md(Pn,t,e),e=Q,(Et===null?e.memoizedState:Et.next)===null&&(e=e.alternate,L.H=e===null||e.memoizedState===null?$d:Xr),t}function Ju(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return yi(t);if(t.$$typeof===ol)return Lt(t)}throw Error(A(438,String(t)))}function Hr(t){var e=null,l=Q.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var n=Q.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(e={data:n.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=$u(),Q.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),n=0;n<t;n++)l[n]=my;return e.index++,l}function hl(t,e){return typeof e=="function"?e(t):e}function nu(t){var e=Dt();return Ur(e,ut,t)}function Ur(t,e,l){var n=t.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=l;var a=t.baseQueue,i=n.pending;if(i!==null){if(a!==null){var u=a.next;a.next=i.next,i.next=u}e.baseQueue=a=i,n.pending=null}if(i=t.baseState,a===null)t.memoizedState=i;else{e=a.next;var o=u=null,c=null,r=e,s=!1;do{var m=r.lane&-536870913;if(m!==r.lane?(J&m)===m:(pl&m)===m){var f=r.revertLane;if(f===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:r.action,hasEagerState:r.hasEagerState,eagerState:r.eagerState,next:null}),m===la&&(s=!0);else if((pl&f)===f){r=r.next,f===la&&(s=!0);continue}else m={lane:0,revertLane:r.revertLane,gesture:null,action:r.action,hasEagerState:r.hasEagerState,eagerState:r.eagerState,next:null},c===null?(o=c=m,u=i):c=c.next=m,Q.lanes|=f,$l|=f;m=r.action,dn&&l(i,m),i=r.hasEagerState?r.eagerState:l(i,m)}else f={lane:m,revertLane:r.revertLane,gesture:r.gesture,action:r.action,hasEagerState:r.hasEagerState,eagerState:r.eagerState,next:null},c===null?(o=c=f,u=i):c=c.next=f,Q.lanes|=m,$l|=m;r=r.next}while(r!==null&&r!==e);if(c===null?u=i:c.next=o,!Se(i,t.memoizedState)&&(Mt=!0,s&&(l=Jn,l!==null)))throw l;t.memoizedState=i,t.baseState=u,t.baseQueue=c,n.lastRenderedState=i}return a===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function Wo(t){var e=Dt(),l=e.queue;if(l===null)throw Error(A(311));l.lastRenderedReducer=t;var n=l.dispatch,a=l.pending,i=e.memoizedState;if(a!==null){l.pending=null;var u=a=a.next;do i=t(i,u.action),u=u.next;while(u!==a);Se(i,e.memoizedState)||(Mt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),l.lastRenderedState=i}return[i,n]}function Sd(t,e,l){var n=Q,a=Dt(),i=W;if(i){if(l===void 0)throw Error(A(407));l=l()}else l=e();var u=!Se((ut||a).memoizedState,l);if(u&&(a.memoizedState=l,Mt=!0),a=a.queue,qr(Ad.bind(null,n,a,t),[t]),a.getSnapshot!==e||u||Et!==null&&Et.memoizedState.tag&1){if(n.flags|=2048,aa(9,{destroy:void 0},zd.bind(null,n,a,l,e),null),ot===null)throw Error(A(349));i||(pl&127)!==0||Td(n,e,l)}return l}function Td(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=Q.updateQueue,e===null?(e=$u(),Q.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function zd(t,e,l,n){e.value=l,e.getSnapshot=n,xd(e)&&Dd(t)}function Ad(t,e,l){return l(function(){xd(e)&&Dd(t)})}function xd(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!Se(t,l)}catch{return!0}}function Dd(t){var e=gn(t,2);e!==null&&re(e,t,2)}function kc(t){var e=le();if(typeof t=="function"){var l=t;if(t=l(),dn){Rl(!0);try{l()}finally{Rl(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hl,lastRenderedState:t},e}function Ed(t,e,l,n){return t.baseState=l,Ur(t,ut,typeof n=="function"?n:hl)}function Cb(t,e,l,n,a){if(Fu(t))throw Error(A(485));if(t=e.action,t!==null){var i={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};L.T!==null?l(!0):i.isTransition=!1,n(i),l=e.pending,l===null?(i.next=e.pending=i,Od(e,i)):(i.next=l.next,e.pending=l.next=i)}}function Od(t,e){var l=e.action,n=e.payload,a=t.state;if(e.isTransition){var i=L.T,u={};L.T=u;try{var o=l(a,n),c=L.S;c!==null&&c(u,o),Ef(t,e,o)}catch(r){Yc(t,e,r)}finally{i!==null&&u.types!==null&&(i.types=u.types),L.T=i}}else try{i=l(a,n),Ef(t,e,i)}catch(r){Yc(t,e,r)}}function Ef(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Of(t,e,n)},function(n){return Yc(t,e,n)}):Of(t,e,l)}function Of(t,e,l){e.status="fulfilled",e.value=l,Cd(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,Od(t,l)))}function Yc(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,Cd(e),e=e.next;while(e!==n)}t.action=null}function Cd(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Md(t,e){return e}function Cf(t,e){if(W){var l=ot.formState;if(l!==null){t:{var n=Q;if(W){if(dt){e:{for(var a=dt,i=je;a.nodeType!==8;){if(!i){a=null;break e}if(a=Ge(a.nextSibling),a===null){a=null;break e}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){dt=Ge(a.nextSibling),n=a.data==="F!";break t}}Zl(n)}n=!1}n&&(e=l[0])}}return l=le(),l.memoizedState=l.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Md,lastRenderedState:e},l.queue=n,l=Vd.bind(null,Q,n),n.dispatch=l,n=kc(!1),i=Lr.bind(null,Q,!1,n.queue),n=le(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=Cb.bind(null,Q,a,i,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function Mf(t){var e=Dt();return Nd(e,ut,t)}function Nd(t,e,l){if(e=Ur(t,e,Md)[0],t=nu(hl)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=yi(e)}catch(u){throw u===da?Ku:u}else n=e;e=Dt();var a=e.queue,i=a.dispatch;return l!==e.memoizedState&&(Q.flags|=2048,aa(9,{destroy:void 0},Mb.bind(null,a,l),null)),[n,i,t]}function Mb(t,e){t.action=e}function Nf(t){var e=Dt(),l=ut;if(l!==null)return Nd(e,l,t);Dt(),e=e.memoizedState,l=Dt();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function aa(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=Q.updateQueue,e===null&&(e=$u(),Q.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(n=l.next,l.next=t,t.next=n,e.lastEffect=t),t}function Rd(){return Dt().memoizedState}function au(t,e,l,n){var a=le();Q.flags|=t,a.memoizedState=aa(1|e,{destroy:void 0},l,n===void 0?null:n)}function Wu(t,e,l,n){var a=Dt();n=n===void 0?null:n;var i=a.memoizedState.inst;ut!==null&&n!==null&&Rr(n,ut.memoizedState.deps)?a.memoizedState=aa(e,i,l,n):(Q.flags|=t,a.memoizedState=aa(1|e,i,l,n))}function Rf(t,e){au(8390656,8,t,e)}function qr(t,e){Wu(2048,8,t,e)}function Nb(t){Q.flags|=4;var e=Q.updateQueue;if(e===null)e=$u(),Q.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function jd(t){var e=Dt().memoizedState;return Nb({ref:e,nextImpl:t}),function(){if((I&2)!==0)throw Error(A(440));return e.impl.apply(void 0,arguments)}}function wd(t,e){return Wu(4,2,t,e)}function Gd(t,e){return Wu(4,4,t,e)}function _d(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Hd(t,e,l){l=l!=null?l.concat([t]):null,Wu(4,4,_d.bind(null,e,t),l)}function Br(){}function Ud(t,e){var l=Dt();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&Rr(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function qd(t,e){var l=Dt();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&Rr(e,n[1]))return n[0];if(n=t(),dn){Rl(!0);try{t()}finally{Rl(!1)}}return l.memoizedState=[n,e],n}function kr(t,e,l){return l===void 0||(pl&1073741824)!==0&&(J&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=Ep(),Q.lanes|=t,$l|=t,l)}function Bd(t,e,l,n){return Se(l,e)?l:na.current!==null?(t=kr(t,l,n),Se(t,e)||(Mt=!0),t):(pl&42)===0||(pl&1073741824)!==0&&(J&261930)===0?(Mt=!0,t.memoizedState=l):(t=Ep(),Q.lanes|=t,$l|=t,e)}function kd(t,e,l,n,a){var i=tt.p;tt.p=i!==0&&8>i?i:8;var u=L.T,o={};L.T=o,Lr(t,!1,e,l);try{var c=a(),r=L.S;if(r!==null&&r(o,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var s=Db(c,n);Xa(t,e,s,ve(t))}else Xa(t,e,n,ve(t))}catch(m){Xa(t,e,{then:function(){},status:"rejected",reason:m},ve())}finally{tt.p=i,u!==null&&o.types!==null&&(u.types=o.types),L.T=u}}function Rb(){}function Lc(t,e,l,n){if(t.tag!==5)throw Error(A(476));var a=Yd(t).queue;kd(t,a,e,an,l===null?Rb:function(){return Ld(t),l(n)})}function Yd(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:an,baseState:an,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hl,lastRenderedState:an},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hl,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Ld(t){var e=Yd(t);e.next===null&&(e=t.alternate.memoizedState),Xa(t,e.next.queue,{},ve())}function Yr(){return Lt(ui)}function Xd(){return Dt().memoizedState}function Qd(){return Dt().memoizedState}function jb(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=ve();t=ql(l);var n=Bl(e,t,l);n!==null&&(re(n,e,l),ka(n,e,l)),e={cache:Er()},t.payload=e;return}e=e.return}}function wb(t,e,l){var n=ve();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Fu(t)?Zd(e,l):(l=zr(t,e,l,n),l!==null&&(re(l,t,n),Kd(l,e,n)))}function Vd(t,e,l){var n=ve();Xa(t,e,l,n)}function Xa(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Fu(t))Zd(e,a);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var u=e.lastRenderedState,o=i(u,l);if(a.hasEagerState=!0,a.eagerState=o,Se(o,u))return Zu(t,e,a,0),ot===null&&Vu(),!1}catch{}if(l=zr(t,e,a,n),l!==null)return re(l,t,n),Kd(l,e,n),!0}return!1}function Lr(t,e,l,n){if(n={lane:2,revertLane:Fr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fu(t)){if(e)throw Error(A(479))}else e=zr(t,l,n,2),e!==null&&re(e,t,2)}function Fu(t){var e=t.alternate;return t===Q||e!==null&&e===Q}function Zd(t,e){Fn=xu=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Kd(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,jm(t,l)}}var ni={readContext:Lt,use:Ju,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useLayoutEffect:Tt,useInsertionEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useSyncExternalStore:Tt,useId:Tt,useHostTransitionStatus:Tt,useFormState:Tt,useActionState:Tt,useOptimistic:Tt,useMemoCache:Tt,useCacheRefresh:Tt};ni.useEffectEvent=Tt;var $d={readContext:Lt,use:Ju,useCallback:function(t,e){return le().memoizedState=[t,e===void 0?null:e],t},useContext:Lt,useEffect:Rf,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,au(4194308,4,_d.bind(null,e,t),l)},useLayoutEffect:function(t,e){return au(4194308,4,t,e)},useInsertionEffect:function(t,e){au(4,2,t,e)},useMemo:function(t,e){var l=le();e=e===void 0?null:e;var n=t();if(dn){Rl(!0);try{t()}finally{Rl(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=le();if(l!==void 0){var a=l(e);if(dn){Rl(!0);try{l(e)}finally{Rl(!1)}}}else a=e;return n.memoizedState=n.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},n.queue=t,t=t.dispatch=wb.bind(null,Q,t),[n.memoizedState,t]},useRef:function(t){var e=le();return t={current:t},e.memoizedState=t},useState:function(t){t=kc(t);var e=t.queue,l=Vd.bind(null,Q,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:Br,useDeferredValue:function(t,e){var l=le();return kr(l,t,e)},useTransition:function(){var t=kc(!1);return t=kd.bind(null,Q,t.queue,!0,!1),le().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=Q,a=le();if(W){if(l===void 0)throw Error(A(407));l=l()}else{if(l=e(),ot===null)throw Error(A(349));(J&127)!==0||Td(n,e,l)}a.memoizedState=l;var i={value:l,getSnapshot:e};return a.queue=i,Rf(Ad.bind(null,n,i,t),[t]),n.flags|=2048,aa(9,{destroy:void 0},zd.bind(null,n,i,l,e),null),l},useId:function(){var t=le(),e=ot.identifierPrefix;if(W){var l=Ke,n=Ze;l=(n&~(1<<32-ge(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Du++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=Eb++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Yr,useFormState:Cf,useActionState:Cf,useOptimistic:function(t){var e=le();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=Lr.bind(null,Q,!0,l),l.dispatch=e,[t,e]},useMemoCache:Hr,useCacheRefresh:function(){return le().memoizedState=jb.bind(null,Q)},useEffectEvent:function(t){var e=le(),l={impl:t};return e.memoizedState=l,function(){if((I&2)!==0)throw Error(A(440));return l.impl.apply(void 0,arguments)}}},Xr={readContext:Lt,use:Ju,useCallback:Ud,useContext:Lt,useEffect:qr,useImperativeHandle:Hd,useInsertionEffect:wd,useLayoutEffect:Gd,useMemo:qd,useReducer:nu,useRef:Rd,useState:function(){return nu(hl)},useDebugValue:Br,useDeferredValue:function(t,e){var l=Dt();return Bd(l,ut.memoizedState,t,e)},useTransition:function(){var t=nu(hl)[0],e=Dt().memoizedState;return[typeof t=="boolean"?t:yi(t),e]},useSyncExternalStore:Sd,useId:Xd,useHostTransitionStatus:Yr,useFormState:Mf,useActionState:Mf,useOptimistic:function(t,e){var l=Dt();return Ed(l,ut,t,e)},useMemoCache:Hr,useCacheRefresh:Qd};Xr.useEffectEvent=jd;var Jd={readContext:Lt,use:Ju,useCallback:Ud,useContext:Lt,useEffect:qr,useImperativeHandle:Hd,useInsertionEffect:wd,useLayoutEffect:Gd,useMemo:qd,useReducer:Wo,useRef:Rd,useState:function(){return Wo(hl)},useDebugValue:Br,useDeferredValue:function(t,e){var l=Dt();return ut===null?kr(l,t,e):Bd(l,ut.memoizedState,t,e)},useTransition:function(){var t=Wo(hl)[0],e=Dt().memoizedState;return[typeof t=="boolean"?t:yi(t),e]},useSyncExternalStore:Sd,useId:Xd,useHostTransitionStatus:Yr,useFormState:Nf,useActionState:Nf,useOptimistic:function(t,e){var l=Dt();return ut!==null?Ed(l,ut,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Hr,useCacheRefresh:Qd};Jd.useEffectEvent=jd;function Fo(t,e,l,n){e=t.memoizedState,l=l(n,e),l=l==null?e:pt({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Xc={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=ve(),a=ql(n);a.payload=e,l!=null&&(a.callback=l),e=Bl(t,a,n),e!==null&&(re(e,t,n),ka(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=ve(),a=ql(n);a.tag=1,a.payload=e,l!=null&&(a.callback=l),e=Bl(t,a,n),e!==null&&(re(e,t,n),ka(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=ve(),n=ql(l);n.tag=2,e!=null&&(n.callback=e),e=Bl(t,n,l),e!==null&&(re(e,t,l),ka(e,t,l))}};function jf(t,e,l,n,a,i,u){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,u):e.prototype&&e.prototype.isPureReactComponent?!Pa(l,n)||!Pa(a,i):!0}function wf(t,e,l,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,n),e.state!==t&&Xc.enqueueReplaceState(e,e.state,null)}function pn(t,e){var l=e;if("ref"in e){l={};for(var n in e)n!=="ref"&&(l[n]=e[n])}if(t=t.defaultProps){l===e&&(l=pt({},l));for(var a in t)l[a]===void 0&&(l[a]=t[a])}return l}function Wd(t){bu(t)}function Fd(t){console.error(t)}function Pd(t){bu(t)}function Eu(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function Gf(t,e,l){try{var n=t.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Qc(t,e,l){return l=ql(l),l.tag=3,l.payload={element:null},l.callback=function(){Eu(t,e)},l}function Id(t){return t=ql(t),t.tag=3,t}function tp(t,e,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var i=n.value;t.payload=function(){return a(i)},t.callback=function(){Gf(e,l,n)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(t.callback=function(){Gf(e,l,n),typeof a!="function"&&(kl===null?kl=new Set([this]):kl.add(this));var o=n.stack;this.componentDidCatch(n.value,{componentStack:o!==null?o:""})})}function Gb(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&ma(e,l,a,!0),l=Te.current,l!==null){switch(l.tag){case 31:case 13:return we===null?Ru():l.alternate===null&&zt===0&&(zt=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===Tu?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),cc(t,n,a)),!1;case 22:return l.flags|=65536,n===Tu?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([n]):l.add(n)),cc(t,n,a)),!1}throw Error(A(435,l.tag))}return cc(t,n,a),Ru(),!1}if(W)return e=Te.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==Rc&&(t=Error(A(422),{cause:n}),ti(Re(t,l)))):(n!==Rc&&(e=Error(A(423),{cause:n}),ti(Re(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=Re(n,l),a=Qc(t.stateNode,n,a),Jo(t,a),zt!==4&&(zt=2)),!1;var i=Error(A(520),{cause:n});if(i=Re(i,l),Za===null?Za=[i]:Za.push(i),zt!==4&&(zt=2),e===null)return!0;n=Re(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=Qc(l.stateNode,n,t),Jo(l,t),!1;case 1:if(e=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(kl===null||!kl.has(i))))return l.flags|=65536,a&=-a,l.lanes|=a,a=Id(a),tp(a,t,l,n),Jo(l,a),!1}l=l.return}while(l!==null);return!1}var Qr=Error(A(461)),Mt=!1;function Bt(t,e,l,n){e.child=t===null?pd(e,null,l,n):mn(e,t.child,l,n)}function _f(t,e,l,n,a){l=l.render;var i=e.ref;if("ref"in n){var u={};for(var o in n)o!=="ref"&&(u[o]=n[o])}else u=n;return fn(e),n=jr(t,e,l,u,i,a),o=wr(),t!==null&&!Mt?(Gr(t,e,a),yl(t,e,a)):(W&&o&&xr(e),e.flags|=1,Bt(t,e,n,a),e.child)}function Hf(t,e,l,n,a){if(t===null){var i=l.type;return typeof i=="function"&&!Ar(i)&&i.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=i,ep(t,e,i,n,a)):(t=eu(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!Vr(t,a)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:Pa,l(u,n)&&t.ref===e.ref)return yl(t,e,a)}return e.flags|=1,t=sl(i,n),t.ref=e.ref,t.return=e,e.child=t}function ep(t,e,l,n,a){if(t!==null){var i=t.memoizedProps;if(Pa(i,n)&&t.ref===e.ref)if(Mt=!1,e.pendingProps=n=i,Vr(t,a))(t.flags&131072)!==0&&(Mt=!0);else return e.lanes=t.lanes,yl(t,e,a)}return Vc(t,e,l,n,a)}function lp(t,e,l,n){var a=n.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((e.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,t!==null){for(n=e.child=t.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~i}else n=0,e.child=null;return Uf(t,e,i,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&lu(e,i!==null?i.cachePool:null),i!==null?Df(e,i):qc(),bd(e);else return n=e.lanes=536870912,Uf(t,e,i!==null?i.baseLanes|l:l,l,n)}else i!==null?(lu(e,i.cachePool),Df(e,i),Ml(e),e.memoizedState=null):(t!==null&&lu(e,null),qc(),Ml(e));return Bt(t,e,a,l),e.child}function Ga(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Uf(t,e,l,n,a){var i=Or();return i=i===null?null:{parent:Ct._currentValue,pool:i},e.memoizedState={baseLanes:l,cachePool:i},t!==null&&lu(e,null),qc(),bd(e),t!==null&&ma(t,e,n,!0),e.childLanes=a,null}function iu(t,e){return e=Ou({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function qf(t,e,l){return mn(e,t.child,null,l),t=iu(e,e.pendingProps),t.flags|=2,de(e),e.memoizedState=null,t}function _b(t,e,l){var n=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(W){if(n.mode==="hidden")return t=iu(e,n),e.lanes=536870912,Ga(null,t);if(Bc(e),(t=dt)?(t=$p(t,je),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Vl!==null?{id:Ze,overflow:Ke}:null,retryLane:536870912,hydrationErrors:null},l=od(t),l.return=e,e.child=l,Yt=e,dt=null)):t=null,t===null)throw Zl(e);return e.lanes=536870912,null}return iu(e,n)}var i=t.memoizedState;if(i!==null){var u=i.dehydrated;if(Bc(e),a)if(e.flags&256)e.flags&=-257,e=qf(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(A(558));else if(Mt||ma(t,e,l,!1),a=(l&t.childLanes)!==0,Mt||a){if(n=ot,n!==null&&(u=wm(n,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,gn(t,u),re(n,t,u),Qr;Ru(),e=qf(t,e,l)}else t=i.treeContext,dt=Ge(u.nextSibling),Yt=e,W=!0,Ul=null,je=!1,t!==null&&rd(e,t),e=iu(e,n),e.flags|=4096;return e}return t=sl(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function uu(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(A(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function Vc(t,e,l,n,a){return fn(e),l=jr(t,e,l,n,void 0,a),n=wr(),t!==null&&!Mt?(Gr(t,e,a),yl(t,e,a)):(W&&n&&xr(e),e.flags|=1,Bt(t,e,l,a),e.child)}function Bf(t,e,l,n,a,i){return fn(e),e.updateQueue=null,l=vd(e,n,l,a),gd(t),n=wr(),t!==null&&!Mt?(Gr(t,e,i),yl(t,e,i)):(W&&n&&xr(e),e.flags|=1,Bt(t,e,l,i),e.child)}function kf(t,e,l,n,a){if(fn(e),e.stateNode===null){var i=Ln,u=l.contextType;typeof u=="object"&&u!==null&&(i=Lt(u)),i=new l(n,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Xc,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=n,i.state=e.memoizedState,i.refs={},Mr(e),u=l.contextType,i.context=typeof u=="object"&&u!==null?Lt(u):Ln,i.state=e.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(Fo(e,l,u,n),i.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&Xc.enqueueReplaceState(i,i.state,null),La(e,n,i,a),Ya(),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){i=e.stateNode;var o=e.memoizedProps,c=pn(l,o);i.props=c;var r=i.context,s=l.contextType;u=Ln,typeof s=="object"&&s!==null&&(u=Lt(s));var m=l.getDerivedStateFromProps;s=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function",o=e.pendingProps!==o,s||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o||r!==u)&&wf(e,i,n,u),El=!1;var f=e.memoizedState;i.state=f,La(e,n,i,a),Ya(),r=e.memoizedState,o||f!==r||El?(typeof m=="function"&&(Fo(e,l,m,n),r=e.memoizedState),(c=El||jf(e,l,c,n,f,r,u))?(s||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=r),i.props=n,i.state=r,i.context=u,n=c):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{i=e.stateNode,Hc(t,e),u=e.memoizedProps,s=pn(l,u),i.props=s,m=e.pendingProps,f=i.context,r=l.contextType,c=Ln,typeof r=="object"&&r!==null&&(c=Lt(r)),o=l.getDerivedStateFromProps,(r=typeof o=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==m||f!==c)&&wf(e,i,n,c),El=!1,f=e.memoizedState,i.state=f,La(e,n,i,a),Ya();var d=e.memoizedState;u!==m||f!==d||El||t!==null&&t.dependencies!==null&&Su(t.dependencies)?(typeof o=="function"&&(Fo(e,l,o,n),d=e.memoizedState),(s=El||jf(e,l,s,n,f,d,c)||t!==null&&t.dependencies!==null&&Su(t.dependencies))?(r||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,d,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,d,c)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=d),i.props=n,i.state=d,i.context=c,n=s):(typeof i.componentDidUpdate!="function"||u===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),n=!1)}return i=n,uu(t,e),n=(e.flags&128)!==0,i||n?(i=e.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:i.render(),e.flags|=1,t!==null&&n?(e.child=mn(e,t.child,null,a),e.child=mn(e,null,l,a)):Bt(t,e,l,a),e.memoizedState=i.state,t=e.child):t=yl(t,e,a),t}function Yf(t,e,l,n){return sn(),e.flags|=256,Bt(t,e,l,n),e.child}var Po={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Io(t){return{baseLanes:t,cachePool:fd()}}function tc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=he),t}function np(t,e,l){var n=e.pendingProps,a=!1,i=(e.flags&128)!==0,u;if((u=i)||(u=t!==null&&t.memoizedState===null?!1:(xt.current&2)!==0),u&&(a=!0,e.flags&=-129),u=(e.flags&32)!==0,e.flags&=-33,t===null){if(W){if(a?Cl(e):Ml(e),(t=dt)?(t=$p(t,je),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Vl!==null?{id:Ze,overflow:Ke}:null,retryLane:536870912,hydrationErrors:null},l=od(t),l.return=e,e.child=l,Yt=e,dt=null)):t=null,t===null)throw Zl(e);return ir(t)?e.lanes=32:e.lanes=536870912,null}var o=n.children;return n=n.fallback,a?(Ml(e),a=e.mode,o=Ou({mode:"hidden",children:o},a),n=un(n,a,l,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n=e.child,n.memoizedState=Io(l),n.childLanes=tc(t,u,l),e.memoizedState=Po,Ga(null,n)):(Cl(e),Zc(e,o))}var c=t.memoizedState;if(c!==null&&(o=c.dehydrated,o!==null)){if(i)e.flags&256?(Cl(e),e.flags&=-257,e=ec(t,e,l)):e.memoizedState!==null?(Ml(e),e.child=t.child,e.flags|=128,e=null):(Ml(e),o=n.fallback,a=e.mode,n=Ou({mode:"visible",children:n.children},a),o=un(o,a,l,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,mn(e,t.child,null,l),n=e.child,n.memoizedState=Io(l),n.childLanes=tc(t,u,l),e.memoizedState=Po,e=Ga(null,n));else if(Cl(e),ir(o)){if(u=o.nextSibling&&o.nextSibling.dataset,u)var r=u.dgst;u=r,n=Error(A(419)),n.stack="",n.digest=u,ti({value:n,source:null,stack:null}),e=ec(t,e,l)}else if(Mt||ma(t,e,l,!1),u=(l&t.childLanes)!==0,Mt||u){if(u=ot,u!==null&&(n=wm(u,l),n!==0&&n!==c.retryLane))throw c.retryLane=n,gn(t,n),re(u,t,n),Qr;ar(o)||Ru(),e=ec(t,e,l)}else ar(o)?(e.flags|=192,e.child=t.child,e=null):(t=c.treeContext,dt=Ge(o.nextSibling),Yt=e,W=!0,Ul=null,je=!1,t!==null&&rd(e,t),e=Zc(e,n.children),e.flags|=4096);return e}return a?(Ml(e),o=n.fallback,a=e.mode,c=t.child,r=c.sibling,n=sl(c,{mode:"hidden",children:n.children}),n.subtreeFlags=c.subtreeFlags&65011712,r!==null?o=sl(r,o):(o=un(o,a,l,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,Ga(null,n),n=e.child,o=t.child.memoizedState,o===null?o=Io(l):(a=o.cachePool,a!==null?(c=Ct._currentValue,a=a.parent!==c?{parent:c,pool:c}:a):a=fd(),o={baseLanes:o.baseLanes|l,cachePool:a}),n.memoizedState=o,n.childLanes=tc(t,u,l),e.memoizedState=Po,Ga(t.child,n)):(Cl(e),l=t.child,t=l.sibling,l=sl(l,{mode:"visible",children:n.children}),l.return=e,l.sibling=null,t!==null&&(u=e.deletions,u===null?(e.deletions=[t],e.flags|=16):u.push(t)),e.child=l,e.memoizedState=null,l)}function Zc(t,e){return e=Ou({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Ou(t,e){return t=pe(22,t,null,e),t.lanes=0,t}function ec(t,e,l){return mn(e,t.child,null,l),t=Zc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Lf(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),wc(t.return,e,l)}function lc(t,e,l,n,a,i){var u=t.memoizedState;u===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:i}:(u.isBackwards=e,u.rendering=null,u.renderingStartTime=0,u.last=n,u.tail=l,u.tailMode=a,u.treeForkCount=i)}function ap(t,e,l){var n=e.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var u=xt.current,o=(u&2)!==0;if(o?(u=u&1|2,e.flags|=128):u&=1,rt(xt,u),Bt(t,e,n,l),n=W?Ia:0,!o&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Lf(t,l,e);else if(t.tag===19)Lf(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(a){case"forwards":for(l=e.child,a=null;l!==null;)t=l.alternate,t!==null&&Au(t)===null&&(a=l),l=l.sibling;l=a,l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),lc(e,!1,a,l,i,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&Au(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}lc(e,!0,l,null,i,n);break;case"together":lc(e,!1,null,null,void 0,n);break;default:e.memoizedState=null}return e.child}function yl(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),$l|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(ma(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(A(153));if(e.child!==null){for(t=e.child,l=sl(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=sl(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function Vr(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Su(t)))}function Hb(t,e,l){switch(e.tag){case 3:du(e,e.stateNode.containerInfo),Ol(e,Ct,t.memoizedState.cache),sn();break;case 27:case 5:Sc(e);break;case 4:du(e,e.stateNode.containerInfo);break;case 10:Ol(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Bc(e),null;break;case 13:var n=e.memoizedState;if(n!==null)return n.dehydrated!==null?(Cl(e),e.flags|=128,null):(l&e.child.childLanes)!==0?np(t,e,l):(Cl(e),t=yl(t,e,l),t!==null?t.sibling:null);Cl(e);break;case 19:var a=(t.flags&128)!==0;if(n=(l&e.childLanes)!==0,n||(ma(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return ap(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),rt(xt,xt.current),n)break;return null;case 22:return e.lanes=0,lp(t,e,l,e.pendingProps);case 24:Ol(e,Ct,t.memoizedState.cache)}return yl(t,e,l)}function ip(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Mt=!0;else{if(!Vr(t,l)&&(e.flags&128)===0)return Mt=!1,Hb(t,e,l);Mt=(t.flags&131072)!==0}else Mt=!1,W&&(e.flags&1048576)!==0&&cd(e,Ia,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=ln(e.elementType),e.type=t,typeof t=="function")Ar(t)?(n=pn(t,n),e.tag=1,e=kf(null,e,t,n,l)):(e.tag=0,e=Vc(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===rr){e.tag=11,e=_f(null,e,t,n,l);break t}else if(a===sr){e.tag=14,e=Hf(null,e,t,n,l);break t}}throw e=gc(t)||t,Error(A(306,e,""))}}return e;case 0:return Vc(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=pn(n,e.pendingProps),kf(t,e,n,a,l);case 3:t:{if(du(e,e.stateNode.containerInfo),t===null)throw Error(A(387));n=e.pendingProps;var i=e.memoizedState;a=i.element,Hc(t,e),La(e,n,null,l);var u=e.memoizedState;if(n=u.cache,Ol(e,Ct,n),n!==i.cache&&Gc(e,[Ct],l,!0),Ya(),n=u.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:u.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=Yf(t,e,n,l);break t}else if(n!==a){a=Re(Error(A(424)),e),ti(a),e=Yf(t,e,n,l);break t}else for(t=e.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,dt=Ge(t.firstChild),Yt=e,W=!0,Ul=null,je=!0,l=pd(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(sn(),n===a){e=yl(t,e,l);break t}Bt(t,e,n,l)}e=e.child}return e;case 26:return uu(t,e),t===null?(l=sm(e.type,null,e.pendingProps,null))?e.memoizedState=l:W||(l=e.type,t=e.pendingProps,n=_u(Hl.current).createElement(l),n[kt]=e,n[se]=t,Xt(n,l,t),Ut(n),e.stateNode=n):e.memoizedState=sm(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Sc(e),t===null&&W&&(n=e.stateNode=Jp(e.type,e.pendingProps,Hl.current),Yt=e,je=!0,a=dt,Wl(e.type)?(ur=a,dt=Ge(n.firstChild)):dt=a),Bt(t,e,e.pendingProps.children,l),uu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&W&&((a=n=dt)&&(n=sg(n,e.type,e.pendingProps,je),n!==null?(e.stateNode=n,Yt=e,dt=Ge(n.firstChild),je=!1,a=!0):a=!1),a||Zl(e)),Sc(e),a=e.type,i=e.pendingProps,u=t!==null?t.memoizedProps:null,n=i.children,lr(a,i)?n=null:u!==null&&lr(a,u)&&(e.flags|=32),e.memoizedState!==null&&(a=jr(t,e,Ob,null,null,l),ui._currentValue=a),uu(t,e),Bt(t,e,n,l),e.child;case 6:return t===null&&W&&((t=l=dt)&&(l=fg(l,e.pendingProps,je),l!==null?(e.stateNode=l,Yt=e,dt=null,t=!0):t=!1),t||Zl(e)),null;case 13:return np(t,e,l);case 4:return du(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=mn(e,null,n,l):Bt(t,e,n,l),e.child;case 11:return _f(t,e,e.type,e.pendingProps,l);case 7:return Bt(t,e,e.pendingProps,l),e.child;case 8:return Bt(t,e,e.pendingProps.children,l),e.child;case 12:return Bt(t,e,e.pendingProps.children,l),e.child;case 10:return n=e.pendingProps,Ol(e,e.type,n.value),Bt(t,e,n.children,l),e.child;case 9:return a=e.type._context,n=e.pendingProps.children,fn(e),a=Lt(a),n=n(a),e.flags|=1,Bt(t,e,n,l),e.child;case 14:return Hf(t,e,e.type,e.pendingProps,l);case 15:return ep(t,e,e.type,e.pendingProps,l);case 19:return ap(t,e,l);case 31:return _b(t,e,l);case 22:return lp(t,e,l,e.pendingProps);case 24:return fn(e),n=Lt(Ct),t===null?(a=Or(),a===null&&(a=ot,i=Er(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=l),a=i),e.memoizedState={parent:n,cache:a},Mr(e),Ol(e,Ct,a)):((t.lanes&l)!==0&&(Hc(t,e),La(e,null,null,l),Ya()),a=t.memoizedState,i=e.memoizedState,a.parent!==n?(a={parent:n,cache:n},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),Ol(e,Ct,n)):(n=i.cache,Ol(e,Ct,n),n!==a.cache&&Gc(e,[Ct],l,!0))),Bt(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(A(156,e.tag))}function el(t){t.flags|=4}function nc(t,e,l,n,a){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(Mp())t.flags|=8192;else throw cn=Tu,Cr}else t.flags&=-16777217}function Xf(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Pp(e))if(Mp())t.flags|=8192;else throw cn=Tu,Cr}function Qi(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Nm():536870912,t.lanes|=e,ia|=e)}function Oa(t,e){if(!W)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function mt(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,n=0;if(e)for(var a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=n,t.childLanes=l,e}function Ub(t,e,l){var n=e.pendingProps;switch(Dr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(e),null;case 1:return mt(e),null;case 3:return l=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),fl(Ct),In(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Nn(e)?el(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,$o())),mt(e),null;case 26:var a=e.type,i=e.memoizedState;return t===null?(el(e),i!==null?(mt(e),Xf(e,i)):(mt(e),nc(e,a,null,n,l))):i?i!==t.memoizedState?(el(e),mt(e),Xf(e,i)):(mt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&el(e),mt(e),nc(e,a,t,n,l)),null;case 27:if(pu(e),l=Hl.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&el(e);else{if(!n){if(e.stateNode===null)throw Error(A(166));return mt(e),null}t=Je.current,Nn(e)?gf(e,t):(t=Jp(a,n,l),e.stateNode=t,el(e))}return mt(e),null;case 5:if(pu(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&el(e);else{if(!n){if(e.stateNode===null)throw Error(A(166));return mt(e),null}if(i=Je.current,Nn(e))gf(e,i);else{var u=_u(Hl.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?u.createElement("select",{is:n.is}):u.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?u.createElement(a,{is:n.is}):u.createElement(a)}}i[kt]=e,i[se]=n;t:for(u=e.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break t;for(;u.sibling===null;){if(u.return===null||u.return===e)break t;u=u.return}u.sibling.return=u.return,u=u.sibling}e.stateNode=i;t:switch(Xt(i,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&el(e)}}return mt(e),nc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&el(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(A(166));if(t=Hl.current,Nn(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,a=Yt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}t[kt]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Vp(t.nodeValue,l)),t||Zl(e,!0)}else t=_u(t).createTextNode(n),t[kt]=e,e.stateNode=t}return mt(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=Nn(e),l!==null){if(t===null){if(!n)throw Error(A(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(A(557));t[kt]=e}else sn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;mt(e),t=!1}else l=$o(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(de(e),e):(de(e),null);if((e.flags&128)!==0)throw Error(A(558))}return mt(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=Nn(e),n!==null&&n.dehydrated!==null){if(t===null){if(!a)throw Error(A(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(A(317));a[kt]=e}else sn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;mt(e),a=!1}else a=$o(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(de(e),e):(de(e),null)}return de(e),(e.flags&128)!==0?(e.lanes=l,e):(l=n!==null,t=t!==null&&t.memoizedState!==null,l&&(n=e.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==a&&(n.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Qi(e,e.updateQueue),mt(e),null);case 4:return In(),t===null&&Pr(e.stateNode.containerInfo),mt(e),null;case 10:return fl(e.type),mt(e),null;case 19:if(qt(xt),n=e.memoizedState,n===null)return mt(e),null;if(a=(e.flags&128)!==0,i=n.rendering,i===null)if(a)Oa(n,!1);else{if(zt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=Au(t),i!==null){for(e.flags|=128,Oa(n,!1),t=i.updateQueue,e.updateQueue=t,Qi(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)ud(l,t),l=l.sibling;return rt(xt,xt.current&1|2),W&&il(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&ye()>Mu&&(e.flags|=128,a=!0,Oa(n,!1),e.lanes=4194304)}else{if(!a)if(t=Au(i),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,Qi(e,t),Oa(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!W)return mt(e),null}else 2*ye()-n.renderingStartTime>Mu&&l!==536870912&&(e.flags|=128,a=!0,Oa(n,!1),e.lanes=4194304);n.isBackwards?(i.sibling=e.child,e.child=i):(t=n.last,t!==null?t.sibling=i:e.child=i,n.last=i)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=ye(),t.sibling=null,l=xt.current,rt(xt,a?l&1|2:l&1),W&&il(e,n.treeForkCount),t):(mt(e),null);case 22:case 23:return de(e),Nr(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(l&536870912)!==0&&(e.flags&128)===0&&(mt(e),e.subtreeFlags&6&&(e.flags|=8192)):mt(e),l=e.updateQueue,l!==null&&Qi(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==l&&(e.flags|=2048),t!==null&&qt(on),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),fl(Ct),mt(e),null;case 25:return null;case 30:return null}throw Error(A(156,e.tag))}function qb(t,e){switch(Dr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return fl(Ct),In(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return pu(e),null;case 31:if(e.memoizedState!==null){if(de(e),e.alternate===null)throw Error(A(340));sn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(de(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(A(340));sn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return qt(xt),null;case 4:return In(),null;case 10:return fl(e.type),null;case 22:case 23:return de(e),Nr(),t!==null&&qt(on),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return fl(Ct),null;case 25:return null;default:return null}}function up(t,e){switch(Dr(e),e.tag){case 3:fl(Ct),In();break;case 26:case 27:case 5:pu(e);break;case 4:In();break;case 31:e.memoizedState!==null&&de(e);break;case 13:de(e);break;case 19:qt(xt);break;case 10:fl(e.type);break;case 22:case 23:de(e),Nr(),t!==null&&qt(on);break;case 24:fl(Ct)}}function bi(t,e){try{var l=e.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&t)===t){n=void 0;var i=l.create,u=l.inst;n=i(),u.destroy=n}l=l.next}while(l!==a)}}catch(o){lt(e,e.return,o)}}function Kl(t,e,l){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&t)===t){var u=n.inst,o=u.destroy;if(o!==void 0){u.destroy=void 0,a=e;var c=l,r=o;try{r()}catch(s){lt(a,c,s)}}}n=n.next}while(n!==i)}}catch(s){lt(e,e.return,s)}}function op(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{yd(e,l)}catch(n){lt(t,t.return,n)}}}function cp(t,e,l){l.props=pn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){lt(t,e,n)}}function Qa(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(a){lt(t,e,a)}}function $e(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){lt(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){lt(t,e,a)}else l.current=null}function rp(t){var e=t.type,l=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break t;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){lt(t,t.return,a)}}function ac(t,e,l){try{var n=t.stateNode;ag(n,t.type,l,e),n[se]=e}catch(a){lt(t,t.return,a)}}function sp(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Wl(t.type)||t.tag===4}function ic(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||sp(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Wl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Kc(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=cl));else if(n!==4&&(n===27&&Wl(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Kc(t,e,l),t=t.sibling;t!==null;)Kc(t,e,l),t=t.sibling}function Cu(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(n!==4&&(n===27&&Wl(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Cu(t,e,l),t=t.sibling;t!==null;)Cu(t,e,l),t=t.sibling}function fp(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);Xt(e,n,l),e[kt]=t,e[se]=l}catch(i){lt(t,t.return,i)}}var ul=!1,Ot=!1,uc=!1,Qf=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function Bb(t,e){if(t=t.containerInfo,tr=Bu,t=Pm(t),Sr(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break t}var u=0,o=-1,c=-1,r=0,s=0,m=t,f=null;e:for(;;){for(var d;m!==l||a!==0&&m.nodeType!==3||(o=u+a),m!==i||n!==0&&m.nodeType!==3||(c=u+n),m.nodeType===3&&(u+=m.nodeValue.length),(d=m.firstChild)!==null;)f=m,m=d;for(;;){if(m===t)break e;if(f===l&&++r===a&&(o=u),f===i&&++s===n&&(c=u),(d=m.nextSibling)!==null)break;m=f,f=m.parentNode}m=d}l=o===-1||c===-1?null:{start:o,end:c}}else l=null}l=l||{start:0,end:0}}else l=null;for(er={focusedElem:t,selectionRange:l},Bu=!1,Ht=e;Ht!==null;)if(e=Ht,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ht=t;else for(;Ht!==null;){switch(e=Ht,i=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)a=t[l],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&i!==null){t=void 0,l=e,a=i.memoizedProps,i=i.memoizedState,n=l.stateNode;try{var h=pn(l.type,a);t=n.getSnapshotBeforeUpdate(h,i),n.__reactInternalSnapshotBeforeUpdate=t}catch(v){lt(l,l.return,v)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,l=t.nodeType,l===9)nr(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":nr(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(A(163))}if(t=e.sibling,t!==null){t.return=e.return,Ht=t;break}Ht=e.return}}function mp(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:nl(t,l),n&4&&bi(5,l);break;case 1:if(nl(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(u){lt(l,l.return,u)}else{var a=pn(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(u){lt(l,l.return,u)}}n&64&&op(l),n&512&&Qa(l,l.return);break;case 3:if(nl(t,l),n&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{yd(t,e)}catch(u){lt(l,l.return,u)}}break;case 27:e===null&&n&4&&fp(l);case 26:case 5:nl(t,l),e===null&&n&4&&rp(l),n&512&&Qa(l,l.return);break;case 12:nl(t,l);break;case 31:nl(t,l),n&4&&hp(t,l);break;case 13:nl(t,l),n&4&&yp(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=$b.bind(null,l),mg(t,l))));break;case 22:if(n=l.memoizedState!==null||ul,!n){e=e!==null&&e.memoizedState!==null||Ot,a=ul;var i=Ot;ul=n,(Ot=e)&&!i?al(t,l,(l.subtreeFlags&8772)!==0):nl(t,l),ul=a,Ot=i}break;case 30:break;default:nl(t,l)}}function dp(t){var e=t.alternate;e!==null&&(t.alternate=null,dp(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&pr(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var gt=null,oe=!1;function ll(t,e,l){for(l=l.child;l!==null;)pp(t,e,l),l=l.sibling}function pp(t,e,l){if(be&&typeof be.onCommitFiberUnmount=="function")try{be.onCommitFiberUnmount(si,l)}catch{}switch(l.tag){case 26:Ot||$e(l,e),ll(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ot||$e(l,e);var n=gt,a=oe;Wl(l.type)&&(gt=l.stateNode,oe=!1),ll(t,e,l),$a(l.stateNode),gt=n,oe=a;break;case 5:Ot||$e(l,e);case 6:if(n=gt,a=oe,gt=null,ll(t,e,l),gt=n,oe=a,gt!==null)if(oe)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(l.stateNode)}catch(i){lt(l,e,i)}else try{gt.removeChild(l.stateNode)}catch(i){lt(l,e,i)}break;case 18:gt!==null&&(oe?(t=gt,im(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),ra(t)):im(gt,l.stateNode));break;case 4:n=gt,a=oe,gt=l.stateNode.containerInfo,oe=!0,ll(t,e,l),gt=n,oe=a;break;case 0:case 11:case 14:case 15:Kl(2,l,e),Ot||Kl(4,l,e),ll(t,e,l);break;case 1:Ot||($e(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&cp(l,e,n)),ll(t,e,l);break;case 21:ll(t,e,l);break;case 22:Ot=(n=Ot)||l.memoizedState!==null,ll(t,e,l),Ot=n;break;default:ll(t,e,l)}}function hp(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ra(t)}catch(l){lt(e,e.return,l)}}}function yp(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ra(t)}catch(l){lt(e,e.return,l)}}function kb(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Qf),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Qf),e;default:throw Error(A(435,t.tag))}}function Vi(t,e){var l=kb(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=Jb.bind(null,t,n);n.then(a,a)}})}function ie(t,e){var l=e.deletions;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n],i=t,u=e,o=u;t:for(;o!==null;){switch(o.tag){case 27:if(Wl(o.type)){gt=o.stateNode,oe=!1;break t}break;case 5:gt=o.stateNode,oe=!1;break t;case 3:case 4:gt=o.stateNode.containerInfo,oe=!0;break t}o=o.return}if(gt===null)throw Error(A(160));pp(i,u,a),gt=null,oe=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)bp(e,t),e=e.sibling}var qe=null;function bp(t,e){var l=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ie(e,t),ue(t),n&4&&(Kl(3,t,t.return),bi(3,t),Kl(5,t,t.return));break;case 1:ie(e,t),ue(t),n&512&&(Ot||l===null||$e(l,l.return)),n&64&&ul&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var a=qe;if(ie(e,t),ue(t),n&512&&(Ot||l===null||$e(l,l.return)),n&4){var i=l!==null?l.memoizedState:null;if(n=t.memoizedState,l===null)if(n===null)if(t.stateNode===null){t:{n=t.type,l=t.memoizedProps,a=a.ownerDocument||a;e:switch(n){case"title":i=a.getElementsByTagName("title")[0],(!i||i[di]||i[kt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(n),a.head.insertBefore(i,a.querySelector("head > title"))),Xt(i,n,l),i[kt]=t,Ut(i),n=i;break t;case"link":var u=mm("link","href",a).get(n+(l.href||""));if(u){for(var o=0;o<u.length;o++)if(i=u[o],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(o,1);break e}}i=a.createElement(n),Xt(i,n,l),a.head.appendChild(i);break;case"meta":if(u=mm("meta","content",a).get(n+(l.content||""))){for(o=0;o<u.length;o++)if(i=u[o],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(o,1);break e}}i=a.createElement(n),Xt(i,n,l),a.head.appendChild(i);break;default:throw Error(A(468,n))}i[kt]=t,Ut(i),n=i}t.stateNode=n}else dm(a,t.type,t.stateNode);else t.stateNode=fm(a,n,t.memoizedProps);else i!==n?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,n===null?dm(a,t.type,t.stateNode):fm(a,n,t.memoizedProps)):n===null&&t.stateNode!==null&&ac(t,t.memoizedProps,l.memoizedProps)}break;case 27:ie(e,t),ue(t),n&512&&(Ot||l===null||$e(l,l.return)),l!==null&&n&4&&ac(t,t.memoizedProps,l.memoizedProps);break;case 5:if(ie(e,t),ue(t),n&512&&(Ot||l===null||$e(l,l.return)),t.flags&32){a=t.stateNode;try{ea(a,"")}catch(h){lt(t,t.return,h)}}n&4&&t.stateNode!=null&&(a=t.memoizedProps,ac(t,a,l!==null?l.memoizedProps:a)),n&1024&&(uc=!0);break;case 6:if(ie(e,t),ue(t),n&4){if(t.stateNode===null)throw Error(A(162));n=t.memoizedProps,l=t.stateNode;try{l.nodeValue=n}catch(h){lt(t,t.return,h)}}break;case 3:if(ru=null,a=qe,qe=Hu(e.containerInfo),ie(e,t),qe=a,ue(t),n&4&&l!==null&&l.memoizedState.isDehydrated)try{ra(e.containerInfo)}catch(h){lt(t,t.return,h)}uc&&(uc=!1,gp(t));break;case 4:n=qe,qe=Hu(t.stateNode.containerInfo),ie(e,t),ue(t),qe=n;break;case 12:ie(e,t),ue(t);break;case 31:ie(e,t),ue(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Vi(t,n)));break;case 13:ie(e,t),ue(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Pu=ye()),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Vi(t,n)));break;case 22:a=t.memoizedState!==null;var c=l!==null&&l.memoizedState!==null,r=ul,s=Ot;if(ul=r||a,Ot=s||c,ie(e,t),Ot=s,ul=r,ue(t),n&8192)t:for(e=t.stateNode,e._visibility=a?e._visibility&-2:e._visibility|1,a&&(l===null||c||ul||Ot||nn(t)),l=null,e=t;;){if(e.tag===5||e.tag===26){if(l===null){c=l=e;try{if(i=c.stateNode,a)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{o=c.stateNode;var m=c.memoizedProps.style,f=m!=null&&m.hasOwnProperty("display")?m.display:null;o.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(h){lt(c,c.return,h)}}}else if(e.tag===6){if(l===null){c=e;try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(h){lt(c,c.return,h)}}}else if(e.tag===18){if(l===null){c=e;try{var d=c.stateNode;a?um(d,!0):um(c.stateNode,!1)}catch(h){lt(c,c.return,h)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;l===e&&(l=null),e=e.return}l===e&&(l=null),e.sibling.return=e.return,e=e.sibling}n&4&&(n=t.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,Vi(t,l))));break;case 19:ie(e,t),ue(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Vi(t,n)));break;case 30:break;case 21:break;default:ie(e,t),ue(t)}}function ue(t){var e=t.flags;if(e&2){try{for(var l,n=t.return;n!==null;){if(sp(n)){l=n;break}n=n.return}if(l==null)throw Error(A(160));switch(l.tag){case 27:var a=l.stateNode,i=ic(t);Cu(t,i,a);break;case 5:var u=l.stateNode;l.flags&32&&(ea(u,""),l.flags&=-33);var o=ic(t);Cu(t,o,u);break;case 3:case 4:var c=l.stateNode.containerInfo,r=ic(t);Kc(t,r,c);break;default:throw Error(A(161))}}catch(s){lt(t,t.return,s)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function gp(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;gp(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function nl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)mp(t,e.alternate,e),e=e.sibling}function nn(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Kl(4,e,e.return),nn(e);break;case 1:$e(e,e.return);var l=e.stateNode;typeof l.componentWillUnmount=="function"&&cp(e,e.return,l),nn(e);break;case 27:$a(e.stateNode);case 26:case 5:$e(e,e.return),nn(e);break;case 22:e.memoizedState===null&&nn(e);break;case 30:nn(e);break;default:nn(e)}t=t.sibling}}function al(t,e,l){for(l=l&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var n=e.alternate,a=t,i=e,u=i.flags;switch(i.tag){case 0:case 11:case 15:al(a,i,l),bi(4,i);break;case 1:if(al(a,i,l),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(r){lt(n,n.return,r)}if(n=i,a=n.updateQueue,a!==null){var o=n.stateNode;try{var c=a.shared.hiddenCallbacks;if(c!==null)for(a.shared.hiddenCallbacks=null,a=0;a<c.length;a++)hd(c[a],o)}catch(r){lt(n,n.return,r)}}l&&u&64&&op(i),Qa(i,i.return);break;case 27:fp(i);case 26:case 5:al(a,i,l),l&&n===null&&u&4&&rp(i),Qa(i,i.return);break;case 12:al(a,i,l);break;case 31:al(a,i,l),l&&u&4&&hp(a,i);break;case 13:al(a,i,l),l&&u&4&&yp(a,i);break;case 22:i.memoizedState===null&&al(a,i,l),Qa(i,i.return);break;case 30:break;default:al(a,i,l)}e=e.sibling}}function Zr(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&hi(l))}function Kr(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&hi(t))}function Ue(t,e,l,n){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)vp(t,e,l,n),e=e.sibling}function vp(t,e,l,n){var a=e.flags;switch(e.tag){case 0:case 11:case 15:Ue(t,e,l,n),a&2048&&bi(9,e);break;case 1:Ue(t,e,l,n);break;case 3:Ue(t,e,l,n),a&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&hi(t)));break;case 12:if(a&2048){Ue(t,e,l,n),t=e.stateNode;try{var i=e.memoizedProps,u=i.id,o=i.onPostCommit;typeof o=="function"&&o(u,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(c){lt(e,e.return,c)}}else Ue(t,e,l,n);break;case 31:Ue(t,e,l,n);break;case 13:Ue(t,e,l,n);break;case 23:break;case 22:i=e.stateNode,u=e.alternate,e.memoizedState!==null?i._visibility&2?Ue(t,e,l,n):Va(t,e):i._visibility&2?Ue(t,e,l,n):(i._visibility|=2,jn(t,e,l,n,(e.subtreeFlags&10256)!==0||!1)),a&2048&&Zr(u,e);break;case 24:Ue(t,e,l,n),a&2048&&Kr(e.alternate,e);break;default:Ue(t,e,l,n)}}function jn(t,e,l,n,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var i=t,u=e,o=l,c=n,r=u.flags;switch(u.tag){case 0:case 11:case 15:jn(i,u,o,c,a),bi(8,u);break;case 23:break;case 22:var s=u.stateNode;u.memoizedState!==null?s._visibility&2?jn(i,u,o,c,a):Va(i,u):(s._visibility|=2,jn(i,u,o,c,a)),a&&r&2048&&Zr(u.alternate,u);break;case 24:jn(i,u,o,c,a),a&&r&2048&&Kr(u.alternate,u);break;default:jn(i,u,o,c,a)}e=e.sibling}}function Va(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,n=e,a=n.flags;switch(n.tag){case 22:Va(l,n),a&2048&&Zr(n.alternate,n);break;case 24:Va(l,n),a&2048&&Kr(n.alternate,n);break;default:Va(l,n)}e=e.sibling}}var _a=8192;function Rn(t,e,l){if(t.subtreeFlags&_a)for(t=t.child;t!==null;)Sp(t,e,l),t=t.sibling}function Sp(t,e,l){switch(t.tag){case 26:Rn(t,e,l),t.flags&_a&&t.memoizedState!==null&&xg(l,qe,t.memoizedState,t.memoizedProps);break;case 5:Rn(t,e,l);break;case 3:case 4:var n=qe;qe=Hu(t.stateNode.containerInfo),Rn(t,e,l),qe=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=_a,_a=16777216,Rn(t,e,l),_a=n):Rn(t,e,l));break;default:Rn(t,e,l)}}function Tp(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Ca(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Ht=n,Ap(n,t)}Tp(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)zp(t),t=t.sibling}function zp(t){switch(t.tag){case 0:case 11:case 15:Ca(t),t.flags&2048&&Kl(9,t,t.return);break;case 3:Ca(t);break;case 12:Ca(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,ou(t)):Ca(t);break;default:Ca(t)}}function ou(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Ht=n,Ap(n,t)}Tp(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Kl(8,e,e.return),ou(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,ou(e));break;default:ou(e)}t=t.sibling}}function Ap(t,e){for(;Ht!==null;){var l=Ht;switch(l.tag){case 0:case 11:case 15:Kl(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:hi(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Ht=n;else t:for(l=t;Ht!==null;){n=Ht;var a=n.sibling,i=n.return;if(dp(n),n===l){Ht=null;break t}if(a!==null){a.return=i,Ht=a;break t}Ht=i}}}var Yb={getCacheForType:function(t){var e=Lt(Ct),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return Lt(Ct).controller.signal}},Lb=typeof WeakMap=="function"?WeakMap:Map,I=0,ot=null,Z=null,J=0,et=0,me=null,wl=!1,pa=!1,$r=!1,bl=0,zt=0,$l=0,rn=0,Jr=0,he=0,ia=0,Za=null,ce=null,$c=!1,Pu=0,xp=0,Mu=1/0,Nu=null,kl=null,jt=0,Yl=null,ua=null,ml=0,Jc=0,Wc=null,Dp=null,Ka=0,Fc=null;function ve(){return(I&2)!==0&&J!==0?J&-J:L.T!==null?Fr():Gm()}function Ep(){if(he===0)if((J&536870912)===0||W){var t=_i;_i<<=1,(_i&3932160)===0&&(_i=262144),he=t}else he=536870912;return t=Te.current,t!==null&&(t.flags|=32),he}function re(t,e,l){(t===ot&&(et===2||et===9)||t.cancelPendingCommit!==null)&&(oa(t,0),Gl(t,J,he,!1)),mi(t,l),((I&2)===0||t!==ot)&&(t===ot&&((I&2)===0&&(rn|=l),zt===4&&Gl(t,J,he,!1)),Fe(t))}function Op(t,e,l){if((I&6)!==0)throw Error(A(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||fi(t,e),a=n?Vb(t,e):oc(t,e,!0),i=n;do{if(a===0){pa&&!n&&Gl(t,e,0,!1);break}else{if(l=t.current.alternate,i&&!Xb(l)){a=oc(t,e,!1),i=!1;continue}if(a===2){if(i=e,t.errorRecoveryDisabledLanes&i)var u=0;else u=t.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){e=u;t:{var o=t;a=Za;var c=o.current.memoizedState.isDehydrated;if(c&&(oa(o,u).flags|=256),u=oc(o,u,!1),u!==2){if($r&&!c){o.errorRecoveryDisabledLanes|=i,rn|=i,a=4;break t}i=ce,ce=a,i!==null&&(ce===null?ce=i:ce.push.apply(ce,i))}a=u}if(i=!1,a!==2)continue}}if(a===1){oa(t,0),Gl(t,e,0,!0);break}t:{switch(n=t,i=a,i){case 0:case 1:throw Error(A(345));case 4:if((e&4194048)!==e)break;case 6:Gl(n,e,he,!wl);break t;case 2:ce=null;break;case 3:case 5:break;default:throw Error(A(329))}if((e&62914560)===e&&(a=Pu+300-ye(),10<a)){if(Gl(n,e,he,!wl),Yu(n,0,!0)!==0)break t;ml=e,n.timeoutHandle=Kp(Vf.bind(null,n,l,ce,Nu,$c,e,he,rn,ia,wl,i,"Throttled",-0,0),a);break t}Vf(n,l,ce,Nu,$c,e,he,rn,ia,wl,i,null,-0,0)}}break}while(!0);Fe(t)}function Vf(t,e,l,n,a,i,u,o,c,r,s,m,f,d){if(t.timeoutHandle=-1,m=e.subtreeFlags,m&8192||(m&16785408)===16785408){m={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cl},Sp(e,i,m);var h=(i&62914560)===i?Pu-ye():(i&4194048)===i?xp-ye():0;if(h=Dg(m,h),h!==null){ml=i,t.cancelPendingCommit=h(Kf.bind(null,t,e,i,l,n,a,u,o,c,s,m,null,f,d)),Gl(t,i,u,!r);return}}Kf(t,e,i,l,n,a,u,o,c)}function Xb(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],i=a.getSnapshot;a=a.value;try{if(!Se(i(),a))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Gl(t,e,l,n){e&=~Jr,e&=~rn,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var a=e;0<a;){var i=31-ge(a),u=1<<i;n[i]=-1,a&=~u}l!==0&&Rm(t,l,e)}function Iu(){return(I&6)===0?(gi(0,!1),!1):!0}function Wr(){if(Z!==null){if(et===0)var t=Z.return;else t=Z,rl=vn=null,_r(t),Wn=null,ei=0,t=Z;for(;t!==null;)up(t.alternate,t),t=t.return;Z=null}}function oa(t,e){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,og(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),ml=0,Wr(),ot=t,Z=l=sl(t.current,null),J=e,et=0,me=null,wl=!1,pa=fi(t,e),$r=!1,ia=he=Jr=rn=$l=zt=0,ce=Za=null,$c=!1,(e&8)!==0&&(e|=e&32);var n=t.entangledLanes;if(n!==0)for(t=t.entanglements,n&=e;0<n;){var a=31-ge(n),i=1<<a;e|=t[a],n&=~i}return bl=e,Vu(),l}function Cp(t,e){Q=null,L.H=ni,e===da||e===Ku?(e=Af(),et=3):e===Cr?(e=Af(),et=4):et=e===Qr?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,me=e,Z===null&&(zt=1,Eu(t,Re(e,t.current)))}function Mp(){var t=Te.current;return t===null?!0:(J&4194048)===J?we===null:(J&62914560)===J||(J&536870912)!==0?t===we:!1}function Np(){var t=L.H;return L.H=ni,t===null?ni:t}function Rp(){var t=L.A;return L.A=Yb,t}function Ru(){zt=4,wl||(J&4194048)!==J&&Te.current!==null||(pa=!0),($l&134217727)===0&&(rn&134217727)===0||ot===null||Gl(ot,J,he,!1)}function oc(t,e,l){var n=I;I|=2;var a=Np(),i=Rp();(ot!==t||J!==e)&&(Nu=null,oa(t,e)),e=!1;var u=zt;t:do try{if(et!==0&&Z!==null){var o=Z,c=me;switch(et){case 8:Wr(),u=6;break t;case 3:case 2:case 9:case 6:Te.current===null&&(e=!0);var r=et;if(et=0,me=null,Vn(t,o,c,r),l&&pa){u=0;break t}break;default:r=et,et=0,me=null,Vn(t,o,c,r)}}Qb(),u=zt;break}catch(s){Cp(t,s)}while(!0);return e&&t.shellSuspendCounter++,rl=vn=null,I=n,L.H=a,L.A=i,Z===null&&(ot=null,J=0,Vu()),u}function Qb(){for(;Z!==null;)jp(Z)}function Vb(t,e){var l=I;I|=2;var n=Np(),a=Rp();ot!==t||J!==e?(Nu=null,Mu=ye()+500,oa(t,e)):pa=fi(t,e);t:do try{if(et!==0&&Z!==null){e=Z;var i=me;e:switch(et){case 1:et=0,me=null,Vn(t,e,i,1);break;case 2:case 9:if(zf(i)){et=0,me=null,Zf(e);break}e=function(){et!==2&&et!==9||ot!==t||(et=7),Fe(t)},i.then(e,e);break t;case 3:et=7;break t;case 4:et=5;break t;case 7:zf(i)?(et=0,me=null,Zf(e)):(et=0,me=null,Vn(t,e,i,7));break;case 5:var u=null;switch(Z.tag){case 26:u=Z.memoizedState;case 5:case 27:var o=Z;if(u?Pp(u):o.stateNode.complete){et=0,me=null;var c=o.sibling;if(c!==null)Z=c;else{var r=o.return;r!==null?(Z=r,to(r)):Z=null}break e}}et=0,me=null,Vn(t,e,i,5);break;case 6:et=0,me=null,Vn(t,e,i,6);break;case 8:Wr(),zt=6;break t;default:throw Error(A(462))}}Zb();break}catch(s){Cp(t,s)}while(!0);return rl=vn=null,L.H=n,L.A=a,I=l,Z!==null?0:(ot=null,J=0,Vu(),zt)}function Zb(){for(;Z!==null&&!hy();)jp(Z)}function jp(t){var e=ip(t.alternate,t,bl);t.memoizedProps=t.pendingProps,e===null?to(t):Z=e}function Zf(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=Bf(l,e,e.pendingProps,e.type,void 0,J);break;case 11:e=Bf(l,e,e.pendingProps,e.type.render,e.ref,J);break;case 5:_r(e);default:up(l,e),e=Z=ud(e,bl),e=ip(l,e,bl)}t.memoizedProps=t.pendingProps,e===null?to(t):Z=e}function Vn(t,e,l,n){rl=vn=null,_r(e),Wn=null,ei=0;var a=e.return;try{if(Gb(t,a,e,l,J)){zt=1,Eu(t,Re(l,t.current)),Z=null;return}}catch(i){if(a!==null)throw Z=a,i;zt=1,Eu(t,Re(l,t.current)),Z=null;return}e.flags&32768?(W||n===1?t=!0:pa||(J&536870912)!==0?t=!1:(wl=t=!0,(n===2||n===9||n===3||n===6)&&(n=Te.current,n!==null&&n.tag===13&&(n.flags|=16384))),wp(e,t)):to(e)}function to(t){var e=t;do{if((e.flags&32768)!==0){wp(e,wl);return}t=e.return;var l=Ub(e.alternate,e,bl);if(l!==null){Z=l;return}if(e=e.sibling,e!==null){Z=e;return}Z=e=t}while(e!==null);zt===0&&(zt=5)}function wp(t,e){do{var l=qb(t.alternate,t);if(l!==null){l.flags&=32767,Z=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){Z=t;return}Z=t=l}while(t!==null);zt=6,Z=null}function Kf(t,e,l,n,a,i,u,o,c){t.cancelPendingCommit=null;do eo();while(jt!==0);if((I&6)!==0)throw Error(A(327));if(e!==null){if(e===t.current)throw Error(A(177));if(i=e.lanes|e.childLanes,i|=Tr,Dy(t,l,i,u,o,c),t===ot&&(Z=ot=null,J=0),ua=e,Yl=t,ml=l,Jc=i,Wc=a,Dp=n,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Wb(hu,function(){return qp(),null})):(t.callbackNode=null,t.callbackPriority=0),n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=L.T,L.T=null,a=tt.p,tt.p=2,u=I,I|=4;try{Bb(t,e,l)}finally{I=u,tt.p=a,L.T=n}}jt=1,Gp(),_p(),Hp()}}function Gp(){if(jt===1){jt=0;var t=Yl,e=ua,l=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||l){l=L.T,L.T=null;var n=tt.p;tt.p=2;var a=I;I|=4;try{bp(e,t);var i=er,u=Pm(t.containerInfo),o=i.focusedElem,c=i.selectionRange;if(u!==o&&o&&o.ownerDocument&&Fm(o.ownerDocument.documentElement,o)){if(c!==null&&Sr(o)){var r=c.start,s=c.end;if(s===void 0&&(s=r),"selectionStart"in o)o.selectionStart=r,o.selectionEnd=Math.min(s,o.value.length);else{var m=o.ownerDocument||document,f=m&&m.defaultView||window;if(f.getSelection){var d=f.getSelection(),h=o.textContent.length,v=Math.min(c.start,h),T=c.end===void 0?v:Math.min(c.end,h);!d.extend&&v>T&&(u=T,T=v,v=u);var y=hf(o,v),p=hf(o,T);if(y&&p&&(d.rangeCount!==1||d.anchorNode!==y.node||d.anchorOffset!==y.offset||d.focusNode!==p.node||d.focusOffset!==p.offset)){var b=m.createRange();b.setStart(y.node,y.offset),d.removeAllRanges(),v>T?(d.addRange(b),d.extend(p.node,p.offset)):(b.setEnd(p.node,p.offset),d.addRange(b))}}}}for(m=[],d=o;d=d.parentNode;)d.nodeType===1&&m.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<m.length;o++){var S=m[o];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}Bu=!!tr,er=tr=null}finally{I=a,tt.p=n,L.T=l}}t.current=e,jt=2}}function _p(){if(jt===2){jt=0;var t=Yl,e=ua,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=L.T,L.T=null;var n=tt.p;tt.p=2;var a=I;I|=4;try{mp(t,e.alternate,e)}finally{I=a,tt.p=n,L.T=l}}jt=3}}function Hp(){if(jt===4||jt===3){jt=0,yy();var t=Yl,e=ua,l=ml,n=Dp;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?jt=5:(jt=0,ua=Yl=null,Up(t,t.pendingLanes));var a=t.pendingLanes;if(a===0&&(kl=null),dr(l),e=e.stateNode,be&&typeof be.onCommitFiberRoot=="function")try{be.onCommitFiberRoot(si,e,void 0,(e.current.flags&128)===128)}catch{}if(n!==null){e=L.T,a=tt.p,tt.p=2,L.T=null;try{for(var i=t.onRecoverableError,u=0;u<n.length;u++){var o=n[u];i(o.value,{componentStack:o.stack})}}finally{L.T=e,tt.p=a}}(ml&3)!==0&&eo(),Fe(t),a=t.pendingLanes,(l&261930)!==0&&(a&42)!==0?t===Fc?Ka++:(Ka=0,Fc=t):Ka=0,gi(0,!1)}}function Up(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,hi(e)))}function eo(){return Gp(),_p(),Hp(),qp()}function qp(){if(jt!==5)return!1;var t=Yl,e=Jc;Jc=0;var l=dr(ml),n=L.T,a=tt.p;try{tt.p=32>l?32:l,L.T=null,l=Wc,Wc=null;var i=Yl,u=ml;if(jt=0,ua=Yl=null,ml=0,(I&6)!==0)throw Error(A(331));var o=I;if(I|=4,zp(i.current),vp(i,i.current,u,l),I=o,gi(0,!1),be&&typeof be.onPostCommitFiberRoot=="function")try{be.onPostCommitFiberRoot(si,i)}catch{}return!0}finally{tt.p=a,L.T=n,Up(t,e)}}function $f(t,e,l){e=Re(l,e),e=Qc(t.stateNode,e,2),t=Bl(t,e,2),t!==null&&(mi(t,2),Fe(t))}function lt(t,e,l){if(t.tag===3)$f(t,t,l);else for(;e!==null;){if(e.tag===3){$f(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(kl===null||!kl.has(n))){t=Re(l,t),l=Id(2),n=Bl(e,l,2),n!==null&&(tp(l,n,e,t),mi(n,2),Fe(n));break}}e=e.return}}function cc(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new Lb;var a=new Set;n.set(e,a)}else a=n.get(e),a===void 0&&(a=new Set,n.set(e,a));a.has(l)||($r=!0,a.add(l),t=Kb.bind(null,t,e,l),e.then(t,t))}function Kb(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,ot===t&&(J&l)===l&&(zt===4||zt===3&&(J&62914560)===J&&300>ye()-Pu?(I&2)===0&&oa(t,0):Jr|=l,ia===J&&(ia=0)),Fe(t)}function Bp(t,e){e===0&&(e=Nm()),t=gn(t,e),t!==null&&(mi(t,e),Fe(t))}function $b(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Bp(t,l)}function Jb(t,e){var l=0;switch(t.tag){case 31:case 13:var n=t.stateNode,a=t.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(A(314))}n!==null&&n.delete(e),Bp(t,l)}function Wb(t,e){return fr(t,e)}var ju=null,wn=null,Pc=!1,wu=!1,rc=!1,_l=0;function Fe(t){t!==wn&&t.next===null&&(wn===null?ju=wn=t:wn=wn.next=t),wu=!0,Pc||(Pc=!0,Pb())}function gi(t,e){if(!rc&&wu){rc=!0;do for(var l=!1,n=ju;n!==null;){if(!e)if(t!==0){var a=n.pendingLanes;if(a===0)var i=0;else{var u=n.suspendedLanes,o=n.pingedLanes;i=(1<<31-ge(42|t)+1)-1,i&=a&~(u&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Jf(n,i))}else i=J,i=Yu(n,n===ot?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||fi(n,i)||(l=!0,Jf(n,i));n=n.next}while(l);rc=!1}}function Fb(){kp()}function kp(){wu=Pc=!1;var t=0;_l!==0&&ug()&&(t=_l);for(var e=ye(),l=null,n=ju;n!==null;){var a=n.next,i=Yp(n,e);i===0?(n.next=null,l===null?ju=a:l.next=a,a===null&&(wn=l)):(l=n,(t!==0||(i&3)!==0)&&(wu=!0)),n=a}jt!==0&&jt!==5||gi(t,!1),_l!==0&&(_l=0)}function Yp(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,a=t.expirationTimes,i=t.pendingLanes&-62914561;0<i;){var u=31-ge(i),o=1<<u,c=a[u];c===-1?((o&l)===0||(o&n)!==0)&&(a[u]=xy(o,e)):c<=e&&(t.expiredLanes|=o),i&=~o}if(e=ot,l=J,l=Yu(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(et===2||et===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&qo(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||fi(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&qo(n),dr(l)){case 2:case 8:l=Cm;break;case 32:l=hu;break;case 268435456:l=Mm;break;default:l=hu}return n=Lp.bind(null,t),l=fr(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&qo(n),t.callbackPriority=2,t.callbackNode=null,2}function Lp(t,e){if(jt!==0&&jt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(eo()&&t.callbackNode!==l)return null;var n=J;return n=Yu(t,t===ot?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(Op(t,n,e),Yp(t,ye()),t.callbackNode!=null&&t.callbackNode===l?Lp.bind(null,t):null)}function Jf(t,e){if(eo())return null;Op(t,e,!0)}function Pb(){cg(function(){(I&6)!==0?fr(Om,Fb):kp()})}function Fr(){if(_l===0){var t=la;t===0&&(t=Gi,Gi<<=1,(Gi&261888)===0&&(Gi=256)),_l=t}return _l}function Wf(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Pi(""+t)}function Ff(t,e){var l=e.ownerDocument.createElement("input");return l.name=e.name,l.value=e.value,t.id&&l.setAttribute("form",t.id),e.parentNode.insertBefore(l,e),t=new FormData(t),l.parentNode.removeChild(l),t}function Ib(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var i=Wf((a[se]||null).action),u=n.submitter;u&&(e=(e=u[se]||null)?Wf(e.formAction):u.getAttribute("formAction"),e!==null&&(i=e,u=null));var o=new Lu("action","action",null,n,a);t.push({event:o,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(_l!==0){var c=u?Ff(a,u):new FormData(a);Lc(l,{pending:!0,data:c,method:a.method,action:i},null,c)}}else typeof i=="function"&&(o.preventDefault(),c=u?Ff(a,u):new FormData(a),Lc(l,{pending:!0,data:c,method:a.method,action:i},i,c))},currentTarget:a}]})}}for(Zi=0;Zi<Nc.length;Zi++)Ki=Nc[Zi],Pf=Ki.toLowerCase(),If=Ki[0].toUpperCase()+Ki.slice(1),Be(Pf,"on"+If);var Ki,Pf,If,Zi;Be(td,"onAnimationEnd");Be(ed,"onAnimationIteration");Be(ld,"onAnimationStart");Be("dblclick","onDoubleClick");Be("focusin","onFocus");Be("focusout","onBlur");Be(bb,"onTransitionRun");Be(gb,"onTransitionStart");Be(vb,"onTransitionCancel");Be(nd,"onTransitionEnd");ta("onMouseEnter",["mouseout","mouseover"]);ta("onMouseLeave",["mouseout","mouseover"]);ta("onPointerEnter",["pointerout","pointerover"]);ta("onPointerLeave",["pointerout","pointerover"]);hn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hn("onBeforeInput",["compositionend","keypress","textInput","paste"]);hn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ai="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(" "),tg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ai));function Xp(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var n=t[l],a=n.event;n=n.listeners;t:{var i=void 0;if(e)for(var u=n.length-1;0<=u;u--){var o=n[u],c=o.instance,r=o.currentTarget;if(o=o.listener,c!==i&&a.isPropagationStopped())break t;i=o,a.currentTarget=r;try{i(a)}catch(s){bu(s)}a.currentTarget=null,i=c}else for(u=0;u<n.length;u++){if(o=n[u],c=o.instance,r=o.currentTarget,o=o.listener,c!==i&&a.isPropagationStopped())break t;i=o,a.currentTarget=r;try{i(a)}catch(s){bu(s)}a.currentTarget=null,i=c}}}}function V(t,e){var l=e[zc];l===void 0&&(l=e[zc]=new Set);var n=t+"__bubble";l.has(n)||(Qp(e,t,2,!1),l.add(n))}function sc(t,e,l){var n=0;e&&(n|=4),Qp(l,t,n,e)}var $i="_reactListening"+Math.random().toString(36).slice(2);function Pr(t){if(!t[$i]){t[$i]=!0,_m.forEach(function(l){l!=="selectionchange"&&(tg.has(l)||sc(l,!1,t),sc(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[$i]||(e[$i]=!0,sc("selectionchange",!1,e))}}function Qp(t,e,l,n){switch(nh(e)){case 2:var a=Cg;break;case 8:a=Mg;break;default:a=ls}l=a.bind(null,e,l,t),a=void 0,!Oc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),n?a!==void 0?t.addEventListener(e,l,{capture:!0,passive:a}):t.addEventListener(e,l,!0):a!==void 0?t.addEventListener(e,l,{passive:a}):t.addEventListener(e,l,!1)}function fc(t,e,l,n,a){var i=n;if((e&1)===0&&(e&2)===0&&n!==null)t:for(;;){if(n===null)return;var u=n.tag;if(u===3||u===4){var o=n.stateNode.containerInfo;if(o===a)break;if(u===4)for(u=n.return;u!==null;){var c=u.tag;if((c===3||c===4)&&u.stateNode.containerInfo===a)return;u=u.return}for(;o!==null;){if(u=Hn(o),u===null)return;if(c=u.tag,c===5||c===6||c===26||c===27){n=i=u;continue t}o=o.parentNode}}n=n.return}Xm(function(){var r=i,s=yr(l),m=[];t:{var f=ad.get(t);if(f!==void 0){var d=Lu,h=t;switch(t){case"keypress":if(tu(l)===0)break t;case"keydown":case"keyup":d=Jy;break;case"focusin":h="focus",d=Xo;break;case"focusout":h="blur",d=Xo;break;case"beforeblur":case"afterblur":d=Xo;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=uf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=Uy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Py;break;case td:case ed:case ld:d=ky;break;case nd:d=tb;break;case"scroll":case"scrollend":d=_y;break;case"wheel":d=lb;break;case"copy":case"cut":case"paste":d=Ly;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=cf;break;case"toggle":case"beforetoggle":d=ab}var v=(e&4)!==0,T=!v&&(t==="scroll"||t==="scrollend"),y=v?f!==null?f+"Capture":null:f;v=[];for(var p=r,b;p!==null;){var S=p;if(b=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||b===null||y===null||(S=Wa(p,y),S!=null&&v.push(ii(p,S,b))),T)break;p=p.return}0<v.length&&(f=new d(f,h,null,l,s),m.push({event:f,listeners:v}))}}if((e&7)===0){t:{if(f=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",f&&l!==Ec&&(h=l.relatedTarget||l.fromElement)&&(Hn(h)||h[sa]))break t;if((d||f)&&(f=s.window===s?s:(f=s.ownerDocument)?f.defaultView||f.parentWindow:window,d?(h=l.relatedTarget||l.toElement,d=r,h=h?Hn(h):null,h!==null&&(T=ri(h),v=h.tag,h!==T||v!==5&&v!==27&&v!==6)&&(h=null)):(d=null,h=r),d!==h)){if(v=uf,S="onMouseLeave",y="onMouseEnter",p="mouse",(t==="pointerout"||t==="pointerover")&&(v=cf,S="onPointerLeave",y="onPointerEnter",p="pointer"),T=d==null?f:wa(d),b=h==null?f:wa(h),f=new v(S,p+"leave",d,l,s),f.target=T,f.relatedTarget=b,S=null,Hn(s)===r&&(v=new v(y,p+"enter",h,l,s),v.target=b,v.relatedTarget=T,S=v),T=S,d&&h)e:{for(v=eg,y=d,p=h,b=0,S=y;S;S=v(S))b++;S=0;for(var D=p;D;D=v(D))S++;for(;0<b-S;)y=v(y),b--;for(;0<S-b;)p=v(p),S--;for(;b--;){if(y===p||p!==null&&y===p.alternate){v=y;break e}y=v(y),p=v(p)}v=null}else v=null;d!==null&&tm(m,f,d,v,!1),h!==null&&T!==null&&tm(m,T,h,v,!0)}}t:{if(f=r?wa(r):window,d=f.nodeName&&f.nodeName.toLowerCase(),d==="select"||d==="input"&&f.type==="file")var w=mf;else if(ff(f))if(Jm)w=pb;else{w=mb;var x=fb}else d=f.nodeName,!d||d.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?r&&hr(r.elementType)&&(w=mf):w=db;if(w&&(w=w(t,r))){$m(m,w,l,s);break t}x&&x(t,f,r),t==="focusout"&&r&&f.type==="number"&&r.memoizedProps.value!=null&&Dc(f,"number",f.value)}switch(x=r?wa(r):window,t){case"focusin":(ff(x)||x.contentEditable==="true")&&(Bn=x,Cc=r,qa=null);break;case"focusout":qa=Cc=Bn=null;break;case"mousedown":Mc=!0;break;case"contextmenu":case"mouseup":case"dragend":Mc=!1,yf(m,l,s);break;case"selectionchange":if(yb)break;case"keydown":case"keyup":yf(m,l,s)}var N;if(vr)t:{switch(t){case"compositionstart":var C="onCompositionStart";break t;case"compositionend":C="onCompositionEnd";break t;case"compositionupdate":C="onCompositionUpdate";break t}C=void 0}else qn?Zm(t,l)&&(C="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(C="onCompositionStart");C&&(Vm&&l.locale!=="ko"&&(qn||C!=="onCompositionStart"?C==="onCompositionEnd"&&qn&&(N=Qm()):(jl=s,br="value"in jl?jl.value:jl.textContent,qn=!0)),x=Gu(r,C),0<x.length&&(C=new of(C,t,null,l,s),m.push({event:C,listeners:x}),N?C.data=N:(N=Km(l),N!==null&&(C.data=N)))),(N=ub?ob(t,l):cb(t,l))&&(C=Gu(r,"onBeforeInput"),0<C.length&&(x=new of("onBeforeInput","beforeinput",null,l,s),m.push({event:x,listeners:C}),x.data=N)),Ib(m,t,r,l,s)}Xp(m,e)})}function ii(t,e,l){return{instance:t,listener:e,currentTarget:l}}function Gu(t,e){for(var l=e+"Capture",n=[];t!==null;){var a=t,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Wa(t,l),a!=null&&n.unshift(ii(t,a,i)),a=Wa(t,e),a!=null&&n.push(ii(t,a,i))),t.tag===3)return n;t=t.return}return[]}function eg(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function tm(t,e,l,n,a){for(var i=e._reactName,u=[];l!==null&&l!==n;){var o=l,c=o.alternate,r=o.stateNode;if(o=o.tag,c!==null&&c===n)break;o!==5&&o!==26&&o!==27||r===null||(c=r,a?(r=Wa(l,i),r!=null&&u.unshift(ii(l,r,c))):a||(r=Wa(l,i),r!=null&&u.push(ii(l,r,c)))),l=l.return}u.length!==0&&t.push({event:e,listeners:u})}var lg=/\r\n?/g,ng=/\u0000|\uFFFD/g;function em(t){return(typeof t=="string"?t:""+t).replace(lg,`
`).replace(ng,"")}function Vp(t,e){return e=em(e),em(t)===e}function it(t,e,l,n,a,i){switch(l){case"children":typeof n=="string"?e==="body"||e==="textarea"&&n===""||ea(t,n):(typeof n=="number"||typeof n=="bigint")&&e!=="body"&&ea(t,""+n);break;case"className":Ui(t,"class",n);break;case"tabIndex":Ui(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ui(t,l,n);break;case"style":Lm(t,n,i);break;case"data":if(e!=="object"){Ui(t,"data",n);break}case"src":case"href":if(n===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Pi(""+n),t.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(e!=="input"&&it(t,e,"name",a.name,a,null),it(t,e,"formEncType",a.formEncType,a,null),it(t,e,"formMethod",a.formMethod,a,null),it(t,e,"formTarget",a.formTarget,a,null)):(it(t,e,"encType",a.encType,a,null),it(t,e,"method",a.method,a,null),it(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Pi(""+n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=cl);break;case"onScroll":n!=null&&V("scroll",t);break;case"onScrollEnd":n!=null&&V("scrollend",t);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(A(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(A(60));t.innerHTML=l}}break;case"multiple":t.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":t.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){t.removeAttribute("xlink:href");break}l=Pi(""+n),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""+n):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":n===!0?t.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?t.setAttribute(l,n):t.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?t.removeAttribute(l):t.setAttribute(l,n);break;case"popover":V("beforetoggle",t),V("toggle",t),Fi(t,"popover",n);break;case"xlinkActuate":tl(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":tl(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":tl(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":tl(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":tl(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":tl(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":tl(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":tl(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":tl(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Fi(t,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=wy.get(l)||l,Fi(t,l,n))}}function Ic(t,e,l,n,a,i){switch(l){case"style":Lm(t,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(A(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(A(60));t.innerHTML=l}}break;case"children":typeof n=="string"?ea(t,n):(typeof n=="number"||typeof n=="bigint")&&ea(t,""+n);break;case"onScroll":n!=null&&V("scroll",t);break;case"onScrollEnd":n!=null&&V("scrollend",t);break;case"onClick":n!=null&&(t.onclick=cl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hm.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),e=l.slice(2,a?l.length-7:void 0),i=t[se]||null,i=i!=null?i[l]:null,typeof i=="function"&&t.removeEventListener(e,i,a),typeof n=="function")){typeof i!="function"&&i!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(e,n,a);break t}l in t?t[l]=n:n===!0?t.setAttribute(l,""):Fi(t,l,n)}}}function Xt(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":V("error",t),V("load",t);var n=!1,a=!1,i;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];if(u!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(A(137,e));default:it(t,e,i,u,l,null)}}a&&it(t,e,"srcSet",l.srcSet,l,null),n&&it(t,e,"src",l.src,l,null);return;case"input":V("invalid",t);var o=i=u=a=null,c=null,r=null;for(n in l)if(l.hasOwnProperty(n)){var s=l[n];if(s!=null)switch(n){case"name":a=s;break;case"type":u=s;break;case"checked":c=s;break;case"defaultChecked":r=s;break;case"value":i=s;break;case"defaultValue":o=s;break;case"children":case"dangerouslySetInnerHTML":if(s!=null)throw Error(A(137,e));break;default:it(t,e,n,s,l,null)}}Bm(t,i,o,c,r,u,a,!1);return;case"select":V("invalid",t),n=u=i=null;for(a in l)if(l.hasOwnProperty(a)&&(o=l[a],o!=null))switch(a){case"value":i=o;break;case"defaultValue":u=o;break;case"multiple":n=o;default:it(t,e,a,o,l,null)}e=i,l=u,t.multiple=!!n,e!=null?Kn(t,!!n,e,!1):l!=null&&Kn(t,!!n,l,!0);return;case"textarea":V("invalid",t),i=a=n=null;for(u in l)if(l.hasOwnProperty(u)&&(o=l[u],o!=null))switch(u){case"value":n=o;break;case"defaultValue":a=o;break;case"children":i=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(A(91));break;default:it(t,e,u,o,l,null)}Ym(t,n,a,i);return;case"option":for(c in l)l.hasOwnProperty(c)&&(n=l[c],n!=null)&&(c==="selected"?t.selected=n&&typeof n!="function"&&typeof n!="symbol":it(t,e,c,n,l,null));return;case"dialog":V("beforetoggle",t),V("toggle",t),V("cancel",t),V("close",t);break;case"iframe":case"object":V("load",t);break;case"video":case"audio":for(n=0;n<ai.length;n++)V(ai[n],t);break;case"image":V("error",t),V("load",t);break;case"details":V("toggle",t);break;case"embed":case"source":case"link":V("error",t),V("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(r in l)if(l.hasOwnProperty(r)&&(n=l[r],n!=null))switch(r){case"children":case"dangerouslySetInnerHTML":throw Error(A(137,e));default:it(t,e,r,n,l,null)}return;default:if(hr(e)){for(s in l)l.hasOwnProperty(s)&&(n=l[s],n!==void 0&&Ic(t,e,s,n,l,void 0));return}}for(o in l)l.hasOwnProperty(o)&&(n=l[o],n!=null&&it(t,e,o,n,l,null))}function ag(t,e,l,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,u=null,o=null,c=null,r=null,s=null;for(d in l){var m=l[d];if(l.hasOwnProperty(d)&&m!=null)switch(d){case"checked":break;case"value":break;case"defaultValue":c=m;default:n.hasOwnProperty(d)||it(t,e,d,null,n,m)}}for(var f in n){var d=n[f];if(m=l[f],n.hasOwnProperty(f)&&(d!=null||m!=null))switch(f){case"type":i=d;break;case"name":a=d;break;case"checked":r=d;break;case"defaultChecked":s=d;break;case"value":u=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(A(137,e));break;default:d!==m&&it(t,e,f,d,n,m)}}xc(t,u,o,c,r,s,i,a);return;case"select":d=u=o=f=null;for(i in l)if(c=l[i],l.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":d=c;default:n.hasOwnProperty(i)||it(t,e,i,null,n,c)}for(a in n)if(i=n[a],c=l[a],n.hasOwnProperty(a)&&(i!=null||c!=null))switch(a){case"value":f=i;break;case"defaultValue":o=i;break;case"multiple":u=i;default:i!==c&&it(t,e,a,i,n,c)}e=o,l=u,n=d,f!=null?Kn(t,!!l,f,!1):!!n!=!!l&&(e!=null?Kn(t,!!l,e,!0):Kn(t,!!l,l?[]:"",!1));return;case"textarea":d=f=null;for(o in l)if(a=l[o],l.hasOwnProperty(o)&&a!=null&&!n.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:it(t,e,o,null,n,a)}for(u in n)if(a=n[u],i=l[u],n.hasOwnProperty(u)&&(a!=null||i!=null))switch(u){case"value":f=a;break;case"defaultValue":d=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(A(91));break;default:a!==i&&it(t,e,u,a,n,i)}km(t,f,d);return;case"option":for(var h in l)f=l[h],l.hasOwnProperty(h)&&f!=null&&!n.hasOwnProperty(h)&&(h==="selected"?t.selected=!1:it(t,e,h,null,n,f));for(c in n)f=n[c],d=l[c],n.hasOwnProperty(c)&&f!==d&&(f!=null||d!=null)&&(c==="selected"?t.selected=f&&typeof f!="function"&&typeof f!="symbol":it(t,e,c,f,n,d));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in l)f=l[v],l.hasOwnProperty(v)&&f!=null&&!n.hasOwnProperty(v)&&it(t,e,v,null,n,f);for(r in n)if(f=n[r],d=l[r],n.hasOwnProperty(r)&&f!==d&&(f!=null||d!=null))switch(r){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(A(137,e));break;default:it(t,e,r,f,n,d)}return;default:if(hr(e)){for(var T in l)f=l[T],l.hasOwnProperty(T)&&f!==void 0&&!n.hasOwnProperty(T)&&Ic(t,e,T,void 0,n,f);for(s in n)f=n[s],d=l[s],!n.hasOwnProperty(s)||f===d||f===void 0&&d===void 0||Ic(t,e,s,f,n,d);return}}for(var y in l)f=l[y],l.hasOwnProperty(y)&&f!=null&&!n.hasOwnProperty(y)&&it(t,e,y,null,n,f);for(m in n)f=n[m],d=l[m],!n.hasOwnProperty(m)||f===d||f==null&&d==null||it(t,e,m,f,n,d)}function lm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ig(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],i=a.transferSize,u=a.initiatorType,o=a.duration;if(i&&o&&lm(u)){for(u=0,o=a.responseEnd,n+=1;n<l.length;n++){var c=l[n],r=c.startTime;if(r>o)break;var s=c.transferSize,m=c.initiatorType;s&&lm(m)&&(c=c.responseEnd,u+=s*(c<o?1:(o-r)/(c-r)))}if(--n,e+=8*(i+u)/(a.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var tr=null,er=null;function _u(t){return t.nodeType===9?t:t.ownerDocument}function nm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zp(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function lr(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var mc=null;function ug(){var t=window.event;return t&&t.type==="popstate"?t===mc?!1:(mc=t,!0):(mc=null,!1)}var Kp=typeof setTimeout=="function"?setTimeout:void 0,og=typeof clearTimeout=="function"?clearTimeout:void 0,am=typeof Promise=="function"?Promise:void 0,cg=typeof queueMicrotask=="function"?queueMicrotask:typeof am<"u"?function(t){return am.resolve(null).then(t).catch(rg)}:Kp;function rg(t){setTimeout(function(){throw t})}function Wl(t){return t==="head"}function im(t,e){var l=e,n=0;do{var a=l.nextSibling;if(t.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){t.removeChild(a),ra(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")$a(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,$a(l);for(var i=l.firstChild;i;){var u=i.nextSibling,o=i.nodeName;i[di]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&$a(t.ownerDocument.body);l=a}while(l);ra(e)}function um(t,e){var l=t;t=0;do{var n=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=n}while(l)}function nr(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":nr(l),pr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function sg(t,e,l,n){for(;t.nodeType===1;){var a=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(n){if(!t[di])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=Ge(t.nextSibling),t===null)break}return null}function fg(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Ge(t.nextSibling),t===null))return null;return t}function $p(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Ge(t.nextSibling),t===null))return null;return t}function ar(t){return t.data==="$?"||t.data==="$~"}function ir(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function mg(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var n=function(){e(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),t._reactRetry=n}}function Ge(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var ur=null;function om(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Ge(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function cm(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function Jp(t,e,l){switch(e=_u(l),t){case"html":if(t=e.documentElement,!t)throw Error(A(452));return t;case"head":if(t=e.head,!t)throw Error(A(453));return t;case"body":if(t=e.body,!t)throw Error(A(454));return t;default:throw Error(A(451))}}function $a(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);pr(t)}var _e=new Map,rm=new Set;function Hu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var gl=tt.d;tt.d={f:dg,r:pg,D:hg,C:yg,L:bg,m:gg,X:Sg,S:vg,M:Tg};function dg(){var t=gl.f(),e=Iu();return t||e}function pg(t){var e=fa(t);e!==null&&e.tag===5&&e.type==="form"?Ld(e):gl.r(t)}var ha=typeof document>"u"?null:document;function Wp(t,e,l){var n=ha;if(n&&typeof e=="string"&&e){var a=Ne(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),rm.has(a)||(rm.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),Xt(e,"link",t),Ut(e),n.head.appendChild(e)))}}function hg(t){gl.D(t),Wp("dns-prefetch",t,null)}function yg(t,e){gl.C(t,e),Wp("preconnect",t,e)}function bg(t,e,l){gl.L(t,e,l);var n=ha;if(n&&t&&e){var a='link[rel="preload"][as="'+Ne(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Ne(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Ne(l.imageSizes)+'"]')):a+='[href="'+Ne(t)+'"]';var i=a;switch(e){case"style":i=ca(t);break;case"script":i=ya(t)}_e.has(i)||(t=pt({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),_e.set(i,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(vi(i))||e==="script"&&n.querySelector(Si(i))||(e=n.createElement("link"),Xt(e,"link",t),Ut(e),n.head.appendChild(e)))}}function gg(t,e){gl.m(t,e);var l=ha;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+Ne(n)+'"][href="'+Ne(t)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ya(t)}if(!_e.has(i)&&(t=pt({rel:"modulepreload",href:t},e),_e.set(i,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Si(i)))return}n=l.createElement("link"),Xt(n,"link",t),Ut(n),l.head.appendChild(n)}}}function vg(t,e,l){gl.S(t,e,l);var n=ha;if(n&&t){var a=Zn(n).hoistableStyles,i=ca(t);e=e||"default";var u=a.get(i);if(!u){var o={loading:0,preload:null};if(u=n.querySelector(vi(i)))o.loading=5;else{t=pt({rel:"stylesheet",href:t,"data-precedence":e},l),(l=_e.get(i))&&Ir(t,l);var c=u=n.createElement("link");Ut(c),Xt(c,"link",t),c._p=new Promise(function(r,s){c.onload=r,c.onerror=s}),c.addEventListener("load",function(){o.loading|=1}),c.addEventListener("error",function(){o.loading|=2}),o.loading|=4,cu(u,e,n)}u={type:"stylesheet",instance:u,count:1,state:o},a.set(i,u)}}}function Sg(t,e){gl.X(t,e);var l=ha;if(l&&t){var n=Zn(l).hoistableScripts,a=ya(t),i=n.get(a);i||(i=l.querySelector(Si(a)),i||(t=pt({src:t,async:!0},e),(e=_e.get(a))&&ts(t,e),i=l.createElement("script"),Ut(i),Xt(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function Tg(t,e){gl.M(t,e);var l=ha;if(l&&t){var n=Zn(l).hoistableScripts,a=ya(t),i=n.get(a);i||(i=l.querySelector(Si(a)),i||(t=pt({src:t,async:!0,type:"module"},e),(e=_e.get(a))&&ts(t,e),i=l.createElement("script"),Ut(i),Xt(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function sm(t,e,l,n){var a=(a=Hl.current)?Hu(a):null;if(!a)throw Error(A(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=ca(l.href),l=Zn(a).hoistableStyles,n=l.get(e),n||(n={type:"style",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=ca(l.href);var i=Zn(a).hoistableStyles,u=i.get(t);if(u||(a=a.ownerDocument||a,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,u),(i=a.querySelector(vi(t)))&&!i._p&&(u.instance=i,u.state.loading=5),_e.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},_e.set(t,l),i||zg(a,t,l,u.state))),e&&n===null)throw Error(A(528,""));return u}if(e&&n!==null)throw Error(A(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=ya(l),l=Zn(a).hoistableScripts,n=l.get(e),n||(n={type:"script",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(A(444,t))}}function ca(t){return'href="'+Ne(t)+'"'}function vi(t){return'link[rel="stylesheet"]['+t+"]"}function Fp(t){return pt({},t,{"data-precedence":t.precedence,precedence:null})}function zg(t,e,l,n){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=t.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),Xt(e,"link",l),Ut(e),t.head.appendChild(e))}function ya(t){return'[src="'+Ne(t)+'"]'}function Si(t){return"script[async]"+t}function fm(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+Ne(l.href)+'"]');if(n)return e.instance=n,Ut(n),n;var a=pt({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),Ut(n),Xt(n,"style",a),cu(n,l.precedence,t),e.instance=n;case"stylesheet":a=ca(l.href);var i=t.querySelector(vi(a));if(i)return e.state.loading|=4,e.instance=i,Ut(i),i;n=Fp(l),(a=_e.get(a))&&Ir(n,a),i=(t.ownerDocument||t).createElement("link"),Ut(i);var u=i;return u._p=new Promise(function(o,c){u.onload=o,u.onerror=c}),Xt(i,"link",n),e.state.loading|=4,cu(i,l.precedence,t),e.instance=i;case"script":return i=ya(l.src),(a=t.querySelector(Si(i)))?(e.instance=a,Ut(a),a):(n=l,(a=_e.get(i))&&(n=pt({},l),ts(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),Ut(a),Xt(a,"link",n),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(A(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,cu(n,l.precedence,t));return e.instance}function cu(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,u=0;u<n.length;u++){var o=n[u];if(o.dataset.precedence===e)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function Ir(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function ts(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var ru=null;function mm(t,e,l){if(ru===null){var n=new Map,a=ru=new Map;a.set(l,n)}else a=ru,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(t))return n;for(n.set(t,null),l=l.getElementsByTagName(t),a=0;a<l.length;a++){var i=l[a];if(!(i[di]||i[kt]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(e)||"";u=t+u;var o=n.get(u);o?o.push(i):n.set(u,[i])}}return n}function dm(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function Ag(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Pp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function xg(t,e,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=ca(n.href),i=e.querySelector(vi(a));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Uu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=i,Ut(i);return}i=e.ownerDocument||e,n=Fp(n),(a=_e.get(a))&&Ir(n,a),i=i.createElement("link"),Ut(i);var u=i;u._p=new Promise(function(o,c){u.onload=o,u.onerror=c}),Xt(i,"link",n),l.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Uu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var dc=0;function Dg(t,e){return t.stylesheets&&t.count===0&&su(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&su(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&dc===0&&(dc=62500*ig());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&su(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>dc?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Uu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)su(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var qu=null;function su(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,qu=new Map,e.forEach(Eg,t),qu=null,Uu.call(t))}function Eg(t,e){if(!(e.state.loading&4)){var l=qu.get(t);if(l)var n=l.get(null);else{l=new Map,qu.set(t,l);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var u=a[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),n=u)}n&&l.set(null,n)}a=e.instance,u=a.getAttribute("data-precedence"),i=l.get(u)||n,i===n&&l.set(null,a),l.set(u,a),this.count++,n=Uu.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var ui={$$typeof:ol,Provider:null,Consumer:null,_currentValue:an,_currentValue2:an,_threadCount:0};function Og(t,e,l,n,a,i,u,o,c){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Bo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bo(0),this.hiddenUpdates=Bo(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function Ip(t,e,l,n,a,i,u,o,c,r,s,m){return t=new Og(t,e,l,u,c,r,s,m,o),e=1,i===!0&&(e|=24),i=pe(3,null,null,e),t.current=i,i.stateNode=t,e=Er(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:n,isDehydrated:l,cache:e},Mr(i),t}function th(t){return t?(t=Ln,t):Ln}function eh(t,e,l,n,a,i){a=th(a),n.context===null?n.context=a:n.pendingContext=a,n=ql(e),n.payload={element:l},i=i===void 0?null:i,i!==null&&(n.callback=i),l=Bl(t,n,e),l!==null&&(re(l,t,e),ka(l,t,e))}function pm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function es(t,e){pm(t,e),(t=t.alternate)&&pm(t,e)}function lh(t){if(t.tag===13||t.tag===31){var e=gn(t,67108864);e!==null&&re(e,t,67108864),es(t,67108864)}}function hm(t){if(t.tag===13||t.tag===31){var e=ve();e=mr(e);var l=gn(t,e);l!==null&&re(l,t,e),es(t,e)}}var Bu=!0;function Cg(t,e,l,n){var a=L.T;L.T=null;var i=tt.p;try{tt.p=2,ls(t,e,l,n)}finally{tt.p=i,L.T=a}}function Mg(t,e,l,n){var a=L.T;L.T=null;var i=tt.p;try{tt.p=8,ls(t,e,l,n)}finally{tt.p=i,L.T=a}}function ls(t,e,l,n){if(Bu){var a=or(n);if(a===null)fc(t,e,n,ku,l),ym(t,n);else if(Rg(a,t,e,l,n))n.stopPropagation();else if(ym(t,n),e&4&&-1<Ng.indexOf(t)){for(;a!==null;){var i=fa(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=en(i.pendingLanes);if(u!==0){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;u;){var c=1<<31-ge(u);o.entanglements[1]|=c,u&=~c}Fe(i),(I&6)===0&&(Mu=ye()+500,gi(0,!1))}}break;case 31:case 13:o=gn(i,2),o!==null&&re(o,i,2),Iu(),es(i,2)}if(i=or(n),i===null&&fc(t,e,n,ku,l),i===a)break;a=i}a!==null&&n.stopPropagation()}else fc(t,e,n,null,l)}}function or(t){return t=yr(t),ns(t)}var ku=null;function ns(t){if(ku=null,t=Hn(t),t!==null){var e=ri(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=zm(e),t!==null)return t;t=null}else if(l===31){if(t=Am(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return ku=t,null}function nh(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(by()){case Om:return 2;case Cm:return 8;case hu:case gy:return 32;case Mm:return 268435456;default:return 32}default:return 32}}var cr=!1,Ll=null,Xl=null,Ql=null,oi=new Map,ci=new Map,Nl=[],Ng="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ym(t,e){switch(t){case"focusin":case"focusout":Ll=null;break;case"dragenter":case"dragleave":Xl=null;break;case"mouseover":case"mouseout":Ql=null;break;case"pointerover":case"pointerout":oi.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ci.delete(e.pointerId)}}function Ma(t,e,l,n,a,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:l,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},e!==null&&(e=fa(e),e!==null&&lh(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Rg(t,e,l,n,a){switch(e){case"focusin":return Ll=Ma(Ll,t,e,l,n,a),!0;case"dragenter":return Xl=Ma(Xl,t,e,l,n,a),!0;case"mouseover":return Ql=Ma(Ql,t,e,l,n,a),!0;case"pointerover":var i=a.pointerId;return oi.set(i,Ma(oi.get(i)||null,t,e,l,n,a)),!0;case"gotpointercapture":return i=a.pointerId,ci.set(i,Ma(ci.get(i)||null,t,e,l,n,a)),!0}return!1}function ah(t){var e=Hn(t.target);if(e!==null){var l=ri(e);if(l!==null){if(e=l.tag,e===13){if(e=zm(l),e!==null){t.blockedOn=e,Ps(t.priority,function(){hm(l)});return}}else if(e===31){if(e=Am(l),e!==null){t.blockedOn=e,Ps(t.priority,function(){hm(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function fu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=or(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);Ec=n,l.target.dispatchEvent(n),Ec=null}else return e=fa(l),e!==null&&lh(e),t.blockedOn=l,!1;e.shift()}return!0}function bm(t,e,l){fu(t)&&l.delete(e)}function jg(){cr=!1,Ll!==null&&fu(Ll)&&(Ll=null),Xl!==null&&fu(Xl)&&(Xl=null),Ql!==null&&fu(Ql)&&(Ql=null),oi.forEach(bm),ci.forEach(bm)}function Ji(t,e){t.blockedOn===e&&(t.blockedOn=null,cr||(cr=!0,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,jg)))}var Wi=null;function gm(t){Wi!==t&&(Wi=t,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,function(){Wi===t&&(Wi=null);for(var e=0;e<t.length;e+=3){var l=t[e],n=t[e+1],a=t[e+2];if(typeof n!="function"){if(ns(n||l)===null)continue;break}var i=fa(l);i!==null&&(t.splice(e,3),e-=3,Lc(i,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function ra(t){function e(c){return Ji(c,t)}Ll!==null&&Ji(Ll,t),Xl!==null&&Ji(Xl,t),Ql!==null&&Ji(Ql,t),oi.forEach(e),ci.forEach(e);for(var l=0;l<Nl.length;l++){var n=Nl[l];n.blockedOn===t&&(n.blockedOn=null)}for(;0<Nl.length&&(l=Nl[0],l.blockedOn===null);)ah(l),l.blockedOn===null&&Nl.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],i=l[n+1],u=a[se]||null;if(typeof i=="function")u||gm(l);else if(u){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,u=i[se]||null)o=u.formAction;else if(ns(a)!==null)continue}else o=u.action;typeof o=="function"?l[n+1]=o:(l.splice(n,3),n-=3),gm(l)}}}function ih(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return a=u})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function as(t){this._internalRoot=t}lo.prototype.render=as.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(A(409));var l=e.current,n=ve();eh(l,n,t,e,null,null)};lo.prototype.unmount=as.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;eh(t.current,2,null,t,null,null),Iu(),e[sa]=null}};function lo(t){this._internalRoot=t}lo.prototype.unstable_scheduleHydration=function(t){if(t){var e=Gm();t={blockedOn:null,target:t,priority:e};for(var l=0;l<Nl.length&&e!==0&&e<Nl[l].priority;l++);Nl.splice(l,0,t),l===0&&ah(t)}};var vm=Sm.version;if(vm!=="19.2.3")throw Error(A(527,vm,"19.2.3"));tt.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(A(188)):(t=Object.keys(t).join(","),Error(A(268,t)));return t=sy(e),t=t!==null?xm(t):null,t=t===null?null:t.stateNode,t};var wg={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Na=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Na.isDisabled&&Na.supportsFiber))try{si=Na.inject(wg),be=Na}catch{}var Na;no.createRoot=function(t,e){if(!Tm(t))throw Error(A(299));var l=!1,n="",a=Wd,i=Fd,u=Pd;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(u=e.onRecoverableError)),e=Ip(t,1,!1,null,null,l,n,null,a,i,u,ih),t[sa]=e.current,Pr(t),new as(e)};no.hydrateRoot=function(t,e,l){if(!Tm(t))throw Error(A(299));var n=!1,a="",i=Wd,u=Fd,o=Pd,c=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(o=l.onRecoverableError),l.formState!==void 0&&(c=l.formState)),e=Ip(t,1,!0,e,l??null,n,a,c,i,u,o,ih),e.context=th(null),l=e.current,n=ve(),n=mr(n),a=ql(n),a.callback=null,Bl(l,a,n),l=n,e.current.lanes=l,mi(e,l),Fe(e),t[sa]=e.current,Pr(t),new lo(e)};no.version="19.2.3"});var rh=Qe((Y1,ch)=>{"use strict";function oh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(oh)}catch(t){console.error(t)}}oh(),ch.exports=uh()});var S0=Qe(yo=>{"use strict";var g1=Symbol.for("react.transitional.element"),v1=Symbol.for("react.fragment");function v0(t,e,l){var n=null;if(l!==void 0&&(n=""+l),e.key!==void 0&&(n=""+e.key),"key"in e){l={};for(var a in e)a!=="key"&&(l[a]=e[a])}else l=e;return e=l.ref,{$$typeof:g1,type:t,key:n,ref:e!==void 0?e:null,props:l}}yo.Fragment=v1;yo.jsx=v0;yo.jsxs=v0});var ds=Qe((Ev,T0)=>{"use strict";T0.exports=S0()});var Y=Ei(Ci()),x0=Ei(rh());function is(t){let e=t>>>0;return function(){e|=0,e=e+1831565813|0;let l=Math.imul(e^e>>>15,1|e);return l=l+Math.imul(l^l>>>7,61|l)^l,((l^l>>>14)>>>0)/4294967296}}function ao(...t){let e=t.join("|"),l=2166136261;for(let n=0;n<e.length;n++)l^=e.charCodeAt(n),l=Math.imul(l,16777619);return l>>>0}function z(t,e,l){return e+Math.floor(t()*(l-e+1))}function O(t,e){return e[Math.floor(t()*e.length)]}function sh(t,e){let l=[...e];for(let n=l.length-1;n>0;n--){let a=Math.floor(t()*(n+1));[l[n],l[a]]=[l[a],l[n]]}return l}function B(t,e){return t()<e}function Gt(t){return t.map(e=>[...e])}function M(t,e,l=0){return Array.from({length:t},()=>Array(e).fill(l))}function vt(t){return{h:t.length,w:t[0]?.length??0}}function Jt(t,e){if(t.length!==e.length)return!1;for(let l=0;l<t.length;l++){if(t[l].length!==e[l].length)return!1;for(let n=0;n<t[l].length;n++)if(t[l][n]!==e[l][n])return!1}return!0}function Sn(t,e){let l=vt(t),n=vt(e),a=l.h*l.w;if(l.h!==n.h||l.w!==n.w)return{shapeEqual:!1,diffCells:a,totalCells:a};let i=0,u;for(let o=0;o<l.h;o++)for(let c=0;c<l.w;c++)t[o][c]!==e[o][c]&&(i++,u||(u={r:o,c}));return{shapeEqual:!0,diffCells:i,totalCells:a,firstDiff:u}}function io(t){let e=new Map;for(let l of t)for(let n of l)e.set(n,(e.get(n)??0)+1);return e}function fh(t,e=!0){let n=[...io(t).keys()];return e?n.sort((a,i)=>a-i):n.filter(a=>a!==0).sort((a,i)=>a-i)}var mh=[{id:0,hex:"#000000",name:"black"},{id:1,hex:"#0074D9",name:"blue"},{id:2,hex:"#FF4136",name:"red"},{id:3,hex:"#2ECC40",name:"green"},{id:4,hex:"#FFDC00",name:"yellow"},{id:5,hex:"#AAAAAA",name:"gray"},{id:6,hex:"#F012BE",name:"magenta"},{id:7,hex:"#FF851B",name:"orange"},{id:8,hex:"#7FDBFF",name:"cyan"},{id:9,hex:"#870C25",name:"maroon"}],Gg=mh.map(t=>t.hex);function uo(t){return Gg[t]??"#000000"}function R(t){return mh[t]?.name??`color ${t}`}var _g=["","repeating-linear-gradient(45deg, rgba(255,255,255,.85) 0 1px, transparent 1px 4px)","radial-gradient(circle at 50% 50%, rgba(255,255,255,.9) 0 1px, transparent 1.6px)","repeating-linear-gradient(0deg, rgba(0,0,0,.55) 0 1px, transparent 1px 4px)","repeating-linear-gradient(90deg, rgba(0,0,0,.45) 0 1px, transparent 1px 4px)","repeating-linear-gradient(135deg, rgba(255,255,255,.5) 0 1.5px, transparent 1.5px 5px)","repeating-linear-gradient(45deg, rgba(0,0,0,.5) 0 1px, transparent 1px 3px), repeating-linear-gradient(-45deg, rgba(0,0,0,.5) 0 1px, transparent 1px 3px)","radial-gradient(circle at 50% 50%, rgba(0,0,0,.6) 0 1.5px, transparent 2.2px)","repeating-linear-gradient(90deg, rgba(0,0,0,.5) 0 2px, transparent 2px 5px)","repeating-linear-gradient(0deg, rgba(255,255,255,.35) 0 1.5px, transparent 1.5px 4px)"];function us(t){return _g[t]??""}function ht(t){let e=t.length,l=t[0]?.length??0,n=M(l,e);for(let a=0;a<e;a++)for(let i=0;i<l;i++)n[i][e-1-a]=t[a][i];return n}function ze(t){return ht(ht(t))}function Ae(t){return ht(ht(ht(t)))}function yt(t){return t.map(e=>[...e].reverse())}function Qt(t){return[...t].reverse().map(e=>[...e])}function Wt(t){let e=t.length,l=t[0]?.length??0,n=M(l,e);for(let a=0;a<e;a++)for(let i=0;i<l;i++)n[i][a]=t[a][i];return n}function vl(t,e,l,n=0){let{h:a,w:i}=vt(t),u=M(a,i,n);for(let o=0;o<a;o++)for(let c=0;c<i;c++){let r=o-e,s=c-l;r>=0&&r<a&&s>=0&&s<i&&(u[o][c]=t[r][s])}return u}function oo(t,e){if(e<=1)return Gt(t);let{h:l,w:n}=vt(t),a=M(l*e,n*e);for(let i=0;i<l;i++)for(let u=0;u<n;u++)for(let o=0;o<e;o++)for(let c=0;c<e;c++)a[i*e+o][u*e+c]=t[i][u];return a}function Sl(t,e,l){let{h:n,w:a}=vt(t),i=M(n*e,a*l);for(let u=0;u<e;u++)for(let o=0;o<l;o++)for(let c=0;c<n;c++)for(let r=0;r<a;r++)i[u*n+c][o*a+r]=t[c][r];return i}function F(t,e){return t.map(l=>l.map(n=>n in e?e[n]:n))}function co(t,e){let{h:l,w:n}=vt(t),a=M(l+2,n+2,e);for(let i=0;i<l;i++)for(let u=0;u<n;u++)a[i+1][u+1]=t[i][u];return a}function ke(t,e=0){let{h:l,w:n}=vt(t),a=l,i=-1,u=n,o=-1;for(let r=0;r<l;r++)for(let s=0;s<n;s++)t[r][s]!==e&&(r<a&&(a=r),r>i&&(i=r),s<u&&(u=s),s>o&&(o=s));if(i<0)return[[0]];let c=M(i-a+1,o-u+1);for(let r=a;r<=i;r++)for(let s=u;s<=o;s++)c[r-a][s-u]=t[r][s];return c}function ro(t){let{h:e,w:l}=vt(t),n=M(e,l*2);for(let a=0;a<e;a++)for(let i=0;i<l;i++)n[a][i]=t[a][i],n[a][2*l-1-i]=t[a][i];return n}function dh(t){return Wt(ro(Wt(t)))}var os=[{id:"rotate90",label:"rotate 90\xB0 cw",fn:ht},{id:"rotate180",label:"rotate 180\xB0",fn:ze},{id:"rotate270",label:"rotate 270\xB0 cw",fn:Ae},{id:"flipH",label:"flip horizontal",fn:yt},{id:"flipV",label:"flip vertical",fn:Qt},{id:"transpose",label:"transpose",fn:Wt}];function nt(t,e){let l=e?.bg??0,n=e?.connectivity??4,{h:a,w:i}=vt(t),u=M(a,i,0),o=[],c=1,r=n===4?[[1,0],[-1,0],[0,1],[0,-1]]:[[1,0],[-1,0],[0,1],[0,-1],[1,1],[1,-1],[-1,1],[-1,-1]];for(let s=0;s<a;s++)for(let m=0;m<i;m++){if(t[s][m]===l||u[s][m]!==0)continue;let f=c++,d=t[s][m],h=[],v=[[s,m]];for(u[s][m]=f;v.length>0;){let[y,p]=v.pop();h.push([y,p]);for(let[b,S]of r){let D=y+b,w=p+S;D<0||D>=a||w<0||w>=i||u[D][w]===0&&t[D][w]===d&&(u[D][w]=f,v.push([D,w]))}}let T=Pe(h);o.push({id:f,color:d,cells:h,size:h.length,bbox:T,height:T.maxR-T.minR+1,width:T.maxC-T.minC+1,symmetricH:Hg(h),symmetricV:Ug(h),touchesBorder:T.minR===0||T.minC===0||T.maxR===a-1||T.maxC===i-1})}return{objects:o,overlay:u}}function Pe(t){let e=1/0,l=1/0,n=-1/0,a=-1/0;for(let[i,u]of t)i<e&&(e=i),u<l&&(l=u),i>n&&(n=i),u>a&&(a=u);return{minR:e,minC:l,maxR:n,maxC:a}}function Hg(t){let e=Pe(t),l=new Set(t.map(([n,a])=>`${n},${a}`));for(let[n,a]of t)if(!l.has(`${n},${e.minC+e.maxC-a}`))return!1;return!0}function Ug(t){let e=Pe(t),l=new Set(t.map(([n,a])=>`${n},${a}`));for(let[n,a]of t)if(!l.has(`${e.minR+e.maxR-n},${a}`))return!1;return!0}function Vt(t){return t.reduce((e,l)=>l.size>e.size?l:e,t[0])}function so(t){return t.reduce((e,l)=>l.size<e.size?l:e,t[0])}function Zt(t,e,l=0){let n=M(vt(t).h,vt(t).w,l);for(let a of e)for(let[i,u]of a.cells)n[i][u]=a.color;return n}function zi(t,e=0){let{h:l,w:n}=vt(t),a=Gt(t);for(let i=0;i<l;i++){let u=nt(a,{bg:e,connectivity:4});if(u.objects.length===0)break;let o=!1,c=new Set;for(let m=0;m<l;m++)for(let f=0;f<n;f++)a[m][f]!==e&&c.add(`${m},${f}`);let r=[];for(let m of u.objects)m.cells.every(([d,h])=>{let v=d+1;if(v>=l)return!1;let T=`${v},${h}`;return!(c.has(T)&&!m.cells.some(([y,p])=>y===v&&p===h))})?(o=!0,r.push({cells:m.cells.map(([d,h])=>[d+1,h]),color:m.color})):r.push({cells:m.cells,color:m.color});if(!o)break;let s=M(l,n,e);for(let m of r)for(let[f,d]of m.cells)s[f][d]=m.color;a=s}return a}function fo(t,e=0){let{h:l,w:n}=vt(t),a=M(l,n,e),i=nt(t,{bg:e,connectivity:4});for(let u of i.objects)for(let[o,c]of u.cells)a[o][u.bbox.minC+u.bbox.maxC-c]=u.color;return a}function Ai(t,e,l=0){let{h:n,w:a}=vt(t),i=Gt(t),u=nt(t,{bg:l,connectivity:4});for(let o of u.objects){for(let c=o.bbox.minC-1;c<=o.bbox.maxC+1;c++)for(let r of[o.bbox.minR-1,o.bbox.maxR+1])r>=0&&r<n&&c>=0&&c<a&&i[r][c]===l&&(i[r][c]=e);for(let c=o.bbox.minR-1;c<=o.bbox.maxR+1;c++)for(let r of[o.bbox.minC-1,o.bbox.maxC+1])c>=0&&c<n&&r>=0&&r<a&&i[c][r]===l&&(i[c][r]=e)}return i}var qg=[1,2,3,4,5,6,7,8,9];function E(t,e,l=[]){let n=qg.filter(a=>!l.includes(a));return sh(t,n).slice(0,Math.min(e,n.length))}function Nt(t,e,l,n,a){let i=a?.colorPool??E(t,Math.max(n,1)),u=a?.minSize??1,o=a?.maxSize??4,c=a?.margin??0,r=new Set,s=[],m=0;for(;s.length<n&&m++<500;){let f=a?.shapes??O(t,["any","rect","line"]),d=i[s.length%i.length],h=z(t,u,o),v=[];if(f==="line"){let y=B(t,.5),p=z(t,c,e-c-1-(y?0:h-1)),b=z(t,c,l-c-1-(y?h-1:0));for(let S=0;S<h;S++)v.push(y?[p,b+S]:[p+S,b])}else if(f==="rect"||f==="square"){let y=Math.min(f==="square"?h:z(t,1,h),e-2*c),p=Math.min(f==="square"?h:z(t,1,h),l-2*c);if(y<1||p<1)continue;let b=z(t,c,e-c-y),S=z(t,c,l-c-p);for(let D=b;D<b+y;D++)for(let w=S;w<S+p;w++)v.push([D,w])}else{let y=z(t,c,e-c-1),p=z(t,c,l-c-1),b=new Set([`${y},${p}`]),S=[[y,p]];for(;b.size<h&&S.length>0;){let D=z(t,0,S.length-1),[w,x]=S.splice(D,1)[0];for(let[N,C]of[[1,0],[-1,0],[0,1],[0,-1]]){let j=w+N,ct=x+C;if(j<c||j>=e-c||ct<c||ct>=l-c)continue;let xe=`${j},${ct}`;!b.has(xe)&&b.size<h&&(b.add(xe),S.push([j,ct]))}}v=[...b].map(D=>{let[w,x]=D.split(",").map(Number);return[w,x]})}let T=v.length>0;for(let[y,p]of v)(y<c||y>=e-c||p<c||p>=l-c)&&(T=!1),r.has(`${y},${p}`)&&(T=!1);if(T){for(let[y,p]of v)r.add(`${y},${p}`);s.push({cells:v,color:d})}}return s}function _t(t,e,l,n=0){let a=M(t,e,n);for(let i of l)for(let[u,o]of i.cells)a[u][o]=i.color;return a}function Ft(t,e,l,n){let a=[],i=new Set,u=0;for(;a.length<e&&u++<400;){let o=l();if(Jt(o.input,o.output))continue;let c=JSON.stringify(o.input);i.has(c)||n?.reject&&n.reject(o)||n?.alts&&n.alts.length>0&&n.alts.some(s=>a.concat(o).every(m=>{try{return Jt(s(m.input),m.output)}catch{return!1}}))||(i.add(c),a.push(o))}return a}function G(t,e){return JSON.stringify(t)===JSON.stringify(e)}function k(t,e,l){let n=[],a=0;for(;n.length<t&&a++<400;){let i=e();l&&!l(i,n)||n.push(i)}return n}function _(t,e){for(let l=0;l<80;l++){let n=t();if(!e.some(a=>G(a.input,n.input)))return n}return t()}function H(t,e,l,n){return{train:t,testInput:e.input,testOutput:e.output,hints:l,explanation:n}}function q(t,e,l,n){let a=l,i=Math.round(l+(n-l)*e),u=z(t,a,Math.max(a,i)),o=z(t,a,Math.max(a,i));return{h:u,w:o}}var cs=[ht,ze,Ae,yt,Qt,Wt];function Bg(t,e){let{h:l,w:n}=q(t,e,4,10),a=E(t,z(t,2,3)),i=()=>{let c=M(l,n,0);for(let r=0;r<l;r++)for(let s=0;s<n;s++)B(t,.4)&&(c[r][s]=O(t,a));return{input:c,output:Gt(c)}},u=k(3,i,(c,r)=>!r.some(s=>G(s.input,c.input))),o=_(i,u);return H(u,o,["Compare each example side by side \u2014 what exactly changes from input to output?","Nothing changes at all. The output keeps the exact size, colors and positions of the input.","The rule is the identity transformation: copy every cell of the input exactly. Reproduce the challenge grid cell for cell, same dimensions and same colors."],"The transformation is the identity: the output is an exact copy of the input grid. This is the simplest possible ARC rule and a sanity check for the editor.")}function ph(t,e){let{h:l,w:n}=q(t,e,4,9),a=O(t,E(t,4)),i=()=>{let c=M(l,n,0);for(let r=0;r<l;r++)for(let s=0;s<n;s++)B(t,.4)&&(c[r][s]=a);return{input:c,output:M(l,n,a)}},u=k(3,i,(c,r)=>!r.some(s=>G(s.input,c.input))),o=_(i,u);return H(u,o,["The shape of the grid stays the same \u2014 but what happens to the colors?",`Every cell, including the background, becomes ${R(a)} (color ${a}).`,`The rule: paint the entire output grid with ${R(a)} (color ${a}) \u2014 the single color used by the object in the input. Output dims equal input dims.`],`Every example fills the whole grid with ${R(a)} \u2014 the one color the input pattern uses. The output size matches the input size.`)}function hh(t,e){let{h:l,w:n}=q(t,e,4,10),[a,i,u]=E(t,3),o=()=>{let s=M(l,n,0);for(let m=0;m<l;m++)for(let f=0;f<n;f++)B(t,.4)&&(s[m][f]=O(t,[a,u]));return s.flat().includes(a)||(s[z(t,0,l-1)][z(t,0,n-1)]=a),{input:s,output:F(s,{[a]:i})}},c=k(3,o,(s,m)=>!m.some(f=>G(f.input,s.input))),r=_(o,c);return H(c,r,["One color is not acting like the others. Which cells are different in the output?",`Every ${R(a)} (color ${a}) cell becomes ${R(i)} (color ${i}). Nothing else moves.`,`The rule is a color mapping: ${R(a)} (${a}) \u2192 ${R(i)} (${i}), all other cells unchanged.`],`A simple substitution rule: recolor every ${R(a)} cell to ${R(i)}. Grid size and all other colors are preserved.`)}function kg(t,e){let{h:l,w:n}=q(t,e,5,10),[a,i,u,o,c]=E(t,5),r=()=>{let f=M(l,n,0);for(let d=0;d<l;d++)for(let h=0;h<n;h++)B(t,.45)&&(f[d][h]=O(t,[a,u,c]));return f.flat().includes(a)||(f[0][0]=a),f.flat().includes(u)||(f[l-1][n-1]=u),{input:f,output:F(f,{[a]:i,[u]:o})}},s=k(3,r,(f,d)=>!d.some(h=>G(h.input,f.input))),m=_(r,s);return H(s,m,["Two colors are being rewritten. Track each one separately.",`${R(a)} (${a}) \u2192 ${R(i)} (${i}) AND ${R(u)} (${u}) \u2192 ${R(o)} (${o}).`,"Two independent substitutions are applied at once. Build the output by replacing each mapped color with its target; everything else is copied."],`Two simultaneous color mappings: ${R(a)}\u2192${R(i)} and ${R(u)}\u2192${R(o)}. Apply both mappings in one pass.`)}function yh(t,e){let{h:l,w:n}=q(t,e,5,10),[a,i,u]=E(t,3),o=()=>{let s=M(l,n,0);for(let m=0;m<l;m++)for(let f=0;f<n;f++)B(t,.5)&&(s[m][f]=O(t,[a,i,u]));return s.flat().includes(a)||(s[0][0]=a),s.flat().includes(i)||(s[l-1][n-1]=i),{input:s,output:F(s,{[a]:i,[i]:a})}},c=k(3,o,(s,m)=>!m.some(f=>G(f.input,s.input))),r=_(o,c);return H(c,r,["Colors are trading places. Which pairs exchange?",`${R(a)} (${a}) becomes ${R(i)} (${i}) and ${R(i)} becomes ${R(a)} \u2014 a symmetric swap.`,`The rule is a two-way color swap: ${a} \u2194 ${i}. Replace both colors simultaneously (do not apply the map twice).`],`A color exchange: ${R(a)} \u2194 ${R(i)}. Apply the swap in a single pass so cells are not swapped back.`)}function bh(t,e){let{h:l,w:n}=q(t,e,5,10),[a,i,u]=E(t,3),o=()=>{let s=M(l,n,0);for(let m=0;m<l;m++)for(let f=0;f<n;f++)B(t,.45)&&(s[m][f]=O(t,[a,i,u]));return s.flat().includes(a)||(s[0][0]=a),{input:s,output:F(s,{[i]:0,[u]:0})}},c=k(3,o,(s,m)=>!m.some(f=>G(f.input,s.input))),r=_(o,c);return H(c,r,["Most of the drawing disappears. What survives?",`Only ${R(a)} (color ${a}) cells remain \u2014 every other color is erased to black (0).`,`The rule is a filter: keep only ${R(a)} (${a}) cells; recolor everything else (except the background) to 0.`],`A selection rule: the output keeps only the ${R(a)} cells and erases all other colors to background 0. Positions and size of kept cells are unchanged.`)}function Yg(t,e){let l=O(t,E(t,3)),n=O(t,E(t,2,[l])),a=()=>{let{h:o,w:c}=q(t,e,3,5),r=M(o,c,0);for(let m=0;m<o;m++)for(let f=0;f<c;f++)B(t,.5)&&(r[m][f]=O(t,[l,n]));let s=r.flat().filter(m=>m===l).length;return{input:r,output:[[s]]}},i=k(3,a,(o,c)=>{let r=o.output[0][0];return r>=1&&r<=9&&!c.some(s=>G(s.input,o.input))}),u=_(a,i);return H(i,u,["The output is a single cell. What could one cell encode about the input?",`The single cell equals how many ${R(l)} (color ${l}) cells the input contains.`,"Count the cells of the target color and output a 1\xD71 grid whose value is that count. E.g. 6 cells of the color \u2192 output [[6]]."],`The output is a 1\xD71 grid containing the number of ${R(l)} (color ${l}) cells in the input. Counting becomes a color value.`)}function Lg(t,e){let l=z(t,2,e<.5?3:4),n=()=>{let{h:u,w:o}=q(t,e,4,8),c=E(t,l),r=M(u,o,0);for(let m=0;m<u;m++)for(let f=0;f<o;f++)B(t,.45)&&(r[m][f]=O(t,c));let s=[...new Set(r.flat().filter(m=>m!==0))].sort((m,f)=>m-f);return{input:r,output:[s]}},a=k(3,n,(u,o)=>u.output[0].length>=2&&!o.some(c=>G(c.input,u.input))),i=_(n,a);return H(a,i,["The output is one row of colors. Where does its order come from?","The row lists every distinct non-black color in the input, sorted from smallest to largest number.","Collect the distinct non-zero colors of the input, sort them ascending, and output them as a single 1\xD7N row."],"The output is a 1\xD7N row containing the distinct non-zero colors of the input in ascending numeric order.")}function Xg(t,e){let{h:l,w:n}=q(t,e,4,9),a=()=>{let[o,c,r]=E(t,3),s=M(l,n,0);for(let f=0;f<l;f++)for(let d=0;d<n;d++)B(t,.4)&&(s[f][d]=O(t,[o,c]));let m=s.map(f=>f.map(d=>d===0?r:0));return{input:s,output:m}},i=k(3,a,(o,c)=>!c.some(r=>G(r.input,o.input))),u=_(a,i);return H(i,u,["Background and drawing have traded places. What is the new background color?","Every black (0) cell becomes the SAME new color; every previously colored cell becomes black.","The rule is foreground/background inversion: all 0 cells \u2192 the new color, all non-zero cells \u2192 0. The new color is the one that fills most of the output."],"Foreground/background inversion: non-zero cells become 0 and 0 cells become the replacement color. Grid size is unchanged.")}function Qg(t,e){return O(t,[hh,yh,bh,ph])(t,e)}function gh(t,e){let l=()=>{let{h:i,w:u}=q(t,e,6,12),o=z(t,2,Math.min(9,2+Math.round(e*6))),c=E(t,o),r=Nt(t,i,u,o,{colorPool:c,minSize:1,maxSize:4,margin:0});return{input:_t(i,u,r),output:[[Math.min(r.length,9)]]}},n=k(3,l,(i,u)=>i.output[0][0]>=2&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The answer is a single cell again. What quantity changes with each example?","It is the number of separate objects (groups of touching cells of one color).","Count the connected objects (4-direction adjacency, one color each) and output a 1\xD71 grid holding that count."],"The output is a 1\xD71 grid with the number of objects. Objects are connected groups of same-colored cells (adjacent up/down/left/right).")}function vh(t,e){let l=()=>{let{h:i,w:u}=q(t,e,7,13),o=z(t,2,4),c=Nt(t,i,u,o,{colorPool:E(t,o),minSize:1,maxSize:6,margin:0}),r=c.map(f=>f.cells.length);if(new Set(r).size!==r.length)return{input:[[0]],output:[[1]]};let s=_t(i,u,c),m=nt(s);return{input:s,output:Zt(s,[Vt(m.objects)])}},n=k(3,l,(i,u)=>i.input.length>1&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["Only one shape survives. What decides the winner?","The largest object (most cells) stays; all other objects are erased.","Find the object with the most cells (4-adjacency, single color) and erase every other object to 0. The winner keeps its color and position."],"A size-selection rule: keep only the largest object by cell count; everything else becomes background 0.")}function Vg(t,e){let l=()=>{let{h:i,w:u}=q(t,e,7,13),o=z(t,2,4),c=Nt(t,i,u,o,{colorPool:E(t,o),minSize:1,maxSize:6,margin:0}),r=c.map(f=>f.cells.length);if(new Set(r).size!==r.length)return{input:[[0]],output:[[1]]};let s=_t(i,u,c),m=nt(s);return{input:s,output:Zt(s,[so(m.objects)])}},n=k(3,l,(i,u)=>i.input.length>1&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["This time the survivor is tiny. Which object remains?","The smallest object (fewest cells) stays; the rest are erased.","Find the object with the fewest cells and erase every other object to 0."],"Selection by minimum: keep only the smallest object (fewest cells); all other objects become background.")}function Zg(t,e){let l=()=>{let{h:i,w:u}=q(t,e,7,12),o=z(t,2,4),c=E(t,o),[r,s]=E(t,2,c),m=Nt(t,i,u,o,{colorPool:c,minSize:1,maxSize:5,margin:0});if(new Set(m.map(h=>h.cells.length%2)).size<2)return{input:[[0]],output:[[1]]};let f=_t(i,u,m),d=Gt(f);for(let h of m){let v=h.cells.length%2===0?r:s;for(let[T,y]of h.cells)d[T][y]=v}return{input:f,output:d}},n=k(3,l,(i,u)=>i.input.length>1&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["Object positions never move \u2014 only colors change. What property sets the new color?","Even-sized objects become one color; odd-sized objects become the other.","Recolor every object by its size parity: an even number of cells \u2192 the first new color, odd \u2192 the second. Shape and position are untouched."],"A property-based recolor: each object is repainted according to whether its cell count is even or odd. Count each object's cells to decide.")}function Sh(t,e){let l=()=>{let{h:i,w:u}=q(t,e,6,11),o=M(i,u,0),c=E(t,z(t,1,3)),r=z(t,1,2),s=z(t,1,2),m=z(t,3,Math.max(3,i-r-1)),f=z(t,3,Math.max(3,u-s-1));for(let h=r;h<r+m&&h<i;h++)for(let v=s;v<s+f&&v<u;v++)B(t,.5)&&(o[h][v]=O(t,c));let d=ke(o);return{input:o,output:d}},n=k(3,l,(i,u)=>{let o=vt(i.output);return o.h<vt(i.input).h&&o.w<vt(i.input).w&&!u.some(c=>G(c.input,i.input))}),a=_(l,n);return H(n,a,["The output is a smaller grid. What part of the input does it keep?","It is the tight box around all the drawing \u2014 the surrounding empty border is cut away.","Crop the input to the bounding rectangle of all non-zero cells: delete empty rows/columns around the content."],"Cropping: the output is the smallest rectangle containing every non-zero cell (the empty margin is removed).")}function Th(t,e){let l=()=>{let{h:i,w:u}=q(t,e,7,12),o=z(t,3,5),c=Nt(t,i,u,o-1,{colorPool:E(t,o),minSize:1,maxSize:3,margin:2}),r=O(t,E(t,1)),s=[],m=z(t,1,u-2),f=z(t,2,3);for(let p=0;p<f;p++)s.push([0,Math.min(u-1,m+p)]);let d=[...c,{cells:s,color:r}],h=O(t,E(t,2,d.map(p=>p.color))),v=_t(i,u,d),T=nt(v),y=Gt(v);for(let p of T.objects)if(p.touchesBorder)for(let[b,S]of p.cells)y[b][S]=h;return!T.objects.some(p=>!p.touchesBorder)||!T.objects.some(p=>p.touchesBorder)?{input:[[0]],output:[[1]]}:{input:v,output:y}},n=k(3,l,(i,u)=>i.input.length>1&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["Some shapes change color and some do not. What distinguishes them?","Objects touching the grid border are repainted; interior objects keep their color.","Detect which objects touch any edge of the grid and recolor those to the new color; leave interior objects alone."],"A positional rule: objects that touch the grid boundary are recolored; interior objects are unchanged.")}function Kg(t,e){let l=()=>{let{h:i,w:u}=q(t,e,5,10),o=z(t,2,5),c=E(t,o),r=M(i,u,0);for(let m=0;m<i;m++)for(let f=0;f<u;f++)B(t,.4)&&(r[m][f]=O(t,c));let s=new Set(r.flat().filter(m=>m!==0)).size;return{input:r,output:[[s]]}},n=k(3,l,(i,u)=>i.output[0][0]>=2&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["One cell again \u2014 but this time it counts variety, not quantity.","The single cell is how many DIFFERENT non-black colors appear in the input.","Count the distinct non-zero colors and output a 1\xD71 grid with that number."],"The output is a 1\xD71 grid holding the number of distinct non-zero colors in the input.")}function $g(t,e){return O(t,[gh,vh,Sh,Th])(t,e)}function zh(t,e){let l=e<.2?1:e<.5?2:3,n=[ht,ze,Ae][l-1],a=cs.filter(c=>c!==n),i=()=>{let{h:c,w:r}=q(t,e,4,9),s=M(c,r,0),m=E(t,z(t,2,3));for(let f=0;f<c;f++)for(let d=0;d<r;d++)B(t,.4)&&(s[f][d]=O(t,m));return{input:s,output:n(s)}},u=Ft(t,3,i,{alts:a}),o=_(i,u);return H(u,o,["The drawing is the same but the whole grid has been moved around. How?",`Every example turns the grid by the same amount: ${l*90} degrees clockwise.`,`The rule is a rotation of ${l*90}\xB0 clockwise. Cell (r, c) moves accordingly; output dims swap for 90\xB0/270\xB0 turns.`],`A fixed rotation: every grid is rotated ${l*90} degrees clockwise. The rotation amount is identical across all examples.`)}function Ah(t,e){let l=B(t,.5),n=l?yt:Qt,a=cs.filter(c=>c!==n),i=()=>{let{h:c,w:r}=q(t,e,4,9),s=M(c,r,0),m=E(t,z(t,2,3));for(let f=0;f<c;f++)for(let d=0;d<r;d++)B(t,.4)&&(s[f][d]=O(t,m));return{input:s,output:n(s)}},u=Ft(t,3,i,{alts:a}),o=_(i,u);return H(u,o,["Every example is reflected. Around which line?",l?"Each row is reversed left-to-right: a horizontal mirror.":"Each column is reversed top-to-bottom: a vertical mirror.",l?"The rule is a horizontal flip (mirror across the vertical center line): output[r][c] = input[r][W-1-c].":"The rule is a vertical flip (mirror across the horizontal center line): output[r][c] = input[H-1-r][c]."],l?"A horizontal reflection \u2014 the grid is mirrored left \u2194 right, keeping its size.":"A vertical reflection \u2014 the grid is mirrored top \u2194 bottom, keeping its size.")}function xh(t,e){let l=cs.filter(u=>u!==Wt),n=()=>{let{h:u,w:o}=q(t,e,4,9),c=M(u,o,0),r=E(t,z(t,2,3));for(let s=0;s<u;s++)for(let m=0;m<o;m++)B(t,.4)&&(c[s][m]=O(t,r));return{input:c,output:Wt(c)}},a=Ft(t,3,n,{alts:l}),i=_(n,a);return H(a,i,["Rows became columns. What happened to the dimensions?","The grid is flipped across its main diagonal: rows and columns are exchanged.","The rule is the transpose: output[r][c] = input[c][r]. An H\xD7W grid becomes W\xD7H."],"A transpose (diagonal mirror): rows and columns swap places, so the output dimensions are transposed too.")}function Dh(t,e){let l=e<.5?0:O(t,[-1,1]),n=z(t,1,2),a=()=>{let{h:c,w:r}=q(t,e,5,10),s=M(c,r,0),m=E(t,2),f=l>0?c-l:c-1,d=l<0?-l:0,h=n>0?r-n:r-1,v=n<0?-n:0;for(let T=d;T<=f;T++)for(let y=v;y<=h;y++)B(t,.4)&&(s[T][y]=O(t,m));return{input:s,output:vl(s,l,n)}},i=k(3,a,(c,r)=>!r.some(s=>G(s.input,c.input))&&!G(vl(c.input,l,n),c.input)),u=_(a,i),o=`${l===0?"":l>0?`down ${l}, `:`up ${-l}, `}right ${n}`;return H(i,u,["The drawing keeps its shape but slides. In which direction and how far?",`Every example shifts the content ${o}. Vacated cells become black.`,`The rule is a translation: shift all content ${o} (positive = down/right). Cells pushed out of the grid are lost; the rest of the grid fills with 0.`],`A pure translation by (${l}, ${n}) \u2014 down ${l}, right ${n}. The grid size never changes; exposed cells become background.`)}function Eh(t,e){let l=o=>ht(yt(o)),n=[yt,ht,Qt,Ae,Wt],a=()=>{let{h:o,w:c}=q(t,e,4,8),r=M(o,c,0),s=E(t,2);for(let m=0;m<o;m++)for(let f=0;f<c;f++)B(t,.4)&&(r[m][f]=O(t,s));return{input:r,output:l(r)}},i=Ft(t,3,a,{alts:n}),u=_(a,i);return H(i,u,["Two things happen in sequence. Can you find their order?","First mirror left-right, THEN rotate 90\xB0 clockwise. Order matters!","The rule is a composition: apply a horizontal flip first, then a 90\xB0 clockwise rotation to the result."],"A two-step composition: flip horizontally, then rotate 90\xB0 clockwise. Try the reverse order on the examples to see why the order matters.")}function Jg(t,e){return O(t,[zh,Ah,xh,Dh,Eh])(t,e)}function Oh(t,e){let l=()=>{let i=z(t,4,Math.max(5,Math.round(6+e*4))),u=z(t,3,Math.max(3,Math.round(4+e*3))),o=M(i,u,0),c=E(t,2);for(let r=0;r<i;r++)for(let s=0;s<u;s++)B(t,.45)&&(o[r][s]=O(t,c));return{input:o,output:ro(o)}},n=k(3,l,(i,u)=>!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The output is twice as wide. What fills the new columns?","The right half is the mirror image of the input \u2014 together they form a horizontally symmetric grid.","The rule: append the horizontal mirror of the input. output[r][W-1-c] = input[r][c] for the second half, producing a left-right symmetric grid."],"Symmetry completion: the input is the LEFT half of a symmetric picture. Mirror it onto the right to complete the pattern (output width = 2 \xD7 input width).")}function Ch(t,e){let l=()=>{let i=z(t,3,Math.max(3,Math.round(4+e*3))),u=z(t,4,Math.max(5,Math.round(6+e*4))),o=M(i,u,0),c=E(t,2);for(let r=0;r<i;r++)for(let s=0;s<u;s++)B(t,.45)&&(o[r][s]=O(t,c));return{input:o,output:dh(o)}},n=k(3,l,(i,u)=>!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The output is twice as tall this time. What fills the new rows?","The bottom half is the upside-down mirror of the input \u2014 a vertically symmetric grid.","The rule: append the vertical mirror of the input below it, producing a top-bottom symmetric grid (output height = 2 \xD7 input height)."],"Symmetry completion (vertical): the input is the TOP half. Mirror it downward to complete the picture.")}function Mh(t,e){let l=()=>{let i=z(t,4,8),u=z(t,4,8)*2,o=M(i,u/2,0),c=E(t,2);for(let f=0;f<i;f++)for(let d=0;d<u/2;d++)B(t,.45)&&(o[f][d]=O(t,c));let r=ro(o),s=Gt(r),m=z(t,1,3);for(let f=0;f<m;f++){let d=z(t,0,i-1),h=z(t,0,u/2-1);s[d][h]=O(t,[0,...c.filter(v=>v!==r[d][h])])}return{input:s,output:r}},n=k(3,l,(i,u)=>!G(i.input,i.output)&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The grid is *almost* symmetric. What is the output doing about the flaws?","The output is the perfectly mirrored version \u2014 the mismatched cells are repaired to match their mirror partner.","Find cells that break the left-right symmetry and set them to the color of their mirror counterpart. The output is fully symmetric."],"Symmetry repair: the input is a symmetric grid with 1\u20133 damaged cells. The output restores the exact mirror image.")}function Nh(t,e){let l=()=>{let i=z(t,3,Math.max(3,Math.round(4+e*2))),u=M(i,i,0),o=E(t,2);for(let c=0;c<i;c++)for(let r=0;r<i;r++)B(t,.45)&&(u[c][r]=O(t,o));return{input:u,output:Sl(u,2,2)}},n=k(3,l,(i,u)=>!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The output repeats something. What and how many times?","The entire input tile is repeated 2\xD72 \u2014 four copies in a square arrangement.","The rule is 2\xD72 tiling: the output is the input repeated twice horizontally and twice vertically (dims double)."],"Tiling: the input is a motif repeated in a 2\xD72 arrangement. Output dimensions are exactly double.")}function Wg(t,e){let l=B(t,.5),n=()=>{let{h:u,w:o}=q(t,e,3,6),c=M(u,o,0),r=E(t,2);for(let s=0;s<u;s++)for(let m=0;m<o;m++)B(t,.45)&&(c[s][m]=O(t,r));return{input:c,output:l?Sl(c,2,1):Sl(c,1,2)}},a=k(3,n,(u,o)=>!o.some(c=>G(c.input,u.input))),i=_(n,a);return H(a,i,["The tile repeats \u2014 but in which direction this time?",l?"Two copies stacked vertically.":"Two copies placed side by side horizontally.",l?"The rule: stack the input twice vertically (output height doubles, width unchanged).":"The rule: repeat the input twice horizontally (output width doubles, height unchanged)."],l?"A 2\xD71 tiling: the motif repeats top-to-bottom.":"A 1\xD72 tiling: the motif repeats left-to-right.")}function Rh(t,e){let[l,n]=E(t,2),a=()=>{let o=z(t,4,7),c=z(t,4,7),r=M(o,c,0);for(let m=0;m<o;m++)for(let f=0;f<c;f++)r[m][f]=(m+f)%2===0?l:n;let s=Gt(r);for(let m=0;m<o;m++)for(let f=0;f<c;f++)B(t,.35)&&(s[m][f]=0);return{input:s,output:r}},i=k(3,a,(o,c)=>o.input.flat().filter(s=>s===0).length>=2&&!c.some(s=>G(s.input,o.input))),u=_(a,i);return H(i,u,["Some cells went missing. What pattern decides their color?","It is a checkerboard: cells alternate between the two colors like a chess board \u2014 color depends on (row + column) parity.",`The rule: fill every black cell so that (row+column) even \u2192 ${R(l)} (${l}) and odd \u2192 ${R(n)} (${n}). Existing cells never change.`],"Checkerboard completion: the two colors alternate by (row + column) parity. Restore the erased cells without touching the rest.")}function jh(t,e){let l=()=>{let i=z(t,2,4),u=z(t,2,4),o=M(i,u,0),c=E(t,2);for(let f=0;f<i;f++)for(let d=0;d<u;d++)B(t,.5)&&(o[f][d]=O(t,c));let r=M(i*2,u*2,0),s=yt(o),m=Qt(o);for(let f=0;f<i;f++)for(let d=0;d<u;d++)r[f][d]=o[f][d],r[f][u+d]=s[f][d],r[i+f][d]=m[f][d],r[i+f][u+d]=m[f][u-1-d];return{input:o,output:r}},n=k(3,l,(i,u)=>!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The quadrant grows into a full picture with four-way symmetry. What are the rules for each quarter?","Top-right mirrors the input horizontally; bottom-left mirrors it vertically; bottom-right mirrors both.","The rule: place the input top-left; fill top-right with its horizontal mirror, bottom-left with its vertical mirror, bottom-right with the double-mirrored copy."],"Four-way symmetry completion: the input is the top-left quadrant; the other three quadrants are its mirror images.")}function Fg(t,e){let l=()=>{let i=z(t,2,3),u=E(t,i),o=Array.from({length:i*3},(r,s)=>u[s%i]),c=i+z(t,0,1);return{input:[o.slice(0,c)],output:[o]}},n=k(3,l,(i,u)=>!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The input is a short fragment of a longer row. How does it continue?","The row is a repeating pattern \u2014 the fragment you see repeats over and over.","The rule: detect the repeating period in the row and repeat it to fill a row three periods long."],"Periodic continuation: the input shows the start of a repeating 1D pattern; the output extends it to three full periods.")}function Pg(t,e){let l=()=>{let i=z(t,4,7),u=z(t,4,7),[o,c]=E(t,2),r=M(i,u,0);for(let d=0;d<i;d++){let h=d%2===0?o:c;for(let v=0;v<u;v++)r[d][v]=h}let s=Gt(r),m=z(t,1,2),f=[...Array(i).keys()].sort(()=>t()-.5).slice(0,m);for(let d of f)for(let h=0;h<u;h++)s[d][h]=0;return{input:s,output:r}},n=k(3,l,(i,u)=>i.input.filter(c=>c.every(r=>r===0)).length>=1&&!u.some(c=>G(c.input,i.input))),a=_(l,n);return H(n,a,["Whole rows are blank. What fills them in?","The visible rows alternate between two colors \u2014 the blank rows continue that stripe pattern.","The rule: rows alternate between the two stripe colors; fill every blank row according to its position in the alternation."],"Stripe completion: rows alternate between two colors. Missing rows are restored by continuing the alternation.")}function Ig(t,e){return O(t,[Oh,Ch,Mh,Nh,Rh,jh])(t,e)}function wh(t,e){let l=e<.5?3:4,n=E(t,l),a={};for(let c=0;c<l;c++)a[n[c]]=n[(c+1)%l];let i=()=>{let{h:c,w:r}=q(t,e,4,9),s=M(c,r,0);for(let m=0;m<c;m++)for(let f=0;f<r;f++)B(t,.45)&&(s[m][f]=O(t,n));return n.every(m=>s.flat().includes(m))||(s[0][0]=n[0],s[0][1%r]=n[1%l],l>2&&(s[0][2%r]=n[2])),{input:s,output:F(s,a)}},u=k(3,i,(c,r)=>!r.some(s=>G(s.input,c.input))),o=_(i,u);return H(u,o,["Every color moves to a new value. Is there a cycle?",`Yes \u2014 follow the chain: ${n.map((c,r)=>`${R(c)} (${c}) \u2192 ${R(n[(r+1)%l])} (${n[(r+1)%l]})`).join(", ")}.`,"The rule is a cyclic substitution: each color in the chain becomes the next one, and the last wraps around to the first."],"A cyclic color rotation: c\u2081\u2192c\u2082\u2192\u2026\u2192c\u2096\u2192c\u2081. Apply the whole cycle simultaneously.")}function Gh(t,e){let l=e<.5?3:4,n=E(t,l*2),a={};for(let r=0;r<l;r++)a[n[r]]=n[l+r];let i=n.slice(0,l),u=()=>{let{h:r,w:s}=q(t,e,5,10),m=M(r,s,0);for(let f=0;f<r;f++)for(let d=0;d<s;d++)B(t,.45)&&(m[f][d]=O(t,i));for(let f of i)m.flat().includes(f)||(m[z(t,0,r-1)][z(t,0,s-1)]=f);return{input:m,output:F(m,a)}},o=k(3,u,(r,s)=>!s.some(m=>G(m.input,r.input))),c=_(u,o);return H(o,c,[`Several colors are rewritten at once. Build the full table from the ${o.length} examples.`,"Each source color consistently maps to one target color across every example.","The rule is a many-entry color table: look up each cell's color in the mapping and write its target; unmapped cells stay."],"A multi-entry substitution table learned from the examples. Apply all mappings in one pass.")}function _h(t,e){let l=()=>{let{h:i,w:u}=q(t,e,6,10),[o,c]=E(t,2),[r]=E(t,1,[o,c]),s=M(i,u,0),m=Nt(t,i,u,z(t,1,3),{colorPool:[o],minSize:1,maxSize:3,margin:1});for(let d=0;d<i;d++)for(let h=0;h<u;h++)s[d][h]===0&&B(t,.25)&&(s[d][h]=c);for(let d of m)for(let[h,v]of d.cells)s[h][v]=o;let f=Gt(s);for(let d=0;d<i;d++)for(let h=0;h<u;h++){if(s[d][h]===o||s[d][h]===0)continue;[[1,0],[-1,0],[0,1],[0,-1]].some(([T,y])=>{let p=d+T,b=h+y;return p>=0&&p<i&&b>=0&&b<u&&s[p][b]===o})&&(f[d][h]=r)}return s.flat().some((d,h)=>d!==0&&d!==o&&f.flat()[h]===r)?{input:s,output:f}:{input:[[0]],output:[[1]]}},n=k(3,l,(i,u)=>i.input.length>1&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["Only some cells change color. What do they have in common?","They are the cells that directly touch the special-color object (up, down, left or right).","The rule: any non-background cell that is 4-adjacent to the object color becomes the highlight color. The object itself and the background never change."],"Neighborhood rule: cells orthogonally adjacent to the target-color object are repainted with the highlight color.")}function Hh(t,e){let l=()=>{let{h:i,w:u}=q(t,e,6,10),o=z(t,2,e<.5?3:4),c=E(t,o),r=M(i,u,0);for(let h=0;h<i;h++)for(let v=0;v<u;v++)B(t,.5)&&(r[h][v]=O(t,c));let s=new Map;for(let h of r.flat())h!==0&&s.set(h,(s.get(h)??0)+1);if(s.size<2)return{input:[[0]],output:[[1]]};let m=[...s.values()];if(new Set(m).size!==m.length)return{input:[[0]],output:[[1]]};let f=[...s.entries()].sort((h,v)=>h[1]-v[1]),d={};return f.forEach(([h],v)=>{d[h]=v+1}),{input:r,output:F(r,d)}},n=k(3,l,(i,u)=>i.input.length>1&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["Colors are renumbered. Does rarity decide the new value?","Count each color: the rarest becomes 1, the next rarest 2, and so on.","The rule: rank the input colors by how often they appear (ascending) and recolor each cell with its color's rank (1-based)."],"Frequency ranking: each color is replaced by its rank when the colors are sorted by frequency, rarest first.")}function Uh(t,e){let n=E(t,3),a=O(t,E(t,2,n)),i=()=>{let c=z(t,4,Math.max(4,Math.round(6+e*4))),r=z(t,4,8),s=M(c,r,a),m=M(c,r,0);for(let f=0;f<c;f++)for(let d=0;d<r;d++)m[f][d]=n[f%3];return{input:s,output:m}},u=k(3,i,(c,r)=>!r.some(s=>G(s.input,c.input))),o=_(i,u);return H(u,o,["Rows are repainted with a repeating sequence. What is the order?",`Reading top to bottom, rows cycle through ${n.map(c=>R(c)).join(" \u2192 ")} and then repeat.`,`The rule: row r gets seq[r % 3] where the sequence is [${n.map(c=>R(c)).join(", ")}]. The cycle repeats for taller grids.`],"Row-cycle repaint: each row is filled with the next color of a fixed 3-color sequence that repeats down the grid.")}function qh(t,e){let l=()=>{let{h:i,w:u}=q(t,e,5,9),o=u%2===0?u:u-1;if(o<4)return{input:[[0]],output:[[1]]};let c=M(i,o,0),r=E(t,2),[s]=E(t,1,r);for(let d=0;d<i;d++)for(let h=0;h<o/2;h++)if(B(t,.5)){let v=O(t,r);c[d][h]=v,B(t,.55)&&(c[d][o-1-h]=v)}let m=Gt(c),f=!1;for(let d=0;d<i;d++)for(let h=0;h<o;h++)c[d][h]!==c[d][o-1-h]&&c[d][h]!==0&&(m[d][h]=s,f=!0);return f?{input:c,output:m}:{input:[[0]],output:[[1]]}},n=k(3,l,(i,u)=>i.input.length>1&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["Some cells get a marker color. What did those cells do wrong?","They disagree with their horizontal mirror partner \u2014 the un-symmetric cells are flagged.","The rule: every non-background cell whose horizontal mirror has a different color is repainted with the marker color; symmetric cells stay."],"Asymmetry detector: cells that differ from their left-right mirror partner are highlighted with the marker color.")}function t1(t,e){return O(t,[wh,Gh,_h,Hh,Uh,qh])(t,e)}var Bh={identity:Bg,"fill-constant":ph,"map-one":hh,"map-two":kg,"swap-two":yh,"keep-one":bh,"count-cells":Yg,"unique-colors":Lg,"invert-fg":Xg,"w1-trial":Qg,"count-objects":gh,"keep-largest":vh,"keep-smallest":Vg,"size-parity-recolor":Zg,"crop-content":Sh,"border-objects":Th,"count-colors":Kg,"w2-trial":$g,"rotate-k":zh,"flip-axis":Ah,transpose:xh,"shift-dxdy":Dh,"flip-then-rotate":Eh,"w3-trial":Jg,"complete-h":Oh,"complete-v":Ch,"fix-symmetry":Mh,"tile-2x2":Nh,"tile-1x2":Wg,"checker-complete":Rh,"quad-complete":jh,"extend-1d":Fg,"stripes-complete":Pg,"w4-trial":Ig,"cycle-colors":wh,"map-many":Gh,"adjacent-highlight":_h,"frequency-rank":Hh,"row-gradient":Uh,"mirror-diff":qh,"w5-trial":t1};var rs=[ht,ze,Ae,yt,Qt,Wt];function kh(t,e){let l=()=>{let{h:i,w:u}=q(t,e,7,12),o=z(t,2,4),c=Nt(t,i,u,o,{colorPool:E(t,o),minSize:1,maxSize:4,margin:0}),r=_t(i,u,c),s=zi(r);return{input:r,output:s}},n=k(3,l,(i,u)=>!G(i.input,i.output)&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The shapes are identical \u2014 only their positions changed. In which direction, and what stopped them?","Every object falls straight down until it lands on the floor or on top of another object.","The rule is gravity: each object slides down as far as possible without overlapping others or leaving the grid. Columns are independent."],"Gravity: every object drops to the lowest position it can occupy, stacking on top of other objects.")}function e1(t,e){let n=()=>{let{h:u,w:o}=q(t,e,7,11),c=O(t,E(t,2,[6])),r=[],s=z(t,2,4),m=z(t,0,Math.max(0,Math.floor(u/2)-1)),f=z(t,0,Math.max(0,Math.floor(o/2)-1));for(let S=0;S<s;S++)r.push([m,Math.min(o-1,f+S)]);let d=Pe(r),h=d.maxR-d.minR+1,v=d.maxC-d.minC+1,T=z(t,0,u-h),y=z(t,0,o-v),p=M(u,o,0);for(let[S,D]of r)p[S][D]=c;p[T][y]=6;let b=M(u,o,0);for(let[S,D]of r)b[S-d.minR+T][D-d.minC+y]=c;return{input:p,output:b}},a=k(3,n,(u,o)=>!o.some(c=>G(c.input,u.input))),i=_(n,a);return H(a,i,["One object ends up somewhere new \u2014 and one cell disappears from the output. What is the marker cell doing?",`The single ${R(6)} (6) cell is the destination: the object's top-left corner moves exactly onto it, and the marker is consumed.`,`The rule: translate the non-marker object so its bounding-box top-left lands on the ${R(6)} cell. The marker itself does not appear in the output.`],"Marker-directed translation: the magenta (6) cell marks where the object's top-left corner must go. The marker is removed after the move.")}function Yh(t,e){let l=()=>{let{h:i,w:u}=q(t,e,7,12),o=z(t,1,3),c=E(t,o),[r]=E(t,1,c),s=Nt(t,i,u,o,{colorPool:c,minSize:1,maxSize:3,margin:1}),m=_t(i,u,s),f=Ai(m,r);return{input:m,output:f}},n=k(3,l,(i,u)=>!G(i.input,i.output)&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["Every shape gained a border. What color and what shape is it?","A 1-cell rectangle of one new color is drawn tightly around each object's bounding box.","The rule: draw a rectangular frame (1 cell thick) of the frame color around each object's bounding box, only on background cells."],"Object framing: each object gets a 1-cell rectangular border of a single frame color around its bounding box.")}function Lh(t,e){let l=()=>{let{h:i,w:u}=q(t,e,7,12),o=z(t,2,3),c=Nt(t,i,u,o,{colorPool:E(t,o),minSize:2,maxSize:4,margin:0});if(c=c.filter(m=>{let f=new Set(m.cells.map(([h,v])=>`${h},${v}`)),d=Pe(m.cells);return!m.cells.every(([h,v])=>f.has(`${h},${d.minC+d.maxC-v}`))}),c.length<1)return{input:[[0]],output:[[1]]};let r=_t(i,u,c),s=fo(r);return{input:r,output:s}},n=k(3,l,(i,u)=>!G(i.input,i.output)&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["Each object flipped \u2014 but the grid border stayed put. How?","Every object is mirrored left-right inside its own bounding box, without moving.","The rule: mirror each object horizontally in place \u2014 reflect the object's cells across the vertical center of its own bounding box."],"In-place mirroring: every object is flipped horizontally within its own bounding box; objects keep their position and color.")}function Xh(t,e){let l=()=>{let{h:i,w:u}=q(t,e,7,12),o=z(t,2,3),c=Math.floor(i/3);if(c<o)return{input:[[0]],output:[[1]]};let r=[],s=E(t,o),m=[...Array(c).keys()].sort(()=>t()-.5).slice(0,o);for(let v=0;v<o;v++){let T=m[v]*3,y=z(t,2,3),p=T+z(t,0,2),b=z(t,1,u-y-1);if(b<1||b+y>u)return{input:[[0]],output:[[1]]};let S=[];for(let D=0;D<y;D++)S.push([p,b+D]);r.push({cells:S,color:s[v]})}let f=_t(i,u,r),d=nt(f),h=M(i,u,0);for(let v of d.objects){let T=Pe(v.cells);for(let[y,p]of v.cells)h[y][p-T.minC]=v.color}return{input:f,output:h}},n=k(3,l,(i,u)=>!G(i.input,i.output)&&!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The objects slid sideways. Where do they stop?","Each object moves left until it touches the left edge of the grid.","The rule: translate every object horizontally so its leftmost cell is in column 0, keeping its rows unchanged."],"Left alignment: each object is shifted horizontally until it hugs the left wall, preserving its vertical position.")}function l1(t,e){let l=()=>{let i=z(t,2,Math.max(2,Math.round(3+e*2))),u=O(t,E(t,1)),o=O(t,["rect","line","any"]),c=Nt(t,i,i,1,{colorPool:[u],minSize:Math.max(2,i-1),maxSize:i*i,shapes:o,margin:0});if(c.length===0)return{input:[[0]],output:[[1]]};let r=_t(i,i,c),s=ke(r);return{input:r,output:oo(s,2)}},n=k(3,l,(i,u)=>!u.some(o=>G(o.input,i.input))),a=_(l,n);return H(n,a,["The shape came back bigger. How much bigger, and where does it sit?","Every cell of the shape becomes a 2\xD72 block \u2014 the object is magnified 2\xD7, anchored at the top-left of the output.","The rule: crop the object to its bounding box, then scale it \xD72 (each cell becomes a 2\xD72 square). Output dims = 2 \xD7 cropped dims."],"Magnification: the single object is cropped and scaled \xD72 \u2014 every cell expands into a 2\xD72 block.")}function n1(t,e){return O(t,[kh,Yh,Lh,Xh])(t,e)}function Qh(t,e){let l=O(t,[ht,ze,Ae,yt,Qt,Wt]),n=O(t,["map","swap","keep"]),[a,i,u]=E(t,3),o,c;n==="map"?(o=h=>F(h,{[a]:i}),c=`${R(a)} (${a}) \u2192 ${R(i)} (${i})`):n==="swap"?(o=h=>F(h,{[a]:i,[i]:a}),c=`swap ${R(a)} (${a}) \u2194 ${R(i)} (${i})`):(o=h=>F(h,{[u]:0,[i]:0}),c=`erase everything except ${R(a)} (${a})`);let r=h=>o(l(h)),s=rs.filter(h=>h!==l).map(h=>v=>o(h(v))),m=()=>{let{h,w:v}=q(t,e,4,8),T=M(h,v,0),y=n==="map"?[a,u]:n==="swap"?[a,i,u]:[a,u,i];for(let p=0;p<h;p++)for(let b=0;b<v;b++)B(t,.4)&&(T[p][b]=O(t,y));return{input:T,output:r(T)}},f=Ft(t,3,m,{alts:s}),d=Pt(l);return H(f,_(m,f),["This rule has two steps. Find both, and their order.",`Step 1 is geometric (${d}); step 2 is a color rule (${c}). Geometry happens FIRST.`,`The rule: apply the geometric transform (${d}) to the input, then apply the color rule (${c}) to the result.`],`A composition: geometry first (${d}), then color (${c}). Verify the order on the examples before submitting.`)}function Pt(t){return t===ht?"rotate 90\xB0 clockwise":t===ze?"rotate 180\xB0":t===Ae?"rotate 270\xB0 clockwise":t===yt?"flip left-right":t===Qt?"flip top-bottom":"transpose"}function Vh(t,e){let l=O(t,[0,1]),n=z(t,1,2),[a]=E(t,1),i=c=>co(vl(c,l,n),a),u=()=>{let{h:c,w:r}=q(t,e,5,8),s=M(c,r,0),m=E(t,2);for(let f=0;f<c-1;f++)for(let d=0;d<r-n;d++)B(t,.4)&&(s[f][d]=O(t,m));return{input:s,output:i(s)}},o=k(3,u,(c,r)=>!r.some(s=>G(s.input,c.input)));return H(o,_(u,o),["The drawing moved AND gained a border. Find both steps.",`The content shifts ${l===0?"":`down ${l} and `}right ${n}; then a 1-cell frame of one color wraps the whole grid.`,`The rule: shift the content by (${l}, ${n}), then wrap the result in a 1-cell border of color ${a}. Output dims are +2 in both directions.`],`Composition: translate by (${l}, ${n}), then add a ${R(a)} (${a}) border around the entire grid.`)}function a1(t,e){let l=O(t,[0,1]),n=z(t,1,2),[a,i]=E(t,2),u=r=>F(vl(r,l,n),{[a]:i}),o=()=>{let{h:r,w:s}=q(t,e,5,9),m=M(r,s,0),f=[a,...E(t,1,[a,i])];for(let d=0;d<r-1;d++)for(let h=0;h<s-n;h++)B(t,.4)&&(m[d][h]=O(t,f));return m.flat().includes(a)||(m[0][0]=a),{input:m,output:u(m)}},c=k(3,o,(r,s)=>!s.some(m=>G(m.input,r.input)));return H(c,_(o,c),["Two changes again: position and color.",`Content shifts (down ${l}, right ${n}) and ${R(a)} (${a}) becomes ${R(i)} (${i}).`,`The rule: first translate by (${l}, ${n}), then recolor ${a} \u2192 ${i}.`],`Composition: shift by (${l}, ${n}), then substitute color ${R(a)} \u2192 ${R(i)}.`)}function Zh(t,e){let[l,n]=E(t,2),a=o=>F(zi(o),{[l]:n}),i=()=>{let{h:o,w:c}=q(t,e,7,11),r=z(t,2,3),s=Nt(t,o,c,r,{colorPool:[l,...E(t,1,[l,n])],minSize:1,maxSize:3,margin:0}),m=_t(o,c,s);return{input:m,output:a(m)}},u=k(3,i,(o,c)=>!G(o.input,o.output)&&!c.some(r=>G(r.input,o.input)));return H(u,_(i,u),["Objects fall AND colors change. Order the two steps.","Gravity acts first; the color substitution is applied to the settled result.",`The rule: let every object fall to the bottom, then recolor ${R(l)} (${l}) \u2192 ${R(n)} (${n}).`],`Composition: gravity first, then the color mapping ${l} \u2192 ${n}.`)}function Kh(t,e){let l=O(t,[yt,ht]),n=u=>l(ke(u)),a=()=>{let{h:u,w:o}=q(t,e,6,10),c=M(u,o,0),r=E(t,2),s=z(t,1,2),m=z(t,1,2),f=z(t,3,u-s-1),d=z(t,3,o-m-1);for(let h=s;h<s+f;h++)for(let v=m;v<m+d;v++)B(t,.5)&&(c[h][v]=O(t,r));return{input:c,output:n(c)}},i=k(3,a,(u,o)=>!o.some(c=>G(c.input,u.input)));return H(i,_(a,i),["The result is cropped AND flipped or turned. Which comes first?","Crop to the content box first, then apply the geometric transform to the crop.",`The rule: crop the input to its non-zero bounding box, then ${l===yt?"flip it left-right":"rotate it 90\xB0 clockwise"}.`],`Composition: crop to content, then ${l===yt?"horizontal flip":"90\xB0 rotation"}.`)}function i1(t,e){return O(t,[Qh,Vh,Zh,Kh])(t,e)}function $h(t,e){let[l,n]=E(t,2),a=o=>o.flat().includes(l)?ht(o):yt(o),i=()=>{let{h:o,w:c}=q(t,e,4,8),r=M(o,c,0),s=B(t,.5),m=s?[l,n]:[n];for(let f=0;f<o;f++)for(let d=0;d<c;d++)B(t,.4)&&(r[f][d]=O(t,m));return s&&!r.flat().includes(l)&&(r[0][0]=l),{input:r,output:a(r)}},u=Ft(t,4,i,{reject:o=>G(ht(o.input),yt(o.input))});return H(u,_(i,u),["The geometric move is different from example to example. What signals the change?",`If color ${R(l)} (${l}) is present the grid rotates 90\xB0 cw; otherwise it mirrors left-right.`,`The rule is conditional on content: ${R(l)} present \u2192 rotate 90\xB0 clockwise; absent \u2192 flip horizontally.`],`Context rule: the presence of color ${R(l)} selects the transformation (rotation vs mirror).`)}function Jh(t,e){let[l,n]=E(t,2),a=o=>{let c=nt(o);return c.objects.length>=2?Zt(o,[Vt(c.objects)]):F(o,{[l]:n})},i=()=>{let{h:o,w:c}=q(t,e,6,10);if(B(t,.5)){let s=z(t,2,3),m=Nt(t,o,c,s,{colorPool:E(t,s),minSize:1,maxSize:4,margin:0}),f=m.map(d=>d.cells.length);return new Set(f).size!==f.length?{input:[[0]],output:[[1]]}:{input:_t(o,c,m),output:[[0]]}}let r=M(o,c,0);for(let s=0;s<o;s++)for(let m=0;m<c;m++)B(t,.4)&&(r[s][m]=O(t,[l]));return r.flat().includes(l)||(r[0][0]=l),{input:r,output:a(r)}},u=k(4,i,(o,c)=>{if(!o.input.flat().some(s=>s!==0))return!1;let r=nt(o.input);return!c.some(s=>G(s.input,o.input))&&(r.objects.length>=2||r.objects.length===1)}).map(o=>({input:o.input,output:nt(o.input).objects.length>=2?Zt(o.input,[Vt(nt(o.input).objects)]):F(o.input,{[l]:n})}));return H(u,_(i,u),["Sometimes the small shapes vanish, sometimes colors change. What decides?","Count the objects: 2 or more \u2192 keep only the largest; exactly 1 \u2192 recolor it.",`The rule depends on the object count: \u22652 objects \u2192 keep the largest; 1 object \u2192 recolor ${R(l)} (${l}) \u2192 ${R(n)} (${n}).`],"Context rule on object count: multiple objects trigger size selection; a single object triggers recoloring.")}function Wh(t,e){let l=()=>{let{h:a,w:i}=q(t,e,4,9),u=M(a,i,0),o=E(t,2);for(let c=0;c<a;c++)for(let r=0;r<i;r++)B(t,.4)&&(u[c][r]=O(t,o));return{input:u,output:a%2===0?Qt(u):yt(u)}},n=Ft(t,4,l,{reject:a=>{let u=a.input.length%2===0?Qt(a.input):yt(a.input);return G(u,a.input)||G(yt(a.input),Qt(a.input))}});return H(n,_(l,n),["Some grids mirror top-bottom, others left-right. What property of the GRID decides?","The parity of the height: even height \u2192 vertical flip; odd height \u2192 horizontal flip.","The rule: if the number of rows is even, flip top-bottom; if odd, flip left-right."],"Context rule on grid parity: height even \u2192 flipV, height odd \u2192 flipH.")}function Fh(t,e){let[l,n,a]=E(t,3),i=c=>{let r=Math.floor(c.length/2);return c.map((s,m)=>s.map(f=>f===l?m<r?n:a:f))},u=()=>{let c=z(t,6,10),r=z(t,5,9),s=M(c,r,0);for(let m=0;m<c;m++)for(let f=0;f<r;f++)B(t,.4)&&(s[m][f]=O(t,[l,...E(t,0),O(t,[0,0,O(t,E(t,1,[l,n,a]))])]));for(let m=0;m<4;m++){let f=m<2?z(t,0,Math.floor(c/2)-1):z(t,Math.floor(c/2),c-1);s[f][z(t,0,r-1)]=l}return{input:s,output:i(s)}},o=k(3,u,(c,r)=>{let s=Math.floor(c.input.length/2),m=c.input.slice(0,s).flat().includes(l),f=c.input.slice(s).flat().includes(l);return m&&f&&!r.some(d=>G(d.input,c.input))}).map(c=>({input:c.input,output:i(c.input)}));return H(o,_(u,o),["One source color becomes TWO different colors. What distinguishes the two cases?",`Rows matter: ${R(l)} (${l}) becomes ${R(n)} (${n}) in the top half and ${R(a)} (${a}) in the bottom half.`,`The rule is region-based: in the top half of the grid recolor ${l} \u2192 ${n}; in the bottom half recolor ${l} \u2192 ${a}.`],`Region-dependent recoloring of ${R(l)}: top half \u2192 ${R(n)}, bottom half \u2192 ${R(a)}.`)}function Ph(t,e){let n=u=>{let o=nt(u);if(o.objects.length===0)return u;let c=Vt(o.objects);return c.size>=4?Zt(u,[c]):M(vt(u).h,vt(u).w,0)},a=()=>{let{h:u,w:o}=q(t,e,7,11),c=B(t,.5),r=c?z(t,2,3):z(t,2,4),s=c?6:3,m=Nt(t,u,o,r,{colorPool:E(t,r),minSize:1,maxSize:s,margin:0}),f=_t(u,o,m);return{input:f,output:n(f)}},i=k(4,a,(u,o)=>{let c=nt(u.input);if(c.objects.length===0)return!1;let r=Vt(c.objects).size>=4,s=o.some(m=>Vt(nt(m.input).objects).size>=4);return r!==s||o.length===0?!o.some(m=>G(m.input,u.input)):!1}).map(u=>({input:u.input,output:n(u.input)}));return H(i,_(a,i),["Sometimes one shape survives, sometimes the grid empties completely. Why?","It depends on size: if the biggest object has 4 or more cells it is kept; otherwise everything is erased.","The rule: keep the largest object only when its size \u2265 4; otherwise output an all-black grid of the same size."],"Threshold rule on object size: largest object \u2265 4 cells \u2192 keep it; smaller \u2192 the output is empty (all zeros).")}function u1(t,e){let[l,n,a]=E(t,3),i=r=>{let s=Pe(r),m=s.maxR-s.minR+1,f=s.maxC-s.minC+1;if(m!==f)return!1;let d=new Set(r.map(([h,v])=>`${h},${v}`));for(let h=s.minR;h<=s.maxR;h++)for(let v=s.minC;v<=s.maxC;v++)if(!d.has(`${h},${v}`))return!1;return!0},u=r=>nt(r).objects.some(f=>i(f.cells))?Ai(r,l):F(r,{[n]:a}),o=()=>{let{h:r,w:s}=q(t,e,7,11),m=B(t,.5),f=Nt(t,r,s,z(t,1,2),{colorPool:E(t,2,[l]),minSize:1,maxSize:3,margin:1,shapes:"rect"});if(m){let h=z(t,2,3),v=[],T=z(t,1,Math.max(1,r-h-1)),y=z(t,1,Math.max(1,s-h-1));for(let p=T;p<T+h;p++)for(let b=y;b<y+h;b++)v.push([p,b]);f.push({cells:v,color:O(t,E(t,1,[l]))})}let d=_t(r,s,f);if(!d.flat().includes(n)){let h=[[0,0]];for(let[v,T]of h)d[v][T]=n}return{input:d,output:u(d)}},c=k(4,o,(r,s)=>{let m=nt(r.input);if(m.objects.length===0)return!1;let f=m.objects.some(h=>i(h.cells)),d=s.some(h=>nt(h.input).objects.some(v=>i(v.cells)));return(f!==d||s.length===0)&&!s.some(h=>G(h.input,r.input))}).map(r=>({input:r.input,output:u(r.input)}));return H(c,_(o,c),["Square shapes trigger something different than non-square drawings.","If ANY object is a perfect square, every object gets a frame; otherwise the color substitution applies.",`The rule: a perfect square object present \u2192 frame every object with color ${R(l)} (${l}); no square \u2192 recolor ${R(n)} (${n}) \u2192 ${R(a)} (${a}).`],"Shape-conditional rule: the presence of a square object selects framing over recoloring.")}function o1(t,e){return O(t,[$h,Jh,Wh,Fh,Ph])(t,e)}function Ih(t,e){let l=O(t,[Wt,Ae,Qt,ze]),[n,a]=E(t,2),i=c=>F(l(c),{[n]:a}),u=()=>{let{h:c,w:r}=q(t,e,4,8),s=M(c,r,0);for(let m=0;m<c;m++)for(let f=0;f<r;f++)B(t,.4)&&(s[m][f]=O(t,[n,...E(t,0),0]));return s.flat().includes(n)||(s[0][0]=n),{input:s,output:i(s)}},o=Ft(t,2,u,{alts:rs.filter(c=>c!==l).map(c=>r=>F(c(r),{[n]:a}))});return H(o,_(u,o),["Only two examples \u2014 make them count. Two operations are composed here.",`Geometry (${Pt(l)}) first, then recolor ${R(n)} (${n}) \u2192 ${R(a)} (${a}).`,`Program: [${Pt(l)}, recolor ${n}\u2192${a}]. Apply the geometry, then substitute the color.`],`Two-op program: ${Pt(l)} \u2192 recolor ${n}\u2192${a}.`)}function t0(t,e){let l=O(t,[ht,yt,Wt]),n=O(t,[0,1]),a=O(t,[1,2]),[i,u]=E(t,2),o=s=>F(vl(l(s),n,a),{[i]:u}),c=()=>{let{h:s,w:m}=q(t,e,5,8),f=M(s,m,0);for(let d=0;d<s-2;d++)for(let h=0;h<m-a;h++)B(t,.4)&&(f[d][h]=O(t,[i]));return f.flat().includes(i)||(f[0][0]=i),{input:f,output:o(f)}},r=Ft(t,2,c,{});return H(r,_(c,r),["Three operations, two examples. Work step by step from one example, verify on the other.",`Transform (${Pt(l)}), then shift (down ${n}, right ${a}), then recolor ${i}\u2192${u}.`,`Program: [${Pt(l)}, shift (${n},${a}), recolor ${i}\u2192${u}]. Order matters.`],`Three-op program: ${Pt(l)} \u2192 shift (${n}, ${a}) \u2192 recolor ${i}\u2192${u}.`)}function e0(t,e){let l=O(t,[1,2,3]),n=[ht,ze,Ae][l-1],a=rs.filter(o=>o!==n),i=()=>{let{h:o,w:c}=q(t,e,4,8),r=M(o,c,0),s=E(t,2);for(let m=0;m<o;m++)for(let f=0;f<c;f++)B(t,.4)&&(r[m][f]=O(t,s));return{input:r,output:n(r)}},u=Ft(t,3,i,{alts:a});return H(u,_(i,u),["The rotation angle is not told to you. Infer it from the examples.","Compare where a distinctive corner cell ends up \u2014 that pins the rotation amount.",`The hidden parameter is ${l*90}\xB0 clockwise: every example rotates by the same k = ${l}.`],`Parameter inference: the program is rotate(${l*90}\xB0 cw) \u2014 consistent across every example.`)}function l0(t,e){let[l,n]=E(t,2),a=o=>{let c=nt(o);if(c.objects.length===0)return o;let r=c.objects.map(s=>s.size);return new Set(r).size!==r.length?o:F(Zt(o,[Vt(c.objects)]),{[l]:n})},i=()=>{let{h:o,w:c}=q(t,e,7,11),r=z(t,2,3),s=Nt(t,o,c,r,{colorPool:E(t,r),minSize:1,maxSize:5,margin:0}),m=s.map(d=>d.cells.length);if(new Set(m).size!==m.length)return{input:[[0]],output:[[1]]};let f=_t(o,c,s);return{input:f,output:a(f)}},u=k(2,i,(o,c)=>!c.some(r=>G(r.input,o.input))&&!G(o.input,a(o.input))&&o.input.length>1).map(o=>({input:o.input,output:a(o.input)}));return H(u,_(i,u),["A selection happens before the color change.","First keep only the largest object, then apply the color substitution to it.",`Program: [keep-largest, recolor ${R(l)} (${l}) \u2192 ${R(n)} (${n})].`],"Two-stage program: object selection (largest) followed by a color substitution.")}function c1(t,e){let l=O(t,[yt,ze]),[n,a]=E(t,2),i=c=>F(l(c),{[n]:a}),u=()=>{let{h:c,w:r}=q(t,e,4,8),s=M(c,r,0);for(let m=0;m<c;m++)for(let f=0;f<r;f++)B(t,.4)&&(s[m][f]=O(t,[n]));return s.flat().includes(n)||(s[0][0]=n),{input:s,output:i(s)}},o=Ft(t,1,u,{});return H(o,_(u,o),["A single example. Look for the simplest two-step story that explains it.",`One geometric op (${Pt(l)}) and one color op (${n}\u2192${a}) \u2014 in that order.`,`Program: [${Pt(l)}, recolor ${n}\u2192${a}].`],`Minimal program: ${Pt(l)} then recolor ${n}\u2192${a}.`)}function r1(t,e){let l=O(t,["tile","crop","largest"]),n=o=>l==="tile"?Sl(o,2,2):l==="crop"?ke(o):(()=>{let c=nt(o);return c.objects.length?Zt(o,[Vt(c.objects)]):o})(),a=()=>{let o=z(t,4,9),c=z(t,4,9),r=M(o,c,0),s=E(t,2);for(let m=0;m<o;m++)for(let f=0;f<c;f++)B(t,.4)&&(r[m][f]=O(t,s));return{input:r,output:n(r)}},i=Ft(t,3,a,{}),u=new Set(i.map(o=>`${o.input.length}x${o.input[0].length}`));if(u.size<2&&i.length>=2){let o=Ft(t,2,a,{});for(let c of o){let r=`${c.input.length}x${c.input[0].length}`;u.has(r)||(i.push(c),u.add(r))}}return H(i,_(a,i),["The examples come in different sizes. Find the rule that works for ALL of them.",l==="tile"?"Every grid is tiled 2\xD72, whatever its size.":l==="crop"?"Every grid is cropped to its content box.":"In every grid only the largest object survives.",l==="tile"?"The size-independent program: tile the grid 2\xD72.":l==="crop"?"The size-independent program: crop to the non-zero bounding box.":"The size-independent program: keep the largest object, erase the rest."],"The same program applies at every grid size \u2014 the rule is scale-independent.")}function s1(t,e){return O(t,[Ih,t0,e0,l0])(t,e)}function n0(t,e){let l=O(t,[ht,yt,Wt]),n=O(t,[Qt,ht,yt].filter(r=>r!==l)),[a,i]=E(t,2),u=r=>F(n(l(r)),{[a]:i}),o=()=>{let{h:r,w:s}=q(t,e,5,9),m=M(r,s,0),f=[a,...E(t,1,[a,i])];for(let d=0;d<r;d++)for(let h=0;h<s;h++)B(t,.4)&&(m[d][h]=O(t,f));return m.flat().includes(a)||(m[0][0]=a),{input:m,output:u(m)}},c=Ft(t,3,o,{});return H(c,_(o,c),["Three composed operations. Decompose one example fully, then check the other two.",`Geometric ops compose first (${Pt(l)} then ${Pt(n)}), then the color map ${a}\u2192${i}.`,`Program: [${Pt(l)}, ${Pt(n)}, recolor ${a}\u2192${i}].`],`Triple composition: ${Pt(l)} \u2192 ${Pt(n)} \u2192 recolor ${a}\u2192${i}.`)}function a0(t,e){let l=()=>{let{h:a,w:i}=q(t,e,8,12),[u,o]=E(t,2),c=[],r=z(t,1,2),s=Math.floor(i/(r+1));for(let h=0;h<r;h++){let v=z(t,2,3),T=z(t,Math.floor(a/2),a-1),y=h*s+z(t,0,Math.max(0,s-v-1)),p=[];for(let b=0;b<v;b++)p.push([T,y+b]);c.push({cells:p,color:u})}let m=Nt(t,Math.floor(a/2),i,z(t,1,2),{colorPool:[o],minSize:2,maxSize:3,margin:0}),f=M(a,i,0);for(let h of[...c,...m])for(let[v,T]of h.cells)f[v][T]=h.color;let d=Gt(f);for(let h of c){let v=Pe(h.cells);for(let[T,y]of h.cells)d[T][y]=0,d[T-v.minR][y]=u}return{input:f,output:d}},n=k(3,l,(a,i)=>!G(a.input,a.output)&&!i.some(u=>G(u.input,a.input)));return H(n,_(l,n),["Some objects move, identical-looking others do not. What distinguishes the movers?","Only objects of ONE specific color travel to the top edge; every other color is a distractor that stays.","The rule: select objects by color, translate each so it touches the top edge (column preserved); ignore all other colors."],"Selective motion: objects of the target color move to the top; distractor objects are irrelevant to the rule.")}function i0(t,e){let l=()=>{let{h:a,w:i}=q(t,e,8,12),[u,o,c]=E(t,3),r=3,s=[],m=z(t,0,r-1),f=z(t,2,3),d=z(t,0,Math.max(0,a-4)),h=m*Math.floor(i/r)+z(t,0,Math.max(0,Math.floor(i/r)-f-1));for(let x=0;x<f;x++)s.push([d,h+x]);let v=[],T=z(t,2,3),y=z(t,0,Math.max(0,a-4)),p=z(t,0,i-T-1);for(let x=0;x<T;x++)v.push([y,p+x]);if(p>=h-1&&p<=h+f)return{input:[[0]],output:[[1]]};let b=M(a,i,0);for(let[x,N]of s)b[x][N]=u;for(let[x,N]of v)b[x][N]=o;let S=Gt(b);for(let[x,N]of s)S[x][N]=c;let D=Pe(v),w=a-1-D.maxR;for(let[x,N]of v)S[x][N]=0,S[x+w][N]=o;return{input:b,output:S}},n=k(3,l,(a,i)=>!G(a.input,a.output)&&!i.some(u=>G(u.input,a.input)));return H(n,_(l,n),["Two colors, two different laws, in the same grid.","Color A objects are simply recolored; color B objects drop to the bottom edge.","The rule is per-color: objects of color A \u2192 recolor to C; objects of color B \u2192 translate to the bottom edge (columns preserved)."],"Per-color laws: one color class is recolored in place; the other is moved to the bottom boundary.")}function u0(t,e){let l=()=>{let{h:a,w:i}=q(t,e,8,12),[u]=E(t,1),o=E(t,z(t,1,2),[u]),c=Nt(t,a,i,z(t,1,3),{colorPool:o,minSize:2,maxSize:4,margin:1}),r=_t(a,i,c),s=0,m=0,f=z(t,3,6);for(;s<f&&m++<200;){let v=z(t,1,a-2),T=z(t,1,i-2);r[v][T]!==0||[[1,0],[-1,0],[0,1],[0,-1],[1,1],[1,-1],[-1,1],[-1,-1]].some(([p,b])=>r[v+p][T+b]!==0)||(r[v][T]=u,s++)}let d=ke(r,0),h=Gt(r);for(let v=0;v<a;v++)for(let T=0;T<i;T++)h[v][T]===u&&(h[v][T]=0);return{input:r,output:ke(h)}},n=k(3,l,(a,i)=>!i.some(u=>G(u.input,a.input))&&a.input.length>1);return H(n,_(l,n),["The drawing is polluted by stray single cells. What happens to them?","The isolated single cells (a color never used by real objects) are deleted \u2014 and the rest is cropped tight.","The rule: remove every isolated single-cell object of the noise color, then crop to the remaining content box."],"Denoising + crop: delete the scattered single-cell noise, then crop to the bounding box of what remains.")}function o0(t,e){let l=O(t,["rotate","recolor"]),[n,a]=E(t,2),[i]=E(t,1,[n,a]),u=r=>{let s=Gt(r);for(let f=0;f<r.length;f++)for(let d=0;d<r[f].length;d++)s[f][d]===i&&(s[f][d]=0);let m=ke(s);return l==="rotate"?ht(m):F(m,{[n]:a})},o=()=>{let{h:r,w:s}=q(t,e,8,12),m=[n,...E(t,1,[n,a,i])],f=Nt(t,r,s,z(t,1,2),{colorPool:m,minSize:2,maxSize:4,margin:1}),d=_t(r,s,f),h=0,v=0;for(;h<4&&v++<200;){let T=z(t,1,r-2),y=z(t,1,s-2);d[T][y]!==0||[[1,0],[-1,0],[0,1],[0,-1],[1,1],[1,-1],[-1,1],[-1,-1]].some(([b,S])=>d[T+b][y+S]!==0)||(d[T][y]=i,h++)}return{input:d,output:u(d)}},c=k(3,o,(r,s)=>!s.some(m=>G(m.input,r.input))&&r.input.length>1);return H(c,_(o,c),["A three-stage pipeline: clean, crop, and one more step. Find the last step.",l==="rotate"?"After denoising and cropping, the result is rotated 90\xB0 clockwise.":"After denoising and cropping, one color is substituted.",l==="rotate"?`Program: [remove-noise (${i}), crop, rotate 90\xB0 cw].`:`Program: [remove-noise (${i}), crop, recolor ${n}\u2192${a}].`],l==="rotate"?"Pipeline: denoise \u2192 crop \u2192 rotate 90\xB0 clockwise.":"Pipeline: denoise \u2192 crop \u2192 recolor.")}function f1(t,e){return O(t,[n0,a0,i0,u0,o0])(t,e)}var c0={gravity:kh,"move-to-marker":e1,"frame-objects":Yh,"mirror-in-place":Lh,"align-left":Xh,"scale-object":l1,"w6-trial":n1,"geo-then-color":Qh,"shift-then-frame":Vh,"shift-then-color":a1,"gravity-then-color":Zh,"crop-then-geo":Kh,"w7-trial":i1,"by-color-presence":$h,"by-object-count":Jh,"by-parity":Wh,"region-rule":Fh,"by-size":Ph,"by-shape":u1,"w8-trial":o1,"two-op":Ih,"three-op":t0,"param-rotate":e0,"select-then-op":l0,"one-example":c1,"generalize-size":r1,"w9-trial":s1,"triple-op":n0,"distractor-color":a0,"multi-rule":i0,"noise-filter":u0,capstone:o0,"w10-trial":f1};var ba=[{id:1,name:"Grid Explorer",tagline:"Colors, dimensions, copying grids, and exact-match answers.",difficulty:"Beginner",skills:["colors","dimensions","copying"],lessons:["Copy the Pattern","Paint It All","One Color Changes","Two Colors Change","Color Swap","Keep One Color","Count the Cells","Name the Colors","Flip Foreground","Explorer Trial"],templates:["identity","fill-constant","map-one","map-two","swap-two","keep-one","count-cells","unique-colors","invert-fg","w1-trial"]},{id:2,name:"Shape Detective",tagline:"Connected components, object counting, size, and position.",difficulty:"Beginner",skills:["objects","counting","size","position"],lessons:["How Many Objects?","The Biggest One","Bigger of a Kind","The Smallest One","Size Tells Color","Crop to Content","Give It Room","Touching the Edge","Count the Colors","Detective Trial"],templates:["count-objects","keep-largest","keep-largest","keep-smallest","size-parity-recolor","crop-content","crop-content","border-objects","count-colors","w2-trial"]},{id:3,name:"Spatial Wizard",tagline:"Rotation, reflection, translation, and alignment.",difficulty:"Beginner",skills:["rotation","reflection","translation"],lessons:["Quarter Turn","Left-Right Mirror","Up-Down Mirror","Half Turn","Across the Diagonal","Three-Quarter Turn","Step to the Right","Step Downstairs","Mirror Then Turn","Wizard Trial"],templates:["rotate-k","flip-axis","flip-axis","rotate-k","transpose","rotate-k","shift-dxdy","shift-dxdy","flip-then-rotate","w3-trial"]},{id:4,name:"Pattern Hunter",tagline:"Repeating patterns, symmetry, continuation, and completion.",difficulty:"Easy",skills:["symmetry","tiling","completion"],lessons:["Finish the Mirror","Mirror Up and Down","Repair the Symmetry","Tile It Twice","Tile in a Row","Fix the Checkerboard","Four-Way Mirror","Extend the Rhythm","Stripe by Stripe","Hunter Trial"],templates:["complete-h","complete-v","fix-symmetry","tile-2x2","tile-1x2","checker-complete","quad-complete","extend-1d","stripes-complete","w4-trial"]},{id:5,name:"Color Logic",tagline:"Color substitution, recoloring, and color-dependent rules.",difficulty:"Easy",skills:["color-mapping","logic","neighborhoods"],lessons:["The Color Cycle","A Longer Cycle","The Big Map","Touch of Color","Rank by Frequency","Row by Row","The Odd Mirror","Neighborhood Rules","The Grand Map","Logic Trial"],templates:["cycle-colors","cycle-colors","map-many","adjacent-highlight","frequency-rank","row-gradient","mirror-diff","adjacent-highlight","map-many","w5-trial"]},{id:6,name:"Object Engineer",tagline:"Object movement, collision, containment, and construction.",difficulty:"Intermediate",skills:["object-motion","gravity","framing"],lessons:["Everything Falls","Mark My Spot","Fence Every Shape","Mirror Inside the Box","Hug the Left Wall","Double the Size","Falling Colors","Grand Fences","Precise Delivery","Engineer Trial"],templates:["gravity","move-to-marker","frame-objects","mirror-in-place","align-left","scale-object","gravity","frame-objects","move-to-marker","w6-trial"]},{id:7,name:"Rule Composer",tagline:"Combine two or more transformations in the right order.",difficulty:"Intermediate",skills:["composition","ordering"],lessons:["Turn Then Paint","Mirror Then Swap","Slide Then Fence","Diagonal Then Paint","Mirror Then Keep","Turn Then Swap","Slide Then Paint","Fall Then Paint","Crop Then Mirror","Composer Trial"],templates:["geo-then-color","geo-then-color","shift-then-frame","geo-then-color","geo-then-color","geo-then-color","shift-then-color","gravity-then-color","crop-then-geo","w7-trial"]},{id:8,name:"Context Master",tagline:"Choose different rules depending on object or grid context.",difficulty:"Advanced",skills:["conditionals","context","regions"],lessons:["The Color Signal","Counting Decides","Even or Odd","Two Halves, Two Rules","Size Matters","Square or Not","Signal, Harder","Counting, Harder","Halves, Harder","Master Trial"],templates:["by-color-presence","by-object-count","by-parity","region-rule","by-size","by-shape","by-color-presence","by-object-count","region-rule","w8-trial"]},{id:9,name:"Program Detective",tagline:"Infer a compact transformation program from demonstrations.",difficulty:"Advanced",skills:["program-inference","few-shot"],lessons:["Two Steps, Two Clues","Three Steps, Three Clues","The Hidden Number","Select Then Act","One Clue Only","Any Size Will Do","Two Steps, Harder","Three Steps, Harder","The Hidden Number II","Detective Trial"],templates:["two-op","three-op","param-rotate","select-then-op","one-example","generalize-size","two-op","three-op","param-rotate","w9-trial"]},{id:10,name:"ARC Grandmaster",tagline:"Unfamiliar puzzles, limited hints, and mixed reasoning skills.",difficulty:"Expert",skills:["mixed","noise-filtering","composition"],lessons:["The Triple Step","Ignore the Impostor","Two Laws at Once","Static on the Line","The Capstone","Grandmaster I","The Triple Step II","Impostors Everywhere","The Storm","Final Trial"],templates:["triple-op","distractor-color","multi-rule","noise-filter","capstone","capstone","triple-op","distractor-color","noise-filter","w10-trial"]}];function r0(t,e){return`w${t}l${e}`}function m1(){let t=[];for(let e of ba)for(let l=1;l<=10;l++)t.push({id:r0(e.id,l),world:e.id,level:l,title:e.lessons[l-1],template:e.templates[l-1],seed:ao("arc-lab-curriculum-v1",e.id,l),d:(l-1)/9,skills:e.skills,worldDifficulty:e.difficulty});return t}var Tn=m1();function s0(t){return Tn.find(e=>e.id===t)}var d1={...Bh,...c0};function m0(t,e,l){let n=d1[t];if(!n)throw new Error(`Unknown generator template: ${t}`);let a=is(e);return n(a,Math.max(0,Math.min(1,l)))}function Fl(t){let e=s0(t);if(!e)throw new Error(`Unknown level: ${t}`);return m0(e.template,e.seed,e.d)}var f0=["map-one","swap-two","keep-one","keep-largest","rotate-k","complete-h","fix-symmetry","tile-2x2","gravity","geo-then-color","cycle-colors","frame-objects","two-op","triple-op","noise-filter","capstone"];function ss(t=new Date){return new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Dhaka"}).format(t)}function p1(t){return`daily-${t}`}function d0(t){let e=ao("arc-lab-daily-v1",t),l=is(e),n=f0[e%f0.length],a=m0(n,e,.55);return{id:p1(t),template:n,draft:a}}var h1=[{op:"rotate90",label:"Rotate 90\xB0 cw",fn:ht},{op:"rotate180",label:"Rotate 180\xB0",fn:ze},{op:"rotate270",label:"Rotate 270\xB0 cw",fn:Ae},{op:"flipH",label:"Flip left-right",fn:yt},{op:"flipV",label:"Flip top-bottom",fn:Qt},{op:"transpose",label:"Transpose",fn:Wt}],y1=h1.map(({op:t,label:e,fn:l})=>({op:t,label:e,category:"geometry",describe:()=>e,apply:n=>l(n),paramChoices:()=>[{}]}));function p0(t,e){let l=[];for(let n=t;n<=e;n++)l.push(n);return l}var y0=[...y1,{op:"shift",label:"Shift",category:"shape",describe:t=>`Shift by (down ${t.dr}, right ${t.dc})`,apply:(t,e)=>vl(t,Number(e.dr),Number(e.dc)),paramChoices:()=>p0(-2,2).flatMap(t=>p0(-2,2).map(e=>({dr:t,dc:e}))).filter(t=>t.dr!==0||t.dc!==0)},{op:"scale2",label:"Scale \xD72",category:"shape",describe:()=>"Scale every cell to a 2\xD72 block",apply:t=>oo(t,2),paramChoices:()=>[{}]},{op:"tile2x2",label:"Tile 2\xD72",category:"shape",describe:()=>"Repeat the grid 2\xD72",apply:t=>Sl(t,2,2),paramChoices:()=>[{}]},{op:"tile1x2",label:"Tile 1\xD72",category:"shape",describe:()=>"Repeat the grid side by side",apply:t=>Sl(t,1,2),paramChoices:()=>[{}]},{op:"cropContent",label:"Crop to content",category:"shape",describe:()=>"Crop to the bounding box of non-zero cells",apply:t=>ke(t),paramChoices:()=>[{}]},{op:"wrapFrame",label:"Wrap frame",category:"shape",describe:t=>`Add a 1-cell border of ${t.color}`,apply:(t,e)=>co(t,Number(e.color)),paramChoices:t=>t.map(e=>({color:e}))},{op:"mapColor",label:"Recolor",category:"color",describe:t=>`Recolor ${t.pairs.map(([l,n])=>`${l}\u2192${n}`).join(", ")}`,apply:(t,e)=>{let l={};for(let[n,a]of e.pairs)l[n]=a;return F(t,l)},paramChoices:t=>{let e=[];for(let l of t)for(let n of t)l!==n&&e.push({pairs:[[l,n]]});return e}},{op:"swapColors",label:"Swap colors",category:"color",describe:t=>`Swap ${t.a} \u2194 ${t.b}`,apply:(t,e)=>F(t,{[Number(e.a)]:Number(e.b),[Number(e.b)]:Number(e.a)}),paramChoices:t=>{let e=[];for(let l=0;l<t.length;l++)for(let n=l+1;n<t.length;n++)e.push({a:t[l],b:t[n]});return e}},{op:"keepColor",label:"Keep one color",category:"color",describe:t=>`Keep only color ${t.color}, erase the rest`,apply:(t,e)=>F(t,Object.fromEntries(fh(t,!1).filter(l=>l!==Number(e.color)).map(l=>[l,0]))),paramChoices:t=>t.filter(e=>e!==0).map(e=>({color:e}))},{op:"setNonzero",label:"Paint foreground",category:"color",describe:t=>`Paint every non-zero cell ${t.color}`,apply:(t,e)=>t.map(l=>l.map(n=>n===0?0:Number(e.color))),paramChoices:t=>t.filter(e=>e!==0).map(e=>({color:e}))},{op:"keepLargest",label:"Keep largest object",category:"object",describe:()=>"Keep only the largest object",apply:t=>{let e=nt(t);return e.objects.length===0?t:Zt(t,[Vt(e.objects)])},paramChoices:()=>[{}]},{op:"keepSmallest",label:"Keep smallest object",category:"object",describe:()=>"Keep only the smallest object",apply:t=>{let e=nt(t);return e.objects.length===0?t:Zt(t,[so(e.objects)])},paramChoices:()=>[{}]},{op:"gravityDown",label:"Gravity down",category:"object",describe:()=>"Let every object fall to the bottom",apply:t=>zi(t),paramChoices:()=>[{}]},{op:"mirrorInPlace",label:"Mirror objects in place",category:"object",describe:()=>"Mirror each object horizontally inside its bounding box",apply:t=>fo(t),paramChoices:()=>[{}]},{op:"frameObjects",label:"Frame objects",category:"object",describe:t=>`Draw a border of ${t.color} around every object`,apply:(t,e)=>Ai(t,Number(e.color)),paramChoices:t=>t.filter(e=>e!==0).map(e=>({color:e}))}];function b0(t){return y0.find(e=>e.op===t)}function fs(t,e){let l=b0(e.op);if(!l)return null;try{let n=l.apply(t,e.params??{});return!Array.isArray(n)||n.length===0||!Array.isArray(n[0])?null:n}catch{return null}}function mo(t,e){let l=t;for(let n of e){let a=fs(l,n);if(!a)return null;l=a}return l}function po(t){return t.map(e=>{let l=b0(e.op);return l?l.describe(e.params??{}):e.op})}function b1(t,e){if(t.length!==e.length||t[0].length!==e[0].length)return 0;let l=0,n=t.length*t[0].length;for(let a=0;a<t.length;a++)for(let i=0;i<t[0].length;i++)t[a][i]===e[a][i]&&l++;return n===0?0:l/n}function ho(t,e){let l=Math.min(e?.maxOps??2,3),n=e?.maxPrograms??2e5,a=e?.timeBudgetMs??3e3,i=e?.topK??12,u=Date.now()+a,o=new Set;for(let T of t){for(let y of T.input)for(let p of y)o.add(p);if(T.output)for(let y of T.output)for(let p of y)o.add(p)}let c=[...o],r=[];for(let T of y0)for(let y of T.paramChoices(c))r.push({op:T.op,params:y});let s=t[0],m=[],f=0,d=[];for(let T of r){if(Date.now()>u||f>n)break;let y=[],p=!0;for(let b of t){let S=fs(b.input,T);if(!S){p=!1;break}y.push(S)}p&&(f++,Jt(y[0],s.output)&&(d.push({program:[T],grids:y}),m.push(h0([T],t,y))))}for(let T=2;T<=l&&!(Date.now()>u||d.length===0);T++){let y=[];for(let p of d)for(let b of r){if(Date.now()>u||f>n)break;let S=[],D=!0;for(let w=0;w<t.length;w++){let x=fs(p.grids[w],b);if(!x){D=!1;break}S.push(x)}D&&(f++,Jt(S[0],s.output)&&(y.push({program:[...p.program,b],grids:S}),m.push(h0([...p.program,b],t,S))))}d=y.slice(0,400)}m.sort((T,y)=>y.score-T.score);let h=new Set,v=[];for(let T of m){let y=JSON.stringify(T.outputs[0]);if(!h.has(y)&&(h.add(y),v.push(T),v.length>=i))break}return v}function h0(t,e,l){let n=!0,a=0;for(let o=0;o<e.length;o++){let c=e[o].output;c&&(Jt(l[o],c)||(n=!1),a+=b1(l[o],c))}let i=a/Math.max(1,e.length),u=(n?1e3:0)+i*100+(10-t.length);return{program:t,fitsAll:n,trainPixelAcc:i,score:u,outputs:l}}function ms(t,e){if(!t)return!1;let l=Sn(t,e);return l.shapeEqual&&l.diffCells===0}function g0(t,e){if(!t)return 0;let l=Sn(t,e);return!l.shapeEqual||l.totalCells===0?0:1-l.diffCells/l.totalCells}var g=Ei(ds());function S1(t,e){for(let a of os)if(t.every(i=>Jt(a.fn(i.input),i.output)))return a.fn(e);let l=new Set;for(let a of t){for(let i of a.input)for(let u of i)l.add(u);for(let i of a.output)for(let u of i)l.add(u)}for(let a of l)for(let i of l)if(a!==i&&t.every(u=>Jt(F(u.input,{[a]:i}),u.output)))return F(e,{[a]:i});if(t.every(a=>{let i=nt(a.input);return i.objects.length===0?!1:Jt(Zt(a.input,[Vt(i.objects)]),a.output)})){let a=nt(e);if(a.objects.length>0)return Zt(e,[Vt(a.objects)])}return e.map(a=>[...a])}function T1(t){let e=new Map;for(let s of t){let m=`${s.output.length}x${s.output[0].length}`;e.set(m,(e.get(m)??0)+1)}let l="",n=-1;for(let[s,m]of e)m>n&&(l=s,n=m);let[a,i]=l.split("x").map(Number),u=t.find(s=>s.output.length===a&&s.output[0].length===i).output,o=io(u),c=0,r=-1;for(let[s,m]of o)s!==0&&m>r&&(c=s,r=m);return M(a,i,c)}function z1(t,e){let l=t[0],n=1/0;for(let a of t){let i=Sn(a.input,e),u=i.shapeEqual?i.diffCells:999;u<n&&(n=u,l=a)}return l.output}var D0="arc-lab-demo-xp",E0="arc-lab-demo-solved";function O0(){return Number(localStorage.getItem(D0)??0)}function A1(t){let e=O0()+t;return localStorage.setItem(D0,String(e)),e}function C0(){try{return JSON.parse(localStorage.getItem(E0)??"[]")}catch{return[]}}function x1(t){let e=[...new Set([...C0(),t])];return localStorage.setItem(E0,JSON.stringify(e)),e}function zn({grid:t,cell:e=16,highlight:l=[],onCell:n,title:a}){let i=new Set(l.map(([u,o])=>`${u}:${o}`));return(0,g.jsxs)("div",{children:[a&&(0,g.jsx)("div",{className:"mini-label",children:a}),(0,g.jsx)("div",{className:"arcgrid",style:{gridTemplateColumns:`repeat(${t[0]?.length??0}, ${e}px)`},children:t.map((u,o)=>u.map((c,r)=>{let s=i.has(`${o}:${r}`);return(0,g.jsx)("div",{className:n?"cell clickable":"cell",style:{width:e,height:e,backgroundColor:uo(c),backgroundImage:us(c)||void 0,backgroundSize:"8px 8px",outline:s?"2px solid #10b981":void 0,outlineOffset:-1},onPointerDown:n?()=>n(o,r):void 0,onPointerEnter:n?m=>{m.buttons===1&&n(o,r)}:void 0,title:`r${o+1}c${r+1} ${R(c)}`},`${o}-${r}`)}))})]})}function M0({pair:t,idx:e}){return(0,g.jsxs)("div",{className:"pair",children:[(0,g.jsx)("span",{className:"pair-num",children:e+1}),(0,g.jsx)(zn,{grid:t.input,title:"Input"}),(0,g.jsx)("span",{className:"arrow",children:"\u2192"}),(0,g.jsx)(zn,{grid:t.output,title:"Output"})]})}function D1(){let[t,e]=Y.default.useState("play"),[l,n]=Y.default.useState(0),[a,i]=Y.default.useState([]);return Y.default.useEffect(()=>{n(O0()),i(C0())},[]),(0,g.jsxs)("div",{className:"wrap",children:[(0,g.jsxs)("header",{className:"topbar",children:[(0,g.jsxs)("div",{className:"brand",children:[(0,g.jsxs)("div",{className:"logo",children:[(0,g.jsx)("span",{style:{background:"#FF4136"}}),(0,g.jsx)("span",{style:{background:"#2ECC40"}}),(0,g.jsx)("span",{style:{background:"#FFDC00"}}),(0,g.jsx)("span",{style:{background:"#F012BE"}})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("strong",{children:"ARC Lab"}),(0,g.jsx)("span",{className:"tagline",children:" \xB7 static demo"})]})]}),(0,g.jsx)("nav",{children:["play","agents","search","arena","about"].map(u=>(0,g.jsx)("button",{className:t===u?"navlink active":"navlink",onClick:()=>e(u),children:u==="play"?"Academy":u==="agents"?"Agent Lab":u==="search"?"Workbench":u==="arena"?"Arena":"About"},u))}),(0,g.jsxs)("div",{className:"xp",children:["\u26A1 ",l," XP"]})]}),(0,g.jsxs)("main",{children:[t==="play"&&(0,g.jsx)(C1,{xp:l,setXp:n,solved:a,setSolved:i}),t==="agents"&&(0,g.jsx)(O1,{}),t==="search"&&(0,g.jsx)(M1,{}),t==="arena"&&(0,g.jsx)(N1,{}),t==="about"&&(0,g.jsx)(R1,{})]}),(0,g.jsxs)("footer",{className:"foot",children:["Static client-side demo powered by the real ",(0,g.jsx)("code",{children:"arc-core"}),". Full app (server-validated answers, arena persistence, LLM adapter) on"," ",(0,g.jsx)("a",{href:"https://github.com/acco-cyber/ARC-Lab",target:"_blank",rel:"noreferrer",children:"GitHub"}),"."]})]})}var E1=`
self.onmessage = function (e) {
  const { code, train, testInputs } = e.data;
  const results = [];
  const logs = [];
  try {
    const H = {
      dims: (g) => ({ h: g.length, w: g[0] ? g[0].length : 0 }),
      clone: (g) => g.map((r) => r.slice()),
      make: (h, w, fill) => Array.from({ length: h }, () => Array(w).fill(fill || 0)),
      rot90: (g) => { const h = g.length, w = g[0].length; const out = Array.from({ length: w }, () => Array(h).fill(0)); for (let r = 0; r < h; r++) for (let c = 0; c < w; c++) out[c][h - 1 - r] = g[r][c]; return out; },
      rot180: (g) => g.map((r) => r.slice().reverse()).reverse(),
      rot270: (g) => { const h = g.length, w = g[0].length; const out = Array.from({ length: w }, () => Array(h).fill(0)); for (let r = 0; r < h; r++) for (let c = 0; c < w; c++) out[w - 1 - c][r] = g[r][c]; return out; },
      flipH: (g) => g.map((r) => r.slice().reverse()),
      flipV: (g) => g.slice().reverse(),
      transpose: (g) => g[0].map((_, c) => g.map((r) => r[c])),
      recolor: (g, map) => g.map((r) => r.map((c) => (map[c] === undefined ? c : map[c]))),
      shift: (g, dr, dc) => { const h = g.length, w = g[0].length; const out = Array.from({ length: h }, () => Array(w).fill(0)); for (let r = 0; r < h; r++) for (let c = 0; c < w; c++) { const nr = r + dr, nc = c + dc; if (nr >= 0 && nr < h && nc >= 0 && nc < w) out[nr][nc] = g[r][c]; } return out; },
      log: (...a) => { logs.push(a.map((x) => (typeof x === 'object' ? JSON.stringify(x) : String(x))).join(' ')); },
    };
    let body = code;
    const declMatch = code.match(/^\\s*(?:async\\s+)?function\\s*[A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*\\{/);
    if (declMatch) {
      const open = code.indexOf('{', declMatch[0].length - 1);
      let depth = 0;
      for (let i = open; i < code.length; i++) {
        if (code[i] === '{') depth++;
        else if (code[i] === '}') { depth--; if (depth === 0) { body = code.slice(open + 1, i); break; } }
      }
    }
    const factory = new Function('train', 'testInput', 'H', '"use strict";' + body);
    let solve;
    try {
      const maybe = factory(undefined, undefined, H);
      if (typeof maybe === 'function') solve = maybe;
      else solve = (t, i) => factory(t, i, H);
    } catch (probeErr) {
      solve = (t, i) => factory(t, i, H);
    }
    for (const testInput of testInputs) results.push(solve.call(H, train, testInput));
    self.postMessage({ ok: true, results, logs });
  } catch (err) {
    self.postMessage({ ok: false, error: String((err && err.message) || err), logs });
  }
};
`;function z0(t,e,l,n=5e3){return new Promise(a=>{let i;try{let o=new Blob([E1],{type:"application/javascript"});i=new Worker(URL.createObjectURL(o))}catch(o){a({ok:!1,error:"worker-unavailable: "+String(o)});return}let u=setTimeout(()=>{i.terminate(),a({ok:!1,error:"Timed out after "+n+" ms (infinite loop?)."})},n);i.onmessage=o=>{clearTimeout(u),i.terminate(),a(o.data)},i.onerror=o=>{clearTimeout(u),i.terminate(),a({ok:!1,error:o.message||"worker-error"})},i.postMessage({code:t,train:e,testInputs:l})})}var A0=[{id:"copy-bot",name:"Copy Bot",emoji:"\u{1FA9E}",desc:"Echoes the input back \u2014 the sanity agent."},{id:"rule-sniffer",name:"Rule Sniffer",emoji:"\u{1F50D}",desc:"Single geometric ops \u2192 recolors \u2192 keep-largest."},{id:"program-searcher",name:"Program Searcher",emoji:"\u{1F9E9}",desc:"Bounded DSL program search (depth \u2264 2)."},{id:"custom-js",name:"My Agent (JS)",emoji:"\u{1F9D1}\u200D\u{1F4BB}",desc:"Your own solver, sandboxed + auto-verified."}];function O1(){let[t,e]=Y.default.useState("rule-sniffer"),[l,n]=Y.default.useState(1),[a,i]=Y.default.useState(1),[u,o]=Y.default.useState("return testInput.map(r => r.slice());"),[c,r]=Y.default.useState("idle"),[s,m]=Y.default.useState([]),[f,d]=Y.default.useState(0),[h,v]=Y.default.useState(null),[T,y]=Y.default.useState(void 0),[p,b]=Y.default.useState(null),[S,D]=Y.default.useState(null),w=Y.default.useRef([]),x=Y.default.useRef(null),N="w"+l+"l"+a,[C,j]=Y.default.useState("curriculum"),[ct,xe]=Y.default.useState("training"),[ne,Pl]=Y.default.useState(null),[Ye,Le]=Y.default.useState(null),[bo,ps]=Y.default.useState(!1),[hs,ga]=Y.default.useState(null),Tl=Y.default.useMemo(()=>{if(C==="official"&&ne)return{train:ne.train,testInput:ne.testInput,testOutput:ne.testOutput,hints:["","",""],explanation:""};try{return Fl(N)}catch{return Fl("w1l1")}},[C,ne,N]),go="arc-lab-official-seen-v1",N0=U=>{try{return JSON.parse(localStorage.getItem(go)||"{}")[U]||[]}catch{return[]}},ys=(U,K)=>{try{let It=JSON.parse(localStorage.getItem(go)||"{}");It[U]=K.slice(-2e3),localStorage.setItem(go,JSON.stringify(It))}catch{}},R0=async()=>{if(!bo){ps(!0),ga(null);try{let U=await fetch("./data/arc-agi-2/"+ct+"-index.json");if(!U.ok)throw new Error("official dataset not found next to this demo (data/arc-agi-2)");let K=await U.json(),It=N0(ct),Xe=new Set(It),st=K.filter(at=>!Xe.has(at.id));if(st.length===0){Pl(null),Le(null),ga("All "+K.length+" "+ct+" puzzles have been served to this agent in this browser. Reset the history to start over.");return}let Rt=st[Math.floor(Math.random()*st.length)],He=await fetch("./data/arc-agi-2/"+ct+"/"+Rt.id+".json");if(!He.ok)throw new Error("failed to load task "+Rt.id);let An=await He.json(),va=(An.train||[]).filter(at=>at.output),$=(An.test||[])[0]?.output;if(!va.length||!$)throw new Error("task "+Rt.id+" has no scored content");Pl({id:Rt.id,train:va,testInput:(An.test||[])[0].input,testOutput:$});let P=[...It,Rt.id];ys(ct,P),Le({fresh:P.length,seen:P.length,total:K.length})}catch(U){ga(U instanceof Error?U.message:"failed to serve an official puzzle")}finally{ps(!1)}}},j0=()=>{ys(ct,[]),Le(null),ga("History reset \u2014 puzzles can be served again.")};Y.default.useEffect(()=>()=>{w.current.forEach(clearTimeout),x.current&&clearInterval(x.current)},[]),Y.default.useEffect(()=>{w.current.forEach(clearTimeout),w.current=[],x.current&&(clearInterval(x.current),x.current=null),r("idle"),m([]),d(0),v(null),b(null),D(null),y(void 0)},[N,t,ne]);let bs=(U,K,It)=>{let Xe=Sn(U,Tl.testOutput),st=Xe.shapeEqual?1-Xe.diffCells/Math.max(1,Xe.totalCells):0;b({exact:Xe.shapeEqual&&Xe.diffCells===0,pixel:st,ms:K,program:It}),r("scored")},w0=async()=>{w.current.forEach(clearTimeout),w.current=[],x.current&&(clearInterval(x.current),x.current=null),r("running"),m([]),d(0),v(null),b(null),D(null);let U=Tl.train,K=Tl.testInput,It=performance.now(),Xe=[],st=$=>{Xe.push($),m(P=>[...P,$])};st({kind:"observe",label:"Studied "+U.length+" example pairs ("+K.length+"\xD7"+K[0].length+" test input)."});let Rt=null,He="";try{if(t==="copy-bot")st({kind:"think",label:"Hypothesis: output = input."}),Rt=K.map($=>[...$]),He="IDENTITY";else if(t==="rule-sniffer"){st({kind:"think",label:"Trying single geometric ops\u2026"});let $=null;for(let P of os)if(U.every(at=>Jt(P.fn(at.input),at.output))){st({kind:"verify",label:"Rule consistent on all examples: "+P.label,ok:!0}),$=P.fn(K),He=P.label;break}if(!$){st({kind:"think",label:"No geometric op fits \u2014 trying recolors\u2026"});let P=new Set;for(let at of U){for(let At of at.input)for(let Kt of At)P.add(Kt);for(let At of at.output)for(let Kt of At)P.add(Kt)}for(let at of P){for(let At of P)if(at!==At&&U.every(Kt=>Jt(F(Kt.input,{[at]:At}),Kt.output))){st({kind:"verify",label:"Recolor "+at+" \u2192 "+At+" fits all examples.",ok:!0}),$=F(K,{[at]:At}),He="RECOLOR "+at+"\u2192"+At;break}if($)break}}$||(st({kind:"think",label:"Trying object heuristic: keep largest\u2026"}),U.every(at=>{let At=nt(at.input);return At.objects.length===0?!1:Jt(Zt(at.input,[Vt(At.objects)]),at.output)})&&(st({kind:"verify",label:"Keep-largest fits all examples.",ok:!0}),$=Zt(K,[Vt(nt(K).objects)]),He="KEEP_LARGEST")),$||(st({kind:"verify",label:"No consistent rule \u2014 copy-input fallback.",ok:!1}),$=K.map(P=>[...P])),Rt=$}else if(t==="program-searcher"){st({kind:"think",label:"Enumerating DSL programs (depth \u2264 2, 2s budget)\u2026"});let $=ho(U,{maxOps:2,timeBudgetMs:2e3,topK:2});if($.length===0)st({kind:"verify",label:"No consistent program within budget.",ok:!1}),Rt=K.map(P=>[...P]);else{let P=$[0];He=po(P.program).join(" \u2192 "),st({kind:"think",label:"Best program: "+He}),st({kind:"verify",label:"Program applied to the test input.",ok:!0}),Rt=mo(K,P.program)??K.map(at=>[...at])}}else{st({kind:"think",label:"Running your solver on the examples (auto-verification)\u2026"});let $=await z0(u,U,U.map(Kt=>Kt.input));if(!$.ok){st({kind:"verify",label:"Your code failed on the examples.",ok:!1}),D($.error??"custom code error"),r("scored");return}let P=0;U.forEach((Kt,zl)=>{let xi=$.results?.[zl],St=Array.isArray(xi)&&Jt(xi,Kt.output);St&&P++,st({kind:"verify",label:"Example "+(zl+1)+": "+(St?"reproduced \u2714":"mismatch \u2718"),ok:St})});let at=await z0(u,U,[K],8e3);if(!at.ok){st({kind:"act",label:"Test-input run failed.",ok:!1}),D(at.error??"custom code error"),r("scored");return}let At=at.results?.[0];if(!Array.isArray(At)){st({kind:"act",label:"Solver did not return a grid.",ok:!1}),D("Not a valid grid."),r("scored");return}st({kind:"act",label:P===U.length?"All "+P+" examples reproduced \u2014 applying to test input.":P+"/"+U.length+" examples reproduced \u2014 applying anyway.",ok:P===U.length}),Rt=At}}catch($){D(String($ instanceof Error?$.message:$)),r("scored");return}let An=Math.round(performance.now()-It),va=Xe.length;for(let $=1;$<=va+2;$++)w.current.push(setTimeout(()=>d($),$*500));w.current.push(setTimeout(()=>{if(!Rt){bs(K,An,He);return}let $=[],P=[],at=[];for(let St=0;St<Rt.length;St++)for(let ae=0;ae<(Rt[St]?.length??0);ae++)!(St<K.length&&ae<(K[St]?.length??0))||K[St][ae]!==Rt[St][ae]?Rt[St][ae]!==0?$.push([St,ae]):at.push([St,ae]):Rt[St][ae]!==0&&P.push([St,ae]);let At=[...$,...P,...at],Kt=K.map(St=>[...St]);v(Kt.map(St=>[...St])),r("painting");let zl=0,xi=Math.max(1,Math.round(At.length/80));x.current=setInterval(()=>{let St=Math.min(zl+xi,At.length);for(let xn=zl;xn<St;xn++){let[Di,vo]=At[xn];Kt[Di]&&vo<Kt[Di].length&&(Kt[Di][vo]=Rt[Di][vo])}zl=St,v(Kt.map(xn=>[...xn]));let ae=At[Math.max(0,zl-1)];y(ae?[ae[0],ae[1]]:void 0),zl>=At.length&&(x.current&&clearInterval(x.current),x.current=null,y(void 0),bs(Rt,An,He))},22)},(va+2)*500+200))},G0=A0.find(U=>U.id===t),_0=s.slice(0,c==="scored"?void 0:f),H0=Y.default.useMemo(()=>{if(!p||!h)return[];let U=[];for(let K=0;K<Tl.testOutput.length;K++)for(let It=0;It<Tl.testOutput[K].length;It++)h[K]?.[It]!==Tl.testOutput[K][It]&&U.push([K,It]);return U},[p,h,Tl]);return(0,g.jsxs)("div",{className:"play",children:[(0,g.jsxs)("section",{className:"panel",children:[(0,g.jsx)("div",{className:"levelhead",children:(0,g.jsxs)("h2",{children:["\u{1F916} Agent Lab ",(0,g.jsx)("span",{className:"badge",children:"watch agents play"})]})}),(0,g.jsx)("p",{className:"muted small",children:"Pick a puzzle and an agent, then watch it reason step by step and paint its answer. Bring your own agent as JavaScript \u2014 it runs sandboxed and is auto-verified against every example. Agents never see the expected output before predicting. (The full app also runs the real acco-cyber/ARC-AGI-2 engine and LLM synthesizers server-side.)"})]}),(0,g.jsxs)("div",{className:"content",children:[(0,g.jsxs)("aside",{className:"side",children:[(0,g.jsxs)("div",{className:"side-block",children:[(0,g.jsx)("div",{className:"mini-label",children:"1 \xB7 Choose an agent"}),(0,g.jsx)("div",{className:"chips",children:A0.map(U=>(0,g.jsxs)("button",{className:t===U.id?"chip wide on":"chip wide",onClick:()=>e(U.id),children:[U.emoji," ",U.name]},U.id))}),(0,g.jsx)("p",{className:"muted small",children:G0.desc}),t==="custom-js"&&(0,g.jsxs)("div",{className:"field",children:[(0,g.jsx)("div",{className:"mini-label",children:"Your solver \u2014 function body"}),(0,g.jsx)("textarea",{className:"mono",rows:6,value:u,onChange:U=>o(U.target.value),spellCheck:!1}),(0,g.jsxs)("p",{className:"muted small",children:["Body of ",(0,g.jsx)("code",{children:"solve(train, testInput)"}),". Helpers: ",(0,g.jsx)("code",{children:"H.rot90/flipH/recolor/shift\u2026"})]})]})]}),(0,g.jsxs)("div",{className:"side-block",children:[(0,g.jsx)("div",{className:"mini-label",children:"2 \xB7 Choose a puzzle"}),(0,g.jsxs)("div",{className:"chips",children:[(0,g.jsx)("button",{className:C==="curriculum"?"chip wide on":"chip wide",onClick:()=>j("curriculum"),children:"\u{1F4DA} Curriculum"}),(0,g.jsx)("button",{className:C==="official"?"chip wide on":"chip wide",onClick:()=>j("official"),children:"\u{1F30D} Official ARC-AGI-2"})]}),C==="curriculum"?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("select",{className:"select",value:l,onChange:U=>{n(Number(U.target.value)),i(1)},children:ba.map(U=>(0,g.jsxs)("option",{value:U.id,children:[String(U.id).padStart(2,"0")," \xB7 ",U.name]},U.id))}),(0,g.jsx)("div",{className:"lvlist",style:{gridTemplateColumns:"repeat(5, 1fr)"},children:Array.from({length:10},(U,K)=>K+1).map(U=>(0,g.jsx)("button",{className:U===a?"chip on":"chip",onClick:()=>i(U),children:U},U))})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("select",{className:"select",value:ct,onChange:U=>{xe(U.target.value),Pl(null),Le(null),ga(null)},children:[(0,g.jsx)("option",{value:"training",children:"Official training \u2014 1,000 tasks"}),(0,g.jsx)("option",{value:"evaluation",children:"Official evaluation \u2014 120 tasks"})]}),(0,g.jsx)("button",{className:"btn primary wide",onClick:R0,disabled:bo,children:bo?"\u2026":"\u{1F3B2} Serve me a NEW puzzle"}),Ye&&(0,g.jsxs)("p",{className:"muted small",children:["fresh #",Ye.fresh," \xB7 ",Ye.seen,"/",Ye.total," seen \u2014 never repeated (tracked in this browser) ",(0,g.jsx)("button",{className:"chip",onClick:j0,children:"reset"})]}),ne&&(0,g.jsxs)("p",{className:"muted small mono",children:["task ",ne.id]}),hs&&(0,g.jsx)("p",{className:"muted small",style:{color:"#f59e0b"},children:hs}),(0,g.jsx)("p",{className:"muted small",children:"The full official ARC-AGI-2 set (github.com/arcprize/ARC-AGI-2 \u2014 same public data as Kaggle ARC Prize 2026 and arcprize.org), served fresh every time."})]})]}),(0,g.jsx)("button",{className:"btn primary wide",onClick:w0,disabled:c==="running"||c==="playing"||c==="painting",children:"\u25B6 Run agent"})]}),(0,g.jsxs)("div",{className:"content",children:[(0,g.jsxs)("section",{className:"panel",children:[(0,g.jsxs)("div",{className:"tracectl",children:[(0,g.jsx)("strong",{children:"Agent trace"}),(0,g.jsx)("span",{className:"muted small",children:c==="idle"?"ready":c})]}),(0,g.jsxs)("div",{className:"hints",children:[c==="idle"&&(0,g.jsx)("p",{className:"muted",children:"Press \u201CRun agent\u201D."}),_0.map((U,K)=>(0,g.jsxs)("div",{className:"small",style:{color:U.ok===!1?"#ef4444":void 0},children:[U.ok===!0?"\u2714 ":U.ok===!1?"\u2718 ":"\xB7 ",U.label]},K)),S&&(0,g.jsxs)("div",{className:"small",style:{color:"#ef4444"},children:["Error: ",S]})]})]}),(0,g.jsxs)("section",{className:"panel",children:[(0,g.jsxs)("div",{className:"tracectl",children:[(0,g.jsx)("strong",{children:"The play field"}),C==="official"&&ne&&(0,g.jsxs)("span",{className:"badge",children:["official \xB7 ",ct," \xB7 ",ne.id]})]}),(0,g.jsx)("div",{className:"pairs",children:(0,g.jsxs)("div",{className:"pair",children:[(0,g.jsx)(zn,{grid:Tl.testInput,title:"Test input"}),(0,g.jsx)("span",{className:"arrow",children:"\u2192"}),h?(0,g.jsx)(zn,{grid:h,title:"Agent prediction",highlight:c==="painting"&&T?[T]:H0}):(0,g.jsx)("div",{className:"muted small",style:{alignSelf:"center",padding:"0 24px"},children:"not run yet"})]})}),p&&(0,g.jsxs)("div",{className:"result",style:{borderColor:p.exact?"#10b981":void 0},children:[p.exact?"\u2705 Solved \u2014 exact match":"\u274C Not solved"," \xB7 pixel accuracy ",(p.pixel*100).toFixed(1),"% \xB7 agent time ",(p.ms/1e3).toFixed(2),"s",p.program&&(0,g.jsxs)("span",{className:"mono",children:[" \xB7 ",p.program.slice(0,60)]}),C==="official"&&(0,g.jsx)("div",{className:"muted small",children:"Official ARC-AGI-2 task \u2014 scored against the public dataset file (client-side demo; the full app withholds answers server-side)."})]})]})]})]})]})}function C1({xp:t,setXp:e,solved:l,setSolved:n}){let a=Y.default.useMemo(()=>d0(ss()),[]),[i,u]=Y.default.useState(a.id),[o,c]=Y.default.useState(1),r=i.startsWith("daily-"),s=r?void 0:Tn.find(C=>C.id===i),m=Y.default.useMemo(()=>{if(r)return a.draft;try{return Fl(i)}catch{return Fl("w1l1")}},[i,r,a]),[f,d]=Y.default.useState(()=>M(m.testInput.length,m.testInput[0].length,0)),[h,v]=Y.default.useState(1),[T,y]=Y.default.useState(0),[p,b]=Y.default.useState("playing"),[S,D]=Y.default.useState(1);Y.default.useEffect(()=>{d(M(m.testInput.length,m.testInput[0].length,0)),y(0),b(l.includes(i)?"solved":"playing")},[m,i,l]);let w=(C,j)=>{p!=="solved"&&d(ct=>{let xe=ct.map(ne=>[...ne]);return xe[C][j]=h,xe})},x=()=>{Jt(f,m.testOutput)?(l.includes(i)||(e(A1(r?150:100)),n(x1(i))),b("solved")):b("wrong")},N=()=>{if(r||!s)return;let C=s.level<10?`w${s.world}l${s.level+1}`:s.world<10?`w${s.world+1}l1`:null;C&&u(C)};return(0,g.jsxs)("div",{className:"play",children:[(0,g.jsxs)("aside",{className:"side",children:[(0,g.jsxs)("div",{className:"side-block",children:[(0,g.jsx)("div",{className:"mini-label",children:"Today's challenge"}),(0,g.jsxs)("button",{className:i===a.id?"lvlbtn solved":"lvlbtn",onClick:()=>u(a.id),children:["\u{1F4C5} Daily \xB7 ",ss()," ",l.includes(a.id)?"\u2713":""]})]}),ba.map(C=>(0,g.jsxs)("div",{className:"side-block",children:[(0,g.jsxs)("button",{className:"worldhead",onClick:()=>D(S===C.id?null:C.id),children:[(0,g.jsx)("span",{className:"wnum",style:{background:uo([7,3,2,4,6,1,8,5,9,0][C.id-1])},children:C.id}),(0,g.jsxs)("span",{children:[C.name,(0,g.jsxs)("small",{className:"dcount",children:[" ",C.id<=2?"\xB7 open":"\xB7 demo"]})]})]}),(S===C.id||C.id<=1)&&(0,g.jsx)("div",{className:"lvlist",children:Tn.filter(j=>j.world===C.id).map(j=>(0,g.jsxs)("button",{className:i===j.id?"lvlbtn active":l.includes(j.id)?"lvlbtn solved":"lvlbtn",onClick:()=>u(j.id),children:[(0,g.jsx)("span",{className:"mono",children:j.id})," ",j.title," ",l.includes(j.id)?"\u2713":""]},j.id))})]},C.id))]}),(0,g.jsxs)("section",{className:"content",children:[(0,g.jsxs)("div",{className:"levelhead",children:[(0,g.jsx)("h2",{children:r?`Daily Challenge \u2014 ${a.template}`:`${s?.world}.${s?.level} ${s?.title}`}),(0,g.jsx)("span",{className:"badge",children:r?"daily":s?.worldDifficulty})]}),(0,g.jsx)("p",{className:"muted",children:"Study the examples, infer the rule, paint the output grid."}),(0,g.jsx)("div",{className:"pairs",children:m.train.map((C,j)=>(0,g.jsx)(M0,{pair:C,idx:j},j))}),(0,g.jsxs)("div",{className:"challenge",children:[(0,g.jsx)("div",{children:(0,g.jsx)(zn,{grid:m.testInput,title:"Test input",cell:20})}),(0,g.jsx)("span",{className:"arrow big",children:"\u2192"}),(0,g.jsxs)("div",{children:[(0,g.jsx)(zn,{grid:f,title:"Your answer",cell:20,onCell:w}),(0,g.jsx)("div",{className:"palette",children:[0,1,2,3,4,5,6,7,8,9].map(C=>(0,g.jsx)("button",{className:h===C?"swatch selected":"swatch",style:{backgroundColor:uo(C),backgroundImage:us(C)||void 0,backgroundSize:"8px 8px"},onClick:()=>v(C),title:R(C)},C))}),(0,g.jsxs)("div",{className:"tools",children:[(0,g.jsx)("button",{className:"btn",onClick:()=>d(m.testInput.map(C=>[...C])),children:"Copy input"}),(0,g.jsx)("button",{className:"btn",onClick:()=>d(M(m.testInput.length,m.testInput[0].length,0)),children:"Clear"}),(0,g.jsx)("button",{className:"btn",onClick:()=>d(M(m.testInput.length,m.testInput[0].length,h)),children:"Fill all"})]})]})]}),(0,g.jsxs)("div",{className:"actions",children:[(0,g.jsx)("button",{className:"btn primary",onClick:x,children:"Submit"}),T<3&&(0,g.jsxs)("button",{className:"btn",onClick:()=>y(T+1),children:["\u{1F4A1} Hint (",T+1,"/3)"]}),p==="solved"&&!r&&(0,g.jsx)("button",{className:"btn",onClick:N,children:"Next level \u2192"})]}),T>0&&(0,g.jsx)("div",{className:"hints",children:m.hints.slice(0,T).map((C,j)=>(0,g.jsxs)("p",{children:[(0,g.jsxs)("strong",{children:["Hint ",j+1,":"]})," ",C]},j))}),p==="solved"&&(0,g.jsxs)("div",{className:"result ok",children:[(0,g.jsx)("strong",{children:"Solved! \u26A1"})," ",m.explanation]}),p==="wrong"&&(0,g.jsx)("div",{className:"result bad",children:"Not quite \u2014 compare your grid with the examples cell by cell, or take a hint."})]})]})}function M1(){let[t,e]=Y.default.useState("w3l1"),l=Y.default.useMemo(()=>{try{return Fl(t)}catch{return Fl("w3l1")}},[t]),[n,a]=Y.default.useState(null),[i,u]=Y.default.useState(!1),[o,c]=Y.default.useState(0),[r,s]=Y.default.useState(null),m=()=>{u(!0),a(null),s(null),c(0),setTimeout(()=>{let d=ho(l.train,{maxOps:2,timeBudgetMs:2500,topK:5});a(d.map(h=>({program:h.program,fitsAll:h.fitsAll,acc:h.trainPixelAcc}))),u(!1)},30)},f=Y.default.useMemo(()=>{if(!r)return[];let d=[{grid:l.testInput,desc:"Input (test)"}],h=l.testInput;return r.forEach(v=>{let T=mo(h,[v]);T&&(h=T,d.push({grid:h,desc:po([v])[0]}))}),d},[r,l]);return(0,g.jsxs)("div",{className:"content",children:[(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("select",{value:t,onChange:d=>{e(d.target.value),a(null),s(null)},className:"select",children:Tn.map(d=>(0,g.jsxs)("option",{value:d.id,children:[d.id," \u2014 ",d.title]},d.id))}),(0,g.jsx)("button",{className:"btn primary",onClick:m,disabled:i,children:i?"Searching\u2026 (\u22642.5s)":"\u{1F50D} Search programs"})]}),(0,g.jsx)("p",{className:"muted",children:"Bounded iterative-deepening search over the 20-op DSL, pruned on the first demonstration. Deterministic and blind to the test output."}),(0,g.jsx)("div",{className:"pairs",children:l.train.map((d,h)=>(0,g.jsx)(M0,{pair:d,idx:h},h))}),n&&n.length>0&&(0,g.jsxs)("div",{className:"panel",children:[(0,g.jsxs)("h3",{children:["Candidates (",n.length,")"]}),n.map((d,h)=>(0,g.jsxs)("div",{className:"cand",children:[(0,g.jsx)("span",{className:d.fitsAll?"pill ok":"pill",children:d.fitsAll?"Fits all":`${Math.round(d.acc*100)}% pixels`}),(0,g.jsx)("code",{children:po(d.program).join(" \u2192 ")}),(0,g.jsx)("button",{className:"btn",onClick:()=>{s(d.program),c(0)},children:"Trace on test"})]},h)),(0,g.jsx)("p",{className:"muted small",children:"Fitting the demonstrations does not guarantee the intended rule \u2014 verify by applying to the held-out test input."})]}),n&&n.length===0&&(0,g.jsx)("div",{className:"panel",children:(0,g.jsx)("p",{className:"muted",children:"No consistent program found within the bounded op space for this task (expected for object-motion and multi-step rules)."})}),r&&f.length>0&&(0,g.jsxs)("div",{className:"panel",children:[(0,g.jsx)("h3",{children:"Execution trace \u2014 test input"}),(0,g.jsxs)("div",{className:"tracectl",children:[f.map((d,h)=>(0,g.jsx)("button",{className:o===h?"stepbtn active":"stepbtn",onClick:()=>c(h),children:h===0?"in":h},h)),(0,g.jsxs)("span",{className:"muted small",children:[o,"/",f.length-1]})]}),(0,g.jsx)("p",{children:(0,g.jsx)("strong",{children:f[o].desc})}),(0,g.jsx)(zn,{grid:f[o].grid,cell:20})]})]})}function N1(){let[t,e]=Y.default.useState([1,2,3]),[l,n]=Y.default.useState(6),[a,i]=Y.default.useState(["copy-input","rule-based","program-search"]),[u,o]=Y.default.useState(!1),[c,r]=Y.default.useState(null),s=["copy-input","majority-fill","nearest-train","rule-based","program-search"],m={"copy-input":"Copy-Input","majority-fill":"Majority Fill","nearest-train":"Nearest Train","rule-based":"Rule-Based","program-search":"Program Search"},f=()=>{o(!0),r(null),setTimeout(()=>{let d=Tn.filter(y=>t.length===0||t.includes(y.world)),h=Math.max(1,Math.floor(d.length/l)),v=[];for(let y=0;y<d.length&&v.length<l;y+=h)v.push(d[y]);let T=[];for(let y of a){let p=0,b=0,S=0,D=0,w={};for(let x of v){let N=Fl(x.id),C=performance.now(),j=[];y==="copy-input"?j=[N.testInput.map(Ye=>[...Ye])]:y==="majority-fill"?j=[T1(N.train)]:y==="nearest-train"?j=[z1(N.train,N.testInput)]:y==="rule-based"?j=[S1(N.train,N.testInput)]:y==="program-search"&&(j=ho(N.train,{maxOps:2,timeBudgetMs:2e3,topK:2}).map(Le=>mo(N.testInput,Le.program)).filter(Le=>!!Le).slice(0,2),j.length===0&&(j=[N.testInput.map(Le=>[...Le])]));let ct=performance.now()-C;D+=ct;let xe=ms(j[0],N.testOutput),ne=j.some(Ye=>ms(Ye,N.testOutput));xe&&p++,ne&&b++,S+=g0(j[0],N.testOutput);let Pl="solved";xe||(Pl=Sn(j[0],N.testOutput).shapeEqual?"cells":"shape"),w[Pl]=(w[Pl]??0)+1}T.push({solver:m[y],solved:p,total:v.length,pass2:b,pixel:S/v.length,ms:D/v.length,failures:w})}r(T),o(!1)},50)};return(0,g.jsxs)("div",{className:"content",children:[(0,g.jsxs)("div",{className:"row wraprow",children:[(0,g.jsxs)("div",{className:"field",children:[(0,g.jsx)("span",{className:"mini-label",children:"Worlds"}),(0,g.jsx)("div",{className:"chips",children:ba.map(d=>(0,g.jsx)("button",{className:t.includes(d.id)?"chip on":"chip",onClick:()=>e(h=>h.includes(d.id)?h.filter(v=>v!==d.id):[...h,d.id]),children:d.id},d.id))})]}),(0,g.jsxs)("div",{className:"field",children:[(0,g.jsx)("span",{className:"mini-label",children:"Tasks"}),(0,g.jsx)("input",{type:"number",min:2,max:12,value:l,onChange:d=>n(Math.max(2,Math.min(12,Number(d.target.value)||6))),className:"select num"})]}),(0,g.jsxs)("div",{className:"field",children:[(0,g.jsx)("span",{className:"mini-label",children:"Solvers"}),(0,g.jsx)("div",{className:"chips",children:s.map(d=>(0,g.jsx)("button",{className:a.includes(d)?"chip wide on":"chip wide",onClick:()=>i(h=>h.includes(d)?h.filter(v=>v!==d):[...h,d]),children:m[d]},d))})]}),(0,g.jsx)("button",{className:"btn primary",onClick:f,disabled:u||a.length===0,children:u?"Evaluating\u2026":"\u25B6 Run evaluation"})]}),(0,g.jsx)("p",{className:"muted",children:"Solvers never see the expected outputs. Exact match is the primary metric; pixel accuracy is diagnostic."}),c&&(0,g.jsx)("div",{className:"panel",children:(0,g.jsxs)("table",{className:"mtable",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{children:"Solver"}),(0,g.jsx)("th",{children:"Exact"}),(0,g.jsx)("th",{children:"Pass@2"}),(0,g.jsx)("th",{children:"Pixel acc"}),(0,g.jsx)("th",{children:"Avg ms"}),(0,g.jsx)("th",{children:"Failures"})]})}),(0,g.jsx)("tbody",{children:c.map(d=>(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{children:d.solver}),(0,g.jsxs)("td",{className:d.solved===Math.max(...c.map(h=>h.solved))?"best":"",children:[d.solved,"/",d.total," (",Math.round(d.solved/d.total*100),"%)"]}),(0,g.jsxs)("td",{children:[d.pass2,"/",d.total]}),(0,g.jsxs)("td",{children:[Math.round(d.pixel*100),"%"]}),(0,g.jsx)("td",{children:d.ms.toFixed(1)}),(0,g.jsx)("td",{className:"small",children:Object.entries(d.failures).map(([h,v])=>`${h==="solved"?"\u2713":h} ${v}`).join(" \xB7 ")})]},d.solver))})]})})]})}function R1(){return(0,g.jsxs)("div",{className:"content about",children:[(0,g.jsx)("h2",{children:"ARC Lab"}),(0,g.jsx)("p",{children:"An interactive laboratory for the Abstraction and Reasoning Corpus with three integrated experiences:"}),(0,g.jsxs)("ul",{children:[(0,g.jsxs)("li",{children:[(0,g.jsx)("strong",{children:"ARC Academy"})," \u2014 a 100-level puzzle game teaching real ARC skills (this demo's Academy tab runs the same deterministic generator core)."]}),(0,g.jsxs)("li",{children:[(0,g.jsx)("strong",{children:"ARC Workbench"})," \u2014 visual reasoning debugger with a 20-op DSL, consistency checking and bounded program search (the Search tab above is the real search code)."]}),(0,g.jsxs)("li",{children:[(0,g.jsx)("strong",{children:"ARC Arena"})," \u2014 reproducible solver evaluation with exact / pass@2 / pixel / runtime metrics and a failure taxonomy (the Arena tab runs the client-safe baselines)."]})]}),(0,g.jsx)("p",{children:"The full application adds server-side answer validation, persistent progress (SQLite), run history with reproducibility manifests, an LLM adapter and ARC JSON import/export."}),(0,g.jsx)("p",{children:(0,g.jsx)("a",{className:"btn primary",href:"https://github.com/acco-cyber/ARC-Lab",target:"_blank",rel:"noreferrer",children:"GitHub repository \u2192"})}),(0,g.jsx)("p",{className:"muted small",children:"Dataset policy: the curriculum is fully original & synthetic (arc-lab-curriculum-v1) and deterministic per seed. No official ARC evaluation tasks are redistributed. ARC-AGI-1/2 JSON imports are supported in the full app; schema is ARC-3 tolerant."})]})}var j1=(0,x0.createRoot)(document.getElementById("root"));j1.render((0,g.jsx)(D1,{}));})();
/*! Bundled license information:

react/cjs/react.production.js:
  (**
   * @license React
   * react.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

scheduler/cjs/scheduler.production.js:
  (**
   * @license React
   * scheduler.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-dom/cjs/react-dom.production.js:
  (**
   * @license React
   * react-dom.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-dom/cjs/react-dom-client.production.js:
  (**
   * @license React
   * react-dom-client.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react/cjs/react-jsx-runtime.production.js:
  (**
   * @license React
   * react-jsx-runtime.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/