@dansyuqri/spark-joy 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +0,0 @@
1
- var kh=Object.defineProperty;var wh=(e,t,n)=>t in e?kh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var se=(e,t,n)=>wh(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function _h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cc={exports:{}},xs={},dc={exports:{}},Z={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var ri=Symbol.for("react.element"),xh=Symbol.for("react.portal"),Eh=Symbol.for("react.fragment"),Sh=Symbol.for("react.strict_mode"),Nh=Symbol.for("react.profiler"),Ch=Symbol.for("react.provider"),jh=Symbol.for("react.context"),Th=Symbol.for("react.forward_ref"),Oh=Symbol.for("react.suspense"),Lh=Symbol.for("react.memo"),Ph=Symbol.for("react.lazy"),Ca=Symbol.iterator;function Ih(e){return e===null||typeof e!="object"?null:(e=Ca&&e[Ca]||e["@@iterator"],typeof e=="function"?e:null)}var fc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},hc=Object.assign,pc={};function Xn(e,t,n){this.props=e,this.context=t,this.refs=pc,this.updater=n||fc}Xn.prototype.isReactComponent={};Xn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Xn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function mc(){}mc.prototype=Xn.prototype;function So(e,t,n){this.props=e,this.context=t,this.refs=pc,this.updater=n||fc}var No=So.prototype=new mc;No.constructor=So;hc(No,Xn.prototype);No.isPureReactComponent=!0;var ja=Array.isArray,vc=Object.prototype.hasOwnProperty,Co={current:null},gc={key:!0,ref:!0,__self:!0,__source:!0};function yc(e,t,n){var r,i={},s=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(s=""+t.key),t)vc.call(t,r)&&!gc.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var a=Array(o),u=0;u<o;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:ri,type:e,key:s,ref:l,props:i,_owner:Co.current}}function Rh(e,t){return{$$typeof:ri,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function jo(e){return typeof e=="object"&&e!==null&&e.$$typeof===ri}function Mh(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ta=/\/+/g;function Bs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Mh(""+e.key):t.toString(36)}function Li(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case ri:case xh:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+Bs(l,0):r,ja(i)?(n="",e!=null&&(n=e.replace(Ta,"$&/")+"/"),Li(i,t,n,"",function(u){return u})):i!=null&&(jo(i)&&(i=Rh(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(Ta,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",ja(e))for(var o=0;o<e.length;o++){s=e[o];var a=r+Bs(s,o);l+=Li(s,t,n,a,i)}else if(a=Ih(e),typeof a=="function")for(e=a.call(e),o=0;!(s=e.next()).done;)s=s.value,a=r+Bs(s,o++),l+=Li(s,t,n,a,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function di(e,t,n){if(e==null)return e;var r=[],i=0;return Li(e,r,"","",function(s){return t.call(n,s,i++)}),r}function $h(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Se={current:null},Pi={transition:null},zh={ReactCurrentDispatcher:Se,ReactCurrentBatchConfig:Pi,ReactCurrentOwner:Co};function kc(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:di,forEach:function(e,t,n){di(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return di(e,function(){t++}),t},toArray:function(e){return di(e,function(t){return t})||[]},only:function(e){if(!jo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=Xn;Z.Fragment=Eh;Z.Profiler=Nh;Z.PureComponent=So;Z.StrictMode=Sh;Z.Suspense=Oh;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zh;Z.act=kc;Z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=hc({},e.props),i=e.key,s=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,l=Co.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(a in t)vc.call(t,a)&&!gc.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&o!==void 0?o[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){o=Array(a);for(var u=0;u<a;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:ri,type:e.type,key:i,ref:s,props:r,_owner:l}};Z.createContext=function(e){return e={$$typeof:jh,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ch,_context:e},e.Consumer=e};Z.createElement=yc;Z.createFactory=function(e){var t=yc.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:Th,render:e}};Z.isValidElement=jo;Z.lazy=function(e){return{$$typeof:Ph,_payload:{_status:-1,_result:e},_init:$h}};Z.memo=function(e,t){return{$$typeof:Lh,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=Pi.transition;Pi.transition={};try{e()}finally{Pi.transition=t}};Z.unstable_act=kc;Z.useCallback=function(e,t){return Se.current.useCallback(e,t)};Z.useContext=function(e){return Se.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return Se.current.useDeferredValue(e)};Z.useEffect=function(e,t){return Se.current.useEffect(e,t)};Z.useId=function(){return Se.current.useId()};Z.useImperativeHandle=function(e,t,n){return Se.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return Se.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return Se.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return Se.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return Se.current.useReducer(e,t,n)};Z.useRef=function(e){return Se.current.useRef(e)};Z.useState=function(e){return Se.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return Se.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return Se.current.useTransition()};Z.version="18.3.1";dc.exports=Z;var U=dc.exports;/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Dh=U,Ah=Symbol.for("react.element"),Fh=Symbol.for("react.fragment"),bh=Object.prototype.hasOwnProperty,Vh=Dh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Uh={key:!0,ref:!0,__self:!0,__source:!0};function wc(e,t,n){var r,i={},s=null,l=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)bh.call(t,r)&&!Uh.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Ah,type:e,key:s,ref:l,props:i,_owner:Vh.current}}xs.Fragment=Fh;xs.jsx=wc;xs.jsxs=wc;cc.exports=xs;var h=cc.exports,_c={exports:{}},De={},xc={exports:{}},Ec={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(I,F){var V=I.length;I.push(F);e:for(;0<V;){var ne=V-1>>>1,ce=I[ne];if(0<i(ce,F))I[ne]=F,I[V]=ce,V=ne;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var F=I[0],V=I.pop();if(V!==F){I[0]=V;e:for(var ne=0,ce=I.length,ui=ce>>>1;ne<ui;){var Xt=2*(ne+1)-1,Zs=I[Xt],Jt=Xt+1,ci=I[Jt];if(0>i(Zs,V))Jt<ce&&0>i(ci,Zs)?(I[ne]=ci,I[Jt]=V,ne=Jt):(I[ne]=Zs,I[Xt]=V,ne=Xt);else if(Jt<ce&&0>i(ci,V))I[ne]=ci,I[Jt]=V,ne=Jt;else break e}}return F}function i(I,F){var V=I.sortIndex-F.sortIndex;return V!==0?V:I.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var a=[],u=[],c=1,d=null,f=3,y=!1,k=!1,_=!1,T=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(I){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=I)r(u),F.sortIndex=F.expirationTime,t(a,F);else break;F=n(u)}}function w(I){if(_=!1,g(I),!k)if(n(a)!==null)k=!0,Vs(C);else{var F=n(u);F!==null&&Us(w,F.startTime-I)}}function C(I,F){k=!1,_&&(_=!1,m(x),x=-1),y=!0;var V=f;try{for(g(F),d=n(a);d!==null&&(!(d.expirationTime>F)||I&&!ie());){var ne=d.callback;if(typeof ne=="function"){d.callback=null,f=d.priorityLevel;var ce=ne(d.expirationTime<=F);F=e.unstable_now(),typeof ce=="function"?d.callback=ce:d===n(a)&&r(a),g(F)}else r(a);d=n(a)}if(d!==null)var ui=!0;else{var Xt=n(u);Xt!==null&&Us(w,Xt.startTime-F),ui=!1}return ui}finally{d=null,f=V,y=!1}}var j=!1,v=null,x=-1,D=5,M=-1;function ie(){return!(e.unstable_now()-M<D)}function Pe(){if(v!==null){var I=e.unstable_now();M=I;var F=!0;try{F=v(!0,I)}finally{F?er():(j=!1,v=null)}}else j=!1}var er;if(typeof p=="function")er=function(){p(Pe)};else if(typeof MessageChannel<"u"){var Na=new MessageChannel,yh=Na.port2;Na.port1.onmessage=Pe,er=function(){yh.postMessage(null)}}else er=function(){T(Pe,0)};function Vs(I){v=I,j||(j=!0,er())}function Us(I,F){x=T(function(){I(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){k||y||(k=!0,Vs(C))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(I){switch(f){case 1:case 2:case 3:var F=3;break;default:F=f}var V=f;f=F;try{return I()}finally{f=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,F){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var V=f;f=I;try{return F()}finally{f=V}},e.unstable_scheduleCallback=function(I,F,V){var ne=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ne+V:ne):V=ne,I){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=V+ce,I={id:c++,callback:F,priorityLevel:I,startTime:V,expirationTime:ce,sortIndex:-1},V>ne?(I.sortIndex=V,t(u,I),n(a)===null&&I===n(u)&&(_?(m(x),x=-1):_=!0,Us(w,V-ne))):(I.sortIndex=ce,t(a,I),k||y||(k=!0,Vs(C))),I},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(I){var F=f;return function(){var V=f;f=F;try{return I.apply(this,arguments)}finally{f=V}}}})(Ec);xc.exports=Ec;var Zh=xc.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Bh=U,ze=Zh;function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Sc=new Set,Cr={};function vn(e,t){Vn(e,t),Vn(e+"Capture",t)}function Vn(e,t){for(Cr[e]=t,e=0;e<t.length;e++)Sc.add(t[e])}var yt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),El=Object.prototype.hasOwnProperty,Wh=/^[: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]*$/,Oa={},La={};function Hh(e){return El.call(La,e)?!0:El.call(Oa,e)?!1:Wh.test(e)?La[e]=!0:(Oa[e]=!0,!1)}function Gh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Qh(e,t,n,r){if(t===null||typeof t>"u"||Gh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ne(e,t,n,r,i,s,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=l}var me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){me[e]=new Ne(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];me[t]=new Ne(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){me[e]=new Ne(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){me[e]=new Ne(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){me[e]=new Ne(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){me[e]=new Ne(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){me[e]=new Ne(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){me[e]=new Ne(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){me[e]=new Ne(e,5,!1,e.toLowerCase(),null,!1,!1)});var To=/[\-:]([a-z])/g;function Oo(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(To,Oo);me[t]=new Ne(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(To,Oo);me[t]=new Ne(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(To,Oo);me[t]=new Ne(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){me[e]=new Ne(e,1,!1,e.toLowerCase(),null,!1,!1)});me.xlinkHref=new Ne("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){me[e]=new Ne(e,1,!1,e.toLowerCase(),null,!0,!0)});function Lo(e,t,n,r){var i=me.hasOwnProperty(t)?me[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Qh(t,n,i,r)&&(n=null),r||i===null?Hh(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var St=Bh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fi=Symbol.for("react.element"),_n=Symbol.for("react.portal"),xn=Symbol.for("react.fragment"),Po=Symbol.for("react.strict_mode"),Sl=Symbol.for("react.profiler"),Nc=Symbol.for("react.provider"),Cc=Symbol.for("react.context"),Io=Symbol.for("react.forward_ref"),Nl=Symbol.for("react.suspense"),Cl=Symbol.for("react.suspense_list"),Ro=Symbol.for("react.memo"),Ct=Symbol.for("react.lazy"),jc=Symbol.for("react.offscreen"),Pa=Symbol.iterator;function tr(e){return e===null||typeof e!="object"?null:(e=Pa&&e[Pa]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Object.assign,Ws;function ur(e){if(Ws===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ws=t&&t[1]||""}return`
34
- `+Ws+e}var Hs=!1;function Gs(e,t){if(!e||Hs)return"";Hs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
- `),s=r.stack.split(`
36
- `),l=i.length-1,o=s.length-1;1<=l&&0<=o&&i[l]!==s[o];)o--;for(;1<=l&&0<=o;l--,o--)if(i[l]!==s[o]){if(l!==1||o!==1)do if(l--,o--,0>o||i[l]!==s[o]){var a=`
37
- `+i[l].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=l&&0<=o);break}}}finally{Hs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ur(e):""}function Yh(e){switch(e.tag){case 5:return ur(e.type);case 16:return ur("Lazy");case 13:return ur("Suspense");case 19:return ur("SuspenseList");case 0:case 2:case 15:return e=Gs(e.type,!1),e;case 11:return e=Gs(e.type.render,!1),e;case 1:return e=Gs(e.type,!0),e;default:return""}}function jl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xn:return"Fragment";case _n:return"Portal";case Sl:return"Profiler";case Po:return"StrictMode";case Nl:return"Suspense";case Cl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Cc:return(e.displayName||"Context")+".Consumer";case Nc:return(e._context.displayName||"Context")+".Provider";case Io:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ro:return t=e.displayName||null,t!==null?t:jl(e.type)||"Memo";case Ct:t=e._payload,e=e._init;try{return jl(e(t))}catch{}}return null}function Kh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return jl(t);case 8:return t===Po?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ut(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Tc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xh(e){var t=Tc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,s.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hi(e){e._valueTracker||(e._valueTracker=Xh(e))}function Oc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Tc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ui(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Tl(e,t){var n=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ia(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ut(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lc(e,t){t=t.checked,t!=null&&Lo(e,"checked",t,!1)}function Ol(e,t){Lc(e,t);var n=Ut(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ll(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ll(e,t.type,Ut(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ra(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ll(e,t,n){(t!=="number"||Ui(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cr=Array.isArray;function Mn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ut(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Pl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(E(91));return ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ma(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(E(92));if(cr(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ut(n)}}function Pc(e,t){var n=Ut(t.value),r=Ut(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function $a(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ic(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Il(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ic(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pi,Rc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(pi=pi||document.createElement("div"),pi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function jr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jh=["Webkit","ms","Moz","O"];Object.keys(vr).forEach(function(e){Jh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vr[t]=vr[e]})});function Mc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||vr.hasOwnProperty(e)&&vr[e]?(""+t).trim():t+"px"}function $c(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Mc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var qh=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Rl(e,t){if(t){if(qh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Ml(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $l=null;function Mo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zl=null,$n=null,zn=null;function za(e){if(e=li(e)){if(typeof zl!="function")throw Error(E(280));var t=e.stateNode;t&&(t=js(t),zl(e.stateNode,e.type,t))}}function zc(e){$n?zn?zn.push(e):zn=[e]:$n=e}function Dc(){if($n){var e=$n,t=zn;if(zn=$n=null,za(e),t)for(e=0;e<t.length;e++)za(t[e])}}function Ac(e,t){return e(t)}function Fc(){}var Qs=!1;function bc(e,t,n){if(Qs)return e(t,n);Qs=!0;try{return Ac(e,t,n)}finally{Qs=!1,($n!==null||zn!==null)&&(Fc(),Dc())}}function Tr(e,t){var n=e.stateNode;if(n===null)return null;var r=js(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var Dl=!1;if(yt)try{var nr={};Object.defineProperty(nr,"passive",{get:function(){Dl=!0}}),window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{Dl=!1}function ep(e,t,n,r,i,s,l,o,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var gr=!1,Zi=null,Bi=!1,Al=null,tp={onError:function(e){gr=!0,Zi=e}};function np(e,t,n,r,i,s,l,o,a){gr=!1,Zi=null,ep.apply(tp,arguments)}function rp(e,t,n,r,i,s,l,o,a){if(np.apply(this,arguments),gr){if(gr){var u=Zi;gr=!1,Zi=null}else throw Error(E(198));Bi||(Bi=!0,Al=u)}}function gn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Vc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Da(e){if(gn(e)!==e)throw Error(E(188))}function ip(e){var t=e.alternate;if(!t){if(t=gn(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Da(i),e;if(s===r)return Da(i),t;s=s.sibling}throw Error(E(188))}if(n.return!==r.return)n=i,r=s;else{for(var l=!1,o=i.child;o;){if(o===n){l=!0,n=i,r=s;break}if(o===r){l=!0,r=i,n=s;break}o=o.sibling}if(!l){for(o=s.child;o;){if(o===n){l=!0,n=s,r=i;break}if(o===r){l=!0,r=s,n=i;break}o=o.sibling}if(!l)throw Error(E(189))}}if(n.alternate!==r)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function Uc(e){return e=ip(e),e!==null?Zc(e):null}function Zc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Zc(e);if(t!==null)return t;e=e.sibling}return null}var Bc=ze.unstable_scheduleCallback,Aa=ze.unstable_cancelCallback,sp=ze.unstable_shouldYield,lp=ze.unstable_requestPaint,re=ze.unstable_now,op=ze.unstable_getCurrentPriorityLevel,$o=ze.unstable_ImmediatePriority,Wc=ze.unstable_UserBlockingPriority,Wi=ze.unstable_NormalPriority,ap=ze.unstable_LowPriority,Hc=ze.unstable_IdlePriority,Es=null,lt=null;function up(e){if(lt&&typeof lt.onCommitFiberRoot=="function")try{lt.onCommitFiberRoot(Es,e,void 0,(e.current.flags&128)===128)}catch{}}var Xe=Math.clz32?Math.clz32:fp,cp=Math.log,dp=Math.LN2;function fp(e){return e>>>=0,e===0?32:31-(cp(e)/dp|0)|0}var mi=64,vi=4194304;function dr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,l=n&268435455;if(l!==0){var o=l&~i;o!==0?r=dr(o):(s&=l,s!==0&&(r=dr(s)))}else l=n&~i,l!==0?r=dr(l):s!==0&&(r=dr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Xe(t),i=1<<n,r|=e[n],t&=~i;return r}function hp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pp(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Xe(s),o=1<<l,a=i[l];a===-1?(!(o&n)||o&r)&&(i[l]=hp(o,t)):a<=t&&(e.expiredLanes|=o),s&=~o}}function Fl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Gc(){var e=mi;return mi<<=1,!(mi&4194240)&&(mi=64),e}function Ys(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ii(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xe(t),e[t]=n}function mp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Xe(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function zo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var H=0;function Qc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Yc,Do,Kc,Xc,Jc,bl=!1,gi=[],Rt=null,Mt=null,$t=null,Or=new Map,Lr=new Map,Tt=[],vp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Fa(e,t){switch(e){case"focusin":case"focusout":Rt=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":$t=null;break;case"pointerover":case"pointerout":Or.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lr.delete(t.pointerId)}}function rr(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=li(t),t!==null&&Do(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function gp(e,t,n,r,i){switch(t){case"focusin":return Rt=rr(Rt,e,t,n,r,i),!0;case"dragenter":return Mt=rr(Mt,e,t,n,r,i),!0;case"mouseover":return $t=rr($t,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Or.set(s,rr(Or.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Lr.set(s,rr(Lr.get(s)||null,e,t,n,r,i)),!0}return!1}function qc(e){var t=nn(e.target);if(t!==null){var n=gn(t);if(n!==null){if(t=n.tag,t===13){if(t=Vc(n),t!==null){e.blockedOn=t,Jc(e.priority,function(){Kc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ii(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$l=r,n.target.dispatchEvent(r),$l=null}else return t=li(n),t!==null&&Do(t),e.blockedOn=n,!1;t.shift()}return!0}function ba(e,t,n){Ii(e)&&n.delete(t)}function yp(){bl=!1,Rt!==null&&Ii(Rt)&&(Rt=null),Mt!==null&&Ii(Mt)&&(Mt=null),$t!==null&&Ii($t)&&($t=null),Or.forEach(ba),Lr.forEach(ba)}function ir(e,t){e.blockedOn===t&&(e.blockedOn=null,bl||(bl=!0,ze.unstable_scheduleCallback(ze.unstable_NormalPriority,yp)))}function Pr(e){function t(i){return ir(i,e)}if(0<gi.length){ir(gi[0],e);for(var n=1;n<gi.length;n++){var r=gi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Rt!==null&&ir(Rt,e),Mt!==null&&ir(Mt,e),$t!==null&&ir($t,e),Or.forEach(t),Lr.forEach(t),n=0;n<Tt.length;n++)r=Tt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Tt.length&&(n=Tt[0],n.blockedOn===null);)qc(n),n.blockedOn===null&&Tt.shift()}var Dn=St.ReactCurrentBatchConfig,Gi=!0;function kp(e,t,n,r){var i=H,s=Dn.transition;Dn.transition=null;try{H=1,Ao(e,t,n,r)}finally{H=i,Dn.transition=s}}function wp(e,t,n,r){var i=H,s=Dn.transition;Dn.transition=null;try{H=4,Ao(e,t,n,r)}finally{H=i,Dn.transition=s}}function Ao(e,t,n,r){if(Gi){var i=Vl(e,t,n,r);if(i===null)sl(e,t,r,Qi,n),Fa(e,r);else if(gp(i,e,t,n,r))r.stopPropagation();else if(Fa(e,r),t&4&&-1<vp.indexOf(e)){for(;i!==null;){var s=li(i);if(s!==null&&Yc(s),s=Vl(e,t,n,r),s===null&&sl(e,t,r,Qi,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else sl(e,t,r,null,n)}}var Qi=null;function Vl(e,t,n,r){if(Qi=null,e=Mo(r),e=nn(e),e!==null)if(t=gn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Vc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Qi=e,null}function ed(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(op()){case $o:return 1;case Wc:return 4;case Wi:case ap:return 16;case Hc:return 536870912;default:return 16}default:return 16}}var Pt=null,Fo=null,Ri=null;function td(){if(Ri)return Ri;var e,t=Fo,n=t.length,r,i="value"in Pt?Pt.value:Pt.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[s-r];r++);return Ri=i.slice(e,1<r?1-r:void 0)}function Mi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yi(){return!0}function Va(){return!1}function Ae(e){function t(n,r,i,s,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?yi:Va,this.isPropagationStopped=Va,this}return ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yi)},persist:function(){},isPersistent:yi}),t}var Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bo=Ae(Jn),si=ee({},Jn,{view:0,detail:0}),_p=Ae(si),Ks,Xs,sr,Ss=ee({},si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sr&&(sr&&e.type==="mousemove"?(Ks=e.screenX-sr.screenX,Xs=e.screenY-sr.screenY):Xs=Ks=0,sr=e),Ks)},movementY:function(e){return"movementY"in e?e.movementY:Xs}}),Ua=Ae(Ss),xp=ee({},Ss,{dataTransfer:0}),Ep=Ae(xp),Sp=ee({},si,{relatedTarget:0}),Js=Ae(Sp),Np=ee({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),Cp=Ae(Np),jp=ee({},Jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tp=Ae(jp),Op=ee({},Jn,{data:0}),Za=Ae(Op),Lp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pp={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"},Ip={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ip[e])?!!t[e]:!1}function Vo(){return Rp}var Mp=ee({},si,{key:function(e){if(e.key){var t=Lp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vo,charCode:function(e){return e.type==="keypress"?Mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$p=Ae(Mp),zp=ee({},Ss,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ba=Ae(zp),Dp=ee({},si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vo}),Ap=Ae(Dp),Fp=ee({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),bp=Ae(Fp),Vp=ee({},Ss,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Up=Ae(Vp),Zp=[9,13,27,32],Uo=yt&&"CompositionEvent"in window,yr=null;yt&&"documentMode"in document&&(yr=document.documentMode);var Bp=yt&&"TextEvent"in window&&!yr,nd=yt&&(!Uo||yr&&8<yr&&11>=yr),Wa=" ",Ha=!1;function rd(e,t){switch(e){case"keyup":return Zp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function id(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var En=!1;function Wp(e,t){switch(e){case"compositionend":return id(t);case"keypress":return t.which!==32?null:(Ha=!0,Wa);case"textInput":return e=t.data,e===Wa&&Ha?null:e;default:return null}}function Hp(e,t){if(En)return e==="compositionend"||!Uo&&rd(e,t)?(e=td(),Ri=Fo=Pt=null,En=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nd&&t.locale!=="ko"?null:t.data;default:return null}}var Gp={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 Ga(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gp[e.type]:t==="textarea"}function sd(e,t,n,r){zc(r),t=Yi(t,"onChange"),0<t.length&&(n=new bo("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var kr=null,Ir=null;function Qp(e){vd(e,0)}function Ns(e){var t=Cn(e);if(Oc(t))return e}function Yp(e,t){if(e==="change")return t}var ld=!1;if(yt){var qs;if(yt){var el="oninput"in document;if(!el){var Qa=document.createElement("div");Qa.setAttribute("oninput","return;"),el=typeof Qa.oninput=="function"}qs=el}else qs=!1;ld=qs&&(!document.documentMode||9<document.documentMode)}function Ya(){kr&&(kr.detachEvent("onpropertychange",od),Ir=kr=null)}function od(e){if(e.propertyName==="value"&&Ns(Ir)){var t=[];sd(t,Ir,e,Mo(e)),bc(Qp,t)}}function Kp(e,t,n){e==="focusin"?(Ya(),kr=t,Ir=n,kr.attachEvent("onpropertychange",od)):e==="focusout"&&Ya()}function Xp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ns(Ir)}function Jp(e,t){if(e==="click")return Ns(t)}function qp(e,t){if(e==="input"||e==="change")return Ns(t)}function em(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var et=typeof Object.is=="function"?Object.is:em;function Rr(e,t){if(et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!El.call(t,i)||!et(e[i],t[i]))return!1}return!0}function Ka(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xa(e,t){var n=Ka(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ka(n)}}function ad(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ad(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ud(){for(var e=window,t=Ui();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ui(e.document)}return t}function Zo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function tm(e){var t=ud(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ad(n.ownerDocument.documentElement,n)){if(r!==null&&Zo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Xa(n,s);var l=Xa(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var nm=yt&&"documentMode"in document&&11>=document.documentMode,Sn=null,Ul=null,wr=null,Zl=!1;function Ja(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zl||Sn==null||Sn!==Ui(r)||(r=Sn,"selectionStart"in r&&Zo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wr&&Rr(wr,r)||(wr=r,r=Yi(Ul,"onSelect"),0<r.length&&(t=new bo("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Sn)))}function ki(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Nn={animationend:ki("Animation","AnimationEnd"),animationiteration:ki("Animation","AnimationIteration"),animationstart:ki("Animation","AnimationStart"),transitionend:ki("Transition","TransitionEnd")},tl={},cd={};yt&&(cd=document.createElement("div").style,"AnimationEvent"in window||(delete Nn.animationend.animation,delete Nn.animationiteration.animation,delete Nn.animationstart.animation),"TransitionEvent"in window||delete Nn.transitionend.transition);function Cs(e){if(tl[e])return tl[e];if(!Nn[e])return e;var t=Nn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in cd)return tl[e]=t[n];return e}var dd=Cs("animationend"),fd=Cs("animationiteration"),hd=Cs("animationstart"),pd=Cs("transitionend"),md=new Map,qa="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Qt(e,t){md.set(e,t),vn(t,[e])}for(var nl=0;nl<qa.length;nl++){var rl=qa[nl],rm=rl.toLowerCase(),im=rl[0].toUpperCase()+rl.slice(1);Qt(rm,"on"+im)}Qt(dd,"onAnimationEnd");Qt(fd,"onAnimationIteration");Qt(hd,"onAnimationStart");Qt("dblclick","onDoubleClick");Qt("focusin","onFocus");Qt("focusout","onBlur");Qt(pd,"onTransitionEnd");Vn("onMouseEnter",["mouseout","mouseover"]);Vn("onMouseLeave",["mouseout","mouseover"]);Vn("onPointerEnter",["pointerout","pointerover"]);Vn("onPointerLeave",["pointerout","pointerover"]);vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vn("onBeforeInput",["compositionend","keypress","textInput","paste"]);vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fr="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(" "),sm=new Set("cancel close invalid load scroll toggle".split(" ").concat(fr));function eu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,rp(r,t,void 0,e),e.currentTarget=null}function vd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var l=r.length-1;0<=l;l--){var o=r[l],a=o.instance,u=o.currentTarget;if(o=o.listener,a!==s&&i.isPropagationStopped())break e;eu(i,o,u),s=a}else for(l=0;l<r.length;l++){if(o=r[l],a=o.instance,u=o.currentTarget,o=o.listener,a!==s&&i.isPropagationStopped())break e;eu(i,o,u),s=a}}}if(Bi)throw e=Al,Bi=!1,Al=null,e}function Q(e,t){var n=t[Ql];n===void 0&&(n=t[Ql]=new Set);var r=e+"__bubble";n.has(r)||(gd(t,e,2,!1),n.add(r))}function il(e,t,n){var r=0;t&&(r|=4),gd(n,e,r,t)}var wi="_reactListening"+Math.random().toString(36).slice(2);function Mr(e){if(!e[wi]){e[wi]=!0,Sc.forEach(function(n){n!=="selectionchange"&&(sm.has(n)||il(n,!1,e),il(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wi]||(t[wi]=!0,il("selectionchange",!1,t))}}function gd(e,t,n,r){switch(ed(t)){case 1:var i=kp;break;case 4:i=wp;break;default:i=Ao}n=i.bind(null,t,n,e),i=void 0,!Dl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function sl(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;l=l.return}for(;o!==null;){if(l=nn(o),l===null)return;if(a=l.tag,a===5||a===6){r=s=l;continue e}o=o.parentNode}}r=r.return}bc(function(){var u=s,c=Mo(n),d=[];e:{var f=md.get(e);if(f!==void 0){var y=bo,k=e;switch(e){case"keypress":if(Mi(n)===0)break e;case"keydown":case"keyup":y=$p;break;case"focusin":k="focus",y=Js;break;case"focusout":k="blur",y=Js;break;case"beforeblur":case"afterblur":y=Js;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Ua;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Ep;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Ap;break;case dd:case fd:case hd:y=Cp;break;case pd:y=bp;break;case"scroll":y=_p;break;case"wheel":y=Up;break;case"copy":case"cut":case"paste":y=Tp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Ba}var _=(t&4)!==0,T=!_&&e==="scroll",m=_?f!==null?f+"Capture":null:f;_=[];for(var p=u,g;p!==null;){g=p;var w=g.stateNode;if(g.tag===5&&w!==null&&(g=w,m!==null&&(w=Tr(p,m),w!=null&&_.push($r(p,w,g)))),T)break;p=p.return}0<_.length&&(f=new y(f,k,null,n,c),d.push({event:f,listeners:_}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",f&&n!==$l&&(k=n.relatedTarget||n.fromElement)&&(nn(k)||k[kt]))break e;if((y||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,y?(k=n.relatedTarget||n.toElement,y=u,k=k?nn(k):null,k!==null&&(T=gn(k),k!==T||k.tag!==5&&k.tag!==6)&&(k=null)):(y=null,k=u),y!==k)){if(_=Ua,w="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(_=Ba,w="onPointerLeave",m="onPointerEnter",p="pointer"),T=y==null?f:Cn(y),g=k==null?f:Cn(k),f=new _(w,p+"leave",y,n,c),f.target=T,f.relatedTarget=g,w=null,nn(c)===u&&(_=new _(m,p+"enter",k,n,c),_.target=g,_.relatedTarget=T,w=_),T=w,y&&k)t:{for(_=y,m=k,p=0,g=_;g;g=kn(g))p++;for(g=0,w=m;w;w=kn(w))g++;for(;0<p-g;)_=kn(_),p--;for(;0<g-p;)m=kn(m),g--;for(;p--;){if(_===m||m!==null&&_===m.alternate)break t;_=kn(_),m=kn(m)}_=null}else _=null;y!==null&&tu(d,f,y,_,!1),k!==null&&T!==null&&tu(d,T,k,_,!0)}}e:{if(f=u?Cn(u):window,y=f.nodeName&&f.nodeName.toLowerCase(),y==="select"||y==="input"&&f.type==="file")var C=Yp;else if(Ga(f))if(ld)C=qp;else{C=Xp;var j=Kp}else(y=f.nodeName)&&y.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=Jp);if(C&&(C=C(e,u))){sd(d,C,n,c);break e}j&&j(e,f,u),e==="focusout"&&(j=f._wrapperState)&&j.controlled&&f.type==="number"&&Ll(f,"number",f.value)}switch(j=u?Cn(u):window,e){case"focusin":(Ga(j)||j.contentEditable==="true")&&(Sn=j,Ul=u,wr=null);break;case"focusout":wr=Ul=Sn=null;break;case"mousedown":Zl=!0;break;case"contextmenu":case"mouseup":case"dragend":Zl=!1,Ja(d,n,c);break;case"selectionchange":if(nm)break;case"keydown":case"keyup":Ja(d,n,c)}var v;if(Uo)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else En?rd(e,n)&&(x="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(x="onCompositionStart");x&&(nd&&n.locale!=="ko"&&(En||x!=="onCompositionStart"?x==="onCompositionEnd"&&En&&(v=td()):(Pt=c,Fo="value"in Pt?Pt.value:Pt.textContent,En=!0)),j=Yi(u,x),0<j.length&&(x=new Za(x,e,null,n,c),d.push({event:x,listeners:j}),v?x.data=v:(v=id(n),v!==null&&(x.data=v)))),(v=Bp?Wp(e,n):Hp(e,n))&&(u=Yi(u,"onBeforeInput"),0<u.length&&(c=new Za("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=v))}vd(d,t)})}function $r(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yi(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Tr(e,n),s!=null&&r.unshift($r(e,s,i)),s=Tr(e,t),s!=null&&r.push($r(e,s,i))),e=e.return}return r}function kn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function tu(e,t,n,r,i){for(var s=t._reactName,l=[];n!==null&&n!==r;){var o=n,a=o.alternate,u=o.stateNode;if(a!==null&&a===r)break;o.tag===5&&u!==null&&(o=u,i?(a=Tr(n,s),a!=null&&l.unshift($r(n,a,o))):i||(a=Tr(n,s),a!=null&&l.push($r(n,a,o)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var lm=/\r\n?/g,om=/\u0000|\uFFFD/g;function nu(e){return(typeof e=="string"?e:""+e).replace(lm,`
38
- `).replace(om,"")}function _i(e,t,n){if(t=nu(t),nu(e)!==t&&n)throw Error(E(425))}function Ki(){}var Bl=null,Wl=null;function Hl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gl=typeof setTimeout=="function"?setTimeout:void 0,am=typeof clearTimeout=="function"?clearTimeout:void 0,ru=typeof Promise=="function"?Promise:void 0,um=typeof queueMicrotask=="function"?queueMicrotask:typeof ru<"u"?function(e){return ru.resolve(null).then(e).catch(cm)}:Gl;function cm(e){setTimeout(function(){throw e})}function ll(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Pr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Pr(t)}function zt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function iu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qn=Math.random().toString(36).slice(2),st="__reactFiber$"+qn,zr="__reactProps$"+qn,kt="__reactContainer$"+qn,Ql="__reactEvents$"+qn,dm="__reactListeners$"+qn,fm="__reactHandles$"+qn;function nn(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[kt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=iu(e);e!==null;){if(n=e[st])return n;e=iu(e)}return t}e=n,n=e.parentNode}return null}function li(e){return e=e[st]||e[kt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function js(e){return e[zr]||null}var Yl=[],jn=-1;function Yt(e){return{current:e}}function Y(e){0>jn||(e.current=Yl[jn],Yl[jn]=null,jn--)}function G(e,t){jn++,Yl[jn]=e.current,e.current=t}var Zt={},ke=Yt(Zt),Te=Yt(!1),un=Zt;function Un(e,t){var n=e.type.contextTypes;if(!n)return Zt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Oe(e){return e=e.childContextTypes,e!=null}function Xi(){Y(Te),Y(ke)}function su(e,t,n){if(ke.current!==Zt)throw Error(E(168));G(ke,t),G(Te,n)}function yd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(E(108,Kh(e)||"Unknown",i));return ee({},n,r)}function Ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zt,un=ke.current,G(ke,e),G(Te,Te.current),!0}function lu(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=yd(e,t,un),r.__reactInternalMemoizedMergedChildContext=e,Y(Te),Y(ke),G(ke,e)):Y(Te),G(Te,n)}var ht=null,Ts=!1,ol=!1;function kd(e){ht===null?ht=[e]:ht.push(e)}function hm(e){Ts=!0,kd(e)}function Kt(){if(!ol&&ht!==null){ol=!0;var e=0,t=H;try{var n=ht;for(H=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ht=null,Ts=!1}catch(i){throw ht!==null&&(ht=ht.slice(e+1)),Bc($o,Kt),i}finally{H=t,ol=!1}}return null}var Tn=[],On=0,qi=null,es=0,Fe=[],be=0,cn=null,mt=1,vt="";function en(e,t){Tn[On++]=es,Tn[On++]=qi,qi=e,es=t}function wd(e,t,n){Fe[be++]=mt,Fe[be++]=vt,Fe[be++]=cn,cn=e;var r=mt;e=vt;var i=32-Xe(r)-1;r&=~(1<<i),n+=1;var s=32-Xe(t)+i;if(30<s){var l=i-i%5;s=(r&(1<<l)-1).toString(32),r>>=l,i-=l,mt=1<<32-Xe(t)+i|n<<i|r,vt=s+e}else mt=1<<s|n<<i|r,vt=e}function Bo(e){e.return!==null&&(en(e,1),wd(e,1,0))}function Wo(e){for(;e===qi;)qi=Tn[--On],Tn[On]=null,es=Tn[--On],Tn[On]=null;for(;e===cn;)cn=Fe[--be],Fe[be]=null,vt=Fe[--be],Fe[be]=null,mt=Fe[--be],Fe[be]=null}var Me=null,Re=null,K=!1,Ye=null;function _d(e,t){var n=Ve(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ou(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Me=e,Re=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Me=e,Re=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=cn!==null?{id:mt,overflow:vt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ve(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Me=e,Re=null,!0):!1;default:return!1}}function Kl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xl(e){if(K){var t=Re;if(t){var n=t;if(!ou(e,t)){if(Kl(e))throw Error(E(418));t=zt(n.nextSibling);var r=Me;t&&ou(e,t)?_d(r,n):(e.flags=e.flags&-4097|2,K=!1,Me=e)}}else{if(Kl(e))throw Error(E(418));e.flags=e.flags&-4097|2,K=!1,Me=e}}}function au(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Me=e}function xi(e){if(e!==Me)return!1;if(!K)return au(e),K=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Hl(e.type,e.memoizedProps)),t&&(t=Re)){if(Kl(e))throw xd(),Error(E(418));for(;t;)_d(e,t),t=zt(t.nextSibling)}if(au(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Re=zt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Re=null}}else Re=Me?zt(e.stateNode.nextSibling):null;return!0}function xd(){for(var e=Re;e;)e=zt(e.nextSibling)}function Zn(){Re=Me=null,K=!1}function Ho(e){Ye===null?Ye=[e]:Ye.push(e)}var pm=St.ReactCurrentBatchConfig;function lr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(E(309));var r=n.stateNode}if(!r)throw Error(E(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(l){var o=i.refs;l===null?delete o[s]:o[s]=l},t._stringRef=s,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function Ei(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uu(e){var t=e._init;return t(e._payload)}function Ed(e){function t(m,p){if(e){var g=m.deletions;g===null?(m.deletions=[p],m.flags|=16):g.push(p)}}function n(m,p){if(!e)return null;for(;p!==null;)t(m,p),p=p.sibling;return null}function r(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function i(m,p){return m=bt(m,p),m.index=0,m.sibling=null,m}function s(m,p,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<p?(m.flags|=2,p):g):(m.flags|=2,p)):(m.flags|=1048576,p)}function l(m){return e&&m.alternate===null&&(m.flags|=2),m}function o(m,p,g,w){return p===null||p.tag!==6?(p=pl(g,m.mode,w),p.return=m,p):(p=i(p,g),p.return=m,p)}function a(m,p,g,w){var C=g.type;return C===xn?c(m,p,g.props.children,w,g.key):p!==null&&(p.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ct&&uu(C)===p.type)?(w=i(p,g.props),w.ref=lr(m,p,g),w.return=m,w):(w=Vi(g.type,g.key,g.props,null,m.mode,w),w.ref=lr(m,p,g),w.return=m,w)}function u(m,p,g,w){return p===null||p.tag!==4||p.stateNode.containerInfo!==g.containerInfo||p.stateNode.implementation!==g.implementation?(p=ml(g,m.mode,w),p.return=m,p):(p=i(p,g.children||[]),p.return=m,p)}function c(m,p,g,w,C){return p===null||p.tag!==7?(p=on(g,m.mode,w,C),p.return=m,p):(p=i(p,g),p.return=m,p)}function d(m,p,g){if(typeof p=="string"&&p!==""||typeof p=="number")return p=pl(""+p,m.mode,g),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case fi:return g=Vi(p.type,p.key,p.props,null,m.mode,g),g.ref=lr(m,null,p),g.return=m,g;case _n:return p=ml(p,m.mode,g),p.return=m,p;case Ct:var w=p._init;return d(m,w(p._payload),g)}if(cr(p)||tr(p))return p=on(p,m.mode,g,null),p.return=m,p;Ei(m,p)}return null}function f(m,p,g,w){var C=p!==null?p.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return C!==null?null:o(m,p,""+g,w);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case fi:return g.key===C?a(m,p,g,w):null;case _n:return g.key===C?u(m,p,g,w):null;case Ct:return C=g._init,f(m,p,C(g._payload),w)}if(cr(g)||tr(g))return C!==null?null:c(m,p,g,w,null);Ei(m,g)}return null}function y(m,p,g,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return m=m.get(g)||null,o(p,m,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case fi:return m=m.get(w.key===null?g:w.key)||null,a(p,m,w,C);case _n:return m=m.get(w.key===null?g:w.key)||null,u(p,m,w,C);case Ct:var j=w._init;return y(m,p,g,j(w._payload),C)}if(cr(w)||tr(w))return m=m.get(g)||null,c(p,m,w,C,null);Ei(p,w)}return null}function k(m,p,g,w){for(var C=null,j=null,v=p,x=p=0,D=null;v!==null&&x<g.length;x++){v.index>x?(D=v,v=null):D=v.sibling;var M=f(m,v,g[x],w);if(M===null){v===null&&(v=D);break}e&&v&&M.alternate===null&&t(m,v),p=s(M,p,x),j===null?C=M:j.sibling=M,j=M,v=D}if(x===g.length)return n(m,v),K&&en(m,x),C;if(v===null){for(;x<g.length;x++)v=d(m,g[x],w),v!==null&&(p=s(v,p,x),j===null?C=v:j.sibling=v,j=v);return K&&en(m,x),C}for(v=r(m,v);x<g.length;x++)D=y(v,m,x,g[x],w),D!==null&&(e&&D.alternate!==null&&v.delete(D.key===null?x:D.key),p=s(D,p,x),j===null?C=D:j.sibling=D,j=D);return e&&v.forEach(function(ie){return t(m,ie)}),K&&en(m,x),C}function _(m,p,g,w){var C=tr(g);if(typeof C!="function")throw Error(E(150));if(g=C.call(g),g==null)throw Error(E(151));for(var j=C=null,v=p,x=p=0,D=null,M=g.next();v!==null&&!M.done;x++,M=g.next()){v.index>x?(D=v,v=null):D=v.sibling;var ie=f(m,v,M.value,w);if(ie===null){v===null&&(v=D);break}e&&v&&ie.alternate===null&&t(m,v),p=s(ie,p,x),j===null?C=ie:j.sibling=ie,j=ie,v=D}if(M.done)return n(m,v),K&&en(m,x),C;if(v===null){for(;!M.done;x++,M=g.next())M=d(m,M.value,w),M!==null&&(p=s(M,p,x),j===null?C=M:j.sibling=M,j=M);return K&&en(m,x),C}for(v=r(m,v);!M.done;x++,M=g.next())M=y(v,m,x,M.value,w),M!==null&&(e&&M.alternate!==null&&v.delete(M.key===null?x:M.key),p=s(M,p,x),j===null?C=M:j.sibling=M,j=M);return e&&v.forEach(function(Pe){return t(m,Pe)}),K&&en(m,x),C}function T(m,p,g,w){if(typeof g=="object"&&g!==null&&g.type===xn&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case fi:e:{for(var C=g.key,j=p;j!==null;){if(j.key===C){if(C=g.type,C===xn){if(j.tag===7){n(m,j.sibling),p=i(j,g.props.children),p.return=m,m=p;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ct&&uu(C)===j.type){n(m,j.sibling),p=i(j,g.props),p.ref=lr(m,j,g),p.return=m,m=p;break e}n(m,j);break}else t(m,j);j=j.sibling}g.type===xn?(p=on(g.props.children,m.mode,w,g.key),p.return=m,m=p):(w=Vi(g.type,g.key,g.props,null,m.mode,w),w.ref=lr(m,p,g),w.return=m,m=w)}return l(m);case _n:e:{for(j=g.key;p!==null;){if(p.key===j)if(p.tag===4&&p.stateNode.containerInfo===g.containerInfo&&p.stateNode.implementation===g.implementation){n(m,p.sibling),p=i(p,g.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=ml(g,m.mode,w),p.return=m,m=p}return l(m);case Ct:return j=g._init,T(m,p,j(g._payload),w)}if(cr(g))return k(m,p,g,w);if(tr(g))return _(m,p,g,w);Ei(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,p!==null&&p.tag===6?(n(m,p.sibling),p=i(p,g),p.return=m,m=p):(n(m,p),p=pl(g,m.mode,w),p.return=m,m=p),l(m)):n(m,p)}return T}var Bn=Ed(!0),Sd=Ed(!1),ts=Yt(null),ns=null,Ln=null,Go=null;function Qo(){Go=Ln=ns=null}function Yo(e){var t=ts.current;Y(ts),e._currentValue=t}function Jl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function An(e,t){ns=e,Go=Ln=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(je=!0),e.firstContext=null)}function Ze(e){var t=e._currentValue;if(Go!==e)if(e={context:e,memoizedValue:t,next:null},Ln===null){if(ns===null)throw Error(E(308));Ln=e,ns.dependencies={lanes:0,firstContext:e}}else Ln=Ln.next=e;return t}var rn=null;function Ko(e){rn===null?rn=[e]:rn.push(e)}function Nd(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ko(t)):(n.next=i.next,i.next=n),t.interleaved=n,wt(e,r)}function wt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var jt=!1;function Xo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Dt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,wt(e,n)}return i=r.interleaved,i===null?(t.next=t,Ko(r)):(t.next=i.next,i.next=t),r.interleaved=t,wt(e,n)}function $i(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zo(e,n)}}function cu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=l:s=s.next=l,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function rs(e,t,n,r){var i=e.updateQueue;jt=!1;var s=i.firstBaseUpdate,l=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var a=o,u=a.next;a.next=null,l===null?s=u:l.next=u,l=a;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==l&&(o===null?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=a))}if(s!==null){var d=i.baseState;l=0,c=u=a=null,o=s;do{var f=o.lane,y=o.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:y,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var k=e,_=o;switch(f=t,y=n,_.tag){case 1:if(k=_.payload,typeof k=="function"){d=k.call(y,d,f);break e}d=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=_.payload,f=typeof k=="function"?k.call(y,d,f):k,f==null)break e;d=ee({},d,f);break e;case 2:jt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[o]:f.push(o))}else y={eventTime:y,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(u=c=y,a=d):c=c.next=y,l|=f;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;f=o,o=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);fn|=l,e.lanes=l,e.memoizedState=d}}function du(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(E(191,i));i.call(r)}}}var oi={},ot=Yt(oi),Dr=Yt(oi),Ar=Yt(oi);function sn(e){if(e===oi)throw Error(E(174));return e}function Jo(e,t){switch(G(Ar,t),G(Dr,e),G(ot,oi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Il(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Il(t,e)}Y(ot),G(ot,t)}function Wn(){Y(ot),Y(Dr),Y(Ar)}function jd(e){sn(Ar.current);var t=sn(ot.current),n=Il(t,e.type);t!==n&&(G(Dr,e),G(ot,n))}function qo(e){Dr.current===e&&(Y(ot),Y(Dr))}var J=Yt(0);function is(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var al=[];function ea(){for(var e=0;e<al.length;e++)al[e]._workInProgressVersionPrimary=null;al.length=0}var zi=St.ReactCurrentDispatcher,ul=St.ReactCurrentBatchConfig,dn=0,q=null,ae=null,de=null,ss=!1,_r=!1,Fr=0,mm=0;function ve(){throw Error(E(321))}function ta(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!et(e[n],t[n]))return!1;return!0}function na(e,t,n,r,i,s){if(dn=s,q=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,zi.current=e===null||e.memoizedState===null?km:wm,e=n(r,i),_r){s=0;do{if(_r=!1,Fr=0,25<=s)throw Error(E(301));s+=1,de=ae=null,t.updateQueue=null,zi.current=_m,e=n(r,i)}while(_r)}if(zi.current=ls,t=ae!==null&&ae.next!==null,dn=0,de=ae=q=null,ss=!1,t)throw Error(E(300));return e}function ra(){var e=Fr!==0;return Fr=0,e}function it(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return de===null?q.memoizedState=de=e:de=de.next=e,de}function Be(){if(ae===null){var e=q.alternate;e=e!==null?e.memoizedState:null}else e=ae.next;var t=de===null?q.memoizedState:de.next;if(t!==null)de=t,ae=e;else{if(e===null)throw Error(E(310));ae=e,e={memoizedState:ae.memoizedState,baseState:ae.baseState,baseQueue:ae.baseQueue,queue:ae.queue,next:null},de===null?q.memoizedState=de=e:de=de.next=e}return de}function br(e,t){return typeof t=="function"?t(e):t}function cl(e){var t=Be(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=ae,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var l=i.next;i.next=s.next,s.next=l}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var o=l=null,a=null,u=s;do{var c=u.lane;if((dn&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(o=a=d,l=r):a=a.next=d,q.lanes|=c,fn|=c}u=u.next}while(u!==null&&u!==s);a===null?l=r:a.next=o,et(r,t.memoizedState)||(je=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,q.lanes|=s,fn|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function dl(e){var t=Be(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do s=e(s,l.action),l=l.next;while(l!==i);et(s,t.memoizedState)||(je=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Td(){}function Od(e,t){var n=q,r=Be(),i=t(),s=!et(r.memoizedState,i);if(s&&(r.memoizedState=i,je=!0),r=r.queue,ia(Id.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||de!==null&&de.memoizedState.tag&1){if(n.flags|=2048,Vr(9,Pd.bind(null,n,r,i,t),void 0,null),fe===null)throw Error(E(349));dn&30||Ld(n,t,i)}return i}function Ld(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=q.updateQueue,t===null?(t={lastEffect:null,stores:null},q.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Pd(e,t,n,r){t.value=n,t.getSnapshot=r,Rd(t)&&Md(e)}function Id(e,t,n){return n(function(){Rd(t)&&Md(e)})}function Rd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!et(e,n)}catch{return!0}}function Md(e){var t=wt(e,1);t!==null&&Je(t,e,1,-1)}function fu(e){var t=it();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:br,lastRenderedState:e},t.queue=e,e=e.dispatch=ym.bind(null,q,e),[t.memoizedState,e]}function Vr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=q.updateQueue,t===null?(t={lastEffect:null,stores:null},q.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function $d(){return Be().memoizedState}function Di(e,t,n,r){var i=it();q.flags|=e,i.memoizedState=Vr(1|t,n,void 0,r===void 0?null:r)}function Os(e,t,n,r){var i=Be();r=r===void 0?null:r;var s=void 0;if(ae!==null){var l=ae.memoizedState;if(s=l.destroy,r!==null&&ta(r,l.deps)){i.memoizedState=Vr(t,n,s,r);return}}q.flags|=e,i.memoizedState=Vr(1|t,n,s,r)}function hu(e,t){return Di(8390656,8,e,t)}function ia(e,t){return Os(2048,8,e,t)}function zd(e,t){return Os(4,2,e,t)}function Dd(e,t){return Os(4,4,e,t)}function Ad(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Fd(e,t,n){return n=n!=null?n.concat([e]):null,Os(4,4,Ad.bind(null,t,e),n)}function sa(){}function bd(e,t){var n=Be();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ta(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Vd(e,t){var n=Be();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ta(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ud(e,t,n){return dn&21?(et(n,t)||(n=Gc(),q.lanes|=n,fn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,je=!0),e.memoizedState=n)}function vm(e,t){var n=H;H=n!==0&&4>n?n:4,e(!0);var r=ul.transition;ul.transition={};try{e(!1),t()}finally{H=n,ul.transition=r}}function Zd(){return Be().memoizedState}function gm(e,t,n){var r=Ft(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bd(e))Wd(t,n);else if(n=Nd(e,t,n,r),n!==null){var i=xe();Je(n,e,r,i),Hd(n,t,r)}}function ym(e,t,n){var r=Ft(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bd(e))Wd(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var l=t.lastRenderedState,o=s(l,n);if(i.hasEagerState=!0,i.eagerState=o,et(o,l)){var a=t.interleaved;a===null?(i.next=i,Ko(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Nd(e,t,i,r),n!==null&&(i=xe(),Je(n,e,r,i),Hd(n,t,r))}}function Bd(e){var t=e.alternate;return e===q||t!==null&&t===q}function Wd(e,t){_r=ss=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zo(e,n)}}var ls={readContext:Ze,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useInsertionEffect:ve,useLayoutEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useMutableSource:ve,useSyncExternalStore:ve,useId:ve,unstable_isNewReconciler:!1},km={readContext:Ze,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:Ze,useEffect:hu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Di(4194308,4,Ad.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Di(4194308,4,e,t)},useInsertionEffect:function(e,t){return Di(4,2,e,t)},useMemo:function(e,t){var n=it();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=it();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=gm.bind(null,q,e),[r.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:fu,useDebugValue:sa,useDeferredValue:function(e){return it().memoizedState=e},useTransition:function(){var e=fu(!1),t=e[0];return e=vm.bind(null,e[1]),it().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=q,i=it();if(K){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),fe===null)throw Error(E(349));dn&30||Ld(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,hu(Id.bind(null,r,s,e),[e]),r.flags|=2048,Vr(9,Pd.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=it(),t=fe.identifierPrefix;if(K){var n=vt,r=mt;n=(r&~(1<<32-Xe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=mm++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},wm={readContext:Ze,useCallback:bd,useContext:Ze,useEffect:ia,useImperativeHandle:Fd,useInsertionEffect:zd,useLayoutEffect:Dd,useMemo:Vd,useReducer:cl,useRef:$d,useState:function(){return cl(br)},useDebugValue:sa,useDeferredValue:function(e){var t=Be();return Ud(t,ae.memoizedState,e)},useTransition:function(){var e=cl(br)[0],t=Be().memoizedState;return[e,t]},useMutableSource:Td,useSyncExternalStore:Od,useId:Zd,unstable_isNewReconciler:!1},_m={readContext:Ze,useCallback:bd,useContext:Ze,useEffect:ia,useImperativeHandle:Fd,useInsertionEffect:zd,useLayoutEffect:Dd,useMemo:Vd,useReducer:dl,useRef:$d,useState:function(){return dl(br)},useDebugValue:sa,useDeferredValue:function(e){var t=Be();return ae===null?t.memoizedState=e:Ud(t,ae.memoizedState,e)},useTransition:function(){var e=dl(br)[0],t=Be().memoizedState;return[e,t]},useMutableSource:Td,useSyncExternalStore:Od,useId:Zd,unstable_isNewReconciler:!1};function Ge(e,t){if(e&&e.defaultProps){t=ee({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ql(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ls={isMounted:function(e){return(e=e._reactInternals)?gn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xe(),i=Ft(e),s=gt(r,i);s.payload=t,n!=null&&(s.callback=n),t=Dt(e,s,i),t!==null&&(Je(t,e,i,r),$i(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xe(),i=Ft(e),s=gt(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Dt(e,s,i),t!==null&&(Je(t,e,i,r),$i(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xe(),r=Ft(e),i=gt(n,r);i.tag=2,t!=null&&(i.callback=t),t=Dt(e,i,r),t!==null&&(Je(t,e,r,n),$i(t,e,r))}};function pu(e,t,n,r,i,s,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,l):t.prototype&&t.prototype.isPureReactComponent?!Rr(n,r)||!Rr(i,s):!0}function Gd(e,t,n){var r=!1,i=Zt,s=t.contextType;return typeof s=="object"&&s!==null?s=Ze(s):(i=Oe(t)?un:ke.current,r=t.contextTypes,s=(r=r!=null)?Un(e,i):Zt),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ls,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function mu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ls.enqueueReplaceState(t,t.state,null)}function eo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Xo(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Ze(s):(s=Oe(t)?un:ke.current,i.context=Un(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(ql(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ls.enqueueReplaceState(i,i.state,null),rs(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Hn(e,t){try{var n="",r=t;do n+=Yh(r),r=r.return;while(r);var i=n}catch(s){i=`
39
- Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function fl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function to(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var xm=typeof WeakMap=="function"?WeakMap:Map;function Qd(e,t,n){n=gt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){as||(as=!0,fo=r),to(e,t)},n}function Yd(e,t,n){n=gt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){to(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){to(e,t),typeof r!="function"&&(At===null?At=new Set([this]):At.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function vu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new xm;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zm.bind(null,e,t,n),t.then(e,e))}function gu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function yu(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=gt(-1,1),t.tag=2,Dt(n,t,1))),n.lanes|=1),e)}var Em=St.ReactCurrentOwner,je=!1;function _e(e,t,n,r){t.child=e===null?Sd(t,null,n,r):Bn(t,e.child,n,r)}function ku(e,t,n,r,i){n=n.render;var s=t.ref;return An(t,i),r=na(e,t,n,r,s,i),n=ra(),e!==null&&!je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,_t(e,t,i)):(K&&n&&Bo(t),t.flags|=1,_e(e,t,r,i),t.child)}function wu(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!ha(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Kd(e,t,s,r,i)):(e=Vi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var l=s.memoizedProps;if(n=n.compare,n=n!==null?n:Rr,n(l,r)&&e.ref===t.ref)return _t(e,t,i)}return t.flags|=1,e=bt(s,r),e.ref=t.ref,e.return=t,t.child=e}function Kd(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Rr(s,r)&&e.ref===t.ref)if(je=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(je=!0);else return t.lanes=e.lanes,_t(e,t,i)}return no(e,t,n,r,i)}function Xd(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(In,Ie),Ie|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,G(In,Ie),Ie|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,G(In,Ie),Ie|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,G(In,Ie),Ie|=r;return _e(e,t,i,n),t.child}function Jd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function no(e,t,n,r,i){var s=Oe(n)?un:ke.current;return s=Un(t,s),An(t,i),n=na(e,t,n,r,s,i),r=ra(),e!==null&&!je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,_t(e,t,i)):(K&&r&&Bo(t),t.flags|=1,_e(e,t,n,i),t.child)}function _u(e,t,n,r,i){if(Oe(n)){var s=!0;Ji(t)}else s=!1;if(An(t,i),t.stateNode===null)Ai(e,t),Gd(t,n,r),eo(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var a=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ze(u):(u=Oe(n)?un:ke.current,u=Un(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==r||a!==u)&&mu(t,l,r,u),jt=!1;var f=t.memoizedState;l.state=f,rs(t,r,l,i),a=t.memoizedState,o!==r||f!==a||Te.current||jt?(typeof c=="function"&&(ql(t,n,c,r),a=t.memoizedState),(o=jt||pu(t,n,o,r,f,a,u))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),l.props=r,l.state=a,l.context=u,r=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Cd(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:Ge(t.type,o),l.props=u,d=t.pendingProps,f=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=Ze(a):(a=Oe(n)?un:ke.current,a=Un(t,a));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==d||f!==a)&&mu(t,l,r,a),jt=!1,f=t.memoizedState,l.state=f,rs(t,r,l,i);var k=t.memoizedState;o!==d||f!==k||Te.current||jt?(typeof y=="function"&&(ql(t,n,y,r),k=t.memoizedState),(u=jt||pu(t,n,u,r,f,k,a)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,k,a),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,k,a)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),l.props=r,l.state=k,l.context=a,r=u):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ro(e,t,n,r,s,i)}function ro(e,t,n,r,i,s){Jd(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&lu(t,n,!1),_t(e,t,s);r=t.stateNode,Em.current=t;var o=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Bn(t,e.child,null,s),t.child=Bn(t,null,o,s)):_e(e,t,o,s),t.memoizedState=r.state,i&&lu(t,n,!0),t.child}function qd(e){var t=e.stateNode;t.pendingContext?su(e,t.pendingContext,t.pendingContext!==t.context):t.context&&su(e,t.context,!1),Jo(e,t.containerInfo)}function xu(e,t,n,r,i){return Zn(),Ho(i),t.flags|=256,_e(e,t,n,r),t.child}var io={dehydrated:null,treeContext:null,retryLane:0};function so(e){return{baseLanes:e,cachePool:null,transitions:null}}function ef(e,t,n){var r=t.pendingProps,i=J.current,s=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),G(J,i&1),e===null)return Xl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,s?(r=t.mode,s=t.child,l={mode:"hidden",children:l},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=l):s=Rs(l,r,0,null),e=on(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=so(n),t.memoizedState=io,e):la(t,l));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return Sm(e,t,l,r,o,i,n);if(s){s=r.fallback,l=t.mode,i=e.child,o=i.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=bt(i,a),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=bt(o,s):(s=on(s,l,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,l=e.child.memoizedState,l=l===null?so(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=io,r}return s=e.child,e=s.sibling,r=bt(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function la(e,t){return t=Rs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Si(e,t,n,r){return r!==null&&Ho(r),Bn(t,e.child,null,n),e=la(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sm(e,t,n,r,i,s,l){if(n)return t.flags&256?(t.flags&=-257,r=fl(Error(E(422))),Si(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Rs({mode:"visible",children:r.children},i,0,null),s=on(s,i,l,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Bn(t,e.child,null,l),t.child.memoizedState=so(l),t.memoizedState=io,s);if(!(t.mode&1))return Si(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(E(419)),r=fl(s,r,void 0),Si(e,t,l,r)}if(o=(l&e.childLanes)!==0,je||o){if(r=fe,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,wt(e,i),Je(r,e,i,-1))}return fa(),r=fl(Error(E(421))),Si(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Dm.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Re=zt(i.nextSibling),Me=t,K=!0,Ye=null,e!==null&&(Fe[be++]=mt,Fe[be++]=vt,Fe[be++]=cn,mt=e.id,vt=e.overflow,cn=t),t=la(t,r.children),t.flags|=4096,t)}function Eu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Jl(e.return,t,n)}function hl(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function tf(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(_e(e,t,r.children,n),r=J.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Eu(e,n,t);else if(e.tag===19)Eu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(G(J,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&is(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),hl(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&is(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}hl(t,!0,n,null,s);break;case"together":hl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ai(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _t(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),fn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=bt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Nm(e,t,n){switch(t.tag){case 3:qd(t),Zn();break;case 5:jd(t);break;case 1:Oe(t.type)&&Ji(t);break;case 4:Jo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;G(ts,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(G(J,J.current&1),t.flags|=128,null):n&t.child.childLanes?ef(e,t,n):(G(J,J.current&1),e=_t(e,t,n),e!==null?e.sibling:null);G(J,J.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return tf(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),G(J,J.current),r)break;return null;case 22:case 23:return t.lanes=0,Xd(e,t,n)}return _t(e,t,n)}var nf,lo,rf,sf;nf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};lo=function(){};rf=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,sn(ot.current);var s=null;switch(n){case"input":i=Tl(e,i),r=Tl(e,r),s=[];break;case"select":i=ee({},i,{value:void 0}),r=ee({},r,{value:void 0}),s=[];break;case"textarea":i=Pl(e,i),r=Pl(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ki)}Rl(n,r);var l;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(l in o)o.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Cr.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(o=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==o&&(a!=null||o!=null))if(u==="style")if(o){for(l in o)!o.hasOwnProperty(l)||a&&a.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in a)a.hasOwnProperty(l)&&o[l]!==a[l]&&(n||(n={}),n[l]=a[l])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,o=o?o.__html:void 0,a!=null&&o!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Cr.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Q("scroll",e),s||o===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};sf=function(e,t,n,r){n!==r&&(t.flags|=4)};function or(e,t){if(!K)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Cm(e,t,n){var r=t.pendingProps;switch(Wo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ge(t),null;case 1:return Oe(t.type)&&Xi(),ge(t),null;case 3:return r=t.stateNode,Wn(),Y(Te),Y(ke),ea(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ye!==null&&(mo(Ye),Ye=null))),lo(e,t),ge(t),null;case 5:qo(t);var i=sn(Ar.current);if(n=t.type,e!==null&&t.stateNode!=null)rf(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return ge(t),null}if(e=sn(ot.current),xi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[st]=t,r[zr]=s,e=(t.mode&1)!==0,n){case"dialog":Q("cancel",r),Q("close",r);break;case"iframe":case"object":case"embed":Q("load",r);break;case"video":case"audio":for(i=0;i<fr.length;i++)Q(fr[i],r);break;case"source":Q("error",r);break;case"img":case"image":case"link":Q("error",r),Q("load",r);break;case"details":Q("toggle",r);break;case"input":Ia(r,s),Q("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Q("invalid",r);break;case"textarea":Ma(r,s),Q("invalid",r)}Rl(n,s),i=null;for(var l in s)if(s.hasOwnProperty(l)){var o=s[l];l==="children"?typeof o=="string"?r.textContent!==o&&(s.suppressHydrationWarning!==!0&&_i(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&_i(r.textContent,o,e),i=["children",""+o]):Cr.hasOwnProperty(l)&&o!=null&&l==="onScroll"&&Q("scroll",r)}switch(n){case"input":hi(r),Ra(r,s,!0);break;case"textarea":hi(r),$a(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ki)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ic(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[st]=t,e[zr]=r,nf(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ml(n,r),n){case"dialog":Q("cancel",e),Q("close",e),i=r;break;case"iframe":case"object":case"embed":Q("load",e),i=r;break;case"video":case"audio":for(i=0;i<fr.length;i++)Q(fr[i],e);i=r;break;case"source":Q("error",e),i=r;break;case"img":case"image":case"link":Q("error",e),Q("load",e),i=r;break;case"details":Q("toggle",e),i=r;break;case"input":Ia(e,r),i=Tl(e,r),Q("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ee({},r,{value:void 0}),Q("invalid",e);break;case"textarea":Ma(e,r),i=Pl(e,r),Q("invalid",e);break;default:i=r}Rl(n,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="style"?$c(e,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Rc(e,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&jr(e,a):typeof a=="number"&&jr(e,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Cr.hasOwnProperty(s)?a!=null&&s==="onScroll"&&Q("scroll",e):a!=null&&Lo(e,s,a,l))}switch(n){case"input":hi(e),Ra(e,r,!1);break;case"textarea":hi(e),$a(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ut(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Mn(e,!!r.multiple,s,!1):r.defaultValue!=null&&Mn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ki)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ge(t),null;case 6:if(e&&t.stateNode!=null)sf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(E(166));if(n=sn(Ar.current),sn(ot.current),xi(t)){if(r=t.stateNode,n=t.memoizedProps,r[st]=t,(s=r.nodeValue!==n)&&(e=Me,e!==null))switch(e.tag){case 3:_i(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_i(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[st]=t,t.stateNode=r}return ge(t),null;case 13:if(Y(J),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(K&&Re!==null&&t.mode&1&&!(t.flags&128))xd(),Zn(),t.flags|=98560,s=!1;else if(s=xi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(E(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(E(317));s[st]=t}else Zn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ge(t),s=!1}else Ye!==null&&(mo(Ye),Ye=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||J.current&1?ue===0&&(ue=3):fa())),t.updateQueue!==null&&(t.flags|=4),ge(t),null);case 4:return Wn(),lo(e,t),e===null&&Mr(t.stateNode.containerInfo),ge(t),null;case 10:return Yo(t.type._context),ge(t),null;case 17:return Oe(t.type)&&Xi(),ge(t),null;case 19:if(Y(J),s=t.memoizedState,s===null)return ge(t),null;if(r=(t.flags&128)!==0,l=s.rendering,l===null)if(r)or(s,!1);else{if(ue!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=is(e),l!==null){for(t.flags|=128,or(s,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,l=s.alternate,l===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return G(J,J.current&1|2),t.child}e=e.sibling}s.tail!==null&&re()>Gn&&(t.flags|=128,r=!0,or(s,!1),t.lanes=4194304)}else{if(!r)if(e=is(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),or(s,!0),s.tail===null&&s.tailMode==="hidden"&&!l.alternate&&!K)return ge(t),null}else 2*re()-s.renderingStartTime>Gn&&n!==1073741824&&(t.flags|=128,r=!0,or(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(n=s.last,n!==null?n.sibling=l:t.child=l,s.last=l)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=re(),t.sibling=null,n=J.current,G(J,r?n&1|2:n&1),t):(ge(t),null);case 22:case 23:return da(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ie&1073741824&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function jm(e,t){switch(Wo(t),t.tag){case 1:return Oe(t.type)&&Xi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(),Y(Te),Y(ke),ea(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qo(t),null;case 13:if(Y(J),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));Zn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(J),null;case 4:return Wn(),null;case 10:return Yo(t.type._context),null;case 22:case 23:return da(),null;case 24:return null;default:return null}}var Ni=!1,ye=!1,Tm=typeof WeakSet=="function"?WeakSet:Set,P=null;function Pn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){te(e,t,r)}else n.current=null}function oo(e,t,n){try{n()}catch(r){te(e,t,r)}}var Su=!1;function Om(e,t){if(Bl=Gi,e=ud(),Zo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var l=0,o=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var y;d!==n||i!==0&&d.nodeType!==3||(o=l+i),d!==s||r!==0&&d.nodeType!==3||(a=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(y=d.firstChild)!==null;)f=d,d=y;for(;;){if(d===e)break t;if(f===n&&++u===i&&(o=l),f===s&&++c===r&&(a=l),(y=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=y}n=o===-1||a===-1?null:{start:o,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Wl={focusedElem:e,selectionRange:n},Gi=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var _=k.memoizedProps,T=k.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?_:Ge(t.type,_),T);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(w){te(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return k=Su,Su=!1,k}function xr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&oo(t,n,s)}i=i.next}while(i!==r)}}function Ps(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ao(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function lf(e){var t=e.alternate;t!==null&&(e.alternate=null,lf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[st],delete t[zr],delete t[Ql],delete t[dm],delete t[fm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function of(e){return e.tag===5||e.tag===3||e.tag===4}function Nu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||of(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ki));else if(r!==4&&(e=e.child,e!==null))for(uo(e,t,n),e=e.sibling;e!==null;)uo(e,t,n),e=e.sibling}function co(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(co(e,t,n),e=e.sibling;e!==null;)co(e,t,n),e=e.sibling}var he=null,Qe=!1;function Nt(e,t,n){for(n=n.child;n!==null;)af(e,t,n),n=n.sibling}function af(e,t,n){if(lt&&typeof lt.onCommitFiberUnmount=="function")try{lt.onCommitFiberUnmount(Es,n)}catch{}switch(n.tag){case 5:ye||Pn(n,t);case 6:var r=he,i=Qe;he=null,Nt(e,t,n),he=r,Qe=i,he!==null&&(Qe?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(Qe?(e=he,n=n.stateNode,e.nodeType===8?ll(e.parentNode,n):e.nodeType===1&&ll(e,n),Pr(e)):ll(he,n.stateNode));break;case 4:r=he,i=Qe,he=n.stateNode.containerInfo,Qe=!0,Nt(e,t,n),he=r,Qe=i;break;case 0:case 11:case 14:case 15:if(!ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,l=s.destroy;s=s.tag,l!==void 0&&(s&2||s&4)&&oo(n,t,l),i=i.next}while(i!==r)}Nt(e,t,n);break;case 1:if(!ye&&(Pn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){te(n,t,o)}Nt(e,t,n);break;case 21:Nt(e,t,n);break;case 22:n.mode&1?(ye=(r=ye)||n.memoizedState!==null,Nt(e,t,n),ye=r):Nt(e,t,n);break;default:Nt(e,t,n)}}function Cu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Tm),t.forEach(function(r){var i=Am.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function He(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 5:he=o.stateNode,Qe=!1;break e;case 3:he=o.stateNode.containerInfo,Qe=!0;break e;case 4:he=o.stateNode.containerInfo,Qe=!0;break e}o=o.return}if(he===null)throw Error(E(160));af(s,l,i),he=null,Qe=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){te(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)uf(t,e),t=t.sibling}function uf(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(He(t,e),rt(e),r&4){try{xr(3,e,e.return),Ps(3,e)}catch(_){te(e,e.return,_)}try{xr(5,e,e.return)}catch(_){te(e,e.return,_)}}break;case 1:He(t,e),rt(e),r&512&&n!==null&&Pn(n,n.return);break;case 5:if(He(t,e),rt(e),r&512&&n!==null&&Pn(n,n.return),e.flags&32){var i=e.stateNode;try{jr(i,"")}catch(_){te(e,e.return,_)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,l=n!==null?n.memoizedProps:s,o=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&Lc(i,s),Ml(o,l);var u=Ml(o,s);for(l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];c==="style"?$c(i,d):c==="dangerouslySetInnerHTML"?Rc(i,d):c==="children"?jr(i,d):Lo(i,c,d,u)}switch(o){case"input":Ol(i,s);break;case"textarea":Pc(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var y=s.value;y!=null?Mn(i,!!s.multiple,y,!1):f!==!!s.multiple&&(s.defaultValue!=null?Mn(i,!!s.multiple,s.defaultValue,!0):Mn(i,!!s.multiple,s.multiple?[]:"",!1))}i[zr]=s}catch(_){te(e,e.return,_)}}break;case 6:if(He(t,e),rt(e),r&4){if(e.stateNode===null)throw Error(E(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(_){te(e,e.return,_)}}break;case 3:if(He(t,e),rt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pr(t.containerInfo)}catch(_){te(e,e.return,_)}break;case 4:He(t,e),rt(e);break;case 13:He(t,e),rt(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(ua=re())),r&4&&Cu(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(ye=(u=ye)||c,He(t,e),ye=u):He(t,e),rt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(P=e,c=e.child;c!==null;){for(d=P=c;P!==null;){switch(f=P,y=f.child,f.tag){case 0:case 11:case 14:case 15:xr(4,f,f.return);break;case 1:Pn(f,f.return);var k=f.stateNode;if(typeof k.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(_){te(r,n,_)}}break;case 5:Pn(f,f.return);break;case 22:if(f.memoizedState!==null){Tu(d);continue}}y!==null?(y.return=f,P=y):Tu(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=d.stateNode,a=d.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,o.style.display=Mc("display",l))}catch(_){te(e,e.return,_)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(_){te(e,e.return,_)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:He(t,e),rt(e),r&4&&Cu(e);break;case 21:break;default:He(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(of(n)){var r=n;break e}n=n.return}throw Error(E(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(jr(i,""),r.flags&=-33);var s=Nu(e);co(e,s,i);break;case 3:case 4:var l=r.stateNode.containerInfo,o=Nu(e);uo(e,o,l);break;default:throw Error(E(161))}}catch(a){te(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lm(e,t,n){P=e,cf(e)}function cf(e,t,n){for(var r=(e.mode&1)!==0;P!==null;){var i=P,s=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||Ni;if(!l){var o=i.alternate,a=o!==null&&o.memoizedState!==null||ye;o=Ni;var u=ye;if(Ni=l,(ye=a)&&!u)for(P=i;P!==null;)l=P,a=l.child,l.tag===22&&l.memoizedState!==null?Ou(i):a!==null?(a.return=l,P=a):Ou(i);for(;s!==null;)P=s,cf(s),s=s.sibling;P=i,Ni=o,ye=u}ju(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,P=s):ju(e)}}function ju(e){for(;P!==null;){var t=P;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ye||Ps(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ye)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ge(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&du(t,s,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}du(t,l,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Pr(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}ye||t.flags&512&&ao(t)}catch(f){te(t,t.return,f)}}if(t===e){P=null;break}if(n=t.sibling,n!==null){n.return=t.return,P=n;break}P=t.return}}function Tu(e){for(;P!==null;){var t=P;if(t===e){P=null;break}var n=t.sibling;if(n!==null){n.return=t.return,P=n;break}P=t.return}}function Ou(e){for(;P!==null;){var t=P;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ps(4,t)}catch(a){te(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){te(t,i,a)}}var s=t.return;try{ao(t)}catch(a){te(t,s,a)}break;case 5:var l=t.return;try{ao(t)}catch(a){te(t,l,a)}}}catch(a){te(t,t.return,a)}if(t===e){P=null;break}var o=t.sibling;if(o!==null){o.return=t.return,P=o;break}P=t.return}}var Pm=Math.ceil,os=St.ReactCurrentDispatcher,oa=St.ReactCurrentOwner,Ue=St.ReactCurrentBatchConfig,W=0,fe=null,le=null,pe=0,Ie=0,In=Yt(0),ue=0,Ur=null,fn=0,Is=0,aa=0,Er=null,Ce=null,ua=0,Gn=1/0,ft=null,as=!1,fo=null,At=null,Ci=!1,It=null,us=0,Sr=0,ho=null,Fi=-1,bi=0;function xe(){return W&6?re():Fi!==-1?Fi:Fi=re()}function Ft(e){return e.mode&1?W&2&&pe!==0?pe&-pe:pm.transition!==null?(bi===0&&(bi=Gc()),bi):(e=H,e!==0||(e=window.event,e=e===void 0?16:ed(e.type)),e):1}function Je(e,t,n,r){if(50<Sr)throw Sr=0,ho=null,Error(E(185));ii(e,n,r),(!(W&2)||e!==fe)&&(e===fe&&(!(W&2)&&(Is|=n),ue===4&&Ot(e,pe)),Le(e,r),n===1&&W===0&&!(t.mode&1)&&(Gn=re()+500,Ts&&Kt()))}function Le(e,t){var n=e.callbackNode;pp(e,t);var r=Hi(e,e===fe?pe:0);if(r===0)n!==null&&Aa(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Aa(n),t===1)e.tag===0?hm(Lu.bind(null,e)):kd(Lu.bind(null,e)),um(function(){!(W&6)&&Kt()}),n=null;else{switch(Qc(r)){case 1:n=$o;break;case 4:n=Wc;break;case 16:n=Wi;break;case 536870912:n=Hc;break;default:n=Wi}n=yf(n,df.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function df(e,t){if(Fi=-1,bi=0,W&6)throw Error(E(327));var n=e.callbackNode;if(Fn()&&e.callbackNode!==n)return null;var r=Hi(e,e===fe?pe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=cs(e,r);else{t=r;var i=W;W|=2;var s=hf();(fe!==e||pe!==t)&&(ft=null,Gn=re()+500,ln(e,t));do try{Mm();break}catch(o){ff(e,o)}while(!0);Qo(),os.current=s,W=i,le!==null?t=0:(fe=null,pe=0,t=ue)}if(t!==0){if(t===2&&(i=Fl(e),i!==0&&(r=i,t=po(e,i))),t===1)throw n=Ur,ln(e,0),Ot(e,r),Le(e,re()),n;if(t===6)Ot(e,r);else{if(i=e.current.alternate,!(r&30)&&!Im(i)&&(t=cs(e,r),t===2&&(s=Fl(e),s!==0&&(r=s,t=po(e,s))),t===1))throw n=Ur,ln(e,0),Ot(e,r),Le(e,re()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(E(345));case 2:tn(e,Ce,ft);break;case 3:if(Ot(e,r),(r&130023424)===r&&(t=ua+500-re(),10<t)){if(Hi(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){xe(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Gl(tn.bind(null,e,Ce,ft),t);break}tn(e,Ce,ft);break;case 4:if(Ot(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-Xe(r);s=1<<l,l=t[l],l>i&&(i=l),r&=~s}if(r=i,r=re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Pm(r/1960))-r,10<r){e.timeoutHandle=Gl(tn.bind(null,e,Ce,ft),r);break}tn(e,Ce,ft);break;case 5:tn(e,Ce,ft);break;default:throw Error(E(329))}}}return Le(e,re()),e.callbackNode===n?df.bind(null,e):null}function po(e,t){var n=Er;return e.current.memoizedState.isDehydrated&&(ln(e,t).flags|=256),e=cs(e,t),e!==2&&(t=Ce,Ce=n,t!==null&&mo(t)),e}function mo(e){Ce===null?Ce=e:Ce.push.apply(Ce,e)}function Im(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!et(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ot(e,t){for(t&=~aa,t&=~Is,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Xe(t),r=1<<n;e[n]=-1,t&=~r}}function Lu(e){if(W&6)throw Error(E(327));Fn();var t=Hi(e,0);if(!(t&1))return Le(e,re()),null;var n=cs(e,t);if(e.tag!==0&&n===2){var r=Fl(e);r!==0&&(t=r,n=po(e,r))}if(n===1)throw n=Ur,ln(e,0),Ot(e,t),Le(e,re()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,tn(e,Ce,ft),Le(e,re()),null}function ca(e,t){var n=W;W|=1;try{return e(t)}finally{W=n,W===0&&(Gn=re()+500,Ts&&Kt())}}function hn(e){It!==null&&It.tag===0&&!(W&6)&&Fn();var t=W;W|=1;var n=Ue.transition,r=H;try{if(Ue.transition=null,H=1,e)return e()}finally{H=r,Ue.transition=n,W=t,!(W&6)&&Kt()}}function da(){Ie=In.current,Y(In)}function ln(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,am(n)),le!==null)for(n=le.return;n!==null;){var r=n;switch(Wo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xi();break;case 3:Wn(),Y(Te),Y(ke),ea();break;case 5:qo(r);break;case 4:Wn();break;case 13:Y(J);break;case 19:Y(J);break;case 10:Yo(r.type._context);break;case 22:case 23:da()}n=n.return}if(fe=e,le=e=bt(e.current,null),pe=Ie=t,ue=0,Ur=null,aa=Is=fn=0,Ce=Er=null,rn!==null){for(t=0;t<rn.length;t++)if(n=rn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var l=s.next;s.next=i,r.next=l}n.pending=r}rn=null}return e}function ff(e,t){do{var n=le;try{if(Qo(),zi.current=ls,ss){for(var r=q.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ss=!1}if(dn=0,de=ae=q=null,_r=!1,Fr=0,oa.current=null,n===null||n.return===null){ue=1,Ur=t,le=null;break}e:{var s=e,l=n.return,o=n,a=t;if(t=pe,o.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=o,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var y=gu(l);if(y!==null){y.flags&=-257,yu(y,l,o,s,t),y.mode&1&&vu(s,u,t),t=y,a=u;var k=t.updateQueue;if(k===null){var _=new Set;_.add(a),t.updateQueue=_}else k.add(a);break e}else{if(!(t&1)){vu(s,u,t),fa();break e}a=Error(E(426))}}else if(K&&o.mode&1){var T=gu(l);if(T!==null){!(T.flags&65536)&&(T.flags|=256),yu(T,l,o,s,t),Ho(Hn(a,o));break e}}s=a=Hn(a,o),ue!==4&&(ue=2),Er===null?Er=[s]:Er.push(s),s=l;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=Qd(s,a,t);cu(s,m);break e;case 1:o=a;var p=s.type,g=s.stateNode;if(!(s.flags&128)&&(typeof p.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(At===null||!At.has(g)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=Yd(s,o,t);cu(s,w);break e}}s=s.return}while(s!==null)}mf(n)}catch(C){t=C,le===n&&n!==null&&(le=n=n.return);continue}break}while(!0)}function hf(){var e=os.current;return os.current=ls,e===null?ls:e}function fa(){(ue===0||ue===3||ue===2)&&(ue=4),fe===null||!(fn&268435455)&&!(Is&268435455)||Ot(fe,pe)}function cs(e,t){var n=W;W|=2;var r=hf();(fe!==e||pe!==t)&&(ft=null,ln(e,t));do try{Rm();break}catch(i){ff(e,i)}while(!0);if(Qo(),W=n,os.current=r,le!==null)throw Error(E(261));return fe=null,pe=0,ue}function Rm(){for(;le!==null;)pf(le)}function Mm(){for(;le!==null&&!sp();)pf(le)}function pf(e){var t=gf(e.alternate,e,Ie);e.memoizedProps=e.pendingProps,t===null?mf(e):le=t,oa.current=null}function mf(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=jm(n,t),n!==null){n.flags&=32767,le=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ue=6,le=null;return}}else if(n=Cm(n,t,Ie),n!==null){le=n;return}if(t=t.sibling,t!==null){le=t;return}le=t=e}while(t!==null);ue===0&&(ue=5)}function tn(e,t,n){var r=H,i=Ue.transition;try{Ue.transition=null,H=1,$m(e,t,n,r)}finally{Ue.transition=i,H=r}return null}function $m(e,t,n,r){do Fn();while(It!==null);if(W&6)throw Error(E(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(E(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(mp(e,s),e===fe&&(le=fe=null,pe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ci||(Ci=!0,yf(Wi,function(){return Fn(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Ue.transition,Ue.transition=null;var l=H;H=1;var o=W;W|=4,oa.current=null,Om(e,n),uf(n,e),tm(Wl),Gi=!!Bl,Wl=Bl=null,e.current=n,Lm(n),lp(),W=o,H=l,Ue.transition=s}else e.current=n;if(Ci&&(Ci=!1,It=e,us=i),s=e.pendingLanes,s===0&&(At=null),up(n.stateNode),Le(e,re()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(as)throw as=!1,e=fo,fo=null,e;return us&1&&e.tag!==0&&Fn(),s=e.pendingLanes,s&1?e===ho?Sr++:(Sr=0,ho=e):Sr=0,Kt(),null}function Fn(){if(It!==null){var e=Qc(us),t=Ue.transition,n=H;try{if(Ue.transition=null,H=16>e?16:e,It===null)var r=!1;else{if(e=It,It=null,us=0,W&6)throw Error(E(331));var i=W;for(W|=4,P=e.current;P!==null;){var s=P,l=s.child;if(P.flags&16){var o=s.deletions;if(o!==null){for(var a=0;a<o.length;a++){var u=o[a];for(P=u;P!==null;){var c=P;switch(c.tag){case 0:case 11:case 15:xr(8,c,s)}var d=c.child;if(d!==null)d.return=c,P=d;else for(;P!==null;){c=P;var f=c.sibling,y=c.return;if(lf(c),c===u){P=null;break}if(f!==null){f.return=y,P=f;break}P=y}}}var k=s.alternate;if(k!==null){var _=k.child;if(_!==null){k.child=null;do{var T=_.sibling;_.sibling=null,_=T}while(_!==null)}}P=s}}if(s.subtreeFlags&2064&&l!==null)l.return=s,P=l;else e:for(;P!==null;){if(s=P,s.flags&2048)switch(s.tag){case 0:case 11:case 15:xr(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,P=m;break e}P=s.return}}var p=e.current;for(P=p;P!==null;){l=P;var g=l.child;if(l.subtreeFlags&2064&&g!==null)g.return=l,P=g;else e:for(l=p;P!==null;){if(o=P,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Ps(9,o)}}catch(C){te(o,o.return,C)}if(o===l){P=null;break e}var w=o.sibling;if(w!==null){w.return=o.return,P=w;break e}P=o.return}}if(W=i,Kt(),lt&&typeof lt.onPostCommitFiberRoot=="function")try{lt.onPostCommitFiberRoot(Es,e)}catch{}r=!0}return r}finally{H=n,Ue.transition=t}}return!1}function Pu(e,t,n){t=Hn(n,t),t=Qd(e,t,1),e=Dt(e,t,1),t=xe(),e!==null&&(ii(e,1,t),Le(e,t))}function te(e,t,n){if(e.tag===3)Pu(e,e,n);else for(;t!==null;){if(t.tag===3){Pu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(At===null||!At.has(r))){e=Hn(n,e),e=Yd(t,e,1),t=Dt(t,e,1),e=xe(),t!==null&&(ii(t,1,e),Le(t,e));break}}t=t.return}}function zm(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=xe(),e.pingedLanes|=e.suspendedLanes&n,fe===e&&(pe&n)===n&&(ue===4||ue===3&&(pe&130023424)===pe&&500>re()-ua?ln(e,0):aa|=n),Le(e,t)}function vf(e,t){t===0&&(e.mode&1?(t=vi,vi<<=1,!(vi&130023424)&&(vi=4194304)):t=1);var n=xe();e=wt(e,t),e!==null&&(ii(e,t,n),Le(e,n))}function Dm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vf(e,n)}function Am(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),vf(e,n)}var gf;gf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Te.current)je=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return je=!1,Nm(e,t,n);je=!!(e.flags&131072)}else je=!1,K&&t.flags&1048576&&wd(t,es,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ai(e,t),e=t.pendingProps;var i=Un(t,ke.current);An(t,n),i=na(null,t,r,e,i,n);var s=ra();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oe(r)?(s=!0,Ji(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Xo(t),i.updater=Ls,t.stateNode=i,i._reactInternals=t,eo(t,r,e,n),t=ro(null,t,r,!0,s,n)):(t.tag=0,K&&s&&Bo(t),_e(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ai(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=bm(r),e=Ge(r,e),i){case 0:t=no(null,t,r,e,n);break e;case 1:t=_u(null,t,r,e,n);break e;case 11:t=ku(null,t,r,e,n);break e;case 14:t=wu(null,t,r,Ge(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ge(r,i),no(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ge(r,i),_u(e,t,r,i,n);case 3:e:{if(qd(t),e===null)throw Error(E(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Cd(e,t),rs(t,r,null,n);var l=t.memoizedState;if(r=l.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Hn(Error(E(423)),t),t=xu(e,t,r,n,i);break e}else if(r!==i){i=Hn(Error(E(424)),t),t=xu(e,t,r,n,i);break e}else for(Re=zt(t.stateNode.containerInfo.firstChild),Me=t,K=!0,Ye=null,n=Sd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zn(),r===i){t=_t(e,t,n);break e}_e(e,t,r,n)}t=t.child}return t;case 5:return jd(t),e===null&&Xl(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,l=i.children,Hl(r,i)?l=null:s!==null&&Hl(r,s)&&(t.flags|=32),Jd(e,t),_e(e,t,l,n),t.child;case 6:return e===null&&Xl(t),null;case 13:return ef(e,t,n);case 4:return Jo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bn(t,null,r,n):_e(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ge(r,i),ku(e,t,r,i,n);case 7:return _e(e,t,t.pendingProps,n),t.child;case 8:return _e(e,t,t.pendingProps.children,n),t.child;case 12:return _e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,l=i.value,G(ts,r._currentValue),r._currentValue=l,s!==null)if(et(s.value,l)){if(s.children===i.children&&!Te.current){t=_t(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){l=s.child;for(var a=o.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=gt(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Jl(s.return,n,t),o.lanes|=n;break}a=a.next}}else if(s.tag===10)l=s.type===t.type?null:s.child;else if(s.tag===18){if(l=s.return,l===null)throw Error(E(341));l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),Jl(l,n,t),l=s.sibling}else l=s.child;if(l!==null)l.return=s;else for(l=s;l!==null;){if(l===t){l=null;break}if(s=l.sibling,s!==null){s.return=l.return,l=s;break}l=l.return}s=l}_e(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,An(t,n),i=Ze(i),r=r(i),t.flags|=1,_e(e,t,r,n),t.child;case 14:return r=t.type,i=Ge(r,t.pendingProps),i=Ge(r.type,i),wu(e,t,r,i,n);case 15:return Kd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ge(r,i),Ai(e,t),t.tag=1,Oe(r)?(e=!0,Ji(t)):e=!1,An(t,n),Gd(t,r,i),eo(t,r,i,n),ro(null,t,r,!0,e,n);case 19:return tf(e,t,n);case 22:return Xd(e,t,n)}throw Error(E(156,t.tag))};function yf(e,t){return Bc(e,t)}function Fm(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ve(e,t,n,r){return new Fm(e,t,n,r)}function ha(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bm(e){if(typeof e=="function")return ha(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Io)return 11;if(e===Ro)return 14}return 2}function bt(e,t){var n=e.alternate;return n===null?(n=Ve(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vi(e,t,n,r,i,s){var l=2;if(r=e,typeof e=="function")ha(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case xn:return on(n.children,i,s,t);case Po:l=8,i|=8;break;case Sl:return e=Ve(12,n,t,i|2),e.elementType=Sl,e.lanes=s,e;case Nl:return e=Ve(13,n,t,i),e.elementType=Nl,e.lanes=s,e;case Cl:return e=Ve(19,n,t,i),e.elementType=Cl,e.lanes=s,e;case jc:return Rs(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nc:l=10;break e;case Cc:l=9;break e;case Io:l=11;break e;case Ro:l=14;break e;case Ct:l=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Ve(l,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function on(e,t,n,r){return e=Ve(7,e,r,t),e.lanes=n,e}function Rs(e,t,n,r){return e=Ve(22,e,r,t),e.elementType=jc,e.lanes=n,e.stateNode={isHidden:!1},e}function pl(e,t,n){return e=Ve(6,e,null,t),e.lanes=n,e}function ml(e,t,n){return t=Ve(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vm(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ys(0),this.expirationTimes=Ys(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ys(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pa(e,t,n,r,i,s,l,o,a){return e=new Vm(e,t,n,o,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ve(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xo(s),e}function Um(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_n,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function kf(e){if(!e)return Zt;e=e._reactInternals;e:{if(gn(e)!==e||e.tag!==1)throw Error(E(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(E(171))}if(e.tag===1){var n=e.type;if(Oe(n))return yd(e,n,t)}return t}function wf(e,t,n,r,i,s,l,o,a){return e=pa(n,r,!0,e,i,s,l,o,a),e.context=kf(null),n=e.current,r=xe(),i=Ft(n),s=gt(r,i),s.callback=t??null,Dt(n,s,i),e.current.lanes=i,ii(e,i,r),Le(e,r),e}function Ms(e,t,n,r){var i=t.current,s=xe(),l=Ft(i);return n=kf(n),t.context===null?t.context=n:t.pendingContext=n,t=gt(s,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Dt(i,t,l),e!==null&&(Je(e,i,l,s),$i(e,i,l)),l}function ds(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Iu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ma(e,t){Iu(e,t),(e=e.alternate)&&Iu(e,t)}function Zm(){return null}var _f=typeof reportError=="function"?reportError:function(e){console.error(e)};function va(e){this._internalRoot=e}$s.prototype.render=va.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));Ms(e,t,null,null)};$s.prototype.unmount=va.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hn(function(){Ms(null,e,null,null)}),t[kt]=null}};function $s(e){this._internalRoot=e}$s.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Tt.length&&t!==0&&t<Tt[n].priority;n++);Tt.splice(n,0,e),n===0&&qc(e)}};function ga(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ru(){}function Bm(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=ds(l);s.call(u)}}var l=wf(t,r,e,0,null,!1,!1,"",Ru);return e._reactRootContainer=l,e[kt]=l.current,Mr(e.nodeType===8?e.parentNode:e),hn(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var u=ds(a);o.call(u)}}var a=pa(e,0,!1,null,null,!1,!1,"",Ru);return e._reactRootContainer=a,e[kt]=a.current,Mr(e.nodeType===8?e.parentNode:e),hn(function(){Ms(t,a,n,r)}),a}function Ds(e,t,n,r,i){var s=n._reactRootContainer;if(s){var l=s;if(typeof i=="function"){var o=i;i=function(){var a=ds(l);o.call(a)}}Ms(t,l,e,i)}else l=Bm(n,t,e,i,r);return ds(l)}Yc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dr(t.pendingLanes);n!==0&&(zo(t,n|1),Le(t,re()),!(W&6)&&(Gn=re()+500,Kt()))}break;case 13:hn(function(){var r=wt(e,1);if(r!==null){var i=xe();Je(r,e,1,i)}}),ma(e,1)}};Do=function(e){if(e.tag===13){var t=wt(e,134217728);if(t!==null){var n=xe();Je(t,e,134217728,n)}ma(e,134217728)}};Kc=function(e){if(e.tag===13){var t=Ft(e),n=wt(e,t);if(n!==null){var r=xe();Je(n,e,t,r)}ma(e,t)}};Xc=function(){return H};Jc=function(e,t){var n=H;try{return H=e,t()}finally{H=n}};zl=function(e,t,n){switch(t){case"input":if(Ol(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=js(r);if(!i)throw Error(E(90));Oc(r),Ol(r,i)}}}break;case"textarea":Pc(e,n);break;case"select":t=n.value,t!=null&&Mn(e,!!n.multiple,t,!1)}};Ac=ca;Fc=hn;var Wm={usingClientEntryPoint:!1,Events:[li,Cn,js,zc,Dc,ca]},ar={findFiberByHostInstance:nn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Hm={bundleType:ar.bundleType,version:ar.version,rendererPackageName:ar.rendererPackageName,rendererConfig:ar.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:St.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Uc(e),e===null?null:e.stateNode},findFiberByHostInstance:ar.findFiberByHostInstance||Zm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ji=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ji.isDisabled&&ji.supportsFiber)try{Es=ji.inject(Hm),lt=ji}catch{}}De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wm;De.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ga(t))throw Error(E(200));return Um(e,t,null,n)};De.createRoot=function(e,t){if(!ga(e))throw Error(E(299));var n=!1,r="",i=_f;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=pa(e,1,!1,null,null,n,!1,r,i),e[kt]=t.current,Mr(e.nodeType===8?e.parentNode:e),new va(t)};De.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=Uc(t),e=e===null?null:e.stateNode,e};De.flushSync=function(e){return hn(e)};De.hydrate=function(e,t,n){if(!zs(t))throw Error(E(200));return Ds(null,e,t,!0,n)};De.hydrateRoot=function(e,t,n){if(!ga(e))throw Error(E(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",l=_f;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=wf(t,null,e,1,n??null,i,!1,s,l),e[kt]=t.current,Mr(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $s(t)};De.render=function(e,t,n){if(!zs(t))throw Error(E(200));return Ds(null,e,t,!1,n)};De.unmountComponentAtNode=function(e){if(!zs(e))throw Error(E(40));return e._reactRootContainer?(hn(function(){Ds(null,null,e,!1,function(){e._reactRootContainer=null,e[kt]=null})}),!0):!1};De.unstable_batchedUpdates=ca;De.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!zs(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return Ds(e,t,n,!1,r)};De.version="18.3.1-next-f1338f8080-20240426";function xf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xf)}catch(e){console.error(e)}}xf(),_c.exports=De;var Gm=_c.exports,Ef,Mu=Gm;Ef=Mu.createRoot,Mu.hydrateRoot;var B;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const s={};for(const l of i)s[l]=l;return s},e.getValidEnumValues=i=>{const s=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),l={};for(const o of s)l[o]=i[o];return e.objectValues(l)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&s.push(l);return s},e.find=(i,s)=>{for(const l of i)if(s(l))return l},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(l=>typeof l=="string"?`'${l}'`:l).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(B||(B={}));var vo;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(vo||(vo={}));const L=B.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Lt=e=>{switch(typeof e){case"undefined":return L.undefined;case"string":return L.string;case"number":return isNaN(e)?L.nan:L.number;case"boolean":return L.boolean;case"function":return L.function;case"bigint":return L.bigint;case"symbol":return L.symbol;case"object":return Array.isArray(e)?L.array:e===null?L.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?L.promise:typeof Map<"u"&&e instanceof Map?L.map:typeof Set<"u"&&e instanceof Set?L.set:typeof Date<"u"&&e instanceof Date?L.date:L.object;default:return L.unknown}},S=B.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Qm=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class $e extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},i=s=>{for(const l of s.issues)if(l.code==="invalid_union")l.unionErrors.map(i);else if(l.code==="invalid_return_type")i(l.returnTypeError);else if(l.code==="invalid_arguments")i(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let o=r,a=0;for(;a<l.path.length;){const u=l.path[a];a===l.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(l))):o[u]=o[u]||{_errors:[]},o=o[u],a++}}};return i(this),r}static assert(t){if(!(t instanceof $e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,B.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}$e.create=e=>new $e(e);const Qn=(e,t)=>{let n;switch(e.code){case S.invalid_type:e.received===L.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case S.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,B.jsonStringifyReplacer)}`;break;case S.unrecognized_keys:n=`Unrecognized key(s) in object: ${B.joinValues(e.keys,", ")}`;break;case S.invalid_union:n="Invalid input";break;case S.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${B.joinValues(e.options)}`;break;case S.invalid_enum_value:n=`Invalid enum value. Expected ${B.joinValues(e.options)}, received '${e.received}'`;break;case S.invalid_arguments:n="Invalid function arguments";break;case S.invalid_return_type:n="Invalid function return type";break;case S.invalid_date:n="Invalid date";break;case S.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:B.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case S.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case S.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case S.custom:n="Invalid input";break;case S.invalid_intersection_types:n="Intersection results could not be merged";break;case S.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case S.not_finite:n="Number must be finite";break;default:n=t.defaultError,B.assertNever(e)}return{message:n}};let Sf=Qn;function Ym(e){Sf=e}function fs(){return Sf}const hs=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],l={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const a=r.filter(u=>!!u).slice().reverse();for(const u of a)o=u(l,{data:t,defaultError:o}).message;return{...i,path:s,message:o}},Km=[];function O(e,t){const n=fs(),r=hs({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Qn?void 0:Qn].filter(i=>!!i)});e.common.issues.push(r)}class we{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return z;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const s=await i.key,l=await i.value;r.push({key:s,value:l})}return we.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:s,value:l}=i;if(s.status==="aborted"||l.status==="aborted")return z;s.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof l.value<"u"||i.alwaysSet)&&(r[s.value]=l.value)}return{status:t.value,value:r}}}const z=Object.freeze({status:"aborted"}),Rn=e=>({status:"dirty",value:e}),Ee=e=>({status:"valid",value:e}),go=e=>e.status==="aborted",yo=e=>e.status==="dirty",Zr=e=>e.status==="valid",Br=e=>typeof Promise<"u"&&e instanceof Promise;function ps(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Nf(e,t,n,r,i){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var R;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(R||(R={}));var hr,pr;class ut{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $u=(e,t)=>{if(Zr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new $e(e.common.issues);return this._error=n,this._error}}};function A(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(l,o)=>{var a,u;const{message:c}=e;return l.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:(a=c??r)!==null&&a!==void 0?a:o.defaultError}:l.code!=="invalid_type"?{message:o.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:o.defaultError}},description:i}}class b{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Lt(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Lt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new we,ctx:{common:t.parent.common,data:t.data,parsedType:Lt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Br(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Lt(t)},s=this._parseSync({data:t,path:i.path,parent:i});return $u(i,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Lt(t)},i=this._parse({data:t,path:r.path,parent:r}),s=await(Br(i)?i:Promise.resolve(i));return $u(r,s)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const l=t(i),o=()=>s.addIssue({code:S.custom,...r(i)});return typeof Promise<"u"&&l instanceof Promise?l.then(a=>a?!0:(o(),!1)):l?!0:(o(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new tt({schema:this,typeName:$.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return at.create(this,this._def)}nullable(){return Gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qe.create(this,this._def)}promise(){return Kn.create(this,this._def)}or(t){return Qr.create([this,t],this._def)}and(t){return Yr.create(this,t,this._def)}transform(t){return new tt({...A(this._def),schema:this,typeName:$.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ei({...A(this._def),innerType:this,defaultValue:n,typeName:$.ZodDefault})}brand(){return new ya({typeName:$.ZodBranded,type:this,...A(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ti({...A(this._def),innerType:this,catchValue:n,typeName:$.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ai.create(this,t)}readonly(){return ni.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Xm=/^c[^\s-]{8,}$/i,Jm=/^[0-9a-z]+$/,qm=/^[0-9A-HJKMNP-TV-Z]{26}$/,ev=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,tv=/^[a-z0-9_-]{21}$/i,nv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,rv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,iv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vl;const sv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,lv=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ov=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cf="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",av=new RegExp(`^${Cf}$`);function jf(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function uv(e){return new RegExp(`^${jf(e)}$`)}function Tf(e){let t=`${Cf}T${jf(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function cv(e,t){return!!((t==="v4"||!t)&&sv.test(e)||(t==="v6"||!t)&&lv.test(e))}class Ke extends b{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==L.string){const s=this._getOrReturnCtx(t);return O(s,{code:S.invalid_type,expected:L.string,received:s.parsedType}),z}const r=new we;let i;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),O(i,{code:S.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),O(i,{code:S.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const l=t.data.length>s.value,o=t.data.length<s.value;(l||o)&&(i=this._getOrReturnCtx(t,i),l?O(i,{code:S.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&O(i,{code:S.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")rv.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"email",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")vl||(vl=new RegExp(iv,"u")),vl.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"emoji",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")ev.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"uuid",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")tv.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"nanoid",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")Xm.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"cuid",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")Jm.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"cuid2",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")qm.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"ulid",code:S.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),O(i,{validation:"url",code:S.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"regex",code:S.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),O(i,{code:S.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),O(i,{code:S.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),O(i,{code:S.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?Tf(s).test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{code:S.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?av.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{code:S.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?uv(s).test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{code:S.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?nv.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"duration",code:S.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?cv(t.data,s.version)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"ip",code:S.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?ov.test(t.data)||(i=this._getOrReturnCtx(t,i),O(i,{validation:"base64",code:S.invalid_string,message:s.message}),r.dirty()):B.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:S.invalid_string,...R.errToObj(r)})}_addCheck(t){return new Ke({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...R.errToObj(t)})}url(t){return this._addCheck({kind:"url",...R.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...R.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...R.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...R.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...R.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...R.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...R.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...R.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...R.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...R.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...R.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...R.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...R.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...R.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...R.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...R.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...R.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...R.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...R.errToObj(n)})}nonempty(t){return this.min(1,R.errToObj(t))}trim(){return new Ke({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ke({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ke({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ke.create=e=>{var t;return new Ke({checks:[],typeName:$.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...A(e)})};function dv(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,s=parseInt(e.toFixed(i).replace(".","")),l=parseInt(t.toFixed(i).replace(".",""));return s%l/Math.pow(10,i)}class Bt extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==L.number){const s=this._getOrReturnCtx(t);return O(s,{code:S.invalid_type,expected:L.number,received:s.parsedType}),z}let r;const i=new we;for(const s of this._def.checks)s.kind==="int"?B.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),O(r,{code:S.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),O(r,{code:S.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),O(r,{code:S.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?dv(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),O(r,{code:S.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),O(r,{code:S.not_finite,message:s.message}),i.dirty()):B.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,R.toString(n))}gt(t,n){return this.setLimit("min",t,!1,R.toString(n))}lte(t,n){return this.setLimit("max",t,!0,R.toString(n))}lt(t,n){return this.setLimit("max",t,!1,R.toString(n))}setLimit(t,n,r,i){return new Bt({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:R.toString(i)}]})}_addCheck(t){return new Bt({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:R.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:R.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:R.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:R.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:R.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:R.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&B.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Bt.create=e=>new Bt({checks:[],typeName:$.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...A(e)});class Wt extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==L.bigint){const s=this._getOrReturnCtx(t);return O(s,{code:S.invalid_type,expected:L.bigint,received:s.parsedType}),z}let r;const i=new we;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),O(r,{code:S.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),O(r,{code:S.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),O(r,{code:S.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):B.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,R.toString(n))}gt(t,n){return this.setLimit("min",t,!1,R.toString(n))}lte(t,n){return this.setLimit("max",t,!0,R.toString(n))}lt(t,n){return this.setLimit("max",t,!1,R.toString(n))}setLimit(t,n,r,i){return new Wt({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:R.toString(i)}]})}_addCheck(t){return new Wt({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:R.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:R.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:R.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:R.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:R.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Wt.create=e=>{var t;return new Wt({checks:[],typeName:$.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...A(e)})};class Wr extends b{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==L.boolean){const r=this._getOrReturnCtx(t);return O(r,{code:S.invalid_type,expected:L.boolean,received:r.parsedType}),z}return Ee(t.data)}}Wr.create=e=>new Wr({typeName:$.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...A(e)});class pn extends b{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==L.date){const s=this._getOrReturnCtx(t);return O(s,{code:S.invalid_type,expected:L.date,received:s.parsedType}),z}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return O(s,{code:S.invalid_date}),z}const r=new we;let i;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),O(i,{code:S.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),O(i,{code:S.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):B.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new pn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:R.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:R.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}pn.create=e=>new pn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:$.ZodDate,...A(e)});class ms extends b{_parse(t){if(this._getType(t)!==L.symbol){const r=this._getOrReturnCtx(t);return O(r,{code:S.invalid_type,expected:L.symbol,received:r.parsedType}),z}return Ee(t.data)}}ms.create=e=>new ms({typeName:$.ZodSymbol,...A(e)});class Hr extends b{_parse(t){if(this._getType(t)!==L.undefined){const r=this._getOrReturnCtx(t);return O(r,{code:S.invalid_type,expected:L.undefined,received:r.parsedType}),z}return Ee(t.data)}}Hr.create=e=>new Hr({typeName:$.ZodUndefined,...A(e)});class Gr extends b{_parse(t){if(this._getType(t)!==L.null){const r=this._getOrReturnCtx(t);return O(r,{code:S.invalid_type,expected:L.null,received:r.parsedType}),z}return Ee(t.data)}}Gr.create=e=>new Gr({typeName:$.ZodNull,...A(e)});class Yn extends b{constructor(){super(...arguments),this._any=!0}_parse(t){return Ee(t.data)}}Yn.create=e=>new Yn({typeName:$.ZodAny,...A(e)});class an extends b{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ee(t.data)}}an.create=e=>new an({typeName:$.ZodUnknown,...A(e)});class xt extends b{_parse(t){const n=this._getOrReturnCtx(t);return O(n,{code:S.invalid_type,expected:L.never,received:n.parsedType}),z}}xt.create=e=>new xt({typeName:$.ZodNever,...A(e)});class vs extends b{_parse(t){if(this._getType(t)!==L.undefined){const r=this._getOrReturnCtx(t);return O(r,{code:S.invalid_type,expected:L.void,received:r.parsedType}),z}return Ee(t.data)}}vs.create=e=>new vs({typeName:$.ZodVoid,...A(e)});class qe extends b{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==L.array)return O(n,{code:S.invalid_type,expected:L.array,received:n.parsedType}),z;if(i.exactLength!==null){const l=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(l||o)&&(O(n,{code:l?S.too_big:S.too_small,minimum:o?i.exactLength.value:void 0,maximum:l?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(O(n,{code:S.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(O(n,{code:S.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,o)=>i.type._parseAsync(new ut(n,l,n.path,o)))).then(l=>we.mergeArray(r,l));const s=[...n.data].map((l,o)=>i.type._parseSync(new ut(n,l,n.path,o)));return we.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new qe({...this._def,minLength:{value:t,message:R.toString(n)}})}max(t,n){return new qe({...this._def,maxLength:{value:t,message:R.toString(n)}})}length(t,n){return new qe({...this._def,exactLength:{value:t,message:R.toString(n)}})}nonempty(t){return this.min(1,t)}}qe.create=(e,t)=>new qe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...A(t)});function wn(e){if(e instanceof X){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=at.create(wn(r))}return new X({...e._def,shape:()=>t})}else return e instanceof qe?new qe({...e._def,type:wn(e.element)}):e instanceof at?at.create(wn(e.unwrap())):e instanceof Gt?Gt.create(wn(e.unwrap())):e instanceof ct?ct.create(e.items.map(t=>wn(t))):e}class X extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=B.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==L.object){const u=this._getOrReturnCtx(t);return O(u,{code:S.invalid_type,expected:L.object,received:u.parsedType}),z}const{status:r,ctx:i}=this._processInputParams(t),{shape:s,keys:l}=this._getCached(),o=[];if(!(this._def.catchall instanceof xt&&this._def.unknownKeys==="strip"))for(const u in i.data)l.includes(u)||o.push(u);const a=[];for(const u of l){const c=s[u],d=i.data[u];a.push({key:{status:"valid",value:u},value:c._parse(new ut(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof xt){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of o)a.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")o.length>0&&(O(i,{code:S.unrecognized_keys,keys:o}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of o){const d=i.data[c];a.push({key:{status:"valid",value:c},value:u._parse(new ut(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of a){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>we.mergeObjectSync(r,u)):we.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(t){return R.errToObj,new X({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,s,l,o;const a=(l=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,n,r).message)!==null&&l!==void 0?l:r.defaultError;return n.code==="unrecognized_keys"?{message:(o=R.errToObj(t).message)!==null&&o!==void 0?o:a}:{message:a}}}:{}})}strip(){return new X({...this._def,unknownKeys:"strip"})}passthrough(){return new X({...this._def,unknownKeys:"passthrough"})}extend(t){return new X({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new X({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new X({...this._def,catchall:t})}pick(t){const n={};return B.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new X({...this._def,shape:()=>n})}omit(t){const n={};return B.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new X({...this._def,shape:()=>n})}deepPartial(){return wn(this)}partial(t){const n={};return B.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new X({...this._def,shape:()=>n})}required(t){const n={};return B.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof at;)s=s._def.innerType;n[r]=s}}),new X({...this._def,shape:()=>n})}keyof(){return Of(B.objectKeys(this.shape))}}X.create=(e,t)=>new X({shape:()=>e,unknownKeys:"strip",catchall:xt.create(),typeName:$.ZodObject,...A(t)});X.strictCreate=(e,t)=>new X({shape:()=>e,unknownKeys:"strict",catchall:xt.create(),typeName:$.ZodObject,...A(t)});X.lazycreate=(e,t)=>new X({shape:e,unknownKeys:"strip",catchall:xt.create(),typeName:$.ZodObject,...A(t)});class Qr extends b{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const l=s.map(o=>new $e(o.ctx.common.issues));return O(n,{code:S.invalid_union,unionErrors:l}),z}if(n.common.async)return Promise.all(r.map(async s=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(i);{let s;const l=[];for(const a of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=a._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&l.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=l.map(a=>new $e(a));return O(n,{code:S.invalid_union,unionErrors:o}),z}}get options(){return this._def.options}}Qr.create=(e,t)=>new Qr({options:e,typeName:$.ZodUnion,...A(t)});const dt=e=>e instanceof Xr?dt(e.schema):e instanceof tt?dt(e.innerType()):e instanceof Jr?[e.value]:e instanceof Ht?e.options:e instanceof qr?B.objectValues(e.enum):e instanceof ei?dt(e._def.innerType):e instanceof Hr?[void 0]:e instanceof Gr?[null]:e instanceof at?[void 0,...dt(e.unwrap())]:e instanceof Gt?[null,...dt(e.unwrap())]:e instanceof ya||e instanceof ni?dt(e.unwrap()):e instanceof ti?dt(e._def.innerType):[];class As extends b{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==L.object)return O(n,{code:S.invalid_type,expected:L.object,received:n.parsedType}),z;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(O(n,{code:S.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),z)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const s of n){const l=dt(s.shape[t]);if(!l.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const o of l){if(i.has(o))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);i.set(o,s)}}return new As({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...A(r)})}}function ko(e,t){const n=Lt(e),r=Lt(t);if(e===t)return{valid:!0,data:e};if(n===L.object&&r===L.object){const i=B.objectKeys(t),s=B.objectKeys(e).filter(o=>i.indexOf(o)!==-1),l={...e,...t};for(const o of s){const a=ko(e[o],t[o]);if(!a.valid)return{valid:!1};l[o]=a.data}return{valid:!0,data:l}}else if(n===L.array&&r===L.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let s=0;s<e.length;s++){const l=e[s],o=t[s],a=ko(l,o);if(!a.valid)return{valid:!1};i.push(a.data)}return{valid:!0,data:i}}else return n===L.date&&r===L.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Yr extends b{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(s,l)=>{if(go(s)||go(l))return z;const o=ko(s.value,l.value);return o.valid?((yo(s)||yo(l))&&n.dirty(),{status:n.value,value:o.data}):(O(r,{code:S.invalid_intersection_types}),z)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,l])=>i(s,l)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Yr.create=(e,t,n)=>new Yr({left:e,right:t,typeName:$.ZodIntersection,...A(n)});class ct extends b{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.array)return O(r,{code:S.invalid_type,expected:L.array,received:r.parsedType}),z;if(r.data.length<this._def.items.length)return O(r,{code:S.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),z;!this._def.rest&&r.data.length>this._def.items.length&&(O(r,{code:S.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((l,o)=>{const a=this._def.items[o]||this._def.rest;return a?a._parse(new ut(r,l,r.path,o)):null}).filter(l=>!!l);return r.common.async?Promise.all(s).then(l=>we.mergeArray(n,l)):we.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new ct({...this._def,rest:t})}}ct.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ct({items:e,typeName:$.ZodTuple,rest:null,...A(t)})};class Kr extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.object)return O(r,{code:S.invalid_type,expected:L.object,received:r.parsedType}),z;const i=[],s=this._def.keyType,l=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new ut(r,o,r.path,o)),value:l._parse(new ut(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?we.mergeObjectAsync(n,i):we.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof b?new Kr({keyType:t,valueType:n,typeName:$.ZodRecord,...A(r)}):new Kr({keyType:Ke.create(),valueType:t,typeName:$.ZodRecord,...A(n)})}}class gs extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.map)return O(r,{code:S.invalid_type,expected:L.map,received:r.parsedType}),z;const i=this._def.keyType,s=this._def.valueType,l=[...r.data.entries()].map(([o,a],u)=>({key:i._parse(new ut(r,o,r.path,[u,"key"])),value:s._parse(new ut(r,a,r.path,[u,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const a of l){const u=await a.key,c=await a.value;if(u.status==="aborted"||c.status==="aborted")return z;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const a of l){const u=a.key,c=a.value;if(u.status==="aborted"||c.status==="aborted")return z;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}}}}gs.create=(e,t,n)=>new gs({valueType:t,keyType:e,typeName:$.ZodMap,...A(n)});class mn extends b{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.set)return O(r,{code:S.invalid_type,expected:L.set,received:r.parsedType}),z;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(O(r,{code:S.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(O(r,{code:S.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function l(a){const u=new Set;for(const c of a){if(c.status==="aborted")return z;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const o=[...r.data.values()].map((a,u)=>s._parse(new ut(r,a,r.path,u)));return r.common.async?Promise.all(o).then(a=>l(a)):l(o)}min(t,n){return new mn({...this._def,minSize:{value:t,message:R.toString(n)}})}max(t,n){return new mn({...this._def,maxSize:{value:t,message:R.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}mn.create=(e,t)=>new mn({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...A(t)});class bn extends b{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==L.function)return O(n,{code:S.invalid_type,expected:L.function,received:n.parsedType}),z;function r(o,a){return hs({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,fs(),Qn].filter(u=>!!u),issueData:{code:S.invalid_arguments,argumentsError:a}})}function i(o,a){return hs({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,fs(),Qn].filter(u=>!!u),issueData:{code:S.invalid_return_type,returnTypeError:a}})}const s={errorMap:n.common.contextualErrorMap},l=n.data;if(this._def.returns instanceof Kn){const o=this;return Ee(async function(...a){const u=new $e([]),c=await o._def.args.parseAsync(a,s).catch(y=>{throw u.addIssue(r(a,y)),u}),d=await Reflect.apply(l,this,c);return await o._def.returns._def.type.parseAsync(d,s).catch(y=>{throw u.addIssue(i(d,y)),u})})}else{const o=this;return Ee(function(...a){const u=o._def.args.safeParse(a,s);if(!u.success)throw new $e([r(a,u.error)]);const c=Reflect.apply(l,this,u.data),d=o._def.returns.safeParse(c,s);if(!d.success)throw new $e([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new bn({...this._def,args:ct.create(t).rest(an.create())})}returns(t){return new bn({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new bn({args:t||ct.create([]).rest(an.create()),returns:n||an.create(),typeName:$.ZodFunction,...A(r)})}}class Xr extends b{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Xr.create=(e,t)=>new Xr({getter:e,typeName:$.ZodLazy,...A(t)});class Jr extends b{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return O(n,{received:n.data,code:S.invalid_literal,expected:this._def.value}),z}return{status:"valid",value:t.data}}get value(){return this._def.value}}Jr.create=(e,t)=>new Jr({value:e,typeName:$.ZodLiteral,...A(t)});function Of(e,t){return new Ht({values:e,typeName:$.ZodEnum,...A(t)})}class Ht extends b{constructor(){super(...arguments),hr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return O(n,{expected:B.joinValues(r),received:n.parsedType,code:S.invalid_type}),z}if(ps(this,hr)||Nf(this,hr,new Set(this._def.values)),!ps(this,hr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return O(n,{received:n.data,code:S.invalid_enum_value,options:r}),z}return Ee(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ht.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ht.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}hr=new WeakMap;Ht.create=Of;class qr extends b{constructor(){super(...arguments),pr.set(this,void 0)}_parse(t){const n=B.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==L.string&&r.parsedType!==L.number){const i=B.objectValues(n);return O(r,{expected:B.joinValues(i),received:r.parsedType,code:S.invalid_type}),z}if(ps(this,pr)||Nf(this,pr,new Set(B.getValidEnumValues(this._def.values))),!ps(this,pr).has(t.data)){const i=B.objectValues(n);return O(r,{received:r.data,code:S.invalid_enum_value,options:i}),z}return Ee(t.data)}get enum(){return this._def.values}}pr=new WeakMap;qr.create=(e,t)=>new qr({values:e,typeName:$.ZodNativeEnum,...A(t)});class Kn extends b{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==L.promise&&n.common.async===!1)return O(n,{code:S.invalid_type,expected:L.promise,received:n.parsedType}),z;const r=n.parsedType===L.promise?n.data:Promise.resolve(n.data);return Ee(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Kn.create=(e,t)=>new Kn({type:e,typeName:$.ZodPromise,...A(t)});class tt extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:l=>{O(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const l=i.transform(r.data,s);if(r.common.async)return Promise.resolve(l).then(async o=>{if(n.value==="aborted")return z;const a=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return a.status==="aborted"?z:a.status==="dirty"||n.value==="dirty"?Rn(a.value):a});{if(n.value==="aborted")return z;const o=this._def.schema._parseSync({data:l,path:r.path,parent:r});return o.status==="aborted"?z:o.status==="dirty"||n.value==="dirty"?Rn(o.value):o}}if(i.type==="refinement"){const l=o=>{const a=i.refinement(o,s);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?z:(o.status==="dirty"&&n.dirty(),l(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?z:(o.status==="dirty"&&n.dirty(),l(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Zr(l))return l;const o=i.transform(l.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>Zr(l)?Promise.resolve(i.transform(l.value,s)).then(o=>({status:n.value,value:o})):l);B.assertNever(i)}}tt.create=(e,t,n)=>new tt({schema:e,typeName:$.ZodEffects,effect:t,...A(n)});tt.createWithPreprocess=(e,t,n)=>new tt({schema:t,effect:{type:"preprocess",transform:e},typeName:$.ZodEffects,...A(n)});class at extends b{_parse(t){return this._getType(t)===L.undefined?Ee(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}at.create=(e,t)=>new at({innerType:e,typeName:$.ZodOptional,...A(t)});class Gt extends b{_parse(t){return this._getType(t)===L.null?Ee(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Gt.create=(e,t)=>new Gt({innerType:e,typeName:$.ZodNullable,...A(t)});class ei extends b{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===L.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ei.create=(e,t)=>new ei({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...A(t)});class ti extends b{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Br(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new $e(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new $e(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ti.create=(e,t)=>new ti({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...A(t)});class ys extends b{_parse(t){if(this._getType(t)!==L.nan){const r=this._getOrReturnCtx(t);return O(r,{code:S.invalid_type,expected:L.nan,received:r.parsedType}),z}return{status:"valid",value:t.data}}}ys.create=e=>new ys({typeName:$.ZodNaN,...A(e)});const fv=Symbol("zod_brand");class ya extends b{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ai extends b{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?z:s.status==="dirty"?(n.dirty(),Rn(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?z:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new ai({in:t,out:n,typeName:$.ZodPipeline})}}class ni extends b{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Zr(i)&&(i.value=Object.freeze(i.value)),i);return Br(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}ni.create=(e,t)=>new ni({innerType:e,typeName:$.ZodReadonly,...A(t)});function Lf(e,t={},n){return e?Yn.create().superRefine((r,i)=>{var s,l;if(!e(r)){const o=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,a=(l=(s=o.fatal)!==null&&s!==void 0?s:n)!==null&&l!==void 0?l:!0,u=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...u,fatal:a})}}):Yn.create()}const hv={object:X.lazycreate};var $;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($||($={}));const pv=(e,t={message:`Input not instance of ${e.name}`})=>Lf(n=>n instanceof e,t),Pf=Ke.create,If=Bt.create,mv=ys.create,vv=Wt.create,Rf=Wr.create,gv=pn.create,yv=ms.create,kv=Hr.create,wv=Gr.create,_v=Yn.create,xv=an.create,Ev=xt.create,Sv=vs.create,Nv=qe.create,Cv=X.create,jv=X.strictCreate,Tv=Qr.create,Ov=As.create,Lv=Yr.create,Pv=ct.create,Iv=Kr.create,Rv=gs.create,Mv=mn.create,$v=bn.create,zv=Xr.create,Dv=Jr.create,Av=Ht.create,Fv=qr.create,bv=Kn.create,zu=tt.create,Vv=at.create,Uv=Gt.create,Zv=tt.createWithPreprocess,Bv=ai.create,Wv=()=>Pf().optional(),Hv=()=>If().optional(),Gv=()=>Rf().optional(),Qv={string:e=>Ke.create({...e,coerce:!0}),number:e=>Bt.create({...e,coerce:!0}),boolean:e=>Wr.create({...e,coerce:!0}),bigint:e=>Wt.create({...e,coerce:!0}),date:e=>pn.create({...e,coerce:!0})},Yv=z;var N=Object.freeze({__proto__:null,defaultErrorMap:Qn,setErrorMap:Ym,getErrorMap:fs,makeIssue:hs,EMPTY_PATH:Km,addIssueToContext:O,ParseStatus:we,INVALID:z,DIRTY:Rn,OK:Ee,isAborted:go,isDirty:yo,isValid:Zr,isAsync:Br,get util(){return B},get objectUtil(){return vo},ZodParsedType:L,getParsedType:Lt,ZodType:b,datetimeRegex:Tf,ZodString:Ke,ZodNumber:Bt,ZodBigInt:Wt,ZodBoolean:Wr,ZodDate:pn,ZodSymbol:ms,ZodUndefined:Hr,ZodNull:Gr,ZodAny:Yn,ZodUnknown:an,ZodNever:xt,ZodVoid:vs,ZodArray:qe,ZodObject:X,ZodUnion:Qr,ZodDiscriminatedUnion:As,ZodIntersection:Yr,ZodTuple:ct,ZodRecord:Kr,ZodMap:gs,ZodSet:mn,ZodFunction:bn,ZodLazy:Xr,ZodLiteral:Jr,ZodEnum:Ht,ZodNativeEnum:qr,ZodPromise:Kn,ZodEffects:tt,ZodTransformer:tt,ZodOptional:at,ZodNullable:Gt,ZodDefault:ei,ZodCatch:ti,ZodNaN:ys,BRAND:fv,ZodBranded:ya,ZodPipeline:ai,ZodReadonly:ni,custom:Lf,Schema:b,ZodSchema:b,late:hv,get ZodFirstPartyTypeKind(){return $},coerce:Qv,any:_v,array:Nv,bigint:vv,boolean:Rf,date:gv,discriminatedUnion:Ov,effect:zu,enum:Av,function:$v,instanceof:pv,intersection:Lv,lazy:zv,literal:Dv,map:Rv,nan:mv,nativeEnum:Fv,never:Ev,null:wv,nullable:Uv,number:If,object:Cv,oboolean:Gv,onumber:Hv,optional:Vv,ostring:Wv,pipeline:Bv,preprocess:Zv,promise:bv,record:Iv,set:Mv,strictObject:jv,string:Pf,symbol:yv,transformer:zu,tuple:Pv,undefined:kv,union:Tv,unknown:xv,void:Sv,NEVER:Yv,ZodIssueCode:S,quotelessJson:Qm,ZodError:$e});const Mf=["lockfile","generated","binary","whitespace-only","rename","mode"],Kv=N.enum([...Mf,"test","docs"]),Xv=N.enum(["added","deleted","modified","renamed","copied"]);N.object({id:N.string(),file:N.string(),oldFile:N.string().optional(),status:Xv,header:N.string(),oldStart:N.number().int(),oldLines:N.number().int(),newStart:N.number().int(),newLines:N.number().int(),lines:N.array(N.string()),added:N.number().int(),removed:N.number().int(),hash:N.string(),flags:N.array(Kv),parent:N.string().optional()});N.object({run:N.string(),repoRoot:N.string(),branch:N.string(),base:N.string(),baseSha:N.string(),mergeBase:N.string(),headSha:N.string(),working:N.boolean(),createdAt:N.string(),stats:N.object({files:N.number().int(),hunks:N.number().int(),added:N.number().int(),removed:N.number().int()})});const Jv=N.enum(["core","test","mechanical"]),qv=N.enum(["low","med","high"]),eg=N.object({id:N.string().min(1),title:N.string().min(1),intent:N.string().min(1),kind:Jv.default("core"),hunks:N.array(N.string()),dependsOn:N.array(N.string()).default([]),reviewFocus:N.array(N.string()).default([]),risk:qv.default("low")}),tg=N.object({id:N.string().min(1),label:N.string().optional(),chunks:N.array(eg)}),ng=N.object({title:N.string().min(1),description:N.string().min(1),hunks:N.array(N.string())});N.object({from:N.string(),to:N.string(),symbols:N.array(N.string())});const rg=N.object({from:N.string(),to:N.string(),label:N.string().min(1)});N.object({title:N.string().optional(),overview:N.string().optional(),strategies:N.array(tg).min(1),features:N.array(ng).default([]),skim:N.array(N.string()).default([]),links:N.array(rg).default([])});const ig=N.object({id:N.string(),file:N.string(),side:N.enum(["old","new"]),line:N.number().int(),text:N.string(),at:N.string()});N.object({strategy:N.string().optional(),reviewed:N.array(N.string()).default([]),chunkNotes:N.record(N.string()).default({}),lineNotes:N.array(ig).default([]),updatedAt:N.string().optional()});const sg=e=>e.flags.some(t=>Mf.includes(t)),ka=e=>e.reduce((t,n)=>t+n.added+n.removed,0),lg={layers:"Foundations first",features:"By feature"},$f=e=>lg[e.id]??e.label??e.id,zf=(e,t)=>`${e}/${t}`;function Df(e,t,n){const r=e.strategies.find(u=>u.id===n)??e.strategies[0];if(!r)return;const i=new Map(t.map(u=>[u.id,u])),s=new Set,l=r.chunks.map((u,c)=>{const d=u.hunks.map(f=>i.get(f)).filter(f=>!!f);return d.forEach(f=>s.add(f.id)),{chunk:u,index:c,hunks:d,size:ka(d)}}),o=new Set(e.skim),a=t.filter(u=>!s.has(u.id)&&(o.has(u.id)||sg(u)));return{strategy:r,chunks:l,skim:a}}function Vt(e,t){if(e.length===0)return"done";const n=e.filter(r=>t.has(r.hash)).length;return n===e.length?"done":n===0?"todo":"partial"}function Du(e,t,n){const r=new Set(e.reviewed);for(const i of t)n?r.add(i.hash):r.delete(i.hash);return{...e,reviewed:[...r]}}function og(e,t){const n=new Set(e.hunks);return t.chunks.filter(r=>r.chunk.hunks.some(i=>n.has(i)))}function ag(e,t){const n=new Set(e.hunks);return t.filter(r=>n.has(r.id))}function Af(e,t){let n=0,r=0,i=0;for(const s of e.chunks)Vt(s.hunks,t)==="done"&&n++,i+=s.size,r+=ka(s.hunks.filter(l=>t.has(l.hash)));return{done:n,total:e.chunks.length,linesDone:r,linesTotal:i}}function ug(e){let t=e.oldStart,n=e.newStart;return e.lines.map(r=>{const i=r[0],s=r.slice(1).replace(/\r$/,"");return i==="+"?{text:s,kind:"add",newNo:n++}:i==="-"?{text:s,kind:"del",oldNo:t++}:i==="\\"?{text:r,kind:"meta"}:{text:s,kind:"context",oldNo:t++,newNo:n++}})}function Ff(e,t){return t.filter(n=>e.some(r=>{if(r.file!==n.file)return!1;const[i,s]=n.side==="new"?[r.newStart,r.newLines]:[r.oldStart,r.oldLines];return n.line>=i&&n.line<i+s}))}async function wa(e,t,n){const r=await fetch(t,{method:e,headers:n===void 0?void 0:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}),i=await r.json();if(!r.ok)throw new Error(i.error??r.statusText);return i}const cg=()=>wa("GET","/api/run"),dg=e=>wa("PUT","/api/state",e),fg=()=>wa("POST","/api/export");var hg="\0",qt="\0",Au="";let pg=class{constructor(t){se(this,"_isDirected",!0);se(this,"_isMultigraph",!1);se(this,"_isCompound",!1);se(this,"_label");se(this,"_defaultNodeLabelFn",()=>{});se(this,"_defaultEdgeLabelFn",()=>{});se(this,"_nodes",{});se(this,"_in",{});se(this,"_preds",{});se(this,"_out",{});se(this,"_sucs",{});se(this,"_edgeObjs",{});se(this,"_edgeLabels",{});se(this,"_nodeCount",0);se(this,"_edgeCount",0);se(this,"_parent");se(this,"_children");t&&(this._isDirected=Object.hasOwn(t,"directed")?t.directed:!0,this._isMultigraph=Object.hasOwn(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.hasOwn(t,"compound")?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[qt]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,typeof t!="function"&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter(n=>Object.keys(t._in[n]).length===0)}sinks(){var t=this;return this.nodes().filter(n=>Object.keys(t._out[n]).length===0)}setNodes(t,n){var r=arguments,i=this;return t.forEach(function(s){r.length>1?i.setNode(s,n):i.setNode(s)}),this}setNode(t,n){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=qt,this._children[t]={},this._children[qt][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.hasOwn(this._nodes,t)}removeNode(t){var n=this;if(Object.hasOwn(this._nodes,t)){var r=i=>n.removeEdge(n._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(function(i){n.setParent(i)}),delete this._children[t]),Object.keys(this._in[t]).forEach(r),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n=qt;else{n+="";for(var r=n;r!==void 0;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var n=this._parent[t];if(n!==qt)return n}}children(t=qt){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===qt)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var n=this._preds[t];if(n)return Object.keys(n)}successors(t){var n=this._sucs[t];if(n)return Object.keys(n)}neighbors(t){var n=this.predecessors(t);if(n){const i=new Set(n);for(var r of this.successors(t))i.add(r);return Array.from(i.values())}}isLeaf(t){var n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([l,o]){t(l)&&n.setNode(l,o)}),Object.values(this._edgeObjs).forEach(function(l){n.hasNode(l.v)&&n.hasNode(l.w)&&n.setEdge(l,r.edge(l))});var i={};function s(l){var o=r.parent(l);return o===void 0||n.hasNode(o)?(i[l]=o,o):o in i?i[o]:s(o)}return this._isCompound&&n.nodes().forEach(l=>n.setParent(l,s(l))),n}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,typeof t!="function"&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,n){var r=this,i=arguments;return t.reduce(function(s,l){return i.length>1?r.setEdge(s,l,n):r.setEdge(s,l),l}),this}setEdge(){var t,n,r,i,s=!1,l=arguments[0];typeof l=="object"&&l!==null&&"v"in l?(t=l.v,n=l.w,r=l.name,arguments.length===2&&(i=arguments[1],s=!0)):(t=l,n=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,n=""+n,r!==void 0&&(r=""+r);var o=mr(this._isDirected,t,n,r);if(Object.hasOwn(this._edgeLabels,o))return s&&(this._edgeLabels[o]=i),this;if(r!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[o]=s?i:this._defaultEdgeLabelFn(t,n,r);var a=mg(this._isDirected,t,n,r);return t=a.v,n=a.w,Object.freeze(a),this._edgeObjs[o]=a,Fu(this._preds[n],t),Fu(this._sucs[t],n),this._in[n][o]=a,this._out[t][o]=a,this._edgeCount++,this}edge(t,n,r){var i=arguments.length===1?gl(this._isDirected,arguments[0]):mr(this._isDirected,t,n,r);return this._edgeLabels[i]}edgeAsObj(){const t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,n,r){var i=arguments.length===1?gl(this._isDirected,arguments[0]):mr(this._isDirected,t,n,r);return Object.hasOwn(this._edgeLabels,i)}removeEdge(t,n,r){var i=arguments.length===1?gl(this._isDirected,arguments[0]):mr(this._isDirected,t,n,r),s=this._edgeObjs[i];return s&&(t=s.v,n=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],bu(this._preds[n],t),bu(this._sucs[t],n),delete this._in[n][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,n){var r=this._in[t];if(r){var i=Object.values(r);return n?i.filter(s=>s.v===n):i}}outEdges(t,n){var r=this._out[t];if(r){var i=Object.values(r);return n?i.filter(s=>s.w===n):i}}nodeEdges(t,n){var r=this.inEdges(t,n);if(r)return r.concat(this.outEdges(t,n))}};function Fu(e,t){e[t]?e[t]++:e[t]=1}function bu(e,t){--e[t]||delete e[t]}function mr(e,t,n,r){var i=""+t,s=""+n;if(!e&&i>s){var l=i;i=s,s=l}return i+Au+s+Au+(r===void 0?hg:r)}function mg(e,t,n,r){var i=""+t,s=""+n;if(!e&&i>s){var l=i;i=s,s=l}var o={v:i,w:s};return r&&(o.name=r),o}function gl(e,t){return mr(e,t.v,t.w,t.name)}var _a=pg,vg="2.2.4",gg={Graph:_a,version:vg},yg=_a,kg={write:wg,read:Eg};function wg(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:_g(e),edges:xg(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function _g(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function xg(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function Eg(e){var t=new yg(e.options).setGraph(e.value);return e.nodes.forEach(function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var Sg=Ng;function Ng(e){var t={},n=[],r;function i(s){Object.hasOwn(t,s)||(t[s]=!0,r.push(s),e.successors(s).forEach(i),e.predecessors(s).forEach(i))}return e.nodes().forEach(function(s){r=[],i(s),r.length&&n.push(r)}),n}let Cg=class{constructor(){se(this,"_arr",[]);se(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(t){return t.key})}has(t){return Object.hasOwn(this._keyIndices,t)}priority(t){var n=this._keyIndices[t];if(n!==void 0)return this._arr[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(t,n){var r=this._keyIndices;if(t=String(t),!Object.hasOwn(r,t)){var i=this._arr,s=i.length;return r[t]=s,i.push({key:t,priority:n}),this._decrease(s),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,n){var r=this._keyIndices[t];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)}_heapify(t){var n=this._arr,r=2*t,i=r+1,s=t;r<n.length&&(s=n[r].priority<n[s].priority?r:s,i<n.length&&(s=n[i].priority<n[s].priority?i:s),s!==t&&(this._swap(t,s),this._heapify(s)))}_decrease(t){for(var n=this._arr,r=n[t].priority,i;t!==0&&(i=t>>1,!(n[i].priority<r));)this._swap(t,i),t=i}_swap(t,n){var r=this._arr,i=this._keyIndices,s=r[t],l=r[n];r[t]=l,r[n]=s,i[l.key]=t,i[s.key]=n}};var bf=Cg,jg=bf,Vf=Og,Tg=()=>1;function Og(e,t,n,r){return Lg(e,String(t),n||Tg,r||function(i){return e.outEdges(i)})}function Lg(e,t,n,r){var i={},s=new jg,l,o,a=function(u){var c=u.v!==l?u.v:u.w,d=i[c],f=n(u),y=o.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+f);y<d.distance&&(d.distance=y,d.predecessor=l,s.decrease(c,y))};for(e.nodes().forEach(function(u){var c=u===t?0:Number.POSITIVE_INFINITY;i[u]={distance:c},s.add(u,c)});s.size()>0&&(l=s.removeMin(),o=i[l],o.distance!==Number.POSITIVE_INFINITY);)r(l).forEach(a);return i}var Pg=Vf,Ig=Rg;function Rg(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=Pg(e,i,t,n),r},{})}var Uf=Mg;function Mg(e){var t=0,n=[],r={},i=[];function s(l){var o=r[l]={onStack:!0,lowlink:t,index:t++};if(n.push(l),e.successors(l).forEach(function(c){Object.hasOwn(r,c)?r[c].onStack&&(o.lowlink=Math.min(o.lowlink,r[c].index)):(s(c),o.lowlink=Math.min(o.lowlink,r[c].lowlink))}),o.lowlink===o.index){var a=[],u;do u=n.pop(),r[u].onStack=!1,a.push(u);while(l!==u);i.push(a)}}return e.nodes().forEach(function(l){Object.hasOwn(r,l)||s(l)}),i}var $g=Uf,zg=Dg;function Dg(e){return $g(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var Ag=bg,Fg=()=>1;function bg(e,t,n){return Vg(e,t||Fg,n||function(r){return e.outEdges(r)})}function Vg(e,t,n){var r={},i=e.nodes();return i.forEach(function(s){r[s]={},r[s][s]={distance:0},i.forEach(function(l){s!==l&&(r[s][l]={distance:Number.POSITIVE_INFINITY})}),n(s).forEach(function(l){var o=l.v===s?l.w:l.v,a=t(l);r[s][o]={distance:a,predecessor:s}})}),i.forEach(function(s){var l=r[s];i.forEach(function(o){var a=r[o];i.forEach(function(u){var c=a[s],d=l[u],f=a[u],y=c.distance+d.distance;y<f.distance&&(f.distance=y,f.predecessor=d.predecessor)})})}),r}function Zf(e){var t={},n={},r=[];function i(s){if(Object.hasOwn(n,s))throw new wo;Object.hasOwn(t,s)||(n[s]=!0,t[s]=!0,e.predecessors(s).forEach(i),delete n[s],r.push(s))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new wo;return r}class wo extends Error{constructor(){super(...arguments)}}var Bf=Zf;Zf.CycleException=wo;var Vu=Bf,Ug=Zg;function Zg(e){try{Vu(e)}catch(t){if(t instanceof Vu.CycleException)return!1;throw t}return!0}var Wf=Bg;function Bg(e,t,n){Array.isArray(t)||(t=[t]);var r=e.isDirected()?o=>e.successors(o):o=>e.neighbors(o),i=n==="post"?Wg:Hg,s=[],l={};return t.forEach(o=>{if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);i(o,r,l,s)}),s}function Wg(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var s=i.pop();s[1]?r.push(s[0]):Object.hasOwn(n,s[0])||(n[s[0]]=!0,i.push([s[0],!0]),Hf(t(s[0]),l=>i.push([l,!1])))}}function Hg(e,t,n,r){for(var i=[e];i.length>0;){var s=i.pop();Object.hasOwn(n,s)||(n[s]=!0,r.push(s),Hf(t(s),l=>i.push(l)))}}function Hf(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}var Gg=Wf,Qg=Yg;function Yg(e,t){return Gg(e,t,"post")}var Kg=Wf,Xg=Jg;function Jg(e,t){return Kg(e,t,"pre")}var qg=_a,ey=bf,ty=ny;function ny(e,t){var n=new qg,r={},i=new ey,s;function l(a){var u=a.v===s?a.w:a.v,c=i.priority(u);if(c!==void 0){var d=t(a);d<c&&(r[u]=s,i.decrease(u,d))}}if(e.nodeCount()===0)return n;e.nodes().forEach(function(a){i.add(a,Number.POSITIVE_INFINITY),n.setNode(a)}),i.decrease(e.nodes()[0],0);for(var o=!1;i.size()>0;){if(s=i.removeMin(),Object.hasOwn(r,s))n.setEdge(s,r[s]);else{if(o)throw new Error("Input graph is not connected: "+e);o=!0}e.nodeEdges(s).forEach(l)}return n}var ry={components:Sg,dijkstra:Vf,dijkstraAll:Ig,findCycles:zg,floydWarshall:Ag,isAcyclic:Ug,postorder:Qg,preorder:Xg,prim:ty,tarjan:Uf,topsort:Bf},Uu=gg,nt={Graph:Uu.Graph,json:kg,alg:ry,version:Uu.version};let iy=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return Zu(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&Zu(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let t=[],n=this._sentinel,r=n._prev;for(;r!==n;)t.push(JSON.stringify(r,sy)),r=r._prev;return"["+t.join(", ")+"]"}};function Zu(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function sy(e,t){if(e!=="_next"&&e!=="_prev")return t}var ly=iy;let oy=nt.Graph,ay=ly;var uy=dy;let cy=()=>1;function dy(e,t){if(e.nodeCount()<=1)return[];let n=hy(e,t||cy);return fy(n.graph,n.buckets,n.zeroIdx).flatMap(i=>e.outEdges(i.v,i.w))}function fy(e,t,n){let r=[],i=t[t.length-1],s=t[0],l;for(;e.nodeCount();){for(;l=s.dequeue();)yl(e,t,n,l);for(;l=i.dequeue();)yl(e,t,n,l);if(e.nodeCount()){for(let o=t.length-2;o>0;--o)if(l=t[o].dequeue(),l){r=r.concat(yl(e,t,n,l,!0));break}}}return r}function yl(e,t,n,r,i){let s=i?[]:void 0;return e.inEdges(r.v).forEach(l=>{let o=e.edge(l),a=e.node(l.v);i&&s.push({v:l.v,w:l.w}),a.out-=o,_o(t,n,a)}),e.outEdges(r.v).forEach(l=>{let o=e.edge(l),a=l.w,u=e.node(a);u.in-=o,_o(t,n,u)}),e.removeNode(r.v),s}function hy(e,t){let n=new oy,r=0,i=0;e.nodes().forEach(o=>{n.setNode(o,{v:o,in:0,out:0})}),e.edges().forEach(o=>{let a=n.edge(o.v,o.w)||0,u=t(o),c=a+u;n.setEdge(o.v,o.w,c),i=Math.max(i,n.node(o.v).out+=u),r=Math.max(r,n.node(o.w).in+=u)});let s=py(i+r+3).map(()=>new ay),l=r+1;return n.nodes().forEach(o=>{_o(s,l,n.node(o))}),{graph:n,buckets:s,zeroIdx:l}}function _o(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function py(e){const t=[];for(let n=0;n<e;n++)t.push(n);return t}let Gf=nt.Graph;var oe={addBorderNode:Ey,addDummyNode:Qf,applyWithChunking:Fs,asNonCompoundGraph:vy,buildLayerMatrix:wy,intersectRect:ky,mapValues:Ly,maxRank:Kf,normalizeRanks:_y,notime:jy,partition:Ny,pick:Oy,predecessorWeights:yy,range:Jf,removeEmptyRanks:xy,simplify:my,successorWeights:gy,time:Cy,uniqueId:Xf,zipObject:xa};function Qf(e,t,n,r){let i;do i=Xf(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function my(e){let t=new Gf().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function vy(e){let t=new Gf({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function gy(e){let t=e.nodes().map(n=>{let r={};return e.outEdges(n).forEach(i=>{r[i.w]=(r[i.w]||0)+e.edge(i).weight}),r});return xa(e.nodes(),t)}function yy(e){let t=e.nodes().map(n=>{let r={};return e.inEdges(n).forEach(i=>{r[i.v]=(r[i.v]||0)+e.edge(i).weight}),r});return xa(e.nodes(),t)}function ky(e,t){let n=e.x,r=e.y,i=t.x-n,s=t.y-r,l=e.width/2,o=e.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");let a,u;return Math.abs(s)*l>Math.abs(i)*o?(s<0&&(o=-o),a=o*i/s,u=o):(i<0&&(l=-l),a=l,u=l*s/i),{x:n+a,y:r+u}}function wy(e){let t=Jf(Kf(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function _y(e){let t=e.nodes().map(r=>{let i=e.node(r).rank;return i===void 0?Number.MAX_VALUE:i}),n=Fs(Math.min,t);e.nodes().forEach(r=>{let i=e.node(r);Object.hasOwn(i,"rank")&&(i.rank-=n)})}function xy(e){let t=e.nodes().map(l=>e.node(l).rank),n=Fs(Math.min,t),r=[];e.nodes().forEach(l=>{let o=e.node(l).rank-n;r[o]||(r[o]=[]),r[o].push(l)});let i=0,s=e.graph().nodeRankFactor;Array.from(r).forEach((l,o)=>{l===void 0&&o%s!==0?--i:l!==void 0&&i&&l.forEach(a=>e.node(a).rank+=i)})}function Ey(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),Qf(e,"border",i,t)}function Sy(e,t=Yf){const n=[];for(let r=0;r<e.length;r+=t){const i=e.slice(r,r+t);n.push(i)}return n}const Yf=65535;function Fs(e,t){if(t.length>Yf){const n=Sy(t);return e.apply(null,n.map(r=>e.apply(null,r)))}else return e.apply(null,t)}function Kf(e){const n=e.nodes().map(r=>{let i=e.node(r).rank;return i===void 0?Number.MIN_VALUE:i});return Fs(Math.max,n)}function Ny(e,t){let n={lhs:[],rhs:[]};return e.forEach(r=>{t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function Cy(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function jy(e,t){return t()}let Ty=0;function Xf(e){var t=++Ty;return toString(e)+t}function Jf(e,t,n=1){t==null&&(t=e,e=0);let r=s=>s<t;n<0&&(r=s=>t<s);const i=[];for(let s=e;r(s);s+=n)i.push(s);return i}function Oy(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function Ly(e,t){let n=t;return typeof t=="string"&&(n=r=>r[t]),Object.entries(e).reduce((r,[i,s])=>(r[i]=n(s,i),r),{})}function xa(e,t){return e.reduce((n,r,i)=>(n[r]=t[i],n),{})}let Py=uy,Iy=oe.uniqueId;var Ry={run:My,undo:zy};function My(e){(e.graph().acyclicer==="greedy"?Py(e,n(e)):$y(e)).forEach(r=>{let i=e.edge(r);e.removeEdge(r),i.forwardName=r.name,i.reversed=!0,e.setEdge(r.w,r.v,i,Iy("rev"))});function n(r){return i=>r.edge(i).weight}}function $y(e){let t=[],n={},r={};function i(s){Object.hasOwn(r,s)||(r[s]=!0,n[s]=!0,e.outEdges(s).forEach(l=>{Object.hasOwn(n,l.w)?t.push(l):i(l.w)}),delete n[s])}return e.nodes().forEach(i),t}function zy(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}let Dy=oe;var Ay={run:Fy,undo:Vy};function Fy(e){e.graph().dummyChains=[],e.edges().forEach(t=>by(e,t))}function by(e,t){let n=t.v,r=e.node(n).rank,i=t.w,s=e.node(i).rank,l=t.name,o=e.edge(t),a=o.labelRank;if(s===r+1)return;e.removeEdge(t);let u,c,d;for(d=0,++r;r<s;++d,++r)o.points=[],c={width:0,height:0,edgeLabel:o,edgeObj:t,rank:r},u=Dy.addDummyNode(e,"edge",c,"_d"),r===a&&(c.width=o.width,c.height=o.height,c.dummy="edge-label",c.labelpos=o.labelpos),e.setEdge(n,u,{weight:o.weight},l),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:o.weight},l)}function Vy(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}const{applyWithChunking:Uy}=oe;var bs={longestPath:Zy,slack:By};function Zy(e){var t={};function n(r){var i=e.node(r);if(Object.hasOwn(t,r))return i.rank;t[r]=!0;let s=e.outEdges(r).map(o=>o==null?Number.POSITIVE_INFINITY:n(o.w)-e.edge(o).minlen);var l=Uy(Math.min,s);return l===Number.POSITIVE_INFINITY&&(l=0),i.rank=l}e.sources().forEach(n)}function By(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Wy=nt.Graph,ks=bs.slack,qf=Hy;function Hy(e){var t=new Wy({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,s;Gy(t,e)<r;)i=Qy(t,e),s=t.hasNode(i.v)?ks(e,i):-ks(e,i),Yy(t,e,s);return t}function Gy(e,t){function n(r){t.nodeEdges(r).forEach(i=>{var s=i.v,l=r===s?i.w:s;!e.hasNode(l)&&!ks(t,i)&&(e.setNode(l,{}),e.setEdge(r,l,{}),n(l))})}return e.nodes().forEach(n),e.nodeCount()}function Qy(e,t){return t.edges().reduce((r,i)=>{let s=Number.POSITIVE_INFINITY;return e.hasNode(i.v)!==e.hasNode(i.w)&&(s=ks(t,i)),s<r[0]?[s,i]:r},[Number.POSITIVE_INFINITY,null])[1]}function Yy(e,t,n){e.nodes().forEach(r=>t.node(r).rank+=n)}var Ky=qf,Bu=bs.slack,Xy=bs.longestPath,Jy=nt.alg.preorder,qy=nt.alg.postorder,e0=oe.simplify,t0=yn;yn.initLowLimValues=Sa;yn.initCutValues=Ea;yn.calcCutValue=eh;yn.leaveEdge=nh;yn.enterEdge=rh;yn.exchangeEdges=ih;function yn(e){e=e0(e),Xy(e);var t=Ky(e);Sa(t),Ea(t,e);for(var n,r;n=nh(t);)r=rh(t,e,n),ih(t,e,n,r)}function Ea(e,t){var n=qy(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(r=>n0(e,t,r))}function n0(e,t,n){var r=e.node(n),i=r.parent;e.edge(n,i).cutvalue=eh(e,t,n)}function eh(e,t,n){var r=e.node(n),i=r.parent,s=!0,l=t.edge(n,i),o=0;return l||(s=!1,l=t.edge(i,n)),o=l.weight,t.nodeEdges(n).forEach(a=>{var u=a.v===n,c=u?a.w:a.v;if(c!==i){var d=u===s,f=t.edge(a).weight;if(o+=d?f:-f,i0(e,n,c)){var y=e.edge(n,c).cutvalue;o+=d?-y:y}}}),o}function Sa(e,t){arguments.length<2&&(t=e.nodes()[0]),th(e,{},1,t)}function th(e,t,n,r,i){var s=n,l=e.node(r);return t[r]=!0,e.neighbors(r).forEach(o=>{Object.hasOwn(t,o)||(n=th(e,t,n,o,r))}),l.low=s,l.lim=n++,i?l.parent=i:delete l.parent,n}function nh(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function rh(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var s=e.node(r),l=e.node(i),o=s,a=!1;s.lim>l.lim&&(o=l,a=!0);var u=t.edges().filter(c=>a===Wu(e,e.node(c.v),o)&&a!==Wu(e,e.node(c.w),o));return u.reduce((c,d)=>Bu(t,d)<Bu(t,c)?d:c)}function ih(e,t,n,r){var i=n.v,s=n.w;e.removeEdge(i,s),e.setEdge(r.v,r.w,{}),Sa(e),Ea(e,t),r0(e,t)}function r0(e,t){var n=e.nodes().find(i=>!t.node(i).parent),r=Jy(e,n);r=r.slice(1),r.forEach(i=>{var s=e.node(i).parent,l=t.edge(i,s),o=!1;l||(l=t.edge(s,i),o=!0),t.node(i).rank=t.node(s).rank+(o?l.minlen:-l.minlen)})}function i0(e,t,n){return e.hasEdge(t,n)}function Wu(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var s0=bs,sh=s0.longestPath,l0=qf,o0=t0,a0=u0;function u0(e){switch(e.graph().ranker){case"network-simplex":Hu(e);break;case"tight-tree":d0(e);break;case"longest-path":c0(e);break;default:Hu(e)}}var c0=sh;function d0(e){sh(e),l0(e)}function Hu(e){o0(e)}var f0=h0;function h0(e){let t=m0(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,s=p0(e,t,i.v,i.w),l=s.path,o=s.lca,a=0,u=l[a],c=!0;for(;n!==i.w;){if(r=e.node(n),c){for(;(u=l[a])!==o&&e.node(u).maxRank<r.rank;)a++;u===o&&(c=!1)}if(!c){for(;a<l.length-1&&e.node(u=l[a+1]).minRank<=r.rank;)a++;u=l[a]}e.setParent(n,u),n=e.successors(n)[0]}})}function p0(e,t,n,r){let i=[],s=[],l=Math.min(t[n].low,t[r].low),o=Math.max(t[n].lim,t[r].lim),a,u;a=n;do a=e.parent(a),i.push(a);while(a&&(t[a].low>l||o>t[a].lim));for(u=a,a=r;(a=e.parent(a))!==u;)s.push(a);return{path:i.concat(s.reverse()),lca:u}}function m0(e){let t={},n=0;function r(i){let s=n;e.children(i).forEach(r),t[i]={low:s,lim:n++}}return e.children().forEach(r),t}let ws=oe;var v0={run:g0,cleanup:w0};function g0(e){let t=ws.addDummyNode(e,"root",{},"_root"),n=y0(e),r=Object.values(n),i=ws.applyWithChunking(Math.max,r)-1,s=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(o=>e.edge(o).minlen*=s);let l=k0(e)+1;e.children().forEach(o=>lh(e,t,s,l,i,n,o)),e.graph().nodeRankFactor=s}function lh(e,t,n,r,i,s,l){let o=e.children(l);if(!o.length){l!==t&&e.setEdge(t,l,{weight:0,minlen:n});return}let a=ws.addBorderNode(e,"_bt"),u=ws.addBorderNode(e,"_bb"),c=e.node(l);e.setParent(a,l),c.borderTop=a,e.setParent(u,l),c.borderBottom=u,o.forEach(d=>{lh(e,t,n,r,i,s,d);let f=e.node(d),y=f.borderTop?f.borderTop:d,k=f.borderBottom?f.borderBottom:d,_=f.borderTop?r:2*r,T=y!==k?1:i-s[l]+1;e.setEdge(a,y,{weight:_,minlen:T,nestingEdge:!0}),e.setEdge(k,u,{weight:_,minlen:T,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,a,{weight:0,minlen:i+s[l]})}function y0(e){var t={};function n(r,i){var s=e.children(r);s&&s.length&&s.forEach(l=>n(l,i+1)),t[r]=i}return e.children().forEach(r=>n(r,1)),t}function k0(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function w0(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}let _0=oe;var x0=E0;function E0(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let s=i.minRank,l=i.maxRank+1;s<l;++s)Gu(e,"borderLeft","_bl",n,i,s),Gu(e,"borderRight","_br",n,i,s)}}e.children().forEach(t)}function Gu(e,t,n,r,i,s){let l={width:0,height:0,rank:s,borderType:t},o=i[t][s-1],a=_0.addDummyNode(e,"border",l,n);i[t][s]=a,e.setParent(a,r),o&&e.setEdge(o,a,{weight:1})}var S0={adjust:N0,undo:C0};function N0(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&oh(e)}function C0(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&j0(e),(t==="lr"||t==="rl")&&(T0(e),oh(e))}function oh(e){e.nodes().forEach(t=>Qu(e.node(t))),e.edges().forEach(t=>Qu(e.edge(t)))}function Qu(e){let t=e.width;e.width=e.height,e.height=t}function j0(e){e.nodes().forEach(t=>kl(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(kl),Object.hasOwn(n,"y")&&kl(n)})}function kl(e){e.y=-e.y}function T0(e){e.nodes().forEach(t=>wl(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(wl),Object.hasOwn(n,"x")&&wl(n)})}function wl(e){let t=e.x;e.x=e.y,e.y=t}let Yu=oe;var O0=L0;function L0(e){let t={},n=e.nodes().filter(a=>!e.children(a).length),r=n.map(a=>e.node(a).rank),i=Yu.applyWithChunking(Math.max,r),s=Yu.range(i+1).map(()=>[]);function l(a){if(t[a])return;t[a]=!0;let u=e.node(a);s[u.rank].push(a),e.successors(a).forEach(l)}return n.sort((a,u)=>e.node(a).rank-e.node(u).rank).forEach(l),s}let P0=oe.zipObject;var I0=R0;function R0(e,t){let n=0;for(let r=1;r<t.length;++r)n+=M0(e,t[r-1],t[r]);return n}function M0(e,t,n){let r=P0(n,n.map((u,c)=>c)),i=t.flatMap(u=>e.outEdges(u).map(c=>({pos:r[c.w],weight:e.edge(c).weight})).sort((c,d)=>c.pos-d.pos)),s=1;for(;s<n.length;)s<<=1;let l=2*s-1;s-=1;let o=new Array(l).fill(0),a=0;return i.forEach(u=>{let c=u.pos+s;o[c]+=u.weight;let d=0;for(;c>0;)c%2&&(d+=o[c+1]),c=c-1>>1,o[c]+=u.weight;a+=u.weight*d}),a}var $0=z0;function z0(e,t=[]){return t.map(n=>{let r=e.inEdges(n);if(r.length){let i=r.reduce((s,l)=>{let o=e.edge(l),a=e.node(l.v);return{sum:s.sum+o.weight*a.order,weight:s.weight+o.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}let D0=oe;var A0=F0;function F0(e,t){let n={};e.forEach((i,s)=>{let l=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:s};i.barycenter!==void 0&&(l.barycenter=i.barycenter,l.weight=i.weight)}),t.edges().forEach(i=>{let s=n[i.v],l=n[i.w];s!==void 0&&l!==void 0&&(l.indegree++,s.out.push(n[i.w]))});let r=Object.values(n).filter(i=>!i.indegree);return b0(r)}function b0(e){let t=[];function n(i){return s=>{s.merged||(s.barycenter===void 0||i.barycenter===void 0||s.barycenter>=i.barycenter)&&V0(i,s)}}function r(i){return s=>{s.in.push(i),--s.indegree===0&&e.push(s)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(i=>!i.merged).map(i=>D0.pick(i,["vs","i","barycenter","weight"]))}function V0(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}let U0=oe;var Z0=B0;function B0(e,t){let n=U0.partition(e,c=>Object.hasOwn(c,"barycenter")),r=n.lhs,i=n.rhs.sort((c,d)=>d.i-c.i),s=[],l=0,o=0,a=0;r.sort(W0(!!t)),a=Ku(s,i,a),r.forEach(c=>{a+=c.vs.length,s.push(c.vs),l+=c.barycenter*c.weight,o+=c.weight,a=Ku(s,i,a)});let u={vs:s.flat(!0)};return o&&(u.barycenter=l/o,u.weight=o),u}function Ku(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function W0(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}let H0=$0,G0=A0,Q0=Z0;var Y0=ah;function ah(e,t,n,r){let i=e.children(t),s=e.node(t),l=s?s.borderLeft:void 0,o=s?s.borderRight:void 0,a={};l&&(i=i.filter(f=>f!==l&&f!==o));let u=H0(e,i);u.forEach(f=>{if(e.children(f.v).length){let y=ah(e,f.v,n,r);a[f.v]=y,Object.hasOwn(y,"barycenter")&&X0(f,y)}});let c=G0(u,n);K0(c,a);let d=Q0(c,r);if(l&&(d.vs=[l,d.vs,o].flat(!0),e.predecessors(l).length)){let f=e.node(e.predecessors(l)[0]),y=e.node(e.predecessors(o)[0]);Object.hasOwn(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+y.order)/(d.weight+2),d.weight+=2}return d}function K0(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(r=>t[r]?t[r].vs:r)})}function X0(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}let J0=nt.Graph,q0=oe;var ek=tk;function tk(e,t,n){let r=nk(e),i=new J0({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(s=>e.node(s));return e.nodes().forEach(s=>{let l=e.node(s),o=e.parent(s);(l.rank===t||l.minRank<=t&&t<=l.maxRank)&&(i.setNode(s),i.setParent(s,o||r),e[n](s).forEach(a=>{let u=a.v===s?a.w:a.v,c=i.edge(u,s),d=c!==void 0?c.weight:0;i.setEdge(u,s,{weight:e.edge(a).weight+d})}),Object.hasOwn(l,"minRank")&&i.setNode(s,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]}))}),i}function nk(e){for(var t;e.hasNode(t=q0.uniqueId("_root")););return t}var rk=ik;function ik(e,t,n){let r={},i;n.forEach(s=>{let l=e.parent(s),o,a;for(;l;){if(o=e.parent(l),o?(a=r[o],r[o]=l):(a=i,i=l),a&&a!==l){t.setEdge(a,l);return}l=o}})}let sk=O0,lk=I0,ok=Y0,ak=ek,uk=rk,ck=nt.Graph,Ti=oe;var dk=uh;function uh(e,t){if(t&&typeof t.customOrder=="function"){t.customOrder(e,uh);return}let n=Ti.maxRank(e),r=Xu(e,Ti.range(1,n+1),"inEdges"),i=Xu(e,Ti.range(n-1,-1,-1),"outEdges"),s=sk(e);if(Ju(e,s),t&&t.disableOptimalOrderHeuristic)return;let l=Number.POSITIVE_INFINITY,o;for(let a=0,u=0;u<4;++a,++u){fk(a%2?r:i,a%4>=2),s=Ti.buildLayerMatrix(e);let c=lk(e,s);c<l&&(u=0,o=Object.assign({},s),l=c)}Ju(e,o)}function Xu(e,t,n){return t.map(function(r){return ak(e,r,n)})}function fk(e,t){let n=new ck;e.forEach(function(r){let i=r.graph().root,s=ok(r,i,n,t);s.vs.forEach((l,o)=>r.node(l).order=o),uk(r,n,s.vs)})}function Ju(e,t){Object.values(t).forEach(n=>n.forEach((r,i)=>e.node(r).order=i))}let hk=nt.Graph,pt=oe;var pk={positionX:Nk};function mk(e,t){let n={};function r(i,s){let l=0,o=0,a=i.length,u=s[s.length-1];return s.forEach((c,d)=>{let f=gk(e,c),y=f?e.node(f).order:a;(f||c===u)&&(s.slice(o,d+1).forEach(k=>{e.predecessors(k).forEach(_=>{let T=e.node(_),m=T.order;(m<l||y<m)&&!(T.dummy&&e.node(k).dummy)&&ch(n,_,k)})}),o=d+1,l=y)}),s}return t.length&&t.reduce(r),n}function vk(e,t){let n={};function r(s,l,o,a,u){let c;pt.range(l,o).forEach(d=>{c=s[d],e.node(c).dummy&&e.predecessors(c).forEach(f=>{let y=e.node(f);y.dummy&&(y.order<a||y.order>u)&&ch(n,f,c)})})}function i(s,l){let o=-1,a,u=0;return l.forEach((c,d)=>{if(e.node(c).dummy==="border"){let f=e.predecessors(c);f.length&&(a=e.node(f[0]).order,r(l,u,d,o,a),u=d,o=a)}r(l,u,l.length,a,s.length)}),l}return t.length&&t.reduce(i),n}function gk(e,t){if(e.node(t).dummy)return e.predecessors(t).find(n=>e.node(n).dummy)}function ch(e,t,n){if(t>n){let i=t;t=n,n=i}let r=e[t];r||(e[t]=r={}),r[n]=!0}function yk(e,t,n){if(t>n){let r=t;t=n,n=r}return!!e[t]&&Object.hasOwn(e[t],n)}function kk(e,t,n,r){let i={},s={},l={};return t.forEach(o=>{o.forEach((a,u)=>{i[a]=a,s[a]=a,l[a]=u})}),t.forEach(o=>{let a=-1;o.forEach(u=>{let c=r(u);if(c.length){c=c.sort((f,y)=>l[f]-l[y]);let d=(c.length-1)/2;for(let f=Math.floor(d),y=Math.ceil(d);f<=y;++f){let k=c[f];s[u]===u&&a<l[k]&&!yk(n,u,k)&&(s[k]=u,s[u]=i[u]=i[k],a=l[k])}}})}),{root:i,align:s}}function wk(e,t,n,r,i){let s={},l=_k(e,t,n,i),o=i?"borderLeft":"borderRight";function a(d,f){let y=l.nodes(),k=y.pop(),_={};for(;k;)_[k]?d(k):(_[k]=!0,y.push(k),y=y.concat(f(k))),k=y.pop()}function u(d){s[d]=l.inEdges(d).reduce((f,y)=>Math.max(f,s[y.v]+l.edge(y)),0)}function c(d){let f=l.outEdges(d).reduce((k,_)=>Math.min(k,s[_.w]-l.edge(_)),Number.POSITIVE_INFINITY),y=e.node(d);f!==Number.POSITIVE_INFINITY&&y.borderType!==o&&(s[d]=Math.max(s[d],f))}return a(u,l.predecessors.bind(l)),a(c,l.successors.bind(l)),Object.keys(r).forEach(d=>s[d]=s[n[d]]),s}function _k(e,t,n,r){let i=new hk,s=e.graph(),l=Ck(s.nodesep,s.edgesep,r);return t.forEach(o=>{let a;o.forEach(u=>{let c=n[u];if(i.setNode(c),a){var d=n[a],f=i.edge(d,c);i.setEdge(d,c,Math.max(l(e,u,a),f||0))}a=u})}),i}function xk(e,t){return Object.values(t).reduce((n,r)=>{let i=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;Object.entries(r).forEach(([o,a])=>{let u=jk(e,o)/2;i=Math.max(a+u,i),s=Math.min(a-u,s)});const l=i-s;return l<n[0]&&(n=[l,r]),n},[Number.POSITIVE_INFINITY,null])[1]}function Ek(e,t){let n=Object.values(t),r=pt.applyWithChunking(Math.min,n),i=pt.applyWithChunking(Math.max,n);["u","d"].forEach(s=>{["l","r"].forEach(l=>{let o=s+l,a=e[o];if(a===t)return;let u=Object.values(a),c=r-pt.applyWithChunking(Math.min,u);l!=="l"&&(c=i-pt.applyWithChunking(Math.max,u)),c&&(e[o]=pt.mapValues(a,d=>d+c))})})}function Sk(e,t){return pt.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let i=Object.values(e).map(s=>s[r]).sort((s,l)=>s-l);return(i[1]+i[2])/2}})}function Nk(e){let t=pt.buildLayerMatrix(e),n=Object.assign(mk(e,t),vk(e,t)),r={},i;["u","d"].forEach(l=>{i=l==="u"?t:Object.values(t).reverse(),["l","r"].forEach(o=>{o==="r"&&(i=i.map(d=>Object.values(d).reverse()));let a=(l==="u"?e.predecessors:e.successors).bind(e),u=kk(e,i,n,a),c=wk(e,i,u.root,u.align,o==="r");o==="r"&&(c=pt.mapValues(c,d=>-d)),r[l+o]=c})});let s=xk(e,r);return Ek(r,s),Sk(r,e.graph().align)}function Ck(e,t,n){return(r,i,s)=>{let l=r.node(i),o=r.node(s),a=0,u;if(a+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":u=-l.width/2;break;case"r":u=l.width/2;break}if(u&&(a+=n?u:-u),u=0,a+=(l.dummy?t:e)/2,a+=(o.dummy?t:e)/2,a+=o.width/2,Object.hasOwn(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":u=o.width/2;break;case"r":u=-o.width/2;break}return u&&(a+=n?u:-u),u=0,a}}function jk(e,t){return e.node(t).width}let dh=oe,Tk=pk.positionX;var Ok=Lk;function Lk(e){e=dh.asNonCompoundGraph(e),Pk(e),Object.entries(Tk(e)).forEach(([t,n])=>e.node(t).x=n)}function Pk(e){let t=dh.buildLayerMatrix(e),n=e.graph().ranksep,r=0;t.forEach(i=>{const s=i.reduce((l,o)=>{const a=e.node(o).height;return l>a?l:a},0);i.forEach(l=>e.node(l).y=r+s/2),r+=s+n})}let qu=Ry,ec=Ay,Ik=a0,Rk=oe.normalizeRanks,Mk=f0,$k=oe.removeEmptyRanks,tc=v0,zk=x0,nc=S0,Dk=dk,Ak=Ok,We=oe,Fk=nt.Graph;var bk=Vk;function Vk(e,t){let n=t&&t.debugTiming?We.time:We.notime;n("layout",()=>{let r=n(" buildLayoutGraph",()=>Xk(e));n(" runLayout",()=>Uk(r,n,t)),n(" updateInputGraph",()=>Zk(e,r))})}function Uk(e,t,n){t(" makeSpaceForEdgeLabels",()=>Jk(e)),t(" removeSelfEdges",()=>ow(e)),t(" acyclic",()=>qu.run(e)),t(" nestingGraph.run",()=>tc.run(e)),t(" rank",()=>Ik(We.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>qk(e)),t(" removeEmptyRanks",()=>$k(e)),t(" nestingGraph.cleanup",()=>tc.cleanup(e)),t(" normalizeRanks",()=>Rk(e)),t(" assignRankMinMax",()=>ew(e)),t(" removeEdgeLabelProxies",()=>tw(e)),t(" normalize.run",()=>ec.run(e)),t(" parentDummyChains",()=>Mk(e)),t(" addBorderSegments",()=>zk(e)),t(" order",()=>Dk(e,n)),t(" insertSelfEdges",()=>aw(e)),t(" adjustCoordinateSystem",()=>nc.adjust(e)),t(" position",()=>Ak(e)),t(" positionSelfEdges",()=>uw(e)),t(" removeBorderNodes",()=>lw(e)),t(" normalize.undo",()=>ec.undo(e)),t(" fixupEdgeLabelCoords",()=>iw(e)),t(" undoCoordinateSystem",()=>nc.undo(e)),t(" translateGraph",()=>nw(e)),t(" assignNodeIntersects",()=>rw(e)),t(" reversePoints",()=>sw(e)),t(" acyclic.undo",()=>qu.undo(e))}function Zk(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,"x")&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}let Bk=["nodesep","edgesep","ranksep","marginx","marginy"],Wk={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Hk=["acyclicer","ranker","rankdir","align"],Gk=["width","height"],rc={width:0,height:0},Qk=["minlen","weight","width","height","labeloffset"],Yk={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Kk=["labelpos"];function Xk(e){let t=new Fk({multigraph:!0,compound:!0}),n=xl(e.graph());return t.setGraph(Object.assign({},Wk,_l(n,Bk),We.pick(n,Hk))),e.nodes().forEach(r=>{let i=xl(e.node(r));const s=_l(i,Gk);Object.keys(rc).forEach(l=>{s[l]===void 0&&(s[l]=rc[l])}),t.setNode(r,s),t.setParent(r,e.parent(r))}),e.edges().forEach(r=>{let i=xl(e.edge(r));t.setEdge(r,Object.assign({},Yk,_l(i,Qk),We.pick(i,Kk)))}),t}function Jk(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function qk(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let r=e.node(t.v),s={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};We.addDummyNode(e,"edge-proxy",s,"_ep")}})}function ew(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function tw(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function nw(e){let t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,s=e.graph(),l=s.marginx||0,o=s.marginy||0;function a(u){let c=u.x,d=u.y,f=u.width,y=u.height;t=Math.min(t,c-f/2),n=Math.max(n,c+f/2),r=Math.min(r,d-y/2),i=Math.max(i,d+y/2)}e.nodes().forEach(u=>a(e.node(u))),e.edges().forEach(u=>{let c=e.edge(u);Object.hasOwn(c,"x")&&a(c)}),t-=l,r-=o,e.nodes().forEach(u=>{let c=e.node(u);c.x-=t,c.y-=r}),e.edges().forEach(u=>{let c=e.edge(u);c.points.forEach(d=>{d.x-=t,d.y-=r}),Object.hasOwn(c,"x")&&(c.x-=t),Object.hasOwn(c,"y")&&(c.y-=r)}),s.width=n-t+l,s.height=i-r+o}function rw(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),s,l;n.points?(s=n.points[0],l=n.points[n.points.length-1]):(n.points=[],s=i,l=r),n.points.unshift(We.intersectRect(r,s)),n.points.push(We.intersectRect(i,l))})}function iw(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function sw(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function lw(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),s=e.node(n.borderLeft[n.borderLeft.length-1]),l=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(l.x-s.x),n.height=Math.abs(i.y-r.y),n.x=s.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function ow(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function aw(e){var t=We.buildLayerMatrix(e);t.forEach(n=>{var r=0;n.forEach((i,s)=>{var l=e.node(i);l.order=s+r,(l.selfEdges||[]).forEach(o=>{We.addDummyNode(e,"selfedge",{width:o.label.width,height:o.label.height,rank:l.rank,order:s+ ++r,e:o.e,label:o.label},"_se")}),delete l.selfEdges})})}function uw(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),i=r.x+r.width/2,s=r.y,l=n.x-i,o=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*l/3,y:s-o},{x:i+5*l/6,y:s-o},{x:i+l,y:s},{x:i+5*l/6,y:s+o},{x:i+2*l/3,y:s+o}],n.label.x=n.x,n.label.y=n.y}})}function _l(e,t){return We.mapValues(We.pick(e,t),Number)}function xl(e){var t={};return e&&Object.entries(e).forEach(([n,r])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=r}),t}let cw=oe,dw=nt.Graph;var fw={debugOrdering:hw};function hw(e){let t=cw.buildLayerMatrix(e),n=new dw({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(r=>{n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),e.edges().forEach(r=>n.setEdge(r.v,r.w,{},r.name)),t.forEach((r,i)=>{let s="layer"+i;n.setNode(s,{rank:"same"}),r.reduce((l,o)=>(n.setEdge(l,o,{style:"invis"}),o))}),n}var pw="1.1.4",mw={graphlib:nt,layout:bk,debug:fw,util:{time:oe.time,notime:oe.notime},version:pw};const ic=_h(mw);function vw(e,t){const n=new Map(e.map(r=>[`${r.from}>${r.to}`,{...r}]));for(const r of t){const i=`${r.from}>${r.to}`,s=n.get(i);s?s.label=r.label:n.set(i,{from:r.from,to:r.to,symbols:[],label:r.label})}return[...n.values()]}function fh(e){const t=new Map;for(const n of e.chunks)for(const r of n.chunk.hunks)t.set(r,n.index);return t}function sc(e,t,n,r,i=1){const s=`${t}>${n}`,l=e.get(s);l?(l.weight+=i,r==="dep"&&(l.kind="dep")):e.set(s,{from:t,to:n,kind:r,weight:i})}function gw(e,t){const n=e.chunks.map(l=>({id:`c${l.index}`,kind:"chunk",label:l.chunk.title,size:l.size,chunk:l.index})),r=new Map,i=new Map(e.chunks.map(l=>[l.chunk.id,l.index]));for(const l of e.chunks)for(const o of l.chunk.dependsOn){const a=i.get(o);a!==void 0&&sc(r,`c${a}`,`c${l.index}`,"dep",0)}const s=fh(e);for(const l of t){const o=s.get(l.from),a=s.get(l.to);o===void 0||a===void 0||o===a||sc(r,`c${a}`,`c${o}`,"link")}return{nodes:n,edges:hh([...r.values()])}}function hh(e){const t=new Map;for(const i of e)t.set(i.from,[...t.get(i.from)??[],i.to]);const n=(i,s,l)=>{const o=new Set,a=(t.get(i)??[]).filter(u=>!(i===l.from&&u===l.to));for(;a.length;){const u=a.pop();if(u===s)return!0;o.has(u)||(o.add(u),a.push(...t.get(u)??[]))}return!1},r=e.filter(i=>!n(i.from,i.to,i));return r.length===e.length?r:hh(r)}function yw(e,t,n){const r=new Set(e.chunk.hunks),i=fh(t),s=new Map(t.chunks.flatMap(c=>c.hunks.map(d=>[d.id,d.file])));for(const c of t.skim)s.set(c.id,c.file);const l=new Map,o=[...new Set(e.hunks.map(c=>c.file))];for(const c of o)l.set(`f:${c}`,{id:`f:${c}`,kind:"file",label:c,size:ka(e.hunks.filter(d=>d.file===c)),chunk:e.index,file:c});const a=c=>{const d=s.get(c);if(!d)return;if(r.has(c))return`f:${d}`;const f=`n:${d}`;if(!l.has(f)){const y=i.get(c);l.set(f,{id:f,kind:"neighbour",label:d,size:0,chunk:y,file:d})}return f},u=new Map;for(const c of n){if(!r.has(c.from)&&!r.has(c.to))continue;const d=a(c.from),f=a(c.to);if(!d||!f||d===f)continue;const y=`${f}>${d}`,k=u.get(y)??{from:f,to:d,kind:"link",weight:0,symbols:new Set,labels:new Set};k.weight++,c.symbols.forEach(_=>k.symbols.add(_)),c.label&&k.labels.add(c.label),u.set(y,k)}return{nodes:[...l.values()],edges:[...u.values()].map(({symbols:c,labels:d,...f})=>{const y=[...c].sort(),k=d.size?[...d].join(", "):y.length?`${y[0]}${y.length>1?` +${y.length-1}`:""}`:void 0;return{...f,label:k}})}}const kw=7.4,ww=46;function _w(e){const t=e.kind==="chunk"?e.label.length+4:Math.max(ph(e.label).length,xo(e.label).length*.85);return Math.min(300,Math.max(130,t*kw+44))}const ph=e=>e.slice(e.lastIndexOf("/")+1),xo=e=>e.includes("/")?e.slice(0,e.lastIndexOf("/")):"";function xw(e){const t=new ic.graphlib.Graph({multigraph:!1});t.setGraph({rankdir:"LR",nodesep:22,ranksep:70,marginx:20,marginy:20}),t.setDefaultEdgeLabel(()=>({}));for(const r of e.nodes)t.setNode(r.id,{width:_w(r),height:ww});for(const r of e.edges)t.setEdge(r.from,r.to,r.label?{label:r.label,width:r.label.length*6.6+12,height:18,labelpos:"c"}:{});ic.layout(t);const n=t.graph();return{nodes:e.nodes.map(r=>{const i=t.node(r.id);return{...r,x:i.x,y:i.y,w:i.width,h:i.height}}),edges:e.edges.map(r=>{const i=t.edge(r.from,r.to);return{...r,points:i.points,lx:i.x,ly:i.y}}),width:n.width??0,height:n.height??0}}function Ew(e){const[t,...n]=e;if(!t)return"";if(n.length===1)return`M${t.x},${t.y}L${n[0].x},${n[0].y}`;let r=`M${t.x},${t.y}`;for(let i=0;i<n.length-1;i++){const s=n[i],l=n[i+1],o=i===n.length-2?l:{x:(s.x+l.x)/2,y:(s.y+l.y)/2};r+=`Q${s.x},${s.y} ${o.x},${o.y}`}return r}function Sw({status:e,x:t,y:n}){return h.jsxs("g",{className:`status ${e}`,transform:`translate(${t},${n})`,children:[h.jsx("circle",{r:"6",fill:e==="done"?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.6"}),e==="partial"&&h.jsx("path",{d:"M0,-6A6,6 0 0 1 0,6Z",fill:"currentColor"})]})}function Nw({data:e,plan:t,view:n,state:r,at:i}){const s=U.useMemo(()=>vw(e.links,t.links),[e.links,t.links]),l=i===void 0?void 0:n.chunks[i],o=U.useMemo(()=>l?yw(l,n,s):gw(n,s),[l,n,s]),a=U.useMemo(()=>xw(o),[o]),u=new Set(r.reviewed),c=v=>{if(v.kind==="chunk")return Vt(n.chunks[v.chunk].hunks,u);if(v.kind==="file"&&l)return Vt(l.hunks.filter(x=>x.file===v.file),u)},d=U.useRef(null),[f,y]=U.useState({x:0,y:0,k:1}),k=U.useRef();U.useEffect(()=>{const v=d.current;if(!v)return;const{width:x,height:D}=v.getBoundingClientRect(),M=Math.max(.8,Math.min(1.25,(x-40)/a.width,(D-40)/a.height));y({k:M,x:Math.max(20,(x-a.width*M)/2),y:Math.max(20,(D-a.height*M)/2)})},[a]),U.useEffect(()=>{const v=x=>{x.key==="Escape"&&l&&(location.hash="#/map")};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[l]);const _=v=>{const x=d.current.getBoundingClientRect(),D=v.clientX-x.left,M=v.clientY-x.top;y(ie=>{const Pe=Math.min(3,Math.max(.2,ie.k*Math.exp(-v.deltaY*.0015)));return{k:Pe,x:D-(D-ie.x)*Pe/ie.k,y:M-(M-ie.y)*Pe/ie.k}})},T=v=>{k.current={x:v.clientX,y:v.clientY,moved:!1}},m=v=>{var ie;const x=k.current;if(!x||v.buttons!==1)return;const D=v.clientX-x.x,M=v.clientY-x.y;!x.moved&&Math.hypot(D,M)<4||(x.moved||(ie=d.current)==null||ie.setPointerCapture(v.pointerId),x.moved=!0,x.x=v.clientX,x.y=v.clientY,y(Pe=>({...Pe,x:Pe.x+D,y:Pe.y+M})))},p=()=>{setTimeout(()=>k.current=void 0)},g=v=>{var x;(x=k.current)!=null&&x.moved||(v.kind==="file"?location.hash=`${Et({page:"review",chunk:v.chunk})}?file=${encodeURIComponent(v.file)}`:v.chunk!==void 0&&(location.hash=`#/map/${v.chunk+1}`))},[w,C]=U.useState();U.useEffect(()=>C(void 0),[o]);const j=v=>!w||v.from===w||v.to===w;return h.jsxs("main",{className:"map-page",children:[h.jsxs("nav",{className:"crumbs",children:[h.jsx("a",{href:"#/map",children:"Map"}),l&&h.jsxs(h.Fragment,{children:[" / ",h.jsxs("a",{href:Et({page:"review",chunk:l.index}),children:[l.index+1," ",l.chunk.title]})]})]}),h.jsx("div",{ref:d,className:"map-canvas",onWheel:_,onPointerDown:T,onPointerMove:m,onPointerUp:p,children:o.nodes.length===0?h.jsx("p",{className:"muted empty-map",children:"No links."}):h.jsxs("svg",{width:"100%",height:"100%",role:"img","aria-label":l?`Files in ${l.chunk.title}`:"Chunk map",children:[h.jsx("defs",{children:h.jsx("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:h.jsx("path",{d:"M0,0L10,5L0,10z",className:"arrowhead"})})}),h.jsxs("g",{className:"zoom-in",transform:`translate(${f.x},${f.y}) scale(${f.k})`,children:[a.edges.map(v=>h.jsxs("g",{className:`edge ${v.kind} ${j(v)?"":"faded"}`,children:[h.jsx("path",{d:Ew(v.points),strokeWidth:1.2+Math.min(3,Math.log2(v.weight+1)),markerEnd:"url(#arrow)",children:h.jsx("title",{children:v.label??(v.kind==="dep"?"builds on":`${v.weight} links`)})}),v.label&&v.lx!==void 0&&h.jsxs("g",{transform:`translate(${v.lx},${v.ly})`,className:"edge-label",children:[h.jsx("rect",{x:-(v.label.length*6.6+12)/2,y:-9,width:v.label.length*6.6+12,height:18,rx:9}),h.jsx("text",{textAnchor:"middle",dy:"4",children:v.label})]})]},`${v.from}>${v.to}`)),a.nodes.map(v=>{const x=c(v),D=v.kind==="chunk"?n.chunks[v.chunk]:void 0,M=D==null?void 0:D.chunk.risk;return h.jsxs("g",{className:`node ${v.kind}`,transform:`translate(${v.x-v.w/2},${v.y-v.h/2})`,onClick:()=>g(v),onMouseEnter:()=>C(v.id),onMouseLeave:()=>C(void 0),role:"button","aria-label":v.kind==="chunk"?`${v.chunk+1} ${v.label}`:v.label,children:[h.jsx("rect",{width:v.w,height:v.h,rx:8}),x&&h.jsx(Sw,{status:x,x:16,y:v.h/2}),v.kind==="chunk"?h.jsxs(h.Fragment,{children:[h.jsxs("text",{x:30,y:20,className:"title",children:[h.jsxs("tspan",{className:"n",children:[v.chunk+1," "]}),v.label]}),h.jsxs("text",{x:30,y:36,className:"meta",children:[v.size," lines"]}),M&&M!=="low"&&h.jsx("circle",{cx:v.w-12,cy:12,r:4,className:`risk-${M}`})]}):h.jsxs(h.Fragment,{children:[h.jsx("text",{x:x?30:12,y:20,className:"title",children:ph(v.label)}),h.jsx("text",{x:x?30:12,y:36,className:"meta",children:v.kind==="neighbour"?`${v.chunk!==void 0?`${v.chunk+1} · `:""}${xo(v.label)}`:xo(v.label)})]}),h.jsx("title",{children:v.kind==="file"?`${v.label} · ${v.size} lines`:v.label})]},v.id)})]},(l==null?void 0:l.index)??"top")]})})]})}function Nr({status:e}){const t={done:"Reviewed",partial:"Partly reviewed, or changed since review",todo:"Not reviewed"}[e];return h.jsx("span",{className:`status ${e}`,title:t,"aria-label":t,role:"img",children:h.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true",children:e==="done"?h.jsxs(h.Fragment,{children:[h.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"currentColor"}),h.jsx("path",{d:"M4.8 8.3l2.1 2.1 4.3-4.6",fill:"none",stroke:"var(--bg)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}):e==="partial"?h.jsxs(h.Fragment,{children:[h.jsx("circle",{cx:"8",cy:"8",r:"6.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),h.jsx("path",{d:"M8 1.8a6.2 6.2 0 0 1 0 12.4z",fill:"currentColor"})]}):h.jsx("circle",{cx:"8",cy:"8",r:"6.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})})})}function mh({risk:e}){if(e==="low")return null;const t=e==="med"?"Medium risk":"High risk";return h.jsx("span",{className:`risk risk-${e}`,title:t,"aria-label":t,role:"img"})}function vh({kind:e}){return e==="core"?null:h.jsx("span",{className:`badge kind-${e}`,children:e})}function gh({issues:e}){if(!e.length)return null;const t=e.filter(n=>n.level==="error");return h.jsxs("details",{className:`issues ${t.length?"has-errors":""}`,open:t.length>0,children:[h.jsxs("summary",{children:[_s(t.length,"error"),", ",_s(e.length-t.length,"warning")]}),h.jsx("ul",{children:e.map((n,r)=>h.jsxs("li",{className:n.level,children:[h.jsx("strong",{children:n.where}),": ",n.message]},r))})]})}const _s=(e,t)=>`${e} ${t}${e===1?"":"s"}`;function Eo({children:e}){return h.jsx(h.Fragment,{children:e.split(/(`[^`]+`)/).map((t,n)=>t.length>2&&t.startsWith("`")&&t.endsWith("`")?h.jsx("code",{children:t.slice(1,-1)},n):h.jsx(U.Fragment,{children:t},n))})}function Cw({data:e,plan:t,state:n,update:r}){const i=new Set(n.reviewed);return h.jsxs("main",{className:"page plan-page",children:[t.overview&&h.jsx("p",{className:"overview",children:h.jsx(Eo,{children:t.overview})}),h.jsx(gh,{issues:e.issues}),h.jsx("div",{className:"strategies",children:t.strategies.map(s=>{const l=Df(t,e.hunks,s.id),o=Math.max(0,...l.chunks.map(u=>u.size)),a=n.strategy===s.id;return h.jsxs("section",{className:`strategy ${a?"on":""}`,children:[h.jsx("h3",{children:$f(s)}),h.jsxs("p",{className:"stats",children:[_s(s.chunks.length,"chunk")," · max ",o," lines"]}),h.jsx("ol",{className:"chunk-list",children:l.chunks.map(u=>h.jsxs("li",{children:[h.jsx(Nr,{status:Vt(u.hunks,i)}),h.jsx("span",{className:"n",children:u.index+1}),h.jsx("span",{className:"title",children:u.chunk.title}),h.jsx(mh,{risk:u.chunk.risk}),h.jsx(vh,{kind:u.chunk.kind}),h.jsx("span",{className:"size",children:u.size})]},u.chunk.id))}),h.jsx("button",{className:a?"primary":"",onClick:()=>{r(u=>({...u,strategy:s.id})),location.hash=Et({page:"review",chunk:0})},children:a?"Continue":"Start"})]},s.id)})}),t.features.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:"Features"}),h.jsx("ul",{className:"features compact",children:t.features.map(s=>h.jsx("li",{title:s.description,children:s.title},s.title))})]})]})}const jw=(e,t)=>t.kind==="del"?{file:e,side:"old",line:t.oldNo}:t.newNo!==void 0?{file:e,side:"new",line:t.newNo}:void 0,lc=(e,t)=>e.file===t.file&&e.side===t.side&&e.line===t.line;function Tw({hunks:e,notes:t,onAdd:n,onEdit:r,onDelete:i,collapsed:s}){const[l,o]=U.useState(),a=[];for(const u of e){const c=a[a.length-1];(c==null?void 0:c.file)===u.file?c.hunks.push(u):a.push({file:u.file,hunks:[u]})}return h.jsx("div",{className:"diff",children:a.map(({file:u,hunks:c},d)=>{const f=c[0],y=c.reduce((_,T)=>_+T.added,0),k=c.reduce((_,T)=>_+T.removed,0);return h.jsxs("details",{id:`file-${u}`,className:"file",open:!s,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"path",children:u}),f.oldFile&&f.oldFile!==u&&h.jsxs("span",{className:"muted",children:[" ← ",f.oldFile]}),h.jsx("span",{className:`badge st-${f.status}`,children:f.status}),f.flags.filter(_=>_!=="test"&&_!=="docs").map(_=>h.jsx("span",{className:"badge flag",children:_},_)),h.jsxs("span",{className:"counts",children:[h.jsxs("span",{className:"add",children:["+",y]})," ",h.jsxs("span",{className:"del",children:["−",k]})]})]}),h.jsxs("table",{children:[h.jsxs("colgroup",{children:[h.jsx("col",{className:"no-col"}),h.jsx("col",{className:"no-col"}),h.jsx("col",{})]}),h.jsx("tbody",{children:c.map(_=>h.jsxs(U.Fragment,{children:[h.jsx("tr",{className:"hunk-header",children:h.jsxs("td",{colSpan:3,children:[h.jsx("span",{className:"hid",children:_.id})," ",_.header]})}),_.lines.length===0&&h.jsx("tr",{className:"placeholder",children:h.jsx("td",{colSpan:3,children:"No text diff."})}),ug(_).map((T,m)=>{const p=jw(u,T),g=p?t.filter(C=>lc(p,C)):[],w=p&&l&&lc(p,l);return h.jsxs(U.Fragment,{children:[h.jsxs("tr",{className:`line ${T.kind}`,children:[h.jsx("td",{className:"no",onClick:()=>p&&o(p),title:p?"Add note":void 0,children:T.oldNo??""}),h.jsx("td",{className:"no",onClick:()=>p&&o(p),children:T.newNo??""}),h.jsxs("td",{className:"code",children:[h.jsx("span",{className:"sign",children:T.kind==="add"?"+":T.kind==="del"?"-":" "}),T.text]})]}),g.map(C=>h.jsx("tr",{className:"note-row",children:h.jsx("td",{colSpan:3,children:h.jsx(oc,{initial:C.text,onSave:j=>r(C.id,j),onDelete:()=>i(C.id)})})},C.id)),w&&h.jsx("tr",{className:"note-row",children:h.jsx("td",{colSpan:3,children:h.jsx(oc,{initial:"",autoFocus:!0,onSave:C=>{C.trim()&&n({...p,text:C}),o(void 0)},onDelete:()=>o(void 0)})})})]},m)})]},_.id))})]})]},`${u}-${d}`)})})}function oc(e){const[t,n]=U.useState(e.initial),[r,i]=U.useState(!e.initial);if(!r)return h.jsxs("div",{className:"line-note",children:[h.jsx("div",{className:"text",onClick:()=>i(!0),children:e.initial}),h.jsxs("div",{className:"actions",children:[h.jsx("button",{onClick:()=>i(!0),children:"Edit"}),h.jsx("button",{onClick:e.onDelete,children:"Delete"})]})]});const s=()=>{e.onSave(t),e.initial&&i(!1)};return h.jsxs("div",{className:"line-note editing",children:[h.jsx("textarea",{autoFocus:e.autoFocus,value:t,placeholder:"Line note… (⌘↵ save, Esc cancel)",onChange:l=>n(l.target.value),onKeyDown:l=>{l.key==="Enter"&&(l.metaKey||l.ctrlKey)&&s(),l.key==="Escape"&&(e.initial?(n(e.initial),i(!1)):e.onDelete())}}),h.jsxs("div",{className:"actions",children:[h.jsx("button",{className:"primary",onClick:s,children:"Save"}),h.jsx("button",{onClick:()=>e.initial?(n(e.initial),i(!1)):e.onDelete(),children:"Cancel"})]})]})}const Oi=e=>{location.hash=Et({page:"review",chunk:e}),window.scrollTo(0,0)};function Ow({plan:e,view:t,state:n,update:r,at:i,file:s}){U.useEffect(()=>{var v;s&&((v=document.getElementById(`file-${s}`))==null||v.scrollIntoView({block:"start"}))},[s,i]);const l=new Set(n.reviewed),o=t.chunks.length,a=t.skim.length>0,u=i==="skim"?a?"skim":Math.max(0,o-1):Math.min(i,Math.max(0,o-1)),c=u==="skim"?void 0:t.chunks[u],d=u==="skim"?t.skim:(c==null?void 0:c.hunks)??[],f=Vt(d,l),y=c?zf(t.strategy.id,c.chunk.id):`${t.strategy.id}/skim`,k=u==="skim"?o-1:u>0?u-1:void 0,_=u==="skim"?void 0:u<o-1?u+1:a?"skim":void 0,T=()=>r(v=>Du(v,d,f!=="done")),m=()=>{r(v=>Du(v,d,!0)),_!==void 0?Oi(_):location.hash="#/summary"};U.useEffect(()=>{const v=x=>{if(!(x.target.closest("textarea, input, select")||x.metaKey||x.ctrlKey||x.altKey)){if((x.key==="j"||x.key==="ArrowRight")&&_!==void 0)Oi(_);else if((x.key==="k"||x.key==="ArrowLeft")&&k!==void 0&&k>=0)Oi(k);else if(x.key==="x")T();else return;x.preventDefault()}};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)});const p=Ff(d,n.lineNotes),g=v=>r(x=>({...x,lineNotes:[...x.lineNotes,{...v,id:crypto.randomUUID(),at:new Date().toISOString()}]})),w=(v,x)=>r(D=>({...D,lineNotes:x.trim()?D.lineNotes.map(M=>M.id===v?{...M,text:x}:M):D.lineNotes.filter(M=>M.id!==v)})),C=v=>r(x=>({...x,lineNotes:x.lineNotes.filter(D=>D.id!==v)})),j=new Set(d.map(v=>v.file)).size;return h.jsxs("div",{className:"review",children:[h.jsxs("aside",{className:"sidebar",children:[h.jsx("div",{className:"muted small",children:$f(t.strategy)}),h.jsxs("ol",{children:[t.chunks.map((v,x)=>h.jsx("li",{className:x===u?"on":"",children:h.jsxs("a",{href:Et({page:"review",chunk:x}),children:[h.jsx(Nr,{status:Vt(v.hunks,l)}),h.jsx("span",{className:"n",children:x+1}),h.jsx("span",{className:"title",children:v.chunk.title}),h.jsx("span",{className:"size",children:v.size})]})},v.chunk.id)),a&&h.jsx("li",{className:u==="skim"?"on skim":"skim",children:h.jsxs("a",{href:Et({page:"review",chunk:"skim"}),children:[h.jsx(Nr,{status:Vt(t.skim,l)}),h.jsx("span",{className:"n",children:"~"}),h.jsx("span",{className:"title",children:"Skim"}),h.jsx("span",{className:"size",children:t.skim.length})]})})]}),h.jsxs("p",{className:"keys muted small",children:[h.jsx("kbd",{children:"j"}),"/",h.jsx("kbd",{children:"k"})," move · ",h.jsx("kbd",{children:"x"})," done · click line # to note"]})]}),h.jsxs("main",{className:"page chunk",children:[h.jsxs("header",{className:"chunk-head",children:[h.jsxs("h1",{children:[h.jsx(Nr,{status:f})," ",c?c.chunk.title:"Skim",c&&h.jsx(mh,{risk:c.chunk.risk}),c&&h.jsx(vh,{kind:c.chunk.kind})]}),h.jsxs("div",{className:"muted small",children:[c?`${u==="skim"?"":u+1}/${o} · ${c.size} lines · `:"",_s(j,"file"),f==="partial"&&h.jsx("span",{className:"warn",children:" · changed since review"})]}),c&&h.jsx("p",{className:"intent",children:h.jsx(Eo,{children:c.chunk.intent})}),c&&c.chunk.reviewFocus.length>0&&h.jsx("ul",{className:"focus",children:c.chunk.reviewFocus.map(v=>h.jsx("li",{children:h.jsx(Eo,{children:v})},v))})]}),h.jsx(Tw,{hunks:d,notes:p,onAdd:g,onEdit:w,onDelete:C,collapsed:u==="skim"},`${t.strategy.id}-${u}`),h.jsxs("footer",{className:"chunk-foot",children:[h.jsx("textarea",{id:"chunk-note","aria-label":"Chunk note",rows:1,value:n.chunkNotes[y]??"",placeholder:"Note…",onChange:v=>{const x=v.target.value;r(D=>({...D,chunkNotes:{...D.chunkNotes,[y]:x}}))}}),h.jsx("button",{"aria-label":"Previous",disabled:k===void 0||k<0,onClick:()=>k!==void 0&&Oi(k),children:"←"}),h.jsx("button",{onClick:T,"aria-pressed":f==="done",children:f==="done"?"Undo":"Done"}),h.jsx("button",{className:"primary",onClick:m,children:_===void 0?"Done ✓":"Done →"})]})]})]})}function Lw({data:e,plan:t,view:n,state:r,flush:i}){const s=new Set(r.reviewed),l=Af(n,s),[o,a]=U.useState(),[u,c]=U.useState(),[d,f]=U.useState(!1),y=n.chunks.map(T=>{var m;return{c:T,note:(m=r.chunkNotes[zf(n.strategy.id,T.chunk.id)])==null?void 0:m.trim(),lines:Ff(T.hunks,r.lineNotes)}}).filter(T=>T.note||T.lines.length),k=y.reduce((T,m)=>T+(m.note?1:0)+m.lines.length,0),_=l.linesTotal?Math.round(100*l.linesDone/l.linesTotal):100;return h.jsxs("main",{className:"page summary-page",children:[h.jsxs("p",{className:"totals",children:[h.jsxs("strong",{children:[l.done,"/",l.total]})," ","chunks · ",h.jsxs("strong",{children:[_,"%"]})," lines · ",h.jsx("strong",{children:k})," ",k===1?"note":"notes"]}),t.features.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:"Features"}),h.jsx("ul",{className:"features",children:t.features.map(T=>h.jsxs("li",{title:T.description,children:[h.jsx(Nr,{status:Vt(ag(T,e.hunks),s)})," ",T.title,h.jsx("span",{className:"chunk-refs",children:og(T,n).map(m=>h.jsx("a",{href:Et({page:"review",chunk:m.index}),title:m.chunk.title,children:m.index+1},m.chunk.id))})]},T.title))})]}),y.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:"Notes"}),y.map(({c:T,note:m,lines:p})=>h.jsxs("section",{className:"note-group",children:[h.jsxs("a",{href:Et({page:"review",chunk:T.index}),children:[T.index+1,". ",T.chunk.title]}),m&&h.jsx("p",{className:"pre",children:m}),h.jsx("ul",{children:p.map(g=>h.jsxs("li",{children:[h.jsxs("code",{children:[g.file,":",g.line]})," ",g.text]},g.id))})]},T.chunk.id))]}),h.jsxs("p",{children:[h.jsx("button",{className:"primary",onClick:async()=>{try{await i(),a(await fg()),c(void 0)}catch(T){c(T.message)}},children:"Export review.md"})," ",o&&h.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(o.markdown),f(!0)},children:d?"Copied":"Copy"})]}),u&&h.jsx("p",{className:"warn",children:u}),o&&h.jsxs("div",{className:"export",children:[h.jsx("p",{className:"small muted",children:o.path}),h.jsx("textarea",{readOnly:!0,value:o.markdown})]})]})}const ac=e=>Math.max(0,Number(e??1)-1)||0;function uc(e){const[t="",n=""]=e.replace(/^#\/?/,"").split("?"),[r,i]=t.split("/");if(r==="plan")return{page:"plan"};if(r==="summary")return{page:"summary"};if(r==="map")return{page:"map",chunk:i?ac(i):void 0};if(r==="review")return{page:"review",chunk:i==="skim"?"skim":ac(i),file:new URLSearchParams(n).get("file")??void 0}}const Et=e=>e.page==="review"?`#/review/${e.chunk==="skim"?"skim":e.chunk+1}`:`#/${e.page}`;function Pw(){var C;const[e,t]=U.useState(),[n,r]=U.useState(),[i,s]=U.useState(),[l,o]=U.useState("idle"),[a,u]=U.useState(()=>uc(location.hash)),c=U.useRef(),d=U.useRef(),f=U.useRef(Promise.resolve()),y=U.useCallback(async()=>{try{await f.current;const j=await cg();t(j),s(v=>d.current?v:j.state),r(void 0)}catch(j){r(j.message)}},[]);U.useEffect(()=>{y();const j=()=>void y();window.addEventListener("focus",j);const v=()=>u(uc(location.hash));return window.addEventListener("hashchange",v),()=>{window.removeEventListener("focus",j),window.removeEventListener("hashchange",v)}},[y]);const k=U.useCallback(async()=>{window.clearTimeout(c.current);const j=d.current;if(!j)return f.current;d.current=void 0,o("saving");const v=f.current.then(()=>dg(j));f.current=v.catch(()=>{});try{await v,o(d.current?"saving":"saved")}catch{o("error")}},[]),_=U.useCallback(j=>{s(v=>{if(!v)return v;const x=j(v);return d.current=x,window.clearTimeout(c.current),c.current=window.setTimeout(()=>void k(),300),x})},[k]);U.useEffect(()=>{const j=()=>void k();return window.addEventListener("beforeunload",j),()=>window.removeEventListener("beforeunload",j)},[k]);const T=U.useMemo(()=>e!=null&&e.plan&&i?Df(e.plan,e.hunks,i.strategy):void 0,[e,i]);if(n&&!e)return h.jsxs("div",{className:"empty",children:["Can't load run: ",n]});if(!e||!i)return h.jsx("div",{className:"empty",children:"Loading…"});const{meta:m}=e,p=new Set(i.reviewed),g=T?Af(T,p):void 0,w=a??(i.strategy?{page:"review",chunk:0}:{page:"plan"});return h.jsxs("div",{className:"app",children:[h.jsxs("header",{className:"topbar",children:[h.jsxs("div",{className:"brand",children:[h.jsx("span",{className:"spark",children:"✦"})," spark-joy"]}),h.jsx("div",{className:"run",title:`${m.base} → ${m.working?"working tree":m.headSha.slice(0,8)} · +${m.stats.added} −${m.stats.removed} · ${m.stats.files} files`,children:((C=e.plan)==null?void 0:C.title)??m.branch}),h.jsxs("nav",{className:"tabs",children:[h.jsx("a",{className:w.page==="plan"?"on":"",href:"#/plan",children:"Plan"}),h.jsx("a",{className:w.page==="map"?"on":"",href:"#/map",children:"Map"}),h.jsx("a",{className:w.page==="review"?"on":"",href:Et({page:"review",chunk:0}),children:"Review"}),h.jsx("a",{className:w.page==="summary"?"on":"",href:"#/summary",children:"Summary"})]}),g&&h.jsxs("div",{className:"progress",title:`${g.linesDone}/${g.linesTotal} changed lines reviewed`,children:[h.jsx("div",{className:"bar",children:h.jsx("div",{style:{width:`${g.total?100*g.done/g.total:0}%`}})}),h.jsxs("span",{children:[g.done,"/",g.total]})]}),h.jsx("span",{className:`saving ${l}`,children:l==="saving"?"Saving…":l==="saved"?"Saved":l==="error"?"Save failed":""})]}),e.hasPlan?!e.plan||!T?h.jsx("div",{className:"empty",children:h.jsx(gh,{issues:e.issues})}):w.page==="plan"?h.jsx(Cw,{data:e,plan:e.plan,state:i,update:_}):w.page==="map"?h.jsx(Nw,{data:e,plan:e.plan,view:T,state:i,at:w.chunk}):w.page==="summary"?h.jsx(Lw,{data:e,plan:e.plan,view:T,state:i,flush:k}):h.jsx(Ow,{data:e,plan:e.plan,view:T,state:i,update:_,at:w.chunk,file:w.file}):h.jsxs("div",{className:"empty",children:["No plan yet. Run ",h.jsx("code",{children:"/spark-joy"})," in Claude Code."]})]})}Ef(document.getElementById("root")).render(h.jsx(Pw,{}));