Files
nfc-pn532-warlord/firmware/data/assets/index-9oJp152C.js
drjones 3be2d3f936 Fix PN532 transport and NFC tag handling.
Tighten PN532 framing and NFC access locking so scan, read, write, and raw operations behave reliably on hardware, and correct Classic versus Type 2 tag classification so common cards hit the right code paths. Refresh the embedded web assets and launcher files to match the corrected firmware behavior.

Made-with: Cursor
2026-04-02 18:32:06 -07:00

81 lines
335 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function Bg(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Ug(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Df={exports:{}},Ii={},Ff={exports:{}},M={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var as=Symbol.for("react.element"),zg=Symbol.for("react.portal"),$g=Symbol.for("react.fragment"),Wg=Symbol.for("react.strict_mode"),Kg=Symbol.for("react.profiler"),Hg=Symbol.for("react.provider"),Gg=Symbol.for("react.context"),Xg=Symbol.for("react.forward_ref"),Qg=Symbol.for("react.suspense"),Yg=Symbol.for("react.memo"),Zg=Symbol.for("react.lazy"),Gu=Symbol.iterator;function Jg(e){return e===null||typeof e!="object"?null:(e=Gu&&e[Gu]||e["@@iterator"],typeof e=="function"?e:null)}var Mf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_f=Object.assign,Vf={};function tr(e,t,n){this.props=e,this.context=t,this.refs=Vf,this.updater=n||Mf}tr.prototype.isReactComponent={};tr.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")};tr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Of(){}Of.prototype=tr.prototype;function ml(e,t,n){this.props=e,this.context=t,this.refs=Vf,this.updater=n||Mf}var gl=ml.prototype=new Of;gl.constructor=ml;_f(gl,tr.prototype);gl.isPureReactComponent=!0;var Xu=Array.isArray,If=Object.prototype.hasOwnProperty,yl={current:null},Bf={key:!0,ref:!0,__self:!0,__source:!0};function Uf(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)If.call(t,r)&&!Bf.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:as,type:e,key:i,ref:o,props:s,_owner:yl.current}}function qg(e,t){return{$$typeof:as,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function vl(e){return typeof e=="object"&&e!==null&&e.$$typeof===as}function e0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Qu=/\/+/g;function po(e,t){return typeof e=="object"&&e!==null&&e.key!=null?e0(""+e.key):t.toString(36)}function Ks(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case as:case zg:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+po(o,0):r,Xu(s)?(n="",e!=null&&(n=e.replace(Qu,"$&/")+"/"),Ks(s,t,n,"",function(u){return u})):s!=null&&(vl(s)&&(s=qg(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Qu,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Xu(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+po(i,a);o+=Ks(i,t,n,l,s)}else if(l=Jg(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+po(i,a++),o+=Ks(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Cs(e,t,n){if(e==null)return e;var r=[],s=0;return Ks(e,r,"","",function(i){return t.call(n,i,s++)}),r}function t0(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 we={current:null},Hs={transition:null},n0={ReactCurrentDispatcher:we,ReactCurrentBatchConfig:Hs,ReactCurrentOwner:yl};function zf(){throw Error("act(...) is not supported in production builds of React.")}M.Children={map:Cs,forEach:function(e,t,n){Cs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Cs(e,function(){t++}),t},toArray:function(e){return Cs(e,function(t){return t})||[]},only:function(e){if(!vl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};M.Component=tr;M.Fragment=$g;M.Profiler=Kg;M.PureComponent=ml;M.StrictMode=Wg;M.Suspense=Qg;M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=n0;M.act=zf;M.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=_f({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=yl.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)If.call(t,l)&&!Bf.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:as,type:e.type,key:s,ref:i,props:r,_owner:o}};M.createContext=function(e){return e={$$typeof:Gg,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Hg,_context:e},e.Consumer=e};M.createElement=Uf;M.createFactory=function(e){var t=Uf.bind(null,e);return t.type=e,t};M.createRef=function(){return{current:null}};M.forwardRef=function(e){return{$$typeof:Xg,render:e}};M.isValidElement=vl;M.lazy=function(e){return{$$typeof:Zg,_payload:{_status:-1,_result:e},_init:t0}};M.memo=function(e,t){return{$$typeof:Yg,type:e,compare:t===void 0?null:t}};M.startTransition=function(e){var t=Hs.transition;Hs.transition={};try{e()}finally{Hs.transition=t}};M.unstable_act=zf;M.useCallback=function(e,t){return we.current.useCallback(e,t)};M.useContext=function(e){return we.current.useContext(e)};M.useDebugValue=function(){};M.useDeferredValue=function(e){return we.current.useDeferredValue(e)};M.useEffect=function(e,t){return we.current.useEffect(e,t)};M.useId=function(){return we.current.useId()};M.useImperativeHandle=function(e,t,n){return we.current.useImperativeHandle(e,t,n)};M.useInsertionEffect=function(e,t){return we.current.useInsertionEffect(e,t)};M.useLayoutEffect=function(e,t){return we.current.useLayoutEffect(e,t)};M.useMemo=function(e,t){return we.current.useMemo(e,t)};M.useReducer=function(e,t,n){return we.current.useReducer(e,t,n)};M.useRef=function(e){return we.current.useRef(e)};M.useState=function(e){return we.current.useState(e)};M.useSyncExternalStore=function(e,t,n){return we.current.useSyncExternalStore(e,t,n)};M.useTransition=function(){return we.current.useTransition()};M.version="18.3.1";Ff.exports=M;var x=Ff.exports;const $f=Ug(x),r0=Bg({__proto__:null,default:$f},[x]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var s0=x,i0=Symbol.for("react.element"),o0=Symbol.for("react.fragment"),a0=Object.prototype.hasOwnProperty,l0=s0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u0={key:!0,ref:!0,__self:!0,__source:!0};function Wf(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)a0.call(t,r)&&!u0.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:i0,type:e,key:i,ref:o,props:s,_owner:l0.current}}Ii.Fragment=o0;Ii.jsx=Wf;Ii.jsxs=Wf;Df.exports=Ii;var d=Df.exports,ta={},Kf={exports:{}},De={},Hf={exports:{}},Gf={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(j,L){var D=j.length;j.push(L);e:for(;0<D;){var Z=D-1>>>1,ie=j[Z];if(0<s(ie,L))j[Z]=L,j[D]=ie,D=Z;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var L=j[0],D=j.pop();if(D!==L){j[0]=D;e:for(var Z=0,ie=j.length,bs=ie>>>1;Z<bs;){var Qt=2*(Z+1)-1,ho=j[Qt],Yt=Qt+1,ks=j[Yt];if(0>s(ho,D))Yt<ie&&0>s(ks,ho)?(j[Z]=ks,j[Yt]=D,Z=Yt):(j[Z]=ho,j[Qt]=D,Z=Qt);else if(Yt<ie&&0>s(ks,D))j[Z]=ks,j[Yt]=D,Z=Yt;else break e}}return L}function s(j,L){var D=j.sortIndex-L.sortIndex;return D!==0?D:j.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,h=3,g=!1,v=!1,w=!1,S=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 y(j){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=j)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function b(j){if(w=!1,y(j),!v)if(n(l)!==null)v=!0,Ss(k);else{var L=n(u);L!==null&&ne(b,L.startTime-j)}}function k(j,L){v=!1,w&&(w=!1,m(P),P=-1),g=!0;var D=h;try{for(y(L),f=n(l);f!==null&&(!(f.expirationTime>L)||j&&!ee());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,h=f.priorityLevel;var ie=Z(f.expirationTime<=L);L=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(l)&&r(l),y(L)}else r(l);f=n(l)}if(f!==null)var bs=!0;else{var Qt=n(u);Qt!==null&&ne(b,Qt.startTime-L),bs=!1}return bs}finally{f=null,h=D,g=!1}}var C=!1,E=null,P=-1,F=5,A=-1;function ee(){return!(e.unstable_now()-A<F)}function wt(){if(E!==null){var j=e.unstable_now();A=j;var L=!0;try{L=E(!0,j)}finally{L?Xt():(C=!1,E=null)}}else C=!1}var Xt;if(typeof p=="function")Xt=function(){p(wt)};else if(typeof MessageChannel<"u"){var or=new MessageChannel,Hu=or.port2;or.port1.onmessage=wt,Xt=function(){Hu.postMessage(null)}}else Xt=function(){S(wt,0)};function Ss(j){E=j,C||(C=!0,Xt())}function ne(j,L){P=S(function(){j(e.unstable_now())},L)}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(j){j.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,Ss(k))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(j){switch(h){case 1:case 2:case 3:var L=3;break;default:L=h}var D=h;h=L;try{return j()}finally{h=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,L){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var D=h;h=j;try{return L()}finally{h=D}},e.unstable_scheduleCallback=function(j,L,D){var Z=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?Z+D:Z):D=Z,j){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=D+ie,j={id:c++,callback:L,priorityLevel:j,startTime:D,expirationTime:ie,sortIndex:-1},D>Z?(j.sortIndex=D,t(u,j),n(l)===null&&j===n(u)&&(w?(m(P),P=-1):w=!0,ne(b,D-Z))):(j.sortIndex=ie,t(l,j),v||g||(v=!0,Ss(k))),j},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(j){var L=h;return function(){var D=h;h=L;try{return j.apply(this,arguments)}finally{h=D}}}})(Gf);Hf.exports=Gf;var c0=Hf.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var d0=x,Re=c0;function T(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 Xf=new Set,Vr={};function mn(e,t){Wn(e,t),Wn(e+"Capture",t)}function Wn(e,t){for(Vr[e]=t,e=0;e<t.length;e++)Xf.add(t[e])}var ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),na=Object.prototype.hasOwnProperty,f0=/^[: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]*$/,Yu={},Zu={};function h0(e){return na.call(Zu,e)?!0:na.call(Yu,e)?!1:f0.test(e)?Zu[e]=!0:(Yu[e]=!0,!1)}function p0(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 m0(e,t,n,r){if(t===null||typeof t>"u"||p0(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 Se(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new Se(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new Se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new Se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new Se(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){de[e]=new Se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new Se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new Se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new Se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new Se(e,5,!1,e.toLowerCase(),null,!1,!1)});var xl=/[\-:]([a-z])/g;function wl(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(xl,wl);de[t]=new Se(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(xl,wl);de[t]=new Se(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(xl,wl);de[t]=new Se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new Se(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new Se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new Se(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sl(e,t,n,r){var s=de.hasOwnProperty(t)?de[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(m0(t,n,s,r)&&(n=null),r||s===null?h0(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var xt=d0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ps=Symbol.for("react.element"),Sn=Symbol.for("react.portal"),bn=Symbol.for("react.fragment"),bl=Symbol.for("react.strict_mode"),ra=Symbol.for("react.profiler"),Qf=Symbol.for("react.provider"),Yf=Symbol.for("react.context"),kl=Symbol.for("react.forward_ref"),sa=Symbol.for("react.suspense"),ia=Symbol.for("react.suspense_list"),Cl=Symbol.for("react.memo"),kt=Symbol.for("react.lazy"),Zf=Symbol.for("react.offscreen"),Ju=Symbol.iterator;function ar(e){return e===null||typeof e!="object"?null:(e=Ju&&e[Ju]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,mo;function gr(e){if(mo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);mo=t&&t[1]||""}return`
`+mo+e}var go=!1;function yo(e,t){if(!e||go)return"";go=!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 s=u.stack.split(`
`),i=r.stack.split(`
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{go=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gr(e):""}function g0(e){switch(e.tag){case 5:return gr(e.type);case 16:return gr("Lazy");case 13:return gr("Suspense");case 19:return gr("SuspenseList");case 0:case 2:case 15:return e=yo(e.type,!1),e;case 11:return e=yo(e.type.render,!1),e;case 1:return e=yo(e.type,!0),e;default:return""}}function oa(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 bn:return"Fragment";case Sn:return"Portal";case ra:return"Profiler";case bl:return"StrictMode";case sa:return"Suspense";case ia:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yf:return(e.displayName||"Context")+".Consumer";case Qf:return(e._context.displayName||"Context")+".Provider";case kl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Cl:return t=e.displayName||null,t!==null?t:oa(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return oa(e(t))}catch{}}return null}function y0(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 oa(t);case 8:return t===bl?"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 It(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function v0(e){var t=Jf(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 s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ts(e){e._valueTracker||(e._valueTracker=v0(e))}function qf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function oi(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 aa(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=It(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 eh(e,t){t=t.checked,t!=null&&Sl(e,"checked",t,!1)}function la(e,t){eh(e,t);var n=It(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")?ua(e,t.type,n):t.hasOwnProperty("defaultValue")&&ua(e,t.type,It(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ec(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 ua(e,t,n){(t!=="number"||oi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var yr=Array.isArray;function On(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+It(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ca(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(yr(n)){if(1<n.length)throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:It(n)}}function th(e,t){var n=It(t.value),r=It(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 nc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function nh(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 da(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?nh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Es,rh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Es=Es||document.createElement("div"),Es.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Es.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Or(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cr={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},x0=["Webkit","ms","Moz","O"];Object.keys(Cr).forEach(function(e){x0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cr[t]=Cr[e]})});function sh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cr.hasOwnProperty(e)&&Cr[e]?(""+t).trim():t+"px"}function ih(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=sh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var w0=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fa(e,t){if(t){if(w0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function ha(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 pa=null;function Pl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ma=null,In=null,Bn=null;function rc(e){if(e=cs(e)){if(typeof ma!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Wi(t),ma(e.stateNode,e.type,t))}}function oh(e){In?Bn?Bn.push(e):Bn=[e]:In=e}function ah(){if(In){var e=In,t=Bn;if(Bn=In=null,rc(e),t)for(e=0;e<t.length;e++)rc(t[e])}}function lh(e,t){return e(t)}function uh(){}var vo=!1;function ch(e,t,n){if(vo)return e(t,n);vo=!0;try{return lh(e,t,n)}finally{vo=!1,(In!==null||Bn!==null)&&(uh(),ah())}}function Ir(e,t){var n=e.stateNode;if(n===null)return null;var r=Wi(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(T(231,t,typeof n));return n}var ga=!1;if(ht)try{var lr={};Object.defineProperty(lr,"passive",{get:function(){ga=!0}}),window.addEventListener("test",lr,lr),window.removeEventListener("test",lr,lr)}catch{ga=!1}function S0(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Pr=!1,ai=null,li=!1,ya=null,b0={onError:function(e){Pr=!0,ai=e}};function k0(e,t,n,r,s,i,o,a,l){Pr=!1,ai=null,S0.apply(b0,arguments)}function C0(e,t,n,r,s,i,o,a,l){if(k0.apply(this,arguments),Pr){if(Pr){var u=ai;Pr=!1,ai=null}else throw Error(T(198));li||(li=!0,ya=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 dh(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 sc(e){if(gn(e)!==e)throw Error(T(188))}function P0(e){var t=e.alternate;if(!t){if(t=gn(e),t===null)throw Error(T(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return sc(s),e;if(i===r)return sc(s),t;i=i.sibling}throw Error(T(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function fh(e){return e=P0(e),e!==null?hh(e):null}function hh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=hh(e);if(t!==null)return t;e=e.sibling}return null}var ph=Re.unstable_scheduleCallback,ic=Re.unstable_cancelCallback,T0=Re.unstable_shouldYield,E0=Re.unstable_requestPaint,q=Re.unstable_now,j0=Re.unstable_getCurrentPriorityLevel,Tl=Re.unstable_ImmediatePriority,mh=Re.unstable_UserBlockingPriority,ui=Re.unstable_NormalPriority,N0=Re.unstable_LowPriority,gh=Re.unstable_IdlePriority,Bi=null,nt=null;function A0(e){if(nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Bi,e,void 0,(e.current.flags&128)===128)}catch{}}var Qe=Math.clz32?Math.clz32:D0,R0=Math.log,L0=Math.LN2;function D0(e){return e>>>=0,e===0?32:31-(R0(e)/L0|0)|0}var js=64,Ns=4194304;function vr(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 ci(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=vr(a):(i&=o,i!==0&&(r=vr(i)))}else o=n&~s,o!==0?r=vr(o):i!==0&&(r=vr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Qe(t),s=1<<n,r|=e[n],t&=~s;return r}function F0(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 M0(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Qe(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=F0(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function va(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yh(){var e=js;return js<<=1,!(js&4194240)&&(js=64),e}function xo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ls(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qe(t),e[t]=n}function _0(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 s=31-Qe(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function El(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qe(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var V=0;function vh(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var xh,jl,wh,Sh,bh,xa=!1,As=[],At=null,Rt=null,Lt=null,Br=new Map,Ur=new Map,Pt=[],V0="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 oc(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":Lt=null;break;case"pointerover":case"pointerout":Br.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ur.delete(t.pointerId)}}function ur(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=cs(t),t!==null&&jl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function O0(e,t,n,r,s){switch(t){case"focusin":return At=ur(At,e,t,n,r,s),!0;case"dragenter":return Rt=ur(Rt,e,t,n,r,s),!0;case"mouseover":return Lt=ur(Lt,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Br.set(i,ur(Br.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Ur.set(i,ur(Ur.get(i)||null,e,t,n,r,s)),!0}return!1}function kh(e){var t=nn(e.target);if(t!==null){var n=gn(t);if(n!==null){if(t=n.tag,t===13){if(t=dh(n),t!==null){e.blockedOn=t,bh(e.priority,function(){wh(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 Gs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pa=r,n.target.dispatchEvent(r),pa=null}else return t=cs(n),t!==null&&jl(t),e.blockedOn=n,!1;t.shift()}return!0}function ac(e,t,n){Gs(e)&&n.delete(t)}function I0(){xa=!1,At!==null&&Gs(At)&&(At=null),Rt!==null&&Gs(Rt)&&(Rt=null),Lt!==null&&Gs(Lt)&&(Lt=null),Br.forEach(ac),Ur.forEach(ac)}function cr(e,t){e.blockedOn===t&&(e.blockedOn=null,xa||(xa=!0,Re.unstable_scheduleCallback(Re.unstable_NormalPriority,I0)))}function zr(e){function t(s){return cr(s,e)}if(0<As.length){cr(As[0],e);for(var n=1;n<As.length;n++){var r=As[n];r.blockedOn===e&&(r.blockedOn=null)}}for(At!==null&&cr(At,e),Rt!==null&&cr(Rt,e),Lt!==null&&cr(Lt,e),Br.forEach(t),Ur.forEach(t),n=0;n<Pt.length;n++)r=Pt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&(n=Pt[0],n.blockedOn===null);)kh(n),n.blockedOn===null&&Pt.shift()}var Un=xt.ReactCurrentBatchConfig,di=!0;function B0(e,t,n,r){var s=V,i=Un.transition;Un.transition=null;try{V=1,Nl(e,t,n,r)}finally{V=s,Un.transition=i}}function U0(e,t,n,r){var s=V,i=Un.transition;Un.transition=null;try{V=4,Nl(e,t,n,r)}finally{V=s,Un.transition=i}}function Nl(e,t,n,r){if(di){var s=wa(e,t,n,r);if(s===null)No(e,t,r,fi,n),oc(e,r);else if(O0(s,e,t,n,r))r.stopPropagation();else if(oc(e,r),t&4&&-1<V0.indexOf(e)){for(;s!==null;){var i=cs(s);if(i!==null&&xh(i),i=wa(e,t,n,r),i===null&&No(e,t,r,fi,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else No(e,t,r,null,n)}}var fi=null;function wa(e,t,n,r){if(fi=null,e=Pl(r),e=nn(e),e!==null)if(t=gn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=dh(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 fi=e,null}function Ch(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(j0()){case Tl:return 1;case mh:return 4;case ui:case N0:return 16;case gh:return 536870912;default:return 16}default:return 16}}var Et=null,Al=null,Xs=null;function Ph(){if(Xs)return Xs;var e,t=Al,n=t.length,r,s="value"in Et?Et.value:Et.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Xs=s.slice(e,1<r?1-r:void 0)}function Qs(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 Rs(){return!0}function lc(){return!1}function Fe(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Rs:lc,this.isPropagationStopped=lc,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Rs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Rs)},persist:function(){},isPersistent:Rs}),t}var nr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rl=Fe(nr),us=G({},nr,{view:0,detail:0}),z0=Fe(us),wo,So,dr,Ui=G({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ll,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!==dr&&(dr&&e.type==="mousemove"?(wo=e.screenX-dr.screenX,So=e.screenY-dr.screenY):So=wo=0,dr=e),wo)},movementY:function(e){return"movementY"in e?e.movementY:So}}),uc=Fe(Ui),$0=G({},Ui,{dataTransfer:0}),W0=Fe($0),K0=G({},us,{relatedTarget:0}),bo=Fe(K0),H0=G({},nr,{animationName:0,elapsedTime:0,pseudoElement:0}),G0=Fe(H0),X0=G({},nr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Q0=Fe(X0),Y0=G({},nr,{data:0}),cc=Fe(Y0),Z0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J0={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"},q0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ey(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=q0[e])?!!t[e]:!1}function Ll(){return ey}var ty=G({},us,{key:function(e){if(e.key){var t=Z0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?J0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ll,charCode:function(e){return e.type==="keypress"?Qs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ny=Fe(ty),ry=G({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dc=Fe(ry),sy=G({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ll}),iy=Fe(sy),oy=G({},nr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ay=Fe(oy),ly=G({},Ui,{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}),uy=Fe(ly),cy=[9,13,27,32],Dl=ht&&"CompositionEvent"in window,Tr=null;ht&&"documentMode"in document&&(Tr=document.documentMode);var dy=ht&&"TextEvent"in window&&!Tr,Th=ht&&(!Dl||Tr&&8<Tr&&11>=Tr),fc=" ",hc=!1;function Eh(e,t){switch(e){case"keyup":return cy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function fy(e,t){switch(e){case"compositionend":return jh(t);case"keypress":return t.which!==32?null:(hc=!0,fc);case"textInput":return e=t.data,e===fc&&hc?null:e;default:return null}}function hy(e,t){if(kn)return e==="compositionend"||!Dl&&Eh(e,t)?(e=Ph(),Xs=Al=Et=null,kn=!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 Th&&t.locale!=="ko"?null:t.data;default:return null}}var py={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 pc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!py[e.type]:t==="textarea"}function Nh(e,t,n,r){oh(r),t=hi(t,"onChange"),0<t.length&&(n=new Rl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Er=null,$r=null;function my(e){Bh(e,0)}function zi(e){var t=Tn(e);if(qf(t))return e}function gy(e,t){if(e==="change")return t}var Ah=!1;if(ht){var ko;if(ht){var Co="oninput"in document;if(!Co){var mc=document.createElement("div");mc.setAttribute("oninput","return;"),Co=typeof mc.oninput=="function"}ko=Co}else ko=!1;Ah=ko&&(!document.documentMode||9<document.documentMode)}function gc(){Er&&(Er.detachEvent("onpropertychange",Rh),$r=Er=null)}function Rh(e){if(e.propertyName==="value"&&zi($r)){var t=[];Nh(t,$r,e,Pl(e)),ch(my,t)}}function yy(e,t,n){e==="focusin"?(gc(),Er=t,$r=n,Er.attachEvent("onpropertychange",Rh)):e==="focusout"&&gc()}function vy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zi($r)}function xy(e,t){if(e==="click")return zi(t)}function wy(e,t){if(e==="input"||e==="change")return zi(t)}function Sy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ze=typeof Object.is=="function"?Object.is:Sy;function Wr(e,t){if(Ze(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 s=n[r];if(!na.call(t,s)||!Ze(e[s],t[s]))return!1}return!0}function yc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vc(e,t){var n=yc(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=yc(n)}}function Lh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dh(){for(var e=window,t=oi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=oi(e.document)}return t}function Fl(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 by(e){var t=Dh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Lh(n.ownerDocument.documentElement,n)){if(r!==null&&Fl(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 s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=vc(n,i);var o=vc(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ky=ht&&"documentMode"in document&&11>=document.documentMode,Cn=null,Sa=null,jr=null,ba=!1;function xc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ba||Cn==null||Cn!==oi(r)||(r=Cn,"selectionStart"in r&&Fl(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}),jr&&Wr(jr,r)||(jr=r,r=hi(Sa,"onSelect"),0<r.length&&(t=new Rl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Cn)))}function Ls(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pn={animationend:Ls("Animation","AnimationEnd"),animationiteration:Ls("Animation","AnimationIteration"),animationstart:Ls("Animation","AnimationStart"),transitionend:Ls("Transition","TransitionEnd")},Po={},Fh={};ht&&(Fh=document.createElement("div").style,"AnimationEvent"in window||(delete Pn.animationend.animation,delete Pn.animationiteration.animation,delete Pn.animationstart.animation),"TransitionEvent"in window||delete Pn.transitionend.transition);function $i(e){if(Po[e])return Po[e];if(!Pn[e])return e;var t=Pn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fh)return Po[e]=t[n];return e}var Mh=$i("animationend"),_h=$i("animationiteration"),Vh=$i("animationstart"),Oh=$i("transitionend"),Ih=new Map,wc="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 $t(e,t){Ih.set(e,t),mn(t,[e])}for(var To=0;To<wc.length;To++){var Eo=wc[To],Cy=Eo.toLowerCase(),Py=Eo[0].toUpperCase()+Eo.slice(1);$t(Cy,"on"+Py)}$t(Mh,"onAnimationEnd");$t(_h,"onAnimationIteration");$t(Vh,"onAnimationStart");$t("dblclick","onDoubleClick");$t("focusin","onFocus");$t("focusout","onBlur");$t(Oh,"onTransitionEnd");Wn("onMouseEnter",["mouseout","mouseover"]);Wn("onMouseLeave",["mouseout","mouseover"]);Wn("onPointerEnter",["pointerout","pointerover"]);Wn("onPointerLeave",["pointerout","pointerover"]);mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));mn("onBeforeInput",["compositionend","keypress","textInput","paste"]);mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xr="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(" "),Ty=new Set("cancel close invalid load scroll toggle".split(" ").concat(xr));function Sc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,C0(r,t,void 0,e),e.currentTarget=null}function Bh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Sc(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Sc(s,a,u),i=l}}}if(li)throw e=ya,li=!1,ya=null,e}function B(e,t){var n=t[Ea];n===void 0&&(n=t[Ea]=new Set);var r=e+"__bubble";n.has(r)||(Uh(t,e,2,!1),n.add(r))}function jo(e,t,n){var r=0;t&&(r|=4),Uh(n,e,r,t)}var Ds="_reactListening"+Math.random().toString(36).slice(2);function Kr(e){if(!e[Ds]){e[Ds]=!0,Xf.forEach(function(n){n!=="selectionchange"&&(Ty.has(n)||jo(n,!1,e),jo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ds]||(t[Ds]=!0,jo("selectionchange",!1,t))}}function Uh(e,t,n,r){switch(Ch(t)){case 1:var s=B0;break;case 4:s=U0;break;default:s=Nl}n=s.bind(null,t,n,e),s=void 0,!ga||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function No(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=nn(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}ch(function(){var u=i,c=Pl(n),f=[];e:{var h=Ih.get(e);if(h!==void 0){var g=Rl,v=e;switch(e){case"keypress":if(Qs(n)===0)break e;case"keydown":case"keyup":g=ny;break;case"focusin":v="focus",g=bo;break;case"focusout":v="blur",g=bo;break;case"beforeblur":case"afterblur":g=bo;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":g=uc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=W0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=iy;break;case Mh:case _h:case Vh:g=G0;break;case Oh:g=ay;break;case"scroll":g=z0;break;case"wheel":g=uy;break;case"copy":case"cut":case"paste":g=Q0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=dc}var w=(t&4)!==0,S=!w&&e==="scroll",m=w?h!==null?h+"Capture":null:h;w=[];for(var p=u,y;p!==null;){y=p;var b=y.stateNode;if(y.tag===5&&b!==null&&(y=b,m!==null&&(b=Ir(p,m),b!=null&&w.push(Hr(p,b,y)))),S)break;p=p.return}0<w.length&&(h=new g(h,v,null,n,c),f.push({event:h,listeners:w}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&n!==pa&&(v=n.relatedTarget||n.fromElement)&&(nn(v)||v[pt]))break e;if((g||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,g?(v=n.relatedTarget||n.toElement,g=u,v=v?nn(v):null,v!==null&&(S=gn(v),v!==S||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=u),g!==v)){if(w=uc,b="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(w=dc,b="onPointerLeave",m="onPointerEnter",p="pointer"),S=g==null?h:Tn(g),y=v==null?h:Tn(v),h=new w(b,p+"leave",g,n,c),h.target=S,h.relatedTarget=y,b=null,nn(c)===u&&(w=new w(m,p+"enter",v,n,c),w.target=y,w.relatedTarget=S,b=w),S=b,g&&v)t:{for(w=g,m=v,p=0,y=w;y;y=wn(y))p++;for(y=0,b=m;b;b=wn(b))y++;for(;0<p-y;)w=wn(w),p--;for(;0<y-p;)m=wn(m),y--;for(;p--;){if(w===m||m!==null&&w===m.alternate)break t;w=wn(w),m=wn(m)}w=null}else w=null;g!==null&&bc(f,h,g,w,!1),v!==null&&S!==null&&bc(f,S,v,w,!0)}}e:{if(h=u?Tn(u):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var k=gy;else if(pc(h))if(Ah)k=wy;else{k=vy;var C=yy}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=xy);if(k&&(k=k(e,u))){Nh(f,k,n,c);break e}C&&C(e,h,u),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&ua(h,"number",h.value)}switch(C=u?Tn(u):window,e){case"focusin":(pc(C)||C.contentEditable==="true")&&(Cn=C,Sa=u,jr=null);break;case"focusout":jr=Sa=Cn=null;break;case"mousedown":ba=!0;break;case"contextmenu":case"mouseup":case"dragend":ba=!1,xc(f,n,c);break;case"selectionchange":if(ky)break;case"keydown":case"keyup":xc(f,n,c)}var E;if(Dl)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else kn?Eh(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Th&&n.locale!=="ko"&&(kn||P!=="onCompositionStart"?P==="onCompositionEnd"&&kn&&(E=Ph()):(Et=c,Al="value"in Et?Et.value:Et.textContent,kn=!0)),C=hi(u,P),0<C.length&&(P=new cc(P,e,null,n,c),f.push({event:P,listeners:C}),E?P.data=E:(E=jh(n),E!==null&&(P.data=E)))),(E=dy?fy(e,n):hy(e,n))&&(u=hi(u,"onBeforeInput"),0<u.length&&(c=new cc("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=E))}Bh(f,t)})}function Hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hi(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ir(e,n),i!=null&&r.unshift(Hr(e,i,s)),i=Ir(e,t),i!=null&&r.push(Hr(e,i,s))),e=e.return}return r}function wn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bc(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=Ir(n,i),l!=null&&o.unshift(Hr(n,l,a))):s||(l=Ir(n,i),l!=null&&o.push(Hr(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ey=/\r\n?/g,jy=/\u0000|\uFFFD/g;function kc(e){return(typeof e=="string"?e:""+e).replace(Ey,`
`).replace(jy,"")}function Fs(e,t,n){if(t=kc(t),kc(e)!==t&&n)throw Error(T(425))}function pi(){}var ka=null,Ca=null;function Pa(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 Ta=typeof setTimeout=="function"?setTimeout:void 0,Ny=typeof clearTimeout=="function"?clearTimeout:void 0,Cc=typeof Promise=="function"?Promise:void 0,Ay=typeof queueMicrotask=="function"?queueMicrotask:typeof Cc<"u"?function(e){return Cc.resolve(null).then(e).catch(Ry)}:Ta;function Ry(e){setTimeout(function(){throw e})}function Ao(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),zr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);zr(t)}function Dt(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 Pc(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 rr=Math.random().toString(36).slice(2),tt="__reactFiber$"+rr,Gr="__reactProps$"+rr,pt="__reactContainer$"+rr,Ea="__reactEvents$"+rr,Ly="__reactListeners$"+rr,Dy="__reactHandles$"+rr;function nn(e){var t=e[tt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[tt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Pc(e);e!==null;){if(n=e[tt])return n;e=Pc(e)}return t}e=n,n=e.parentNode}return null}function cs(e){return e=e[tt]||e[pt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Tn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Wi(e){return e[Gr]||null}var ja=[],En=-1;function Wt(e){return{current:e}}function U(e){0>En||(e.current=ja[En],ja[En]=null,En--)}function I(e,t){En++,ja[En]=e.current,e.current=t}var Bt={},ye=Wt(Bt),Ce=Wt(!1),cn=Bt;function Kn(e,t){var n=e.type.contextTypes;if(!n)return Bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Pe(e){return e=e.childContextTypes,e!=null}function mi(){U(Ce),U(ye)}function Tc(e,t,n){if(ye.current!==Bt)throw Error(T(168));I(ye,t),I(Ce,n)}function zh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(T(108,y0(e)||"Unknown",s));return G({},n,r)}function gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bt,cn=ye.current,I(ye,e),I(Ce,Ce.current),!0}function Ec(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=zh(e,t,cn),r.__reactInternalMemoizedMergedChildContext=e,U(Ce),U(ye),I(ye,e)):U(Ce),I(Ce,n)}var at=null,Ki=!1,Ro=!1;function $h(e){at===null?at=[e]:at.push(e)}function Fy(e){Ki=!0,$h(e)}function Kt(){if(!Ro&&at!==null){Ro=!0;var e=0,t=V;try{var n=at;for(V=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}at=null,Ki=!1}catch(s){throw at!==null&&(at=at.slice(e+1)),ph(Tl,Kt),s}finally{V=t,Ro=!1}}return null}var jn=[],Nn=0,yi=null,vi=0,Oe=[],Ie=0,dn=null,lt=1,ut="";function Jt(e,t){jn[Nn++]=vi,jn[Nn++]=yi,yi=e,vi=t}function Wh(e,t,n){Oe[Ie++]=lt,Oe[Ie++]=ut,Oe[Ie++]=dn,dn=e;var r=lt;e=ut;var s=32-Qe(r)-1;r&=~(1<<s),n+=1;var i=32-Qe(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,lt=1<<32-Qe(t)+s|n<<s|r,ut=i+e}else lt=1<<i|n<<s|r,ut=e}function Ml(e){e.return!==null&&(Jt(e,1),Wh(e,1,0))}function _l(e){for(;e===yi;)yi=jn[--Nn],jn[Nn]=null,vi=jn[--Nn],jn[Nn]=null;for(;e===dn;)dn=Oe[--Ie],Oe[Ie]=null,ut=Oe[--Ie],Oe[Ie]=null,lt=Oe[--Ie],Oe[Ie]=null}var Ne=null,je=null,$=!1,Xe=null;function Kh(e,t){var n=Be(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 jc(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,Ne=e,je=Dt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ne=e,je=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=dn!==null?{id:lt,overflow:ut}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Be(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ne=e,je=null,!0):!1;default:return!1}}function Na(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Aa(e){if($){var t=je;if(t){var n=t;if(!jc(e,t)){if(Na(e))throw Error(T(418));t=Dt(n.nextSibling);var r=Ne;t&&jc(e,t)?Kh(r,n):(e.flags=e.flags&-4097|2,$=!1,Ne=e)}}else{if(Na(e))throw Error(T(418));e.flags=e.flags&-4097|2,$=!1,Ne=e}}}function Nc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ne=e}function Ms(e){if(e!==Ne)return!1;if(!$)return Nc(e),$=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Pa(e.type,e.memoizedProps)),t&&(t=je)){if(Na(e))throw Hh(),Error(T(418));for(;t;)Kh(e,t),t=Dt(t.nextSibling)}if(Nc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){je=Dt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}je=null}}else je=Ne?Dt(e.stateNode.nextSibling):null;return!0}function Hh(){for(var e=je;e;)e=Dt(e.nextSibling)}function Hn(){je=Ne=null,$=!1}function Vl(e){Xe===null?Xe=[e]:Xe.push(e)}var My=xt.ReactCurrentBatchConfig;function fr(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(T(309));var r=n.stateNode}if(!r)throw Error(T(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function _s(e,t){throw e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ac(e){var t=e._init;return t(e._payload)}function Gh(e){function t(m,p){if(e){var y=m.deletions;y===null?(m.deletions=[p],m.flags|=16):y.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 s(m,p){return m=Vt(m,p),m.index=0,m.sibling=null,m}function i(m,p,y){return m.index=y,e?(y=m.alternate,y!==null?(y=y.index,y<p?(m.flags|=2,p):y):(m.flags|=2,p)):(m.flags|=1048576,p)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,p,y,b){return p===null||p.tag!==6?(p=Oo(y,m.mode,b),p.return=m,p):(p=s(p,y),p.return=m,p)}function l(m,p,y,b){var k=y.type;return k===bn?c(m,p,y.props.children,b,y.key):p!==null&&(p.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&Ac(k)===p.type)?(b=s(p,y.props),b.ref=fr(m,p,y),b.return=m,b):(b=ni(y.type,y.key,y.props,null,m.mode,b),b.ref=fr(m,p,y),b.return=m,b)}function u(m,p,y,b){return p===null||p.tag!==4||p.stateNode.containerInfo!==y.containerInfo||p.stateNode.implementation!==y.implementation?(p=Io(y,m.mode,b),p.return=m,p):(p=s(p,y.children||[]),p.return=m,p)}function c(m,p,y,b,k){return p===null||p.tag!==7?(p=ln(y,m.mode,b,k),p.return=m,p):(p=s(p,y),p.return=m,p)}function f(m,p,y){if(typeof p=="string"&&p!==""||typeof p=="number")return p=Oo(""+p,m.mode,y),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ps:return y=ni(p.type,p.key,p.props,null,m.mode,y),y.ref=fr(m,null,p),y.return=m,y;case Sn:return p=Io(p,m.mode,y),p.return=m,p;case kt:var b=p._init;return f(m,b(p._payload),y)}if(yr(p)||ar(p))return p=ln(p,m.mode,y,null),p.return=m,p;_s(m,p)}return null}function h(m,p,y,b){var k=p!==null?p.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:a(m,p,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ps:return y.key===k?l(m,p,y,b):null;case Sn:return y.key===k?u(m,p,y,b):null;case kt:return k=y._init,h(m,p,k(y._payload),b)}if(yr(y)||ar(y))return k!==null?null:c(m,p,y,b,null);_s(m,y)}return null}function g(m,p,y,b,k){if(typeof b=="string"&&b!==""||typeof b=="number")return m=m.get(y)||null,a(p,m,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Ps:return m=m.get(b.key===null?y:b.key)||null,l(p,m,b,k);case Sn:return m=m.get(b.key===null?y:b.key)||null,u(p,m,b,k);case kt:var C=b._init;return g(m,p,y,C(b._payload),k)}if(yr(b)||ar(b))return m=m.get(y)||null,c(p,m,b,k,null);_s(p,b)}return null}function v(m,p,y,b){for(var k=null,C=null,E=p,P=p=0,F=null;E!==null&&P<y.length;P++){E.index>P?(F=E,E=null):F=E.sibling;var A=h(m,E,y[P],b);if(A===null){E===null&&(E=F);break}e&&E&&A.alternate===null&&t(m,E),p=i(A,p,P),C===null?k=A:C.sibling=A,C=A,E=F}if(P===y.length)return n(m,E),$&&Jt(m,P),k;if(E===null){for(;P<y.length;P++)E=f(m,y[P],b),E!==null&&(p=i(E,p,P),C===null?k=E:C.sibling=E,C=E);return $&&Jt(m,P),k}for(E=r(m,E);P<y.length;P++)F=g(E,m,P,y[P],b),F!==null&&(e&&F.alternate!==null&&E.delete(F.key===null?P:F.key),p=i(F,p,P),C===null?k=F:C.sibling=F,C=F);return e&&E.forEach(function(ee){return t(m,ee)}),$&&Jt(m,P),k}function w(m,p,y,b){var k=ar(y);if(typeof k!="function")throw Error(T(150));if(y=k.call(y),y==null)throw Error(T(151));for(var C=k=null,E=p,P=p=0,F=null,A=y.next();E!==null&&!A.done;P++,A=y.next()){E.index>P?(F=E,E=null):F=E.sibling;var ee=h(m,E,A.value,b);if(ee===null){E===null&&(E=F);break}e&&E&&ee.alternate===null&&t(m,E),p=i(ee,p,P),C===null?k=ee:C.sibling=ee,C=ee,E=F}if(A.done)return n(m,E),$&&Jt(m,P),k;if(E===null){for(;!A.done;P++,A=y.next())A=f(m,A.value,b),A!==null&&(p=i(A,p,P),C===null?k=A:C.sibling=A,C=A);return $&&Jt(m,P),k}for(E=r(m,E);!A.done;P++,A=y.next())A=g(E,m,P,A.value,b),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?P:A.key),p=i(A,p,P),C===null?k=A:C.sibling=A,C=A);return e&&E.forEach(function(wt){return t(m,wt)}),$&&Jt(m,P),k}function S(m,p,y,b){if(typeof y=="object"&&y!==null&&y.type===bn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ps:e:{for(var k=y.key,C=p;C!==null;){if(C.key===k){if(k=y.type,k===bn){if(C.tag===7){n(m,C.sibling),p=s(C,y.props.children),p.return=m,m=p;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&Ac(k)===C.type){n(m,C.sibling),p=s(C,y.props),p.ref=fr(m,C,y),p.return=m,m=p;break e}n(m,C);break}else t(m,C);C=C.sibling}y.type===bn?(p=ln(y.props.children,m.mode,b,y.key),p.return=m,m=p):(b=ni(y.type,y.key,y.props,null,m.mode,b),b.ref=fr(m,p,y),b.return=m,m=b)}return o(m);case Sn:e:{for(C=y.key;p!==null;){if(p.key===C)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(m,p.sibling),p=s(p,y.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Io(y,m.mode,b),p.return=m,m=p}return o(m);case kt:return C=y._init,S(m,p,C(y._payload),b)}if(yr(y))return v(m,p,y,b);if(ar(y))return w(m,p,y,b);_s(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(n(m,p.sibling),p=s(p,y),p.return=m,m=p):(n(m,p),p=Oo(y,m.mode,b),p.return=m,m=p),o(m)):n(m,p)}return S}var Gn=Gh(!0),Xh=Gh(!1),xi=Wt(null),wi=null,An=null,Ol=null;function Il(){Ol=An=wi=null}function Bl(e){var t=xi.current;U(xi),e._currentValue=t}function Ra(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 zn(e,t){wi=e,Ol=An=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function ze(e){var t=e._currentValue;if(Ol!==e)if(e={context:e,memoizedValue:t,next:null},An===null){if(wi===null)throw Error(T(308));An=e,wi.dependencies={lanes:0,firstContext:e}}else An=An.next=e;return t}var rn=null;function Ul(e){rn===null?rn=[e]:rn.push(e)}function Qh(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ul(t)):(n.next=s.next,s.next=n),t.interleaved=n,mt(e,r)}function mt(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 Ct=!1;function zl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yh(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 ct(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ft(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,_&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,mt(e,n)}return s=r.interleaved,s===null?(t.next=t,Ul(r)):(t.next=s.next,s.next=t),r.interleaved=t,mt(e,n)}function Ys(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,El(e,n)}}function Rc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Si(e,t,n,r){var s=e.updateQueue;Ct=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,c=u=l=null,a=i;do{var h=a.lane,g=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,w=a;switch(h=t,g=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(g,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,h=typeof v=="function"?v.call(g,f,h):v,h==null)break e;f=G({},f,h);break e;case 2:Ct=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else g={eventTime:g,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=g,l=f):c=c.next=g,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(c===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);hn|=o,e.lanes=o,e.memoizedState=f}}function Lc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(T(191,s));s.call(r)}}}var ds={},rt=Wt(ds),Xr=Wt(ds),Qr=Wt(ds);function sn(e){if(e===ds)throw Error(T(174));return e}function $l(e,t){switch(I(Qr,t),I(Xr,e),I(rt,ds),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:da(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=da(t,e)}U(rt),I(rt,t)}function Xn(){U(rt),U(Xr),U(Qr)}function Zh(e){sn(Qr.current);var t=sn(rt.current),n=da(t,e.type);t!==n&&(I(Xr,e),I(rt,n))}function Wl(e){Xr.current===e&&(U(rt),U(Xr))}var W=Wt(0);function bi(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 Lo=[];function Kl(){for(var e=0;e<Lo.length;e++)Lo[e]._workInProgressVersionPrimary=null;Lo.length=0}var Zs=xt.ReactCurrentDispatcher,Do=xt.ReactCurrentBatchConfig,fn=0,H=null,re=null,oe=null,ki=!1,Nr=!1,Yr=0,_y=0;function fe(){throw Error(T(321))}function Hl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ze(e[n],t[n]))return!1;return!0}function Gl(e,t,n,r,s,i){if(fn=i,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zs.current=e===null||e.memoizedState===null?By:Uy,e=n(r,s),Nr){i=0;do{if(Nr=!1,Yr=0,25<=i)throw Error(T(301));i+=1,oe=re=null,t.updateQueue=null,Zs.current=zy,e=n(r,s)}while(Nr)}if(Zs.current=Ci,t=re!==null&&re.next!==null,fn=0,oe=re=H=null,ki=!1,t)throw Error(T(300));return e}function Xl(){var e=Yr!==0;return Yr=0,e}function et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oe===null?H.memoizedState=oe=e:oe=oe.next=e,oe}function $e(){if(re===null){var e=H.alternate;e=e!==null?e.memoizedState:null}else e=re.next;var t=oe===null?H.memoizedState:oe.next;if(t!==null)oe=t,re=e;else{if(e===null)throw Error(T(310));re=e,e={memoizedState:re.memoizedState,baseState:re.baseState,baseQueue:re.baseQueue,queue:re.queue,next:null},oe===null?H.memoizedState=oe=e:oe=oe.next=e}return oe}function Zr(e,t){return typeof t=="function"?t(e):t}function Fo(e){var t=$e(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=re,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((fn&c)===c)l!==null&&(l=l.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 f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,H.lanes|=c,hn|=c}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,Ze(r,t.memoizedState)||(ke=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,H.lanes|=i,hn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Mo(e){var t=$e(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Ze(i,t.memoizedState)||(ke=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Jh(){}function qh(e,t){var n=H,r=$e(),s=t(),i=!Ze(r.memoizedState,s);if(i&&(r.memoizedState=s,ke=!0),r=r.queue,Ql(np.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||oe!==null&&oe.memoizedState.tag&1){if(n.flags|=2048,Jr(9,tp.bind(null,n,r,s,t),void 0,null),ae===null)throw Error(T(349));fn&30||ep(n,t,s)}return s}function ep(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t={lastEffect:null,stores:null},H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function tp(e,t,n,r){t.value=n,t.getSnapshot=r,rp(t)&&sp(e)}function np(e,t,n){return n(function(){rp(t)&&sp(e)})}function rp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ze(e,n)}catch{return!0}}function sp(e){var t=mt(e,1);t!==null&&Ye(t,e,1,-1)}function Dc(e){var t=et();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zr,lastRenderedState:e},t.queue=e,e=e.dispatch=Iy.bind(null,H,e),[t.memoizedState,e]}function Jr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=H.updateQueue,t===null?(t={lastEffect:null,stores:null},H.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 ip(){return $e().memoizedState}function Js(e,t,n,r){var s=et();H.flags|=e,s.memoizedState=Jr(1|t,n,void 0,r===void 0?null:r)}function Hi(e,t,n,r){var s=$e();r=r===void 0?null:r;var i=void 0;if(re!==null){var o=re.memoizedState;if(i=o.destroy,r!==null&&Hl(r,o.deps)){s.memoizedState=Jr(t,n,i,r);return}}H.flags|=e,s.memoizedState=Jr(1|t,n,i,r)}function Fc(e,t){return Js(8390656,8,e,t)}function Ql(e,t){return Hi(2048,8,e,t)}function op(e,t){return Hi(4,2,e,t)}function ap(e,t){return Hi(4,4,e,t)}function lp(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 up(e,t,n){return n=n!=null?n.concat([e]):null,Hi(4,4,lp.bind(null,t,e),n)}function Yl(){}function cp(e,t){var n=$e();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dp(e,t){var n=$e();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fp(e,t,n){return fn&21?(Ze(n,t)||(n=yh(),H.lanes|=n,hn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ke=!0),e.memoizedState=n)}function Vy(e,t){var n=V;V=n!==0&&4>n?n:4,e(!0);var r=Do.transition;Do.transition={};try{e(!1),t()}finally{V=n,Do.transition=r}}function hp(){return $e().memoizedState}function Oy(e,t,n){var r=_t(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},pp(e))mp(t,n);else if(n=Qh(e,t,n,r),n!==null){var s=xe();Ye(n,e,r,s),gp(n,t,r)}}function Iy(e,t,n){var r=_t(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(pp(e))mp(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Ze(a,o)){var l=t.interleaved;l===null?(s.next=s,Ul(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Qh(e,t,s,r),n!==null&&(s=xe(),Ye(n,e,r,s),gp(n,t,r))}}function pp(e){var t=e.alternate;return e===H||t!==null&&t===H}function mp(e,t){Nr=ki=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,El(e,n)}}var Ci={readContext:ze,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},By={readContext:ze,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:ze,useEffect:Fc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Js(4194308,4,lp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Js(4194308,4,e,t)},useInsertionEffect:function(e,t){return Js(4,2,e,t)},useMemo:function(e,t){var n=et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=et();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=Oy.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:Dc,useDebugValue:Yl,useDeferredValue:function(e){return et().memoizedState=e},useTransition:function(){var e=Dc(!1),t=e[0];return e=Vy.bind(null,e[1]),et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=H,s=et();if($){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),ae===null)throw Error(T(349));fn&30||ep(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Fc(np.bind(null,r,i,e),[e]),r.flags|=2048,Jr(9,tp.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=et(),t=ae.identifierPrefix;if($){var n=ut,r=lt;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=_y++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Uy={readContext:ze,useCallback:cp,useContext:ze,useEffect:Ql,useImperativeHandle:up,useInsertionEffect:op,useLayoutEffect:ap,useMemo:dp,useReducer:Fo,useRef:ip,useState:function(){return Fo(Zr)},useDebugValue:Yl,useDeferredValue:function(e){var t=$e();return fp(t,re.memoizedState,e)},useTransition:function(){var e=Fo(Zr)[0],t=$e().memoizedState;return[e,t]},useMutableSource:Jh,useSyncExternalStore:qh,useId:hp,unstable_isNewReconciler:!1},zy={readContext:ze,useCallback:cp,useContext:ze,useEffect:Ql,useImperativeHandle:up,useInsertionEffect:op,useLayoutEffect:ap,useMemo:dp,useReducer:Mo,useRef:ip,useState:function(){return Mo(Zr)},useDebugValue:Yl,useDeferredValue:function(e){var t=$e();return re===null?t.memoizedState=e:fp(t,re.memoizedState,e)},useTransition:function(){var e=Mo(Zr)[0],t=$e().memoizedState;return[e,t]},useMutableSource:Jh,useSyncExternalStore:qh,useId:hp,unstable_isNewReconciler:!1};function He(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function La(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:G({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gi={isMounted:function(e){return(e=e._reactInternals)?gn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xe(),s=_t(e),i=ct(r,s);i.payload=t,n!=null&&(i.callback=n),t=Ft(e,i,s),t!==null&&(Ye(t,e,s,r),Ys(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xe(),s=_t(e),i=ct(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ft(e,i,s),t!==null&&(Ye(t,e,s,r),Ys(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xe(),r=_t(e),s=ct(n,r);s.tag=2,t!=null&&(s.callback=t),t=Ft(e,s,r),t!==null&&(Ye(t,e,r,n),Ys(t,e,r))}};function Mc(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Wr(n,r)||!Wr(s,i):!0}function yp(e,t,n){var r=!1,s=Bt,i=t.contextType;return typeof i=="object"&&i!==null?i=ze(i):(s=Pe(t)?cn:ye.current,r=t.contextTypes,i=(r=r!=null)?Kn(e,s):Bt),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Gi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function _c(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&&Gi.enqueueReplaceState(t,t.state,null)}function Da(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},zl(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ze(i):(i=Pe(t)?cn:ye.current,s.context=Kn(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(La(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Gi.enqueueReplaceState(s,s.state,null),Si(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Qn(e,t){try{var n="",r=t;do n+=g0(r),r=r.return;while(r);var s=n}catch(i){s=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function _o(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Fa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $y=typeof WeakMap=="function"?WeakMap:Map;function vp(e,t,n){n=ct(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ti||(Ti=!0,Wa=r),Fa(e,t)},n}function xp(e,t,n){n=ct(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Fa(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Fa(e,t),typeof r!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Vc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $y;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=rv.bind(null,e,t,n),t.then(e,e))}function Oc(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 Ic(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,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=ct(-1,1),t.tag=2,Ft(n,t,1))),n.lanes|=1),e)}var Wy=xt.ReactCurrentOwner,ke=!1;function ve(e,t,n,r){t.child=e===null?Xh(t,null,n,r):Gn(t,e.child,n,r)}function Bc(e,t,n,r,s){n=n.render;var i=t.ref;return zn(t,s),r=Gl(e,t,n,r,i,s),n=Xl(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):($&&n&&Ml(t),t.flags|=1,ve(e,t,r,s),t.child)}function Uc(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!su(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,wp(e,t,i,r,s)):(e=ni(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Wr,n(o,r)&&e.ref===t.ref)return gt(e,t,s)}return t.flags|=1,e=Vt(i,r),e.ref=t.ref,e.return=t,t.child=e}function wp(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Wr(i,r)&&e.ref===t.ref)if(ke=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(ke=!0);else return t.lanes=e.lanes,gt(e,t,s)}return Ma(e,t,n,r,s)}function Sp(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},I(Ln,Ee),Ee|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,I(Ln,Ee),Ee|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,I(Ln,Ee),Ee|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,I(Ln,Ee),Ee|=r;return ve(e,t,s,n),t.child}function bp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ma(e,t,n,r,s){var i=Pe(n)?cn:ye.current;return i=Kn(t,i),zn(t,s),n=Gl(e,t,n,r,i,s),r=Xl(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):($&&r&&Ml(t),t.flags|=1,ve(e,t,n,s),t.child)}function zc(e,t,n,r,s){if(Pe(n)){var i=!0;gi(t)}else i=!1;if(zn(t,s),t.stateNode===null)qs(e,t),yp(t,n,r),Da(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=ze(u):(u=Pe(n)?cn:ye.current,u=Kn(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&_c(t,o,r,u),Ct=!1;var h=t.memoizedState;o.state=h,Si(t,r,o,s),l=t.memoizedState,a!==r||h!==l||Ce.current||Ct?(typeof c=="function"&&(La(t,n,c,r),l=t.memoizedState),(a=Ct||Mc(t,n,a,r,h,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Yh(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:He(t.type,a),o.props=u,f=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=ze(l):(l=Pe(n)?cn:ye.current,l=Kn(t,l));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&_c(t,o,r,l),Ct=!1,h=t.memoizedState,o.state=h,Si(t,r,o,s);var v=t.memoizedState;a!==f||h!==v||Ce.current||Ct?(typeof g=="function"&&(La(t,n,g,r),v=t.memoizedState),(u=Ct||Mc(t,n,u,r,h,v,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return _a(e,t,n,r,i,s)}function _a(e,t,n,r,s,i){bp(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Ec(t,n,!1),gt(e,t,i);r=t.stateNode,Wy.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Gn(t,e.child,null,i),t.child=Gn(t,null,a,i)):ve(e,t,a,i),t.memoizedState=r.state,s&&Ec(t,n,!0),t.child}function kp(e){var t=e.stateNode;t.pendingContext?Tc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Tc(e,t.context,!1),$l(e,t.containerInfo)}function $c(e,t,n,r,s){return Hn(),Vl(s),t.flags|=256,ve(e,t,n,r),t.child}var Va={dehydrated:null,treeContext:null,retryLane:0};function Oa(e){return{baseLanes:e,cachePool:null,transitions:null}}function Cp(e,t,n){var r=t.pendingProps,s=W.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),I(W,s&1),e===null)return Aa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Yi(o,r,0,null),e=ln(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Oa(n),t.memoizedState=Va,e):Zl(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Ky(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vt(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Vt(a,i):(i=ln(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Oa(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Va,r}return i=e.child,e=i.sibling,r=Vt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Zl(e,t){return t=Yi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Vs(e,t,n,r){return r!==null&&Vl(r),Gn(t,e.child,null,n),e=Zl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ky(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=_o(Error(T(422))),Vs(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Yi({mode:"visible",children:r.children},s,0,null),i=ln(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Gn(t,e.child,null,o),t.child.memoizedState=Oa(o),t.memoizedState=Va,i);if(!(t.mode&1))return Vs(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(T(419)),r=_o(i,r,void 0),Vs(e,t,o,r)}if(a=(o&e.childLanes)!==0,ke||a){if(r=ae,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,mt(e,s),Ye(r,e,s,-1))}return ru(),r=_o(Error(T(421))),Vs(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=sv.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,je=Dt(s.nextSibling),Ne=t,$=!0,Xe=null,e!==null&&(Oe[Ie++]=lt,Oe[Ie++]=ut,Oe[Ie++]=dn,lt=e.id,ut=e.overflow,dn=t),t=Zl(t,r.children),t.flags|=4096,t)}function Wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ra(e.return,t,n)}function Vo(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Pp(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(ve(e,t,r.children,n),r=W.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&&Wc(e,n,t);else if(e.tag===19)Wc(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(I(W,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&bi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Vo(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&bi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Vo(t,!0,n,null,i);break;case"together":Vo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),hn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=Vt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Hy(e,t,n){switch(t.tag){case 3:kp(t),Hn();break;case 5:Zh(t);break;case 1:Pe(t.type)&&gi(t);break;case 4:$l(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;I(xi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(I(W,W.current&1),t.flags|=128,null):n&t.child.childLanes?Cp(e,t,n):(I(W,W.current&1),e=gt(e,t,n),e!==null?e.sibling:null);I(W,W.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Pp(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),I(W,W.current),r)break;return null;case 22:case 23:return t.lanes=0,Sp(e,t,n)}return gt(e,t,n)}var Tp,Ia,Ep,jp;Tp=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}};Ia=function(){};Ep=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,sn(rt.current);var i=null;switch(n){case"input":s=aa(e,s),r=aa(e,r),i=[];break;case"select":s=G({},s,{value:void 0}),r=G({},r,{value:void 0}),i=[];break;case"textarea":s=ca(e,s),r=ca(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=pi)}fa(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Vr.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Vr.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&B("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};jp=function(e,t,n,r){n!==r&&(t.flags|=4)};function hr(e,t){if(!$)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 he(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gy(e,t,n){var r=t.pendingProps;switch(_l(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return he(t),null;case 1:return Pe(t.type)&&mi(),he(t),null;case 3:return r=t.stateNode,Xn(),U(Ce),U(ye),Kl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ms(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xe!==null&&(Ga(Xe),Xe=null))),Ia(e,t),he(t),null;case 5:Wl(t);var s=sn(Qr.current);if(n=t.type,e!==null&&t.stateNode!=null)Ep(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(T(166));return he(t),null}if(e=sn(rt.current),Ms(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[tt]=t,r[Gr]=i,e=(t.mode&1)!==0,n){case"dialog":B("cancel",r),B("close",r);break;case"iframe":case"object":case"embed":B("load",r);break;case"video":case"audio":for(s=0;s<xr.length;s++)B(xr[s],r);break;case"source":B("error",r);break;case"img":case"image":case"link":B("error",r),B("load",r);break;case"details":B("toggle",r);break;case"input":qu(r,i),B("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},B("invalid",r);break;case"textarea":tc(r,i),B("invalid",r)}fa(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Fs(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Fs(r.textContent,a,e),s=["children",""+a]):Vr.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&B("scroll",r)}switch(n){case"input":Ts(r),ec(r,i,!0);break;case"textarea":Ts(r),nc(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=pi)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=nh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[tt]=t,e[Gr]=r,Tp(e,t,!1,!1),t.stateNode=e;e:{switch(o=ha(n,r),n){case"dialog":B("cancel",e),B("close",e),s=r;break;case"iframe":case"object":case"embed":B("load",e),s=r;break;case"video":case"audio":for(s=0;s<xr.length;s++)B(xr[s],e);s=r;break;case"source":B("error",e),s=r;break;case"img":case"image":case"link":B("error",e),B("load",e),s=r;break;case"details":B("toggle",e),s=r;break;case"input":qu(e,r),s=aa(e,r),B("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=G({},r,{value:void 0}),B("invalid",e);break;case"textarea":tc(e,r),s=ca(e,r),B("invalid",e);break;default:s=r}fa(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?ih(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&rh(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Or(e,l):typeof l=="number"&&Or(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Vr.hasOwnProperty(i)?l!=null&&i==="onScroll"&&B("scroll",e):l!=null&&Sl(e,i,l,o))}switch(n){case"input":Ts(e),ec(e,r,!1);break;case"textarea":Ts(e),nc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+It(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?On(e,!!r.multiple,i,!1):r.defaultValue!=null&&On(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=pi)}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 he(t),null;case 6:if(e&&t.stateNode!=null)jp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));if(n=sn(Qr.current),sn(rt.current),Ms(t)){if(r=t.stateNode,n=t.memoizedProps,r[tt]=t,(i=r.nodeValue!==n)&&(e=Ne,e!==null))switch(e.tag){case 3:Fs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fs(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[tt]=t,t.stateNode=r}return he(t),null;case 13:if(U(W),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($&&je!==null&&t.mode&1&&!(t.flags&128))Hh(),Hn(),t.flags|=98560,i=!1;else if(i=Ms(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(T(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(T(317));i[tt]=t}else Hn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;he(t),i=!1}else Xe!==null&&(Ga(Xe),Xe=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||W.current&1?se===0&&(se=3):ru())),t.updateQueue!==null&&(t.flags|=4),he(t),null);case 4:return Xn(),Ia(e,t),e===null&&Kr(t.stateNode.containerInfo),he(t),null;case 10:return Bl(t.type._context),he(t),null;case 17:return Pe(t.type)&&mi(),he(t),null;case 19:if(U(W),i=t.memoizedState,i===null)return he(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)hr(i,!1);else{if(se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=bi(e),o!==null){for(t.flags|=128,hr(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return I(W,W.current&1|2),t.child}e=e.sibling}i.tail!==null&&q()>Yn&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304)}else{if(!r)if(e=bi(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!$)return he(t),null}else 2*q()-i.renderingStartTime>Yn&&n!==1073741824&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=q(),t.sibling=null,n=W.current,I(W,r?n&1|2:n&1),t):(he(t),null);case 22:case 23:return nu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ee&1073741824&&(he(t),t.subtreeFlags&6&&(t.flags|=8192)):he(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function Xy(e,t){switch(_l(t),t.tag){case 1:return Pe(t.type)&&mi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(),U(Ce),U(ye),Kl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wl(t),null;case 13:if(U(W),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));Hn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(W),null;case 4:return Xn(),null;case 10:return Bl(t.type._context),null;case 22:case 23:return nu(),null;case 24:return null;default:return null}}var Os=!1,me=!1,Qy=typeof WeakSet=="function"?WeakSet:Set,N=null;function Rn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Q(e,t,r)}else n.current=null}function Ba(e,t,n){try{n()}catch(r){Q(e,t,r)}}var Kc=!1;function Yy(e,t){if(ka=di,e=Dh(),Fl(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 s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,h=null;t:for(;;){for(var g;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)h=f,f=g;for(;;){if(f===e)break t;if(h===n&&++u===s&&(a=o),h===i&&++c===r&&(l=o),(g=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ca={focusedElem:e,selectionRange:n},di=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,S=v.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:He(t.type,w),S);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(b){Q(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return v=Kc,Kc=!1,v}function Ar(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Ba(t,n,i)}s=s.next}while(s!==r)}}function Xi(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 Ua(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 Np(e){var t=e.alternate;t!==null&&(e.alternate=null,Np(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tt],delete t[Gr],delete t[Ea],delete t[Ly],delete t[Dy])),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 Ap(e){return e.tag===5||e.tag===3||e.tag===4}function Hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ap(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 za(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=pi));else if(r!==4&&(e=e.child,e!==null))for(za(e,t,n),e=e.sibling;e!==null;)za(e,t,n),e=e.sibling}function $a(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($a(e,t,n),e=e.sibling;e!==null;)$a(e,t,n),e=e.sibling}var le=null,Ge=!1;function St(e,t,n){for(n=n.child;n!==null;)Rp(e,t,n),n=n.sibling}function Rp(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Bi,n)}catch{}switch(n.tag){case 5:me||Rn(n,t);case 6:var r=le,s=Ge;le=null,St(e,t,n),le=r,Ge=s,le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?Ao(e.parentNode,n):e.nodeType===1&&Ao(e,n),zr(e)):Ao(le,n.stateNode));break;case 4:r=le,s=Ge,le=n.stateNode.containerInfo,Ge=!0,St(e,t,n),le=r,Ge=s;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Ba(n,t,o),s=s.next}while(s!==r)}St(e,t,n);break;case 1:if(!me&&(Rn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Q(n,t,a)}St(e,t,n);break;case 21:St(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,St(e,t,n),me=r):St(e,t,n);break;default:St(e,t,n)}}function Gc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qy),t.forEach(function(r){var s=iv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function We(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:le=a.stateNode,Ge=!1;break e;case 3:le=a.stateNode.containerInfo,Ge=!0;break e;case 4:le=a.stateNode.containerInfo,Ge=!0;break e}a=a.return}if(le===null)throw Error(T(160));Rp(i,o,s),le=null,Ge=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Q(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lp(t,e),t=t.sibling}function Lp(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(We(t,e),qe(e),r&4){try{Ar(3,e,e.return),Xi(3,e)}catch(w){Q(e,e.return,w)}try{Ar(5,e,e.return)}catch(w){Q(e,e.return,w)}}break;case 1:We(t,e),qe(e),r&512&&n!==null&&Rn(n,n.return);break;case 5:if(We(t,e),qe(e),r&512&&n!==null&&Rn(n,n.return),e.flags&32){var s=e.stateNode;try{Or(s,"")}catch(w){Q(e,e.return,w)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&eh(s,i),ha(a,o);var u=ha(a,i);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?ih(s,f):c==="dangerouslySetInnerHTML"?rh(s,f):c==="children"?Or(s,f):Sl(s,c,f,u)}switch(a){case"input":la(s,i);break;case"textarea":th(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?On(s,!!i.multiple,g,!1):h!==!!i.multiple&&(i.defaultValue!=null?On(s,!!i.multiple,i.defaultValue,!0):On(s,!!i.multiple,i.multiple?[]:"",!1))}s[Gr]=i}catch(w){Q(e,e.return,w)}}break;case 6:if(We(t,e),qe(e),r&4){if(e.stateNode===null)throw Error(T(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(w){Q(e,e.return,w)}}break;case 3:if(We(t,e),qe(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zr(t.containerInfo)}catch(w){Q(e,e.return,w)}break;case 4:We(t,e),qe(e);break;case 13:We(t,e),qe(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(eu=q())),r&4&&Gc(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(me=(u=me)||c,We(t,e),me=u):We(t,e),qe(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(N=e,c=e.child;c!==null;){for(f=N=c;N!==null;){switch(h=N,g=h.child,h.tag){case 0:case 11:case 14:case 15:Ar(4,h,h.return);break;case 1:Rn(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){Q(r,n,w)}}break;case 5:Rn(h,h.return);break;case 22:if(h.memoizedState!==null){Qc(f);continue}}g!==null?(g.return=h,N=g):Qc(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{s=f.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=sh("display",o))}catch(w){Q(e,e.return,w)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(w){Q(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:We(t,e),qe(e),r&4&&Gc(e);break;case 21:break;default:We(t,e),qe(e)}}function qe(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ap(n)){var r=n;break e}n=n.return}throw Error(T(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Or(s,""),r.flags&=-33);var i=Hc(e);$a(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Hc(e);za(e,a,o);break;default:throw Error(T(161))}}catch(l){Q(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zy(e,t,n){N=e,Dp(e)}function Dp(e,t,n){for(var r=(e.mode&1)!==0;N!==null;){var s=N,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Os;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||me;a=Os;var u=me;if(Os=o,(me=l)&&!u)for(N=s;N!==null;)o=N,l=o.child,o.tag===22&&o.memoizedState!==null?Yc(s):l!==null?(l.return=o,N=l):Yc(s);for(;i!==null;)N=i,Dp(i),i=i.sibling;N=s,Os=a,me=u}Xc(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,N=i):Xc(e)}}function Xc(e){for(;N!==null;){var t=N;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:me||Xi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!me)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:He(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Lc(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Lc(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.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 f=c.dehydrated;f!==null&&zr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(T(163))}me||t.flags&512&&Ua(t)}catch(h){Q(t,t.return,h)}}if(t===e){N=null;break}if(n=t.sibling,n!==null){n.return=t.return,N=n;break}N=t.return}}function Qc(e){for(;N!==null;){var t=N;if(t===e){N=null;break}var n=t.sibling;if(n!==null){n.return=t.return,N=n;break}N=t.return}}function Yc(e){for(;N!==null;){var t=N;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xi(4,t)}catch(l){Q(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Q(t,s,l)}}var i=t.return;try{Ua(t)}catch(l){Q(t,i,l)}break;case 5:var o=t.return;try{Ua(t)}catch(l){Q(t,o,l)}}}catch(l){Q(t,t.return,l)}if(t===e){N=null;break}var a=t.sibling;if(a!==null){a.return=t.return,N=a;break}N=t.return}}var Jy=Math.ceil,Pi=xt.ReactCurrentDispatcher,Jl=xt.ReactCurrentOwner,Ue=xt.ReactCurrentBatchConfig,_=0,ae=null,te=null,ce=0,Ee=0,Ln=Wt(0),se=0,qr=null,hn=0,Qi=0,ql=0,Rr=null,be=null,eu=0,Yn=1/0,ot=null,Ti=!1,Wa=null,Mt=null,Is=!1,jt=null,Ei=0,Lr=0,Ka=null,ei=-1,ti=0;function xe(){return _&6?q():ei!==-1?ei:ei=q()}function _t(e){return e.mode&1?_&2&&ce!==0?ce&-ce:My.transition!==null?(ti===0&&(ti=yh()),ti):(e=V,e!==0||(e=window.event,e=e===void 0?16:Ch(e.type)),e):1}function Ye(e,t,n,r){if(50<Lr)throw Lr=0,Ka=null,Error(T(185));ls(e,n,r),(!(_&2)||e!==ae)&&(e===ae&&(!(_&2)&&(Qi|=n),se===4&&Tt(e,ce)),Te(e,r),n===1&&_===0&&!(t.mode&1)&&(Yn=q()+500,Ki&&Kt()))}function Te(e,t){var n=e.callbackNode;M0(e,t);var r=ci(e,e===ae?ce:0);if(r===0)n!==null&&ic(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ic(n),t===1)e.tag===0?Fy(Zc.bind(null,e)):$h(Zc.bind(null,e)),Ay(function(){!(_&6)&&Kt()}),n=null;else{switch(vh(r)){case 1:n=Tl;break;case 4:n=mh;break;case 16:n=ui;break;case 536870912:n=gh;break;default:n=ui}n=Up(n,Fp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fp(e,t){if(ei=-1,ti=0,_&6)throw Error(T(327));var n=e.callbackNode;if($n()&&e.callbackNode!==n)return null;var r=ci(e,e===ae?ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ji(e,r);else{t=r;var s=_;_|=2;var i=_p();(ae!==e||ce!==t)&&(ot=null,Yn=q()+500,an(e,t));do try{tv();break}catch(a){Mp(e,a)}while(!0);Il(),Pi.current=i,_=s,te!==null?t=0:(ae=null,ce=0,t=se)}if(t!==0){if(t===2&&(s=va(e),s!==0&&(r=s,t=Ha(e,s))),t===1)throw n=qr,an(e,0),Tt(e,r),Te(e,q()),n;if(t===6)Tt(e,r);else{if(s=e.current.alternate,!(r&30)&&!qy(s)&&(t=ji(e,r),t===2&&(i=va(e),i!==0&&(r=i,t=Ha(e,i))),t===1))throw n=qr,an(e,0),Tt(e,r),Te(e,q()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(T(345));case 2:qt(e,be,ot);break;case 3:if(Tt(e,r),(r&130023424)===r&&(t=eu+500-q(),10<t)){if(ci(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){xe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ta(qt.bind(null,e,be,ot),t);break}qt(e,be,ot);break;case 4:if(Tt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Qe(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Jy(r/1960))-r,10<r){e.timeoutHandle=Ta(qt.bind(null,e,be,ot),r);break}qt(e,be,ot);break;case 5:qt(e,be,ot);break;default:throw Error(T(329))}}}return Te(e,q()),e.callbackNode===n?Fp.bind(null,e):null}function Ha(e,t){var n=Rr;return e.current.memoizedState.isDehydrated&&(an(e,t).flags|=256),e=ji(e,t),e!==2&&(t=be,be=n,t!==null&&Ga(t)),e}function Ga(e){be===null?be=e:be.push.apply(be,e)}function qy(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 s=n[r],i=s.getSnapshot;s=s.value;try{if(!Ze(i(),s))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 Tt(e,t){for(t&=~ql,t&=~Qi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qe(t),r=1<<n;e[n]=-1,t&=~r}}function Zc(e){if(_&6)throw Error(T(327));$n();var t=ci(e,0);if(!(t&1))return Te(e,q()),null;var n=ji(e,t);if(e.tag!==0&&n===2){var r=va(e);r!==0&&(t=r,n=Ha(e,r))}if(n===1)throw n=qr,an(e,0),Tt(e,t),Te(e,q()),n;if(n===6)throw Error(T(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,qt(e,be,ot),Te(e,q()),null}function tu(e,t){var n=_;_|=1;try{return e(t)}finally{_=n,_===0&&(Yn=q()+500,Ki&&Kt())}}function pn(e){jt!==null&&jt.tag===0&&!(_&6)&&$n();var t=_;_|=1;var n=Ue.transition,r=V;try{if(Ue.transition=null,V=1,e)return e()}finally{V=r,Ue.transition=n,_=t,!(_&6)&&Kt()}}function nu(){Ee=Ln.current,U(Ln)}function an(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ny(n)),te!==null)for(n=te.return;n!==null;){var r=n;switch(_l(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&mi();break;case 3:Xn(),U(Ce),U(ye),Kl();break;case 5:Wl(r);break;case 4:Xn();break;case 13:U(W);break;case 19:U(W);break;case 10:Bl(r.type._context);break;case 22:case 23:nu()}n=n.return}if(ae=e,te=e=Vt(e.current,null),ce=Ee=t,se=0,qr=null,ql=Qi=hn=0,be=Rr=null,rn!==null){for(t=0;t<rn.length;t++)if(n=rn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}rn=null}return e}function Mp(e,t){do{var n=te;try{if(Il(),Zs.current=Ci,ki){for(var r=H.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ki=!1}if(fn=0,oe=re=H=null,Nr=!1,Yr=0,Jl.current=null,n===null||n.return===null){se=1,qr=t,te=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=ce,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=Oc(o);if(g!==null){g.flags&=-257,Ic(g,o,a,i,t),g.mode&1&&Vc(i,u,t),t=g,l=u;var v=t.updateQueue;if(v===null){var w=new Set;w.add(l),t.updateQueue=w}else v.add(l);break e}else{if(!(t&1)){Vc(i,u,t),ru();break e}l=Error(T(426))}}else if($&&a.mode&1){var S=Oc(o);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Ic(S,o,a,i,t),Vl(Qn(l,a));break e}}i=l=Qn(l,a),se!==4&&(se=2),Rr===null?Rr=[i]:Rr.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=vp(i,l,t);Rc(i,m);break e;case 1:a=l;var p=i.type,y=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Mt===null||!Mt.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=xp(i,a,t);Rc(i,b);break e}}i=i.return}while(i!==null)}Op(n)}catch(k){t=k,te===n&&n!==null&&(te=n=n.return);continue}break}while(!0)}function _p(){var e=Pi.current;return Pi.current=Ci,e===null?Ci:e}function ru(){(se===0||se===3||se===2)&&(se=4),ae===null||!(hn&268435455)&&!(Qi&268435455)||Tt(ae,ce)}function ji(e,t){var n=_;_|=2;var r=_p();(ae!==e||ce!==t)&&(ot=null,an(e,t));do try{ev();break}catch(s){Mp(e,s)}while(!0);if(Il(),_=n,Pi.current=r,te!==null)throw Error(T(261));return ae=null,ce=0,se}function ev(){for(;te!==null;)Vp(te)}function tv(){for(;te!==null&&!T0();)Vp(te)}function Vp(e){var t=Bp(e.alternate,e,Ee);e.memoizedProps=e.pendingProps,t===null?Op(e):te=t,Jl.current=null}function Op(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Xy(n,t),n!==null){n.flags&=32767,te=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{se=6,te=null;return}}else if(n=Gy(n,t,Ee),n!==null){te=n;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);se===0&&(se=5)}function qt(e,t,n){var r=V,s=Ue.transition;try{Ue.transition=null,V=1,nv(e,t,n,r)}finally{Ue.transition=s,V=r}return null}function nv(e,t,n,r){do $n();while(jt!==null);if(_&6)throw Error(T(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(_0(e,i),e===ae&&(te=ae=null,ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Is||(Is=!0,Up(ui,function(){return $n(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ue.transition,Ue.transition=null;var o=V;V=1;var a=_;_|=4,Jl.current=null,Yy(e,n),Lp(n,e),by(Ca),di=!!ka,Ca=ka=null,e.current=n,Zy(n),E0(),_=a,V=o,Ue.transition=i}else e.current=n;if(Is&&(Is=!1,jt=e,Ei=s),i=e.pendingLanes,i===0&&(Mt=null),A0(n.stateNode),Te(e,q()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ti)throw Ti=!1,e=Wa,Wa=null,e;return Ei&1&&e.tag!==0&&$n(),i=e.pendingLanes,i&1?e===Ka?Lr++:(Lr=0,Ka=e):Lr=0,Kt(),null}function $n(){if(jt!==null){var e=vh(Ei),t=Ue.transition,n=V;try{if(Ue.transition=null,V=16>e?16:e,jt===null)var r=!1;else{if(e=jt,jt=null,Ei=0,_&6)throw Error(T(331));var s=_;for(_|=4,N=e.current;N!==null;){var i=N,o=i.child;if(N.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(N=u;N!==null;){var c=N;switch(c.tag){case 0:case 11:case 15:Ar(8,c,i)}var f=c.child;if(f!==null)f.return=c,N=f;else for(;N!==null;){c=N;var h=c.sibling,g=c.return;if(Np(c),c===u){N=null;break}if(h!==null){h.return=g,N=h;break}N=g}}}var v=i.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var S=w.sibling;w.sibling=null,w=S}while(w!==null)}}N=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,N=o;else e:for(;N!==null;){if(i=N,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ar(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,N=m;break e}N=i.return}}var p=e.current;for(N=p;N!==null;){o=N;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,N=y;else e:for(o=p;N!==null;){if(a=N,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Xi(9,a)}}catch(k){Q(a,a.return,k)}if(a===o){N=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,N=b;break e}N=a.return}}if(_=s,Kt(),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Bi,e)}catch{}r=!0}return r}finally{V=n,Ue.transition=t}}return!1}function Jc(e,t,n){t=Qn(n,t),t=vp(e,t,1),e=Ft(e,t,1),t=xe(),e!==null&&(ls(e,1,t),Te(e,t))}function Q(e,t,n){if(e.tag===3)Jc(e,e,n);else for(;t!==null;){if(t.tag===3){Jc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Mt===null||!Mt.has(r))){e=Qn(n,e),e=xp(t,e,1),t=Ft(t,e,1),e=xe(),t!==null&&(ls(t,1,e),Te(t,e));break}}t=t.return}}function rv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=xe(),e.pingedLanes|=e.suspendedLanes&n,ae===e&&(ce&n)===n&&(se===4||se===3&&(ce&130023424)===ce&&500>q()-eu?an(e,0):ql|=n),Te(e,t)}function Ip(e,t){t===0&&(e.mode&1?(t=Ns,Ns<<=1,!(Ns&130023424)&&(Ns=4194304)):t=1);var n=xe();e=mt(e,t),e!==null&&(ls(e,t,n),Te(e,n))}function sv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ip(e,n)}function iv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(t),Ip(e,n)}var Bp;Bp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ce.current)ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ke=!1,Hy(e,t,n);ke=!!(e.flags&131072)}else ke=!1,$&&t.flags&1048576&&Wh(t,vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qs(e,t),e=t.pendingProps;var s=Kn(t,ye.current);zn(t,n),s=Gl(null,t,r,e,s,n);var i=Xl();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pe(r)?(i=!0,gi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,zl(t),s.updater=Gi,t.stateNode=s,s._reactInternals=t,Da(t,r,e,n),t=_a(null,t,r,!0,i,n)):(t.tag=0,$&&i&&Ml(t),ve(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qs(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=av(r),e=He(r,e),s){case 0:t=Ma(null,t,r,e,n);break e;case 1:t=zc(null,t,r,e,n);break e;case 11:t=Bc(null,t,r,e,n);break e;case 14:t=Uc(null,t,r,He(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),Ma(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),zc(e,t,r,s,n);case 3:e:{if(kp(t),e===null)throw Error(T(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Yh(e,t),Si(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Qn(Error(T(423)),t),t=$c(e,t,r,n,s);break e}else if(r!==s){s=Qn(Error(T(424)),t),t=$c(e,t,r,n,s);break e}else for(je=Dt(t.stateNode.containerInfo.firstChild),Ne=t,$=!0,Xe=null,n=Xh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hn(),r===s){t=gt(e,t,n);break e}ve(e,t,r,n)}t=t.child}return t;case 5:return Zh(t),e===null&&Aa(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Pa(r,s)?o=null:i!==null&&Pa(r,i)&&(t.flags|=32),bp(e,t),ve(e,t,o,n),t.child;case 6:return e===null&&Aa(t),null;case 13:return Cp(e,t,n);case 4:return $l(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Gn(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),Bc(e,t,r,s,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,I(xi,r._currentValue),r._currentValue=o,i!==null)if(Ze(i.value,o)){if(i.children===s.children&&!Ce.current){t=gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=ct(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Ra(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(T(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ra(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ve(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,zn(t,n),s=ze(s),r=r(s),t.flags|=1,ve(e,t,r,n),t.child;case 14:return r=t.type,s=He(r,t.pendingProps),s=He(r.type,s),Uc(e,t,r,s,n);case 15:return wp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),qs(e,t),t.tag=1,Pe(r)?(e=!0,gi(t)):e=!1,zn(t,n),yp(t,r,s),Da(t,r,s,n),_a(null,t,r,!0,e,n);case 19:return Pp(e,t,n);case 22:return Sp(e,t,n)}throw Error(T(156,t.tag))};function Up(e,t){return ph(e,t)}function ov(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 Be(e,t,n,r){return new ov(e,t,n,r)}function su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function av(e){if(typeof e=="function")return su(e)?1:0;if(e!=null){if(e=e.$$typeof,e===kl)return 11;if(e===Cl)return 14}return 2}function Vt(e,t){var n=e.alternate;return n===null?(n=Be(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 ni(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")su(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case bn:return ln(n.children,s,i,t);case bl:o=8,s|=8;break;case ra:return e=Be(12,n,t,s|2),e.elementType=ra,e.lanes=i,e;case sa:return e=Be(13,n,t,s),e.elementType=sa,e.lanes=i,e;case ia:return e=Be(19,n,t,s),e.elementType=ia,e.lanes=i,e;case Zf:return Yi(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qf:o=10;break e;case Yf:o=9;break e;case kl:o=11;break e;case Cl:o=14;break e;case kt:o=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=Be(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ln(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function Yi(e,t,n,r){return e=Be(22,e,r,t),e.elementType=Zf,e.lanes=n,e.stateNode={isHidden:!1},e}function Oo(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function Io(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lv(e,t,n,r,s){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=xo(0),this.expirationTimes=xo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xo(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function iu(e,t,n,r,s,i,o,a,l){return e=new lv(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Be(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zl(i),e}function uv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Sn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function zp(e){if(!e)return Bt;e=e._reactInternals;e:{if(gn(e)!==e||e.tag!==1)throw Error(T(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(T(171))}if(e.tag===1){var n=e.type;if(Pe(n))return zh(e,n,t)}return t}function $p(e,t,n,r,s,i,o,a,l){return e=iu(n,r,!0,e,s,i,o,a,l),e.context=zp(null),n=e.current,r=xe(),s=_t(n),i=ct(r,s),i.callback=t??null,Ft(n,i,s),e.current.lanes=s,ls(e,s,r),Te(e,r),e}function Zi(e,t,n,r){var s=t.current,i=xe(),o=_t(s);return n=zp(n),t.context===null?t.context=n:t.pendingContext=n,t=ct(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ft(s,t,o),e!==null&&(Ye(e,s,o,i),Ys(e,s,o)),o}function Ni(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 qc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ou(e,t){qc(e,t),(e=e.alternate)&&qc(e,t)}function cv(){return null}var Wp=typeof reportError=="function"?reportError:function(e){console.error(e)};function au(e){this._internalRoot=e}Ji.prototype.render=au.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));Zi(e,t,null,null)};Ji.prototype.unmount=au.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pn(function(){Zi(null,e,null,null)}),t[pt]=null}};function Ji(e){this._internalRoot=e}Ji.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&t!==0&&t<Pt[n].priority;n++);Pt.splice(n,0,e),n===0&&kh(e)}};function lu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function qi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ed(){}function dv(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Ni(o);i.call(u)}}var o=$p(t,r,e,0,null,!1,!1,"",ed);return e._reactRootContainer=o,e[pt]=o.current,Kr(e.nodeType===8?e.parentNode:e),pn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Ni(l);a.call(u)}}var l=iu(e,0,!1,null,null,!1,!1,"",ed);return e._reactRootContainer=l,e[pt]=l.current,Kr(e.nodeType===8?e.parentNode:e),pn(function(){Zi(t,l,n,r)}),l}function eo(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Ni(o);a.call(l)}}Zi(t,o,e,s)}else o=dv(n,t,e,s,r);return Ni(o)}xh=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=vr(t.pendingLanes);n!==0&&(El(t,n|1),Te(t,q()),!(_&6)&&(Yn=q()+500,Kt()))}break;case 13:pn(function(){var r=mt(e,1);if(r!==null){var s=xe();Ye(r,e,1,s)}}),ou(e,1)}};jl=function(e){if(e.tag===13){var t=mt(e,134217728);if(t!==null){var n=xe();Ye(t,e,134217728,n)}ou(e,134217728)}};wh=function(e){if(e.tag===13){var t=_t(e),n=mt(e,t);if(n!==null){var r=xe();Ye(n,e,t,r)}ou(e,t)}};Sh=function(){return V};bh=function(e,t){var n=V;try{return V=e,t()}finally{V=n}};ma=function(e,t,n){switch(t){case"input":if(la(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 s=Wi(r);if(!s)throw Error(T(90));qf(r),la(r,s)}}}break;case"textarea":th(e,n);break;case"select":t=n.value,t!=null&&On(e,!!n.multiple,t,!1)}};lh=tu;uh=pn;var fv={usingClientEntryPoint:!1,Events:[cs,Tn,Wi,oh,ah,tu]},pr={findFiberByHostInstance:nn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hv={bundleType:pr.bundleType,version:pr.version,rendererPackageName:pr.rendererPackageName,rendererConfig:pr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fh(e),e===null?null:e.stateNode},findFiberByHostInstance:pr.findFiberByHostInstance||cv,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 Bs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bs.isDisabled&&Bs.supportsFiber)try{Bi=Bs.inject(hv),nt=Bs}catch{}}De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fv;De.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!lu(t))throw Error(T(200));return uv(e,t,null,n)};De.createRoot=function(e,t){if(!lu(e))throw Error(T(299));var n=!1,r="",s=Wp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=iu(e,1,!1,null,null,n,!1,r,s),e[pt]=t.current,Kr(e.nodeType===8?e.parentNode:e),new au(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(T(188)):(e=Object.keys(e).join(","),Error(T(268,e)));return e=fh(t),e=e===null?null:e.stateNode,e};De.flushSync=function(e){return pn(e)};De.hydrate=function(e,t,n){if(!qi(t))throw Error(T(200));return eo(null,e,t,!0,n)};De.hydrateRoot=function(e,t,n){if(!lu(e))throw Error(T(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Wp;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=$p(t,null,e,1,n??null,s,!1,i,o),e[pt]=t.current,Kr(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Ji(t)};De.render=function(e,t,n){if(!qi(t))throw Error(T(200));return eo(null,e,t,!1,n)};De.unmountComponentAtNode=function(e){if(!qi(e))throw Error(T(40));return e._reactRootContainer?(pn(function(){eo(null,null,e,!1,function(){e._reactRootContainer=null,e[pt]=null})}),!0):!1};De.unstable_batchedUpdates=tu;De.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qi(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return eo(e,t,n,!1,r)};De.version="18.3.1-next-f1338f8080-20240426";function Kp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kp)}catch(e){console.error(e)}}Kp(),Kf.exports=De;var pv=Kf.exports,td=pv;ta.createRoot=td.createRoot,ta.hydrateRoot=td.hydrateRoot;/**
* @remix-run/router v1.23.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function es(){return es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},es.apply(this,arguments)}var Nt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Nt||(Nt={}));const nd="popstate";function mv(e){e===void 0&&(e={});function t(s,i){let{pathname:o="/",search:a="",hash:l=""}=yn(s.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),Xa("",{pathname:o,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(s,i){let o=s.document.querySelector("base"),a="";if(o&&o.getAttribute("href")){let l=s.location.href,u=l.indexOf("#");a=u===-1?l:l.slice(0,u)}return a+"#"+(typeof i=="string"?i:Ai(i))}function r(s,i){to(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(i)+")")}return yv(t,n,r,e)}function Y(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function to(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gv(){return Math.random().toString(36).substr(2,8)}function rd(e,t){return{usr:e.state,key:e.key,idx:t}}function Xa(e,t,n,r){return n===void 0&&(n=null),es({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?yn(t):t,{state:n,key:t&&t.key||r||gv()})}function Ai(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function yn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function yv(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Nt.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(es({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=Nt.Pop;let S=c(),m=S==null?null:S-u;u=S,l&&l({action:a,location:w.location,delta:m})}function h(S,m){a=Nt.Push;let p=Xa(w.location,S,m);n&&n(p,S),u=c()+1;let y=rd(p,u),b=w.createHref(p);try{o.pushState(y,"",b)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(b)}i&&l&&l({action:a,location:w.location,delta:1})}function g(S,m){a=Nt.Replace;let p=Xa(w.location,S,m);n&&n(p,S),u=c();let y=rd(p,u),b=w.createHref(p);o.replaceState(y,"",b),i&&l&&l({action:a,location:w.location,delta:0})}function v(S){let m=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof S=="string"?S:Ai(S);return p=p.replace(/ $/,"%20"),Y(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let w={get action(){return a},get location(){return e(s,o)},listen(S){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(nd,f),l=S,()=>{s.removeEventListener(nd,f),l=null}},createHref(S){return t(s,S)},createURL:v,encodeLocation(S){let m=v(S);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:g,go(S){return o.go(S)}};return w}var sd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sd||(sd={}));function vv(e,t,n){return n===void 0&&(n="/"),xv(e,t,n)}function xv(e,t,n,r){let s=typeof t=="string"?yn(t):t,i=Zn(s.pathname||"/",n);if(i==null)return null;let o=Hp(e);wv(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=Rv(i);a=Nv(o[l],u)}return a}function Hp(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Y(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Ot([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(Y(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Hp(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Ev(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Gp(i.path))s(i,o,l)}),t}function Gp(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Gp(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function wv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Sv=/^:[\w-]+$/,bv=3,kv=2,Cv=1,Pv=10,Tv=-2,id=e=>e==="*";function Ev(e,t){let n=e.split("/"),r=n.length;return n.some(id)&&(r+=Tv),t&&(r+=kv),n.filter(s=>!id(s)).reduce((s,i)=>s+(Sv.test(i)?bv:i===""?Cv:Pv),r)}function jv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Nv(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=Qa({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!f)return null;Object.assign(s,f.params),o.push({params:s,pathname:Ot([i,f.pathname]),pathnameBase:_v(Ot([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Ot([i,f.pathnameBase]))}return o}function Qa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Av(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,c,f)=>{let{paramName:h,isOptional:g}=c;if(h==="*"){let w=a[f]||"";o=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const v=a[f];return g&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Av(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),to(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function Rv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return to(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Zn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Lv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dv=e=>Lv.test(e);function Fv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?yn(e):e,i;if(n)if(Dv(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),to(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=od(n.substring(1),"/"):i=od(n,t)}else i=t;return{pathname:i,search:Vv(r),hash:Ov(s)}}function od(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Bo(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Mv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Xp(e,t){let n=Mv(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Qp(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=yn(e):(s=es({},e),Y(!s.pathname||!s.pathname.includes("?"),Bo("?","pathname","search",s)),Y(!s.pathname||!s.pathname.includes("#"),Bo("#","pathname","hash",s)),Y(!s.search||!s.search.includes("#"),Bo("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=Fv(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Ot=e=>e.join("/").replace(/\/\/+/g,"/"),_v=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ov=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Iv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Yp=["post","put","patch","delete"];new Set(Yp);const Bv=["get",...Yp];new Set(Bv);/**
* React Router v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function ts(){return ts=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ts.apply(this,arguments)}const no=x.createContext(null),Zp=x.createContext(null),Ht=x.createContext(null),ro=x.createContext(null),vn=x.createContext({outlet:null,matches:[],isDataRoute:!1}),Jp=x.createContext(null);function Uv(e,t){let{relative:n}=t===void 0?{}:t;fs()||Y(!1);let{basename:r,navigator:s}=x.useContext(Ht),{hash:i,pathname:o,search:a}=so(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Ot([r,o])),s.createHref({pathname:l,search:a,hash:i})}function fs(){return x.useContext(ro)!=null}function hs(){return fs()||Y(!1),x.useContext(ro).location}function qp(e){x.useContext(Ht).static||x.useLayoutEffect(e)}function zv(){let{isDataRoute:e}=x.useContext(vn);return e?tx():$v()}function $v(){fs()||Y(!1);let e=x.useContext(no),{basename:t,future:n,navigator:r}=x.useContext(Ht),{matches:s}=x.useContext(vn),{pathname:i}=hs(),o=JSON.stringify(Xp(s,n.v7_relativeSplatPath)),a=x.useRef(!1);return qp(()=>{a.current=!0}),x.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=Qp(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ot([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,i,e])}function so(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Ht),{matches:s}=x.useContext(vn),{pathname:i}=hs(),o=JSON.stringify(Xp(s,r.v7_relativeSplatPath));return x.useMemo(()=>Qp(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Wv(e,t){return Kv(e,t)}function Kv(e,t,n,r){fs()||Y(!1);let{navigator:s}=x.useContext(Ht),{matches:i}=x.useContext(vn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=hs(),c;if(t){var f;let S=typeof t=="string"?yn(t):t;l==="/"||(f=S.pathname)!=null&&f.startsWith(l)||Y(!1),c=S}else c=u;let h=c.pathname||"/",g=h;if(l!=="/"){let S=l.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(S.length).join("/")}let v=vv(e,{pathname:g}),w=Yv(v&&v.map(S=>Object.assign({},S,{params:Object.assign({},a,S.params),pathname:Ot([l,s.encodeLocation?s.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?l:Ot([l,s.encodeLocation?s.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),i,n,r);return t&&w?x.createElement(ro.Provider,{value:{location:ts({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Nt.Pop}},w):w}function Hv(){let e=ex(),t=Iv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:s},n):null,null)}const Gv=x.createElement(Hv,null);class Xv extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(vn.Provider,{value:this.props.routeContext},x.createElement(Jp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Qv(e){let{routeContext:t,match:n,children:r}=e,s=x.useContext(no);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(vn.Provider,{value:t},r)}function Yv(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||Y(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<o.length;c++){let f=o[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:h,errors:g}=n,v=f.route.loader&&h[f.route.id]===void 0&&(!g||g[f.route.id]===void 0);if(f.route.lazy||v){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let g,v=!1,w=null,S=null;n&&(g=a&&f.route.id?a[f.route.id]:void 0,w=f.route.errorElement||Gv,l&&(u<0&&h===0?(nx("route-fallback"),v=!0,S=null):u===h&&(v=!0,S=f.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,h+1)),p=()=>{let y;return g?y=w:v?y=S:f.route.Component?y=x.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=c,x.createElement(Qv,{match:f,routeContext:{outlet:c,matches:m,isDataRoute:n!=null},children:y})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?x.createElement(Xv,{location:n.location,revalidation:n.revalidation,component:w,error:g,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}var em=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(em||{}),tm=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(tm||{});function Zv(e){let t=x.useContext(no);return t||Y(!1),t}function Jv(e){let t=x.useContext(Zp);return t||Y(!1),t}function qv(e){let t=x.useContext(vn);return t||Y(!1),t}function nm(e){let t=qv(),n=t.matches[t.matches.length-1];return n.route.id||Y(!1),n.route.id}function ex(){var e;let t=x.useContext(Jp),n=Jv(),r=nm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function tx(){let{router:e}=Zv(em.UseNavigateStable),t=nm(tm.UseNavigateStable),n=x.useRef(!1);return qp(()=>{n.current=!0}),x.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ts({fromRouteId:t},i)))},[e,t])}const ad={};function nx(e,t,n){ad[e]||(ad[e]=!0)}function rx(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function _e(e){Y(!1)}function sx(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Nt.Pop,navigator:i,static:o=!1,future:a}=e;fs()&&Y(!1);let l=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:l,navigator:i,static:o,future:ts({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=yn(r));let{pathname:c="/",search:f="",hash:h="",state:g=null,key:v="default"}=r,w=x.useMemo(()=>{let S=Zn(c,l);return S==null?null:{location:{pathname:S,search:f,hash:h,state:g,key:v},navigationType:s}},[l,c,f,h,g,v,s]);return w==null?null:x.createElement(Ht.Provider,{value:u},x.createElement(ro.Provider,{children:n,value:w}))}function ix(e){let{children:t,location:n}=e;return Wv(Ya(t),n)}new Promise(()=>{});function Ya(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,s)=>{if(!x.isValidElement(r))return;let i=[...t,s];if(r.type===x.Fragment){n.push.apply(n,Ya(r.props.children,i));return}r.type!==_e&&Y(!1),!r.props.index||!r.props.children||Y(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ya(r.props.children,i)),n.push(o)}),n}/**
* React Router DOM v6.30.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ri(){return Ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ri.apply(this,arguments)}function rm(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function ox(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ax(e,t){return e.button===0&&(!t||t==="_self")&&!ox(e)}const lx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ux=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],cx="6";try{window.__reactRouterVersion=cx}catch{}const dx=x.createContext({isTransitioning:!1}),fx="startTransition",ld=r0[fx];function hx(e){let{basename:t,children:n,future:r,window:s}=e,i=x.useRef();i.current==null&&(i.current=mv({window:s,v5Compat:!0}));let o=i.current,[a,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=x.useCallback(f=>{u&&ld?ld(()=>l(f)):l(f)},[l,u]);return x.useLayoutEffect(()=>o.listen(c),[o,c]),x.useEffect(()=>rx(r),[r]),x.createElement(sx,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const px=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sm=x.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,h=rm(t,lx),{basename:g}=x.useContext(Ht),v,w=!1;if(typeof u=="string"&&mx.test(u)&&(v=u,px))try{let y=new URL(window.location.href),b=u.startsWith("//")?new URL(y.protocol+u):new URL(u),k=Zn(b.pathname,g);b.origin===y.origin&&k!=null?u=k+b.search+b.hash:w=!0}catch{}let S=Uv(u,{relative:s}),m=vx(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:f});function p(y){r&&r(y),y.defaultPrevented||m(y)}return x.createElement("a",Ri({},h,{href:v||S,onClick:w||i?r:p,ref:n,target:l}))}),gx=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,viewTransition:u,children:c}=t,f=rm(t,ux),h=so(l,{relative:f.relative}),g=hs(),v=x.useContext(Zp),{navigator:w,basename:S}=x.useContext(Ht),m=v!=null&&xx(h)&&u===!0,p=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,y=g.pathname,b=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;s||(y=y.toLowerCase(),b=b?b.toLowerCase():null,p=p.toLowerCase()),b&&S&&(b=Zn(b,S)||b);const k=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let C=y===p||!o&&y.startsWith(p)&&y.charAt(k)==="/",E=b!=null&&(b===p||!o&&b.startsWith(p)&&b.charAt(p.length)==="/"),P={isActive:C,isPending:E,isTransitioning:m},F=C?r:void 0,A;typeof i=="function"?A=i(P):A=[i,C?"active":null,E?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let ee=typeof a=="function"?a(P):a;return x.createElement(sm,Ri({},f,{"aria-current":F,className:A,ref:n,style:ee,to:l,viewTransition:u}),typeof c=="function"?c(P):c)});var Za;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Za||(Za={}));var ud;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ud||(ud={}));function yx(e){let t=x.useContext(no);return t||Y(!1),t}function vx(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=zv(),u=hs(),c=so(e,{relative:o});return x.useCallback(f=>{if(ax(f,n)){f.preventDefault();let h=r!==void 0?r:Ai(u)===Ai(c);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,r,s,n,e,i,o,a])}function xx(e,t){t===void 0&&(t={});let n=x.useContext(dx);n==null&&Y(!1);let{basename:r}=yx(Za.useViewTransitionState),s=so(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Zn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Zn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Qa(s.pathname,o)!=null||Qa(s.pathname,i)!=null}const uu=x.createContext({});function cu(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const io=x.createContext(null),du=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class wx extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Sx({children:e,isPresent:t}){const n=x.useId(),r=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=x.useContext(du);return x.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:u}=s.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${a}px !important;
top: ${l}px !important;
left: ${u}px !important;
}
`),()=>{document.head.removeChild(c)}},[t]),d.jsx(wx,{isPresent:t,childRef:r,sizeRef:s,children:x.cloneElement(e,{ref:r})})}const bx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=cu(kx),l=x.useId(),u=x.useCallback(f=>{a.set(f,!0);for(const h of a.values())if(!h)return;r&&r()},[a,r]),c=x.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:u,register:f=>(a.set(f,!1),()=>a.delete(f))}),i?[Math.random(),u]:[n,u]);return x.useMemo(()=>{a.forEach((f,h)=>a.set(h,!1))},[n]),x.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=d.jsx(Sx,{isPresent:n,children:e})),d.jsx(io.Provider,{value:c,children:e})};function kx(){return new Map}function im(e=!0){const t=x.useContext(io);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=x.useId();x.useEffect(()=>{e&&s(i)},[e]);const o=x.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Us=e=>e.key||"";function cd(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const fu=typeof window<"u",om=fu?x.useLayoutEffect:x.useEffect,am=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1})=>{const[a,l]=im(o),u=x.useMemo(()=>cd(e),[e]),c=o&&!a?[]:u.map(Us),f=x.useRef(!0),h=x.useRef(u),g=cu(()=>new Map),[v,w]=x.useState(u),[S,m]=x.useState(u);om(()=>{f.current=!1,h.current=u;for(let b=0;b<S.length;b++){const k=Us(S[b]);c.includes(k)?g.delete(k):g.get(k)!==!0&&g.set(k,!1)}},[S,c.length,c.join("-")]);const p=[];if(u!==v){let b=[...u];for(let k=0;k<S.length;k++){const C=S[k],E=Us(C);c.includes(E)||(b.splice(k,0,C),p.push(C))}i==="wait"&&p.length&&(b=p),m(cd(b)),w(u);return}const{forceRender:y}=x.useContext(uu);return d.jsx(d.Fragment,{children:S.map(b=>{const k=Us(b),C=o&&!a?!1:u===S||c.includes(k),E=()=>{if(g.has(k))g.set(k,!0);else return;let P=!0;g.forEach(F=>{F||(P=!1)}),P&&(y==null||y(),m(h.current),o&&(l==null||l()),r&&r())};return d.jsx(bx,{isPresent:C,initial:!f.current||n?void 0:!1,custom:C?void 0:t,presenceAffectsLayout:s,mode:i,onExitComplete:C?void 0:E,children:b},k)})})},Ae=e=>e;let lm=Ae;function hu(e){let t;return()=>(t===void 0&&(t=e()),t)}const Jn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},dt=e=>e*1e3,ft=e=>e/1e3,Cx={useManualTiming:!1};function Px(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){i.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,f=!1)=>{const g=f&&r?t:n;return c&&i.add(u),g.has(u)||g.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(o=u,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,s&&(s=!1,l.process(u))}};return l}const zs=["read","resolveKeyframes","update","preRender","render","postRender"],Tx=40;function um(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=zs.reduce((m,p)=>(m[p]=Px(i),m),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:h}=o,g=()=>{const m=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(m-s.timestamp,Tx),1),s.timestamp=m,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),f.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},v=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:zs.reduce((m,p)=>{const y=o[p];return m[p]=(b,k=!1,C=!1)=>(n||v(),y.schedule(b,k,C)),m},{}),cancel:m=>{for(let p=0;p<zs.length;p++)o[zs[p]].cancel(m)},state:s,steps:o}}const{schedule:z,cancel:Ut,state:ue,steps:Uo}=um(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ae,!0),cm=x.createContext({strict:!1}),dd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},qn={};for(const e in dd)qn[e]={isEnabled:t=>dd[e].some(n=>!!t[n])};function Ex(e){for(const t in e)qn[t]={...qn[t],...e[t]}}const jx=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Li(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jx.has(e)}let dm=e=>!Li(e);function Nx(e){e&&(dm=t=>t.startsWith("on")?!Li(t):e(t))}try{Nx(require("@emotion/is-prop-valid").default)}catch{}function Ax(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(dm(s)||n===!0&&Li(s)||!t&&!Li(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Rx(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const oo=x.createContext({});function ns(e){return typeof e=="string"||Array.isArray(e)}function ao(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const pu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mu=["initial",...pu];function lo(e){return ao(e.animate)||mu.some(t=>ns(e[t]))}function fm(e){return!!(lo(e)||e.variants)}function Lx(e,t){if(lo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ns(n)?n:void 0,animate:ns(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dx(e){const{initial:t,animate:n}=Lx(e,x.useContext(oo));return x.useMemo(()=>({initial:t,animate:n}),[fd(t),fd(n)])}function fd(e){return Array.isArray(e)?e.join(" "):e}const Fx=Symbol.for("motionComponentSymbol");function Dn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Mx(e,t,n){return x.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Dn(n)&&(n.current=r))},[t])}const gu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_x="framerAppearId",hm="data-"+gu(_x),{schedule:yu}=um(queueMicrotask,!1),pm=x.createContext({});function Vx(e,t,n,r,s){var i,o;const{visualElement:a}=x.useContext(oo),l=x.useContext(cm),u=x.useContext(io),c=x.useContext(du).reducedMotion,f=x.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const h=f.current,g=x.useContext(pm);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&Ox(f.current,n,s,g);const v=x.useRef(!1);x.useInsertionEffect(()=>{h&&v.current&&h.update(n,u)});const w=n[hm],S=x.useRef(!!w&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,w))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,w)));return om(()=>{h&&(v.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),yu.render(h.render),S.current&&h.animationState&&h.animationState.animateChanges())}),x.useEffect(()=>{h&&(!S.current&&h.animationState&&h.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,w)}),S.current=!1))}),h}function Ox(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:mm(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Dn(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function mm(e){if(e)return e.options.allowProjection!==!1?e.projection:mm(e.parent)}function Ix({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&Ex(e);function a(u,c){let f;const h={...x.useContext(du),...u,layoutId:Bx(u)},{isStatic:g}=h,v=Dx(u),w=r(u,g);if(!g&&fu){Ux();const S=zx(h);f=S.MeasureLayout,v.visualElement=Vx(s,w,h,t,S.ProjectionNode)}return d.jsxs(oo.Provider,{value:v,children:[f&&v.visualElement?d.jsx(f,{visualElement:v.visualElement,...h}):null,n(s,u,Mx(w,v.visualElement,c),w,g,v.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const l=x.forwardRef(a);return l[Fx]=s,l}function Bx({layoutId:e}){const t=x.useContext(uu).id;return t&&e!==void 0?t+"-"+e:e}function Ux(e,t){x.useContext(cm).strict}function zx(e){const{drag:t,layout:n}=qn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const $x=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vu(e){return typeof e!="string"||e.includes("-")?!1:!!($x.indexOf(e)>-1||/[A-Z]/u.test(e))}function hd(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function xu(e,t,n,r){if(typeof t=="function"){const[s,i]=hd(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=hd(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const Ja=e=>Array.isArray(e),Wx=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Kx=e=>Ja(e)?e[e.length-1]||0:e,ge=e=>!!(e&&e.getVelocity);function ri(e){const t=ge(e)?e.get():e;return Wx(t)?t.toValue():t}function Hx({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:Gx(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const gm=e=>(t,n)=>{const r=x.useContext(oo),s=x.useContext(io),i=()=>Hx(e,t,r,s);return n?i():cu(i)};function Gx(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=ri(i[h]);let{initial:o,animate:a}=e;const l=lo(e),u=fm(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!ao(f)){const h=Array.isArray(f)?f:[f];for(let g=0;g<h.length;g++){const v=xu(e,h[g]);if(v){const{transitionEnd:w,transition:S,...m}=v;for(const p in m){let y=m[p];if(Array.isArray(y)){const b=c?y.length-1:0;y=y[b]}y!==null&&(s[p]=y)}for(const p in w)s[p]=w[p]}}}return s}const sr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xn=new Set(sr),ym=e=>t=>typeof t=="string"&&t.startsWith(e),vm=ym("--"),Xx=ym("var(--"),wu=e=>Xx(e)?Qx.test(e.split("/*")[0].trim()):!1,Qx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,yt=(e,t,n)=>n>t?t:n<e?e:n,ir={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},rs={...ir,transform:e=>yt(0,1,e)},$s={...ir,default:1},ps=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bt=ps("deg"),st=ps("%"),R=ps("px"),Yx=ps("vh"),Zx=ps("vw"),pd={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},Jx={borderWidth:R,borderTopWidth:R,borderRightWidth:R,borderBottomWidth:R,borderLeftWidth:R,borderRadius:R,radius:R,borderTopLeftRadius:R,borderTopRightRadius:R,borderBottomRightRadius:R,borderBottomLeftRadius:R,width:R,maxWidth:R,height:R,maxHeight:R,top:R,right:R,bottom:R,left:R,padding:R,paddingTop:R,paddingRight:R,paddingBottom:R,paddingLeft:R,margin:R,marginTop:R,marginRight:R,marginBottom:R,marginLeft:R,backgroundPositionX:R,backgroundPositionY:R},qx={rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:$s,scaleX:$s,scaleY:$s,scaleZ:$s,skew:bt,skewX:bt,skewY:bt,distance:R,translateX:R,translateY:R,translateZ:R,x:R,y:R,z:R,perspective:R,transformPerspective:R,opacity:rs,originX:pd,originY:pd,originZ:R},md={...ir,transform:Math.round},Su={...Jx,...qx,zIndex:md,size:R,fillOpacity:rs,strokeOpacity:rs,numOctaves:md},e1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},t1=sr.length;function n1(e,t,n){let r="",s=!0;for(let i=0;i<t1;i++){const o=sr[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=xm(a,Su[o]);if(!l){s=!1;const c=e1[o]||o;r+=`${c}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function bu(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(xn.has(l)){o=!0;continue}else if(vm(l)){s[l]=u;continue}else{const c=xm(u,Su[l]);l.startsWith("origin")?(a=!0,i[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=n1(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;r.transformOrigin=`${l} ${u} ${c}`}}const r1={offset:"stroke-dashoffset",array:"stroke-dasharray"},s1={offset:"strokeDashoffset",array:"strokeDasharray"};function i1(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?r1:s1;e[i.offset]=R.transform(-r);const o=R.transform(t),a=R.transform(n);e[i.array]=`${o} ${a}`}function gd(e,t,n){return typeof e=="string"?e:R.transform(t+n*e)}function o1(e,t,n){const r=gd(t,e.x,e.width),s=gd(n,e.y,e.height);return`${r} ${s}`}function ku(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,f){if(bu(e,u,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:g,dimensions:v}=e;h.transform&&(v&&(g.transform=h.transform),delete h.transform),v&&(s!==void 0||i!==void 0||g.transform)&&(g.transformOrigin=o1(v,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&i1(h,o,a,l,!1)}const Cu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),wm=()=>({...Cu(),attrs:{}}),Pu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Sm(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const bm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function km(e,t,n,r){Sm(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(bm.has(s)?s:gu(s),t.attrs[s])}const Di={};function a1(e){Object.assign(Di,e)}function Cm(e,{layout:t,layoutId:n}){return xn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Di[e]||e==="opacity")}function Tu(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(ge(s[o])||t.style&&ge(t.style[o])||Cm(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function Pm(e,t,n){const r=Tu(e,t,n);for(const s in e)if(ge(e[s])||ge(t[s])){const i=sr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function l1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const yd=["x","y","width","height","cx","cy","r"],u1={useVisualState:gm({scrapeMotionValuesFromProps:Pm,createRenderState:wm,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const a in s)if(xn.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a<yd.length;a++){const l=yd[a];e[l]!==t[l]&&(o=!0)}o&&z.read(()=>{l1(n,r),z.render(()=>{ku(r,s,Pu(n.tagName),e.transformTemplate),km(n,r)})})}})},c1={useVisualState:gm({scrapeMotionValuesFromProps:Tu,createRenderState:Cu})};function Tm(e,t,n){for(const r in t)!ge(t[r])&&!Cm(r,n)&&(e[r]=t[r])}function d1({transformTemplate:e},t){return x.useMemo(()=>{const n=Cu();return bu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function f1(e,t){const n=e.style||{},r={};return Tm(r,n,e),Object.assign(r,d1(e,t)),r}function h1(e,t){const n={},r=f1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function p1(e,t,n,r){const s=x.useMemo(()=>{const i=wm();return ku(i,t,Pu(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Tm(i,e.style,e),s.style={...i,...s.style}}return s}function m1(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(vu(n)?p1:h1)(r,i,o,n),u=Ax(r,typeof n=="string",e),c=n!==x.Fragment?{...u,...l,ref:s}:{},{children:f}=r,h=x.useMemo(()=>ge(f)?f.get():f,[f]);return x.createElement(n,{...c,children:h})}}function g1(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...vu(r)?u1:c1,preloadedFeatures:e,useRender:m1(s),createVisualElement:t,Component:r};return Ix(o)}}function Em(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function uo(e,t,n){const r=e.getProps();return xu(r,t,n!==void 0?n:r.custom,e)}const y1=hu(()=>window.ScrollTimeline!==void 0);class v1{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(y1()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class x1 extends v1{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Eu(e,t){return e?e[t]||e.default||e:void 0}const qa=2e4;function jm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<qa;)t+=n,r=e.next(t);return t>=qa?1/0:t}function ju(e){return typeof e=="function"}function vd(e,t){e.timeline=t,e.onfinish=null}const Nu=e=>Array.isArray(e)&&typeof e[0]=="number",w1={linearEasing:void 0};function S1(e,t){const n=hu(e);return()=>{var r;return(r=w1[t])!==null&&r!==void 0?r:n()}}const Fi=S1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nm=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(Jn(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Am(e){return!!(typeof e=="function"&&Fi()||!e||typeof e=="string"&&(e in el||Fi())||Nu(e)||Array.isArray(e)&&e.every(Am))}const wr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,el={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wr([0,.65,.55,1]),circOut:wr([.55,0,1,.45]),backIn:wr([.31,.01,.66,-.59]),backOut:wr([.33,1.53,.69,.99])};function Rm(e,t){if(e)return typeof e=="function"&&Fi()?Nm(e,t):Nu(e)?wr(e):Array.isArray(e)?e.map(n=>Rm(n,t)||el.easeOut):el[e]}const Ke={x:!1,y:!1};function Lm(){return Ke.x||Ke.y}function b1(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Dm(e,t){const n=b1(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function xd(e){return t=>{t.pointerType==="touch"||Lm()||e(t)}}function k1(e,t,n={}){const[r,s,i]=Dm(e,n),o=xd(a=>{const{target:l}=a,u=t(a);if(typeof u!="function"||!l)return;const c=xd(f=>{u(f),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,s)});return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const Fm=(e,t)=>t?e===t?!0:Fm(e,t.parentElement):!1,Au=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,C1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function P1(e){return C1.has(e.tagName)||e.tabIndex!==-1}const Sr=new WeakSet;function wd(e){return t=>{t.key==="Enter"&&e(t)}}function zo(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const T1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=wd(()=>{if(Sr.has(n))return;zo(n,"down");const s=wd(()=>{zo(n,"up")}),i=()=>zo(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Sd(e){return Au(e)&&!Lm()}function E1(e,t,n={}){const[r,s,i]=Dm(e,n),o=a=>{const l=a.currentTarget;if(!Sd(a)||Sr.has(l))return;Sr.add(l);const u=t(a),c=(g,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!Sd(g)||!Sr.has(l))&&(Sr.delete(l),typeof u=="function"&&u(g,{success:v}))},f=g=>{c(g,n.useGlobalTarget||Fm(l,g.target))},h=g=>{c(g,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{!P1(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",u=>T1(u,s),s)}),i}function j1(e){return e==="x"||e==="y"?Ke[e]?null:(Ke[e]=!0,()=>{Ke[e]=!1}):Ke.x||Ke.y?null:(Ke.x=Ke.y=!0,()=>{Ke.x=Ke.y=!1})}const Mm=new Set(["width","height","top","left","right","bottom",...sr]);let si;function N1(){si=void 0}const it={now:()=>(si===void 0&&it.set(ue.isProcessing||Cx.useManualTiming?ue.timestamp:performance.now()),si),set:e=>{si=e,queueMicrotask(N1)}};function Ru(e,t){e.indexOf(t)===-1&&e.push(t)}function Lu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Du{constructor(){this.subscriptions=[]}add(t){return Ru(this.subscriptions,t),()=>Lu(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function _m(e,t){return t?e*(1e3/t):0}const bd=30,A1=e=>!isNaN(parseFloat(e));class R1{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=it.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=it.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=A1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Du);const r=this.events[t].add(n);return t==="change"?()=>{r(),z.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=it.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bd);return _m(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ss(e,t){return new R1(e,t)}function L1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ss(n))}function D1(e,t){const n=uo(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=Kx(i[o]);L1(e,o,a)}}function F1(e){return!!(ge(e)&&e.add)}function tl(e,t){const n=e.getValue("willChange");if(F1(n))return n.add(t)}function Vm(e){return e.props[hm]}const Om=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,M1=1e-7,_1=12;function V1(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=Om(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>M1&&++a<_1);return o}function ms(e,t,n,r){if(e===t&&n===r)return Ae;const s=i=>V1(i,0,1,e,n);return i=>i===0||i===1?i:Om(s(i),t,r)}const Im=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bm=e=>t=>1-e(1-t),Um=ms(.33,1.53,.69,.99),Fu=Bm(Um),zm=Im(Fu),$m=e=>(e*=2)<1?.5*Fu(e):.5*(2-Math.pow(2,-10*(e-1))),Mu=e=>1-Math.sin(Math.acos(e)),Wm=Bm(Mu),Km=Im(Mu),Hm=e=>/^0[^.\s]+$/u.test(e);function O1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Hm(e):!0}const Dr=e=>Math.round(e*1e5)/1e5,_u=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function I1(e){return e==null}const B1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vu=(e,t)=>n=>!!(typeof n=="string"&&B1.test(n)&&n.startsWith(e)||t&&!I1(n)&&Object.prototype.hasOwnProperty.call(n,t)),Gm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(_u);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},U1=e=>yt(0,255,e),$o={...ir,transform:e=>Math.round(U1(e))},on={test:Vu("rgb","red"),parse:Gm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$o.transform(e)+", "+$o.transform(t)+", "+$o.transform(n)+", "+Dr(rs.transform(r))+")"};function z1(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const nl={test:Vu("#"),parse:z1,transform:on.transform},Fn={test:Vu("hsl","hue"),parse:Gm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+st.transform(Dr(t))+", "+st.transform(Dr(n))+", "+Dr(rs.transform(r))+")"},pe={test:e=>on.test(e)||nl.test(e)||Fn.test(e),parse:e=>on.test(e)?on.parse(e):Fn.test(e)?Fn.parse(e):nl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?on.transform(e):Fn.transform(e)},$1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function W1(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(_u))===null||t===void 0?void 0:t.length)||0)+(((n=e.match($1))===null||n===void 0?void 0:n.length)||0)>0}const Xm="number",Qm="color",K1="var",H1="var(",kd="${}",G1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function is(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(G1,l=>(pe.test(l)?(r.color.push(i),s.push(Qm),n.push(pe.parse(l))):l.startsWith(H1)?(r.var.push(i),s.push(K1),n.push(l)):(r.number.push(i),s.push(Xm),n.push(parseFloat(l))),++i,kd)).split(kd);return{values:n,split:a,indexes:r,types:s}}function Ym(e){return is(e).values}function Zm(e){const{split:t,types:n}=is(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const a=n[o];a===Xm?i+=Dr(s[o]):a===Qm?i+=pe.transform(s[o]):i+=s[o]}return i}}const X1=e=>typeof e=="number"?0:e;function Q1(e){const t=Ym(e);return Zm(e)(t.map(X1))}const zt={test:W1,parse:Ym,createTransformer:Zm,getAnimatableNone:Q1},Y1=new Set(["brightness","contrast","saturate","opacity"]);function Z1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(_u)||[];if(!r)return e;const s=n.replace(r,"");let i=Y1.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const J1=/\b([a-z-]*)\(.*?\)/gu,rl={...zt,getAnimatableNone:e=>{const t=e.match(J1);return t?t.map(Z1).join(" "):e}},q1={...Su,color:pe,backgroundColor:pe,outlineColor:pe,fill:pe,stroke:pe,borderColor:pe,borderTopColor:pe,borderRightColor:pe,borderBottomColor:pe,borderLeftColor:pe,filter:rl,WebkitFilter:rl},Ou=e=>q1[e];function Jm(e,t){let n=Ou(e);return n!==rl&&(n=zt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ew=new Set(["auto","none","0"]);function tw(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!ew.has(i)&&is(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=Jm(n,s)}const Cd=e=>e===ir||e===R,Pd=(e,t)=>parseFloat(e.split(", ")[t]),Td=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Pd(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Pd(i[1],e):0}},nw=new Set(["x","y","z"]),rw=sr.filter(e=>!nw.has(e));function sw(e){const t=[];return rw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const er={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Td(4,13),y:Td(5,14)};er.translateX=er.x;er.translateY=er.y;const un=new Set;let sl=!1,il=!1;function qm(){if(il){const e=Array.from(un).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=sw(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}il=!1,sl=!1,un.forEach(e=>e.complete()),un.clear()}function eg(){un.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(il=!0)})}function iw(){eg(),qm()}class Iu{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(un.add(this),sl||(sl=!0,z.read(eg),z.resolveKeyframes(qm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=s==null?void 0:s.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&o===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),un.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,un.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const tg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ow=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function aw(e){const t=ow.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function ng(e,t,n=1){const[r,s]=aw(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return tg(o)?parseFloat(o):o}return wu(s)?ng(s,t,n+1):s}const rg=e=>t=>t.test(e),lw={test:e=>e==="auto",parse:e=>e},sg=[ir,R,st,bt,Zx,Yx,lw],Ed=e=>sg.find(rg(e));class ig extends Iu{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),wu(u))){const c=ng(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Mm.has(r)||t.length!==2)return;const[s,i]=t,o=Ed(s),a=Ed(i);if(o!==a)if(Cd(o)&&Cd(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)O1(t[s])&&r.push(s);r.length&&tw(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=er[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,a=s[o];s[o]=er[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const jd=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zt.test(e)||e==="0")&&!e.startsWith("url("));function uw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function cw(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=jd(s,t),a=jd(i,t);return!o||!a?!1:uw(e)||(n==="spring"||ju(n))&&r}const dw=e=>e!==null;function co(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(dw),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const fw=40;class og{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=it.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>fw?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&iw(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=it.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!cw(t,r,s,i))if(o)this.options.duration=0;else{l&&l(co(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const K=(e,t,n)=>e+(t-e)*n;function Wo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hw({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Wo(l,a,e+1/3),i=Wo(l,a,e),o=Wo(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Mi(e,t){return n=>n>0?t:e}const Ko=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},pw=[nl,on,Fn],mw=e=>pw.find(t=>t.test(e));function Nd(e){const t=mw(e);if(!t)return!1;let n=t.parse(e);return t===Fn&&(n=hw(n)),n}const Ad=(e,t)=>{const n=Nd(e),r=Nd(t);if(!n||!r)return Mi(e,t);const s={...n};return i=>(s.red=Ko(n.red,r.red,i),s.green=Ko(n.green,r.green,i),s.blue=Ko(n.blue,r.blue,i),s.alpha=K(n.alpha,r.alpha,i),on.transform(s))},gw=(e,t)=>n=>t(e(n)),gs=(...e)=>e.reduce(gw),ol=new Set(["none","hidden"]);function yw(e,t){return ol.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function vw(e,t){return n=>K(e,t,n)}function Bu(e){return typeof e=="number"?vw:typeof e=="string"?wu(e)?Mi:pe.test(e)?Ad:Sw:Array.isArray(e)?ag:typeof e=="object"?pe.test(e)?Ad:xw:Mi}function ag(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Bu(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function xw(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Bu(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function ww(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][s[o]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,s[o]++}return r}const Sw=(e,t)=>{const n=zt.createTransformer(t),r=is(e),s=is(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?ol.has(e)&&!s.values.length||ol.has(t)&&!r.values.length?yw(e,t):gs(ag(ww(r,s),s.values),n):Mi(e,t)};function lg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?K(e,t,n):Bu(e)(e,t)}const bw=5;function ug(e,t,n){const r=Math.max(t-bw,0);return _m(n-e(r),t-r)}const X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ho=.001;function kw({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:r=X.mass}){let s,i,o=1-t;o=yt(X.minDamping,X.maxDamping,o),e=yt(X.minDuration,X.maxDuration,ft(e)),o<1?(s=u=>{const c=u*o,f=c*e,h=c-n,g=al(u,o),v=Math.exp(-f);return Ho-h/g*v},i=u=>{const f=u*o*e,h=f*n+n,g=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-f),w=al(Math.pow(u,2),o);return(-s(u)+Ho>0?-1:1)*((h-g)*v)/w}):(s=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Ho+c*f},i=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=Pw(s,i,a);if(e=dt(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Cw=12;function Pw(e,t,n){let r=n;for(let s=1;s<Cw;s++)r=r-e(r)/t(r);return r}function al(e,t){return e*Math.sqrt(1-t*t)}const Tw=["duration","bounce"],Ew=["stiffness","damping","mass"];function Rd(e,t){return t.some(n=>e[n]!==void 0)}function jw(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Rd(e,Ew)&&Rd(e,Tw))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*yt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:i}}else{const n=kw(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function cg(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:f,velocity:h,isResolvedFromDuration:g}=jw({...n,velocity:-ft(n.velocity||0)}),v=h||0,w=u/(2*Math.sqrt(l*c)),S=o-i,m=ft(Math.sqrt(l/c)),p=Math.abs(S)<5;r||(r=p?X.restSpeed.granular:X.restSpeed.default),s||(s=p?X.restDelta.granular:X.restDelta.default);let y;if(w<1){const k=al(m,w);y=C=>{const E=Math.exp(-w*m*C);return o-E*((v+w*m*S)/k*Math.sin(k*C)+S*Math.cos(k*C))}}else if(w===1)y=k=>o-Math.exp(-m*k)*(S+(v+m*S)*k);else{const k=m*Math.sqrt(w*w-1);y=C=>{const E=Math.exp(-w*m*C),P=Math.min(k*C,300);return o-E*((v+w*m*S)*Math.sinh(P)+k*S*Math.cosh(P))/k}}const b={calculatedDuration:g&&f||null,next:k=>{const C=y(k);if(g)a.done=k>=f;else{let E=0;w<1&&(E=k===0?dt(v):ug(y,k,C));const P=Math.abs(E)<=r,F=Math.abs(o-C)<=s;a.done=P&&F}return a.value=a.done?o:C,a},toString:()=>{const k=Math.min(jm(b),qa),C=Nm(E=>b.next(k*E).value,k,30);return k+"ms "+C}};return b}function Ld({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],h={done:!1,value:f},g=P=>a!==void 0&&P<a||l!==void 0&&P>l,v=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let w=n*t;const S=f+w,m=o===void 0?S:o(S);m!==S&&(w=m-f);const p=P=>-w*Math.exp(-P/r),y=P=>m+p(P),b=P=>{const F=p(P),A=y(P);h.done=Math.abs(F)<=u,h.value=h.done?m:A};let k,C;const E=P=>{g(h.value)&&(k=P,C=cg({keyframes:[h.value,v(h.value)],velocity:ug(y,P,h.value),damping:s,stiffness:i,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:P=>{let F=!1;return!C&&k===void 0&&(F=!0,b(P),E(P)),k!==void 0&&P>=k?C.next(P-k):(!F&&b(P),h)}}}const Nw=ms(.42,0,1,1),Aw=ms(0,0,.58,1),dg=ms(.42,0,.58,1),Rw=e=>Array.isArray(e)&&typeof e[0]!="number",Lw={linear:Ae,easeIn:Nw,easeInOut:dg,easeOut:Aw,circIn:Mu,circInOut:Km,circOut:Wm,backIn:Fu,backInOut:zm,backOut:Um,anticipate:$m},Dd=e=>{if(Nu(e)){lm(e.length===4);const[t,n,r,s]=e;return ms(t,n,r,s)}else if(typeof e=="string")return Lw[e];return e};function Dw(e,t,n){const r=[],s=n||lg,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Ae:t;a=gs(l,a)}r.push(a)}return r}function Fw(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(lm(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Dw(t,r,s),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const h=Jn(e[f],e[f+1],c);return a[f](h)};return n?c=>u(yt(e[0],e[i-1],c)):u}function Mw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Jn(0,t,r);e.push(K(n,1,s))}}function _w(e){const t=[0];return Mw(t,e.length-1),t}function Vw(e,t){return e.map(n=>n*t)}function Ow(e,t){return e.map(()=>t||dg).splice(0,e.length-1)}function _i({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Rw(r)?r.map(Dd):Dd(r),i={done:!1,value:t[0]},o=Vw(n&&n.length===t.length?n:_w(t),e),a=Fw(o,t,{ease:Array.isArray(s)?s:Ow(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Iw=e=>{const t=({timestamp:n})=>e(n);return{start:()=>z.update(t,!0),stop:()=>Ut(t),now:()=>ue.isProcessing?ue.timestamp:it.now()}},Bw={decay:Ld,inertia:Ld,tween:_i,keyframes:_i,spring:cg},Uw=e=>e/100;class Uu extends og{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||Iu,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=ju(n)?n:Bw[n]||_i;let l,u;a!==_i&&typeof t[0]!="number"&&(l=gs(Uw,lg(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});i==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=jm(c));const{calculatedDuration:f}=c,h=f+s,g=h*(r+1)-s;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:g,repeatType:v,repeatDelay:w,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-h*(this.speed>=0?1:-1),p=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let y=this.currentTime,b=i;if(g){const P=Math.min(this.currentTime,c)/f;let F=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&F--,F=Math.min(F,g+1),!!(F%2)&&(v==="reverse"?(A=1-A,w&&(A-=w/f)):v==="mirror"&&(b=o)),y=yt(0,1,A)*f}const k=p?{done:!1,value:l[0]}:b.next(y);a&&(k.value=a(k.value));let{done:C}=k;!p&&u!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&s!==void 0&&(k.value=co(l,this.options,s)),S&&S(k.value),E&&this.finish(),k}get duration(){const{resolved:t}=this;return t?ft(t.calculatedDuration):0}get time(){return ft(this.currentTime)}set time(t){t=dt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ft(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Iw,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const zw=new Set(["opacity","clipPath","filter","transform"]);function $w(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Rm(a,s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const Ww=hu(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vi=10,Kw=2e4;function Hw(e){return ju(e.type)||e.type==="spring"||!Am(e.ease)}function Gw(e,t){const n=new Uu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&i<Kw;)r=n.sample(i),s.push(r.value),i+=Vi;return{times:void 0,keyframes:s,duration:i-Vi,ease:"linear"}}const fg={anticipate:$m,backInOut:zm,circInOut:Km};function Xw(e){return e in fg}class Fd extends og{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new ig(i,(o,a)=>this.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&Fi()&&Xw(i)&&(i=fg[i]),Hw(this.options)){const{onComplete:f,onUpdate:h,motionValue:g,element:v,...w}=this.options,S=Gw(t,w);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,s=S.times,i=S.ease,o="keyframes"}const c=$w(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:i});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(vd(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(co(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ft(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ft(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=dt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ae;const{animation:r}=n;vd(r,t)}return Ae}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:h,...g}=this.options,v=new Uu({...g,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),w=dt(this.time);u.setWithVelocity(v.sample(w-Vi).value,v.sample(w).value,Vi)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return Ww()&&r&&zw.has(r)&&!l&&!u&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const Qw={type:"spring",stiffness:500,damping:25,restSpeed:10},Yw=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Zw={type:"keyframes",duration:.8},Jw={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qw=(e,{keyframes:t})=>t.length>2?Zw:xn.has(e)?e.startsWith("scale")?Yw(t[1]):Qw:Jw;function eS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const zu=(e,t,n,r={},s,i)=>o=>{const a=Eu(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-dt(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};eS(a)||(c={...c,...qw(e,c)}),c.duration&&(c.duration=dt(c.duration)),c.repeatDelay&&(c.repeatDelay=dt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=co(c.keyframes,a);if(h!==void 0)return z.update(()=>{c.onUpdate(h),c.onComplete()}),new x1([])}return!i&&Fd.supports(c)?new Fd(c):new Uu(c)};function tS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function hg(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),g=l[f];if(g===void 0||c&&tS(c,f))continue;const v={delay:n,...Eu(o||{},f)};let w=!1;if(window.MotionHandoffAnimation){const m=Vm(e);if(m){const p=window.MotionHandoffAnimation(m,f,z);p!==null&&(v.startTime=p,w=!0)}}tl(e,f),h.start(zu(f,h,g,e.shouldReduceMotion&&Mm.has(f)?{type:!1}:v,e,w));const S=h.animation;S&&u.push(S)}return a&&Promise.all(u).then(()=>{z.update(()=>{a&&D1(e,a)})}),u}function ll(e,t,n={}){var r;const s=uo(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(hg(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:h}=i;return nS(e,t,c+u,f,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function nS(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(rS).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(ll(u,t,{...i,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function rS(e,t){return e.sortNodePosition(t)}function sS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>ll(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=ll(e,t,n);else{const s=typeof t=="function"?uo(e,t,n.custom):t;r=Promise.all(hg(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const iS=mu.length;function pg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?pg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<iS;n++){const r=mu[n],s=e.props[r];(ns(s)||s===!1)&&(t[r]=s)}return t}const oS=[...pu].reverse(),aS=pu.length;function lS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>sS(e,n,r)))}function uS(e){let t=lS(e),n=Md(),r=!0;const s=l=>(u,c)=>{var f;const h=uo(e,c,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:g,transitionEnd:v,...w}=h;u={...u,...w,...v}}return u};function i(l){t=l(e)}function o(l){const{props:u}=e,c=pg(e.parent)||{},f=[],h=new Set;let g={},v=1/0;for(let S=0;S<aS;S++){const m=oS[S],p=n[m],y=u[m]!==void 0?u[m]:c[m],b=ns(y),k=m===l?p.isActive:null;k===!1&&(v=S);let C=y===c[m]&&y!==u[m]&&b;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),p.protectedKeys={...g},!p.isActive&&k===null||!y&&!p.prevProp||ao(y)||typeof y=="boolean")continue;const E=cS(p.prevProp,y);let P=E||m===l&&p.isActive&&!C&&b||S>v&&b,F=!1;const A=Array.isArray(y)?y:[y];let ee=A.reduce(s(m),{});k===!1&&(ee={});const{prevResolvedValues:wt={}}=p,Xt={...wt,...ee},or=ne=>{P=!0,h.has(ne)&&(F=!0,h.delete(ne)),p.needsAnimating[ne]=!0;const j=e.getValue(ne);j&&(j.liveStyle=!1)};for(const ne in Xt){const j=ee[ne],L=wt[ne];if(g.hasOwnProperty(ne))continue;let D=!1;Ja(j)&&Ja(L)?D=!Em(j,L):D=j!==L,D?j!=null?or(ne):h.add(ne):j!==void 0&&h.has(ne)?or(ne):p.protectedKeys[ne]=!0}p.prevProp=y,p.prevResolvedValues=ee,p.isActive&&(g={...g,...ee}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&E)||F)&&f.push(...A.map(ne=>({animation:ne,options:{type:m}})))}if(h.size){const S={};h.forEach(m=>{const p=e.getBaseTarget(m),y=e.getValue(m);y&&(y.liveStyle=!0),S[m]=p??null}),f.push({animation:S})}let w=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(f):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(h=>{var g;return(g=h.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Md(),r=!0}}}function cS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Em(t,e):!1}function Zt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Md(){return{animate:Zt(!0),whileInView:Zt(),whileHover:Zt(),whileTap:Zt(),whileDrag:Zt(),whileFocus:Zt(),exit:Zt()}}class Gt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class dS extends Gt{constructor(t){super(t),t.animationState||(t.animationState=uS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ao(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let fS=0;class hS extends Gt{constructor(){super(...arguments),this.id=fS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const pS={animation:{Feature:dS},exit:{Feature:hS}};function os(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ys(e){return{point:{x:e.pageX,y:e.pageY}}}const mS=e=>t=>Au(t)&&e(t,ys(t));function Fr(e,t,n,r){return os(e,t,mS(n),r)}const _d=(e,t)=>Math.abs(e-t);function gS(e,t){const n=_d(e.x,t.x),r=_d(e.y,t.y);return Math.sqrt(n**2+r**2)}class mg{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Xo(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=gS(f.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:v}=f,{timestamp:w}=ue;this.history.push({...v,timestamp:w});const{onStart:S,onMove:m}=this.handlers;h||(S&&S(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Go(h,this.transformPagePoint),z.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Xo(f.type==="pointercancel"?this.lastMoveEventInfo:Go(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,S),v&&v(f,S)},!Au(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=ys(t),a=Go(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=ue;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Xo(a,this.history)),this.removeListeners=gs(Fr(this.contextWindow,"pointermove",this.handlePointerMove),Fr(this.contextWindow,"pointerup",this.handlePointerUp),Fr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ut(this.updatePoint)}}function Go(e,t){return t?{point:t(e.point)}:e}function Vd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xo({point:e},t){return{point:e,delta:Vd(e,gg(t)),offset:Vd(e,yS(t)),velocity:vS(t,.1)}}function yS(e){return e[0]}function gg(e){return e[e.length-1]}function vS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=gg(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>dt(t)));)n--;if(!r)return{x:0,y:0};const i=ft(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const yg=1e-4,xS=1-yg,wS=1+yg,vg=.01,SS=0-vg,bS=0+vg;function Le(e){return e.max-e.min}function kS(e,t,n){return Math.abs(e-t)<=n}function Od(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=Le(n)/Le(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xS&&e.scale<=wS||isNaN(e.scale))&&(e.scale=1),(e.translate>=SS&&e.translate<=bS||isNaN(e.translate))&&(e.translate=0)}function Mr(e,t,n,r){Od(e.x,t.x,n.x,r?r.originX:void 0),Od(e.y,t.y,n.y,r?r.originY:void 0)}function Id(e,t,n){e.min=n.min+t.min,e.max=e.min+Le(t)}function CS(e,t,n){Id(e.x,t.x,n.x),Id(e.y,t.y,n.y)}function Bd(e,t,n){e.min=t.min-n.min,e.max=e.min+Le(t)}function _r(e,t,n){Bd(e.x,t.x,n.x),Bd(e.y,t.y,n.y)}function PS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?K(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function Ud(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function TS(e,{top:t,left:n,bottom:r,right:s}){return{x:Ud(e.x,n,s),y:Ud(e.y,t,r)}}function zd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ES(e,t){return{x:zd(e.x,t.x),y:zd(e.y,t.y)}}function jS(e,t){let n=.5;const r=Le(e),s=Le(t);return s>r?n=Jn(t.min,t.max-r,e.min):r>s&&(n=Jn(e.min,e.max-s,t.min)),yt(0,1,n)}function NS(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ul=.35;function AS(e=ul){return e===!1?e=0:e===!0&&(e=ul),{x:$d(e,"left","right"),y:$d(e,"top","bottom")}}function $d(e,t,n){return{min:Wd(e,t),max:Wd(e,n)}}function Wd(e,t){return typeof e=="number"?e:e[t]||0}const Kd=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mn=()=>({x:Kd(),y:Kd()}),Hd=()=>({min:0,max:0}),J=()=>({x:Hd(),y:Hd()});function Ve(e){return[e("x"),e("y")]}function xg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function RS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function LS(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Qo(e){return e===void 0||e===1}function cl({scale:e,scaleX:t,scaleY:n}){return!Qo(e)||!Qo(t)||!Qo(n)}function en(e){return cl(e)||wg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wg(e){return Gd(e.x)||Gd(e.y)}function Gd(e){return e&&e!=="0%"}function Oi(e,t,n){const r=e-n,s=t*r;return n+s}function Xd(e,t,n,r,s){return s!==void 0&&(e=Oi(e,s,r)),Oi(e,n,r)+t}function dl(e,t=0,n=1,r,s){e.min=Xd(e.min,t,n,r,s),e.max=Xd(e.max,t,n,r,s)}function Sg(e,{x:t,y:n}){dl(e.x,t.translate,t.scale,t.originPoint),dl(e.y,n.translate,n.scale,n.originPoint)}const Qd=.999999999999,Yd=1.0000000000001;function DS(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Vn(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Sg(e,o)),r&&en(i.latestValues)&&Vn(e,i.latestValues))}t.x<Yd&&t.x>Qd&&(t.x=1),t.y<Yd&&t.y>Qd&&(t.y=1)}function _n(e,t){e.min=e.min+t,e.max=e.max+t}function Zd(e,t,n,r,s=.5){const i=K(e.min,e.max,s);dl(e,t,n,i,r)}function Vn(e,t){Zd(e.x,t.x,t.scaleX,t.scale,t.originX),Zd(e.y,t.y,t.scaleY,t.scale,t.originY)}function bg(e,t){return xg(LS(e.getBoundingClientRect(),t))}function FS(e,t,n){const r=bg(e,n),{scroll:s}=t;return s&&(_n(r.x,s.offset.x),_n(r.y,s.offset.y)),r}const kg=({current:e})=>e?e.ownerDocument.defaultView:null,MS=new WeakMap;class _S{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ys(c).point)},i=(c,f)=>{const{drag:h,dragPropagation:g,onDragStart:v}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=j1(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ve(S=>{let m=this.getAxisMotionValue(S).get()||0;if(st.test(m)){const{projection:p}=this.visualElement;if(p&&p.layout){const y=p.layout.layoutBox[S];y&&(m=Le(y)*(parseFloat(m)/100))}}this.originPoint[S]=m}),v&&z.postRender(()=>v(c,f)),tl(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(c,f)=>{const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:v,onDrag:w}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:S}=f;if(g&&this.currentDirection===null){this.currentDirection=VS(S),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),w&&w(c,f)},a=(c,f)=>this.stop(c,f),l=()=>Ve(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new mg(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:kg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&z.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Ws(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=PS(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Dn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=TS(s.layoutBox,n):this.constraints=!1,this.elastic=AS(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Ve(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=NS(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Dn(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=FS(r,s.root,this.visualElement.getTransformPagePoint());let o=ES(s.layout.layoutBox,i);if(n){const a=n(RS(o));this.hasMutatedConstraints=!!a,a&&(o=xg(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ve(c=>{if(!Ws(c,n,this.currentDirection))return;let f=l&&l[c]||{};o&&(f={min:0,max:0});const h=s?200:1e6,g=s?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return tl(this.visualElement,t),r.start(zu(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ve(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ve(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ve(n=>{const{drag:r}=this.getProps();if(!Ws(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-K(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Dn(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ve(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=jS({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ve(o=>{if(!Ws(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(K(l,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;MS.set(this.visualElement,this);const t=this.visualElement.current,n=Fr(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Dn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),z.read(r);const o=os(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ve(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ul,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Ws(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function VS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class OS extends Gt{constructor(t){super(t),this.removeGroupControls=Ae,this.removeListeners=Ae,this.controls=new _S(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ae}unmount(){this.removeGroupControls(),this.removeListeners()}}const Jd=e=>(t,n)=>{e&&z.postRender(()=>e(t,n))};class IS extends Gt{constructor(){super(...arguments),this.removePointerDownListener=Ae}onPointerDown(t){this.session=new mg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Jd(t),onStart:Jd(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&z.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Fr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ii={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const mr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(R.test(e))e=parseFloat(e);else return e;const n=qd(e,t.target.x),r=qd(e,t.target.y);return`${n}% ${r}%`}},BS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=zt.parse(e);if(s.length>5)return r;const i=zt.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=K(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}};class US extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;a1(zS),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ii.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||z.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cg(e){const[t,n]=im(),r=x.useContext(uu);return d.jsx(US,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(pm),isPresent:t,safeToRemove:n})}const zS={borderRadius:{...mr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mr,borderTopRightRadius:mr,borderBottomLeftRadius:mr,borderBottomRightRadius:mr,boxShadow:BS};function $S(e,t,n){const r=ge(e)?e:ss(e);return r.start(zu("",r,t,n)),r.animation}function WS(e){return e instanceof SVGElement&&e.tagName!=="svg"}const KS=(e,t)=>e.depth-t.depth;class HS{constructor(){this.children=[],this.isDirty=!1}add(t){Ru(this.children,t),this.isDirty=!0}remove(t){Lu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(KS),this.isDirty=!1,this.children.forEach(t)}}function GS(e,t){const n=it.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ut(r),e(i-t))};return z.read(r,!0),()=>Ut(r)}const Pg=["TopLeft","TopRight","BottomLeft","BottomRight"],XS=Pg.length,ef=e=>typeof e=="string"?parseFloat(e):e,tf=e=>typeof e=="number"||R.test(e);function QS(e,t,n,r,s,i){s?(e.opacity=K(0,n.opacity!==void 0?n.opacity:1,YS(r)),e.opacityExit=K(t.opacity!==void 0?t.opacity:1,0,ZS(r))):i&&(e.opacity=K(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<XS;o++){const a=`border${Pg[o]}Radius`;let l=nf(t,a),u=nf(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||tf(l)===tf(u)?(e[a]=Math.max(K(ef(l),ef(u),r),0),(st.test(u)||st.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=K(t.rotate||0,n.rotate||0,r))}function nf(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const YS=Tg(0,.5,Wm),ZS=Tg(.5,.95,Ae);function Tg(e,t,n){return r=>r<e?0:r>t?1:n(Jn(e,t,r))}function rf(e,t){e.min=t.min,e.max=t.max}function Me(e,t){rf(e.x,t.x),rf(e.y,t.y)}function sf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function of(e,t,n,r,s){return e-=t,e=Oi(e,1/n,r),s!==void 0&&(e=Oi(e,1/s,r)),e}function JS(e,t=0,n=1,r=.5,s,i=e,o=e){if(st.test(t)&&(t=parseFloat(t),t=K(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=K(i.min,i.max,r);e===i&&(a-=t),e.min=of(e.min,t,n,a,s),e.max=of(e.max,t,n,a,s)}function af(e,t,[n,r,s],i,o){JS(e,t[n],t[r],t[s],t.scale,i,o)}const qS=["x","scaleX","originX"],eb=["y","scaleY","originY"];function lf(e,t,n,r){af(e.x,t,qS,n?n.x:void 0,r?r.x:void 0),af(e.y,t,eb,n?n.y:void 0,r?r.y:void 0)}function uf(e){return e.translate===0&&e.scale===1}function Eg(e){return uf(e.x)&&uf(e.y)}function cf(e,t){return e.min===t.min&&e.max===t.max}function tb(e,t){return cf(e.x,t.x)&&cf(e.y,t.y)}function df(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function jg(e,t){return df(e.x,t.x)&&df(e.y,t.y)}function ff(e){return Le(e.x)/Le(e.y)}function hf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class nb{constructor(){this.members=[]}add(t){Ru(this.members,t),t.scheduleRender()}remove(t){if(Lu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rb(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:h,skewX:g,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const tn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},br=typeof window<"u"&&window.MotionDebug!==void 0,Yo=["","X","Y","Z"],sb={visibility:"hidden"},pf=1e3;let ib=0;function Zo(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ng(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",z,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ng(r)}function Ag({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=ib++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,br&&(tn.totalNodes=tn.resolvedTargetDeltas=tn.recalculatedProjection=0),this.nodes.forEach(lb),this.nodes.forEach(hb),this.nodes.forEach(pb),this.nodes.forEach(ub),br&&window.MotionDebug.record(tn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new HS)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Du),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=WS(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=GS(h,250),ii.hasAnimatedSinceResize&&(ii.hasAnimatedSinceResize=!1,this.nodes.forEach(gf))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||c.getDefaultTransition()||xb,{onLayoutAnimationStart:S,onLayoutAnimationComplete:m}=c.getProps(),p=!this.targetLayout||!jg(this.targetLayout,v)||g,y=!h&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const b={...Eu(w,"layout"),onPlay:S,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else h||gf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ut(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(mb),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ng(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(mf);return}this.isUpdating||this.nodes.forEach(db),this.isUpdating=!1,this.nodes.forEach(fb),this.nodes.forEach(ob),this.nodes.forEach(ab),this.clearAllSnapshots();const a=it.now();ue.delta=yt(0,1e3/60,a-ue.timestamp),ue.timestamp=a,ue.isProcessing=!0,Uo.update.process(ue),Uo.preRender.process(ue),Uo.render.process(ue),ue.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cb),this.sharedNodes.forEach(gb)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,z.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){z.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=J(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Eg(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||en(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),wb(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return J();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(Sb))){const{scroll:c}=this.root;c&&(_n(l.x,c.offset.x),_n(l.y,c.offset.y))}return l}removeElementScroll(o){var a;const l=J();if(Me(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:f,options:h}=c;c!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&Me(l,o),_n(l.x,f.offset.x),_n(l.y,f.offset.y))}return l}applyTransform(o,a=!1){const l=J();Me(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Vn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),en(c.latestValues)&&Vn(l,c.latestValues)}return en(this.latestValues)&&Vn(l,this.latestValues),l}removeTransform(o){const a=J();Me(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!en(u.latestValues))continue;cl(u.latestValues)&&u.updateSnapshot();const c=J(),f=u.measurePageBox();Me(c,f),lf(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return en(this.latestValues)&&lf(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ue.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=ue.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),_r(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),CS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Me(this.target,this.layout.layoutBox),Sg(this.target,this.targetDelta)):Me(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),_r(this.relativeTargetOrigin,this.target,g.target),Me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}br&&tn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||cl(this.parent.latestValues)||wg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===ue.timestamp&&(u=!1),u)return;const{layout:c,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||f))return;Me(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,g=this.treeScale.y;DS(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=J());const{target:v}=a;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sf(this.prevProjectionDelta.x,this.projectionDelta.x),sf(this.prevProjectionDelta.y,this.projectionDelta.y)),Mr(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==g||!hf(this.projectionDelta.x,this.prevProjectionDelta.x)||!hf(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v)),br&&tn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mn(),this.projectionDelta=Mn(),this.projectionDeltaWithTransform=Mn()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Mn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=J(),g=l?l.source:void 0,v=this.layout?this.layout.source:void 0,w=g!==v,S=this.getStack(),m=!S||S.members.length<=1,p=!!(w&&!m&&this.options.crossfade===!0&&!this.path.some(vb));this.animationProgress=0;let y;this.mixTargetDelta=b=>{const k=b/1e3;yf(f.x,o.x,k),yf(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_r(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yb(this.relativeTarget,this.relativeTargetOrigin,h,k),y&&tb(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=J()),Me(y,this.relativeTarget)),w&&(this.animationValues=c,QS(c,u,this.latestValues,k,p,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ut(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=z.update(()=>{ii.hasAnimatedSinceResize=!0,this.currentAnimation=$S(0,pf,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Rg(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||J();const f=Le(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=Le(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Me(a,l),Vn(a,c),Mr(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new nb),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Zo("z",o,u,this.animationValues);for(let c=0;c<Yo.length;c++)Zo(`rotate${Yo[c]}`,o,u,this.animationValues),Zo(`skew${Yo[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return sb;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ri(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const w={};return this.options.layoutId&&(w.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,w.pointerEvents=ri(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!en(this.latestValues)&&(w.transform=c?c({},""):"none",this.hasProjected=!1),w}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=rb(this.projectionDeltaWithTransform,this.treeScale,h),c&&(u.transform=c(h,u.transform));const{x:g,y:v}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${v.origin*100}% 0`,f.animationValues?u.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const w in Di){if(h[w]===void 0)continue;const{correct:S,applyTo:m}=Di[w],p=u.transform==="none"?h[w]:S(h[w],f);if(m){const y=m.length;for(let b=0;b<y;b++)u[m[b]]=p}else u[w]=p}return this.options.layoutId&&(u.pointerEvents=f===this?ri(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(mf),this.root.sharedNodes.clear()}}}function ob(e){e.updateLayout()}function ab(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?Ve(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],g=Le(h);h.min=r[f].min,h.max=h.min+g}):Rg(i,n.layoutBox,r)&&Ve(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],g=Le(r[f]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const a=Mn();Mr(a,r,n.layoutBox);const l=Mn();o?Mr(l,e.applyTransform(s,!0),n.measuredBox):Mr(l,r,n.layoutBox);const u=!Eg(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:g}=f;if(h&&g){const v=J();_r(v,n.layoutBox,h.layoutBox);const w=J();_r(w,r,g.layoutBox),jg(v,w)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function lb(e){br&&tn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ub(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cb(e){e.clearSnapshot()}function mf(e){e.clearMeasurements()}function db(e){e.isLayoutDirty=!1}function fb(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function gf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hb(e){e.resolveTargetDelta()}function pb(e){e.calcProjection()}function mb(e){e.resetSkewAndRotation()}function gb(e){e.removeLeadSnapshot()}function yf(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function vf(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function yb(e,t,n,r){vf(e.x,t.x,n.x,r),vf(e.y,t.y,n.y,r)}function vb(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xb={duration:.45,ease:[.4,0,.1,1]},xf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),wf=xf("applewebkit/")&&!xf("chrome/")?Math.round:Ae;function Sf(e){e.min=wf(e.min),e.max=wf(e.max)}function wb(e){Sf(e.x),Sf(e.y)}function Rg(e,t,n){return e==="position"||e==="preserve-aspect"&&!kS(ff(t),ff(n),.2)}function Sb(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const bb=Ag({attachResizeListener:(e,t)=>os(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jo={current:void 0},Lg=Ag({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jo.current){const e=new bb({});e.mount(window),e.setOptions({layoutScroll:!0}),Jo.current=e}return Jo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kb={pan:{Feature:IS},drag:{Feature:OS,ProjectionNode:Lg,MeasureLayout:Cg}};function bf(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&z.postRender(()=>i(t,ys(t)))}class Cb extends Gt{mount(){const{current:t}=this.node;t&&(this.unmount=k1(t,n=>(bf(this.node,n,"Start"),r=>bf(this.node,r,"End"))))}unmount(){}}class Pb extends Gt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gs(os(this.node.current,"focus",()=>this.onFocus()),os(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kf(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&z.postRender(()=>i(t,ys(t)))}class Tb extends Gt{mount(){const{current:t}=this.node;t&&(this.unmount=E1(t,n=>(kf(this.node,n,"Start"),(r,{success:s})=>kf(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const fl=new WeakMap,qo=new WeakMap,Eb=e=>{const t=fl.get(e.target);t&&t(e)},jb=e=>{e.forEach(Eb)};function Nb({root:e,...t}){const n=e||document;qo.has(n)||qo.set(n,{});const r=qo.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(jb,{root:e,...t})),r[s]}function Ab(e,t,n){const r=Nb(t);return fl.set(e,n),r.observe(e),()=>{fl.delete(e),r.unobserve(e)}}const Rb={some:0,all:1};class Lb extends Gt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Rb[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),h=u?c:f;h&&h(l)};return Ab(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Db(t,n))&&this.startObserver()}unmount(){}}function Db({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Fb={inView:{Feature:Lb},tap:{Feature:Tb},focus:{Feature:Pb},hover:{Feature:Cb}},Mb={layout:{ProjectionNode:Lg,MeasureLayout:Cg}},hl={current:null},Dg={current:!1};function _b(){if(Dg.current=!0,!!fu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>hl.current=e.matches;e.addListener(t),t()}else hl.current=!1}const Vb=[...sg,pe,zt],Ob=e=>Vb.find(rg(e)),Cf=new WeakMap;function Ib(e,t,n){for(const r in t){const s=t[r],i=n[r];if(ge(s))e.addValue(r,s);else if(ge(i))e.addValue(r,ss(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,ss(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Pf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Bb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Iu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=it.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,z.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:c}=o;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=lo(n),this.isVariantNode=fm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const v=h[g];l[g]!==void 0&&ge(v)&&v.set(l[g],!1)}}mount(t){this.current=t,Cf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Dg.current||_b(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:hl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Cf.delete(this.current),this.projection&&this.projection.unmount(),Ut(this.notifyUpdate),Ut(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xn.has(t),s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&z.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in qn){const n=qn[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Pf.length;r++){const s=Pf[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Ib(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ss(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(tg(s)||Hm(s))?s=parseFloat(s):!Ob(s)&&zt.test(n)&&(s=Jm(t,n)),this.setBaseTarget(t,ge(s)?s.get():s)),ge(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=xu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ge(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Du),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Fg extends Bb{constructor(){super(...arguments),this.KeyframeResolver=ig}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ub(e){return window.getComputedStyle(e)}class zb extends Fg{constructor(){super(...arguments),this.type="html",this.renderInstance=Sm}readValueFromInstance(t,n){if(xn.has(n)){const r=Ou(n);return r&&r.default||0}else{const r=Ub(t),s=(vm(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return bg(t,n)}build(t,n,r){bu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Tu(t,n,r)}}class $b extends Fg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xn.has(n)){const r=Ou(n);return r&&r.default||0}return n=bm.has(n)?n:gu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Pm(t,n,r)}build(t,n,r){ku(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){km(t,n,r,s)}mount(t){this.isSVGTag=Pu(t.tagName),super.mount(t)}}const Wb=(e,t)=>vu(e)?new $b(t):new zb(t,{allowProjection:e!==x.Fragment}),Kb=g1({...pS,...Fb,...kb,...Mb},Wb),O=Rx(Kb);function Mg(){return(localStorage.getItem("apiBase")||"").replace(/\/+$/,"")}function vs(e){const t=Mg(),n=e.startsWith("/")?e:`/${e}`;return t?`${t}${n}`:n}async function $u(e){const t=await fetch(vs(e));if(!t.ok)throw new Error(await t.text());return t.json()}async function vt(e,t){const n=await fetch(vs(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await n.text());return n.json()}const Hb=()=>{const e=Mg();if(e)try{const r=new URL(e.includes("://")?e:`http://${e}`);return`${r.protocol==="https:"?"wss:":"ws:"}//${r.host}/ws`}catch{}const t=window.location;return`${t.protocol==="https:"?"wss:":"ws:"}//${t.host}/ws`};function Gb(e){const[t,n]=x.useState(!1),r=x.useRef(e);return r.current=e,x.useEffect(()=>{let s=!1,i=0,o,a=null;const l=()=>{s||(a=new WebSocket(Hb()),a.onopen=()=>{i=0,n(!0),a==null||a.send("ping")},a.onclose=()=>{n(!1),i+=1,o=setTimeout(l,Math.min(8e3,500+i*400))},a.onerror=()=>a==null?void 0:a.close(),a.onmessage=u=>r.current(String(u.data)))};return l(),()=>{s=!0,clearTimeout(o),a==null||a.close()}},[]),t}const _g=x.createContext(null),Wu=5e3,Ku="pn532_browser_log_v1";function Xb(){try{const e=sessionStorage.getItem(Ku);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(-Wu):[]}catch{return[]}}function Qb(e){try{sessionStorage.setItem(Ku,JSON.stringify(e.slice(-Wu)))}catch{}}function Yb(e,t,n){if(typeof e=="object"&&e&&"present"in e&&e.present===!1){t(null),n(!1);return}n(!0),typeof e=="object"&&e&&"uid"in e&&t(e)}function Zb(e){if(!e||typeof e!="object")return!1;const t=e;return t.present===!1?!1:typeof t.uid=="string"&&t.uid.length>0}function Jb(e){return!e||typeof e!="object"?!1:e.event==="recorded"}function qb({children:e}){const[t,n]=x.useState(null),[r,s]=x.useState(!1),[i,o]=x.useState(()=>Xb()),[a,l]=x.useState(0),[u,c]=x.useState("tag"),f=x.useRef(0),h=x.useCallback(y=>{const b=Date.now();y==="tag"&&b-f.current<280||(f.current=b,c(y),l(k=>k+1))},[]),g=x.useCallback(y=>{try{const b=JSON.parse(y),k=b.channel||"unknown";o(C=>{const E=[...C,{t:Date.now(),channel:k,payload:b.payload}].slice(-Wu);return Qb(E),E}),k==="scan"?(Yb(b.payload,n,s),Zb(b.payload)&&h("tag")):k==="capture"&&Jb(b.payload)&&h("vault")}catch{}},[h]),v=Gb(g),w=x.useCallback((y,b)=>{if(!y){n(null),s(!1);return}b&&(n(b),s(!0),h("tag"))},[h]),S=x.useCallback(()=>{o([]),sessionStorage.removeItem(Ku)},[]),m=x.useCallback(()=>{const y=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),b=URL.createObjectURL(y),k=document.createElement("a");k.href=b,k.download=`pn532-browser-log-${Date.now()}.json`,k.click(),URL.revokeObjectURL(b)},[i]),p=x.useMemo(()=>({wsOk:v,lastTag:t,tagPresent:r,log:i,cashWave:a,cashVariant:u,clearBrowserLog:S,exportBrowserLog:m,applyScanPoll:w}),[v,t,r,i,a,u,S,m,w]);return d.jsx(_g.Provider,{value:p,children:e})}function xs(){const e=x.useContext(_g);if(!e)throw new Error("useNfcWs outside NfcWsProvider");return e}function e2(){const{log:e,exportBrowserLog:t,clearBrowserLog:n,wsOk:r}=xs();return d.jsxs("div",{className:"flash-log-bar relative z-40 mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-2 overflow-hidden border-b border-bubble-accent/15 px-4 py-2.5 font-mono text-[10px] text-bubble-mint/80 sm:text-xs",children:[d.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden",children:d.jsx("div",{className:"absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-bubble-accent/10 to-transparent animate-shimmerLine"})}),d.jsxs("div",{className:"relative flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsx("span",{className:"shrink-0 animate-pulse text-bubble-volt",children:"◆"}),d.jsxs("span",{className:"truncate",children:[d.jsx("span",{className:"text-bubble-accent/70",children:"BUF"})," ",d.jsx("span",{className:"text-glow-matrix font-bold text-bubble-mint",children:e.length}),d.jsx("span",{className:"text-bubble-mint/40",children:"_evt"})]}),d.jsx("span",{className:"hidden text-bubble-mint/20 sm:inline",children:"│"}),d.jsxs("span",{children:[d.jsx("span",{className:"text-bubble-accent/60",children:"WS"})," ",d.jsx("span",{className:r?"text-glow-matrix font-bold tracking-wide text-bubble-mint":"animate-pulse text-glow-rose font-semibold text-bubble-rose",children:r?"SYNC":"WAIT"})]})]}),d.jsxs("div",{className:"relative flex shrink-0 gap-2",children:[d.jsx("button",{type:"button",onClick:t,className:"btn-neon rounded-md border border-bubble-accent/50 bg-gradient-to-r from-bubble-accent/25 to-bubble-mint/15 px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider text-bubble-accent sm:text-xs",children:"Exfil"}),d.jsx("button",{type:"button",onClick:n,className:"rounded-md border border-bubble-rose/40 bg-bubble-rose/10 px-3 py-1.5 text-[10px] font-bold uppercase tracking-wide text-bubble-rose transition hover:border-bubble-rose hover:bg-bubble-rose/20 sm:text-xs",children:"Purge"})]})]})}function t2(){return d.jsxs("div",{className:"pointer-events-none fixed inset-0 z-[2] overflow-hidden",children:[d.jsx("div",{className:"absolute -left-[20%] top-[10%] h-[min(70vh,520px)] w-[min(70vh,520px)] rounded-full bg-fuchsia-600/25 blur-[100px] animate-pulseGlow",style:{animationDelay:"0s"}}),d.jsx("div",{className:"absolute -right-[15%] bottom-[5%] h-[min(55vh,440px)] w-[min(55vh,440px)] rounded-full bg-cyan-400/20 blur-[90px] animate-pulseGlow",style:{animationDelay:"1.2s"}}),d.jsx("div",{className:"absolute left-[35%] top-[40%] h-[min(45vh,360px)] w-[min(45vh,360px)] -translate-x-1/2 -translate-y-1/2 rounded-full bg-emerald-400/15 blur-[80px] animate-floatSlow"}),d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,transparent_0%,rgba(2,4,8,0.75)_100%)]"})]})}const Tf=16,n2=7;function r2(){var e;try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const n=new t,r=n.createGain();r.gain.value=.11,r.connect(n.destination);const s=(c,f,h)=>{const g=n.createOscillator(),v=n.createGain();g.type="sine",g.frequency.setValueAtTime(c,f),v.gain.setValueAtTime(0,f),v.gain.linearRampToValueAtTime(1,f+.02),v.gain.exponentialRampToValueAtTime(.01,f+h),g.connect(v),v.connect(r),g.start(f),g.stop(f+h+.05)},i=n.currentTime;s(523.25,i,.11),s(659.25,i+.055,.13),s(783.99,i+.1,.16),s(1046.5,i+.14,.2);const o=n.createBufferSource(),a=n.createBuffer(1,n.sampleRate*.07,n.sampleRate),l=a.getChannelData(0);for(let c=0;c<l.length;c++)l[c]=(Math.random()*2-1)*Math.exp(-c/(l.length*.32));o.buffer=a;const u=n.createGain();u.gain.setValueAtTime(.055,i+.04),u.gain.exponentialRampToValueAtTime(.001,i+.12),o.connect(u),u.connect(r),o.start(i+.04),o.stop(i+.18),(e=n.resume)==null||e.call(n),setTimeout(()=>void n.close(),700)}catch{}}function s2(){const{cashWave:e,cashVariant:t,lastTag:n}=xs(),[r,s]=x.useState(!1),[i,o]=x.useState(0);return x.useEffect(()=>{if(e===0)return;o(e),s(!0),r2();const a=window.setTimeout(()=>s(!1),1650);return()=>window.clearTimeout(a)},[e]),d.jsx("div",{className:"pointer-events-none fixed left-2 top-[4.25rem] z-[55] sm:left-4 sm:top-[4.5rem] md:top-[5.25rem]",children:d.jsx(am,{mode:"wait",children:r?d.jsxs(O.div,{className:"relative flex flex-col items-start",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,scale:.92,filter:"blur(4px)"},transition:{duration:.4},children:[d.jsx(O.div,{className:"absolute -left-8 -top-8 h-40 w-40 rounded-full bg-gradient-to-br from-amber-400/45 via-yellow-200/30 to-bubble-mint/35 blur-2xl",initial:{scale:.2,opacity:0},animate:{scale:[.2,1.35,1],opacity:[0,1,.7]},transition:{duration:.5,ease:[.22,1,.36,1]}}),Array.from({length:Tf}).map((a,l)=>{const u=l/Tf*Math.PI*2,c=56+l%4*10;return d.jsx(O.span,{className:"absolute left-8 top-9 h-2 w-2 rounded-full bg-gradient-to-br from-yellow-100 to-amber-500 shadow-[0_0_12px_rgba(250,204,21,1)]",initial:{x:0,y:0,opacity:0,scale:0},animate:{x:Math.cos(u)*c,y:Math.sin(u)*c,opacity:[0,1,0],scale:[0,1.3,.3]},transition:{duration:.8,delay:l*.018,ease:"easeOut"}},`s-${l}`)}),Array.from({length:n2}).map((a,l)=>d.jsx(O.span,{className:"absolute left-8 top-8 text-xl sm:text-2xl",initial:{x:0,y:0,opacity:0,rotate:-30,scale:0},animate:{x:(l%2===0?1:-1)*(36+l*12),y:-32-l*11,opacity:[0,1,0],rotate:l*35,scale:[0,1.15,.85]},transition:{duration:.9,delay:.04+l*.035,ease:[.22,1,.36,1]},children:"🪙"},`c-${l}`)),d.jsxs(O.div,{className:"relative flex h-[4.75rem] w-[4.75rem] items-center justify-center sm:h-[5.5rem] sm:w-[5.5rem]",initial:{scale:0,rotate:-40},animate:{scale:[0,1.3,.92,1.06,1],rotate:[-40,12,-6,3,0]},transition:{duration:.7,ease:[.34,1.56,.64,1]},children:[d.jsx(O.div,{className:"absolute inset-0 rounded-2xl border-2 border-yellow-200/90",animate:{boxShadow:["0 0 25px rgba(250,204,21,0.55), inset 0 0 22px rgba(254,240,138,0.2)","0 0 50px rgba(0,255,157,0.5), inset 0 0 28px rgba(0,229,255,0.15)","0 0 28px rgba(250,204,21,0.6), inset 0 0 18px rgba(254,240,138,0.25)"]},transition:{duration:1.1,repeat:2}}),d.jsxs("svg",{viewBox:"0 0 100 100",className:"relative z-[1] h-[72%] w-[72%] drop-shadow-[0_0_14px_rgba(250,204,21,0.9)]","aria-hidden":!0,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"cashGold",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d.jsx("stop",{offset:"0%",stopColor:"#fef9c3"}),d.jsx("stop",{offset:"40%",stopColor:"#facc15"}),d.jsx("stop",{offset:"100%",stopColor:"#a16207"})]}),d.jsxs("filter",{id:"cashGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[d.jsx("feGaussianBlur",{stdDeviation:"1.2",result:"b"}),d.jsxs("feMerge",{children:[d.jsx("feMergeNode",{in:"b"}),d.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),d.jsx("circle",{cx:"50",cy:"50",r:"44",fill:"url(#cashGold)",filter:"url(#cashGlow)"}),d.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"#422006",strokeOpacity:"0.28",strokeWidth:"2"}),d.jsx("text",{x:"50",y:"64",textAnchor:"middle",fill:"#713f12",fontSize:"54",fontWeight:"700",fontFamily:"Audiowide, Orbitron, system-ui, sans-serif",children:"$"})]}),d.jsx(O.div,{className:"pointer-events-none absolute inset-0 overflow-hidden rounded-2xl",initial:!1,children:d.jsx(O.div,{className:"absolute inset-y-2 w-2/5 bg-gradient-to-r from-transparent via-white/60 to-transparent skew-x-[-18deg]",initial:{left:"-40%"},animate:{left:"140%"},transition:{duration:.55,delay:.12,ease:"easeInOut"}})})]}),d.jsxs(O.div,{className:"relative -mt-0.5 max-w-[12rem] pl-0.5",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.12,type:"spring",stiffness:320,damping:22},children:[d.jsx(O.p,{className:"font-display text-[10px] tracking-[0.42em] text-yellow-100 sm:text-[11px]",animate:{textShadow:["0 0 10px rgba(250,204,21,0.95)","0 0 22px rgba(0,255,157,0.75)","0 0 12px rgba(250,204,21,0.9)"]},transition:{duration:.75,repeat:3},children:t==="vault"?"VAULT · LOCKED":"CHA-CHING · HIT"}),n!=null&&n.uid?d.jsx(O.p,{className:"mt-1 truncate font-mono text-[10px] font-bold tracking-[0.15em] text-bubble-mint sm:text-xs",initial:{opacity:0,x:-6},animate:{opacity:1,x:0},transition:{delay:.22},children:n.uid}):null]})]},i):null})})}const Vg=x.createContext(()=>{});function i2({children:e}){const[t,n]=x.useState([]),r=x.useCallback((i,o="info")=>{const a=Date.now();n(l=>[...l,{id:a,msg:i,kind:o}]),setTimeout(()=>n(l=>l.filter(u=>u.id!==a)),4200)},[]),s=x.useMemo(()=>r,[r]);return d.jsxs(Vg.Provider,{value:s,children:[e,d.jsx("div",{className:"pointer-events-none fixed bottom-5 right-5 z-[60] flex max-w-sm flex-col gap-3",children:d.jsx(am,{children:t.map(i=>d.jsxs(O.div,{initial:{opacity:0,x:40,rotate:-2,scale:.92},animate:{opacity:1,x:0,rotate:0,scale:1},exit:{opacity:0,x:20,scale:.9},transition:{type:"spring",stiffness:380,damping:26},className:`pointer-events-auto relative overflow-hidden border-2 px-5 py-3.5 font-mono text-xs backdrop-blur-md ${i.kind==="err"?"border-bubble-rose bg-bubble-950/95 text-bubble-rose shadow-glowRose":"border-bubble-mint bg-bubble-900/95 text-bubble-mint shadow-glow"} `,children:[d.jsx("div",{className:`pointer-events-none absolute inset-0 opacity-30 ${i.kind==="err"?"bg-gradient-to-r from-bubble-rose/20 to-transparent":"bg-gradient-to-r from-bubble-accent/20 to-bubble-mint/10"}`}),d.jsx("span",{className:"relative mr-2 font-black opacity-80",children:i.kind==="err"?"!!":"»"}),d.jsx("span",{className:"relative",children:i.msg})]},i.id))})})]})}function Je(){return x.useContext(Vg)}function o2(e){const t=e.replace(/\s/g,"");if(t.length!==32)return null;const n=new Uint8Array(16);for(let u=0;u<16;u++)n[u]=parseInt(t.slice(u*2,u*2+2),16);const r=n[6],s=n[7],i=n[8],o=r>>4&1|s>>0&2|i>>0&4,a=r>>5&1|s>>1&2|i>>1&4,l=r>>6&1|s>>2&2|i>>2&4;return{c1:o,c2:a,c3:l}}function Og(e){switch(e){case 0:return"Ultralight / NTAG / Type 2";case 8:return"MIFARE Classic 1K";case 9:return"MIFARE Mini";case 24:return"MIFARE Classic 4K";default:return`SAK 0x${e.toString(16).toUpperCase()}`}}function Ig(e){var n;const t=e.replace(/\s/g,"");return t.length%2!==0?e:((n=t.match(/.{2}/g))==null?void 0:n.join(":"))??t}function a2(e){switch(e){case 1:return"Classic-style (MIFARE)";case 2:return"Type 2 / Ultralight-style";default:return"Unknown (check SAK/ATQA)"}}function l2(e){const t=[];return e.uidLen===4?t.push("4-byte UID — single cascade level (CL1)."):e.uidLen===7?t.push("7-byte UID — double cascade (CL1 + CL2) typical for 7B tags."):e.uidLen===10&&t.push("10-byte UID — triple cascade path."),e.sak===0&&t.push("SAK 0x00 — typical Type 2 / Ultralight-style path; use page read/write."),(e.sak===8||e.sak===9||e.sak===24)&&t.push("MIFARE Classic family — authenticate per sector trailer, then block read/write."),(e.atqa===1024||e.atqa===17408)&&t.push("ATQA 0x0400/0x4400 class — common Type A / MIFARE inventory shapes."),t}function u2(e){return e.map(t=>(Number(t)&255).toString(16).toUpperCase().padStart(2,"0")).join(" ")}function c2({className:e=""}){return d.jsx("div",{className:`relative ${e}`.trim(),children:d.jsxs("svg",{viewBox:"0 0 400 220",className:"h-auto w-full max-w-md text-bubble-mint/90","aria-hidden":!0,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"g1",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.9"}),d.jsx("stop",{offset:"100%",stopColor:"#00e5ff",stopOpacity:"0.35"})]}),d.jsxs("filter",{id:"glow",children:[d.jsx("feGaussianBlur",{stdDeviation:"2",result:"b"}),d.jsxs("feMerge",{children:[d.jsx("feMergeNode",{in:"b"}),d.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),[0,1,2,3].map(t=>d.jsx("ellipse",{cx:"200",cy:"110",rx:40+t*38,ry:28+t*26,fill:"none",stroke:"currentColor",strokeWidth:"0.6",strokeOpacity:.22-t*.04,className:"origin-center animate-[spin_32s_linear_infinite]",style:{transformOrigin:"200px 110px",animationDelay:`${t*2}s`}},t)),d.jsx("g",{filter:"url(#glow)",children:d.jsx("path",{d:"M200 110 L360 110 A160 80 0 0 1 200 190 Z",fill:"url(#g1)",fillOpacity:"0.12",className:"origin-center animate-[spin_6s_linear_infinite]",style:{transformOrigin:"200px 110px"}})}),d.jsx("circle",{cx:"200",cy:"110",r:"36",fill:"none",stroke:"currentColor",strokeWidth:"1.2",opacity:"0.5"}),d.jsx("circle",{cx:"200",cy:"110",r:"22",fill:"none",stroke:"#00e5ff",strokeWidth:"0.8",opacity:"0.45"}),d.jsx("circle",{cx:"200",cy:"110",r:"8",fill:"currentColor",opacity:"0.35"}),Array.from({length:12}).map((t,n)=>{const r=n/12*Math.PI*2,s=200+Math.cos(r)*118,i=110+Math.sin(r)*78;return d.jsx("rect",{x:s-1,y:i-1,width:"2",height:"2",fill:"currentColor",opacity:.15+n%3*.08,className:"animate-pulse",style:{animationDelay:`${n*.15}s`}},n)}),d.jsx("text",{x:"200",y:"205",textAnchor:"middle",className:"fill-bubble-mint/40 font-mono text-[9px] tracking-[0.35em]",children:"13.56MHZ"})]})})}function d2(){const e=Je(),{lastTag:t,applyScanPoll:n}=xs(),[r,s]=x.useState(null),[i,o]=x.useState(!0),a=()=>{$u("/api/status").then(s).catch(()=>e("Status unreachable","err"))};x.useEffect(()=>{a();const c=setInterval(a,3e3);return()=>clearInterval(c)},[e]),x.useEffect(()=>{r&&typeof r.scanning=="boolean"&&o(r.scanning)},[r]);const l=async()=>{try{await vt("/api/nfc/scan",{enable:!i}),o(!i),e(i?"Continuous scan off":"Continuous scan on")}catch(c){e(String(c),"err")}},u=async()=>{try{const c=await vt("/api/nfc/poll",{});c.present&&c.tag?(n(!0,c.tag),e(`Tag ${c.tag.uid}`)):(n(!1),e("No tag"))}catch(c){e(String(c),"err")}};return d.jsxs("div",{className:"space-y-8",children:[d.jsxs(O.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,ease:[.22,1,.36,1]},className:"glass relative overflow-hidden p-6 md:p-10",children:[d.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[conic-gradient(from_180deg_at_50%_120%,rgba(0,229,255,0.08),transparent_40%,rgba(255,42,109,0.06),transparent_70%)]"}),d.jsxs("div",{className:"relative grid gap-8 lg:grid-cols-[1fr_min(320px,40%)] lg:items-center",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-mono text-[10px] font-bold tracking-[0.4em] text-bubble-accent/80",children:"COMMAND_LAYER"}),d.jsxs("h1",{className:"font-display mt-2 text-3xl font-normal tracking-wide text-glow-matrix md:text-5xl",children:["NFC ",d.jsx("span",{className:"text-bubble-accent",children:"CONTROL"})]}),d.jsx("p",{className:"mt-3 max-w-xl text-sm leading-relaxed text-slate-400",children:"Full-time scan out of the box. Fat RF retries. Browser log + device session export — crank it from your phone."}),(r==null?void 0:r.session)&&(r.session.deepCapture||r.session.usedBytes>0)&&d.jsxs(O.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},className:"mt-5 flex flex-wrap items-center gap-3 rounded-xl border border-bubble-accent/40 bg-gradient-to-r from-bubble-accent/15 to-bubble-mint/10 px-4 py-3 text-sm shadow-glowCyan",children:[d.jsxs("span",{className:"font-mono text-bubble-mint",children:["RAM ",r.session.usedBytes,"/",r.session.maxBytes,r.session.full?" · LOCKED":""]}),d.jsx(sm,{to:"/capture",className:"btn-neon rounded-lg bg-bubble-mint/20 px-3 py-1 text-xs font-bold text-bubble-mint",children:"Read-all →"})]}),d.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[d.jsx(O.button,{type:"button",whileHover:{scale:1.04},whileTap:{scale:.98},onClick:u,className:"btn-neon rounded-xl bg-gradient-to-r from-bubble-accent via-cyan-400 to-bubble-mint px-6 py-3 text-sm font-black uppercase tracking-wider text-bubble-950 shadow-neonBtn",children:"Poll tag"}),d.jsx(O.button,{type:"button",whileHover:{scale:1.03},whileTap:{scale:.98},onClick:l,className:`rounded-xl border-2 px-6 py-3 text-sm font-bold uppercase tracking-wide transition ${i?"border-bubble-mint/70 bg-bubble-mint/15 text-glow-matrix text-bubble-mint shadow-glow":"border-white/20 bg-black/30 text-slate-400 hover:border-bubble-accent/50 hover:text-bubble-accent"}`,children:i?"Stop scan":"Start scan"})]})]}),d.jsx("div",{className:"relative flex justify-center lg:justify-end",children:d.jsx("div",{className:"relative w-full max-w-[280px] opacity-90 drop-shadow-[0_0_40px_rgba(0,229,255,0.35)]",children:d.jsx(c2,{})})})]})]}),d.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[d.jsxs(O.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.08},className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-normal text-bubble-accent text-glow-cyan",children:"Device stack"}),r?d.jsxs("ul",{className:"mt-4 space-y-3 font-mono text-sm text-slate-300",children:[d.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[d.jsx("span",{className:"text-slate-500",children:"uptime"}),d.jsxs("span",{className:"text-bubble-mint",children:[(r.uptimeMs/1e3).toFixed(1),"s"]})]}),d.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[d.jsx("span",{className:"text-slate-500",children:"heap"}),d.jsx("span",{className:"text-white",children:r.freeHeap})]}),d.jsxs("li",{className:"flex justify-between",children:[d.jsx("span",{className:"text-slate-500",children:"PN532"}),d.jsx("span",{className:"text-bubble-accent",children:r.pn532?`IC${r.pn532.ic} v${r.pn532.fwHi}.${r.pn532.fwLo}`:"n/a"})]})]}):d.jsx("p",{className:"mt-4 animate-pulse font-mono text-sm text-bubble-accent/60",children:"Pulling status…"})]}),d.jsxs(O.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.14},className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-normal text-bubble-rose/90 text-glow-rose",children:"Live tag"}),t?d.jsxs("div",{className:"mt-4 space-y-4 rounded-xl border border-bubble-mint/25 bg-black/35 p-4 shadow-glow",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-widest text-bubble-mint/50",children:"UID"}),d.jsx("div",{className:"font-mono text-xl font-bold tracking-[0.15em] text-glow-matrix text-bubble-mint md:text-2xl",children:Ig(t.uid)}),d.jsxs("p",{className:"mt-1 font-mono text-[11px] text-slate-500",children:["raw ",t.uid," · ",t.uidLen," byte",t.uidLen===1?"":"s"]})]}),d.jsxs("div",{className:"grid gap-3 border-t border-white/5 pt-3 font-mono text-[11px] text-slate-300 sm:grid-cols-2",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-500",children:"ATQA"})," ",d.jsxs("span",{className:"text-bubble-accent",children:["0x",(t.atqaHex??t.atqa.toString(16).toUpperCase().padStart(4,"0")).slice(-4)]}),d.jsxs("span",{className:"ml-2 text-slate-500",children:["(",t.atqa,")"]})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-500",children:"SAK"})," ",d.jsxs("span",{className:"text-bubble-accent",children:["0x",(t.sakHex??t.sak.toString(16).toUpperCase().padStart(2,"0")).slice(-2)]}),d.jsxs("span",{className:"ml-1 text-slate-400",children:["— ",Og(t.sak)]})]}),d.jsxs("div",{className:"sm:col-span-2",children:[d.jsx("span",{className:"text-slate-500",children:"Guess"})," ",d.jsx("span",{className:"text-bubble-mint",children:t.typeGuess??a2(t.typeHint)}),d.jsxs("span",{className:"ml-2 text-slate-600",children:["· hint ",t.typeHint]})]})]}),t.pn532GeneralStatus&&t.pn532GeneralStatus.length>0&&d.jsxs("div",{className:"rounded-lg border border-bubble-accent/20 bg-black/40 p-3",children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-widest text-bubble-accent/70",children:"PN532 general status"}),d.jsx("p",{className:"mt-2 break-all font-mono text-[10px] leading-relaxed text-slate-400",children:u2(t.pn532GeneralStatus)}),d.jsx("p",{className:"mt-2 text-[10px] text-slate-600",children:"Raw bytes from the chip right after this inventory (error flags, last command, tag count — see NXP PN532 user manual)."})]}),d.jsx("ul",{className:"space-y-1 border-t border-white/5 pt-3 text-[11px] leading-relaxed text-slate-500",children:l2(t).map((c,f)=>d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-bubble-mint/40",children:"▸"}),d.jsx("span",{children:c})]},f))})]}):d.jsx("p",{className:"mt-6 font-mono text-sm text-bubble-mint/40",children:"Listening on the field…"})]})]})]})}function f2(){const e=Je(),[t,n]=x.useState("FFFFFFFFFFFF"),[r,s]=x.useState(!1),[i,o]=x.useState(0),[a,l]=x.useState(""),[u,c]=x.useState(""),f=async()=>{try{const v=await vt("/api/mifare/read-block",{block:i,key:t,keyB:r});v.data?(l(v.data),e("Read OK")):e(v.error||"failed","err")}catch(v){e(String(v),"err")}},h=async()=>{try{const v=await vt("/api/ul/read-page",{page:i});v.data&&(l(v.data+" (UL page)"),e("UL read OK"))}catch(v){e(String(v),"err")}},g=u?o2(u):null;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"glass p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Read / analyze"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Authenticate with a known key, dump a block, paste a sector trailer to decode access bits."}),d.jsxs("div",{className:"mt-6 grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"block space-y-2 text-sm",children:["Key (12 hex)",d.jsx("input",{value:t,onChange:v=>n(v.target.value),className:"w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono text-bubble-mint outline-none ring-bubble-accent/40 focus:ring-2"})]}),d.jsxs("label",{className:"flex items-end gap-3 text-sm",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:v=>s(v.target.checked)})," Key B"]}),d.jsxs("label",{className:"block space-y-2 text-sm",children:["Block / page",d.jsx("input",{type:"number",value:i,onChange:v=>o(Number(v.target.value)),className:"w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 outline-none ring-bubble-accent/40 focus:ring-2"})]})]}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:f,className:"rounded-2xl bg-bubble-accent/90 px-4 py-2 font-semibold text-white",children:"MIFARE read block"}),d.jsx("button",{type:"button",onClick:h,className:"rounded-2xl border border-white/15 px-4 py-2",children:"Ultralight read page"})]}),a&&d.jsx("pre",{className:"mt-4 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-4 font-mono text-sm",children:a})]}),d.jsxs("div",{className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-semibold",children:"Sector trailer playground"}),d.jsxs("label",{className:"mt-4 block text-sm",children:["16-byte trailer (32 hex) — bytes 68 are access bytes",d.jsx("textarea",{value:u,onChange:v=>c(v.target.value),rows:3,className:"mt-2 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs outline-none focus:ring-2 focus:ring-bubble-accent/40"})]}),g&&d.jsxs("div",{className:"mt-4 rounded-2xl border border-bubble-mint/30 bg-bubble-mint/5 p-4 text-sm",children:["Parsed C1C3 nibble pattern: ",g.c1," ",g.c2," ",g.c3," (see NXP MIFARE docs for truth tables)"]}),d.jsxs("p",{className:"mt-4 text-xs text-slate-500",children:["SAK hints: common values for labeling only — ",Og(24)," etc."]})]})]})}const ws="Lab-only synthetic data and well-known defaults. Edit bytes freely to validate parsers, checksums, and emulate/raw paths — never treat these as real tags.",Ef=[{id:"get-fw",title:"GetFirmwareVersion (0x02)",hex:"02",detail:"Expect PN532 firmware major/minor in response payload."},{id:"get-status",title:"GetGeneralStatus (0x04)",hex:"04",detail:"Chip + RF status snapshot; useful sanity check after a stuck session."},{id:"in-list-a",title:"InListPassiveTarget — 106 kbps, 1 target",hex:"4A0100",detail:"Poll one ISO14443-A target at 106 kbps (maxTg=1, BrTy=0)."}],jf=[{id:"tg-stub",title:"TgInitAsTarget — opcode only (shell)",hex:"8C",detail:"Minimal placeholder; real target mode needs a full parameter block per NXP UM0701. Extend with NFCID, FeliCa params, etc."},{id:"tg-type-a-sketch",title:"TgInitAsTarget — Type A sketch (synthetic NFCID3T)",hex:"8C000012DEADBEEF00000000000000000000000000000000000000000000000000",detail:"Synthetic 0x8C prefix + padded fake ID — not guaranteed to satisfy any reader; use as a byte-editing template only."}],h2="DEADBEEF2208040000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFF078069FFFFFFFFFFFF",p2="04112233445566172233445566172233445566172233445566172233",m2="0310D1010C55046578616D706C652E636F6DFE",pl=[{id:"mifare-block0",title:"MIFARE Classic — block 0 (16 B, synthetic UID+BCC)",hex:"DEADBEEF220804000000000000000000",byteLength:16,sha256Hex:"6f13f064d70ec33b7ace5842011d66aff3852baa4ab7c0a85aa66d113c7189fe",detail:"Fake 4-byte UID (DE:AD:BE:EF wire order as stored), BCC = XOR(UID), rest filler. Pair with key FFFFFFFFFFFF on a writable tag only."},{id:"mifare-sector0",title:"MIFARE Classic — sector 0 dump (64 B)",hex:h2,byteLength:64,sha256Hex:"11095df4db11e4271f40234533db45de35c4ca69f04e231e3fa47f38181e0168",detail:"Four blocks: manufacturer/UID, empty, empty, default trailer (Key A/B FFFFFFFFFFFF, access FF078069). Edit block 12 payload and re-hash to validate your pipeline."},{id:"ntag-pages",title:"NTAG-style — pages 06 (28 B)",hex:p2,byteLength:28,sha256Hex:"8ffd95e646b2deb218dabd72e35c7a1938725e07332d8ed7df4f2a2656e590a0",detail:"Synthetic UID/internal/lock placeholders — not copied from a physical tag."},{id:"ndef-uri-tlv",title:"NDEF TLV — URI https://example.com/",hex:m2,byteLength:19,sha256Hex:"81197b6cd6e40a3f62f56f0c0f3f449c63a956919d04c5b5317895ad4328fa14",detail:"Type 2 TLV (0x03) + short NDEF Well-Known URI record; append to user memory after static pages in real layouts."}],g2=["FFFFFFFFFFFF","A0A1A2A3A4A5","D3F7D3F7D3F7","000000000000","B0B1B2B3B4B5","AABBCCDDEEFF","4D3A99C351DD","1A982C7E459A","714C5C886E97","587EE5F9350F","A0478CC39091","26940B21FFF5","E4410EF8ED2D"],y2=pl.map(e=>({name:`LAB // ${e.title}`,hex:e.hex,note:e.detail}));function fo({mode:e,onApplyHex:t,onPickBinary:n,className:r=""}){const[s,i]=x.useState(0),o=()=>i(a=>a+1);return e==="raw"?d.jsx("div",{className:`flex flex-wrap items-center gap-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load PN532 lab command",className:"max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=Ef.find(c=>c.id===l);u&&t(u.hex),o()},children:[d.jsx("option",{value:"",children:"Lab: PN532 command bytes…"}),Ef.map(a=>d.jsx("option",{value:a.id,children:a.title},a.id))]},s)}):e==="emulate"?d.jsx("div",{className:`flex flex-wrap items-center gap-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load emulate lab frame",className:"max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=jf.find(c=>c.id===l);u&&t(u.hex),o()},children:[d.jsx("option",{value:"",children:"Lab: emulate / TgInit…"}),jf.map(a=>d.jsx("option",{value:a.id,children:a.title},a.id))]},s)}):d.jsx("div",{className:`space-y-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load synthetic card blob",className:"w-full max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=pl.find(c=>c.id===l);u&&(t(u.hex),n==null||n(u)),o()},children:[d.jsx("option",{value:"",children:"Lab: synthetic card / NDEF blob…"}),pl.map(a=>d.jsxs("option",{value:a.id,children:[a.title," (",a.byteLength," B)"]},a.id))]},s)})}function v2(){const e=Je(),{lastTag:t}=xs(),[n,r]=x.useState("FFFFFFFFFFFF"),[s,i]=x.useState(!1),[o,a]=x.useState(4),[l,u]=x.useState("00000000000000000000000000000000"),[c,f]=x.useState(null),[h,g]=x.useState(4),[v,w]=x.useState("00000000"),S=async()=>{const p=n.replace(/\s/g,""),y=l.replace(/\s/g,"");if(p.length!==12||!/^[0-9A-Fa-f]+$/.test(p)){e("Key must be exactly 12 hex digits","err");return}if(y.length!==32||!/^[0-9A-Fa-f]+$/.test(y)){e("Block data must be exactly 32 hex digits (16 bytes)","err");return}if(!Number.isInteger(o)||o<0||o>255){e("Block must be an integer 0255","err");return}if(confirm("Write will modify tag memory. Continue?"))try{await vt("/api/mifare/write-block",{block:o,key:p,keyB:s,data:y}),e("Write OK")}catch(b){e(String(b),"err")}},m=async()=>{const p=v.replace(/\s/g,"");if(p.length!==8||!/^[0-9A-Fa-f]+$/.test(p)){e("UL data must be exactly 8 hex digits (4 bytes)","err");return}if(confirm("Ultralight page write — can brick OTP/lock bytes if misused. Continue?"))try{await vt("/api/ul/write-page",{page:h,data:p}),e("UL page write OK")}catch(y){e(String(y),"err")}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Write / clone helpers"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Block editor for MIFARE Classic. Read blocks on the Read tab, adjust hex here, then write with a key that unlocks the sector."}),t&&d.jsxs("p",{className:"mt-2 rounded-lg border border-bubble-mint/20 bg-bubble-mint/5 px-3 py-2 font-mono text-xs text-bubble-mint",children:["Field: ",d.jsx("span",{className:"text-white",children:Ig(t.uid)})," ·"," ",t.typeGuess??`hint ${t.typeHint}`]}),d.jsx("p",{className:"mt-2 text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(fo,{mode:"binary",className:"mt-3",onApplyHex:p=>{const y=p.replace(/\s/g,"");y.length<=32?u(y):(u(y.slice(0,32)),e("First 16 bytes of lab blob loaded into block editor","info"))},onPickBinary:f}),c&&d.jsxs("p",{className:"mt-2 font-mono text-[10px] text-bubble-accent/90",children:["Canonical SHA-256 (",c.byteLength," B): ",c.sha256Hex," — changes after any edit"]})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"text-sm",children:["Key (12 hex)",d.jsx("input",{value:n,onChange:p=>r(p.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"})]}),d.jsxs("label",{className:"flex items-end gap-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:s,onChange:p=>i(p.target.checked)})," Key B"]}),d.jsxs("label",{className:"text-sm",children:["Block",d.jsx("input",{type:"number",value:o,onChange:p=>a(Number(p.target.value)),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2"})]})]}),d.jsxs("label",{className:"block text-sm",children:["16 bytes (32 hex)",d.jsx("textarea",{value:l,onChange:p=>u(p.target.value),rows:4,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-sm"})]}),d.jsx("button",{type:"button",onClick:S,className:"rounded-2xl bg-gradient-to-r from-bubble-rose to-orange-400 px-6 py-3 font-bold text-white shadow-glow",children:"Write block"}),d.jsxs("div",{className:"border-t border-white/10 pt-8",children:[d.jsx("h2",{className:"font-display text-lg font-bold text-bubble-accent",children:"Ultralight / NTAG page write"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"4 bytes per page (8 hex). Keep tag on the coil. Avoid lock / config pages unless you mean it."}),d.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"text-sm",children:["Page",d.jsx("input",{type:"number",value:h,onChange:p=>g(Number(p.target.value)),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2"})]}),d.jsxs("label",{className:"text-sm",children:["Data (8 hex)",d.jsx("input",{value:v,onChange:p=>w(p.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"})]})]}),d.jsx("button",{type:"button",onClick:m,className:"mt-4 rounded-2xl border border-bubble-accent/50 bg-bubble-accent/20 px-6 py-3 font-bold text-bubble-accent",children:"Write UL page"})]})]})}const Nf="pn532_saved_tags_v1";function x2(){const e=Je(),[t,n]=x.useState([]),[r,s]=x.useState("My tag"),[i,o]=x.useState(""),[a,l]=x.useState(null);x.useEffect(()=>{try{const g=localStorage.getItem(Nf);n(g?JSON.parse(g):[])}catch{n([])}},[]);const u=g=>{localStorage.setItem(Nf,JSON.stringify(g)),n(g)},c=()=>{if(!i.trim()){e("Paste hex first","err");return}const v={id:`${Date.now()}-${Math.random().toString(16).slice(2)}`,name:r,hex:i.replace(/\s/g,""),ts:Date.now()};u([v,...t]),e("Saved")},f=g=>u(t.filter(v=>v.id!==g)),h=()=>{const g=new Set(t.map(S=>S.name)),v=Date.now(),w=y2.filter(S=>!g.has(S.name)).map((S,m)=>({id:`lab-seed-${v}-${m}`,name:S.name,hex:S.hex,ts:v}));if(!w.length){e("Lab catalog already in library","info");return}u([...w,...t]),e(`Seeded ${w.length} lab record(s)`)};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Saved tag library"}),d.jsx("p",{className:"text-sm text-slate-400",children:"Local browser storage — export by copy/paste."}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx("div",{className:"flex flex-wrap gap-2",children:d.jsx("button",{type:"button",onClick:h,className:"rounded-2xl border border-bubble-mint/30 bg-bubble-mint/10 px-4 py-2 font-mono text-xs font-semibold text-bubble-mint",children:"Seed all lab samples"})}),d.jsx(fo,{mode:"binary",onApplyHex:g=>o(g.replace(/\s/g,"")),onPickBinary:l}),a&&d.jsxs("div",{className:"rounded-xl border border-bubble-accent/25 bg-black/30 p-3 font-mono text-[10px] text-bubble-accent/90",children:[d.jsx("div",{className:"text-bubble-mint/70",children:"Expected SHA-256 (canonical blob, pre-edit)"}),d.jsx("div",{className:"break-all",children:a.sha256Hex})]}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx("input",{value:r,onChange:g=>s(g.target.value),placeholder:"Label",className:"rounded-2xl border border-white/10 bg-black/25 px-4 py-2"}),d.jsx("button",{type:"button",onClick:c,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Save current hex"})]}),d.jsx("textarea",{value:i,onChange:g=>o(g.target.value),placeholder:"Hex dump",rows:5,className:"w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"}),d.jsx("ul",{className:"space-y-3",children:t.map(g=>d.jsxs("li",{className:"rounded-2xl border border-white/10 bg-black/20 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"font-display font-semibold",children:g.name}),d.jsx("div",{className:"text-xs text-slate-500",children:new Date(g.ts).toLocaleString()})]}),d.jsx("button",{type:"button",onClick:()=>f(g.id),className:"text-rose-300",children:"Remove"})]}),d.jsx("pre",{className:"mt-2 max-h-32 overflow-auto text-xs text-bubble-mint/90",children:g.hex}),d.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(g.hex),e("Copied")},className:"mt-2 text-sm text-slate-300 underline",children:"Copy hex"})]},g.id))})]})}const w2=["FFFFFFFFFFFF","A0A1A2A3A4A5","D3F7D3F7D3F7","000000000000"],Af="pn532_key_dict_v1";function S2(){const e=Je(),[t,n]=x.useState([]),[r,s]=x.useState("");x.useEffect(()=>{const u=localStorage.getItem(Af);n(u?JSON.parse(u):[...w2])},[]);const i=u=>{localStorage.setItem(Af,JSON.stringify(u)),n(u)},o=()=>{const u=[...t];let c=0;for(const f of g2)u.includes(f)||(u.push(f),c++);if(!c){e("Lab key corpus already merged","info");return}i(u),e(`Added ${c} public lab key(s)`)},a=()=>{const u=sessionStorage.getItem("pn532_keylab_import");if(!(u!=null&&u.trim())){e("Key Lab has nothing staged","info");return}const c=u.split(/\r?\n/).map(g=>g.replace(/\s/g,"").toUpperCase()).filter(g=>g.length===12);if(!c.length){e("No valid 12-hex keys in stash","err");return}const f=[...t];let h=0;for(const g of c)f.includes(g)||(f.push(g),h++);i(f),sessionStorage.removeItem("pn532_keylab_import"),e(h?`Merged ${h} key(s) from Key Lab`:"Keys already in list")},l=()=>{const u=r.replace(/\s/g,"").toUpperCase();if(u.length!==12){e("12 hex chars required","err");return}t.includes(u)?e("Already in dictionary"):(i([u,...t]),e("Key added")),s("")};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Key manager"}),d.jsx("p",{className:"text-sm text-slate-400",children:"Dictionary for manual trials (not a cloud rainbow table). Keys stay in your browser."}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:o,className:"btn-neon rounded-xl border border-bubble-mint/40 bg-bubble-mint/10 px-4 py-2 font-mono text-xs font-bold text-bubble-mint",children:"Merge lab corpus"}),d.jsx("button",{type:"button",onClick:a,className:"rounded-xl border border-bubble-accent/45 bg-bubble-accent/10 px-4 py-2 font-mono text-xs font-bold text-bubble-accent",children:"Import Key Lab stash"})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{value:r,onChange:u=>s(u.target.value),placeholder:"New key",className:"flex-1 rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"}),d.jsx("button",{type:"button",className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",onClick:l,children:"Add"})]}),d.jsx("ul",{className:"space-y-2",children:t.map(u=>d.jsxs("li",{className:"flex items-center justify-between rounded-2xl border border-white/10 bg-black/20 px-4 py-2 font-mono text-sm",children:[u,d.jsx("button",{type:"button",className:"text-rose-300",onClick:()=>i(t.filter(c=>c!==u)),children:"×"})]},u))})]})}function b2(){const e=Je(),[t,n]=x.useState("4A0100"),[r,s]=x.useState([]),[i,o]=x.useState(""),a=c=>s(f=>[new Date().toLocaleTimeString()+" "+c,...f].slice(0,80)),l=async()=>{try{const c=await vt("/api/raw/pn532",{frame:t});a(`TX ${t}`),a(`RX ${c.response||c.error||"?"}`),c.response&&e("Frame OK")}catch(c){a(`ERR ${String(c)}`),e(String(c),"err")}},u=async()=>{try{const c=await $u("/api/pn532/general-status");o(JSON.stringify(c.raw??c,null,2)),e("Fetched PN532 status")}catch(c){e(String(c),"err")}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Advanced / raw PN532"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Send command bytes (without PN532 frame wrapper). Example: ",d.jsx("code",{children:"4A0100"})," lists one Type A passive target at 106 kbps."]}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(fo,{mode:"raw",onApplyHex:c=>n(c)}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("input",{value:t,onChange:c=>n(c.target.value),className:"min-w-[16rem] flex-1 rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono text-sm"}),d.jsx("button",{type:"button",onClick:l,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Send"}),d.jsx("button",{type:"button",onClick:u,className:"rounded-2xl border border-white/15 px-4 py-2",children:"General status"})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-slate-300",children:"Log"}),d.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs",children:r.join(`
`)})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-slate-300",children:"PN532 status snapshot"}),d.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs",children:i||"—"})]})]})]})}function k2(){const e=Je(),[t,n]=x.useState(""),[r,s]=x.useState(!1);x.useEffect(()=>{n(localStorage.getItem("apiBase")||""),s(document.documentElement.classList.contains("light"))},[]);const i=()=>{localStorage.setItem("apiBase",t),e("Saved API base — reload for WS")},o=()=>{const a=!r;s(a),document.documentElement.classList.toggle("light",a),document.documentElement.classList.toggle("dark",!a),localStorage.setItem("theme",a?"light":"dark"),e(a?"Light":"Dark")};return d.jsxs("div",{className:"glass max-w-xl space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Settings"}),d.jsxs("label",{className:"block text-sm",children:["API base (empty = same host)",d.jsx("input",{value:t,onChange:a=>n(a.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2",placeholder:"http://192.168.4.1"})]}),d.jsx("button",{type:"button",onClick:i,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Save"}),d.jsxs("div",{className:"flex items-center justify-between rounded-2xl border border-white/10 bg-black/20 px-4 py-3",children:[d.jsx("span",{className:"text-sm",children:"Theme"}),d.jsx("button",{type:"button",onClick:o,className:"rounded-full border border-white/15 px-4 py-1 text-sm",children:r?"Switch to dark":"Switch to light"})]}),d.jsxs("p",{className:"text-xs text-slate-500",children:["Firmware opens a ",d.jsx("strong",{children:"password-free"})," SoftAP named ",d.jsx("strong",{children:"PN532-Toolkit"})," (lab default). mDNS: ",d.jsx("code",{children:"pn532tool.local"})]})]})}function C2(){const e=Je(),{log:t}=xs(),[n,r]=x.useState(null),s=x.useCallback(()=>{$u("/api/status").then(r).catch(()=>{})},[]);x.useEffect(()=>{s();const f=setInterval(s,2e3);return()=>clearInterval(f)},[s]),x.useEffect(()=>{s()},[t.length,s]);const i=(()=>{const f=[...t].reverse().find(h=>h.channel==="capture");return f?typeof f.payload=="object"?JSON.stringify(f.payload):String(f.payload):""})(),o=n==null?void 0:n.session,a=o?Math.min(100,o.usedBytes/Math.max(1,o.maxBytes)*100):0,l=async f=>{try{await vt("/api/session/deep",{enable:f}),e(f?"Passive read-all on (live scan on by default at boot)":"Passive read-all off"),s()}catch(h){e(String(h),"err")}},u=async()=>{try{await vt("/api/session/clear",{}),e("Buffer cleared — scanning can resume"),s()}catch(f){e(String(f),"err")}},c=async()=>{try{const f=await fetch(vs("/api/session/export"));if(!f.ok)throw new Error(await f.text());const h=await f.blob(),g=URL.createObjectURL(h),v=document.createElement("a");v.href=g,v.download=`pn532-deep-capture-${Date.now()}.ndjson`,v.click(),URL.revokeObjectURL(g),e("Download started — check your Downloads folder")}catch(f){e(String(f),"err")}};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(O.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"glass relative overflow-hidden p-8",children:[d.jsx("div",{className:"pointer-events-none absolute -left-20 top-0 h-48 w-48 rounded-full bg-bubble-mint/20 blur-3xl"}),d.jsx("h1",{className:"font-display text-3xl font-bold md:text-4xl",children:"Passive read-all mode"}),d.jsx("p",{className:"mt-1 text-sm font-medium text-bubble-mint/90",children:"Same feature as “deep capture” — fully controlled from this screen."}),d.jsxs("p",{className:"mt-3 max-w-2xl text-slate-300",children:["Turn it on below and keep ",d.jsx("strong",{children:"live scan"})," running (on by default at boot). Each"," ",d.jsx("strong",{children:"new tag"})," in the field is read ",d.jsx("strong",{children:"passively"}),": no per-block clicks — the firmware pulls ",d.jsx("strong",{children:"all data it can"})," (PN532 status + Classic sector/block dump with default keys, or Ultralight/NTAG page sweep). Results queue in ",d.jsx("strong",{children:"device RAM"}),"; when full, polling pauses until you ",d.jsx("strong",{children:"download"})," and ",d.jsx("strong",{children:"clear"}),"."]})]}),d.jsxs("div",{className:"glass p-6",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-display text-lg font-semibold",children:"Read-all session buffer"}),d.jsxs("p",{className:"text-sm text-slate-400",children:[(o==null?void 0:o.lines)??0," full dumps · ",(o==null?void 0:o.usedBytes)??0," / ",(o==null?void 0:o.maxBytes)??"—"," bytes RAM"]})]}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:()=>l(!((o==null?void 0:o.deepCapture)??!1)),className:`rounded-2xl px-4 py-2 font-semibold ${o!=null&&o.deepCapture?"bg-bubble-mint/20 text-bubble-mint ring-2 ring-bubble-mint/40":"border border-white/15 bg-white/5"}`,children:o!=null&&o.deepCapture?"Passive read-all ON":"Enable passive read-all"}),d.jsx("button",{type:"button",onClick:c,className:"rounded-2xl bg-gradient-to-r from-bubble-accent to-indigo-400 px-4 py-2 font-bold text-white shadow-glow",children:"Download NDJSON"}),d.jsx("button",{type:"button",onClick:u,className:"rounded-2xl border border-white/20 px-4 py-2",children:"Clear buffer"})]})]}),d.jsx("div",{className:"mt-6 h-4 overflow-hidden rounded-full bg-black/40",children:d.jsx(O.div,{className:"h-full rounded-full bg-gradient-to-r from-bubble-accent to-bubble-mint",initial:!1,animate:{width:`${a}%`},transition:{type:"spring",stiffness:120,damping:20}})}),(o==null?void 0:o.full)&&d.jsxs("div",{className:"mt-6 rounded-2xl border-2 border-bubble-rose/50 bg-bubble-rose/10 p-4 text-center",children:[d.jsx("p",{className:"font-display text-lg font-bold text-bubble-rose",children:"Buffer full — reader paused"}),d.jsxs("p",{className:"mt-1 text-sm text-slate-300",children:["Tap ",d.jsx("strong",{children:"Download NDJSON"})," to pull every card profile to your phone, then"," ",d.jsx("strong",{children:"Clear buffer"})," to resume field scans."]})]}),(o==null?void 0:o.deepCapture)&&n&&!n.scanning&&d.jsxs("p",{className:"mt-4 rounded-2xl border border-amber-500/30 bg-amber-500/10 p-3 text-sm text-amber-100",children:["Firmware normally has ",d.jsx("strong",{children:"Live scan"})," on at boot. If you turned it off, enable it on the Dashboard."]}),i&&d.jsxs("pre",{className:"mt-4 max-h-40 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs text-slate-300",children:["Last capture event: ",i]})]})]})}function P2(){const e=Je(),[t,n]=x.useState("classic1k"),[r,s]=x.useState(!0),[i,o]=x.useState(`FFFFFFFFFFFF
A0A1A2A3A4A5
D3F7D3F7D3F7`),[a,l]=x.useState(!1),[u,c]=x.useState(""),f=async()=>{l(!0),c("");try{const h=i.split(/\r?\n/).map(S=>S.replace(/\s/g,"").toUpperCase()).filter(S=>S.length===12),g={readerType:t,variations:r,keysHex:h},v=await fetch(vs("/api/mifare/dictionary-attack"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),w=await v.text();if(!v.ok)throw new Error(w);try{const S=JSON.parse(w);c(JSON.stringify(S,null,2))}catch{c(w)}e("Dictionary pass finished")}catch(h){e(String(h),"err")}finally{l(!1)}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Dictionary attack"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Select card family, optionally enable ",d.jsx("strong",{children:"bounded variations"})," (XOR / low-nibble tweaks per key). Firmware tries a ",d.jsx("strong",{children:"built-in community list"})," (Proxmark3 / MCT-style defaults) plus your lines below. This is ",d.jsx("strong",{children:"not"})," a full 2⁴⁸ exhaustive search — only keys you and the community already know. Hold a ",d.jsx("strong",{children:"MIFARE Classic"})," on the coil."," ",d.jsx("a",{className:"text-bubble-mint underline",href:"https://github.com/RfidResearchGroup/proxmark3/blob/master/client/dictionaries/mfc_default_keys.dic",target:"_blank",rel:"noreferrer",children:"More keys online"}),"."]}),d.jsxs("label",{className:"block text-sm",children:["Reader / map",d.jsxs("select",{value:t,onChange:h=>n(h.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2",children:[d.jsx("option",{value:"classic1k",children:"MIFARE Classic 1K (sectors 015)"}),d.jsx("option",{value:"classic4k",children:"MIFARE Classic 4K (sectors 039, proper 4/16-block geometry)"})]})]}),d.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:h=>s(h.target.checked)}),"Variations (extra tries per key — slower, wider net)"]}),d.jsxs("label",{className:"block text-sm",children:["Extra keys (one 12-hex key per line, merged after built-in list)",d.jsx("textarea",{value:i,onChange:h=>o(h.target.value),rows:6,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"})]}),d.jsx("button",{type:"button",disabled:a,onClick:f,className:"rounded-2xl bg-gradient-to-r from-bubble-rose to-orange-500 px-6 py-3 font-bold text-white disabled:opacity-50",children:a?"Running…":"Run dictionary attack"}),u&&d.jsx("pre",{className:"max-h-96 overflow-auto rounded-2xl border border-white/10 bg-black/40 p-4 text-xs text-bubble-mint",children:u})]})}function T2(){const e=Je(),[t,n]=x.useState("8C"),[r,s]=x.useState(""),[i,o]=x.useState(!1),a=async()=>{o(!0),s("");try{const l=await fetch(vs("/api/nfc/emulate-raw"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hex:t.replace(/\s/g,"")})}),u=await l.text();if(!l.ok)throw new Error(u);try{s(JSON.stringify(JSON.parse(u),null,2))}catch{s(u)}e("PN532 emulation command sent")}catch(l){e(String(l),"err")}finally{o(!1)}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Card emulation (PN532 target mode)"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Sends ",d.jsx("code",{className:"text-bubble-mint",children:"TgInitAsTarget"})," (0x8C) and following bytes as one PN532 payload. Real card emulation depends on UID length, timing, and reader behavior — this is an"," ",d.jsx("strong",{children:"expert / experimental"})," path. Build the byte sequence from NXP UM0701 or community examples. Wrong frames can leave the RF stack busy; power-cycle if the field acts stuck."]}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(fo,{mode:"emulate",onApplyHex:l=>n(l)}),d.jsxs("label",{className:"block text-sm",children:["Command + parameters (hex, no spaces required)",d.jsx("textarea",{value:t,onChange:l=>n(l.target.value),rows:4,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"})]}),d.jsx("button",{type:"button",disabled:i,onClick:a,className:"rounded-2xl bg-bubble-accent px-6 py-2 font-semibold text-white disabled:opacity-50",children:i?"Sending…":"Send emulate frame"}),r&&d.jsx("pre",{className:"max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/40 p-4 text-xs text-slate-200",children:r})]})}function Rf({title:e,badge:t,children:n,className:r=""}){return d.jsxs(O.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.4,ease:[.22,1,.36,1]},className:`glass panel-edge relative overflow-hidden p-6 ${r}`.trim(),children:[d.jsx("div",{className:"pointer-events-none absolute -right-20 -top-20 h-40 w-40 rounded-full bg-bubble-accent/10 blur-3xl"}),d.jsx("div",{className:"pointer-events-none absolute -bottom-16 -left-16 h-36 w-36 rounded-full bg-bubble-rose/10 blur-3xl"}),d.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-bubble-accent/[0.06] via-transparent to-bubble-mint/[0.07]"}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[d.jsx("h2",{className:"font-display text-lg font-normal tracking-wide text-bubble-mint text-glow-matrix",children:e}),t?d.jsx(O.span,{animate:{boxShadow:["0 0 12px rgba(0,229,255,0.3)","0 0 22px rgba(0,255,157,0.45)","0 0 12px rgba(0,229,255,0.3)"]},transition:{duration:2.2,repeat:1/0},className:"rounded-full border border-bubble-accent/50 bg-bubble-accent/15 px-2.5 py-0.5 font-mono text-[10px] uppercase tracking-widest text-bubble-accent",children:t}):null]}),n]})]})}function ea(e){const t=e.replace(/\s/g,"");if(t.length!==12)return null;const n=[];for(let r=0;r<12;r+=2){const s=parseInt(t.slice(r,r+2),16);if(Number.isNaN(s))return null;n.push(s)}return n}function kr(e){return e.map(t=>t.toString(16).toUpperCase().padStart(2,"0")).join("")}function E2(e){const t=e.length,n=new Set,r=[];for(let s=0;s<1<<t;s++){const i=new Array(6).fill(0);for(let a=0;a<t;a++)if(s&1<<a)for(let l=0;l<6;l++)i[l]^=e[a][l];const o=kr(i);n.has(o)||(n.add(o),r.push([...i]))}return r}function j2(e){const t=e.replace(/\s/g,"");if(t.length%2)return null;const n=[];for(let o=0;o<t.length;o+=2){const a=parseInt(t.slice(o,o+2),16);if(Number.isNaN(a))return null;n.push(a)}if(!n.length)return null;const r=new Map;for(const o of n)r.set(o,(r.get(o)||0)+1);let s=0;const i=n.length;for(const o of r.values()){const a=o/i;s-=a*Math.log2(a)}return s}function N2(){const e=Je(),[t,n]=x.useState("FFFFFFFFFFFF"),[r,s]=x.useState("A0A1A2A3A4A5"),[i,o]=x.useState("000000000000"),[a,l]=x.useState(!1),[u,c]=x.useState("DEADBEEF"),f=x.useMemo(()=>{const S=ea(t),m=ea(r),p=ea(i);return!S||!m?null:a&&p?[S,m,p]:[S,m]},[t,r,i,a]),h=x.useMemo(()=>f?E2(f):[],[f]),g=x.useMemo(()=>j2(u),[u]),v=()=>{const S=h.map(m=>kr(m)).join(`
`);navigator.clipboard.writeText(S),e("Copied XOR span keys")},w=()=>{const S=h.map(m=>kr(m)).join(`
`);sessionStorage.setItem("pn532_keylab_import",S),e("Stored for Keys page — open Keys and tap “Import Key Lab”")};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"glass relative overflow-hidden p-8",children:[d.jsx("div",{className:"pointer-events-none absolute -right-24 top-0 h-72 w-72 rounded-full bg-bubble-accent/15 blur-3xl"}),d.jsx("h1",{className:"font-display text-3xl font-bold text-glow-matrix md:text-4xl",children:"Key Lab"}),d.jsxs("p",{className:"mt-3 max-w-3xl text-sm leading-relaxed text-slate-400",children:["XOR your base keys together in every combination → more candidates to paste into ",d.jsx("strong",{children:"Brute"})," or"," ",d.jsx("strong",{children:"Keys"}),". Entropy readout is just for fun on random hex blobs."]})]}),d.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[d.jsxs(Rf,{title:"XOR span generator",badge:"mix",children:[d.jsx("p",{className:"mb-4 text-xs leading-relaxed text-slate-500",children:"All XOR combinations of your base keys (2 bases → up to 4 keys; 3 bases → up to 8). Each result is a valid 6-byte Classic key candidate."}),d.jsxs("label",{className:"block text-xs text-slate-400",children:["Base A",d.jsx("input",{value:t,onChange:S=>n(S.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}),d.jsxs("label",{className:"mt-3 block text-xs text-slate-400",children:["Base B",d.jsx("input",{value:r,onChange:S=>s(S.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}),d.jsxs("label",{className:"mt-3 flex items-center gap-2 text-xs text-slate-400",children:[d.jsx("input",{type:"checkbox",checked:a,onChange:S=>l(S.target.checked)}),"Use third base"]}),a?d.jsxs("label",{className:"mt-2 block text-xs text-slate-400",children:["Base C",d.jsx("input",{value:i,onChange:S=>o(S.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}):null,f?d.jsxs(d.Fragment,{children:[d.jsx("ul",{className:"mt-4 max-h-48 space-y-1 overflow-auto rounded-xl border border-bubble-mint/15 bg-black/35 p-3 font-mono text-xs text-bubble-mint",children:h.map(S=>d.jsx("li",{children:kr(S)},kr(S)))}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:v,className:"rounded-xl bg-bubble-accent px-4 py-2 text-sm font-semibold text-bubble-950",children:"Copy all"}),d.jsx("button",{type:"button",onClick:w,className:"rounded-xl border border-bubble-mint/40 px-4 py-2 text-sm text-bubble-mint",children:"Stage for Keys"})]})]}):d.jsx("p",{className:"mt-4 text-sm text-bubble-rose",children:"Enter valid 12-hex keys."})]}),d.jsxs(Rf,{title:"Blob entropy",badge:"analysis",children:[d.jsx("p",{className:"mb-4 text-xs text-slate-500",children:"Shannon entropy per byte of your hex blob (08). Random uniform bytes → ~8; sparse UID-like → lower."}),d.jsx("textarea",{value:u,onChange:S=>c(S.target.value),rows:5,className:"w-full rounded-xl border border-white/10 bg-black/30 p-3 font-mono text-xs"}),d.jsx("div",{className:"mt-4 rounded-xl border border-bubble-accent/25 bg-bubble-accent/5 p-4 font-mono text-sm text-bubble-accent",children:g==null?"Invalid hex (even length, 0-9A-F)":`${g.toFixed(3)} bits / byte`})]})]})]})}const A2=[["/","Dash"],["/capture","Read-all"],["/read","Read"],["/write","Write"],["/brute","Brute"],["/emulate","Emu"],["/keylab","KeyLab"],["/library","Lib"],["/keys","Keys"],["/raw","Raw"],["/settings","Set"]];function R2(){return d.jsx(i2,{children:d.jsx(qb,{children:d.jsxs("div",{className:"hack-scanlines hack-grid relative min-h-screen pb-20",children:[d.jsx(t2,{}),d.jsx(s2,{}),d.jsx(e2,{}),d.jsxs("header",{className:"relative z-40 border-b border-bubble-accent/20 bg-bubble-950/80 backdrop-blur-xl",children:[d.jsx("div",{className:"absolute inset-x-0 bottom-0 h-px bg-gradient-to-r from-transparent via-bubble-mint/60 to-transparent"}),d.jsx("div",{className:"absolute inset-x-0 top-0 h-px bg-gradient-to-r from-bubble-rose/30 via-bubble-accent/40 to-bubble-mint/30 opacity-80"}),d.jsxs("div",{className:"relative mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-3 px-4 py-4",children:[d.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-4",children:[d.jsxs(O.div,{className:"font-display text-lg font-normal tracking-[0.12em] sm:text-xl md:text-2xl",initial:{opacity:0,x:-12},animate:{opacity:1,x:0},transition:{type:"spring",stiffness:120,damping:18},children:[d.jsx(O.span,{className:"bg-gradient-to-r from-bubble-mint via-bubble-accent to-bubble-rose bg-clip-text text-transparent text-glow-matrix",animate:{backgroundPosition:["0% 50%","100% 50%","0% 50%"]},transition:{duration:8,repeat:1/0,ease:"linear"},style:{WebkitBackgroundClip:"text",backgroundClip:"text",backgroundImage:"linear-gradient(90deg, #00ff9d, #00e5ff, #ff2a6d, #d4ff00, #00ff9d, #00ff9d)",backgroundSize:"250% 100%"},children:"PN532"}),d.jsx("span",{className:"ml-2 text-[9px] font-mono font-normal tracking-[0.35em] text-bubble-accent/60 sm:text-[10px]",children:"MAXIMAL"})]}),d.jsxs("span",{className:"hidden font-mono text-[9px] text-bubble-mint/40 md:inline lg:text-[10px]",children:[d.jsx("span",{className:"text-bubble-accent/90",children:"●"})," RF_STACK"," ",d.jsx("span",{className:"text-bubble-rose/80",children:"LIVE"}),d.jsx("span",{className:"mx-1.5 text-bubble-mint/25",children:"│"}),d.jsx("span",{className:"text-bubble-mint/50",children:"ws://stream"})]})]}),d.jsx("nav",{className:"flex max-w-full flex-wrap justify-end gap-1 text-[10px] font-mono sm:gap-1.5 sm:text-[11px]",children:A2.map(([e,t])=>d.jsx(gx,{to:e,children:({isActive:n})=>d.jsxs(O.span,{className:`inline-block rounded-md border px-1.5 py-1 sm:px-2 sm:py-1.5 ${n?"nav-hack-active":"border-transparent text-slate-500 hover:border-bubble-accent/35 hover:text-bubble-accent hover:shadow-[0_0_18px_rgba(0,229,255,0.25)]"}`,whileHover:{scale:1.06,y:-1},whileTap:{scale:.97},transition:{type:"spring",stiffness:400,damping:22},children:[d.jsx("span",{className:"text-bubble-mint/35",children:"⟨"}),t,d.jsx("span",{className:"text-bubble-mint/35",children:"⟩"})]})},e))})]})]}),d.jsx("main",{className:"relative z-10 mx-auto max-w-6xl px-4 py-8",children:d.jsx(O.div,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{duration:.45,ease:[.22,1,.36,1]},children:d.jsxs(ix,{children:[d.jsx(_e,{path:"/",element:d.jsx(d2,{})}),d.jsx(_e,{path:"/capture",element:d.jsx(C2,{})}),d.jsx(_e,{path:"/read",element:d.jsx(f2,{})}),d.jsx(_e,{path:"/write",element:d.jsx(v2,{})}),d.jsx(_e,{path:"/brute",element:d.jsx(P2,{})}),d.jsx(_e,{path:"/emulate",element:d.jsx(T2,{})}),d.jsx(_e,{path:"/keylab",element:d.jsx(N2,{})}),d.jsx(_e,{path:"/library",element:d.jsx(x2,{})}),d.jsx(_e,{path:"/keys",element:d.jsx(S2,{})}),d.jsx(_e,{path:"/raw",element:d.jsx(b2,{})}),d.jsx(_e,{path:"/settings",element:d.jsx(k2,{})})]})})})]})})})}const L2=localStorage.getItem("theme");L2==="light"&&(document.documentElement.classList.add("light"),document.documentElement.classList.remove("dark"));const Lf=document.getElementById("root");Lf&&ta.createRoot(Lf).render(d.jsx($f.StrictMode,{children:d.jsx(hx,{children:d.jsx(R2,{})})}));