client-side-ocr
Version:
High-performance client-side OCR with ONNX Runtime, RapidOCR and PPU PaddleOCR integration. 100+ language support. Process text from images entirely in the browser with state-of-the-art accuracy and complete privacy.
188 lines • 242 kB
JavaScript
import{r as zl,u as N1,a as Ls,j as c,S as Sl,D as H1,M as si,C as Ae,P as at,B as Kn,T as V,b as Zn,c as Ct,G as pl,d as wl,e as Bs,n as Ut,f as w1,g as q1,p as Y1,h as Vs,A as Ee,i as Re,k as G1,l as nh,m as uh,o as Ns,q as X1,s as Q1,t as di,U as ih,v as L1,w as V1,x as Z1,y as Hs,z as K1,E as Ga,F as ws,H as k1,I as J1,J as Ft,K as Xn,L as oi,N as Qn,O as $l,R as W1,Q as qa,V as nl,W as qs,X as $1,Y as F1,Z as I1,_ as Ya,$ as Qr,a0 as Es,a1 as Lr,a2 as P1,a3 as lv,a4 as ev,a5 as tv,a6 as av,a7 as nv,a8 as uv,a9 as iv,aa as cv}from"./mantine-vendor-BOX0XyI3.js";import{r as sv,a as fv,g as ov}from"./react-vendor-vtvkNrF5.js";import{b as Os}from"./onnx-DulCs980.js";import{R as ch}from"./ocr-engine-CS6-I5w2.js";import{r as dv}from"./opencv-CLB0n_65.js";(function(){const h=document.createElement("link").relList;if(h&&h.supports&&h.supports("modulepreload"))return;for(const x of document.querySelectorAll('link[rel="modulepreload"]'))f(x);new MutationObserver(x=>{for(const A of x)if(A.type==="childList")for(const R of A.addedNodes)R.tagName==="LINK"&&R.rel==="modulepreload"&&f(R)}).observe(document,{childList:!0,subtree:!0});function g(x){const A={};return x.integrity&&(A.integrity=x.integrity),x.referrerPolicy&&(A.referrerPolicy=x.referrerPolicy),x.crossOrigin==="use-credentials"?A.credentials="include":x.crossOrigin==="anonymous"?A.credentials="omit":A.credentials="same-origin",A}function f(x){if(x.ep)return;x.ep=!0;const A=g(x);fetch(x.href,A)}})();var Ds={exports:{}},Ln={},Us={exports:{}},Cs={};/**
* @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.
*/var Vr;function rv(){return Vr||(Vr=1,function(d){function h(S,U){var G=S.length;S.push(U);l:for(;0<G;){var Q=G-1>>>1,al=S[Q];if(0<x(al,U))S[Q]=U,S[G]=al,G=Q;else break l}}function g(S){return S.length===0?null:S[0]}function f(S){if(S.length===0)return null;var U=S[0],G=S.pop();if(G!==U){S[0]=G;l:for(var Q=0,al=S.length,F=al>>>1;Q<F;){var ll=2*(Q+1)-1,W=S[ll],jl=ll+1,Bl=S[jl];if(0>x(W,G))jl<al&&0>x(Bl,W)?(S[Q]=Bl,S[jl]=G,Q=jl):(S[Q]=W,S[ll]=G,Q=ll);else if(jl<al&&0>x(Bl,G))S[Q]=Bl,S[jl]=G,Q=jl;else break l}}return U}function x(S,U){var G=S.sortIndex-U.sortIndex;return G!==0?G:S.id-U.id}if(d.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var A=performance;d.unstable_now=function(){return A.now()}}else{var R=Date,C=R.now();d.unstable_now=function(){return R.now()-C}}var B=[],j=[],E=1,O=null,D=3,k=!1,$=!1,il=!1,w=!1,K=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function dl(S){for(var U=g(j);U!==null;){if(U.callback===null)f(j);else if(U.startTime<=S)f(j),U.sortIndex=U.expirationTime,h(B,U);else break;U=g(j)}}function Ul(S){if(il=!1,dl(S),!$)if(g(B)!==null)$=!0,Ll||(Ll=!0,Cl());else{var U=g(j);U!==null&&bl(Ul,U.startTime-S)}}var Ll=!1,ql=-1,Vl=5,Il=-1;function Oe(){return w?!0:!(d.unstable_now()-Il<Vl)}function ie(){if(w=!1,Ll){var S=d.unstable_now();Il=S;var U=!0;try{l:{$=!1,il&&(il=!1,J(ql),ql=-1),k=!0;var G=D;try{e:{for(dl(S),O=g(B);O!==null&&!(O.expirationTime>S&&Oe());){var Q=O.callback;if(typeof Q=="function"){O.callback=null,D=O.priorityLevel;var al=Q(O.expirationTime<=S);if(S=d.unstable_now(),typeof al=="function"){O.callback=al,dl(S),U=!0;break e}O===g(B)&&f(B),dl(S)}else f(B);O=g(B)}if(O!==null)U=!0;else{var F=g(j);F!==null&&bl(Ul,F.startTime-S),U=!1}}break l}finally{O=null,D=G,k=!1}U=void 0}}finally{U?Cl():Ll=!1}}}var Cl;if(typeof Y=="function")Cl=function(){Y(ie)};else if(typeof MessageChannel<"u"){var Pl=new MessageChannel,me=Pl.port2;Pl.port1.onmessage=ie,Cl=function(){me.postMessage(null)}}else Cl=function(){K(ie,0)};function bl(S,U){ql=K(function(){S(d.unstable_now())},U)}d.unstable_IdlePriority=5,d.unstable_ImmediatePriority=1,d.unstable_LowPriority=4,d.unstable_NormalPriority=3,d.unstable_Profiling=null,d.unstable_UserBlockingPriority=2,d.unstable_cancelCallback=function(S){S.callback=null},d.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Vl=0<S?Math.floor(1e3/S):5},d.unstable_getCurrentPriorityLevel=function(){return D},d.unstable_next=function(S){switch(D){case 1:case 2:case 3:var U=3;break;default:U=D}var G=D;D=U;try{return S()}finally{D=G}},d.unstable_requestPaint=function(){w=!0},d.unstable_runWithPriority=function(S,U){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var G=D;D=S;try{return U()}finally{D=G}},d.unstable_scheduleCallback=function(S,U,G){var Q=d.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?Q+G:Q):G=Q,S){case 1:var al=-1;break;case 2:al=250;break;case 5:al=1073741823;break;case 4:al=1e4;break;default:al=5e3}return al=G+al,S={id:E++,callback:U,priorityLevel:S,startTime:G,expirationTime:al,sortIndex:-1},G>Q?(S.sortIndex=G,h(j,S),g(B)===null&&S===g(j)&&(il?(J(ql),ql=-1):il=!0,bl(Ul,G-Q))):(S.sortIndex=al,h(B,S),$||k||($=!0,Ll||(Ll=!0,Cl()))),S},d.unstable_shouldYield=Oe,d.unstable_wrapCallback=function(S){var U=D;return function(){var G=D;D=U;try{return S.apply(this,arguments)}finally{D=G}}}}(Cs)),Cs}var Zr;function hv(){return Zr||(Zr=1,Us.exports=rv()),Us.exports}/**
* @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.
*/var Kr;function vv(){if(Kr)return Ln;Kr=1;var d=hv(),h=sv(),g=fv();function f(l){var e="https://react.dev/errors/"+l;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var t=2;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t])}return"Minified React error #"+l+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function x(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function A(l){var e=l,t=l;if(l.alternate)for(;e.return;)e=e.return;else{l=e;do e=l,(e.flags&4098)!==0&&(t=e.return),l=e.return;while(l)}return e.tag===3?t:null}function R(l){if(l.tag===13){var e=l.memoizedState;if(e===null&&(l=l.alternate,l!==null&&(e=l.memoizedState)),e!==null)return e.dehydrated}return null}function C(l){if(A(l)!==l)throw Error(f(188))}function B(l){var e=l.alternate;if(!e){if(e=A(l),e===null)throw Error(f(188));return e!==l?null:l}for(var t=l,a=e;;){var n=t.return;if(n===null)break;var u=n.alternate;if(u===null){if(a=n.return,a!==null){t=a;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===t)return C(n),l;if(u===a)return C(n),e;u=u.sibling}throw Error(f(188))}if(t.return!==a.return)t=n,a=u;else{for(var i=!1,s=n.child;s;){if(s===t){i=!0,t=n,a=u;break}if(s===a){i=!0,a=n,t=u;break}s=s.sibling}if(!i){for(s=u.child;s;){if(s===t){i=!0,t=u,a=n;break}if(s===a){i=!0,a=u,t=n;break}s=s.sibling}if(!i)throw Error(f(189))}}if(t.alternate!==a)throw Error(f(190))}if(t.tag!==3)throw Error(f(188));return t.stateNode.current===t?l:e}function j(l){var e=l.tag;if(e===5||e===26||e===27||e===6)return l;for(l=l.child;l!==null;){if(e=j(l),e!==null)return e;l=l.sibling}return null}var E=Object.assign,O=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),il=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),K=Symbol.for("react.provider"),J=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),dl=Symbol.for("react.forward_ref"),Ul=Symbol.for("react.suspense"),Ll=Symbol.for("react.suspense_list"),ql=Symbol.for("react.memo"),Vl=Symbol.for("react.lazy"),Il=Symbol.for("react.activity"),Oe=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function Cl(l){return l===null||typeof l!="object"?null:(l=ie&&l[ie]||l["@@iterator"],typeof l=="function"?l:null)}var Pl=Symbol.for("react.client.reference");function me(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===Pl?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case $:return"Fragment";case w:return"Profiler";case il:return"StrictMode";case Ul:return"Suspense";case Ll:return"SuspenseList";case Il:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case k:return"Portal";case Y:return(l.displayName||"Context")+".Provider";case J:return(l._context.displayName||"Context")+".Consumer";case dl:var e=l.render;return l=l.displayName,l||(l=e.displayName||e.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case ql:return e=l.displayName||null,e!==null?e:me(l.type)||"Memo";case Vl:e=l._payload,l=l._init;try{return me(l(e))}catch{}}return null}var bl=Array.isArray,S=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=g.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},Q=[],al=-1;function F(l){return{current:l}}function ll(l){0>al||(l.current=Q[al],Q[al]=null,al--)}function W(l,e){al++,Q[al]=l.current,l.current=e}var jl=F(null),Bl=F(null),Be=F(null),De=F(null);function nt(l,e){switch(W(Be,e),W(Bl,l),W(jl,null),e.nodeType){case 9:case 11:l=(l=e.documentElement)&&(l=l.namespaceURI)?mr(l):0;break;default:if(l=e.tagName,e=e.namespaceURI)e=mr(e),l=yr(e,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}ll(jl),W(jl,l)}function Xe(){ll(jl),ll(Bl),ll(Be)}function Xa(l){l.memoizedState!==null&&W(De,l);var e=jl.current,t=yr(e,l.type);e!==t&&(W(Bl,l),W(jl,t))}function _t(l){Bl.current===l&&(ll(jl),ll(Bl)),De.current===l&&(ll(De),Hn._currentValue=G)}var It=Object.prototype.hasOwnProperty,Qa=d.unstable_scheduleCallback,le=d.unstable_cancelCallback,gi=d.unstable_shouldYield,vh=d.unstable_requestPaint,Ne=d.unstable_now,gh=d.unstable_getCurrentPriorityLevel,Js=d.unstable_ImmediatePriority,Ws=d.unstable_UserBlockingPriority,Jn=d.unstable_NormalPriority,mh=d.unstable_LowPriority,$s=d.unstable_IdlePriority,yh=d.log,ph=d.unstable_setDisableYieldValue,La=null,ce=null;function ut(l){if(typeof yh=="function"&&ph(l),ce&&typeof ce.setStrictMode=="function")try{ce.setStrictMode(La,l)}catch{}}var se=Math.clz32?Math.clz32:Sh,bh=Math.log,xh=Math.LN2;function Sh(l){return l>>>=0,l===0?32:31-(bh(l)/xh|0)|0}var Wn=256,$n=4194304;function Rt(l){var e=l&42;if(e!==0)return e;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Fn(l,e,t){var a=l.pendingLanes;if(a===0)return 0;var n=0,u=l.suspendedLanes,i=l.pingedLanes;l=l.warmLanes;var s=a&134217727;return s!==0?(a=s&~u,a!==0?n=Rt(a):(i&=s,i!==0?n=Rt(i):t||(t=s&~l,t!==0&&(n=Rt(t))))):(s=a&~u,s!==0?n=Rt(s):i!==0?n=Rt(i):t||(t=a&~l,t!==0&&(n=Rt(t)))),n===0?0:e!==0&&e!==n&&(e&u)===0&&(u=n&-n,t=e&-e,u>=t||u===32&&(t&4194048)!==0)?e:n}function Va(l,e){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&e)===0}function jh(l,e){switch(l){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 Fs(){var l=Wn;return Wn<<=1,(Wn&4194048)===0&&(Wn=256),l}function Is(){var l=$n;return $n<<=1,($n&62914560)===0&&($n=4194304),l}function mi(l){for(var e=[],t=0;31>t;t++)e.push(l);return e}function Za(l,e){l.pendingLanes|=e,e!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function zh(l,e,t,a,n,u){var i=l.pendingLanes;l.pendingLanes=t,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=t,l.entangledLanes&=t,l.errorRecoveryDisabledLanes&=t,l.shellSuspendCounter=0;var s=l.entanglements,o=l.expirationTimes,y=l.hiddenUpdates;for(t=i&~t;0<t;){var z=31-se(t),T=1<<z;s[z]=0,o[z]=-1;var p=y[z];if(p!==null)for(y[z]=null,z=0;z<p.length;z++){var b=p[z];b!==null&&(b.lane&=-536870913)}t&=~T}a!==0&&Ps(l,a,0),u!==0&&n===0&&l.tag!==0&&(l.suspendedLanes|=u&~(i&~e))}function Ps(l,e,t){l.pendingLanes|=e,l.suspendedLanes&=~e;var a=31-se(e);l.entangledLanes|=e,l.entanglements[a]=l.entanglements[a]|1073741824|t&4194090}function lf(l,e){var t=l.entangledLanes|=e;for(l=l.entanglements;t;){var a=31-se(t),n=1<<a;n&e|l[a]&e&&(l[a]|=e),t&=~n}}function yi(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=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:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function pi(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function ef(){var l=U.p;return l!==0?l:(l=window.event,l===void 0?32:Hr(l.type))}function Mh(l,e){var t=U.p;try{return U.p=l,e()}finally{U.p=t}}var it=Math.random().toString(36).slice(2),Jl="__reactFiber$"+it,ee="__reactProps$"+it,Pt="__reactContainer$"+it,bi="__reactEvents$"+it,Th="__reactListeners$"+it,Ah="__reactHandles$"+it,tf="__reactResources$"+it,Ka="__reactMarker$"+it;function xi(l){delete l[Jl],delete l[ee],delete l[bi],delete l[Th],delete l[Ah]}function la(l){var e=l[Jl];if(e)return e;for(var t=l.parentNode;t;){if(e=t[Pt]||t[Jl]){if(t=e.alternate,e.child!==null||t!==null&&t.child!==null)for(l=Sr(l);l!==null;){if(t=l[Jl])return t;l=Sr(l)}return e}l=t,t=l.parentNode}return null}function ea(l){if(l=l[Jl]||l[Pt]){var e=l.tag;if(e===5||e===6||e===13||e===26||e===27||e===3)return l}return null}function ka(l){var e=l.tag;if(e===5||e===26||e===27||e===6)return l.stateNode;throw Error(f(33))}function ta(l){var e=l[tf];return e||(e=l[tf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Yl(l){l[Ka]=!0}var af=new Set,nf={};function Bt(l,e){aa(l,e),aa(l+"Capture",e)}function aa(l,e){for(nf[l]=e,l=0;l<e.length;l++)af.add(e[l])}var Eh=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]*$"),uf={},cf={};function Oh(l){return It.call(cf,l)?!0:It.call(uf,l)?!1:Eh.test(l)?cf[l]=!0:(uf[l]=!0,!1)}function In(l,e,t){if(Oh(e))if(t===null)l.removeAttribute(e);else{switch(typeof t){case"undefined":case"function":case"symbol":l.removeAttribute(e);return;case"boolean":var a=e.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){l.removeAttribute(e);return}}l.setAttribute(e,""+t)}}function Pn(l,e,t){if(t===null)l.removeAttribute(e);else{switch(typeof t){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(e);return}l.setAttribute(e,""+t)}}function Qe(l,e,t,a){if(a===null)l.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(t);return}l.setAttributeNS(e,t,""+a)}}var Si,sf;function na(l){if(Si===void 0)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);Si=e&&e[1]||"",sf=-1<t.stack.indexOf(`
at`)?" (<anonymous>)":-1<t.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Si+l+sf}var ji=!1;function zi(l,e){if(!l||ji)return"";ji=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(e){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(b){var p=b}Reflect.construct(l,[],T)}else{try{T.call()}catch(b){p=b}l.call(T.prototype)}}else{try{throw Error()}catch(b){p=b}(T=l())&&typeof T.catch=="function"&&T.catch(function(){})}}catch(b){if(b&&p&&typeof b.stack=="string")return[b.stack,p.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),i=u[0],s=u[1];if(i&&s){var o=i.split(`
`),y=s.split(`
`);for(n=a=0;a<o.length&&!o[a].includes("DetermineComponentFrameRoot");)a++;for(;n<y.length&&!y[n].includes("DetermineComponentFrameRoot");)n++;if(a===o.length||n===y.length)for(a=o.length-1,n=y.length-1;1<=a&&0<=n&&o[a]!==y[n];)n--;for(;1<=a&&0<=n;a--,n--)if(o[a]!==y[n]){if(a!==1||n!==1)do if(a--,n--,0>n||o[a]!==y[n]){var z=`
`+o[a].replace(" at new "," at ");return l.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",l.displayName)),z}while(1<=a&&0<=n);break}}}finally{ji=!1,Error.prepareStackTrace=t}return(t=l?l.displayName||l.name:"")?na(t):""}function Dh(l){switch(l.tag){case 26:case 27:case 5:return na(l.type);case 16:return na("Lazy");case 13:return na("Suspense");case 19:return na("SuspenseList");case 0:case 15:return zi(l.type,!1);case 11:return zi(l.type.render,!1);case 1:return zi(l.type,!0);case 31:return na("Activity");default:return""}}function ff(l){try{var e="";do e+=Dh(l),l=l.return;while(l);return e}catch(t){return`
Error generating stack: `+t.message+`
`+t.stack}}function ye(l){switch(typeof l){case"bigint":case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function of(l){var e=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Uh(l){var e=of(l)?"checked":"value",t=Object.getOwnPropertyDescriptor(l.constructor.prototype,e),a=""+l[e];if(!l.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var n=t.get,u=t.set;return Object.defineProperty(l,e,{configurable:!0,get:function(){return n.call(this)},set:function(i){a=""+i,u.call(this,i)}}),Object.defineProperty(l,e,{enumerable:t.enumerable}),{getValue:function(){return a},setValue:function(i){a=""+i},stopTracking:function(){l._valueTracker=null,delete l[e]}}}}function lu(l){l._valueTracker||(l._valueTracker=Uh(l))}function df(l){if(!l)return!1;var e=l._valueTracker;if(!e)return!0;var t=e.getValue(),a="";return l&&(a=of(l)?l.checked?"true":"false":l.value),l=a,l!==t?(e.setValue(l),!0):!1}function eu(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var Ch=/[\n"\\]/g;function pe(l){return l.replace(Ch,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Mi(l,e,t,a,n,u,i,s){l.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?l.type=i:l.removeAttribute("type"),e!=null?i==="number"?(e===0&&l.value===""||l.value!=e)&&(l.value=""+ye(e)):l.value!==""+ye(e)&&(l.value=""+ye(e)):i!=="submit"&&i!=="reset"||l.removeAttribute("value"),e!=null?Ti(l,i,ye(e)):t!=null?Ti(l,i,ye(t)):a!=null&&l.removeAttribute("value"),n==null&&u!=null&&(l.defaultChecked=!!u),n!=null&&(l.checked=n&&typeof n!="function"&&typeof n!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?l.name=""+ye(s):l.removeAttribute("name")}function rf(l,e,t,a,n,u,i,s){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(l.type=u),e!=null||t!=null){if(!(u!=="submit"&&u!=="reset"||e!=null))return;t=t!=null?""+ye(t):"",e=e!=null?""+ye(e):t,s||e===l.value||(l.value=e),l.defaultValue=e}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,l.checked=s?l.checked:!!a,l.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(l.name=i)}function Ti(l,e,t){e==="number"&&eu(l.ownerDocument)===l||l.defaultValue===""+t||(l.defaultValue=""+t)}function ua(l,e,t,a){if(l=l.options,e){e={};for(var n=0;n<t.length;n++)e["$"+t[n]]=!0;for(t=0;t<l.length;t++)n=e.hasOwnProperty("$"+l[t].value),l[t].selected!==n&&(l[t].selected=n),n&&a&&(l[t].defaultSelected=!0)}else{for(t=""+ye(t),e=null,n=0;n<l.length;n++){if(l[n].value===t){l[n].selected=!0,a&&(l[n].defaultSelected=!0);return}e!==null||l[n].disabled||(e=l[n])}e!==null&&(e.selected=!0)}}function hf(l,e,t){if(e!=null&&(e=""+ye(e),e!==l.value&&(l.value=e),t==null)){l.defaultValue!==e&&(l.defaultValue=e);return}l.defaultValue=t!=null?""+ye(t):""}function vf(l,e,t,a){if(e==null){if(a!=null){if(t!=null)throw Error(f(92));if(bl(a)){if(1<a.length)throw Error(f(93));a=a[0]}t=a}t==null&&(t=""),e=t}t=ye(e),l.defaultValue=t,a=l.textContent,a===t&&a!==""&&a!==null&&(l.value=a)}function ia(l,e){if(e){var t=l.firstChild;if(t&&t===l.lastChild&&t.nodeType===3){t.nodeValue=e;return}}l.textContent=e}var _h=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 gf(l,e,t){var a=e.indexOf("--")===0;t==null||typeof t=="boolean"||t===""?a?l.setProperty(e,""):e==="float"?l.cssFloat="":l[e]="":a?l.setProperty(e,t):typeof t!="number"||t===0||_h.has(e)?e==="float"?l.cssFloat=t:l[e]=(""+t).trim():l[e]=t+"px"}function mf(l,e,t){if(e!=null&&typeof e!="object")throw Error(f(62));if(l=l.style,t!=null){for(var a in t)!t.hasOwnProperty(a)||e!=null&&e.hasOwnProperty(a)||(a.indexOf("--")===0?l.setProperty(a,""):a==="float"?l.cssFloat="":l[a]="");for(var n in e)a=e[n],e.hasOwnProperty(n)&&t[n]!==a&&gf(l,n,a)}else for(var u in e)e.hasOwnProperty(u)&&gf(l,u,e[u])}function Ai(l){if(l.indexOf("-")===-1)return!1;switch(l){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 Rh=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"]]),Bh=/^[\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 tu(l){return Bh.test(""+l)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":l}var Ei=null;function Oi(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var ca=null,sa=null;function yf(l){var e=ea(l);if(e&&(l=e.stateNode)){var t=l[ee]||null;l:switch(l=e.stateNode,e.type){case"input":if(Mi(l,t.value,t.defaultValue,t.defaultValue,t.checked,t.defaultChecked,t.type,t.name),e=t.name,t.type==="radio"&&e!=null){for(t=l;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll('input[name="'+pe(""+e)+'"][type="radio"]'),e=0;e<t.length;e++){var a=t[e];if(a!==l&&a.form===l.form){var n=a[ee]||null;if(!n)throw Error(f(90));Mi(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(e=0;e<t.length;e++)a=t[e],a.form===l.form&&df(a)}break l;case"textarea":hf(l,t.value,t.defaultValue);break l;case"select":e=t.value,e!=null&&ua(l,!!t.multiple,e,!1)}}}var Di=!1;function pf(l,e,t){if(Di)return l(e,t);Di=!0;try{var a=l(e);return a}finally{if(Di=!1,(ca!==null||sa!==null)&&(Xu(),ca&&(e=ca,l=sa,sa=ca=null,yf(e),l)))for(e=0;e<l.length;e++)yf(l[e])}}function Ja(l,e){var t=l.stateNode;if(t===null)return null;var a=t[ee]||null;if(a===null)return null;t=a[e];l:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(l=l.type,a=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!a;break l;default:l=!1}if(l)return null;if(t&&typeof t!="function")throw Error(f(231,e,typeof t));return t}var Le=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ui=!1;if(Le)try{var Wa={};Object.defineProperty(Wa,"passive",{get:function(){Ui=!0}}),window.addEventListener("test",Wa,Wa),window.removeEventListener("test",Wa,Wa)}catch{Ui=!1}var ct=null,Ci=null,au=null;function bf(){if(au)return au;var l,e=Ci,t=e.length,a,n="value"in ct?ct.value:ct.textContent,u=n.length;for(l=0;l<t&&e[l]===n[l];l++);var i=t-l;for(a=1;a<=i&&e[t-a]===n[u-a];a++);return au=n.slice(l,1<a?1-a:void 0)}function nu(l){var e=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&e===13&&(l=13)):l=e,l===10&&(l=13),32<=l||l===13?l:0}function uu(){return!0}function xf(){return!1}function te(l){function e(t,a,n,u,i){this._reactName=t,this._targetInst=n,this.type=a,this.nativeEvent=u,this.target=i,this.currentTarget=null;for(var s in l)l.hasOwnProperty(s)&&(t=l[s],this[s]=t?t(u):u[s]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?uu:xf,this.isPropagationStopped=xf,this}return E(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=uu)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=uu)},persist:function(){},isPersistent:uu}),e}var Nt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iu=te(Nt),$a=E({},Nt,{view:0,detail:0}),Nh=te($a),_i,Ri,Fa,cu=E({},$a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ni,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==Fa&&(Fa&&l.type==="mousemove"?(_i=l.screenX-Fa.screenX,Ri=l.screenY-Fa.screenY):Ri=_i=0,Fa=l),_i)},movementY:function(l){return"movementY"in l?l.movementY:Ri}}),Sf=te(cu),Hh=E({},cu,{dataTransfer:0}),wh=te(Hh),qh=E({},$a,{relatedTarget:0}),Bi=te(qh),Yh=E({},Nt,{animationName:0,elapsedTime:0,pseudoElement:0}),Gh=te(Yh),Xh=E({},Nt,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),Qh=te(Xh),Lh=E({},Nt,{data:0}),jf=te(Lh),Vh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zh={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"},Kh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kh(l){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(l):(l=Kh[l])?!!e[l]:!1}function Ni(){return kh}var Jh=E({},$a,{key:function(l){if(l.key){var e=Vh[l.key]||l.key;if(e!=="Unidentified")return e}return l.type==="keypress"?(l=nu(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?Zh[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ni,charCode:function(l){return l.type==="keypress"?nu(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?nu(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),Wh=te(Jh),$h=E({},cu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zf=te($h),Fh=E({},$a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ni}),Ih=te(Fh),Ph=E({},Nt,{propertyName:0,elapsedTime:0,pseudoElement:0}),l0=te(Ph),e0=E({},cu,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),t0=te(e0),a0=E({},Nt,{newState:0,oldState:0}),n0=te(a0),u0=[9,13,27,32],Hi=Le&&"CompositionEvent"in window,Ia=null;Le&&"documentMode"in document&&(Ia=document.documentMode);var i0=Le&&"TextEvent"in window&&!Ia,Mf=Le&&(!Hi||Ia&&8<Ia&&11>=Ia),Tf=" ",Af=!1;function Ef(l,e){switch(l){case"keyup":return u0.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Of(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var fa=!1;function c0(l,e){switch(l){case"compositionend":return Of(e);case"keypress":return e.which!==32?null:(Af=!0,Tf);case"textInput":return l=e.data,l===Tf&&Af?null:l;default:return null}}function s0(l,e){if(fa)return l==="compositionend"||!Hi&&Ef(l,e)?(l=bf(),au=Ci=ct=null,fa=!1,l):null;switch(l){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 Mf&&e.locale!=="ko"?null:e.data;default:return null}}var f0={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 Df(l){var e=l&&l.nodeName&&l.nodeName.toLowerCase();return e==="input"?!!f0[l.type]:e==="textarea"}function Uf(l,e,t,a){ca?sa?sa.push(a):sa=[a]:ca=a,e=ku(e,"onChange"),0<e.length&&(t=new iu("onChange","change",null,t,a),l.push({event:t,listeners:e}))}var Pa=null,ln=null;function o0(l){dr(l,0)}function su(l){var e=ka(l);if(df(e))return l}function Cf(l,e){if(l==="change")return e}var _f=!1;if(Le){var wi;if(Le){var qi="oninput"in document;if(!qi){var Rf=document.createElement("div");Rf.setAttribute("oninput","return;"),qi=typeof Rf.oninput=="function"}wi=qi}else wi=!1;_f=wi&&(!document.documentMode||9<document.documentMode)}function Bf(){Pa&&(Pa.detachEvent("onpropertychange",Nf),ln=Pa=null)}function Nf(l){if(l.propertyName==="value"&&su(ln)){var e=[];Uf(e,ln,l,Oi(l)),pf(o0,e)}}function d0(l,e,t){l==="focusin"?(Bf(),Pa=e,ln=t,Pa.attachEvent("onpropertychange",Nf)):l==="focusout"&&Bf()}function r0(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return su(ln)}function h0(l,e){if(l==="click")return su(e)}function v0(l,e){if(l==="input"||l==="change")return su(e)}function g0(l,e){return l===e&&(l!==0||1/l===1/e)||l!==l&&e!==e}var fe=typeof Object.is=="function"?Object.is:g0;function en(l,e){if(fe(l,e))return!0;if(typeof l!="object"||l===null||typeof e!="object"||e===null)return!1;var t=Object.keys(l),a=Object.keys(e);if(t.length!==a.length)return!1;for(a=0;a<t.length;a++){var n=t[a];if(!It.call(e,n)||!fe(l[n],e[n]))return!1}return!0}function Hf(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function wf(l,e){var t=Hf(l);l=0;for(var a;t;){if(t.nodeType===3){if(a=l+t.textContent.length,l<=e&&a>=e)return{node:t,offset:e-l};l=a}l:{for(;t;){if(t.nextSibling){t=t.nextSibling;break l}t=t.parentNode}t=void 0}t=Hf(t)}}function qf(l,e){return l&&e?l===e?!0:l&&l.nodeType===3?!1:e&&e.nodeType===3?qf(l,e.parentNode):"contains"in l?l.contains(e):l.compareDocumentPosition?!!(l.compareDocumentPosition(e)&16):!1:!1}function Yf(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var e=eu(l.document);e instanceof l.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)l=e.contentWindow;else break;e=eu(l.document)}return e}function Yi(l){var e=l&&l.nodeName&&l.nodeName.toLowerCase();return e&&(e==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||e==="textarea"||l.contentEditable==="true")}var m0=Le&&"documentMode"in document&&11>=document.documentMode,oa=null,Gi=null,tn=null,Xi=!1;function Gf(l,e,t){var a=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Xi||oa==null||oa!==eu(a)||(a=oa,"selectionStart"in a&&Yi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),tn&&en(tn,a)||(tn=a,a=ku(Gi,"onSelect"),0<a.length&&(e=new iu("onSelect","select",null,e,t),l.push({event:e,listeners:a}),e.target=oa)))}function Ht(l,e){var t={};return t[l.toLowerCase()]=e.toLowerCase(),t["Webkit"+l]="webkit"+e,t["Moz"+l]="moz"+e,t}var da={animationend:Ht("Animation","AnimationEnd"),animationiteration:Ht("Animation","AnimationIteration"),animationstart:Ht("Animation","AnimationStart"),transitionrun:Ht("Transition","TransitionRun"),transitionstart:Ht("Transition","TransitionStart"),transitioncancel:Ht("Transition","TransitionCancel"),transitionend:Ht("Transition","TransitionEnd")},Qi={},Xf={};Le&&(Xf=document.createElement("div").style,"AnimationEvent"in window||(delete da.animationend.animation,delete da.animationiteration.animation,delete da.animationstart.animation),"TransitionEvent"in window||delete da.transitionend.transition);function wt(l){if(Qi[l])return Qi[l];if(!da[l])return l;var e=da[l],t;for(t in e)if(e.hasOwnProperty(t)&&t in Xf)return Qi[l]=e[t];return l}var Qf=wt("animationend"),Lf=wt("animationiteration"),Vf=wt("animationstart"),y0=wt("transitionrun"),p0=wt("transitionstart"),b0=wt("transitioncancel"),Zf=wt("transitionend"),Kf=new Map,Li="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(" ");Li.push("scrollEnd");function Ue(l,e){Kf.set(l,e),Bt(e,[l])}var kf=new WeakMap;function be(l,e){if(typeof l=="object"&&l!==null){var t=kf.get(l);return t!==void 0?t:(e={value:l,source:e,stack:ff(e)},kf.set(l,e),e)}return{value:l,source:e,stack:ff(e)}}var xe=[],ra=0,Vi=0;function fu(){for(var l=ra,e=Vi=ra=0;e<l;){var t=xe[e];xe[e++]=null;var a=xe[e];xe[e++]=null;var n=xe[e];xe[e++]=null;var u=xe[e];if(xe[e++]=null,a!==null&&n!==null){var i=a.pending;i===null?n.next=n:(n.next=i.next,i.next=n),a.pending=n}u!==0&&Jf(t,n,u)}}function ou(l,e,t,a){xe[ra++]=l,xe[ra++]=e,xe[ra++]=t,xe[ra++]=a,Vi|=a,l.lanes|=a,l=l.alternate,l!==null&&(l.lanes|=a)}function Zi(l,e,t,a){return ou(l,e,t,a),du(l)}function ha(l,e){return ou(l,null,null,e),du(l)}function Jf(l,e,t){l.lanes|=t;var a=l.alternate;a!==null&&(a.lanes|=t);for(var n=!1,u=l.return;u!==null;)u.childLanes|=t,a=u.alternate,a!==null&&(a.childLanes|=t),u.tag===22&&(l=u.stateNode,l===null||l._visibility&1||(n=!0)),l=u,u=u.return;return l.tag===3?(u=l.stateNode,n&&e!==null&&(n=31-se(t),l=u.hiddenUpdates,a=l[n],a===null?l[n]=[e]:a.push(e),e.lane=t|536870912),u):null}function du(l){if(50<On)throw On=0,Fc=null,Error(f(185));for(var e=l.return;e!==null;)l=e,e=l.return;return l.tag===3?l.stateNode:null}var va={};function x0(l,e,t,a){this.tag=l,this.key=t,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oe(l,e,t,a){return new x0(l,e,t,a)}function Ki(l){return l=l.prototype,!(!l||!l.isReactComponent)}function Ve(l,e){var t=l.alternate;return t===null?(t=oe(l.tag,e,l.key,l.mode),t.elementType=l.elementType,t.type=l.type,t.stateNode=l.stateNode,t.alternate=l,l.alternate=t):(t.pendingProps=e,t.type=l.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=l.flags&65011712,t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=l.sibling,t.index=l.index,t.ref=l.ref,t.refCleanup=l.refCleanup,t}function Wf(l,e){l.flags&=65011714;var t=l.alternate;return t===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,l.type=t.type,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),l}function ru(l,e,t,a,n,u){var i=0;if(a=l,typeof l=="function")Ki(l)&&(i=1);else if(typeof l=="string")i=j1(l,t,jl.current)?26:l==="html"||l==="head"||l==="body"?27:5;else l:switch(l){case Il:return l=oe(31,t,e,n),l.elementType=Il,l.lanes=u,l;case $:return qt(t.children,n,u,e);case il:i=8,n|=24;break;case w:return l=oe(12,t,e,n|2),l.elementType=w,l.lanes=u,l;case Ul:return l=oe(13,t,e,n),l.elementType=Ul,l.lanes=u,l;case Ll:return l=oe(19,t,e,n),l.elementType=Ll,l.lanes=u,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case K:case Y:i=10;break l;case J:i=9;break l;case dl:i=11;break l;case ql:i=14;break l;case Vl:i=16,a=null;break l}i=29,t=Error(f(130,l===null?"null":typeof l,"")),a=null}return e=oe(i,t,e,n),e.elementType=l,e.type=a,e.lanes=u,e}function qt(l,e,t,a){return l=oe(7,l,a,e),l.lanes=t,l}function ki(l,e,t){return l=oe(6,l,null,e),l.lanes=t,l}function Ji(l,e,t){return e=oe(4,l.children!==null?l.children:[],l.key,e),e.lanes=t,e.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},e}var ga=[],ma=0,hu=null,vu=0,Se=[],je=0,Yt=null,Ze=1,Ke="";function Gt(l,e){ga[ma++]=vu,ga[ma++]=hu,hu=l,vu=e}function $f(l,e,t){Se[je++]=Ze,Se[je++]=Ke,Se[je++]=Yt,Yt=l;var a=Ze;l=Ke;var n=32-se(a)-1;a&=~(1<<n),t+=1;var u=32-se(e)+n;if(30<u){var i=n-n%5;u=(a&(1<<i)-1).toString(32),a>>=i,n-=i,Ze=1<<32-se(e)+n|t<<n|a,Ke=u+l}else Ze=1<<u|t<<n|a,Ke=l}function Wi(l){l.return!==null&&(Gt(l,1),$f(l,1,0))}function $i(l){for(;l===hu;)hu=ga[--ma],ga[ma]=null,vu=ga[--ma],ga[ma]=null;for(;l===Yt;)Yt=Se[--je],Se[je]=null,Ke=Se[--je],Se[je]=null,Ze=Se[--je],Se[je]=null}var Fl=null,Al=null,fl=!1,Xt=null,He=!1,Fi=Error(f(519));function Qt(l){var e=Error(f(418,""));throw un(be(e,l)),Fi}function Ff(l){var e=l.stateNode,t=l.type,a=l.memoizedProps;switch(e[Jl]=l,e[ee]=a,t){case"dialog":tl("cancel",e),tl("close",e);break;case"iframe":case"object":case"embed":tl("load",e);break;case"video":case"audio":for(t=0;t<Un.length;t++)tl(Un[t],e);break;case"source":tl("error",e);break;case"img":case"image":case"link":tl("error",e),tl("load",e);break;case"details":tl("toggle",e);break;case"input":tl("invalid",e),rf(e,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),lu(e);break;case"select":tl("invalid",e);break;case"textarea":tl("invalid",e),vf(e,a.value,a.defaultValue,a.children),lu(e)}t=a.children,typeof t!="string"&&typeof t!="number"&&typeof t!="bigint"||e.textContent===""+t||a.suppressHydrationWarning===!0||gr(e.textContent,t)?(a.popover!=null&&(tl("beforetoggle",e),tl("toggle",e)),a.onScroll!=null&&tl("scroll",e),a.onScrollEnd!=null&&tl("scrollend",e),a.onClick!=null&&(e.onclick=Ju),e=!0):e=!1,e||Qt(l)}function If(l){for(Fl=l.return;Fl;)switch(Fl.tag){case 5:case 13:He=!1;return;case 27:case 3:He=!0;return;default:Fl=Fl.return}}function an(l){if(l!==Fl)return!1;if(!fl)return If(l),fl=!0,!1;var e=l.tag,t;if((t=e!==3&&e!==27)&&((t=e===5)&&(t=l.type,t=!(t!=="form"&&t!=="button")||hs(l.type,l.memoizedProps)),t=!t),t&&Al&&Qt(l),If(l),e===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(f(317));l:{for(l=l.nextSibling,e=0;l;){if(l.nodeType===8)if(t=l.data,t==="/$"){if(e===0){Al=_e(l.nextSibling);break l}e--}else t!=="$"&&t!=="$!"&&t!=="$?"||e++;l=l.nextSibling}Al=null}}else e===27?(e=Al,zt(l.type)?(l=ys,ys=null,Al=l):Al=e):Al=Fl?_e(l.stateNode.nextSibling):null;return!0}function nn(){Al=Fl=null,fl=!1}function Pf(){var l=Xt;return l!==null&&(ue===null?ue=l:ue.push.apply(ue,l),Xt=null),l}function un(l){Xt===null?Xt=[l]:Xt.push(l)}var Ii=F(null),Lt=null,ke=null;function st(l,e,t){W(Ii,e._currentValue),e._currentValue=t}function Je(l){l._currentValue=Ii.current,ll(Ii)}function Pi(l,e,t){for(;l!==null;){var a=l.alternate;if((l.childLanes&e)!==e?(l.childLanes|=e,a!==null&&(a.childLanes|=e)):a!==null&&(a.childLanes&e)!==e&&(a.childLanes|=e),l===t)break;l=l.return}}function lc(l,e,t,a){var n=l.child;for(n!==null&&(n.return=l);n!==null;){var u=n.dependencies;if(u!==null){var i=n.child;u=u.firstContext;l:for(;u!==null;){var s=u;u=n;for(var o=0;o<e.length;o++)if(s.context===e[o]){u.lanes|=t,s=u.alternate,s!==null&&(s.lanes|=t),Pi(u.return,t,l),a||(i=null);break l}u=s.next}}else if(n.tag===18){if(i=n.return,i===null)throw Error(f(341));i.lanes|=t,u=i.alternate,u!==null&&(u.lanes|=t),Pi(i,t,l),i=null}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===l){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}}function cn(l,e,t,a){l=null;for(var n=e,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var i=n.alternate;if(i===null)throw Error(f(387));if(i=i.memoizedProps,i!==null){var s=n.type;fe(n.pendingProps.value,i.value)||(l!==null?l.push(s):l=[s])}}else if(n===De.current){if(i=n.alternate,i===null)throw Error(f(387));i.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(l!==null?l.push(Hn):l=[Hn])}n=n.return}l!==null&&lc(e,l,t,a),e.flags|=262144}function gu(l){for(l=l.firstContext;l!==null;){if(!fe(l.context._currentValue,l.memoizedValue))return!0;l=l.next}return!1}function Vt(l){Lt=l,ke=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function Wl(l){return lo(Lt,l)}function mu(l,e){return Lt===null&&Vt(l),lo(l,e)}function lo(l,e){var t=e._currentValue;if(e={context:e,memoizedValue:t,next:null},ke===null){if(l===null)throw Error(f(308));ke=e,l.dependencies={lanes:0,firstContext:e},l.flags|=524288}else ke=ke.next=e;return t}var S0=typeof AbortController<"u"?AbortController:function(){var l=[],e=this.signal={aborted:!1,addEventListener:function(t,a){l.push(a)}};this.abort=function(){e.aborted=!0,l.forEach(function(t){return t()})}},j0=d.unstable_scheduleCallback,z0=d.unstable_NormalPriority,Nl={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ec(){return{controller:new S0,data:new Map,refCount:0}}function sn(l){l.refCount--,l.refCount===0&&j0(z0,function(){l.controller.abort()})}var fn=null,tc=0,ya=0,pa=null;function M0(l,e){if(fn===null){var t=fn=[];tc=0,ya=ns(),pa={status:"pending",value:void 0,then:function(a){t.push(a)}}}return tc++,e.then(eo,eo),e}function eo(){if(--tc===0&&fn!==null){pa!==null&&(pa.status="fulfilled");var l=fn;fn=null,ya=0,pa=null;for(var e=0;e<l.length;e++)(0,l[e])()}}function T0(l,e){var t=[],a={status:"pending",value:null,reason:null,then:function(n){t.push(n)}};return l.then(function(){a.status="fulfilled",a.value=e;for(var n=0;n<t.length;n++)(0,t[n])(e)},function(n){for(a.status="rejected",a.reason=n,n=0;n<t.length;n++)(0,t[n])(void 0)}),a}var to=S.S;S.S=function(l,e){typeof e=="object"&&e!==null&&typeof e.then=="function"&&M0(l,e),to!==null&&to(l,e)};var Zt=F(null);function ac(){var l=Zt.current;return l!==null?l:xl.pooledCache}function yu(l,e){e===null?W(Zt,Zt.current):W(Zt,e.pool)}function ao(){var l=ac();return l===null?null:{parent:Nl._currentValue,pool:l}}var on=Error(f(460)),no=Error(f(474)),pu=Error(f(542)),nc={then:function(){}};function uo(l){return l=l.status,l==="fulfilled"||l==="rejected"}function bu(){}function io(l,e,t){switch(t=l[t],t===void 0?l.push(e):t!==e&&(e.then(bu,bu),e=t),e.status){case"fulfilled":return e.value;case"rejected":throw l=e.reason,so(l),l;default:if(typeof e.status=="string")e.then(bu,bu);else{if(l=xl,l!==null&&100<l.shellSuspendCounter)throw Error(f(482));l=e,l.status="pending",l.then(function(a){if(e.status==="pending"){var n=e;n.status="fulfilled",n.value=a}},function(a){if(e.status==="pending"){var n=e;n.status="rejected",n.reason=a}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw l=e.reason,so(l),l}throw dn=e,on}}var dn=null;function co(){if(dn===null)throw Error(f(459));var l=dn;return dn=null,l}function so(l){if(l===on||l===pu)throw Error(f(483))}var ft=!1;function uc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ic(l,e){l=l.updateQueue,e.updateQueue===l&&(e.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function ot(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function dt(l,e,t){var a=l.updateQueue;if(a===null)return null;if(a=a.shared,(rl&2)!==0){var n=a.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),a.pending=e,e=du(l),Jf(l,null,t),e}return ou(l,a,e,t),du(l)}function rn(l,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194048)!==0)){var a=e.lanes;a&=l.pendingLanes,t|=a,e.lanes=t,lf(l,t)}}function cc(l,e){var t=l.updateQueue,a=l.alternate;if(a!==null&&(a=a.updateQueue,t===a)){var n=null,u=null;if(t=t.firstBaseUpdate,t!==null){do{var i={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,t=t.next}while(t!==null);u===null?n=u=e:u=u.next=e}else n=u=e;t={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},l.updateQueue=t;return}l=t.lastBaseUpdate,l===null?t.firstBaseUpdate=e:l.next=e,t.lastBaseUpdate=e}var sc=!1;function hn(){if(sc){var l=pa;if(l!==null)throw l}}function vn(l,e,t,a){sc=!1;var n=l.updateQueue;ft=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var o=s,y=o.next;o.next=null,i===null?u=y:i.next=y,i=o;var z=l.alternate;z!==null&&(z=z.updateQueue,s=z.lastBaseUpdate,s!==i&&(s===null?z.firstBaseUpdate=y:s.next=y,z.lastBaseUpdate=o))}if(u!==null){var T=n.baseState;i=0,z=y=o=null,s=u;do{var p=s.lane&-536870913,b=p!==s.lane;if(b?(ul&p)===p:(a&p)===p){p!==0&&p===ya&&(sc=!0),z!==null&&(z=z.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});l:{var Z=l,X=s;p=e;var ml=t;switch(X.tag){case 1:if(Z=X.payload,typeof Z=="function"){T=Z.call(ml,T,p);break l}T=Z;break l;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=X.payload,p=typeof Z=="function"?Z.call(ml,T,p):Z,p==null)break l;T=E({},T,p);break l;case 2:ft=!0}}p=s.callback,p!==null&&(l.flags|=64,b&&(l.flags|=8192),b=n.callbacks,b===null?n.callbacks=[p]:b.push(p))}else b={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},z===null?(y=z=b,o=T):z=z.next=b,i|=p;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;b=s,s=b.next,b.next=null,n.lastBaseUpdate=b,n.shared.pending=null}}while(!0);z===null&&(o=T),n.baseState=o,n.firstBaseUpdate=y,n.lastBaseUpdate=z,u===null&&(n.shared.lanes=0),bt|=i,l.lanes=i,l.memoizedState=T}}function fo(l,e){if(typeof l!="function")throw Error(f(191,l));l.call(e)}function oo(l,e){var t=l.callbacks;if(t!==null)for(l.callbacks=null,l=0;l<t.length;l++)fo(t[l],e)}var ba=F(null),xu=F(0);function ro(l,e){l=et,W(xu,l),W(ba,e),et=l|e.baseLanes}function fc(){W(xu,et),W(ba,ba.current)}function oc(){et=xu.current,ll(ba),ll(xu)}var rt=0,I=null,vl=null,_l=null,Su=!1,xa=!1,Kt=!1,ju=0,gn=0,Sa=null,A0=0;function Ol(){throw Error(f(321))}function dc(l,e){if(e===null)return!1;for(var t=0;t<e.length&&t<l.length;t++)if(!fe(l[t],e[t]))return!1;return!0}function rc(l,e,t,a,n,u){return rt=u,I=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,S.H=l===null||l.memoizedState===null?Wo:$o,Kt=!1,u=t(a,n),Kt=!1,xa&&(u=vo(e,t,a,n)),ho(l),u}function ho(l){S.H=Ou;var e=vl!==null&&vl.next!==null;if(rt=0,_l=vl=I=null,Su=!1,gn=0,Sa=null,e)throw Error(f(300));l===null||Gl||(l=l.dependencies,l!==null&&gu(l)&&(Gl=!0))}function vo(l,e,t,a){I=l;var n=0;do{if(xa&&(Sa=null),gn=0,xa=!1,25<=n)throw Error(f(301));if(n+=1,_l=vl=null,l.updateQueue!=null){var u=l.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}S.H=R0,u=e(t,a)}while(xa);return u}function E0(){var l=S.H,e=l.useState()[0];return e=typeof e.then=="function"?mn(e):e,l=l.useState()[0],(vl!==null?vl.memoizedState:null)!==l&&(I.flags|=1024),e}function hc(){var l=ju!==0;return ju=0,l}function vc(l,e,t){e.updateQueue=l.updateQueue,e.flags&=-2053,l.lanes&=~t}function gc(l){if(Su){for(l=l.memoizedState;l!==null;){var e=l.queue;e!==null&&(e.pending=null),l=l.next}Su=!1}rt=0,_l=vl=I=null,xa=!1,gn=ju=0,Sa=null}function ae(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _l===null?I.memoizedState=_l=l:_l=_l.next=l,_l}function Rl(){if(vl===null){var l=I.alternate;l=l!==null?l.memoizedState:null}else l=vl.next;var e=_l===null?I.memoizedState:_l.next;if(e!==null)_l=e,vl=l;else{if(l===null)throw I.alternate===null?Error(f(467)):Error(f(310));vl=l,l={memoizedState:vl.memoizedState,baseState:vl.baseState,baseQueue:vl.baseQueue,queue:vl.queue,next:null},_l===null?I.memoizedState=_l=l:_l=_l.next=l}return _l}function mc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mn(l){var e=gn;return gn+=1,Sa===null&&(Sa=[]),l=io(Sa,l,e),e=I,(_l===null?e.memoizedState:_l.next)===null&&(e=e.alternate,S.H=e===null||e.memoizedState===null?Wo:$o),l}function zu(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return mn(l);if(l.$$typeof===Y)return Wl(l)}throw Error(f(438,String(l)))}function yc(l){var e=null,t=I.updateQueue;if(t!==null&&(e=t.memoCache),e==null){var a=I.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(e={data:a.data.map(function(n){return n.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),t===null&&(t=mc(),I.updateQueue=t),t.memoCache=e,t=e.data[e.index],t===void 0)for(t=e.data[e.index]=Array(l),a=0;a<l;a++)t[a]=Oe;return e.index++,t}function We(l,e){return typeof e=="function"?e(l):e}function Mu(l){var e=Rl();return pc(e,vl,l)}function pc(l,e,t){var a=l.queue;if(a===null)throw Error(f(311));a.lastRenderedReducer=t;var n=l.baseQueue,u=a.pending;if(u!==null){if(n!==null){var i=n.next;n.next=u.next,u.next=i}e.baseQueue=n=u,a.pending=null}if(u=l.baseState,n===null)l.memoizedState=u;else{e=n.next;var s=i=null,o=null,y=e,z=!1;do{var T=y.lane&-536870913;if(T!==y.lane?(ul&T)===T:(rt&T)===T){var p=y.revertLane;if(p===0)o!==null&&(o=o.next={lane:0,revertLane:0,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null}),T===ya&&(z=!0);else if((rt&p)===p){y=y.next,p===ya&&(z=!0);continue}else T={lane:0,revertLane:y.revertLane,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null},o===null?(s=o=T,i=u):o=o.next=T,I.lanes|=p,bt|=p;T=y.action,Kt&&t(u,T),u=y.hasEagerState?y.eagerState:t(u,T)}else p={lane:T,revertLane:y.revertLane,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null},o===null?(s=o=p,i=u):o=o.next=p,I.lanes|=T,bt|=T;y=y.next}while(y!==null&&y!==e);if(o===null?i=u:o.next=s,!fe(u,l.memoizedState)&&(Gl=!0,z&&(t=pa,t!==null)))throw t;l.memoizedState=u,l.baseState=i,l.baseQueue=o,a.lastRenderedState=u}return n===null&&(a.lanes=0),[l.memoizedState,a.dispatch]}function bc(l){var e=Rl(),t=e.queue;if(t===null)throw Error(f(311));t.lastRenderedReducer=l;var a=t.dispatch,n=t.pending,u=e.memoizedState;if(n!==null){t.pending=null;var i=n=n.next;do u=l(u,i.action),i=i.next;while(i!==n);fe(u,e.memoizedState)||(Gl=!0),e.memoizedState=u,e.baseQueue===null&&(e.baseState=u),t.lastRenderedState=u}return[u,a]}function go(l,e,t){var a=I,n=Rl(),u=fl;if(u){if(t===void 0)throw Error(f(407));t=t()}else t=e();var i=!fe((vl||n).memoizedState,t);i&&(n.memoizedState=t,Gl=!0),n=n.queue;var s=po.bind(null,a,n,l);if(yn(2048,8,s,[l]),n.getSnapshot!==e||i||_l!==null&&_l.memoizedState.tag&1){if(a.flags|=2048,ja(9,Tu(),yo.bind(null,a,n,t,e),null),xl===null)throw Error(f(349));u||(rt&124)!==0||mo(a,e,t)}return t}function mo(l,e,t){l.flags|=16384,l={getSnapshot:e,value:t},e=I.updateQueue,e===null?(e=mc(),I.updateQueue=e,e.stores=[l]):(t=e.stores,t===null?e.stores=[l]:t.push(l))}function yo(l,e,t,a){e.value=t,e.getSnapshot=a,bo(e)&&xo(l)}function po(l,e,t){return t(function(){bo(e)&&xo(l)})}function bo(l){var e=l.getSnapshot;l=l.value;try{var t=e();return!fe(l,t)}catch{return!0}}function xo(l){var e=ha(l,2);e!==null&&ge(e,l,2)}function xc(l){var e=ae();if(typeof l=="function"){var t=l;if(l=t(),Kt){ut(!0);try{t()}finally{ut(!1)}}}return e.memoizedState=e.baseState=l,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:We,lastRenderedState:l},e}function So(l,e,t,a){return l.baseState=t,pc(l,vl,typeof a=="function"?a:We)}function O0(l,e,t,a,n){if(Eu(l))throw Error(f(485));if(l=e.action,l!==null){var u={payload:n,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){u.listeners.push(i)}};S.T!==null?t(!0):u.isTransition=!1,a(u),t=e.pending,t===null?(u.next=e.pending=u,jo(e,u)):(u.next=t.next,e.pending=t.next=u)}}function jo(l,e){var t=e.action,a=e.payload,n=l.state;if(e.isTransition){var u=S.T,i={};S.T=i;try{var s=t(n,a),o=S.S;o!==null&&o(i,s),zo(l,e,s)}catch(y){Sc(l,e,y)}finally{S.T=u}}else try{u=t(n,a),zo(l,e,u)}catch(y){Sc(l,e,y)}}function zo(l,e,t){t!==null&&typeof t=="object"&&typeof t.then=="function"?t.then(function(a){Mo(l,e,a)},function(a){return Sc(l,e,a)}):Mo(l,e,t)}function Mo(l,e,t){e.status="fulfilled",e.value=t,To(e),l.state=t,e=l.pending,e!==null&&(t=e.next,t===e?l.pending=null:(t=t.next,e.next=t,jo(l,t)))}function Sc(l,e,t){var a=l.pending;if(l.pending=null,a!==null){a=a.next;do e.status="rejected",e.reason=t,To(e),e=e.next;while(e!==a)}l.action=null}function To(l){l=l.listeners;for(var e=0;e<l.length;e++)(0,l[e])()}function Ao(l,e){return e}function Eo(l,e){if(fl){var t=xl.formState;if(t!==null){l:{var a=I;if(fl){if(Al){e:{for(var n=Al,u=He;n.nodeType!==8;){if(!u){n=null;break e}if(n=_e(n.nextSibling),n===null){n=null;break e}}u=n.data,n=u==="F!"||u==="F"?n:null}if(n){Al=_e(n.nextSibling),a=n.data==="F!";break l}}Qt(a)}a=!1}a&&(e=t[0])}}return t=ae(),t.memoizedState=t.baseState=e,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:e},t.queue=a,t=Ko.bind(null,I,a),a.dispatch=t,a=xc(!1),u=Ac.bind(null,I,!1,a.queue),a=ae(),n={state:e,dispatch:null,action:l,pending:null},a.queue=n,t=O0.bind(null,I,n,u,t),n.dispatch=t,a.memoizedState=l,[e,t,!1]}function Oo(l){var e=Rl();return Do(e,vl,l)}function Do(l,e,t){if(e=pc(l,e,Ao)[0],l=Mu(We)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var a=mn(e)}catch(i){throw i===on?pu:i}else a=e;e=Rl();var n=e.queue,u=n.dispatch;return t!==e.memoizedState&&(I.flags|=2048,ja(9,Tu(),D0.bind(null,n,t),null)),[a,u,l]}function D0(l,e){l.action=e}function Uo(l){var e=Rl(),t=vl;if(t!==null)return Do(e,t,l);Rl(),e=e.memoizedState,t=Rl();var a=t.queue.dispatch;return t.memoizedState=l,[e,a,!1]}function ja(l,e,t,a){return l={tag:l,create:t,deps:a,inst:e,next:null},e=I.updateQueue,e===null&&(e=mc(),I.updateQueue=e),t=e.lastEffect,t===null?e.lastEffect=l.next=l:(a=t.next,t.next=l,l.next=a,e.lastEffect=l),l}function Tu(){return{destroy:void 0,resource:void 0}}function Co(){return Rl().memoizedState}function Au(l,e,t,a){var n=ae();a=a===void 0?null:a,I.flags|=l,n.memoizedState=ja(1|e,Tu(),t,a)}function yn(l,e,t,a){var n=Rl();a=a===void 0?null:a;var u=n.memoizedState.inst;vl!==null&&a!==null&&dc(a,vl.memoizedState.deps)?n.memoizedState=ja(e,u,t,a):(I.flags|=l,n.memoizedState=ja(1|e,u,t,a))}function _o(l,e){Au(8390656,8,l,e)}function Ro(l,e){yn(2048,8,l,e)}function Bo(l,e){return yn(4,2,l,e)}function No(l,e){return yn(4,4,l,e)}function Ho(l,e){if(typeof e=="function"){l=l();var t=e(l);return function(){typeof t=="function"?t():e(null)}}if(e!=null)return l=l(),e.current=l,function(){e.current=null}}function wo(l,e,t){t=t!=null?t.concat([l]):null,yn(4,4,Ho.bind(null,e,l),t)}function jc(){}function qo(l,e){var t=Rl();e=e===void 0?null:e;var a=t.memoizedState;return e!==null&&dc(e,a[1])?a[0]:(t.memoizedState=[l,e],l)}function Yo(l,e){var t=Rl();e=e===void 0?null:e;var a=t.memoizedState;if(e!==null&&dc(e,a[1]))return a[0];if(a=l(),Kt){ut(!0);try{l()}finally{ut(!1)}}return t.memoizedState=[a,e],a}function zc(l,e,t){return t===void 0||(rt&1073741824)!==0?l.memoizedState=e:(l.memoizedState=t,l=Qd(),I.lanes|=l,bt|=l,t)}function Go(l,e,t,a){return fe(t,e)?t:ba.current!==null?(l=zc(l,t,a),fe(l,e)||(Gl=!0),l):(rt&42)===0?(Gl=!0,l.memoizedState=t):(l=Qd(),I.lanes|=l,bt|=l,e)}function Xo(l,e,t,a,n){var u=U.p;U.p=u!==0&&8>u?u:8;var i=S.T,s={};S.T=s,Ac(l,!1,e,t);try{var o=n(),y=S.S;if(y!==null&&y(s,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var z=T0(o,a);pn(l,e,z,ve(l))}else pn(l,e,a,ve(l))}catch(T){pn(l,e,{then:function(){},status:"rejected",reason:T},ve())}finally{U.p=u,S.T=i}}function U0(){}function Mc(l,e,t,a){if(l.tag!==5)throw Error(f(476));var n=Qo(l).queue;Xo(l,n,e,G,t===null?U0:function(){return Lo(l),t(a)})}function Qo(l){var e=l.memoizedState;if(e!==null)return e;e={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:We,lastRenderedState:G},next:null};var t={};return e.next={memoizedState:t,baseState:t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:We,lastRenderedState:t},next:null},l.memoizedState=e,l=l.alternate,l!==null&&(l.memoizedState=e),e}function Lo(l){var e=Qo(l).next.queue;pn(l,e,{},ve())}function Tc(){return Wl(Hn)}function Vo(){return Rl().memoizedState}function Zo(){return Rl().memoizedState}function C0(l){for(var e=l.return;e!==null;){switch(e.tag){case 24:case 3:var t=ve();l=ot(t);var a=dt(e,l,t);a!==null&&(ge(a,e,t),rn(a,e,t)),e={cache:ec()},l.payload=e;return}e=e.return}}function _0(l,e,t){var a=ve();t={lane:a,revertLane:0,action:t,hasEagerState:!1,eagerState:null,next:null},Eu(l)?ko(e,t):(t=Zi(l,e,t,a),t!==null&&(ge(t,l,a),Jo(t,e,a)))}function Ko(l,e,t){var a=ve();pn(l,e,t,a)}function pn(l,e,t,a){var n={lane:a,revertLane:0,action:t,hasEagerState:!1,eagerState:null,next:null};if(Eu(l))ko(e,n);else{var u=l.alternate;if(l.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var i=e.lastRenderedState,s=u(i,t);if(n.hasEagerState=!0,n.eagerState=s,fe(s,i))return ou(l,e,n,0),xl===null&&fu(),!1}catch{}finally{}if(t=Zi(l,e,n,a),t!==null)return ge(t,l,a),Jo(t,e,a),!0}return!1}function Ac(l,e,t,a){if(a={lane:2,revertLane:ns(),action:a,hasEagerState:!1,eagerState:null,next:null},Eu(l)){if(e)throw Error(f(479))}else e=Zi(l,t,a,2),e!==null&&ge(e,l,2)}function Eu(l){var e=l.alternate;return l===I||e!==null&&e===I}function ko(l,e){xa=Su=!0;var t=l.pending;t===null?e.next=e:(e.next=t.next,t.next=e),l.pending=e}function Jo(l,e,t){if((t&4194048)!==0){var a=e.lanes;a&=l.pendingLanes,t|=a,e.lanes=t,lf(l,t)}}var Ou={readContext:Wl,use:zu,useCallback:Ol,useContext:Ol,useEffect:Ol,useImperativeHandle:Ol,useLayoutEffect:Ol,useInsertionEffect:Ol,useMemo:Ol,useReducer:Ol,useRef:Ol,useState:Ol,useDebugValue:Ol,useDeferredValue:Ol,useTransition:Ol,useSyncExternalStore:Ol,useId:Ol,useHostTransitionStatus:Ol,useFormState:Ol,useActionState:Ol,useOptimistic:Ol,useMemoCache:Ol,useCacheRefresh:Ol},Wo={readContext:Wl,use:zu,useCallback:function(l,e){return ae().memoizedState=[l,e===void 0?null:e],l},useContext:Wl,useEffect:_o,useImperativeHandle:function(l,e,t){t=t!=null?t.concat([l]):null,Au(4194308,4,Ho.bind(null,e,l),t)},useLayoutEffect:function(l,e){return Au(4194308,4,l,e)},useInsertionEffect:function(l,e){Au(4,2,l,e)},useMemo:function(l,e){var t=ae();e=e===void 0?null:e;var a=l();if(Kt){ut(!0);try{l()}finally{ut(!1)}}return t.memoizedState=[a,e],a},useReducer:function(l,e,t){var a=ae();if(t!==void 0){var n=t(e);if(Kt){ut(!0);try{t(e)}finally{ut(!1)}}}else n=e;return a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:n},a.queue=l,l=l.dispatch=_0.bind(null,I,l),[a.memoizedState,l]},useRef:function(l){var e=ae();return l={current:l},e.memoizedState=l},useState:function(l){l=xc(l);var e=l.queue,t=Ko.bind(null,I,e);return e.dispatch=t,[l.memoizedState,t]},useDebugValue:jc,useDeferredValue:function(l,e){var t=ae();return zc(t,l,e)},useTransition:function(){var l=xc(!1);return l=Xo.bind(null,I,l.queue,!0,!1),ae().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,e,t){var a=I,n=ae();if(fl){if(t===void 0)throw Error(f(407));t=t()}else{if(t=e(),xl===null)throw Error(f(349));(ul&124)!==0||mo(a,e,t)}n.memoizedState=t;var u={value:t,getSnapshot:e};return n.queue=u,_o(po.bind(null,a,u,l),[l]),a.flags|=2048,ja(9,Tu(),yo.bind(null,a,u,t,e),null),t},useId:function(){var l=ae(),e=xl.identifierPrefix;if(fl){var t=Ke,a=Ze;t=(a&~(1<<32-se(a)-1)).toString(32)+t,e="«"+e+"R"+t,t=ju++,0<t&&(e+="H"+t.toString(32)),e+="»"}else t=A0++,e="«"+e+"r"+t.toString(32)+"»";return l.memoizedState=e},useHostTransitionStatus:Tc,useFormState:Eo,useActionState:Eo,useOptimistic:function(l){var e=ae();e.memoizedState=e.baseState=l;var t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=t,e=Ac.bind(null,I,!0,t),t.dispatch=e,[l,e]},useMemoCache:yc,useCacheRefresh:function(){return ae().memoizedState=C0.bind(null,I)}},$o={readContext:Wl,use:zu,useCallback:qo,useContext:Wl,useEffect:Ro,useImperativeHandle:wo,useInsertionEffect:Bo,useLayoutEffect:No,useMemo:Yo,useReducer:Mu,useRef:Co,useState:function(){return Mu(We)},useDebugValue:jc,useDeferredValue:function(l,e){var t=Rl();return Go(t,vl.memoizedState,l,e)},useTransition:function(){var l=Mu(We)[0],e=Rl().memoizedState;return[typeof l=="boolean"?l:mn(l),e]},useSyncExternalStore:go,useId:Vo,useHostTransitionStatus:Tc,useFormState:Oo,useActionState:Oo,useOptimistic:function(l,e){var t=Rl();return So(t,vl,l,e)},useMemoCache:yc,useCacheRefresh:Zo},R0={readContext:Wl,use:zu,useCallback:qo,useContext:Wl,useEffect:Ro,useImperativeHandle:wo,useInsertionEffect:Bo,useLayoutEffect:No,useMemo:Yo,useReducer:bc,useRef:Co,useState:function(){return bc(We)},useDebugValue:jc,useDeferredValue:function(l,e){var t=Rl();return vl===null?zc(t,l,e):Go(t,vl.memoizedState,l,e)},useTransition:function(){var l=bc(We)[0],e=Rl().memoizedState;return[typeof l=="boolean"?l:mn(l),e]},useSyncExternalStore:go,useId:Vo,useHostTransitionStatus:Tc,useFormState:Uo,useActionState:Uo,useOptimistic:function(l,e){var t=Rl();return vl!==null?So(t,vl,l,e):(t.baseState=l,[l,t.queue.dispatch])},useMemoCache:yc,useCacheRefresh:Zo},za=null,bn=0;function Du(l){var e=bn;return bn+=1,za===null&&(za=[]),io(za,l,e)}function xn(l,e){e=e.props.ref,l.ref=e!==void 0?e:null}function Uu(l,e){throw e.$$typeof===O?Error(f(525)):(l=Object.prototype.toString.call(e),Error(f(31,l==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":l)))}function Fo(l){var e=l._init;return e(l._payload)}function Io(l){function e(v,r){if(l){var m=v.deletions;m===null?(v.deletions=[r],v.flags|=16):m.push(r)}}function t(v,r){if(!l)return null;for(;r!==null;)e(v,r),r=r.sibling;return null}function a(v){for(var r=new Map;v!==null;)v.key!==null?r.set(v.key,v):r.set(v.index,v),v=v.sibling;return r}function n(v,r){return v=Ve(v,r),v.index=0,v.sibling=null,v}function u(v,r,m){return v.index=m,l?(m=v.alternate,m!==null?(m=m.index,m<r?(v.flags|=67108866,r):m):(v.flags|=67108866,r)):(v.flags|=1048576,r)}function i(v){return l&&v.alternate===null&&(v.flags|=67108866),v}function s(v,r,m,M){return r===null||r.tag!==6?(r=ki(m,v.mode,M),r.return=v,r):(r=n(r,m),r.return=v,r)}function o(v,r,m,M){var H=m.type;return H===$?z(v,r,m.props.children,M,m.key):r!==null&&(r.elementType===H||typeof H=="object"&&H!==null&&H.$$typeof===Vl&&Fo(H)===r.type)?(r=n(r,m.props),xn(r,m),r.return=v,r):(r=ru(m.type,m.key,m.props,null,v.mode,M),xn(r,m),r.return=v,r)}function y(v,r,m,M){return r===null||r.tag!==4||r.stateNode.containerInfo!==m.containerInfo||r.stateNode.implementation!==m.implementation?(r=Ji(m,v.mode,M),r.return=v,r):(r=n(r,m.children||[]),r.return=v,r)}function z(v,r,m,M,H){return r===null||r.tag!==7?(r=qt(m,v.mode,M,H),r.return=v,r):(r=n(r,m),r.return=v,r)}function T(v,r,m){if(typeof r=="string"&&r!==""||typeof r=="number"||typeof r=="bigint")return r=ki(""+r,v.mode,m),r.return=v,r;if(typeof r=="object"&&r!==null){switch(r.$$typeof){case D:return m=ru(r.type,r.key,r.props,null,v.mode,m),xn(m,r),m.return=v,m;case k:return r=Ji(r,v.mode,m),r.return=v,r;case Vl:var M=r._init;return r=M(r._payload),T(v,r,m)}if(bl(r)||Cl(r))return r=qt(r,v.mode,m,null),r.return=v,r;if(typeof r.then=="function")return T(v,Du(r),m);if(r.$$typeof===Y)return T(v,mu(v,r),m);Uu(v,r)}return null}function p(v,r,m,M){var H=r!==null?r.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return H!==null?null:s(v,r,""+m,M);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case D:return m.key===H?o(v,r,m,M):null;case k:return m.key===H?y(v,r,m,M):null;case Vl:return H=m._init,m=H(m._payload),p(v,r,m,M)}if(bl(m)||Cl(m))return H!==null?null:z(v,r,m,M,null);if(typeof m.then=="function")return p(v,r,Du(m),M);if(m.$$typeof===Y)return p(v,r,mu(v,m),M);Uu(v,m)}return null}function b(v,r,m,M,H){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return v=v.get(m)||null,s(r,v,""+M,H);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case D:return v=v.get(M.key===null?m:M.key)||null,o(r,v,M,H);case k:return v=v.get(M.key===null?m:M.key)||null,y(r,v,M,H);case Vl:var P=M._init;return M=P(M._payload),b(v,r,m,M,H)}if(bl(M)||Cl(M))return v=v.get(m)||null,z(r,v,M,H,null);if(typeof M.then=="function")return b(v,r,m,Du(M),H);if(M.$$typeof===Y)return b(v,r,m,mu(r,M),H);Uu(r,M)}return null}function Z(v,r,m,M){for(var H=null,P=null,q=r,L=r=0,Ql=null;q!==null&&L<m.length;L++){q.index>L?(Ql=q,q=null):Ql=q.sibling;var cl=p(v,q,m[L],M);if(cl===null){q===null&&(q=Ql);break}l&&q&&cl.alternate===null&&e(v,q),r=u(cl,r,L),P===null?H=cl:P.sibling=cl,P=cl,q=Ql}if(L===m.length)return t(v,q),fl&&Gt(v,L),H;if(q===null){for(;L<m.length;L++)q=T(v,m[L],M),q!==null&&(r=u(q,r,L),P===null?H=q:P.sibling=q,P=q);return fl&&Gt(v,L),H}for(q=a(q);L<m.length;L++)Ql=b(q,v,L,m[L],M),Ql!==null&&(l&&Ql.alternate!==null&&q.delete(Ql.key===null?L:Ql.key),r=u(Ql,r,L),P===null?H=Ql:P.sibling=Ql,P=Ql);return l&&q.forEach(function(Ot){return e(v,Ot)}),fl&&Gt(v,L),H}function X(v,r,m,M){if(m==null)throw Error(f(151));for(var H=null,P=null,q=r,L=r=0,Ql=null,cl=m.next();q!==null&&!cl.done;L++,cl=m.next()){q.index>L?(Ql=q,q=null):Ql=q.sibling;var Ot=p(v,q,cl.value,M);if(Ot===null){q===null&&(q=Ql);break}l&&q&&Ot.alternate===null&&e(v,q),r=u(Ot,r,L),P===null?H=Ot:P.sibling=Ot,P=Ot,q=Ql}if(cl.done)return t(v,q),fl&&Gt(v,L),H;if(q===null){for(;!cl.done;L++,cl=m.next())cl=T(v,cl.value,M),cl!==null&&(r=u(cl,r,L),P===null?H=cl:P.sibling=cl,P=cl);return fl&&Gt(v,L),H}for(q=a(q);!cl.done;L++,cl=m.next())cl=b(q,v,L,cl.value,M),cl!==null&&(l&&cl.alternate!==null&&q.delete(cl.key===null?L:cl.key),r=u(cl,r,L),P===null?H=cl:P.sibling=cl,P=cl);return l&&q.forEach(function(B1){return e(v,B1)}),fl&&Gt(v,L),H}function ml(v,r,m,M){if(typeof m=="object"&&m!==null&&m.type===$&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case D:l:{for(var H=m.key;r!==null;){if(r.key===H){if(H=m.type,H===$){if(r.tag===7){t(v,r.sibling),M=n(r,m.props.children),M.return=v,v=M;break l}}else if(r.elementType===H||typeof H=="object"&&H!==null&&H.$$typeof===Vl&&Fo(H)===r.type){t(v,r.sibling),M=n(r,m.props),xn(M,m),M.return=v,v=M;break l}t(v,r);break}else e(v,r);r=r.sibling}m.type===$?(M=qt(m.props.children,v.mode,M,m.key),M.return=v,v=M):(M=ru(m.type,m.key,m.props,null,v.mode,M),xn(M,m),M.return=v,v=M)}return i(v);case k:l:{for(H=m.key;r!==null;){if(r.key===H)if(r.tag===4&&r.stateNode.containerInfo===m.containerInfo&&r.stateNode.implementation===m.implementation){t(v,r.sibling),M=n(r,m.children||[]),M.return=v,v=M;break l}else{t(v,r);break}else e(v,r);r=r.sibling}M=Ji(m,v.mode,M),M.return=v,v=M}return i(v);case Vl:return H=m._init,m=H(m._payload),ml(v,r,m,M)}if(bl(m))return Z(v,r,m,M);if(Cl(m)){if(H=Cl(m),typeof H!="function")throw Error(f(150));return m=H.call(m),X(v,r,m,M)}if(typeof m.then=="function")return ml(v,r,Du(m),M);if(m.$$typeof===Y)return ml(v,r,mu(v,m),M);Uu(v,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,r!==null&&r.tag===6?(t(v,r.sibling),M=n(r,m),M.return=v,v=M):(t(v,r),M=ki(m,v.mode,M),M.return=v,v=M),i(v)):t(v,r)}return function(v,r,m,M){try{bn=0;var H=ml(v,r,m,M);return za=null,H}catch(q){if(q===on||q===pu)throw q;var P=oe(29,q,null,v.mode);return P.lanes=M,P.return=v,P}finally{}}}var Ma=Io(!0),Po=Io(!1),ze=F(null),we=null;function ht(l){var e=l.alternate;W(Hl,Hl.current&1),W(ze,l),we===null&&(e===null||ba.current!==null||e.memoizedState!==null)&&(we=l)}function ld(l){if(l.tag===22){if(W(Hl,Hl.current),W(ze,l),we===null){var e=l.alternate;e!==null&&e.memoizedState!==null&&(we=l)}}else vt()}function vt(){W(Hl,Hl.current),W(ze,ze.current)}function $e(l){ll(ze),we===l&&(we=null),ll(Hl)}var Hl=F(0);function Cu(l){for(var e=l;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||ms(t)))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===l)break;for(;e.sibling===null;){if(e.return===null||e.return===l)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function Ec(l,e,t,a){e=l.memoizedState,t=t(a,e),t=t==null?e:E({},e,t),l.memoizedState=t,l.lanes===0&&(l.updateQueue.baseState=t)}var Oc={enqueueSetState:function(l,e,t){l=l._reactInternals;var a=ve(),n=ot(a);n.payload=e,t!=null&&(n.callback=t),e=dt(l,n,a),e!==null&&(ge(e,l,a),rn(e,l,a))},enqueueReplaceState:function(l,e,t){l=l._reactInternals;var a=ve(),n=ot(a);n.tag=1,n.payload=e,t!=null&&(n.callback=t),e=dt(l,n,a),e!==null&&(ge(e,l,a),rn(e,l,a))},enqueueForceUpdate:function(l,e){l=l._reactInternals;var t=ve(),a=ot(t);a.tag=2,e!=null&&(a.callback=e),e=dt(l,a,t),e!==null&&(ge(e,l,t),rn(e,l,t))}};function ed(l,e,t,a,n,u,i){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(a,u,i):e.prototype&&e.prototype.isPureReactComponent?!en(t,a)||!en(n,u):!0}function td(l,e,t,a){l=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(t,a),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(t,a),e.state!==l&&Oc.enqueueReplaceState(e,e.state,null)}function kt(l,e){var t=e;if("ref"in e){t={};for(var a in e)a!=="ref"&&(t[a]=e[a])}if(l=l.defaultProps){t===e&&(t=E({},t));for(var n in l)t[n]===void 0&&(t[n]=l[n])}return t}var _u=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)};function ad(l){_u(l)}function nd(l){console.error(l)}function ud(l){_u(l)}function Ru(l,e){try{var t=l.onUncaughtError;t(e.value,{componentStack:e.stack})}catch(a){setTimeout(function(){throw a})}}function id(l,e,t){try{var a=l.onCaughtError;a(t.value,{componentStack:t.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Dc(l,e,t){return t=ot(t),t.tag=3,t.payload={element:null},t.callback=function(){Ru(l,e)},t}function cd(l){return l=ot(l),l.tag=3,l}function sd(l,e,t,a){var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var u=a.value;l.payload=function(){return n(u)},l.callback=function(){id(e,t,a)}}var i=t.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(l.callback=function(){id(e,t,a),typeof n!="function"&&(xt===null?xt=new Set([this]):xt.add(this));var s=a.stack;this.componentDidCatch(a.value,{componentStack:s!==null?s:""})})}function B0(l,e,t,a,n){if(t.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(e=t.alternate,e!==null&&cn(e,t,n,!0),t=ze.current,t!==null){switch(t.tag){case 13:return we===null?Pc():t.alternate===null&&El===0&&(El=3),t.flags&=-257,t.flags|=65536,t.lanes=n,a===nc?t.flags|=16384:(e=t.updateQueue,e===null?t.updateQueue=new Set([a]):e.add(a),es(l,a,n)),!1;case 22:return t.flags|=65536,a===nc?t.flags|=16384:(e=t.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([a])},t.updateQueue=e):(t=e.retryQueue,t===null?e.retryQueue=new Set([a]):t.add(a)),es(l,a,n)),!1}throw Error(f(435,t.tag))}return es(l,a,n),Pc(),!1}if(fl)return e=ze.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=n,a!==Fi&&(l=Error(f(422),{cause:a}),un(be(l,t)))):(a!==Fi&&(e=Error(f(423),{cause:a}),un(be(e,t))),l=l.current.alternate,l.flags|=65536,n&=-n,l.lanes|=n,a=be(a,t),n=Dc(l.stateNode,a,n),cc(l,n),El!==4&&(El=2)),!1;var u=Error(f(520),{cause:a});if(u=be(u,t),En===null?En=[u]:En.push(u),El!==4&&(El=2),e===null)return!0;a=be(a,t),t=e;do{switch(t.tag){case 3:return t.flags|=65536,l=n&-n,t.lanes|=l,l=Dc(t.stateNode,a,l),cc(t,l),!1;case 1:if(e=t.type,u=t.stateNode,(t.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(xt===null||!xt.has(u))))return t.flags|=65536,n&=-n,t.lanes|=n,n=cd(n),sd(n,l,t,a),cc(t,n),!1}t=t.return}while(t!==null);return!1}var fd=Error(f(461)),Gl=!1;function Zl(l,e,t,a){e.child=l===null?Po(e,null,t,a):Ma(e,l.child,t,a)}function od(l,e,t,a,n){t=t.render;var u=e.ref;if("ref"in a){var i={};for(var s in a)s!=="ref"&&(i[s]=a[s])}else i=a;return Vt(e),a=rc(l,e,t,i,u,n),s=hc(),l!==null&&!Gl?(vc(l,e,n),Fe(l,e,n)):(fl&&s&&Wi(e),e.flags|=1,Zl(l,e,a,n),e.child)}function dd(l,e,t,a,n){if(l===null){var u=t.type;return typeof u=="function"&&!Ki(u)&&u.defaultProps===void 0&&t.compare===null?(e.tag=15,e.type=u,rd(l,e,u,a,n)):(l=ru(t.type,null,a,e,e.mode,n),l.ref=e.ref,l.return=e,e.child=l)}if(u=l.child,!wc(l,n)){var i=u.memoizedProps;if(t=t.compare,t=t!==null?t:en,t(i,a)&&l.ref===e.ref)return Fe(l,e,n)}return e.flags|=1,l=Ve(u,a),l.ref=e.ref,l.return=e,e.child=l}function rd(l,e,t,a,n){if(l!==null){var u=l.memoizedProps;if(en(u,a)&&l.ref===e.ref)if(Gl=!1,e.pendingProps=a=u,wc(l,n))(l.flags&131072)!==0&&(Gl=!0);else return e.lanes=l.lanes,Fe(l,e,n)}return Uc(l,e,t,a,n)}function hd(l,e,t){var a=e.pendingProps,n=a.children,u=l!==null?l.memoizedState:null;if(a.mode==="hidden"){if((e.flags&128)!==0){if(a=u!==null?u.baseLanes|t:t,l!==null){for(n=e.child=l.child,u=0;n!==null;)u=u|n.lanes|n.childLanes,n=n.sibling;e.childLanes=u&~a}else e.childLanes=0,e.child=null;return vd(l,e,a,t)}if((t&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},l!==null&&yu(e,u!==null?u.cachePool:null),u!==null?ro(e,u):fc(),ld(e);else return e.lanes=e.childLanes=536870912,vd(l,e,u!==null?u.baseLanes|t:t,t)}else u!==null?(yu(e,u.cachePool),ro(e,u),vt(),e.memoizedState=null):(l!==null&&yu(e,null),fc(),vt());return Zl(l,e,n,t),e.child}function vd(l,e,t,a){var n=ac();return n=n===null?null:{parent:Nl._currentValue,pool:n},e.memoizedState={baseLanes:t,cachePool:n},l!==null&&yu(e,null),fc(),ld(e),l!==null&&cn(l,e,a,!0),null}function Bu(l,e){var t=e.ref;if(t===null)l!==null&&l.ref!==null&&(e.flags|=4194816);else{if(typeof t!="function"&&typeof t!="object")throw Error(f(284));(l===null||l.ref!==t)&&(e.flags|=4194816)}}function Uc(l,e,t,a,n){return Vt(e),t=rc(l,e,t,a,void 0,n),a=hc(),l!==null&&!Gl?(vc(l,e,n),Fe(l,e,n)):(fl&&a&&Wi(e),e.flags|=1,Zl(l,e,t,n),e.child)}function gd(l,e,t,a,n,u){return Vt(e),e.updateQueue=null,t=vo(e,a,t,n),ho(l),a=hc(),l!==null&&!Gl?(vc(l,e,u),Fe(l,e,u)):(fl&&a&&Wi(e),e.flags|=1,Zl(l,e,t,u),e.child)}function md(l,e,t,a,n){if(Vt(e),e.stateNode===null){var u=va,i=t.contextType;typeof i=="object"&&i!==null&&(u=Wl(i)),u=new t(a,u),e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Oc,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=a,u.state=e.memoizedState,u.refs={},uc(e),i=t.contextType,u.context=typeof i=="object"&&i!==null?Wl(i):va,u.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ec(e,t,i,a),u.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(i=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),i!==u.state&&Oc.enqueueReplaceState(u,u.state,null),vn(e,a,u,n),hn(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),a=!0}else if(l===null){u=e.stateNode;var s=e.memoizedProps,o=kt(t,s);u.props=o;var y=u.context,z=t.contextType;i=va,typeof z=="object"&&z!==null&&(i=Wl(z));var T=t.getDerivedStateFromProps;z=typeof T=="function"||typeof u.getSnapshotBeforeUpdate=="function",s=e.pendingProps!==s,z||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(s||y!==i)&&td(e,u,a,i),ft=!1;var p=e.memoizedState;u.state=p,vn(e,a,u,n),hn(),y=e.memoizedState,s||p!==y||ft?(typeof T=="function"&&(Ec(e,t,T,a),y=e.memoizedState),(o=ft||ed(e,t,o,a,p,y,i))?(z||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(e.flags|=4194308)):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=a,e.memoizedState=y),u.props=a,u.state=y,u.context=i,a=o):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),a=!1)}else{u=e.stateNode,ic(l,e),i=e.memoizedProps,z=kt(t,i),u.props=z,T=e.pendingProps,p=u.context,y=t.contextType,o=va,typeof y=="object"&&y!==null&&(o=Wl(y)),s=t.getDerivedStateFromProps,(y=typeof s=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==T||p!==o)&&td(e,u,a,o),ft=!1,p=e.memoizedState,u.state=p,vn(e,a,u,n),hn();var b=e.memoizedState;i!==T||p!==b||ft||l!==null&&l.dependencies!==null&&gu(l.dependencies)?(typeof s=="function"&&(Ec(e,t,s,a),b=e.memoizedState),(z=ft||ed(e,t,z,a,p,b,o)||l!==null&&l.dependencies!==null&&gu(l.dependencies))?(y||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,b,o),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,b,o)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===l.memoizedProps&&p===l.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===l.memoizedProps&&p===l.memoizedState||(e.flags|=1024),e.memoizedProps=a,e.memoizedState=b),u.props=a,u.state=b,u.context=o,a=z):(typeof u.componentDidUpdate!="function"||i===l.memoizedProps&&p===l.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===l.memoizedProps&&p===l.memoizedState||(e.flags|=1024),a=!1)}return u=a,Bu(l,e),a=(e.flags&128)!==0,u||a?(u=e.stateNode,t=a&&typeof t.getDerivedStateFromError!="function"?null:u.render(),e.flags|=1,l!==null&&a?(e.child=Ma(e,l.child,null,n),e.child=Ma(e,null,t,n)):Zl(l,e,t,n),e.memoizedState=u.state,l=e.child):l=Fe(l,e,n),l}function yd(l,e,t,a){return nn(),e.flags|=256,Zl(l,e,t,a),e.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(l){return{baseLanes:l,cachePool:ao()}}function Rc(l,e,t){return l=l!==null?l.childLanes&~t:0,e&&(l|=Me),l}function pd(l,e,t){var a=e.pendingProps,n=!1,u=(e.flags&128)!==0,i;if((i=u)||(i=l!==null&&l.memoizedState===null?!1:(Hl.current&2)!==0),i&&(n=!0,e.flags&=-129),i=(e.flags&32)!==0,e.flags&=-33,l===null){if(fl){if(n?ht(e):vt(),fl){var s=Al,o;if(o=s){l:{for(o=s,s=He;o.nodeType!==8;){if(!s){s=null;break l}if(o=_e(o.nextSibling),o===null){s=null;break l}}s=o}s!==null?(e.memoizedState={dehydrated:s,treeContext:Yt!==null?{id:Ze,overflow:Ke}:null,retryLane:536870912,hydrationErrors:null},o=oe(18,null,null,0),o.stateNode=s,o.return=e,e.child=o,Fl=e,Al=null,o=!0):o=!1}o||Qt(e)}if(s=e.memoizedState,s!==null&&(s=s.dehydrated,s!==null))return ms(s)?e.lanes=32:e.lanes=536870912,null;$e(e)}return s=a.children,a=a.fallback,n?(vt(),n=e.mode,s=Nu({mode:"hidden",children:s},n),a=qt(a,n,t,null),s.return=e,a.return=e,s.sibling=a,e.child=s,n=e.child,n.memoizedState=_c(t),n.childLanes=Rc(l,i,t),e.memoizedState=Cc,a):(ht(e),Bc(e,s))}if(o=l.memoizedState,o!==null&&(s=o.dehydrated,s!==null)){if(u)e.flags&256?(ht(e),e.flags&=-257,e=Nc(l,e,t)):e.memoizedState!==null?(vt(),e.child=l.child,e.flags|=128,e=null):(vt(),n=a.fallback,s=e.mode,a=Nu({mode:"visible",children:a.children},s),n=qt(n,s,t,null),n.flags|=2,a.return=e,n.return=e,a.sibling=n,e.child=a,Ma(e,l.child,null,t),a=e.child,a.memoizedState=_c(t),a.childLanes=Rc(l,i,t),e.memoizedState=Cc,e=n);else if(ht(e),ms(s)){if(i=s.nextSibling&&s.nextSibling.dataset,i)var y=i.dgst;i=y,a=Error(f(419)),a.stack="",a.digest=i,un({value:a,source:null,stack:null}),e=Nc(l,e,t)}else if(Gl||cn(l,e,t,!1),i=(t&l.childLanes)!==0,Gl||i){if(i=xl,i!==null&&(a=t&-t,a=(a&42)!==0?1:yi(a),a=(a&(i.suspendedLanes|t))!==0?0:a,a!==0&&a!==o.retryLane))throw o.retryLane=a,ha(l,a),ge(i,l,a),fd;s.data==="$?"||Pc(),e=Nc(l,e,t)}else s.data==="$?"?(e.flags|=192,e.child=l.child,e=null):(l=o.treeContext,Al=_e(s.nextSibling),Fl=e,fl=!0,Xt=null,He=!1,l!==null&&(Se[je++]=Ze,Se[je++]=Ke,Se[je++]=Yt,Ze=l.id,Ke=l.overflow,Yt=e),e=Bc(e,a.children),e.flags|=4096);return e}return n?(vt(),n=a.fallback,s=e.mode,o=l.child,y=o.sibling,a=Ve(o,{mode:"hidden",children:a.children}),a.subtreeFlags=o.subtreeFlags&65011712,y!==null?n=Ve(y,n):(n=qt(n,s,t,null),n.flags|=2),n.return=e,a.return=e,a.sibling=n,e.child=a,a=n,n=e.child,s=l.child.memoizedState,s===null?s=_c(t):(o=s.cachePool,o!==null?(y=Nl._currentValue,o=o.parent!==y?{parent:y,pool:y}:o):o=ao(),s={baseLanes:s.baseLanes|t,cachePool:o}),n.memoizedState=s,n.childLanes=Rc(l,i,t),e.memoizedState=Cc,a):(ht(e),t=l.child,l=t.sibling,t=Ve(t,{mode:"visible",children:a.children}),t.return=e,t.sibling=null,l!==null&&(i=e.deletions,i===null?(e.deletions=[l],e.flags|=16):i.push(l)),e.child=t,e.memoizedState=null,t)}function Bc(l,e){return e=Nu({mode:"visible",children:e},l.mode),e.return=l,l.child=e}function Nu(l,e){return l=oe(22,l,null,e),l.lanes=0,l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},l}function Nc(l,e,t){return Ma(e,l.child,null,t),l=Bc(e,e.pendingProps.children),l.flags|=2,e.memoizedState=null,l}function bd(l,e,t){l.lanes|=e;var a=l.alternate;a!==null&&(a.lanes|=e),Pi(l.return,e,t)}function Hc(l,e,t,a,n){var u=l.memoizedState;u===null?l.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:a,tail:t,tailMode:n}:(u.isBackwards=e,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=t,u.tailMode=n)}function xd(l,e,t){var a=e.pendingProps,n=a.revealOrder,u=a.tail;if(Zl(l,e,a.children,t),a=Hl.current,(a&2)!==0)a=a&1|2,e.flags|=128;else{if(l!==null&&(l.flags&128)!==0)l:for(l=e.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&bd(l,t,e);else if(l.tag===19)bd(l,t,e);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break l;for(;l.sibling===null;){if(l.return===null||l.return===e)break l;l=l.return}l.sibling.return=l.return,l=l.sibling}a&=1}switch(W(Hl,a),n){case"forwards":for(t=e.child,n=null;t!==null;)l=t.alternate,l!==null&&Cu(l)===null&&(n=t),t=t.sibling;t=n,t===null?(n=e.child,e.child=null):(n=t.sibling,t.sibling=null),Hc(e,!1,n,t,u);break;case"backwards":for(t=null,n=e.child,e.child=null;n!==null;){if(l=n.alternate,l!==null&&Cu(l)===null){e.child=n;break}l=n.sibling,n.sibling=t,t=n,n=l}Hc(e,!0,t,null,u);break;case"together":Hc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Fe(l,e,t){if(l!==null&&(e.dependencies=l.dependencies),bt|=e.lanes,(t&e.childLanes)===0)if(l!==null){if(cn(l,e,t,!1),(t&e.childLanes)===0)return null}else return null;if(l!==null&&e.child!==l.child)throw Error(f(153));if(e.child!==null){for(l=e.child,t=Ve(l,l.pendingProps),e.child=t,t.return=e;l.sibling!==null;)l=l.sibling,t=t.sibling=Ve(l,l.pendingProps),t.return=e;t.sibling=null}return e.child}function wc(l,e){return(l.lanes&e)!==0?!0:(l=l.dependencies,!!(l!==null&&gu(l)))}function N0(l,e,t){switch(e.tag){case 3:nt(e,e.stateNode.containerInfo),st(e,Nl,l.memoizedState.cache),nn();break;case 27:case 5:Xa(e);break;case 4:nt(e,e.stateNode.containerInfo);break;case 10:st(e,e.type,e.memoizedProps.value);break;case 13:var a=e.memoizedState;if(a!==null)return a.dehydrated!==null?(ht(e),e.flags|=128,null):(t&e.child.childLanes)!==0?pd(l,e,t):(ht(e),l=Fe(l,e,t),l!==null?l.sibling:null);ht(e);break;case 19:var n=(l.flags&128)!==0;if(a=(t&e.childLanes)!==0,a||(cn(l,e,t,!1),a=(t&e.childLanes)!==0),n){if(a)return xd(l,e,t);e.flags|=128}if(n=e.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),W(Hl,Hl.current),a)break;return null;case 22:case 23:return e.lanes=0,hd(l,e,t);case 24:st(e,Nl,l.memoizedState.cache)}return Fe(l,e,t)}function Sd(l,e,t){if(l!==null)if(l.memoizedProps!==e.pendingProps)Gl=!0;else{if(!wc(l,t)&&(e.flags&128)===0)return Gl=!1,N0(l,e,t);Gl=(l.flags&131072)!==0}else Gl=!1,fl&&(e.flags&1048576)!==0&&$f(e,vu,e.index);switch(e.lanes=0,e.tag){case 16:l:{l=e.pendingProps;var a=e.elementType,n=a._init;if(a=n(a._payload),e.type=a,typeof a=="function")Ki(a)?(l=kt(a,l),e.tag=1,e=md(null,e,a,l,t)):(e.tag=0,e=Uc(null,e,a,l,t));else{if(a!=null){if(n=a.$$typeof,n===dl){e.tag=11,e=od(null,e,a,l,t);break l}else if(n===ql){e.tag=14,e=dd(null,e,a,l,t);break l}}throw e=me(a)||a,Error(f(306,e,""))}}return e;case 0:return Uc(l,e,e.type,e.pendingProps,t);case 1:return a=e.type,n=kt(a,e.pendingProps),md(l,e,a,n,t);case 3:l:{if(nt(e,e.stateNode.containerInfo),l===null)throw Error(f(387));a=e.pendingProps;var u=e.memoizedState;n=u.element,ic(l,e),vn(e,a,null,t);var i=e.memoizedState;if(a=i.cache,st(e,Nl,a),a!==u.cache&&lc(e,[Nl],t,!0),hn(),a=i.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:i.cache},e.updateQueue.baseState=u,e.memoizedState=u,e.flags&256){e=yd(l,e,a,t);break l}else if(a!==n){n=be(Error(f(424)),e),un(n),e=yd(l,e,a,t);break l}else{switch(l=e.stateNode.containerInfo,l.nodeType){case 9:l=l.body;break;default:l=l.nodeName==="HTML"?l.ownerDocument.body:l}for(Al=_e(l.firstChild),Fl=e,fl=!0,Xt=null,He=!0,t=Po(e,null,a,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling}else{if(nn(),a===n){e=Fe(l,e,t);break l}Zl(l,e,a,t)}e=e.child}return e;case 26:return Bu(l,e),l===null?(t=Tr(e.type,null,e.pendingProps,null))?e.memoizedState=t:fl||(t=e.type,l=e.pendingProps,a=Wu(Be.current).createElement(t),a[Jl]=e,a[ee]=l,kl(a,t,l),Yl(a),e.stateNode=a):e.memoizedState=Tr(e.type,l.memoizedProps,e.pendingProps,l.memoizedState),null;case 27:return Xa(e),l===null&&fl&&(a=e.stateNode=jr(e.type,e.pendingProps,Be.current),Fl=e,He=!0,n=Al,zt(e.type)?(ys=n,Al=_e(a.firstChild)):Al=n),Zl(l,e,e.pendingProps.children,t),Bu(l,e),l===null&&(e.flags|=4194304),e.child;case 5:return l===null&&fl&&((n=a=Al)&&(a=f1(a,e.type,e.pendingProps,He),a!==null?(e.stateNode=a,Fl=e,Al=_e(a.firstChild),He=!1,n=!0):n=!1),n||Qt(e)),Xa(e),n=e.type,u=e.pendingProps,i=l!==null?l.memoizedProps:null,a=u.children,hs(n,u)?a=null:i!==null&&hs(n,i)&&(e.flags|=32),e.memoizedState!==null&&(n=rc(l,e,E0,null,null,t),Hn._currentValue=n),Bu(l,e),Zl(l,e,a,t),e.child;case 6:return l===null&&fl&&((l=t=Al)&&(t=o1(t,e.pendingProps,He),t!==null?(e.stateNode=t,Fl=e,Al=null,l=!0):l=!1),l||Qt(e)),null;case 13:return pd(l,e,t);case 4:return nt(e,e.stateNode.containerInfo),a=e.pendingProps,l===null?e.child=Ma(e,null,a,t):Zl(l,e,a,t),e.child;case 11:return od(l,e,e.type,e.pendingProps,t);case 7:return Zl(l,e,e.pendingProps,t),e.child;case 8:return Zl(l,e,e.pendingProps.children,t),e.child;case 12:return Zl(l,e,e.pendingProps.children,t),e.child;case 10:return a=e.pendingProps,st(e,e.type,a.value),Zl(l,e,a.children,t),e.child;case 9:return n=e.type._context,a=e.pendingProps.children,Vt(e),n=Wl(n),a=a(n),e.flags|=1,Zl(l,e,a,t),e.child;case 14:return dd(l,e,e.type,e.pendingProps,t);case 15:return rd(l,e,e.type,e.pendingProps,t);case 19:return xd(l,e,t);case 31:return a=e.pendingProps,t=e.mode,a={mode:a.mode,children:a.children},l===null?(t=Nu(a,t),t.ref=e.ref,e.child=t,t.return=e,e=t):(t=Ve(l.child,a),t.ref=e.ref,e.child=t,t.return=e,e=t),e;case 22:return hd(l,e,t);case 24:return Vt(e),a=Wl(Nl),l===null?(n=ac(),n===null&&(n=xl,u=ec(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=t),n=u),e.memoizedState={parent:a,cache:n},uc(e),st(e,Nl,n)):((l.lanes&t)!==0&&(ic(l,e),vn(e,null,null,t),hn()),n=l.memoizedState,u=e.memoizedState,n.parent!==a?(n={parent:a,cache:a},e.memoizedState=n,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=n),st(e,Nl,a)):(a=u.cache,st(e,Nl,a),a!==n.cache&&lc(e,[Nl],t,!0))),Zl(l,e,e.pendingProps.children,t),e.child;case 29:throw e.pendingProps}throw Error(f(156,e.tag))}function Ie(l){l.flags|=4}function jd(l,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)l.flags&=-16777217;else if(l.flags|=16777216,!Ur(e)){if(e=ze.current,e!==null&&((ul&4194048)===ul?we!==null:(ul&62914560)!==ul&&(ul&536870912)===0||e!==we))throw dn=nc,no;l.flags|=8192}}function Hu(l,e){e!==null&&(l.flags|=4),l.flags&16384&&(e=l.tag!==22?Is():536870912,l.lanes|=e,Oa|=e)}function Sn(l,e){if(!fl)switch(l.tailMode){case"hidden":e=l.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?l.tail=null:t.sibling=null;break;case"collapsed":t=l.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e||l.tail===null?l.tail=null:l.tail.sibling=null:a.sibling=null}}function Tl(l){var e=l.alternate!==null&&l.alternate.child===l.child,t=0,a=0;if(e)for(var n=l.child;n!==null;)t|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=l,n=n.sibling;else for(n=l.child;n!==null;)t|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=l,n=n.sibling;return l.subtreeFlags|=a,l.childLanes=t,e}function H0(l,e,t){var a=e.pendingProps;switch($i(e),e.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tl(e),null;case 1:return Tl(e),null;case 3:return t=e.stateNode,a=null,l!==null&&(a=l.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),Je(Nl),Xe(),t.pendingContext&&(t.context=t.pendingContext,t.pendingContext=null),(l===null||l.child===null)&&(an(e)?Ie(e):l===null||l.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Pf())),Tl(e),null;case 26:return t=e.memoizedState,l===null?(Ie(e),t!==null?(Tl(e),jd(e,t)):(Tl(e),e.flags&=-16777217)):t?t!==l.memoizedState?(Ie(e),Tl(e),jd(e,t)):(Tl(e),e.flags&=-16777217):(l.memoizedProps!==a&&Ie(e),Tl(e),e.flags&=-16777217),null;case 27:_t(e),t=Be.current;var n=e.type;if(l!==null&&e.stateNode!=null)l.memoizedProps!==a&&Ie(e);else{if(!a){if(e.stateNode===null)throw Error(f(166));return Tl(e),null}l=jl.current,an(e)?Ff(e):(l=jr(n,a,t),e.stateNode=l,Ie(e))}return Tl(e),null;case 5:if(_t(e),t=e.type,l!==null&&e.stateNode!=null)l.memoizedProps!==a&&Ie(e);else{if(!a){if(e.stateNode===null)throw Error(f(166));return Tl(e),null}if(l=jl.current,an(e))Ff(e);else{switch(n=Wu(Be.current),l){case 1:l=n.createElementNS("http://www.w3.org/2000/svg",t);break;case 2:l=n.createElementNS("http://www.w3.org/1998/Math/MathML",t);break;default:switch(t){case"svg":l=n.createElementNS("http://www.w3.org/2000/svg",t);break;case"math":l=n.createElementNS("http://www.w3.org/1998/Math/MathML",t);break;case"script":l=n.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild);break;case"select":l=typeof a.is=="string"?n.createElement("select",{is:a.is}):n.createElement("select"),a.multiple?l.multiple=!0:a.size&&(l.size=a.size);break;default:l=typeof a.is=="string"?n.createElement(t,{is:a.is}):n.createElement(t)}}l[Jl]=e,l[ee]=a;l:for(n=e.child;n!==null;){if(n.tag===5||n.tag===6)l.appendChild(n.stateNode);else if(n.tag!==4&&n.tag!==27&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break l;for(;n.sibling===null;){if(n.return===null||n.return===e)break l;n=n.return}n.sibling.return=n.return,n=n.sibling}e.stateNode=l;l:switch(kl(l,t,a),t){case"button":case"input":case"select":case"textarea":l=!!a.autoFocus;break l;case"img":l=!0;break l;default:l=!1}l&&Ie(e)}}return Tl(e),e.flags&=-16777217,null;case 6:if(l&&e.stateNode!=null)l.memoizedProps!==a&&Ie(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(f(166));if(l=Be.current,an(e)){if(l=e.stateNode,t=e.memoizedProps,a=null,n=Fl,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}l[Jl]=e,l=!!(l.nodeValue===t||a!==null&&a.suppressHydrationWarning===!0||gr(l.nodeValue,t)),l||Qt(e)}else l=Wu(l).createTextNode(a),l[Jl]=e,e.stateNode=l}return Tl(e),null;case 13:if(a=e.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(n=an(e),a!==null&&a.dehydrated!==null){if(l===null){if(!n)throw Error(f(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(f(317));n[Jl]=e}else nn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Tl(e),n=!1}else n=Pf(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=n),n=!0;if(!n)return e.flags&256?($e(e),e):($e(e),null)}if($e(e),(e.flags&128)!==0)return e.lanes=t,e;if(t=a!==null,l=l!==null&&l.memoizedState!==null,t){a=e.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool);var u=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)}return t!==l&&t&&(e.child.flags|=8192),Hu(e,e.updateQueue),Tl(e),null;case 4:return Xe(),l===null&&ss(e.stateNode.containerInfo),Tl(e),null;case 10:return Je(e.type),Tl(e),null;case 19:if(ll(Hl),n=e.memoizedState,n===null)return Tl(e),null;if(a=(e.flags&128)!==0,u=n.rendering,u===null)if(a)Sn(n,!1);else{if(El!==0||l!==null&&(l.flags&128)!==0)for(l=e.child;l!==null;){if(u=Cu(l),u!==null){for(e.flags|=128,Sn(n,!1),l=u.updateQueue,e.updateQueue=l,Hu(e,l),e.subtreeFlags=0,l=t,t=e.child;t!==null;)Wf(t,l),t=t.sibling;return W(Hl,Hl.current&1|2),e.child}l=l.sibling}n.tail!==null&&Ne()>Yu&&(e.flags|=128,a=!0,Sn(n,!1),e.lanes=4194304)}else{if(!a)if(l=Cu(u),l!==null){if(e.flags|=128,a=!0,l=l.updateQueue,e.updateQueue=l,Hu(e,l),Sn(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!fl)return Tl(e),null}else 2*Ne()-n.renderingStartTime>Yu&&t!==536870912&&(e.flags|=128,a=!0,Sn(n,!1),e.lanes=4194304);n.isBackwards?(u.sibling=e.child,e.child=u):(l=n.last,l!==null?l.sibling=u:e.child=u,n.last=u)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ne(),e.sibling=null,l=Hl.current,W(Hl,a?l&1|2:l&1),e):(Tl(e),null);case 22:case 23:return $e(e),oc(),a=e.memoizedState!==null,l!==null?l.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(t&536870912)!==0&&(e.flags&128)===0&&(Tl(e),e.subtreeFlags&6&&(e.flags|=8192)):Tl(e),t=e.updateQueue,t!==null&&Hu(e,t.retryQueue),t=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(t=l.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==t&&(e.flags|=2048),l!==null&&ll(Zt),null;case 24:return t=null,l!==null&&(t=l.memoizedState.cache),e.memoizedState.cache!==t&&(e.flags|=2048),Je(Nl),Tl(e),null;case 25:return null;case 30:return null}throw Error(f(156,e.tag))}function w0(l,e){switch($i(e),e.tag){case 1:return l=e.flags,l&65536?(e.flags=l&-65537|128,e):null;case 3:return Je(Nl),Xe(),l=e.flags,(l&65536)!==0&&(l&128)===0?(e.flags=l&-65537|128,e):null;case 26:case 27:case 5:return _t(e),null;case 13:if($e(e),l=e.memoizedState,l!==null&&l.dehydrated!==null){if(e.alternate===null)throw Error(f(340));nn()}return l=e.flags,l&65536?(e.flags=l&-65537|128,e):null;case 19:return ll(Hl),null;case 4:return Xe(),null;case 10:return Je(e.type),null;case 22:case 23:return $e(e),oc(),l!==null&&ll(Zt),l=e.flags,l&65536?(e.flags=l&-65537|128,e):null;case 24:return Je(Nl),null;case 25:return null;default:return null}}function zd(l,e){switch($i(e),e.tag){case 3:Je(Nl),Xe();break;case 26:case 27:case 5:_t(e);break;case 4:Xe();break;case 13:$e(e);break;case 19:ll(Hl);break;case 10:Je(e.type);break;case 22:case 23:$e(e),oc(),l!==null&&ll(Zt);break;case 24:Je(Nl)}}function jn(l,e){try{var t=e.updateQueue,a=t!==null?t.lastEffect:null;if(a!==null){var n=a.next;t=n;do{if((t.tag&l)===l){a=void 0;var u=t.create,i=t.inst;a=u(),i.destroy=a}t=t.next}while(t!==n)}}catch(s){yl(e,e.return,s)}}function gt(l,e,t){try{var a=e.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&l)===l){var i=a.inst,s=i.destroy;if(s!==void 0){i.destroy=void 0,n=e;var o=t,y=s;try{y()}catch(z){yl(n,o,z)}}}a=a.next}while(a!==u)}}catch(z){yl(e,e.return,z)}}function Md(l){var e=l.updateQueue;if(e!==null){var t=l.stateNode;try{oo(e,t)}catch(a){yl(l,l.return,a)}}}function Td(l,e,t){t.props=kt(l.type,l.memoizedProps),t.state=l.memoizedState;try{t.componentWillUnmount()}catch(a){yl(l,e,a)}}function zn(l,e){try{var t=l.ref;if(t!==null){switch(l.tag){case 26:case 27:case 5:var a=l.stateNode;break;case 30:a=l.stateNode;break;default:a=l.stateNode}typeof t=="function"?l.refCleanup=t(a):t.current=a}}catch(n){yl(l,e,n)}}function qe(l,e){var t=l.ref,a=l.refCleanup;if(t!==null)if(typeof a=="function")try{a()}catch(n){yl(l,e,n)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof t=="function")try{t(null)}catch(n){yl(l,e,n)}else t.current=null}function Ad(l){var e=l.type,t=l.memoizedProps,a=l.stateNode;try{l:switch(e){case"button":case"input":case"select":case"textarea":t.autoFocus&&a.focus();break l;case"img":t.src?a.src=t.src:t.srcSet&&(a.srcset=t.srcSet)}}catch(n){yl(l,l.return,n)}}function qc(l,e,t){try{var a=l.stateNode;n1(a,l.type,t,e),a[ee]=e}catch(n){yl(l,l.return,n)}}function Ed(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&zt(l.type)||l.tag===4}function Yc(l){l:for(;;){for(;l.sibling===null;){if(l.return===null||Ed(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&zt(l.type)||l.flags&2||l.child===null||l.tag===4)continue l;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Gc(l,e,t){var a=l.tag;if(a===5||a===6)l=l.stateNode,e?(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).insertBefore(l,e):(e=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,e.appendChild(l),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=Ju));else if(a!==4&&(a===27&&zt(l.type)&&(t=l.stateNode,e=null),l=l.child,l!==null))for(Gc(l,e,t),l=l.sibling;l!==null;)Gc(l,e,t),l=l.sibling}function wu(l,e,t){var a=l.tag;if(a===5||a===6)l=l.stateNode,e?t.insertBefore(l,e):t.appendChild(l);else if(a!==4&&(a===27&&zt(l.type)&&(t=l.stateNode),l=l.child,l!==null))for(wu(l,e,t),l=l.sibling;l!==null;)wu(l,e,t),l=l.sibling}function Od(l){var e=l.stateNode,t=l.memoizedProps;try{for(var a=l.type,n=e.attributes;n.length;)e.removeAttributeNode(n[0]);kl(e,a,t),e[Jl]=l,e[ee]=t}catch(u){yl(l,l.return,u)}}var Pe=!1,Dl=!1,Xc=!1,Dd=typeof WeakSet=="function"?WeakSet:Set,Xl=null;function q0(l,e){if(l=l.containerInfo,ds=ei,l=Yf(l),Yi(l)){if("selectionStart"in l)var t={start:l.selectionStart,end:l.selectionEnd};else l:{t=(t=l.ownerDocument)&&t.defaultView||window;var a=t.getSelection&&t.getSelection();if(a&&a.rangeCount!==0){t=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{t.nodeType,u.nodeType}catch{t=null;break l}var i=0,s=-1,o=-1,y=0,z=0,T=l,p=null;e:for(;;){for(var b;T!==t||n!==0&&T.nodeType!==3||(s=i+n),T!==u||a!==0&&T.nodeType!==3||(o=i+a),T.nodeType===3&&(i+=T.nodeValue.length),(b=T.firstChild)!==null;)p=T,T=b;for(;;){if(T===l)break e;if(p===t&&++y===n&&(s=i),p===u&&++z===a&&(o=i),(b=T.nextSibling)!==null)break;T=p,p=T.parentNode}T=b}t=s===-1||o===-1?null:{start:s,end:o}}else t=null}t=t||{start:0,end:0}}else t=null;for(rs={focusedElem:l,selectionRange:t},ei=!1,Xl=e;Xl!==null;)if(e=Xl,l=e.child,(e.subtreeFlags&1024)!==0&&l!==null)l.return=e,Xl=l;else for(;Xl!==null;){switch(e=Xl,u=e.alternate,l=e.flags,e.tag){case 0:break;case 11:case 15:break;case 1:if((l&1024)!==0&&u!==null){l=void 0,t=e,n=u.memoizedProps,u=u.memoizedState,a=t.stateNode;try{var Z=kt(t.type,n,t.elementType===t.type);l=a.getSnapshotBeforeUpdate(Z,u),a.__reactInternalSnapshotBeforeUpdate=l}catch(X){yl(t,t.return,X)}}break;case 3:if((l&1024)!==0){if(l=e.stateNode.containerInfo,t=l.nodeType,t===9)gs(l);else if(t===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":gs(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error(f(163))}if(l=e.sibling,l!==null){l.return=e.return,Xl=l;break}Xl=e.return}}function Ud(l,e,t){var a=t.flags;switch(t.tag){case 0:case 11:case 15:mt(l,t),a&4&&jn(5,t);break;case 1:if(mt(l,t),a&4)if(l=t.stateNode,e===null)try{l.componentDidMount()}catch(i){yl(t,t.return,i)}else{var n=kt(t.type,e.memoizedProps);e=e.memoizedState;try{l.componentDidUpdate(n,e,l.__reactInternalSnapshotBeforeUpdate)}catch(i){yl(t,t.return,i)}}a&64&&Md(t),a&512&&zn(t,t.return);break;case 3:if(mt(l,t),a&64&&(l=t.updateQueue,l!==null)){if(e=null,t.child!==null)switch(t.child.tag){case 27:case 5:e=t.child.stateNode;break;case 1:e=t.child.stateNode}try{oo(l,e)}catch(i){yl(t,t.return,i)}}break;case 27:e===null&&a&4&&Od(t);case 26:case 5:mt(l,t),e===null&&a&4&&Ad(t),a&512&&zn(t,t.return);break;case 12:mt(l,t);break;case 13:mt(l,t),a&4&&Rd(l,t),a&64&&(l=t.memoizedState,l!==null&&(l=l.dehydrated,l!==null&&(t=k0.bind(null,t),d1(l,t))));break;case 22:if(a=t.memoizedState!==null||Pe,!a){e=e!==null&&e.memoizedState!==null||Dl,n=Pe;var u=Dl;Pe=a,(Dl=e)&&!u?yt(l,t,(t.subtreeFlags&8772)!==0):mt(l,t),Pe=n,Dl=u}break;case 30:break;default:mt(l,t)}}function Cd(l){var e=l.alternate;e!==null&&(l.alternate=null,Cd(e)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(e=l.stateNode,e!==null&&xi(e)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}var Ml=null,ne=!1;function lt(l,e,t){for(t=t.child;t!==null;)_d(l,e,t),t=t.sibling}function _d(l,e,t){if(ce&&typeof ce.onCommitFiberUnmount=="function")try{ce.onCommitFiberUnmount(La,t)}catch{}switch(t.tag){case 26:Dl||qe(t,e),lt(l,e,t),t.memoizedState?t.memoizedState.count--:t.stateNode&&(t=t.stateNode,t.parentNode.removeChild(t));break;case 27:Dl||qe(t,e);var a=Ml,n=ne;zt(t.type)&&(Ml=t.stateNode,ne=!1),lt(l,e,t),_n(t.stateNode),Ml=a,ne=n;break;case 5:Dl||qe(t,e);case 6:if(a=Ml,n=ne,Ml=null,lt(l,e,t),Ml=a,ne=n,Ml!==null)if(ne)try{(Ml.nodeType===9?Ml.body:Ml.nodeName==="HTML"?Ml.ownerDocument.body:Ml).removeChild(t.stateNode)}catch(u){yl(t,e,u)}else try{Ml.removeChild(t.stateNode)}catch(u){yl(t,e,u)}break;case 18:Ml!==null&&(ne?(l=Ml,xr(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.stateNode),Gn(l)):xr(Ml,t.stateNode));break;case 4:a=Ml,n=ne,Ml=t.stateNode.containerInfo,ne=!0,lt(l,e,t),Ml=a,ne=n;break;case 0:case 11:case 14:case 15:Dl||gt(2,t,e),Dl||gt(4,t,e),lt(l,e,t);break;case 1:Dl||(qe(t,e),a=t.stateNode,typeof a.componentWillUnmount=="function"&&Td(t,e,a)),lt(l,e,t);break;case 21:lt(l,e,t);break;case 22:Dl=(a=Dl)||t.memoizedState!==null,lt(l,e,t),Dl=a;break;default:lt(l,e,t)}}function Rd(l,e){if(e.memoizedState===null&&(l=e.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Gn(l)}catch(t){yl(e,e.return,t)}}function Y0(l){switch(l.tag){case 13:case 19:var e=l.stateNode;return e===null&&(e=l.stateNode=new Dd),e;case 22:return l=l.stateNode,e=l._retryCache,e===null&&(e=l._retryCache=new Dd),e;default:throw Error(f(435,l.tag))}}function Qc(l,e){var t=Y0(l);e.forEach(function(a){var n=J0.bind(null,l,a);t.has(a)||(t.add(a),a.then(n,n))})}function de(l,e){var t=e.deletions;if(t!==null)for(var a=0;a<t.length;a++){var n=t[a],u=l,i=e,s=i;l:for(;s!==null;){switch(s.tag){case 27:if(zt(s.type)){Ml=s.stateNode,ne=!1;break l}break;case 5:Ml=s.stateNode,ne=!1;break l;case 3:case 4:Ml=s.stateNode.containerInfo,ne=!0;break l}s=s.return}if(Ml===null)throw Error(f(160));_d(u,i,n),Ml=null,ne=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(e.subtreeFlags&13878)for(e=e.child;e!==null;)Bd(e,l),e=e.sibling}var Ce=null;function Bd(l,e){var t=l.alternate,a=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:de(e,l),re(l),a&4&&(gt(3,l,l.return),jn(3,l),gt(5,l,l.return));break;case 1:de(e,l),re(l),a&512&&(Dl||t===null||qe(t,t.return)),a&64&&Pe&&(l=l.updateQueue,l!==null&&(a=l.callbacks,a!==null&&(t=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=t===null?a:t.concat(a))));break;case 26:var n=Ce;if(de(e,l),re(l),a&512&&(Dl||t===null||qe(t,t.return)),a&4){var u=t!==null?t.memoizedState:null;if(a=l.memoizedState,t===null)if(a===null)if(l.stateNode===null){l:{a=l.type,t=l.memoizedProps,n=n.ownerDocument||n;e:switch(a){case"title":u=n.getElementsByTagName("title")[0],(!u||u[Ka]||u[Jl]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=n.createElement(a),n.head.insertBefore(u,n.querySelector("head > title"))),kl(u,a,t),u[Jl]=l,Yl(u),a=u;break l;case"link":var i=Or("link","href",n).get(a+(t.href||""));if(i){for(var s=0;s<i.length;s++)if(u=i[s],u.getAttribute("href")===(t.href==null||t.href===""?null:t.href)&&u.getAttribute("rel")===(t.rel==null?null:t.rel)&&u.getAttribute("title")===(t.title==null?null:t.title)&&u.getAttribute("crossorigin")===(t.crossOrigin==null?null:t.crossOrigin)){i.splice(s,1);break e}}u=n.createElement(a),kl(u,a,t),n.head.appendChild(u);break;case"meta":if(i=Or("meta","content",n).get(a+(t.content||""))){for(s=0;s<i.length;s++)if(u=i[s],u.getAttribute("content")===(t.content==null?null:""+t.content)&&u.getAttribute("name")===(t.name==null?null:t.name)&&u.getAttribute("property")===(t.property==null?null:t.property)&&u.getAttribute("http-equiv")===(t.httpEquiv==null?null:t.httpEquiv)&&u.getAttribute("charset")===(t.charSet==null?null:t.charSet)){i.splice(s,1);break e}}u=n.createElement(a),kl(u,a,t),n.head.appendChild(u);break;default:throw Error(f(468,a))}u[Jl]=l,Yl(u),a=u}l.stateNode=a}else Dr(n,l.type,l.stateNode);else l.stateNode=Er(n,a,l.memoizedProps);else u!==a?(u===null?t.stateNode!==null&&(t=t.stateNode,t.parentNode.removeChild(t)):u.count--,a===null?Dr(n,l.type,l.stateNode):Er(n,a,l.memoizedProps)):a===null&&l.stateNode!==null&&qc(l,l.memoizedProps,t.memoizedProps)}break;case 27:de(e,l),re(l),a&512&&(Dl||t===null||qe(t,t.return)),t!==null&&a&4&&qc(l,l.memoizedProps,t.memoizedProps);break;case 5:if(de(e,l),re(l),a&512&&(Dl||t===null||qe(t,t.return)),l.flags&32){n=l.stateNode;try{ia(n,"")}catch(b){yl(l,l.return,b)}}a&4&&l.stateNode!=null&&(n=l.memoizedProps,qc(l,n,t!==null?t.memoizedProps:n)),a&1024&&(Xc=!0);break;case 6:if(de(e,l),re(l),a&4){if(l.stateNode===null)throw Error(f(162));a=l.memoizedProps,t=l.stateNode;try{t.nodeValue=a}catch(b){yl(l,l.return,b)}}break;case 3:if(Iu=null,n=Ce,Ce=$u(e.containerInfo),de(e,l),Ce=n,re(l),a&4&&t!==null&&t.memoizedState.isDehydrated)try{Gn(e.containerInfo)}catch(b){yl(l,l.return,b)}Xc&&(Xc=!1,Nd(l));break;case 4:a=Ce,Ce=$u(l.stateNode.containerInfo),de(e,l),re(l),Ce=a;break;case 12:de(e,l),re(l);break;case 13:de(e,l),re(l),l.child.flags&8192&&l.memoizedState!==null!=(t!==null&&t.memoizedState!==null)&&(Jc=Ne()),a&4&&(a=l.updateQueue,a!==null&&(l.updateQueue=null,Qc(l,a)));break;case 22:n=l.memoizedState!==null;var o=t!==null&&t.memoizedState!==null,y=Pe,z=Dl;if(Pe=y||n,Dl=z||o,de(e,l),Dl=z,Pe=y,re(l),a&8192)l:for(e=l.stateNode,e._visibility=n?e._visibility&-2:e._visibility|1,n&&(t===null||o||Pe||Dl||Jt(l)),t=null,e=l;;){if(e.tag===5||e.tag===26){if(t===null){o=t=e;try{if(u=o.stateNode,n)i=u.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{s=o.stateNode;var T=o.memoizedProps.style,p=T!=null&&T.hasOwnProperty("display")?T.display:null;s.style.display=p==null||typeof p=="boolean"?"":(""+p).trim()}}catch(b){yl(o,o.return,b)}}}else if(e.tag===6){if(t===null){o=e;try{o.stateNode.nodeValue=n?"":o.memoizedProps}catch(b){yl(o,o.return,b)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===l)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===l)break l;for(;e.sibling===null;){if(e.return===null||e.return===l)break l;t===e&&(t=null),e=e.return}t===e&&(t=null),e.sibling.return=e.return,e=e.sibling}a&4&&(a=l.updateQueue,a!==null&&(t=a.retryQueue,t!==null&&(a.retryQueue=null,Qc(l,t))));break;case 19:de(e,l),re(l),a&4&&(a=l.updateQueue,a!==null&&(l.updateQueue=null,Qc(l,a)));break;case 30:break;case 21:break;default:de(e,l),re(l)}}function re(l){var e=l.flags;if(e&2){try{for(var t,a=l.return;a!==null;){if(Ed(a)){t=a;break}a=a.return}if(t==null)throw Error(f(160));switch(t.tag){case 27:var n=t.stateNode,u=Yc(l);wu(l,u,n);break;case 5:var i=t.stateNode;t.flags&32&&(ia(i,""),t.flags&=-33);var s=Yc(l);wu(l,s,i);break;case 3:case 4:var o=t.stateNode.containerInfo,y=Yc(l);Gc(l,y,o);break;default:throw Error(f(161))}}catch(z){yl(l,l.return,z)}l.flags&=-3}e&4096&&(l.flags&=-4097)}function Nd(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var e=l;Nd(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),l=l.sibling}}function mt(l,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Ud(l,e.alternate,e),e=e.sibling}function Jt(l){for(l=l.child;l!==null;){var e=l;switch(e.tag){case 0:case 11:case 14:case 15:gt(4,e,e.return),Jt(e);break;case 1:qe(e,e.return);var t=e.stateNode;typeof t.componentWillUnmount=="function"&&Td(e,e.return,t),Jt(e);break;case 27:_n(e.stateNode);case 26:case 5:qe(e,e.return),Jt(e);break;case 22:e.memoizedState===null&&Jt(e);break;case 30:Jt(e);break;default:Jt(e)}l=l.sibling}}function yt(l,e,t){for(t=t&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var a=e.alternate,n=l,u=e,i=u.flags;switch(u.tag){case 0:case 11:case 15:yt(n,u,t),jn(4,u);break;case 1:if(yt(n,u,t),a=u,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(y){yl(a,a.return,y)}if(a=u,n=a.updateQueue,n!==null){var s=a.stateNode;try{var o=n.shared.hiddenCallbacks;if(o!==null)for(n.shared.hiddenCallbacks=null,n=0;n<o.length;n++)fo(o[n],s)}catch(y){yl(a,a.return,y)}}t&&i&64&&Md(u),zn(u,u.return);break;case 27:Od(u);case 26:case 5:yt(n,u,t),t&&a===null&&i&4&&Ad(u),zn(u,u.return);break;case 12:yt(n,u,t);break;case 13:yt(n,u,t),t&&i&4&&Rd(n,u);break;case 22:u.memoizedState===null&&yt(n,u,t),zn(u,u.return);break;case 30:break;default:yt(n,u,t)}e=e.sibling}}function Lc(l,e){var t=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(t=l.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==t&&(l!=null&&l.refCount++,t!=null&&sn(t))}function Vc(l,e){l=null,e.alternate!==null&&(l=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==l&&(e.refCount++,l!=null&&sn(l))}function Ye(l,e,t,a){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hd(l,e,t,a),e=e.sibling}function Hd(l,e,t,a){var n=e.flags;switch(e.tag){case 0:case 11:case 15:Ye(l,e,t,a),n&2048&&jn(9,e);break;case 1:Ye(l,e,t,a);break;case 3:Ye(l,e,t,a),n&2048&&(l=null,e.alternate!==null&&(l=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==l&&(e.refCount++,l!=null&&sn(l)));break;case 12:if(n&2048){Ye(l,e,t,a),l=e.stateNode;try{var u=e.memoizedProps,i=u.id,s=u.onPostCommit;typeof s=="function"&&s(i,e.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(o){yl(e,e.return,o)}}else Ye(l,e,t,a);break;case 13:Ye(l,e,t,a);break;case 23:break;case 22:u=e.stateNode,i=e.alternate,e.memoizedState!==null?u._visibility&2?Ye(l,e,t,a):Mn(l,e):u._visibility&2?Ye(l,e,t,a):(u._visibility|=2,Ta(l,e,t,a,(e.subtreeFlags&10256)!==0)),n&2048&&Lc(i,e);break;case 24:Ye(l,e,t,a),n&2048&&Vc(e.alternate,e);break;default:Ye(l,e,t,a)}}function Ta(l,e,t,a,n){for(n=n&&(e.subtreeFlags&10256)!==0,e=e.child;e!==null;){var u=l,i=e,s=t,o=a,y=i.flags;switch(i.tag){case 0:case 11:case 15:Ta(u,i,s,o,n),jn(8,i);break;case 23:break;case 22:var z=i.stateNode;i.memoizedState!==null?z._visibility&2?Ta(u,i,s,o,n):Mn(u,i):(z._visibility|=2,Ta(u,i,s,o,n)),n&&y&2048&&Lc(i.alternate,i);break;case 24:Ta(u,i,s,o,n),n&&y&2048&&Vc(i.alternate,i);break;default:Ta(u,i,s,o,n)}e=e.sibling}}function Mn(l,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var t=l,a=e,n=a.flags;switch(a.tag){case 22:Mn(t,a),n&2048&&Lc(a.alternate,a);break;case 24:Mn(t,a),n&2048&&Vc(a.alternate,a);break;default:Mn(t,a)}e=e.sibling}}var Tn=8192;function Aa(l){if(l.subtreeFlags&Tn)for(l=l.child;l!==null;)wd(l),l=l.sibling}function wd(l){switch(l.tag){case 26:Aa(l),l.flags&Tn&&l.memoizedState!==null&&M1(Ce,l.memoizedState,l.memoizedProps);break;case 5:Aa(l);break;case 3:case 4:var e=Ce;Ce=$u(l.stateNode.containerInfo),Aa(l),Ce=e;break;case 22:l.memoizedState===null&&(e=l.alternate,e!==null&&e.memoizedState!==null?(e=Tn,Tn=16777216,Aa(l),Tn=e):Aa(l));break;default:Aa(l)}}function qd(l){var e=l.alternate;if(e!==null&&(l=e.child,l!==null)){e.child=null;do e=l.sibling,l.sibling=null,l=e;while(l!==null)}}function An(l){var e=l.deletions;if((l.flags&16)!==0){if(e!==null)for(var t=0;t<e.length;t++){var a=e[t];Xl=a,Gd(a,l)}qd(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Yd(l),l=l.sibling}function Yd(l){switch(l.tag){case 0:case 11:case 15:An(l),l.flags&2048&>(9,l,l.return);break;case 3:An(l);break;case 12:An(l);break;case 22:var e=l.stateNode;l.memoizedState!==null&&e._visibility&2&&(l.return===null||l.return.tag!==13)?(e._visibility&=-3,qu(l)):An(l);break;default:An(l)}}function qu(l){var e=l.deletions;if((l.flags&16)!==0){if(e!==null)for(var t=0;t<e.length;t++){var a=e[t];Xl=a,Gd(a,l)}qd(l)}for(l=l.child;l!==null;){switch(e=l,e.tag){case 0:case 11:case 15:gt(8,e,e.return),qu(e);break;case 22:t=e.stateNode,t._visibility&2&&(t._visibility&=-3,qu(e));break;default:qu(e)}l=l.sibling}}function Gd(l,e){for(;Xl!==null;){var t=Xl;switch(t.tag){case 0:case 11:case 15:gt(8,t,e);break;case 23:case 22:if(t.memoizedState!==null&&t.memoizedState.cachePool!==null){var a=t.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:sn(t.memoizedState.cache)}if(a=t.child,a!==null)a.return=t,Xl=a;else l:for(t=l;Xl!==null;){a=Xl;var n=a.sibling,u=a.return;if(Cd(a),a===t){Xl=null;break l}if(n!==null){n.return=u,Xl=n;break l}Xl=u}}}var G0={getCacheForType:function(l){var e=Wl(Nl),t=e.data.get(l);return t===void 0&&(t=l(),e.data.set(l,t)),t}},X0=typeof WeakMap=="function"?WeakMap:Map,rl=0,xl=null,el=null,ul=0,hl=0,he=null,pt=!1,Ea=!1,Zc=!1,et=0,El=0,bt=0,Wt=0,Kc=0,Me=0,Oa=0,En=null,ue=null,kc=!1,Jc=0,Yu=1/0,Gu=null,xt=null,Kl=0,St=null,Da=null,Ua=0,Wc=0,$c=null,Xd=null,On=0,Fc=null;function ve(){if((rl&2)!==0&&ul!==0)return ul&-ul;if(S.T!==null){var l=ya;return l!==0?l:ns()}return ef()}function Qd(){Me===0&&(Me=(ul&536870912)===0||fl?Fs():536870912);var l=ze.current;return l!==null&&(l.flags|=32),Me}function ge(l,e,t){(l===xl&&(hl===2||hl===9)||l.cancelPendingCommit!==null)&&(Ca(l,0),jt(l,ul,Me,!1)),Za(l,t),((rl&2)===0||l!==xl)&&(l===xl&&((rl&2)===0&&(Wt|=t),El===4&&jt(l,ul,Me,!1)),Ge(l))}function Ld(l,e,t){if((rl&6)!==0)throw Error(f(327));var a=!t&&(e&124)===0&&(e&l.expiredLanes)===0||Va(l,e),n=a?V0(l,e):ls(l,e,!0),u=a;do{if(n===0){Ea&&!a&&jt(l,e,0,!1);break}else{if(t=l.current.alternate,u&&!Q0(t)){n=ls(l,e,!1),u=!1;continue}if(n===2){if(u=e,l.errorRecoveryDisabledLanes&u)var i=0;else i=l.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){e=i;l:{var s=l;n=En;var o=s.current.memoizedState.isDehydrated;if(o&&(Ca(s,i).flags|=256),i=ls(s,i,!1),i!==2){if(Zc&&!o){s.errorRecoveryDisabledLanes|=u,Wt|=u,n=4;break l}u=ue,ue=n,u!==null&&(ue===null?ue=u:ue.push.apply(ue,u))}n=i}if(u=!1,n!==2)continue}}if(n===1){Ca(l,0),jt(l,e,0,!0);break}l:{switch(a=l,u=n,u){case 0:case 1:throw Error(f(345));case 4:if((e&4194048)!==e)break;case 6:jt(a,e,Me,!pt);break l;case 2:ue=null;break;case 3:case 5:break;default:throw Error(f(329))}if((e&62914560)===e&&(n=Jc+300-Ne(),10<n)){if(jt(a,e,Me,!pt),Fn(a,0,!0)!==0)break l;a.timeoutHandle=pr(Vd.bind(null,a,t,ue,Gu,kc,e,Me,Wt,Oa,pt,u,2,-0,0),n);break l}Vd(a,t,ue,Gu,kc,e,Me,Wt,Oa,pt,u,0,-0,0)}}break}while(!0);Ge(l)}function Vd(l,e,t,a,n,u,i,s,o,y,z,T,p,b){if(l.timeoutHandle=-1,T=e.subtreeFlags,(T&8192||(T&16785408)===16785408)&&(Nn={stylesheets:null,count:0,unsuspend:z1},wd(e),T=T1(),T!==null)){l.cancelPendingCommit=T(Fd.bind(null,l,e,u,t,a,n,i,s,o,z,1,p,b)),jt(l,u,i,!y);return}Fd(l,e,u,t,a,n,i,s,o)}function Q0(l){for(var e=l;;){var t=e.tag;if((t===0||t===11||t===15)&&e.flags&16384&&(t=e.updateQueue,t!==null&&(t=t.stores,t!==null)))for(var a=0;a<t.length;a++){var n=t[a],u=n.getSnapshot;n=n.value;try{if(!fe(u(),n))return!1}catch{return!1}}if(t=e.child,e.subtreeFlags&16384&&t!==null)t.return=e,e=t;else{if(e===l)break;for(;e.sibling===null;){if(e.return===null||e.return===l)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function jt(l,e,t,a){e&=~Kc,e&=~Wt,l.suspendedLanes|=e,l.pingedLanes&=~e,a&&(l.warmLanes|=e),a=l.expirationTimes;for(var n=e;0<n;){var u=31-se(n),i=1<<u;a[u]=-1,n&=~i}t!==0&&Ps(l,t,e)}function Xu(){return(rl&6)===0?(Dn(0),!1):!0}function Ic(){if(el!==null){if(hl===0)var l=el.return;else l=el,ke=Lt=null,gc(l),za=null,bn=0,l=el;for(;l!==null;)zd(l.alternate,l),l=l.return;el=null}}function Ca(l,e){var t=l.timeoutHandle;t!==-1&&(l.timeoutHandle=-1,i1(t)),t=l.cancelPendingCommit,t!==null&&(l.cancelPendingCommit=null,t()),Ic(),xl=l,el=t=Ve(l.current,null),ul=e,hl=0,he=null,pt=!1,Ea=Va(l,e),Zc=!1,Oa=Me=Kc=Wt=bt=El=0,ue=En=null,kc=!1,(e&8)!==0&&(e|=e&32);var a=l.entangledLanes;if(a!==0)for(l=l.entanglements,a&=e;0<a;){var n=31-se(a),u=1<<n;e|=l[n],a&=~u}return et=e,fu(),t}function Zd(l,e){I=null,S.H=Ou,e===on||e===pu?(e=co(),hl=3):e===no?(e=co(),hl=4):hl=e===fd?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,he=e,el===null&&(El=1,Ru(l,be(e,l.current)))}function Kd(){var l=S.H;return S.H=Ou,l===null?Ou:l}function kd(){var l=S.A;return S.A=G0,l}function Pc(){El=4,pt||(ul&4194048)!==ul&&ze.current!==null||(Ea=!0),(bt&134217727)===0&&(Wt&134217727)===0||xl===null||jt(xl,ul,Me,!1)}function ls(l,e,t){var a=rl;rl|=2;var n=Kd(),u=kd();(xl!==l||ul!==e)&&(Gu=null,Ca(l,e)),e=!1;var i=El;l:do try{if(hl!==0&&el!==null){var s=el,o=he;switch(hl){case 8:Ic(),i=6;break l;case 3:case 2:case 9:case 6:ze.current===null&&(e=!0);var y=hl;if(hl=0,he=null,_a(l,s,o,y),t&&Ea){i=0;break l}break;default:y=hl,hl=0,he=null,_a(l,s,o,y)}}L0(),i=El;break}catch(z){Zd(l,z)}while(!0);return e&&l.shellSuspendCounter++,ke=Lt=null,rl=a,S.H=n,S.A=u,el===null&&(xl=null,ul=0,fu()),i}function L0(){for(;el!==null;)Jd(el)}function V0(l,e){var t=rl;rl|=2;var a=Kd(),n=kd();xl!==l||ul!==e?(Gu=null,Yu=Ne()+500,Ca(l,e)):Ea=Va(l,e);l:do try{if(hl!==0&&el!==null){e=el;var u=he;e:switch(hl){case 1:hl=0,he=null,_a(l,e,u,1);break;case 2:case 9:if(uo(u)){hl=0,he=null,Wd(e);break}e=function(){hl!==2&&hl!==9||xl!==l||(hl=7),Ge(l)},u.then(e,e);break l;case 3:hl=7;break l;case 4:hl=5;break l;case 7:uo(u)?(hl=0,he=null,Wd(e)):(hl=0,he=null,_a(l,e,u,7));break;case 5:var i=null;switch(el.tag){case 26:i=el.memoizedState;case 5:case 27:var s=el;if(!i||Ur(i)){hl=0,he=null;var o=s.sibling;if(o!==null)el=o;else{var y=s.return;y!==null?(el=y,Qu(y)):el=null}break e}}hl=0,he=null,_a(l,e,u,5);break;case 6:hl=0,he=null,_a(l,e,u,6);break;case 8:Ic(),El=6;break l;default:throw Error(f(462))}}Z0();break}catch(z){Zd(l,z)}while(!0);return ke=Lt=null,S.H=a,S.A=n,rl=t,el!==null?0:(xl=null,ul=0,fu(),El)}function Z0(){for(;el!==null&&!gi();)Jd(el)}function Jd(l){var e=Sd(l.alternate,l,et);l.memoizedProps=l.pendingProps,e===null?Qu(l):el=e}function Wd(l){var e=l,t=e.alternate;switch(e.tag){case 15:case 0:e=gd(t,e,e.pendingProps,e.type,void 0,ul);break;case 11:e=gd(t,e,e.pendingProps,e.type.render,e.ref,ul);break;case 5:gc(e);default:zd(t,e),e=el=Wf(e,et),e=Sd(t,e,et)}l.memoizedProps=l.pendingProps,e===null?Qu(l):el=e}function _a(l,e,t,a){ke=Lt=null,gc(e),za=null,bn=0;var n=e.return;try{if(B0(l,n,e,t,ul)){El=1,Ru(l,be(t,l.current)),el=null;return}}catch(u){if(n!==null)throw el=n,u;El=1,Ru(l,be(t,l.current)),el=null;return}e.flags&32768?(fl||a===1?l=!0:Ea||(ul&536870912)!==0?l=!1:(pt=l=!0,(a===2||a===9||a===3||a===6)&&(a=ze.current,a!==null&&a.tag===13&&(a.flags|=16384))),$d(e,l)):Qu(e)}function Qu(l){var e=l;do{if((e.flags&32768)!==0){$d(e,pt);return}l=e.return;var t=H0(e.alternate,e,et);if(t!==null){el=t;return}if(e=e.sibling,e!==null){el=e;return}el=e=l}while(e!==null);El===0&&(El=5)}function $d(l,e){do{var t=w0(l.alternate,l);if(t!==null){t.flags&=32767,el=t;return}if(t=l.return,t!==null&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!e&&(l=l.sibling,l!==null)){el=l;return}el=l=t}while(l!==null);El=6,el=null}function Fd(l,e,t,a,n,u,i,s,o){l.cancelPendingCommit=null;do Lu();while(Kl!==0);if((rl&6)!==0)throw Error(f(327));if(e!==null){if(e===l.current)throw Error(f(177));if(u=e.lanes|e.childLanes,u|=Vi,zh(l,t,u,i,s,o),l===xl&&(el=xl=null,ul=0),Da=e,St=l,Ua=t,Wc=u,$c=n,Xd=a,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,W0(Jn,function(){return tr(),null})):(l.callbackNode=null,l.callbackPriority=0),a=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||a){a=S.T,S.T=null,n=U.p,U.p=2,i=rl,rl|=4;try{q0(l,e,t)}finally{rl=i,U.p=n,S.T=a}}Kl=1,Id(),Pd(),lr()}}function Id(){if(Kl===1){Kl=0;var l=St,e=Da,t=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||t){t=S.T,S.T=null;var a=U.p;U.p=2;var n=rl;rl|=4;try{Bd(e,l);var u=rs,i=Yf(l.containerInfo),s=u.focusedElem,o=u.selectionRange;if(i!==s&&s&&s.ownerDocument&&qf(s.ownerDocument.documentElement,s)){if(o!==null&&Yi(s)){var y=o.start,z=o.end;if(z===void 0&&(z=y),"selectionStart"in s)s.selectionStart=y,s.selectionEnd=Math.min(z,s.value.length);else{var T=s.ownerDocument||document,p=T&&T.defaultView||window;if(p.getSelection){var b=p.getSelection(),Z=s.textContent.length,X=Math.min(o.start,Z),ml=o.end===void 0?X:Math.min(o.end,Z);!b.extend&&X>ml&&(i=ml,ml=X,X=i);var v=wf(s,X),r=wf(s,ml);if(v&&r&&(b.rangeCount!==1||b.anchorNode!==v.node||b.anchorOffset!==v.offset||b.focusNode!==r.node||b.focusOffset!==r.offset)){var m=T.createRange();m.setStart(v.node,v.offset),b.removeAllRanges(),X>ml?(b.addRange(m),b.extend(r.node,r.offset)):(m.setEnd(r.node,r.offset),b.addRange(m))}}}}for(T=[],b=s;b=b.parentNode;)b.nodeType===1&&T.push({element:b,left:b.scrollLeft,top:b.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<T.length;s++){var M=T[s];M.element.scrollLeft=M.left,M.element.scrollTop=M.top}}ei=!!ds,rs=ds=null}finally{rl=n,U.p=a,S.T=t}}l.current=e,Kl=2}}function Pd(){if(Kl===2){Kl=0;var l=St,e=Da,t=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||t){t=S.T,S.T=null;var a=U.p;U.p=2;var n=rl;rl|=4;try{Ud(l,e.alternate,e)}finally{rl=n,U.p=a,S.T=t}}Kl=3}}function lr(){if(Kl===4||Kl===3){Kl=0,vh();var l=St,e=Da,t=Ua,a=Xd;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Kl=5:(Kl=0,Da=St=null,er(l,l.pendingLanes));var n=l.pendingLanes;if(n===0&&(xt=null),pi(t),e=e.stateNode,ce&&typeof ce.onCommitFiberRoot=="function")try{ce.onCommitFiberRoot(La,e,void 0,(e.current.flags&128)===128)}catch{}if(a!==null){e=S.T,n=U.p,U.p=2,S.T=null;try{for(var u=l.onRecoverableError,i=0;i<a.length;i++){var s=a[i];u(s.value,{componentStack:s.stack})}}finally{S.T=e,U.p=n}}(Ua&3)!==0&&Lu(),Ge(l),n=l.pendingLanes,(t&4194090)!==0&&(n&42)!==0?l===Fc?On++:(On=0,Fc=l):On=0,Dn(0)}}function er(l,e){(l.pooledCacheLanes&=e)===0&&(e=l.pooledCache,e!=null&&(l.pooledCache=null,sn(e)))}function Lu(l){return Id(),Pd(),lr(),tr()}function tr(){if(Kl!==5)return!1;var l=St,e=Wc;Wc=0;var t=pi(Ua),a=S.T,n=U.p;try{U.p=32>t?32:t,S.T=null,t=$c,$c=null;var u=St,i=Ua;if(Kl=0,Da=St=null,Ua=0,(rl&6)!==0)throw Error(f(331));var s=rl;if(rl|=4,Yd(u.current),Hd(u,u.current,i,t),rl=s,Dn(0,!1),ce&&typeof ce.onPostCommitFiberRoot=="function")try{ce.onPostCommitFiberRoot(La,u)}catch{}return!0}finally{U.p=n,S.T=a,er(l,e)}}function ar(l,e,t){e=be(t,e),e=Dc(l.stateNode,e,2),l=dt(l,e,2),l!==null&&(Za(l,2),Ge(l))}function yl(l,e,t){if(l.tag===3)ar(l,l,t);else for(;e!==null;){if(e.tag===3){ar(e,l,t);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(xt===null||!xt.has(a))){l=be(t,l),t=cd(2),a=dt(e,t,2),a!==null&&(sd(t,a,e,l),Za(a,2),Ge(a));break}}e=e.return}}function es(l,e,t){var a=l.pingCache;if(a===null){a=l.pingCache=new X0;var n=new Set;a.set(e,n)}else n=a.get(e),n===void 0&&(n=new Set,a.set(e,n));n.has(t)||(Zc=!0,n.add(t),l=K0.bind(null,l,e,t),e.then(l,l))}function K0(l,e,t){var a=l.pingCache;a!==null&&a.delete(e),l.pingedLanes|=l.suspendedLanes&t,l.warmLanes&=~t,xl===l&&(ul&t)===t&&(El===4||El===3&&(ul&62914560)===ul&&300>Ne()-Jc?(rl&2)===0&&Ca(l,0):Kc|=t,Oa===ul&&(Oa=0)),Ge(l)}function nr(l,e){e===0&&(e=Is()),l=ha(l,e),l!==null&&(Za(l,e),Ge(l))}function k0(l){var e=l.memoizedState,t=0;e!==null&&(t=e.retryLane),nr(l,t)}function J0(l,e){var t=0;switch(l.tag){case 13:var a=l.stateNode,n=l.memoizedState;n!==null&&(t=n.retryLane);break;case 19:a=l.stateNode;break;case 22:a=l.stateNode._retryCache;break;default:throw Error(f(314))}a!==null&&a.delete(e),nr(l,t)}function W0(l,e){return Qa(l,e)}var Vu=null,Ra=null,ts=!1,Zu=!1,as=!1,$t=0;function Ge(l){l!==Ra&&l.next===null&&(Ra===null?Vu=Ra=l:Ra=Ra.next=l),Zu=!0,ts||(ts=!0,F0())}function Dn(l,e){if(!as&&Zu){as=!0;do for(var t=!1,a=Vu;a!==null;){if(l!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,s=a.pingedLanes;u=(1<<31-se(42|l)+1)-1,u&=n&~(i&~s),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(t=!0,sr(a,u))}else u=ul,u=Fn(a,a===xl?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Va(a,u)||(t=!0,sr(a,u));a=a.next}while(t);as=!1}}function $0(){ur()}function ur(){Zu=ts=!1;var l=0;$t!==0&&(u1()&&(l=$t),$t=0);for(var e=Ne(),t=null,a=Vu;a!==null;){var n=a.next,u=ir(a,e);u===0?(a.next=null,t===null?Vu=n:t.next=n,n===null&&(Ra=t)):(t=a,(l!==0||(u&3)!==0)&&(Zu=!0)),a=n}Dn(l)}function ir(l,e){for(var t=l.suspendedLanes,a=l.pingedLanes,n=l.expirationTimes,u=l.pendingLanes&-62914561;0<u;){var i=31-se(u),s=1<<i,o=n[i];o===-1?((s&t)===0||(s&a)!==0)&&(n[i]=jh(s,e)):o<=e&&(l.expiredLanes|=s),u&=~s}if(e=xl,t=ul,t=Fn(l,l===e?t:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),a=l.callbackNode,t===0||l===e&&(hl===2||hl===9)||l.cancelPendingCommit!==null)return a!==null&&a!==null&&le(a),l.callbackNode=null,l.callbackPriority=0;if((t&3)===0||Va(l,t)){if(e=t&-t,e===l.callbackPriority)return e;switch(a!==null&&le(a),pi(t)){case 2:case 8:t=Ws;break;case 32:t=Jn;break;case 268435456:t=$s;break;default:t=Jn}return a=cr.bind(null,l),t=Qa(t,a),l.callbackPriority=e,l.callbackNode=t,e}return a!==null&&a!==null&&le(a),l.callbackPriority=2,l.callbackNode=null,2}function cr(l,e){if(Kl!==0&&Kl!==5)return l.callbackNode=null,l.callbackPriority=0,null;var t=l.callbackNode;if(Lu()&&l.callbackNode!==t)return null;var a=ul;return a=Fn(l,l===xl?a:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),a===0?null:(Ld(l,a,e),ir(l,Ne()),l.callbackNode!=null&&l.callbackNode===t?cr.bind(null,l):null)}function sr(l,e){if(Lu())return null;Ld(l,e,!0)}function F0(){c1(function(){(rl&6)!==0?Qa(Js,$0):ur()})}function ns(){return $t===0&&($t=Fs()),$t}function fr(l){return l==null||typeof l=="symbol"||typeof l=="boolean"?null:typeof l=="function"?l:tu(""+l)}function or(l,e){var t=e.ownerDocument.createElement("input");return t.name=e.name,t.value=e.value,l.id&&t.setAttribute("form",l.id),e.parentNode.insertBefore(t,e),l=new FormData(l),t.parentNode.removeChild(t),l}function I0(l,e,t,a,n){if(e==="submit"&&t&&t.stateNode===n){var u=fr((n[ee]||null).action),i=a.submitter;i&&(e=(e=i[ee]||null)?fr(e.formAction):i.getAttribute("formAction"),e!==null&&(u=e,i=null));var s=new iu("action","action",null,a,n);l.push({event:s,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if($t!==0){var o=i?or(n,i):new FormData(n);Mc(t,{pending:!0,data:o,method:n.method,action:u},null,o)}}else typeof u=="function"&&(s.preventDefault(),o=i?or(n,i):new FormData(n),Mc(t,{pending:!0,data:o,method:n.method,action:u},u,o))},currentTarget:n}]})}}for(var us=0;us<Li.length;us++){var is=Li[us],P0=is.toLowerCase(),l1=is[0].toUpperCase()+is.slice(1);Ue(P0,"on"+l1)}Ue(Qf,"onAnimationEnd"),Ue(Lf,"onAnimationIteration"),Ue(Vf,"onAnimationStart"),Ue("dblclick","onDoubleClick"),Ue("focusin","onFocus"),Ue("focusout","onBlur"),Ue(y0,"onTransitionRun"),Ue(p0,"onTransitionStart"),Ue(b0,"onTransitionCancel"),Ue(Zf,"onTransitionEnd"),aa("onMouseEnter",["mouseout","mouseover"]),aa("onMouseLeave",["mouseout","mouseover"]),aa("onPointerEnter",["pointerout","pointerover"]),aa("onPointerLeave",["pointerout","pointerover"]),Bt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Un="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(" "),e1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Un));function dr(l,e){e=(e&4)!==0;for(var t=0;t<l.length;t++){var a=l[t],n=a.event;a=a.listeners;l:{var u=void 0;if(e)for(var i=a.length-1;0<=i;i--){var s=a[i],o=s.instance,y=s.currentTarget;if(s=s.listener,o!==u&&n.isPropagationStopped())break l;u=s,n.currentTarget=y;try{u(n)}catch(z){_u(z)}n.currentTarget=null,u=o}else for(i=0;i<a.length;i++){if(s=a[i],o=s.instance,y=s.currentTarget,s=s.listener,o!==u&&n.isPropagationStopped())break l;u=s,n.currentTarget=y;try{u(n)}catch(z){_u(z)}n.currentTarget=null,u=o}}}}function tl(l,e){var t=e[bi];t===void 0&&(t=e[bi]=new Set);var a=l+"__bubble";t.has(a)||(rr(e,l,2,!1),t.add(a))}function cs(l,e,t){var a=0;e&&(a|=4),rr(t,l,a,e)}var Ku="_reactListening"+Math.random().toString(36).slice(2);function ss(l){if(!l[Ku]){l[Ku]=!0,af.forEach(function(t){t!=="selectionchange"&&(e1.has(t)||cs(t,!1,l),cs(t,!0,l))});var e=l.nodeType===9?l:l.ownerDocument;e===null||e[Ku]||(e[Ku]=!0,cs("selectionchange",!1,e))}}function rr(l,e,t,a){switch(Hr(e)){case 2:var n=O1;break;case 8:n=D1;break;default:n=js}t=n.bind(null,e,t,l),n=void 0,!Ui||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(n=!0),a?n!==void 0?l.addEventListener(e,t,{capture:!0,passive:n}):l.addEventListener(e,t,!0):n!==void 0?l.addEventListener(e,t,{passive:n}):l.addEventListener(e,t,!1)}function fs(l,e,t,a,n){var u=a;if((e&1)===0&&(e&2)===0&&a!==null)l:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var s=a.stateNode.containerInfo;if(s===n)break;if(i===4)for(i=a.return;i!==null;){var o=i.tag;if((o===3||o===4)&&i.stateNode.containerInfo===n)return;i=i.return}for(;s!==null;){if(i=la(s),i===null)return;if(o=i.tag,o===5||o===6||o===26||o===27){a=u=i;continue l}s=s.parentNode}}a=a.return}pf(function(){var y=u,z=Oi(t),T=[];l:{var p=Kf.get(l);if(p!==void 0){var b=iu,Z=l;switch(l){case"keypress":if(nu(t)===0)break l;case"keydown":case"keyup":b=Wh;break;case"focusin":Z="focus",b=Bi;break;case"focusout":Z="blur",b=Bi;break;case"beforeblur":case"afterblur":b=Bi;break;case"click":if(t.button===2)break l;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=Sf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=wh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=Ih;break;case Qf:case Lf:case Vf:b=Gh;break;case Zf:b=l0;break;case"scroll":case"scrollend":b=Nh;break;case"wheel":b=t0;break;case"copy":case"cut":case"paste":b=Qh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=zf;break;case"toggle":case"beforetoggle":b=n0}var X=(e&4)!==0,ml=!X&&(l==="scroll"||l==="scrollend"),v=X?p!==null?p+"Capture":null:p;X=[];for(var r=y,m;r!==null;){var M=r;if(m=M.stateNode,M=M.tag,M!==5&&M!==26&&M!==27||m===null||v===null||(M=Ja(r,v),M!=null&&X.push(Cn(r,M,m))),ml)break;r=r.return}0<X.length&&(p=new b(p,Z,null,t,z),T.push({event:p,listeners:X}))}}if((e&7)===0){l:{if(p=l==="mouseover"||l==="pointerover",b=l==="mouseout"||l==="pointerout",p&&t!==Ei&&(Z=t.relatedTarget||t.fromElement)&&(la(Z)||Z[Pt]))break l;if((b||p)&&(p=z.window===z?z:(p=z.ownerDocument)?p.defaultView||p.parentWindow:window,b?(Z=t.relatedTarget||t.toElement,b=y,Z=Z?la(Z):null,Z!==null&&(ml=A(Z),X=Z.tag,Z!==ml||X!==5&&X!==27&&X!==6)&&(Z=null)):(b=null,Z=y),b!==Z)){if(X=Sf,M="onMouseLeave",v="onMouseEnter",r="mouse",(l==="pointerout"||l==="pointerover")&&(X=zf,M="onPointerLeave",v="onPointerEnter",r="pointer"),ml=b==null?p:ka(b),m=Z==null?p:ka(Z),p=new X(M,r+"leave",b,t,z),p.target=ml,p.relatedTarget=m,M=null,la(z)===y&&(X=new X(v,r+"enter",Z,t,z),X.target=m,X.relatedTarget=ml,M=X),ml=M,b&&Z)e:{for(X=b,v=Z,r=0,m=X;m;m=Ba(m))r++;for(m=0,M=v;M;M=Ba(M))m++;for(;0<r-m;)X=Ba(X),r--;for(;0<m-r;)v=Ba(v),m--;for(;r--;){if(X===v||v!==null&&X===v.alternate)break e;X=Ba(X),v=Ba(v)}X=null}else X=null;b!==null&&hr(T,p,b,X,!1),Z!==null&&ml!==null&&hr(T,ml,Z,X,!0)}}l:{if(p=y?ka(y):window,b=p.nodeName&&p.nodeName.toLowerCase(),b==="select"||b==="input"&&p.type==="file")var H=Cf;else if(Df(p))if(_f)H=v0;else{H=r0;var P=d0}else b=p.nodeName,!b||b.toLowerCase()!=="input"||p.type!=="checkbox"&&p.type!=="radio"?y&&Ai(y.elementType)&&(H=Cf):H=h0;if(H&&(H=H(l,y))){Uf(T,H,t,z);break l}P&&P(l,p,y),l==="focusout"&&y&&p.type==="number"&&y.memoizedProps.value!=null&&Ti(p,"number",p.value)}switch(P=y?ka(y):window,l){case"focusin":(Df(P)||P.contentEditable==="true")&&(oa=P,Gi=y,tn=null);break;case"focusout":tn=Gi=oa=null;break;case"mousedown":Xi=!0;break;case"contextmenu":case"mouseup":case"dragend":Xi=!1,Gf(T,t,z);break;case"selectionchange":if(m0)break;case"keydown":case"keyup":Gf(T,t,z)}var q;if(Hi)l:{switch(l){case"compositionstart":var L="onCompositionStart";break l;case"compositionend":L="onCompositionEnd";break l;case"compositionupdate":L="onCompositionUpdate";break l}L=void 0}else fa?Ef(l,t)&&(L="onCompositionEnd"):l==="keydown"&&t.keyCode===229&&(L="onCompositionStart");L&&(Mf&&t.locale!=="ko"&&(fa||L!=="onCompositionStart"?L==="onCompositionEnd"&&fa&&(q=bf()):(ct=z,Ci="value"in ct?ct.value:ct.textContent,fa=!0)),P=ku(y,L),0<P.length&&(L=new jf(L,l,null,t,z),T.push({event:L,listeners:P}),q?L.data=q:(q=Of(t),q!==null&&(L.data=q)))),(q=i0?c0(l,t):s0(l,t))&&(L=ku(y,"onBeforeInput"),0<L.length&&(P=new jf("onBeforeInput","beforeinput",null,t,z),T.push({event:P,listeners:L}),P.data=q)),I0(T,l,y,t,z)}dr(T,e)})}function Cn(l,e,t){return{instance:l,listener:e,currentTarget:t}}function ku(l,e){for(var t=e+"Capture",a=[];l!==null;){var n=l,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=Ja(l,t),n!=null&&a.unshift(Cn(l,n,u)),n=Ja(l,e),n!=null&&a.push(Cn(l,n,u))),l.tag===3)return a;l=l.return}return[]}function Ba(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5&&l.tag!==27);return l||null}function hr(l,e,t,a,n){for(var u=e._reactName,i=[];t!==null&&t!==a;){var s=t,o=s.alternate,y=s.stateNode;if(s=s.tag,o!==null&&o===a)break;s!==5&&s!==26&&s!==27||y===null||(o=y,n?(y=Ja(t,u),y!=null&&i.unshift(Cn(t,y,o))):n||(y=Ja(t,u),y!=null&&i.push(Cn(t,y,o)))),t=t.return}i.length!==0&&l.push({event:e,listeners:i})}var t1=/\r\n?/g,a1=/\u0000|\uFFFD/g;function vr(l){return(typeof l=="string"?l:""+l).replace(t1,`
`).replace(a1,"")}function gr(l,e){return e=vr(e),vr(l)===e}function Ju(){}function gl(l,e,t,a,n,u){switch(t){case"children":typeof a=="string"?e==="body"||e==="textarea"&&a===""||ia(l,a):(typeof a=="number"||typeof a=="bigint")&&e!=="body"&&ia(l,""+a);break;case"className":Pn(l,"class",a);break;case"tabIndex":Pn(l,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Pn(l,t,a);break;case"style":mf(l,a,u);break;case"data":if(e!=="object"){Pn(l,"data",a);break}case"src":case"href":if(a===""&&(e!=="a"||t!=="href")){l.removeAttribute(t);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){l.removeAttribute(t);break}a=tu(""+a),l.setAttribute(t,a);break;case"action":case"formAction":if(typeof a=="function"){l.setAttribute(t,"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 u=="function"&&(t==="formAction"?(e!=="input"&&gl(l,e,"name",n.name,n,null),gl(l,e,"formEncType",n.formEncType,n,null),gl(l,e,"formMethod",n.formMethod,n,null),gl(l,e,"formTarget",n.formTarget,n,null)):(gl(l,e,"encType",n.encType,n,null),gl(l,e,"method",n.method,n,null),gl(l,e,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){l.removeAttribute(t);break}a=tu(""+a),l.setAttribute(t,a);break;case"onClick":a!=null&&(l.onclick=Ju);break;case"onScroll":a!=null&&tl("scroll",l);break;case"onScrollEnd":a!=null&&tl("scrollend",l);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(f(61));if(t=a.__html,t!=null){if(n.children!=null)throw Error(f(60));l.innerHTML=t}}break;case"multiple":l.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":l.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){l.removeAttribute("xlink:href");break}t=tu(""+a),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(t,""+a):l.removeAttribute(t);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":a&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(t,""):l.removeAttribute(t);break;case"capture":case"download":a===!0?l.setAttribute(t,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(t,a):l.removeAttribute(t);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?l.setAttribute(t,a):l.removeAttribute(t);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?l.removeAttribute(t):l.setAttribute(t,a);break;case"popover":tl("beforetoggle",l),tl("toggle",l),In(l,"popover",a);break;case"xlinkActuate":Qe(l,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Qe(l,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Qe(l,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Qe(l,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Qe(l,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Qe(l,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Qe(l,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Qe(l,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Qe(l,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":In(l,"is",a);break;case"innerText":case"textContent":break;default:(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(t=Rh.get(t)||t,In(l,t,a))}}function os(l,e,t,a,n,u){switch(t){case"style":mf(l,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(f(61));if(t=a.__html,t!=null){if(n.children!=null)throw Error(f(60));l.innerHTML=t}}break;case"children":typeof a=="string"?ia(l,a):(typeof a=="number"||typeof a=="bigint")&&ia(l,""+a);break;case"onScroll":a!=null&&tl("scroll",l);break;case"onScrollEnd":a!=null&&tl("scrollend",l);break;case"onClick":a!=null&&(l.onclick=Ju);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nf.hasOwnProperty(t))l:{if(t[0]==="o"&&t[1]==="n"&&(n=t.endsWith("Capture"),e=t.slice(2,n?t.length-7:void 0),u=l[ee]||null,u=u!=null?u[t]:null,typeof u=="function"&&l.removeEventListener(e,u,n),typeof a=="function")){typeof u!="function"&&u!==null&&(t in l?l[t]=null:l.hasAttribute(t)&&l.removeAttribute(t)),l.addEventListener(e,a,n);break l}t in l?l[t]=a:a===!0?l.setAttribute(t,""):In(l,t,a)}}}function kl(l,e,t){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":tl("error",l),tl("load",l);var a=!1,n=!1,u;for(u in t)if(t.hasOwnProperty(u)){var i=t[u];if(i!=null)switch(u){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(f(137,e));default:gl(l,e,u,i,t,null)}}n&&gl(l,e,"srcSet",t.srcSet,t,null),a&&gl(l,e,"src",t.src,t,null);return;case"input":tl("invalid",l);var s=u=i=n=null,o=null,y=null;for(a in t)if(t.hasOwnProperty(a)){var z=t[a];if(z!=null)switch(a){case"name":n=z;break;case"type":i=z;break;case"checked":o=z;break;case"defaultChecked":y=z;break;case"value":u=z;break;case"defaultValue":s=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(f(137,e));break;default:gl(l,e,a,z,t,null)}}rf(l,u,s,o,y,i,n,!1),lu(l);return;case"select":tl("invalid",l),a=i=u=null;for(n in t)if(t.hasOwnProperty(n)&&(s=t[n],s!=null))switch(n){case"value":u=s;break;case"defaultValue":i=s;break;case"multiple":a=s;default:gl(l,e,n,s,t,null)}e=u,t=i,l.multiple=!!a,e!=null?ua(l,!!a,e,!1):t!=null&&ua(l,!!a,t,!0);return;case"textarea":tl("invalid",l),u=n=a=null;for(i in t)if(t.hasOwnProperty(i)&&(s=t[i],s!=null))switch(i){case"value":a=s;break;case"defaultValue":n=s;break;case"children":u=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(f(91));break;default:gl(l,e,i,s,t,null)}vf(l,a,n,u),lu(l);return;case"option":for(o in t)if(t.hasOwnProperty(o)&&(a=t[o],a!=null))switch(o){case"selected":l.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:gl(l,e,o,a,t,null)}return;case"dialog":tl("beforetoggle",l),tl("toggle",l),tl("cancel",l),tl("close",l);break;case"iframe":case"object":tl("load",l);break;case"video":case"audio":for(a=0;a<Un.length;a++)tl(Un[a],l);break;case"image":tl("error",l),tl("load",l);break;case"details":tl("toggle",l);break;case"embed":case"source":case"link":tl("error",l),tl("load",l);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(y in t)if(t.hasOwnProperty(y)&&(a=t[y],a!=null))switch(y){case"children":case"dangerouslySetInnerHTML":throw Error(f(137,e));default:gl(l,e,y,a,t,null)}return;default:if(Ai(e)){for(z in t)t.hasOwnProperty(z)&&(a=t[z],a!==void 0&&os(l,e,z,a,t,void 0));return}}for(s in t)t.hasOwnProperty(s)&&(a=t[s],a!=null&&gl(l,e,s,a,t,null))}function n1(l,e,t,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,u=null,i=null,s=null,o=null,y=null,z=null;for(b in t){var T=t[b];if(t.hasOwnProperty(b)&&T!=null)switch(b){case"checked":break;case"value":break;case"defaultValue":o=T;default:a.hasOwnProperty(b)||gl(l,e,b,null,a,T)}}for(var p in a){var b=a[p];if(T=t[p],a.hasOwnProperty(p)&&(b!=null||T!=null))switch(p){case"type":u=b;break;case"name":n=b;break;case"checked":y=b;break;case"defaultChecked":z=b;break;case"value":i=b;break;case"defaultValue":s=b;break;case"children":case"dangerouslySetInnerHTML":if(b!=null)throw Error(f(137,e));break;default:b!==T&&gl(l,e,p,b,a,T)}}Mi(l,i,s,o,y,z,u,n);return;case"select":b=i=s=p=null;for(u in t)if(o=t[u],t.hasOwnProperty(u)&&o!=null)switch(u){case"value":break;case"multiple":b=o;default:a.hasOwnProperty(u)||gl(l,e,u,null,a,o)}for(n in a)if(u=a[n],o=t[n],a.hasOwnProperty(n)&&(u!=null||o!=null))switch(n){case"value":p=u;break;case"defaultValue":s=u;break;case"multiple":i=u;default:u!==o&&gl(l,e,n,u,a,o)}e=s,t=i,a=b,p!=null?ua(l,!!t,p,!1):!!a!=!!t&&(e!=null?ua(l,!!t,e,!0):ua(l,!!t,t?[]:"",!1));return;case"textarea":b=p=null;for(s in t)if(n=t[s],t.hasOwnProperty(s)&&n!=null&&!a.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:gl(l,e,s,null,a,n)}for(i in a)if(n=a[i],u=t[i],a.hasOwnProperty(i)&&(n!=null||u!=null))switch(i){case"value":p=n;break;case"defaultValue":b=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(f(91));break;default:n!==u&&gl(l,e,i,n,a,u)}hf(l,p,b);return;case"option":for(var Z in t)if(p=t[Z],t.hasOwnProperty(Z)&&p!=null&&!a.hasOwnProperty(Z))switch(Z){case"selected":l.selected=!1;break;default:gl(l,e,Z,null,a,p)}for(o in a)if(p=a[o],b=t[o],a.hasOwnProperty(o)&&p!==b&&(p!=null||b!=null))switch(o){case"selected":l.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:gl(l,e,o,p,a,b)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var X in t)p=t[X],t.hasOwnProperty(X)&&p!=null&&!a.hasOwnProperty(X)&&gl(l,e,X,null,a,p);for(y in a)if(p=a[y],b=t[y],a.hasOwnProperty(y)&&p!==b&&(p!=null||b!=null))switch(y){case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(f(137,e));break;default:gl(l,e,y,p,a,b)}return;default:if(Ai(e)){for(var ml in t)p=t[ml],t.hasOwnProperty(ml)&&p!==void 0&&!a.hasOwnProperty(ml)&&os(l,e,ml,void 0,a,p);for(z in a)p=a[z],b=t[z],!a.hasOwnProperty(z)||p===b||p===void 0&&b===void 0||os(l,e,z,p,a,b);return}}for(var v in t)p=t[v],t.hasOwnProperty(v)&&p!=null&&!a.hasOwnProperty(v)&&gl(l,e,v,null,a,p);for(T in a)p=a[T],b=t[T],!a.hasOwnProperty(T)||p===b||p==null&&b==null||gl(l,e,T,p,a,b)}var ds=null,rs=null;function Wu(l){return l.nodeType===9?l:l.ownerDocument}function mr(l){switch(l){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function yr(l,e){if(l===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return l===1&&e==="foreignObject"?0:l}function hs(l,e){return l==="textarea"||l==="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 vs=null;function u1(){var l=window.event;return l&&l.type==="popstate"?l===vs?!1:(vs=l,!0):(vs=null,!1)}var pr=typeof setTimeout=="function"?setTimeout:void 0,i1=typeof clearTimeout=="function"?clearTimeout:void 0,br=typeof Promise=="function"?Promise:void 0,c1=typeof queueMicrotask=="function"?queueMicrotask:typeof br<"u"?function(l){return br.resolve(null).then(l).catch(s1)}:pr;function s1(l){setTimeout(function(){throw l})}function zt(l){return l==="head"}function xr(l,e){var t=e,a=0,n=0;do{var u=t.nextSibling;if(l.removeChild(t),u&&u.nodeType===8)if(t=u.data,t==="/$"){if(0<a&&8>a){t=a;var i=l.ownerDocument;if(t&1&&_n(i.documentElement),t&2&&_n(i.body),t&4)for(t=i.head,_n(t),i=t.firstChild;i;){var s=i.nextSibling,o=i.nodeName;i[Ka]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&i.rel.toLowerCase()==="stylesheet"||t.removeChild(i),i=s}}if(n===0){l.removeChild(u),Gn(e);return}n--}else t==="$"||t==="$?"||t==="$!"?n++:a=t.charCodeAt(0)-48;else a=0;t=u}while(t);Gn(e)}function gs(l){var e=l.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var t=e;switch(e=e.nextSibling,t.nodeName){case"HTML":case"HEAD":case"BODY":gs(t),xi(t);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(t.rel.toLowerCase()==="stylesheet")continue}l.removeChild(t)}}function f1(l,e,t,a){for(;l.nodeType===1;){var n=t;if(l.nodeName.toLowerCase()!==e.toLowerCase()){if(!a&&(l.nodeName!=="INPUT"||l.type!=="hidden"))break}else if(a){if(!l[Ka])switch(e){case"meta":if(!l.hasAttribute("itemprop"))break;return l;case"link":if(u=l.getAttribute("rel"),u==="stylesheet"&&l.hasAttribute("data-precedence"))break;if(u!==n.rel||l.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||l.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||l.getAttribute("title")!==(n.title==null?null:n.title))break;return l;case"style":if(l.hasAttribute("data-precedence"))break;return l;case"script":if(u=l.getAttribute("src"),(u!==(n.src==null?null:n.src)||l.getAttribute("type")!==(n.type==null?null:n.type)||l.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&l.hasAttribute("async")&&!l.hasAttribute("itemprop"))break;return l;default:return l}}else if(e==="input"&&l.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&l.getAttribute("name")===u)return l}else return l;if(l=_e(l.nextSibling),l===null)break}return null}function o1(l,e,t){if(e==="")return null;for(;l.nodeType!==3;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!t||(l=_e(l.nextSibling),l===null))return null;return l}function ms(l){return l.data==="$!"||l.data==="$?"&&l.ownerDocument.readyState==="complete"}function d1(l,e){var t=l.ownerDocument;if(l.data!=="$?"||t.readyState==="complete")e();else{var a=function(){e(),t.removeEventListener("DOMContentLoaded",a)};t.addEventListener("DOMContentLoaded",a),l._reactRetry=a}}function _e(l){for(;l!=null;l=l.nextSibling){var e=l.nodeType;if(e===1||e===3)break;if(e===8){if(e=l.data,e==="$"||e==="$!"||e==="$?"||e==="F!"||e==="F")break;if(e==="/$")return null}}return l}var ys=null;function Sr(l){l=l.previousSibling;for(var e=0;l;){if(l.nodeType===8){var t=l.data;if(t==="$"||t==="$!"||t==="$?"){if(e===0)return l;e--}else t==="/$"&&e++}l=l.previousSibling}return null}function jr(l,e,t){switch(e=Wu(t),l){case"html":if(l=e.documentElement,!l)throw Error(f(452));return l;case"head":if(l=e.head,!l)throw Error(f(453));return l;case"body":if(l=e.body,!l)throw Error(f(454));return l;default:throw Error(f(451))}}function _n(l){for(var e=l.attributes;e.length;)l.removeAttributeNode(e[0]);xi(l)}var Te=new Map,zr=new Set;function $u(l){return typeof l.getRootNode=="function"?l.getRootNode():l.nodeType===9?l:l.ownerDocument}var tt=U.d;U.d={f:r1,r:h1,D:v1,C:g1,L:m1,m:y1,X:b1,S:p1,M:x1};function r1(){var l=tt.f(),e=Xu();return l||e}function h1(l){var e=ea(l);e!==null&&e.tag===5&&e.type==="form"?Lo(e):tt.r(l)}var Na=typeof document>"u"?null:document;function Mr(l,e,t){var a=Na;if(a&&typeof e=="string"&&e){var n=pe(e);n='link[rel="'+l+'"][href="'+n+'"]',typeof t=="string"&&(n+='[crossorigin="'+t+'"]'),zr.has(n)||(zr.add(n),l={rel:l,crossOrigin:t,href:e},a.querySelector(n)===null&&(e=a.createElement("link"),kl(e,"link",l),Yl(e),a.head.appendChild(e)))}}function v1(l){tt.D(l),Mr("dns-prefetch",l,null)}function g1(l,e){tt.C(l,e),Mr("preconnect",l,e)}function m1(l,e,t){tt.L(l,e,t);var a=Na;if(a&&l&&e){var n='link[rel="preload"][as="'+pe(e)+'"]';e==="image"&&t&&t.imageSrcSet?(n+='[imagesrcset="'+pe(t.imageSrcSet)+'"]',typeof t.imageSizes=="string"&&(n+='[imagesizes="'+pe(t.imageSizes)+'"]')):n+='[href="'+pe(l)+'"]';var u=n;switch(e){case"style":u=Ha(l);break;case"script":u=wa(l)}Te.has(u)||(l=E({rel:"preload",href:e==="image"&&t&&t.imageSrcSet?void 0:l,as:e},t),Te.set(u,l),a.querySelector(n)!==null||e==="style"&&a.querySelector(Rn(u))||e==="script"&&a.querySelector(Bn(u))||(e=a.createElement("link"),kl(e,"link",l),Yl(e),a.head.appendChild(e)))}}function y1(l,e){tt.m(l,e);var t=Na;if(t&&l){var a=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+pe(a)+'"][href="'+pe(l)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=wa(l)}if(!Te.has(u)&&(l=E({rel:"modulepreload",href:l},e),Te.set(u,l),t.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(t.querySelector(Bn(u)))return}a=t.createElement("link"),kl(a,"link",l),Yl(a),t.head.appendChild(a)}}}function p1(l,e,t){tt.S(l,e,t);var a=Na;if(a&&l){var n=ta(a).hoistableStyles,u=Ha(l);e=e||"default";var i=n.get(u);if(!i){var s={loading:0,preload:null};if(i=a.querySelector(Rn(u)))s.loading=5;else{l=E({rel:"stylesheet",href:l,"data-precedence":e},t),(t=Te.get(u))&&ps(l,t);var o=i=a.createElement("link");Yl(o),kl(o,"link",l),o._p=new Promise(function(y,z){o.onload=y,o.onerror=z}),o.addEventListener("load",function(){s.loading|=1}),o.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Fu(i,e,a)}i={type:"stylesheet",instance:i,count:1,state:s},n.set(u,i)}}}function b1(l,e){tt.X(l,e);var t=Na;if(t&&l){var a=ta(t).hoistableScripts,n=wa(l),u=a.get(n);u||(u=t.querySelector(Bn(n)),u||(l=E({src:l,async:!0},e),(e=Te.get(n))&&bs(l,e),u=t.createElement("script"),Yl(u),kl(u,"link",l),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function x1(l,e){tt.M(l,e);var t=Na;if(t&&l){var a=ta(t).hoistableScripts,n=wa(l),u=a.get(n);u||(u=t.querySelector(Bn(n)),u||(l=E({src:l,async:!0,type:"module"},e),(e=Te.get(n))&&bs(l,e),u=t.createElement("script"),Yl(u),kl(u,"link",l),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Tr(l,e,t,a){var n=(n=Be.current)?$u(n):null;if(!n)throw Error(f(446));switch(l){case"meta":case"title":return null;case"style":return typeof t.precedence=="string"&&typeof t.href=="string"?(e=Ha(t.href),t=ta(n).hoistableStyles,a=t.get(e),a||(a={type:"style",instance:null,count:0,state:null},t.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(t.rel==="stylesheet"&&typeof t.href=="string"&&typeof t.precedence=="string"){l=Ha(t.href);var u=ta(n).hoistableStyles,i=u.get(l);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(l,i),(u=n.querySelector(Rn(l)))&&!u._p&&(i.instance=u,i.state.loading=5),Te.has(l)||(t={rel:"preload",as:"style",href:t.href,crossOrigin:t.crossOrigin,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy},Te.set(l,t),u||S1(n,l,t,i.state))),e&&a===null)throw Error(f(528,""));return i}if(e&&a!==null)throw Error(f(529,""));return null;case"script":return e=t.async,t=t.src,typeof t=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=wa(t),t=ta(n).hoistableScripts,a=t.get(e),a||(a={type:"script",instance:null,count:0,state:null},t.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(f(444,l))}}function Ha(l){return'href="'+pe(l)+'"'}function Rn(l){return'link[rel="stylesheet"]['+l+"]"}function Ar(l){return E({},l,{"data-precedence":l.precedence,precedence:null})}function S1(l,e,t,a){l.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=l.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),kl(e,"link",t),Yl(e),l.head.appendChild(e))}function wa(l){return'[src="'+pe(l)+'"]'}function Bn(l){return"script[async]"+l}function Er(l,e,t){if(e.count++,e.instance===null)switch(e.type){case"style":var a=l.querySelector('style[data-href~="'+pe(t.href)+'"]');if(a)return e.instance=a,Yl(a),a;var n=E({},t,{"data-href":t.href,"data-precedence":t.precedence,href:null,precedence:null});return a=(l.ownerDocument||l).createElement("style"),Yl(a),kl(a,"style",n),Fu(a,t.precedence,l),e.instance=a;case"stylesheet":n=Ha(t.href);var u=l.querySelector(Rn(n));if(u)return e.state.loading|=4,e.instance=u,Yl(u),u;a=Ar(t),(n=Te.get(n))&&ps(a,n),u=(l.ownerDocument||l).createElement("link"),Yl(u);var i=u;return i._p=new Promise(function(s,o){i.onload=s,i.onerror=o}),kl(u,"link",a),e.state.loading|=4,Fu(u,t.precedence,l),e.instance=u;case"script":return u=wa(t.src),(n=l.querySelector(Bn(u)))?(e.instance=n,Yl(n),n):(a=t,(n=Te.get(u))&&(a=E({},t),bs(a,n)),l=l.ownerDocument||l,n=l.createElement("script"),Yl(n),kl(n,"link",a),l.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(f(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,Fu(a,t.precedence,l));return e.instance}function Fu(l,e,t){for(var a=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i<a.length;i++){var s=a[i];if(s.dataset.precedence===e)u=s;else if(u!==n)break}u?u.parentNode.insertBefore(l,u.nextSibling):(e=t.nodeType===9?t.head:t,e.insertBefore(l,e.firstChild))}function ps(l,e){l.crossOrigin==null&&(l.crossOrigin=e.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=e.referrerPolicy),l.title==null&&(l.title=e.title)}function bs(l,e){l.crossOrigin==null&&(l.crossOrigin=e.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=e.referrerPolicy),l.integrity==null&&(l.integrity=e.integrity)}var Iu=null;function Or(l,e,t){if(Iu===null){var a=new Map,n=Iu=new Map;n.set(t,a)}else n=Iu,a=n.get(t),a||(a=new Map,n.set(t,a));if(a.has(l))return a;for(a.set(l,null),t=t.getElementsByTagName(l),n=0;n<t.length;n++){var u=t[n];if(!(u[Ka]||u[Jl]||l==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var i=u.getAttribute(e)||"";i=l+i;var s=a.get(i);s?s.push(u):a.set(i,[u])}}return a}function Dr(l,e,t){l=l.ownerDocument||l,l.head.insertBefore(t,e==="title"?l.querySelector("head > title"):null)}function j1(l,e,t){if(t===1||e.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return l=e.disabled,typeof e.precedence=="string"&&l==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Ur(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}var Nn=null;function z1(){}function M1(l,e,t){if(Nn===null)throw Error(f(475));var a=Nn;if(e.type==="stylesheet"&&(typeof t.media!="string"||matchMedia(t.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var n=Ha(t.href),u=l.querySelector(Rn(n));if(u){l=u._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(a.count++,a=Pu.bind(a),l.then(a,a)),e.state.loading|=4,e.instance=u,Yl(u);return}u=l.ownerDocument||l,t=Ar(t),(n=Te.get(n))&&ps(t,n),u=u.createElement("link"),Yl(u);var i=u;i._p=new Promise(function(s,o){i.onload=s,i.onerror=o}),kl(u,"link",t),e.instance=u}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(e,l),(l=e.state.preload)&&(e.state.loading&3)===0&&(a.count++,e=Pu.bind(a),l.addEventListener("load",e),l.addEventListener("error",e))}}function T1(){if(Nn===null)throw Error(f(475));var l=Nn;return l.stylesheets&&l.count===0&&xs(l,l.stylesheets),0<l.count?function(e){var t=setTimeout(function(){if(l.stylesheets&&xs(l,l.stylesheets),l.unsuspend){var a=l.unsuspend;l.unsuspend=null,a()}},6e4);return l.unsuspend=e,function(){l.unsuspend=null,clearTimeout(t)}}:null}function Pu(){if(this.count--,this.count===0){if(this.stylesheets)xs(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var li=null;function xs(l,e){l.stylesheets=null,l.unsuspend!==null&&(l.count++,li=new Map,e.forEach(A1,l),li=null,Pu.call(l))}function A1(l,e){if(!(e.state.loading&4)){var t=li.get(l);if(t)var a=t.get(null);else{t=new Map,li.set(l,t);for(var n=l.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var i=n[u];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(t.set(i.dataset.precedence,i),a=i)}a&&t.set(null,a)}n=e.instance,i=n.getAttribute("data-precedence"),u=t.get(i)||a,u===a&&t.set(null,n),t.set(i,n),this.count++,a=Pu.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),u?u.parentNode.insertBefore(n,u.nextSibling):(l=l.nodeType===9?l.head:l,l.insertBefore(n,l.firstChild)),e.state.loading|=4}}var Hn={$$typeof:Y,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function E1(l,e,t,a,n,u,i,s){this.tag=1,this.containerInfo=l,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=mi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mi(0),this.hiddenUpdates=mi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function Cr(l,e,t,a,n,u,i,s,o,y,z,T){return l=new E1(l,e,t,i,s,o,y,T),e=1,u===!0&&(e|=24),u=oe(3,null,null,e),l.current=u,u.stateNode=l,e=ec(),e.refCount++,l.pooledCache=e,e.refCount++,u.memoizedState={element:a,isDehydrated:t,cache:e},uc(u),l}function _r(l){return l?(l=va,l):va}function Rr(l,e,t,a,n,u){n=_r(n),a.context===null?a.context=n:a.pendingContext=n,a=ot(e),a.payload={element:t},u=u===void 0?null:u,u!==null&&(a.callback=u),t=dt(l,a,e),t!==null&&(ge(t,l,e),rn(t,l,e))}function Br(l,e){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var t=l.retryLane;l.retryLane=t!==0&&t<e?t:e}}function Ss(l,e){Br(l,e),(l=l.alternate)&&Br(l,e)}function Nr(l){if(l.tag===13){var e=ha(l,67108864);e!==null&&ge(e,l,67108864),Ss(l,67108864)}}var ei=!0;function O1(l,e,t,a){var n=S.T;S.T=null;var u=U.p;try{U.p=2,js(l,e,t,a)}finally{U.p=u,S.T=n}}function D1(l,e,t,a){var n=S.T;S.T=null;var u=U.p;try{U.p=8,js(l,e,t,a)}finally{U.p=u,S.T=n}}function js(l,e,t,a){if(ei){var n=zs(a);if(n===null)fs(l,e,a,ti,t),wr(l,a);else if(C1(n,l,e,t,a))a.stopPropagation();else if(wr(l,a),e&4&&-1<U1.indexOf(l)){for(;n!==null;){var u=ea(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var i=Rt(u.pendingLanes);if(i!==0){var s=u;for(s.pendingLanes|=2,s.entangledLanes|=2;i;){var o=1<<31-se(i);s.entanglements[1]|=o,i&=~o}Ge(u),(rl&6)===0&&(Yu=Ne()+500,Dn(0))}}break;case 13:s=ha(u,2),s!==null&&ge(s,u,2),Xu(),Ss(u,2)}if(u=zs(a),u===null&&fs(l,e,a,ti,t),u===n)break;n=u}n!==null&&a.stopPropagation()}else fs(l,e,a,null,t)}}function zs(l){return l=Oi(l),Ms(l)}var ti=null;function Ms(l){if(ti=null,l=la(l),l!==null){var e=A(l);if(e===null)l=null;else{var t=e.tag;if(t===13){if(l=R(e),l!==null)return l;l=null}else if(t===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;l=null}else e!==l&&(l=null)}}return ti=l,null}function Hr(l){switch(l){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(gh()){case Js:return 2;case Ws:return 8;case Jn:case mh:return 32;case $s:return 268435456;default:return 32}default:return 32}}var Ts=!1,Mt=null,Tt=null,At=null,wn=new Map,qn=new Map,Et=[],U1="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 wr(l,e){switch(l){case"focusin":case"focusout":Mt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":wn.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":qn.delete(e.pointerId)}}function Yn(l,e,t,a,n,u){return l===null||l.nativeEvent!==u?(l={blockedOn:e,domEventName:t,eventSystemFlags:a,nativeEvent:u,targetContainers:[n]},e!==null&&(e=ea(e),e!==null&&Nr(e)),l):(l.eventSystemFlags|=a,e=l.targetContainers,n!==null&&e.indexOf(n)===-1&&e.push(n),l)}function C1(l,e,t,a,n){switch(e){case"focusin":return Mt=Yn(Mt,l,e,t,a,n),!0;case"dragenter":return Tt=Yn(Tt,l,e,t,a,n),!0;case"mouseover":return At=Yn(At,l,e,t,a,n),!0;case"pointerover":var u=n.pointerId;return wn.set(u,Yn(wn.get(u)||null,l,e,t,a,n)),!0;case"gotpointercapture":return u=n.pointerId,qn.set(u,Yn(qn.get(u)||null,l,e,t,a,n)),!0}return!1}function qr(l){var e=la(l.target);if(e!==null){var t=A(e);if(t!==null){if(e=t.tag,e===13){if(e=R(t),e!==null){l.blockedOn=e,Mh(l.priority,function(){if(t.tag===13){var a=ve();a=yi(a);var n=ha(t,a);n!==null&&ge(n,t,a),Ss(t,a)}});return}}else if(e===3&&t.stateNode.current.memoizedState.isDehydrated){l.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}l.blockedOn=null}function ai(l){if(l.blockedOn!==null)return!1;for(var e=l.targetContainers;0<e.length;){var t=zs(l.nativeEvent);if(t===null){t=l.nativeEvent;var a=new t.constructor(t.type,t);Ei=a,t.target.dispatchEvent(a),Ei=null}else return e=ea(t),e!==null&&Nr(e),l.blockedOn=t,!1;e.shift()}return!0}function Yr(l,e,t){ai(l)&&t.delete(e)}function _1(){Ts=!1,Mt!==null&&ai(Mt)&&(Mt=null),Tt!==null&&ai(Tt)&&(Tt=null),At!==null&&ai(At)&&(At=null),wn.forEach(Yr),qn.forEach(Yr)}function ni(l,e){l.blockedOn===e&&(l.blockedOn=null,Ts||(Ts=!0,d.unstable_scheduleCallback(d.unstable_NormalPriority,_1)))}var ui=null;function Gr(l){ui!==l&&(ui=l,d.unstable_scheduleCallback(d.unstable_NormalPriority,function(){ui===l&&(ui=null);for(var e=0;e<l.length;e+=3){var t=l[e],a=l[e+1],n=l[e+2];if(typeof a!="function"){if(Ms(a||t)===null)continue;break}var u=ea(t);u!==null&&(l.splice(e,3),e-=3,Mc(u,{pending:!0,data:n,method:t.method,action:a},a,n))}}))}function Gn(l){function e(o){return ni(o,l)}Mt!==null&&ni(Mt,l),Tt!==null&&ni(Tt,l),At!==null&&ni(At,l),wn.forEach(e),qn.forEach(e);for(var t=0;t<Et.length;t++){var a=Et[t];a.blockedOn===l&&(a.blockedOn=null)}for(;0<Et.length&&(t=Et[0],t.blockedOn===null);)qr(t),t.blockedOn===null&&Et.shift();if(t=(l.ownerDocument||l).$$reactFormReplay,t!=null)for(a=0;a<t.length;a+=3){var n=t[a],u=t[a+1],i=n[ee]||null;if(typeof u=="function")i||Gr(t);else if(i){var s=null;if(u&&u.hasAttribute("formAction")){if(n=u,i=u[ee]||null)s=i.formAction;else if(Ms(n)!==null)continue}else s=i.action;typeof s=="function"?t[a+1]=s:(t.splice(a,3),a-=3),Gr(t)}}}function As(l){this._internalRoot=l}ii.prototype.render=As.prototype.render=function(l){var e=this._internalRoot;if(e===null)throw Error(f(409));var t=e.current,a=ve();Rr(t,a,l,e,null,null)},ii.prototype.unmount=As.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var e=l.containerInfo;Rr(l.current,2,null,l,null,null),Xu(),e[Pt]=null}};function ii(l){this._internalRoot=l}ii.prototype.unstable_scheduleHydration=function(l){if(l){var e=ef();l={blockedOn:null,target:l,priority:e};for(var t=0;t<Et.length&&e!==0&&e<Et[t].priority;t++);Et.splice(t,0,l),t===0&&qr(l)}};var Xr=h.version;if(Xr!=="19.1.0")throw Error(f(527,Xr,"19.1.0"));U.findDOMNode=function(l){var e=l._reactInternals;if(e===void 0)throw typeof l.render=="function"?Error(f(188)):(l=Object.keys(l).join(","),Error(f(268,l)));return l=B(e),l=l!==null?j(l):null,l=l===null?null:l.stateNode,l};var R1={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:S,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ci=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ci.isDisabled&&ci.supportsFiber)try{La=ci.inject(R1),ce=ci}catch{}}return Ln.createRoot=function(l,e){if(!x(l))throw Error(f(299));var t=!1,a="",n=ad,u=nd,i=ud,s=null;return e!=null&&(e.unstable_strictMode===!0&&(t=!0),e.identifierPrefix!==void 0&&(a=e.identifierPrefix),e.onUncaughtError!==void 0&&(n=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(i=e.onRecoverableError),e.unstable_transitionCallbacks!==void 0&&(s=e.unstable_transitionCallbacks)),e=Cr(l,1,!1,null,null,t,a,n,u,i,s,null),l[Pt]=e.current,ss(l),new As(e)},Ln.hydrateRoot=function(l,e,t){if(!x(l))throw Error(f(299));var a=!1,n="",u=ad,i=nd,s=ud,o=null,y=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(o=t.unstable_transitionCallbacks),t.formState!==void 0&&(y=t.formState)),e=Cr(l,1,!0,e,t??null,a,n,u,i,s,o,y),e.context=_r(null),t=e.current,a=ve(),a=yi(a),n=ot(a),n.callback=null,dt(t,n,a),t=a,e.current.lanes=t,Za(e,t),Ge(e),l[Pt]=e.current,ss(l),new ii(e)},Ln.version="19.1.0",Ln}var kr;function gv(){if(kr)return Ds.exports;kr=1;function d(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d)}catch(h){console.error(h)}}return d(),Ds.exports=vv(),Ds.exports}var mv=gv();function yv(){Os.wasm.wasmPaths="https://siva-sub.github.io/client-ocr/",Os.wasm.numThreads=navigator.hardwareConcurrency||4,Os.wasm.simd=!0}yv();/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var pv={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const ol=(d,h,g,f)=>{const x=zl.forwardRef(({color:A="currentColor",size:R=24,stroke:C=2,title:B,className:j,children:E,...O},D)=>zl.createElement("svg",{ref:D,...pv[d],width:R,height:R,className:["tabler-icon",`tabler-icon-${h}`,j].join(" "),strokeWidth:C,stroke:A,...O},[B&&zl.createElement("title",{key:"svg-title"},B),...f.map(([k,$])=>zl.createElement(k,$)),...Array.isArray(E)?E:[E]]));return x.displayName=`${g}`,x};/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const bv=[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]],Zs=ol("outline","adjustments","Adjustments",bv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const xv=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],Sv=ol("outline","arrow-up","ArrowUp",xv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const jv=[["path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8",key:"svg-0"}],["path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8",key:"svg-1"}],["path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5",key:"svg-2"}],["path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0",key:"svg-3"}],["path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5",key:"svg-4"}],["path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10",key:"svg-5"}]],sh=ol("outline","brain","Brain",jv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const zv=[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]],Mv=ol("outline","brand-github","BrandGithub",zv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Tv=[["path",{d:"M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M9 13a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],Jr=ol("outline","camera","Camera",Tv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Av=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],Ys=ol("outline","chart-bar","ChartBar",Av);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Ev=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],Ov=ol("outline","check","Check",Ev);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Dv=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],Uv=ol("outline","chevron-down","ChevronDown",Dv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Cv=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],_v=ol("outline","chevron-up","ChevronUp",Cv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Rv=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Wr=ol("outline","clock","Clock",Rv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Bv=[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],Nv=ol("outline","copy","Copy",Bv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Hv=[["path",{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],wv=ol("outline","database","Database",Hv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const qv=[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]],Yv=ol("outline","device-mobile","DeviceMobile",qv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Gv=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],$r=ol("outline","download","Download",Gv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Xv=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],Qv=ol("outline","eye","Eye",Xv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Lv=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]],kn=ol("outline","file-text","FileText",Lv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Vv=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4",key:"svg-1"}],["path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6",key:"svg-2"}],["path",{d:"M17 18h2",key:"svg-3"}],["path",{d:"M20 15h-3v6",key:"svg-4"}],["path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z",key:"svg-5"}]],Zv=ol("outline","file-type-pdf","FileTypePdf",Vv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Kv=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],kv=ol("outline","history","History",Kv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Jv=[["path",{d:"M9 6.371c0 4.418 -2.239 6.629 -5 6.629",key:"svg-0"}],["path",{d:"M4 6.371h7",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.252 3.908 6 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}],["path",{d:"M6.694 3l.793 .582",key:"svg-5"}]],Wv=ol("outline","language","Language",Jv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const $v=[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]],Fv=ol("outline","link","Link",$v);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Iv=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]],Fr=ol("outline","moon","Moon",Iv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Pv=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]],Gs=ol("outline","photo","Photo",Pv);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const lg=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],eg=ol("outline","refresh","Refresh",lg);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const tg=[["path",{d:"M4 13a8 8 0 0 1 7 7a6 6 0 0 0 3 -5a9 9 0 0 0 6 -8a3 3 0 0 0 -3 -3a9 9 0 0 0 -8 6a6 6 0 0 0 -5 3",key:"svg-0"}],["path",{d:"M7 14a6 6 0 0 0 -3 6a6 6 0 0 0 6 -3",key:"svg-1"}],["path",{d:"M15 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],ag=ol("outline","rocket","Rocket",tg);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const ng=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],Ir=ol("outline","settings","Settings",ng);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const ug=[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6z",key:"svg-0"}]],fh=ol("outline","sparkles","Sparkles",ug);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const ig=[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],Pr=ol("outline","sun","Sun",ig);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const cg=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],sg=ol("outline","upload","Upload",cg);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const fg=[["path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3",key:"svg-0"}],["path",{d:"M15 6l3 3",key:"svg-1"}],["path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2",key:"svg-2"}],["path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2",key:"svg-3"}]],og=ol("outline","wand","Wand",fg);/**
* @license @tabler/icons-react v3.34.1 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const dg=[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}],["path",{d:"M7 10l2 2l4 -4",key:"svg-2"}]],rg=ol("outline","zoom-check","ZoomCheck",dg),fi={image:Gs,pdf:Zv,text:kn,default:kn};function hg({onDrop:d,isProcessing:h,accept:g=["image/*","application/pdf",si.png,si.jpeg,si.webp,si.gif,"image/bmp","image/tiff"],maxSize:f=50*1024**2,multiple:x=!1}){const A=N1(),[R,C]=zl.useState(!1),[B,j]=zl.useState([]),[E,O]=zl.useState(0),D=Ls("(max-width: 768px)"),k=zl.useRef(null),$=K=>{if(K.length>0){j(K);let J=0;const Y=setInterval(()=>{J+=10,O(J),J>=100&&(clearInterval(Y),d(K),j([]),O(0))},100)}},il=async()=>{const K=k.current?.value;if(K)try{const Y=await(await fetch(K)).blob(),dl=new File([Y],K.split("/").pop()||"image",{type:Y.type});$([dl]),k.current&&(k.current.value="")}catch{Ut.show({title:"Failed to load URL",message:"Please check the URL and try again",color:"red"})}},w=K=>K.type.startsWith("image/")?fi.image:K.type==="application/pdf"?fi.pdf:K.type.startsWith("text/")?fi.text:fi.default;return c.jsx(Sl,{gap:"md",children:c.jsx(H1,{onDrop:$,onReject:K=>{const J=K[0];let Y="Invalid file";J.errors[0]?.code==="file-too-large"?Y=`File is too large. Maximum size is ${f/1024/1024}MB`:J.errors[0]?.code==="file-invalid-type"&&(Y="File type not supported"),Ut.show({title:"Upload failed",message:Y,color:"red"})},onDragEnter:()=>C(!0),onDragLeave:()=>C(!1),maxSize:f,accept:g,loading:h,multiple:x,children:c.jsxs(Ae,{p:D?"md":"xl",radius:"md",withBorder:!0,style:{borderStyle:"dashed",borderWidth:2,borderColor:R?A.colors.blue[6]:A.colors.gray[3],backgroundColor:R?A.colors.blue[0]:"transparent",transition:"all 0.3s ease",cursor:h?"not-allowed":"pointer",position:"relative",overflow:"hidden"},children:[E>0&&E<100&&c.jsx(at,{value:E,size:"xs",style:{position:"absolute",bottom:0,left:0,right:0}}),c.jsxs(Sl,{align:"center",gap:"md",children:[c.jsxs(Kn,{style:{position:"relative"},children:[c.jsx(Jr,{size:D?48:64,stroke:1.5,color:R?A.colors.blue[6]:A.colors.gray[5],style:{transition:"all 0.3s ease"}}),R&&c.jsx(fh,{size:24,color:A.colors.blue[6],style:{position:"absolute",top:-10,right:-10,animation:"pulse 1s infinite"}})]}),c.jsxs("div",{children:[c.jsx(V,{size:D?"lg":"xl",fw:500,ta:"center",children:"Drop files here or click to select"}),c.jsx(V,{size:"sm",c:"dimmed",ta:"center",mt:7,children:"Images, PDFs, or paste an image URL"})]}),c.jsxs(Zn,{cols:D?1:3,spacing:"xs",w:"100%",children:[c.jsx(Ct,{variant:"light",size:D?"xs":"sm",leftSection:c.jsx(sg,{size:16}),disabled:h,fullWidth:!0,children:"Choose files"}),c.jsx(Ct,{variant:"subtle",size:D?"xs":"sm",leftSection:c.jsx(Jr,{size:16}),disabled:h,fullWidth:!0,onClick:K=>{K.stopPropagation();const J=document.createElement("input");J.type="file",J.accept="image/*",J.capture="environment",J.onchange=Y=>{const dl=Y.target.files?.[0];dl&&$([dl])},J.click()},children:"Camera"}),c.jsx(Ct,{variant:"subtle",size:D?"xs":"sm",leftSection:c.jsx(Fv,{size:16}),disabled:h,fullWidth:!0,onClick:K=>{K.stopPropagation();const J=prompt("Enter image URL:");J&&(k.current={value:J},il())},children:"From URL"})]}),c.jsxs(pl,{gap:"xs",mt:"xs",children:[c.jsx(wl,{variant:"light",size:"sm",children:"JPG, PNG, WebP, GIF, BMP, TIFF"}),c.jsx(wl,{variant:"light",size:"sm",color:"orange",children:"PDF"}),c.jsxs(wl,{variant:"light",size:"sm",color:"gray",children:["Max ",f/1024/1024,"MB"]})]})]}),B.length>0&&c.jsx(Bs,{mounted:!0,transition:"slide-up",duration:400,children:K=>c.jsx(Kn,{style:K,mt:"md",children:c.jsx(Sl,{gap:"xs",children:B.map((J,Y)=>{const dl=w(J);return c.jsxs(pl,{gap:"xs",children:[c.jsx(dl,{size:16}),c.jsx(V,{size:"sm",truncate:!0,style:{flex:1},children:J.name}),c.jsxs(wl,{size:"xs",variant:"light",children:[(J.size/1024).toFixed(1),"KB"]})]},Y)})})})})]})})})}const Xs={getHighlighter:()=>({code:d})=>({highlightedCode:d,isHighlighted:!1})},[Kg,vg]=w1({adapter:Xs,highlight:Xs.getHighlighter(null)});function gg(){return vg()?.highlight||Xs.getHighlighter(null)}const[mg,yg]=q1("CodeHighlightProvider was not found in the component tree"),ri=Y1((d,h)=>{const g=Vs("CodeHighlightControl",null,d),{children:f,vars:x,tooltipLabel:A,...R}=g,C=yg(),B=C.getStyles("controlTooltip"),j=c.jsx(Ee,{ref:h,...C.getStyles("control"),...R,variant:"none","data-code-color-scheme":C.codeColorScheme,children:f});return A?c.jsx(Re,{label:A,fz:"sm",position:"bottom",classNames:{tooltip:B.className},styles:{tooltip:B.style},"data-code-color-scheme":C.codeColorScheme,transitionProps:{duration:0},children:j}):j});ri.displayName="@mantine/code-highlight/CodeHighlightControl";function oh({copied:d,...h}){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...h,children:d?c.jsxs(c.Fragment,{children:[c.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),c.jsx("path",{d:"M5 12l5 5l10 -10"})]}):c.jsxs(c.Fragment,{children:[c.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),c.jsx("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),c.jsx("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]})})}oh.displayName="@mantine/code-highlight/CopyIcon";function dh({code:d,copyLabel:h="Copy",copiedLabel:g="Copied"}){const f=G1();return c.jsx(ri,{onClick:()=>f.copy(d.trim()),variant:"none",tooltipLabel:f.copied?g:h,children:c.jsx(oh,{copied:f.copied})})}dh.displayName="@mantine/code-highlight/CopyCodeButton";function rh({expanded:d,style:h,...g}){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",...g,children:d?c.jsxs(c.Fragment,{children:[c.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),c.jsx("path",{d:"M12 13v-8l-3 3m6 0l-3 -3"}),c.jsx("path",{d:"M9 17l1 0"}),c.jsx("path",{d:"M14 17l1 0"}),c.jsx("path",{d:"M19 17l1 0"}),c.jsx("path",{d:"M4 17l1 0"})]}):c.jsxs(c.Fragment,{children:[c.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),c.jsx("path",{d:"M12 11v8l3 -3m-6 0l3 3"}),c.jsx("path",{d:"M9 7l1 0"}),c.jsx("path",{d:"M14 7l1 0"}),c.jsx("path",{d:"M19 7l1 0"}),c.jsx("path",{d:"M4 7l1 0"})]})})}rh.displayName="@mantine/code-highlight/ExpandIcon";function hh({expanded:d,onExpand:h,expandCodeLabel:g="Expand code",collapseCodeLabel:f="Collapse code"}){return c.jsx(ri,{onClick:()=>h(!d),tooltipLabel:d?f:g,children:c.jsx(rh,{expanded:d})})}hh.displayName="@mantine/code-highlight/ExpandCodeButton";var hi={root:"m_5cb1b9c8",codeHighlight:"m_e597c321",inlineCodeHighlight:"m_dfe9c588",pre:"m_2c47c4fd",code:"m_5caae6d3",controls:"m_be7e9c9c",control:"m_d498bab7",controlTooltip:"m_4c3d814c",scrollarea:"m_f744fd40",showCodeButton:"m_c9378bc2",file:"m_5cac2e62",fileIcon:"m_b46cddfb",filesScrollarea:"m_7b14120b",files:"m_38d99e51"};const pg={withCopyButton:!0,expandCodeLabel:"Expand code"},bg=L1((d,{maxCollapsedHeight:h,background:g,radius:f})=>({codeHighlight:{"--ch-max-height":Hs(h),"--ch-background":g?Z1(g,d):void 0,"--ch-radius":typeof f<"u"?V1(f):void 0}})),vi=nh((d,h)=>{const g=Vs("CodeHighlight",pg,d),{classNames:f,className:x,style:A,styles:R,unstyled:C,vars:B,code:j,copiedLabel:E,copyLabel:O,defaultExpanded:D,expanded:k,onExpandedChange:$,maxCollapsedHeight:il,withCopyButton:w,withExpandButton:K,expandCodeLabel:J,collapseCodeLabel:Y,radius:dl,background:Ul,withBorder:Ll,controls:ql,language:Vl,codeColorScheme:Il,__withOffset:Oe,__inline:ie,__staticSelector:Cl,attributes:Pl,...me}=g,bl=uh({name:Cl||"CodeHighlight",classes:hi,props:g,className:x,style:A,classNames:f,styles:R,unstyled:C,attributes:Pl,vars:B,varsResolver:bg,rootSelector:"codeHighlight"}),[S,U]=Ns({value:k,defaultValue:D,finalValue:!0,onChange:$}),G=ql&&ql.length>0||K||w,Q=X1(),F=gg()({code:j.trim(),language:Vl,colorScheme:Q}),ll=F.isHighlighted?{dangerouslySetInnerHTML:{__html:F.highlightedCode}}:{children:j.trim()};return ie?c.jsx(Kn,{component:"code",ref:h,...me,...F.codeElementProps,...bl("codeHighlight",{className:Q1(F.codeElementProps?.className,x),style:[{...F.codeElementProps?.style},A]}),"data-with-border":Ll||void 0,...ll}):c.jsx(mg,{value:{getStyles:bl,codeColorScheme:Il},children:c.jsxs(Kn,{ref:h,...bl("codeHighlight"),...me,dir:"ltr","data-code-color-scheme":Il,"data-with-border":Ll||void 0,children:[G&&c.jsxs("div",{...bl("controls"),"data-with-offset":Oe||void 0,children:[ql,K&&c.jsx(hh,{expanded:S,onExpand:U,expandCodeLabel:J,collapseCodeLabel:Y}),w&&c.jsx(dh,{code:j,copiedLabel:E,copyLabel:O})]}),c.jsx(di,{type:"hover",scrollbarSize:4,dir:"ltr",offsetScrollbars:!1,"data-collapsed":!S||void 0,...bl("scrollarea"),children:c.jsx("pre",{...bl("pre"),"data-with-offset":Oe||void 0,children:c.jsx("code",{...F.codeElementProps,...bl("code",{className:F.codeElementProps?.className,style:F.codeElementProps?.style}),...ll})})}),c.jsx(ih,{...bl("showCodeButton"),mod:{hidden:S},onClick:()=>U(!0),"data-code-color-scheme":Il,children:J})]})})});vi.displayName="@mantine/code-highlight/CodeHighlight";vi.classes=hi;vi.Control=ri;function xg({fileIcon:d,fileName:h,getFileIcon:g,className:f,style:x}){return d?c.jsx("span",{className:f,style:x,children:d}):g&&h?c.jsx("span",{className:f,style:x,children:g(h)}):null}const Ks=nh((d,h)=>{const g=Vs("CodeHighlightTabs",null,d),{classNames:f,className:x,style:A,styles:R,unstyled:C,vars:B,defaultActiveTab:j,activeTab:E,onTabChange:O,defaultExpanded:D,expanded:k,onExpandedChange:$,code:il,getFileIcon:w,withCopyButton:K,withExpandButton:J,withBorder:Y,radius:dl,maxCollapsedHeight:Ul,copyLabel:Ll,copiedLabel:ql,expandCodeLabel:Vl,collapseCodeLabel:Il,background:Oe,controls:ie,codeColorScheme:Cl,attributes:Pl,...me}=g,bl=uh({name:"CodeHighlightTabs",classes:hi,props:g,className:x,style:A,classNames:f,styles:R,unstyled:C,attributes:Pl,vars:B}),[S,U]=Ns({defaultValue:j,value:E,finalValue:0,onChange:O}),[G,Q]=Ns({defaultValue:D,value:k,finalValue:!0,onChange:$}),{resolvedClassNames:al,resolvedStyles:F}=K1({classNames:f,styles:R,props:g});if(zl.useEffect(()=>{S>=il.length&&U(il.length-1)},[S,il]),il.length<=0)return null;const ll=il[S]||{code:"",language:"tsx"},W=il.map((jl,Bl)=>zl.createElement(ih,{...bl("file"),key:jl.fileName,mod:{active:Bl===S},onClick:()=>U(Bl),"data-color-scheme":Cl},c.jsx(xg,{fileIcon:jl.icon,getFileIcon:w,fileName:jl.fileName,...bl("fileIcon")},"file-icon"),c.jsx("span",{children:jl.fileName},"file-name")));return c.jsxs(Kn,{ref:h,...bl("root"),...me,children:[c.jsx(di,{type:"never",dir:"ltr",offsetScrollbars:!1,...bl("filesScrollarea"),children:c.jsx("div",{...bl("files"),children:W})}),c.jsx(vi,{code:ll.code,language:ll.language,expanded:G,onExpandedChange:Q,withCopyButton:K,withExpandButton:J,withBorder:Y,radius:dl,maxCollapsedHeight:Ul,copiedLabel:ql,copyLabel:Ll,expandCodeLabel:Vl,collapseCodeLabel:Il,background:Oe,controls:ie,codeColorScheme:Cl,__withOffset:!0,__staticSelector:"CodeHighlightTabs",classNames:al,styles:F,attributes:Pl})]})});Ks.displayName="@mantine/code-highlight/CodeHighlightTabs";Ks.classes=hi;function Sg(){return window.location.hostname==="siva-sub.github.io"?"/client-ocr":""}function sl(d){return`${Sg()}${d}`}const jg=[{id:"ppocrv5-mobile",name:"PaddleOCR v5 Mobile",description:"Latest mobile model - Fast inference, good accuracy",type:"mobile",version:"v5",paths:{detection:sl("/models/ppocrv5/det.onnx"),recognition:sl("/models/ppocrv5/rec.onnx"),classification:sl("/models/ppocrv5/cls.onnx"),dictionary:sl("/models/ppocrv5/dict.txt")},sizes:{detection:"4.6MB",recognition:"16MB",classification:"570KB"},accuracy:"high",speed:"fast",languages:["en","zh"]},{id:"ppocrv5-server",name:"PaddleOCR v5 Server Multilingual",description:"High accuracy server model with multilingual support (Chinese, English, Korean, Japanese, etc.)",type:"server",version:"v5",paths:{detection:sl("/models/ppocrv5-server/det/det.onnx"),recognition:sl("/models/ppocrv5-server/rec/rec.onnx"),classification:sl("/models/ppocrv5-server/cls/cls.onnx"),dictionary:sl("/models/ppocrv5-server/ppocrv5_dict.txt")},sizes:{detection:"4.6MB",recognition:"16MB",classification:"570KB"},accuracy:"very-high",speed:"medium",languages:["zh","en","ko","ja","multilingual"]},{id:"ppocrv4-mobile",name:"PaddleOCR v4 Mobile",description:"Stable mobile model - Balanced performance",type:"mobile",version:"v4",paths:{detection:sl("/models/ppocrv4/det.onnx"),recognition:sl("/models/ppocrv4/rec.onnx"),classification:sl("/models/ppocrv4/cls.onnx"),dictionary:sl("/models/ppocrv4/dict.txt")},sizes:{detection:"4.6MB",recognition:"10.8MB",classification:"583KB"},accuracy:"medium",speed:"fast",languages:["en","zh"]},{id:"ch-server-v2",name:"Chinese Server v2.0",description:"High accuracy server model optimized for Chinese text",type:"server",version:"v2",paths:{detection:sl("/models/ch-server-v2/det/det.onnx"),recognition:sl("/models/ppocrv5-server/rec/rec.onnx"),classification:sl("/models/ch-server-v2/cls/cls.onnx"),dictionary:sl("/models/ch-server-v2/ppocr_keys_v1.txt")},sizes:{detection:"47MB",recognition:"16MB",classification:"570KB"},accuracy:"very-high",speed:"slow",languages:["zh","en"]},{id:"en-ppocr-v4",name:"English Optimized v4",description:"PPOCRv4 recognition model optimized specifically for English text",type:"mobile",version:"v5/v4",paths:{detection:sl("/models/en-ppocr-v4/det.onnx"),recognition:sl("/models/en-ppocr-v4/rec.onnx"),classification:sl("/models/en-ppocr-v4/cls.onnx"),dictionary:sl("/models/en-ppocr-v4/dict.txt")},sizes:{detection:"4.6MB",recognition:"7.4MB",classification:"570KB"},accuracy:"high",speed:"very-fast",languages:["en"]},{id:"ppocrv2-server",name:"PaddleOCR v2 Server (Detection Only)",description:"High accuracy server model for text detection - No recognition model available",type:"server",version:"v2",paths:{detection:sl("/models/ppocrv2-server/det.onnx"),recognition:sl("/models/ppocrv4/rec.onnx"),classification:sl("/models/ppocrv2-server/cls.onnx"),dictionary:sl("/models/ppocrv2-server/dict.txt")},sizes:{detection:"47MB",recognition:"10.8MB (v4)",classification:"583KB"},accuracy:"very-high",speed:"slow",languages:["zh"]},{id:"en-mobile",name:"English Mobile (v5 det + v4 rec)",description:"Optimized for English text - Very fast",type:"mobile",version:"v5/v4",paths:{detection:sl("/models/en-mobile/det.onnx"),recognition:sl("/models/en-mobile/rec.onnx"),classification:sl("/models/en-mobile/cls.onnx"),dictionary:sl("/models/en-mobile/dict.txt")},sizes:{detection:"4.7MB",recognition:"8.6MB",classification:"583KB"},accuracy:"medium",speed:"very-fast",languages:["en"]},{id:"en-ppu-v4",name:"English PPU v4 (Official)",description:"Official English PP-OCRv4 mobile model from PaddleOCR",type:"mobile",version:"v4",paths:{detection:sl("/models/en-mobile/det.onnx"),recognition:sl("/models/en-mobile/rec-ppu.onnx"),classification:sl("/models/en-mobile/cls.onnx"),dictionary:sl("/models/en-mobile/dict.txt")},sizes:{detection:"4.7MB",recognition:"7.4MB",classification:"583KB"},accuracy:"high",speed:"fast",languages:["en"]}];function zg(d){return jg.find(h=>h.id===d)}function Mg({result:d,modelId:h}){const g=h?zg(h):null,f={regions:d.regions?.map(A=>({text:A.text,confidence:Math.round(A.confidence*100)+"%",position:{x:Math.round(A.box.topLeft.x),y:Math.round(A.box.topLeft.y),width:Math.round(A.box.topRight.x-A.box.topLeft.x),height:Math.round(A.box.bottomLeft.y-A.box.topLeft.y)}}))||[],metadata:d.metadata},x=JSON.stringify(f,null,2);return c.jsx(Ga,{p:"md",withBorder:!0,children:c.jsxs(Sl,{gap:"md",children:[c.jsxs(pl,{justify:"space-between",align:"center",children:[c.jsx(ws,{order:3,children:"OCR Results"}),c.jsxs(pl,{gap:"xs",children:[g&&c.jsx(wl,{variant:"light",color:"grape",children:g.name}),c.jsx(wl,{color:d.method==="onnx"?"green":"blue",children:d.method.toUpperCase()}),c.jsxs(wl,{variant:"light",children:[d.regions?.length||0," regions"]})]})]}),c.jsxs(Sl,{gap:"sm",children:[c.jsxs(pl,{justify:"space-between",align:"center",children:[c.jsx(V,{fw:500,children:"Extracted Text"}),c.jsx(k1,{value:d.fullText,timeout:2e3,children:({copied:A,copy:R})=>c.jsx(Re,{label:A?"Copied":"Copy",withArrow:!0,position:"right",children:c.jsx(Ee,{color:A?"teal":"gray",variant:"subtle",onClick:R,children:A?c.jsx(Ov,{size:16}):c.jsx(Nv,{size:16})})})})]}),c.jsx(Ga,{p:"sm",bg:"gray.0",withBorder:!0,children:c.jsx(V,{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:d.fullText||"No text detected"})})]}),c.jsx(Ks,{code:[{fileName:"structured-data.json",code:x,language:"json"},{fileName:"raw-text.txt",code:d.fullText||"No text detected",language:"text"}]}),d.metadata?.deskewAngle&&Math.abs(d.metadata.deskewAngle)>.5&&c.jsx(Ga,{p:"sm",bg:"blue.0",withBorder:!0,children:c.jsxs(V,{size:"sm",c:"blue.7",children:["Image was automatically deskewed by ",d.metadata.deskewAngle.toFixed(1),"°"]})})]})})}function Tg({options:d,onChange:h,onPreview:g,onAuto:f,isProcessing:x=!1}){const[A,R]=zl.useState(!1),C=(j,E)=>{h({...d,[j]:E})},B=Object.entries(d).filter(([j,E])=>typeof E=="boolean"?E:j==="scale"?E!==1:!1).length;return c.jsx(Ae,{radius:"md",withBorder:!0,children:c.jsxs(Sl,{gap:"md",children:[c.jsxs(pl,{justify:"space-between",children:[c.jsxs(pl,{gap:"xs",children:[c.jsx(Zs,{size:20}),c.jsx(V,{fw:500,children:"Preprocessing"}),B>0&&c.jsxs(wl,{size:"sm",variant:"filled",children:[B," active"]})]}),c.jsxs(pl,{gap:"xs",children:[f&&c.jsx(Re,{label:"Auto-detect best settings",children:c.jsx(Ee,{variant:"light",onClick:f,disabled:x,children:c.jsx(og,{size:16})})}),g&&c.jsx(Re,{label:"Preview processed image",children:c.jsx(Ee,{variant:"light",onClick:g,disabled:x,children:c.jsx(Qv,{size:16})})}),c.jsx(Ee,{variant:"subtle",onClick:()=>R(!A),children:A?c.jsx(_v,{size:16}):c.jsx(Uv,{size:16})})]})]}),c.jsx(J1,{in:A,children:c.jsxs(Sl,{gap:"md",children:[c.jsxs("div",{children:[c.jsx(V,{size:"sm",fw:500,mb:"xs",children:"Basic Enhancements"}),c.jsxs(Sl,{gap:"xs",children:[c.jsx(Ft,{label:"Convert to Grayscale",checked:d.grayscale??!0,onChange:j=>C("grayscale",j.currentTarget.checked)}),c.jsx(Ft,{label:"Remove Noise",checked:d.denoise??!1,onChange:j=>C("denoise",j.currentTarget.checked)}),d.denoise&&c.jsx(Xn,{label:"Noise Reduction Strength",value:d.denoiseStrength??10,onChange:j=>C("denoiseStrength",j),min:1,max:30,marks:[{value:5,label:"Light"},{value:15,label:"Medium"},{value:25,label:"Strong"}],ml:"md",mb:"sm"}),c.jsx(Ft,{label:"Enhance Contrast",checked:d.contrast??!1,onChange:j=>C("contrast",j.currentTarget.checked)}),d.contrast&&c.jsxs(c.Fragment,{children:[c.jsx(Xn,{label:"Contrast Level",value:d.contrastAlpha??1.5,onChange:j=>C("contrastAlpha",j),min:.5,max:3,step:.1,marks:[{value:1,label:"Normal"},{value:2,label:"High"}],ml:"md"}),c.jsx(Xn,{label:"Brightness",value:d.contrastBeta??0,onChange:j=>C("contrastBeta",j),min:-50,max:50,marks:[{value:-25,label:"Darker"},{value:0,label:"Normal"},{value:25,label:"Brighter"}],ml:"md",mb:"sm"})]}),c.jsx(Ft,{label:"Sharpen Image",checked:d.sharpen??!1,onChange:j=>C("sharpen",j.currentTarget.checked)})]})]}),c.jsx(oi,{}),c.jsxs("div",{children:[c.jsx(V,{size:"sm",fw:500,mb:"xs",children:"Advanced Options"}),c.jsxs(Sl,{gap:"xs",children:[c.jsx(Ft,{label:"Binary Threshold",checked:d.threshold??!1,onChange:j=>C("threshold",j.currentTarget.checked),description:"Convert to pure black and white"}),d.threshold&&c.jsx(Xn,{label:"Threshold Value",value:d.thresholdValue??127,onChange:j=>C("thresholdValue",j),min:0,max:255,marks:[{value:64,label:"Dark"},{value:127,label:"Mid"},{value:192,label:"Light"}],ml:"md",mb:"sm"}),c.jsx(Ft,{label:"Auto-Deskew",checked:d.deskew??!1,onChange:j=>C("deskew",j.currentTarget.checked),description:"Automatically straighten tilted text"}),c.jsx(Ft,{label:"Remove Background",checked:d.removeBackground??!1,onChange:j=>C("removeBackground",j.currentTarget.checked),description:"Simple background removal"})]})]}),c.jsx(oi,{}),c.jsxs("div",{children:[c.jsx(V,{size:"sm",fw:500,mb:"xs",children:"Image Scale"}),c.jsx(Xn,{value:d.scale??1,onChange:j=>C("scale",j),min:.5,max:2,step:.1,marks:[{value:.5,label:"50%"},{value:1,label:"100%"},{value:1.5,label:"150%"},{value:2,label:"200%"}],mb:"sm"})]}),c.jsx(pl,{justify:"flex-end",children:c.jsx(Ct,{variant:"subtle",size:"xs",leftSection:c.jsx(eg,{size:14}),onClick:()=>h({}),children:"Reset All"})})]})})]})})}function Ag({metrics:d,progress:h,isProcessing:g}){const[f,x]=zl.useState({memory:0,cpu:0});if(zl.useEffect(()=>{if(g){const C=setInterval(()=>{x({memory:performance.memory?Math.round(performance.memory.usedJSHeapSize/performance.memory.totalJSHeapSize*100):Math.random()*30+40,cpu:Math.random()*20+30})},500);return()=>clearInterval(C)}},[g]),!d&&!g)return c.jsx(Ae,{p:"xl",withBorder:!0,children:c.jsxs(Sl,{align:"center",gap:"md",children:[c.jsx(Qn,{size:"xl",variant:"light",color:"gray",children:c.jsx(Ys,{size:32})}),c.jsx(V,{c:"dimmed",ta:"center",children:"Performance metrics will appear here after processing"})]})});const A=d?Math.min(100,Math.round(1e3/d.totalTime*100)):0,R=A>70?"green":A>40?"yellow":"red";return c.jsx(Ga,{withBorder:!0,children:c.jsxs($l,{defaultValue:"overview",children:[c.jsxs($l.List,{children:[c.jsx($l.Tab,{value:"overview",leftSection:c.jsx(Ys,{size:16}),children:"Overview"}),c.jsx($l.Tab,{value:"timing",leftSection:c.jsx(Wr,{size:16}),children:"Timing"}),c.jsx($l.Tab,{value:"details",leftSection:c.jsx(wv,{size:16}),children:"Details"})]}),c.jsx($l.Panel,{value:"overview",p:"md",children:c.jsxs(Sl,{gap:"md",children:[g&&h&&c.jsx(Ae,{withBorder:!0,children:c.jsxs(Sl,{gap:"sm",children:[c.jsxs(pl,{justify:"space-between",children:[c.jsx(V,{fw:500,children:"Processing Progress"}),c.jsx(wl,{color:"blue",variant:"dot",children:h.stage})]}),c.jsx(at,{value:h.progress*100,animated:!0,color:"blue"}),c.jsxs(V,{size:"sm",ta:"center",c:"dimmed",children:[Math.round(h.progress*100),"%"]})]})}),d&&c.jsxs(Zn,{cols:{base:1,sm:2},spacing:"md",children:[c.jsx(Ae,{withBorder:!0,children:c.jsxs(Sl,{align:"center",gap:"md",children:[c.jsx(V,{fw:500,children:"Performance Score"}),c.jsx(W1,{size:120,thickness:12,sections:[{value:A,color:R}],label:c.jsxs(V,{ta:"center",fw:700,size:"xl",children:[A,"%"]})}),c.jsx(wl,{color:R,variant:"light",children:A>70?"Excellent":A>40?"Good":"Needs Optimization"})]})}),c.jsx(Ae,{withBorder:!0,children:c.jsxs(Sl,{gap:"sm",children:[c.jsx(V,{fw:500,children:"Key Metrics"}),c.jsxs(Zn,{cols:2,spacing:"xs",children:[c.jsxs(pl,{gap:"xs",children:[c.jsx(Qn,{size:"sm",variant:"light",children:c.jsx(Wr,{size:14})}),c.jsxs("div",{children:[c.jsx(V,{size:"xs",c:"dimmed",children:"Total Time"}),c.jsxs(V,{fw:500,children:[d.totalTime,"ms"]})]})]}),c.jsxs(pl,{gap:"xs",children:[c.jsx(Qn,{size:"sm",variant:"light",children:c.jsx(kn,{size:14})}),c.jsxs("div",{children:[c.jsx(V,{size:"xs",c:"dimmed",children:"Text Regions"}),c.jsx(V,{fw:500,children:d.textRegions})]})]}),c.jsxs(pl,{gap:"xs",children:[c.jsx(Qn,{size:"sm",variant:"light",children:c.jsx(rg,{size:14})}),c.jsxs("div",{children:[c.jsx(V,{size:"xs",c:"dimmed",children:"Avg Confidence"}),c.jsxs(V,{fw:500,children:[Math.round(d.averageConfidence*100),"%"]})]})]}),c.jsxs(pl,{gap:"xs",children:[c.jsx(Qn,{size:"sm",variant:"light",children:c.jsx(Gs,{size:14})}),c.jsxs("div",{children:[c.jsx(V,{size:"xs",c:"dimmed",children:"Image Size"}),c.jsxs(V,{fw:500,children:[d.imageWidth,"×",d.imageHeight]})]})]})]})]})})]}),g&&c.jsx(Ae,{withBorder:!0,children:c.jsxs(Sl,{gap:"sm",children:[c.jsx(V,{fw:500,children:"System Resources"}),c.jsxs(Zn,{cols:2,spacing:"md",children:[c.jsxs("div",{children:[c.jsxs(pl,{justify:"space-between",mb:4,children:[c.jsx(V,{size:"sm",c:"dimmed",children:"Memory Usage"}),c.jsxs(V,{size:"sm",fw:500,children:[f.memory,"%"]})]}),c.jsx(at,{value:f.memory,color:"blue"})]}),c.jsxs("div",{children:[c.jsxs(pl,{justify:"space-between",mb:4,children:[c.jsx(V,{size:"sm",c:"dimmed",children:"CPU Usage"}),c.jsxs(V,{size:"sm",fw:500,children:[f.cpu,"%"]})]}),c.jsx(at,{value:f.cpu,color:"orange"})]})]})]})})]})}),c.jsx($l.Panel,{value:"timing",p:"md",children:d&&c.jsxs(Sl,{gap:"md",children:[c.jsxs(qa,{active:-1,bulletSize:24,lineWidth:2,children:[c.jsx(qa.Item,{bullet:c.jsx(Zs,{size:12}),title:"Preprocessing",color:d.preprocessingTime?"blue":"gray",children:c.jsxs(V,{c:"dimmed",size:"sm",children:[d.preprocessingTime||0,"ms",d.preprocessingApplied&&d.preprocessingApplied.length>0&&c.jsxs(V,{size:"xs",c:"dimmed",children:["Applied: ",d.preprocessingApplied.join(", ")]})]})}),c.jsx(qa.Item,{bullet:c.jsx(Gs,{size:12}),title:"Text Detection",color:"blue",children:c.jsxs(V,{c:"dimmed",size:"sm",children:[d.detectionTime,"ms - Found ",d.textRegions," regions"]})}),c.jsx(qa.Item,{bullet:c.jsx(sh,{size:12}),title:"Orientation Classification",color:"blue",children:c.jsxs(V,{c:"dimmed",size:"sm",children:[d.classificationTime,"ms"]})}),c.jsx(qa.Item,{bullet:c.jsx(Wv,{size:12}),title:"Text Recognition",color:"blue",children:c.jsxs(V,{c:"dimmed",size:"sm",children:[d.recognitionTime,"ms - ",d.totalCharacters," characters"]})}),c.jsx(qa.Item,{bullet:c.jsx(kn,{size:12}),title:"Post-processing",color:d.postprocessingTime?"blue":"gray",children:c.jsxs(V,{c:"dimmed",size:"sm",children:[d.postprocessingTime||0,"ms"]})})]}),c.jsx(oi,{}),c.jsxs(Zn,{cols:2,spacing:"md",children:[c.jsx(Ae,{withBorder:!0,children:c.jsxs(Sl,{gap:"xs",children:[c.jsx(V,{fw:500,size:"sm",children:"Processing Breakdown"}),c.jsxs(at.Root,{size:"xl",children:[c.jsx(Re,{label:`Detection: ${d.detectionTime}ms`,children:c.jsx(at.Section,{value:d.detectionTime/d.totalTime*100,color:"cyan"})}),c.jsx(Re,{label:`Classification: ${d.classificationTime}ms`,children:c.jsx(at.Section,{value:d.classificationTime/d.totalTime*100,color:"blue"})}),c.jsx(Re,{label:`Recognition: ${d.recognitionTime}ms`,children:c.jsx(at.Section,{value:d.recognitionTime/d.totalTime*100,color:"indigo"})})]})]})}),c.jsx(Ae,{withBorder:!0,children:c.jsxs(Sl,{gap:"xs",children:[c.jsx(V,{fw:500,size:"sm",children:"Speed Metrics"}),c.jsxs(V,{size:"xs",c:"dimmed",children:["Characters/second: ",Math.round(d.totalCharacters/d.totalTime*1e3)]}),c.jsxs(V,{size:"xs",c:"dimmed",children:["Regions/second: ",Math.round(d.textRegions/d.totalTime*1e3)]}),c.jsxs(V,{size:"xs",c:"dimmed",children:["Pixels/ms: ",Math.round(d.pixelCount/d.totalTime)]})]})})]})]})}),c.jsx($l.Panel,{value:"details",p:"md",children:d&&c.jsx(di,{h:400,children:c.jsxs(nl,{striped:!0,highlightOnHover:!0,children:[c.jsx(nl.Thead,{children:c.jsxs(nl.Tr,{children:[c.jsx(nl.Th,{children:"Metric"}),c.jsx(nl.Th,{children:"Value"})]})}),c.jsxs(nl.Tbody,{children:[c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Language"}),c.jsx(nl.Td,{children:c.jsx(wl,{variant:"light",children:d.language})})]}),c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Model Version"}),c.jsx(nl.Td,{children:d.modelVersion})]}),c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Model Type"}),c.jsx(nl.Td,{children:d.modelType})]}),c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Image Dimensions"}),c.jsxs(nl.Td,{children:[d.imageWidth," × ",d.imageHeight,"px"]})]}),c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Total Pixels"}),c.jsx(nl.Td,{children:d.pixelCount.toLocaleString()})]}),c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Text Regions"}),c.jsx(nl.Td,{children:d.textRegions})]}),c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Total Characters"}),c.jsx(nl.Td,{children:d.totalCharacters})]}),c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Average Confidence"}),c.jsxs(nl.Td,{children:[(d.averageConfidence*100).toFixed(2),"%"]})]}),c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Cache Hit"}),c.jsx(nl.Td,{children:c.jsx(wl,{color:d.cacheHit?"green":"gray",children:d.cacheHit?"Yes":"No"})})]}),d.preprocessingApplied&&c.jsxs(nl.Tr,{children:[c.jsx(nl.Td,{children:"Preprocessing"}),c.jsx(nl.Td,{children:d.preprocessingApplied.join(", ")})]})]})]})})})]})})}function Eg({value:d,onChange:h,supportedLanguages:g,...f}){const x=Ls("(max-width: 768px)"),A=ch.getAvailableLanguages(),R=g?A.filter(O=>g.includes(O.code)):A,C=["en","ch","ja","ko","es","fr","de","ta"],B=O=>C.includes(O),E=[{group:"Popular",items:R.filter(O=>B(O.code))},{group:"Latin Scripts",items:R.filter(O=>["en","latin","fr","de","es","it","pt"].includes(O.code)&&!B(O.code))},{group:"East Asian",items:R.filter(O=>["ch","chinese_cht","ja","ko"].includes(O.code)&&!B(O.code))},{group:"South Asian",items:R.filter(O=>["devanagari","ta","te","ka"].includes(O.code)&&!B(O.code))},{group:"Middle Eastern",items:R.filter(O=>["arabic","fa"].includes(O.code)&&!B(O.code))},{group:"Cyrillic",items:R.filter(O=>["cyrillic","eslav","ru"].includes(O.code)&&!B(O.code))},{group:"Others",items:R.filter(O=>["id","vi"].includes(O.code)&&!B(O.code))}].filter(O=>O.items.length>0).map(O=>({group:O.group,items:O.items.map(D=>({value:D.code,label:D.name,rightSection:D.code==="ta"?c.jsx(wl,{size:"xs",variant:"light",children:"Tamil"}):D.code==="en"?c.jsx(wl,{size:"xs",variant:"light",color:"green",children:"Default"}):void 0}))}));return c.jsx(qs,{label:x?"Language":"OCR Language",description:x?void 0:"Select OCR language for better accuracy",placeholder:"Choose language",value:d,onChange:O=>O&&h(O),data:E,searchable:!0,size:x?"sm":"md",comboboxProps:{transitionProps:{transition:"scale-y",duration:200},dropdownPadding:x?5:10},...f})}try{self["workbox:window:7.2.0"]&&_()}catch{}function lh(d,h){return new Promise(function(g){var f=new MessageChannel;f.port1.onmessage=function(x){g(x.data)},d.postMessage(h,[f.port2])})}function Og(d){var h=function(g,f){if(typeof g!="object"||!g)return g;var x=g[Symbol.toPrimitive];if(x!==void 0){var A=x.call(g,f);if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}(d,"string");return typeof h=="symbol"?h:h+""}function Dg(d,h){for(var g=0;g<h.length;g++){var f=h[g];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(d,Og(f.key),f)}}function Qs(d,h){return Qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,f){return g.__proto__=f,g},Qs(d,h)}function eh(d,h){(h==null||h>d.length)&&(h=d.length);for(var g=0,f=new Array(h);g<h;g++)f[g]=d[g];return f}function Ug(d,h){var g=typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(g)return(g=g.call(d)).next.bind(g);if(Array.isArray(d)||(g=function(x,A){if(x){if(typeof x=="string")return eh(x,A);var R=Object.prototype.toString.call(x).slice(8,-1);return R==="Object"&&x.constructor&&(R=x.constructor.name),R==="Map"||R==="Set"?Array.from(x):R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R)?eh(x,A):void 0}}(d))||h){g&&(d=g);var f=0;return function(){return f>=d.length?{done:!0}:{done:!1,value:d[f++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}try{self["workbox:core:7.2.0"]&&_()}catch{}var _s=function(){var d=this;this.promise=new Promise(function(h,g){d.resolve=h,d.reject=g})};function Rs(d,h){var g=location.href;return new URL(d,g).href===new URL(h,g).href}var Vn=function(d,h){this.type=d,Object.assign(this,h)};function Dt(d,h,g){return g?h?h(d):d:(d&&d.then||(d=Promise.resolve(d)),h?d.then(h):d)}function Cg(){}var _g={type:"SKIP_WAITING"};function th(d,h){return d&&d.then?d.then(Cg):Promise.resolve()}(function(d){function h(C,B){var j,E;return B===void 0&&(B={}),(j=d.call(this)||this).nn={},j.tn=0,j.rn=new _s,j.en=new _s,j.on=new _s,j.un=0,j.an=new Set,j.cn=function(){var O=j.fn,D=O.installing;j.tn>0||!Rs(D.scriptURL,j.sn.toString())||performance.now()>j.un+6e4?(j.vn=D,O.removeEventListener("updatefound",j.cn)):(j.hn=D,j.an.add(D),j.rn.resolve(D)),++j.tn,D.addEventListener("statechange",j.ln)},j.ln=function(O){var D=j.fn,k=O.target,$=k.state,il=k===j.vn,w={sw:k,isExternal:il,originalEvent:O};!il&&j.mn&&(w.isUpdate=!0),j.dispatchEvent(new Vn($,w)),$==="installed"?j.wn=self.setTimeout(function(){$==="installed"&&D.waiting===k&&j.dispatchEvent(new Vn("waiting",w))},200):$==="activating"&&(clearTimeout(j.wn),il||j.en.resolve(k))},j.yn=function(O){var D=j.hn,k=D!==navigator.serviceWorker.controller;j.dispatchEvent(new Vn("controlling",{isExternal:k,originalEvent:O,sw:D,isUpdate:j.mn})),k||j.on.resolve(D)},j.gn=(E=function(O){var D=O.data,k=O.ports,$=O.source;return Dt(j.getSW(),function(){j.an.has($)&&j.dispatchEvent(new Vn("message",{data:D,originalEvent:O,ports:k,sw:$}))})},function(){for(var O=[],D=0;D<arguments.length;D++)O[D]=arguments[D];try{return Promise.resolve(E.apply(this,O))}catch(k){return Promise.reject(k)}}),j.sn=C,j.nn=B,navigator.serviceWorker.addEventListener("message",j.gn),j}var g,f;f=d,(g=h).prototype=Object.create(f.prototype),g.prototype.constructor=g,Qs(g,f);var x,A,R=h.prototype;return R.register=function(C){var B=(C===void 0?{}:C).immediate,j=B!==void 0&&B;try{var E=this;return Dt(function(O,D){var k=O();return k&&k.then?k.then(D):D(k)}(function(){if(!j&&document.readyState!=="complete")return th(new Promise(function(O){return window.addEventListener("load",O)}))},function(){return E.mn=!!navigator.serviceWorker.controller,E.dn=E.pn(),Dt(E.bn(),function(O){E.fn=O,E.dn&&(E.hn=E.dn,E.en.resolve(E.dn),E.on.resolve(E.dn),E.dn.addEventListener("statechange",E.ln,{once:!0}));var D=E.fn.waiting;return D&&Rs(D.scriptURL,E.sn.toString())&&(E.hn=D,Promise.resolve().then(function(){E.dispatchEvent(new Vn("waiting",{sw:D,wasWaitingBeforeRegister:!0}))}).then(function(){})),E.hn&&(E.rn.resolve(E.hn),E.an.add(E.hn)),E.fn.addEventListener("updatefound",E.cn),navigator.serviceWorker.addEventListener("controllerchange",E.yn),E.fn})}))}catch(O){return Promise.reject(O)}},R.update=function(){try{return this.fn?Dt(th(this.fn.update())):Dt()}catch(C){return Promise.reject(C)}},R.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},R.messageSW=function(C){try{return Dt(this.getSW(),function(B){return lh(B,C)})}catch(B){return Promise.reject(B)}},R.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&lh(this.fn.waiting,_g)},R.pn=function(){var C=navigator.serviceWorker.controller;return C&&Rs(C.scriptURL,this.sn.toString())?C:void 0},R.bn=function(){try{var C=this;return Dt(function(B,j){try{var E=B()}catch(O){return j(O)}return E&&E.then?E.then(void 0,j):E}(function(){return Dt(navigator.serviceWorker.register(C.sn,C.nn),function(B){return C.un=performance.now(),B})},function(B){throw B}))}catch(B){return Promise.reject(B)}},x=h,(A=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&Dg(x.prototype,A),Object.defineProperty(x,"prototype",{writable:!1}),x})(function(){function d(){this.Pn=new Map}var h=d.prototype;return h.addEventListener=function(g,f){this.jn(g).add(f)},h.removeEventListener=function(g,f){this.jn(g).delete(f)},h.dispatchEvent=function(g){g.target=this;for(var f,x=Ug(this.jn(g.type));!(f=x()).done;)(0,f.value)(g)},h.jn=function(g){return this.Pn.has(g)||this.Pn.set(g,new Set),this.Pn.get(g)},d}());let ks=null;window.addEventListener("beforeinstallprompt",d=>{d.preventDefault(),ks=d});function Rg(){return ks}function Bg(){ks=null}function Ng(){const[d,h]=zl.useState(!1),[g,f]=zl.useState(null),x=Ls("(max-width: 768px)");zl.useEffect(()=>{const C=()=>{const j=Rg();j&&(f(j),h(!0))};C();const B=setInterval(C,1e3);return"standalone"in window.navigator&&window.navigator.standalone&&h(!1),()=>clearInterval(B)},[]);const A=async()=>{if(!g)return;g.prompt();const{outcome:C}=await g.userChoice;C==="accepted"&&(console.log("User accepted the install prompt"),"gtag"in window&&window.gtag("event","pwa_install",{event_category:"engagement",event_label:"installed"})),Bg(),h(!1),f(null)},R=()=>{h(!1)};return x?c.jsx(Bs,{mounted:d,transition:"slide-up",duration:400,children:C=>c.jsx(Ga,{style:{...C,position:"fixed",bottom:0,left:0,right:0,zIndex:1e3,borderRadius:"16px 16px 0 0"},p:"md",shadow:"xl",bg:"blue.0",children:c.jsxs(Sl,{gap:"sm",children:[c.jsxs($1,{justify:"space-between",align:"flex-start",children:[c.jsx(Yv,{size:32,color:"var(--mantine-color-blue-6)"}),c.jsx(F1,{onClick:R})]}),c.jsxs("div",{children:[c.jsx(V,{fw:600,size:"lg",children:"Install Client OCR"}),c.jsx(V,{size:"sm",c:"dimmed",mt:4,children:"Add to your home screen for instant access, offline support, and a native app experience"})]}),c.jsx(pl,{gap:"xs",mt:"xs",children:c.jsx(Ct,{variant:"filled",size:"md",leftSection:c.jsx($r,{size:18}),onClick:A,fullWidth:!0,children:"Install App"})})]})})}):c.jsx(Bs,{mounted:d,transition:"slide-down",duration:400,children:C=>c.jsx(Ga,{style:C,p:"lg",withBorder:!0,shadow:"md",radius:"md",bg:"blue.0",children:c.jsxs(pl,{justify:"space-between",wrap:"nowrap",children:[c.jsxs(pl,{gap:"md",children:[c.jsx(ag,{size:28,color:"var(--mantine-color-blue-6)"}),c.jsxs("div",{children:[c.jsx(V,{fw:600,size:"lg",children:"Install Client OCR"}),c.jsx(V,{size:"sm",c:"dimmed",children:"Install the app for offline access, faster loading, and native features"})]})]}),c.jsxs(pl,{gap:"xs",children:[c.jsx(Ct,{variant:"light",size:"sm",onClick:R,children:"Later"}),c.jsx(Ct,{variant:"filled",size:"sm",leftSection:c.jsx($r,{size:16}),onClick:A,children:"Install Now"})]})]})})})}class Hg{static supportedFormats=["image/jpeg","image/jpg","image/png","image/webp","image/gif","image/bmp","image/tiff","application/pdf"];static async load(h){const g=this.identifyInputType(h);let f;switch(g){case"File":case"Blob":f=await this.loadFromBlob(h);break;case"ArrayBuffer":case"Uint8Array":const A=new Blob([h]);f=await this.loadFromBlob(A);break;case"string":f=await this.loadFromUrl(h);break;case"HTMLImageElement":f=this.loadFromImage(h);break;case"ImageData":f=h;break;default:throw new Error(`Unsupported input type: ${g}`)}const x=this.convertToBGR(f);return{data:x.data,width:x.width,height:x.height,channels:3,originalType:g}}static identifyInputType(h){return h instanceof File?"File":h instanceof Blob?"Blob":h instanceof ArrayBuffer?"ArrayBuffer":h instanceof Uint8Array?"Uint8Array":typeof h=="string"?"string":h instanceof HTMLImageElement?"HTMLImageElement":h instanceof ImageData?"ImageData":"unknown"}static async loadFromBlob(h){if(!this.supportedFormats.includes(h.type))throw new Error(`Unsupported file type: ${h.type}`);if(h.type==="application/pdf")throw new Error("PDF files should be processed with PDFProcessor");return new Promise((g,f)=>{const x=new Image,A=URL.createObjectURL(h);x.onload=()=>{URL.revokeObjectURL(A);const R=this.loadFromImage(x);g(R)},x.onerror=()=>{URL.revokeObjectURL(A),f(new Error("Failed to load image"))},x.src=A})}static async loadFromUrl(h){return new Promise((g,f)=>{const x=new Image;!h.startsWith("data:")&&!h.startsWith("blob:")&&(x.crossOrigin="anonymous"),x.onload=()=>{const A=this.loadFromImage(x);g(A)},x.onerror=()=>{f(new Error("Failed to load image from URL"))},x.src=h})}static loadFromImage(h){const g=document.createElement("canvas");g.width=h.width,g.height=h.height;const f=g.getContext("2d",{willReadFrequently:!0});if(!f)throw new Error("Failed to get canvas context");return f.drawImage(h,0,0),f.getImageData(0,0,h.width,h.height)}static convertToBGR(h){const g=h.data,f=new Uint8ClampedArray(g.length);for(let x=0;x<g.length;x+=4){const A=g[x],R=g[x+1],C=g[x+2],B=g[x+3];if(B===0)f[x]=255,f[x+1]=255,f[x+2]=255;else if(B<255){const j=B/255;f[x]=Math.round(C*j+255*(1-j)),f[x+1]=Math.round(R*j+255*(1-j)),f[x+2]=Math.round(A*j+255*(1-j))}else f[x]=C,f[x+1]=R,f[x+2]=A;f[x+3]=255}return new ImageData(f,h.width,h.height)}static preprocessForOCR(h){const g=h.data;for(let f=0;f<g.length;f+=4){const x=.299*g[f+2]+.587*g[f+1]+.114*g[f];let A;x<100?A=0:x>200?A=255:A=(x-100)/100*255,g[f]=A,g[f+1]=A,g[f+2]=A}return h}static isPDF(h){return h instanceof File?h.type==="application/pdf"||h.name.toLowerCase().endsWith(".pdf"):h instanceof Blob?h.type==="application/pdf":typeof h=="string"?h.toLowerCase().endsWith(".pdf"):!1}}var wg=dv();const N=ov(wg);class ah{static isOpenCVReady(){return typeof N<"u"&&N&&N.Mat&&typeof N.matFromImageData=="function"}static async preprocess(h,g={}){if(!this.isOpenCVReady())return console.warn("OpenCV.js is not loaded. Skipping preprocessing."),h;const{grayscale:f=!0,threshold:x=!1,thresholdValue:A=127,denoise:R=!1,denoiseStrength:C=10,contrast:B=!1,contrastAlpha:j=1.5,contrastBeta:E=0,sharpen:O=!1,deskew:D=!1,removeBackground:k=!1,scale:$=1}=g,il=N.matFromImageData(h);let w=il.clone();try{if($!==1){const Y=new N.Mat,dl=new N.Size(Math.round(il.cols*$),Math.round(il.rows*$));N.resize(w,Y,dl,0,0,N.INTER_LINEAR),w.delete(),w=Y}if(f&&w.channels()>1){const Y=new N.Mat;N.cvtColor(w,Y,N.COLOR_RGBA2GRAY),w.delete(),w=Y}if(R){const Y=new N.Mat,dl=new N.Size(C,C);N.GaussianBlur(w,Y,dl,0),w.delete(),w=Y}if(B){const Y=new N.Mat;w.convertTo(Y,-1,j,E),w.delete(),w=Y}if(O){const Y=this.applySharpen(w);w.delete(),w=Y}if(k){const Y=this.removeSimpleBackground(w);w.delete(),w=Y}if(D){const Y=this.deskewImage(w);w.delete(),w=Y}if(x&&w.channels()===1){const Y=new N.Mat;N.threshold(w,Y,A,255,N.THRESH_BINARY),w.delete(),w=Y}let K=w;w.channels()===1?(K=new N.Mat,N.cvtColor(w,K,N.COLOR_GRAY2RGBA),w.delete()):w.channels()===3&&(K=new N.Mat,N.cvtColor(w,K,N.COLOR_RGB2RGBA),w.delete());const J=new ImageData(new Uint8ClampedArray(K.data),K.cols,K.rows);return K.delete(),il.delete(),J}catch(K){throw w.delete(),il.delete(),K}}static applySharpen(h){const g=new N.Mat,f=N.matFromArray(3,3,N.CV_32FC1,[0,-1,0,-1,5,-1,0,-1,0]);return N.filter2D(h,g,N.CV_8U,f),f.delete(),g}static removeSimpleBackground(h){const g=h.clone(),f=N.getStructuringElement(N.MORPH_RECT,new N.Size(3,3)),x=new N.Mat;return N.morphologyEx(h,x,N.MORPH_OPEN,f),N.subtract(h,x,g),f.delete(),x.delete(),g}static deskewImage(h){let g=h;h.channels()>1&&(g=new N.Mat,N.cvtColor(h,g,N.COLOR_RGB2GRAY));const f=new N.Mat;N.Canny(g,f,50,200);const x=new N.Mat;N.HoughLines(f,x,1,Math.PI/180,100);let A=0,R=0;for(let B=0;B<x.rows;B++){const E=x.data32F[B*2+1]*180/Math.PI-90;Math.abs(E)<10&&(A+=E,R++)}f.delete(),x.delete(),g!==h&&g.delete();const C=R>0?A/R:0;if(Math.abs(C)>.5){const B=new N.Point2f(h.cols/2,h.rows/2),j=N.getRotationMatrix2D(B,C,1),E=new N.Mat,O=new N.Size(h.cols,h.rows);return N.warpAffine(h,E,j,O,N.INTER_LINEAR,N.BORDER_CONSTANT,new N.Scalar(255,255,255,255)),j.delete(),E}return h.clone()}static async autoPreprocess(h){if(!this.isOpenCVReady())return console.warn("OpenCV.js is not loaded. Skipping auto preprocessing."),{processed:h,appliedOptions:{}};const g=this.analyzeImage(h),f={grayscale:!0,denoise:g.isNoisy,contrast:g.lowContrast,contrastAlpha:g.lowContrast?1.5:1,sharpen:g.isBlurry,deskew:g.isSkewed,threshold:g.needsThreshold,thresholdValue:g.optimalThreshold};return{processed:await this.preprocess(h,f),appliedOptions:f}}static analyzeImage(h){if(!this.isOpenCVReady())return{isNoisy:!1,lowContrast:!1,isBlurry:!1,isSkewed:!1,needsThreshold:!1,optimalThreshold:127};const g=N.matFromImageData(h);let f=g;g.channels()>1&&(f=new N.Mat,N.cvtColor(g,f,N.COLOR_RGBA2GRAY));const x=new N.Mat,A=[256],R=[0,256],C=[0],B=new N.Mat,j=new N.MatVector;j.push_back(f),N.calcHist(j,C,B,x,A,R),j.delete(),B.delete();let E=255,O=0;for(let Ul=0;Ul<256;Ul++)x.data32F[Ul]>0&&(Ul<E&&(E=Ul),Ul>O&&(O=Ul));const k=O-E<100,$=N.threshold(f,new N.Mat,0,255,N.THRESH_BINARY|N.THRESH_OTSU),il=!0,w=new N.Mat;N.Laplacian(f,w,N.CV_64F);const K=new N.Mat,J=new N.Mat;N.meanStdDev(w,K,J);const dl=J.data64F[0]*J.data64F[0]<100;return x.delete(),w.delete(),K.delete(),J.delete(),f!==g&&f.delete(),g.delete(),{isNoisy:!1,lowContrast:k,isBlurry:dl,isSkewed:!1,needsThreshold:il,optimalThreshold:$}}}function qg(){const{colorScheme:d,toggleColorScheme:h}=I1(),[g,f]=zl.useState(!1),[x,A]=zl.useState(null),[R,C]=zl.useState(null),[B,j]=zl.useState(null),[E,O]=Ya({key:"ocr-history",defaultValue:[]}),[D,k]=Ya({key:"ocr-language",defaultValue:"en"}),[$,il]=Ya({key:"ocr-version",defaultValue:"PP-OCRv4"}),[w,K]=Ya({key:"ocr-model-type",defaultValue:"mobile"}),[J,Y]=Ya({key:"preprocessing-options",defaultValue:{}}),[dl,Ul]=Ya({key:"auto-preprocess",defaultValue:!1}),[Ll,{open:ql,close:Vl}]=Qr(!1),[Il,{open:Oe,close:ie}]=Qr(!1),[Cl]=zl.useState(null),Pl=zl.useRef(null),me=zl.useRef(null);zl.useEffect(()=>((async()=>{try{const al=new ch({lang:D,version:$,modelType:w,enableWordBoxes:!0});al.setProgressCallback(F=>{A(F)}),await al.initialize(),Pl.current=al}catch(al){console.error("Failed to initialize OCR engine:",al),Ut.show({title:"Initialization Error",message:"Failed to initialize OCR engine",color:"red"})}})(),()=>{Pl.current?.dispose()}),[D,$,w]);const bl=async Q=>{if(!Pl.current){Ut.show({title:"Error",message:"OCR engine not initialized",color:"red"});return}f(!0),A({stage:"loading",progress:0});const al=performance.now(),F={preprocessing:0,detection:0,classification:0,recognition:0,total:0};try{const ll=await Hg.load(Q);let W=new ImageData(new Uint8ClampedArray(ll.data),ll.width,ll.height);const jl=performance.now();let Bl={};if(dl){const le=await ah.autoPreprocess(W);W=le.processed,Bl=le.appliedOptions}else Object.keys(J).length>0&&(W=await ah.preprocess(W,J),Bl=J);F.preprocessing=performance.now()-jl;const Be=performance.now(),De=await Pl.current.process(W.data,W.width,W.height),nt=performance.now()-Be;F.detection=nt*.4,F.classification=nt*.2,F.recognition=nt*.4,F.total=performance.now()-al;const Xe=De.map(le=>le.text).join(`
`),Xa=De.reduce((le,gi)=>le+gi.confidence,0)/(De.length||1),_t={fullText:Xe,regions:De,processingTime:F.total,method:"onnx",metadata:{imageWidth:W.width,imageHeight:W.height,language:D,version:$,modelType:w}},It={totalTime:F.total,detectionTime:F.detection,classificationTime:F.classification,recognitionTime:F.recognition,preprocessingTime:F.preprocessing,imageWidth:W.width,imageHeight:W.height,pixelCount:W.width*W.height,textRegions:De.length,totalCharacters:Xe.length,averageConfidence:Xa,language:D,modelVersion:$,modelType:w,preprocessingApplied:Object.keys(Bl).filter(le=>Bl[le])};C(_t),j(It);const Qa={id:Date.now().toString(),timestamp:new Date,fileName:Q.name,result:_t,metrics:It,preprocessingOptions:Bl};O(le=>[Qa,...le].slice(0,50)),Ut.show({title:"Success",message:`Processed ${De.length} text regions`,color:"green"})}catch(ll){console.error("Processing error:",ll),Ut.show({title:"Processing Error",message:ll instanceof Error?ll.message:"Failed to process image",color:"red"})}finally{f(!1),A(null)}},S=Q=>{Q.length>0&&bl(Q[0])},U=async()=>{Ut.show({title:"Preview",message:"Preprocessing preview coming soon",color:"blue"})},G=()=>{Ul(!dl),Ut.show({title:dl?"Auto-preprocessing disabled":"Auto-preprocessing enabled",message:dl?"Manual preprocessing settings will be used":"Optimal settings will be detected automatically",color:"blue"})};return c.jsxs(Es,{header:{height:60},padding:"md",children:[c.jsx(Es.Header,{children:c.jsx(Lr,{size:"xl",h:"100%",px:"sm",children:c.jsxs(pl,{h:"100%",justify:"space-between",children:[c.jsxs(pl,{gap:"xs",children:[c.jsx(sh,{size:24}),c.jsx(ws,{order:4,hiddenFrom:"sm",children:"OCR"}),c.jsx(ws,{order:3,visibleFrom:"sm",children:"Client-Side OCR"}),c.jsx(wl,{variant:"light",color:"blue",size:"sm",children:"v2.0"})]}),c.jsxs(pl,{visibleFrom:"sm",children:[c.jsx(Re,{label:`Switch to ${d==="dark"?"light":"dark"} mode`,children:c.jsx(Ee,{variant:"default",size:"lg",onClick:()=>h(),children:d==="dark"?c.jsx(Pr,{size:18}):c.jsx(Fr,{size:18})})}),c.jsx(Re,{label:"Settings",children:c.jsx(Ee,{variant:"default",size:"lg",onClick:ql,children:c.jsx(Ir,{size:18})})}),c.jsx(Re,{label:"History",children:c.jsx(Ee,{variant:"default",size:"lg",onClick:Oe,children:c.jsx(kv,{size:18})})}),c.jsx(Re,{label:"GitHub",children:c.jsx(Ee,{component:"a",href:"https://github.com/siva-sub/client-ocr",target:"_blank",variant:"default",size:"lg",children:c.jsx(Mv,{size:18})})})]}),c.jsxs(pl,{hiddenFrom:"sm",children:[c.jsx(Ee,{variant:"default",size:"md",onClick:()=>h(),children:d==="dark"?c.jsx(Pr,{size:16}):c.jsx(Fr,{size:16})}),c.jsx(Ee,{variant:"default",size:"md",onClick:ql,children:c.jsx(Ir,{size:16})})]})]})})}),c.jsx(Es.Main,{children:c.jsx(Lr,{size:"xl",px:"xs",children:c.jsx(Sl,{gap:"xl",children:c.jsxs($l,{defaultValue:"ocr",children:[c.jsxs($l.List,{children:[c.jsx($l.Tab,{value:"ocr",leftSection:c.jsx(kn,{size:16}),children:"OCR Processing"}),c.jsx($l.Tab,{value:"preprocessing",leftSection:c.jsx(Zs,{size:16}),children:"Preprocessing"}),c.jsx($l.Tab,{value:"performance",leftSection:c.jsx(Ys,{size:16}),children:"Performance"})]}),c.jsx($l.Panel,{value:"ocr",pt:"xl",children:c.jsxs(Sl,{gap:"lg",children:[c.jsx(hg,{onDrop:S,isProcessing:g}),c.jsx(P1,{visible:g}),x&&c.jsx(Ae,{withBorder:!0,children:c.jsxs(Sl,{gap:"sm",children:[c.jsxs(pl,{justify:"space-between",children:[c.jsxs(V,{fw:500,children:["Processing: ",x.stage]}),c.jsxs(V,{size:"sm",c:"dimmed",children:[Math.round(x.progress*100),"%"]})]}),c.jsx(at,{value:x.progress*100,animated:!0})]})}),R&&c.jsx(Mg,{result:R})]})}),c.jsx($l.Panel,{value:"preprocessing",pt:"xl",children:c.jsxs(Sl,{gap:"lg",children:[c.jsx(lv,{icon:c.jsx(fh,{size:16}),variant:"light",children:"Preprocessing can significantly improve OCR accuracy for low-quality images"}),c.jsx(Tg,{options:J,onChange:Y,onPreview:U,onAuto:G,isProcessing:g}),Cl&&c.jsx(Ae,{withBorder:!0,children:c.jsx("img",{src:Cl,alt:"Preprocessed preview",style:{maxWidth:"100%",height:"auto"}})})]})}),c.jsx($l.Panel,{value:"performance",pt:"xl",children:c.jsx(Ag,{metrics:B||void 0,progress:x&&x.stage!=="loading"?x:void 0,isProcessing:g})})]})})})}),c.jsx(ev,{opened:Ll,onClose:Vl,title:"OCR Settings",size:"md",children:c.jsxs(Sl,{gap:"md",children:[c.jsx(Eg,{value:D,onChange:k}),c.jsx(oi,{label:"Model Settings"}),c.jsx(qs,{label:"OCR Version",value:$,onChange:Q=>il(Q),data:[{value:"PP-OCRv5",label:"PP-OCRv5 (Latest)"},{value:"PP-OCRv4",label:"PP-OCRv4"}]}),c.jsx(qs,{label:"Model Type",value:w,onChange:Q=>K(Q),data:[{value:"mobile",label:"Mobile (Fast)"},{value:"server",label:"Server (Accurate)"}]})]})}),c.jsx(tv,{opened:Il,onClose:ie,title:"Processing History",size:"lg",position:"right",children:c.jsx(di,{h:"calc(100vh - 80px)",children:c.jsx(Sl,{gap:"md",children:E.length===0?c.jsx(V,{c:"dimmed",ta:"center",py:"xl",children:"No processing history yet"}):E.map(Q=>c.jsx(Ae,{withBorder:!0,children:c.jsxs(Sl,{gap:"sm",children:[c.jsxs(pl,{justify:"space-between",children:[c.jsx(V,{fw:500,children:Q.fileName}),c.jsx(wl,{variant:"light",children:new Date(Q.timestamp).toLocaleString()})]}),c.jsx(V,{size:"sm",lineClamp:2,children:Q.result.fullText}),c.jsxs(pl,{gap:"xs",children:[c.jsxs(wl,{size:"sm",variant:"light",color:"blue",children:[Q.metrics.textRegions," regions"]}),c.jsxs(wl,{size:"sm",variant:"light",color:"green",children:[Q.metrics.totalTime,"ms"]}),c.jsxs(wl,{size:"sm",variant:"light",color:"orange",children:[Math.round(Q.metrics.averageConfidence*100),"% confidence"]})]}),c.jsx(Ct,{size:"xs",variant:"subtle",onClick:()=>{C(Q.result),j(Q.metrics),ie()},children:"View Result"})]})},Q.id))})})}),c.jsx(av,{position:{bottom:Hs(20),right:Hs(20)},children:c.jsx(Ee,{size:"lg",radius:"xl",variant:"filled",onClick:()=>me.current?.scrollIntoView({behavior:"smooth"}),children:c.jsx(Sv,{size:18})})}),c.jsx(Ng,{})]})}const Yg=iv({primaryColor:"blue",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',defaultRadius:"md",colors:{blue:["#e5f4ff","#cde2ff","#9bc2ff","#64a0ff","#3984fe","#1d72fe","#0969ff","#0058e4","#004ecc","#0043b5"]},shadows:{md:"0 4px 23px 0 rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"}});function Gg(){return c.jsxs(c.Fragment,{children:[c.jsx(nv,{defaultColorScheme:"light"}),c.jsxs(uv,{theme:Yg,defaultColorScheme:"light",children:[c.jsx(cv,{position:"top-right"}),c.jsx(qg,{})]})]})}"serviceWorker"in navigator&&window.addEventListener("load",()=>{const d=window.location.pathname.includes("/client-ocr")?"/client-ocr":"";navigator.serviceWorker.register(`${d}/sw.js`,{scope:`${d}/`}).then(h=>{console.log("SW registered: ",h)}).catch(h=>{console.log("SW registration failed: ",h)})});mv.createRoot(document.getElementById("root")).render(c.jsx(zl.StrictMode,{children:c.jsx(Gg,{})}));